@tager/admin-import 1.0.0 → 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/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { i18n, request, useI18n, useToast, useResource, navigateBack, convertRequestErrorToMap } from "@tager/admin-services";
2
- import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createTextVNode, createCommentVNode, onMounted, resolveComponent, createBlock, withCtx, createVNode, computed, ref, watch, withModifiers } from "vue";
3
- import { DataTable, useDataTable, FormFieldFileInput, FormFooter, FormFieldSelect } from "@tager/admin-ui";
4
- import { Page } from "@tager/admin-layout";
5
- import { universalFieldUtils, DynamicField } from "@tager/admin-dynamic-field";
6
- import { compile } from "path-to-regexp";
7
- import { useRouter } from "vue-router";
8
- const EN = {
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
9
  home: "Home",
10
10
  import: "Import",
11
11
  importList: "Import List",
@@ -23,69 +23,59 @@ const EN = {
23
23
  error: "Error",
24
24
  createdSuccessMessage: "Import has been successfully created",
25
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: "Создание импорта не удалось"
26
44
  };
27
- const RU = {
28
- home: "\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
29
- import: "\u0418\u043C\u043F\u043E\u0440\u0442",
30
- importList: "\u0421\u043F\u0438\u0441\u043E\u043A \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u0432",
31
- importForm: "\u0424\u043E\u0440\u043C\u0430 \u0438\u043C\u043F\u043E\u0440\u0442\u0430",
32
- type: "\u0422\u0438\u043F",
33
- importType: "\u0422\u0438\u043F \u0438\u043C\u043F\u043E\u0440\u0442\u0430",
34
- status: "\u0421\u0442\u0430\u0442\u0443\u0441",
35
- message: "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
36
- log: "\u041B\u043E\u0433",
37
- params: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B",
38
- file: "\u0424\u0430\u0439\u043B",
39
- newImport: "\u041D\u043E\u0432\u044B\u0439 \u0438\u043C\u043F\u043E\u0440\u0442",
40
- importCreation: "\u0421\u043E\u0437\u0434\u0430\u043D\u0438\u0435 \u0438\u043C\u043F\u043E\u0440\u0442\u0430",
41
- success: "\u0423\u0441\u043F\u0435\u0445",
42
- error: "\u041E\u0448\u0438\u0431\u043A\u0430",
43
- createdSuccessMessage: "\u0418\u043C\u043F\u043E\u0440\u0442 \u0431\u044B\u043B\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u043D",
44
- createdErrorMessage: "\u0421\u043E\u0437\u0434\u0430\u043D\u0438\u0435 \u0438\u043C\u043F\u043E\u0440\u0442\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C"
45
- };
46
- function applyTranslations() {
47
- i18n.addTranslations("en", "import", EN);
48
- i18n.addTranslations("ru", "import", RU);
45
+ function ie() {
46
+ O.addTranslations("en", "import", re), O.addTranslations("ru", "import", ae);
49
47
  }
50
- function getImportList(params) {
51
- return request.get({ path: "/admin/tager/import", params });
48
+ function ne(e) {
49
+ return M.get({ path: "/admin/tager/import", params: e });
52
50
  }
53
- function getModuleInfo() {
54
- return request.get({ path: "/admin/tager/import/info" });
51
+ function se() {
52
+ return M.get({ path: "/admin/tager/import/info" });
55
53
  }
56
- function createImport(payload) {
57
- return request.post({ path: "/admin/tager/import", body: payload });
54
+ function me(e) {
55
+ return M.post({ path: "/admin/tager/import", body: e });
58
56
  }
59
- const IMPORT_ROUTE_PATHS = {
57
+ const T = {
60
58
  IMPORT_LIST: "/import",
61
59
  IMPORT_FORM: "/import/:importId"
62
60
  };
63
- function getImportListUrl() {
64
- return IMPORT_ROUTE_PATHS.IMPORT_LIST;
61
+ function D() {
62
+ return T.IMPORT_LIST;
65
63
  }
66
- function getImportFormUrl(params) {
67
- return compile(IMPORT_ROUTE_PATHS.IMPORT_FORM)(params);
64
+ function le(e) {
65
+ return te(T.IMPORT_FORM)(e);
68
66
  }
69
- function dateTimeFormat(value) {
70
- const date = new Date(value);
67
+ function pe(e) {
68
+ const t = new Date(e);
71
69
  return new Intl.DateTimeFormat("ru-RU", {
72
- "year": "numeric",
70
+ year: "numeric",
73
71
  month: "numeric",
74
72
  day: "numeric",
75
73
  hour: "numeric",
76
74
  minute: "numeric",
77
75
  second: "numeric"
78
- }).format(date);
76
+ }).format(t);
79
77
  }
80
- var CellHistory_vue_vue_type_style_index_0_scoped_true_lang = "";
81
- var _export_sfc = (sfc, props) => {
82
- const target = sfc.__vccOpts || sfc;
83
- for (const [key, val] of props) {
84
- target[key] = val;
85
- }
86
- return target;
87
- };
88
- const _sfc_main$2 = defineComponent({
78
+ const ue = R({
89
79
  name: "CellHistory",
90
80
  props: {
91
81
  history: {
@@ -95,150 +85,143 @@ const _sfc_main$2 = defineComponent({
95
85
  },
96
86
  setup() {
97
87
  return {
98
- dateTimeFormat
88
+ dateTimeFormat: pe
99
89
  };
100
90
  }
101
- });
102
- const _hoisted_1 = { key: 0 };
103
- const _hoisted_2 = { class: "name" };
104
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
105
- return _ctx.history.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_1, [
106
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.history, (history, index) => {
107
- return openBlock(), createElementBlock("li", { key: index }, [
108
- createElementVNode("span", _hoisted_2, toDisplayString(history.status), 1),
109
- createTextVNode(" " + toDisplayString(_ctx.dateTimeFormat(history.datetime)), 1)
110
- ]);
111
- }), 128))
112
- ])) : createCommentVNode("", true);
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);
113
104
  }
114
- var CellHistory = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-70566d6e"]]);
115
- const _sfc_main$1 = defineComponent({
105
+ const fe = /* @__PURE__ */ _(ue, [["render", ge], ["__scopeId", "data-v-ebee5edd"]]), ye = R({
116
106
  name: "ImportList",
117
- components: { CellHistory, DataTable, Page },
107
+ components: { CellHistory: fe, DataTable: W, Page: U },
118
108
  setup() {
119
- const { t } = useI18n();
120
- const {
121
- fetchEntityList: fetchImportList,
122
- isLoading: isImportListLoading,
123
- rowData: importList,
124
- errorMessage,
125
- searchQuery,
126
- handleChange,
127
- pageSize,
128
- pageCount,
129
- pageNumber
130
- } = useDataTable({
131
- fetchEntityList: (params) => getImportList({
132
- pageNumber: params.pageNumber,
133
- pageSize: params.pageSize
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
134
123
  }),
135
124
  initialValue: [],
136
125
  resourceName: "Import list",
137
126
  pageSize: 100
138
127
  });
139
- onMounted(() => {
140
- fetchImportList();
141
- });
142
- const columnDefs = [
143
- {
144
- id: 1,
145
- name: "ID",
146
- field: "id",
147
- style: { width: "50px", textAlign: "center" },
148
- headStyle: { width: "50px", textAlign: "center" }
149
- },
150
- {
151
- id: 2,
152
- name: t("import:type"),
153
- field: "strategy",
154
- style: { width: "150px" },
155
- headStyle: { width: "150px" }
156
- },
157
- {
158
- id: 3,
159
- name: t("import:params"),
160
- field: "params",
161
- type: "key-value",
162
- format: ({ row }) => row.params ? row.params.map((param) => {
163
- return {
164
- key: param.label,
165
- value: param.value
166
- };
167
- }) : null
168
- },
169
- {
170
- id: 4,
171
- name: t("import:status"),
172
- field: "status",
173
- style: { width: "120px" },
174
- headStyle: { width: "120px" }
175
- },
176
- {
177
- id: 5,
178
- name: t("import:message"),
179
- field: "message"
180
- },
181
- {
182
- id: 6,
183
- name: t("import:log"),
184
- field: "history",
185
- style: { width: "270px", whiteSpace: "nowrap" },
186
- headStyle: { width: "270px" }
187
- },
188
- {
189
- id: 7,
190
- name: t("import:file"),
191
- field: "file",
192
- type: "file",
193
- style: { width: "150px", textAlign: "center" },
194
- headStyle: { width: "150px", textAlign: "center" }
195
- }
196
- ];
197
- return {
198
- columnDefs,
199
- getImportFormUrl,
200
- rowData: importList,
201
- isRowDataLoading: isImportListLoading,
202
- errorMessage,
203
- searchQuery,
204
- handleChange,
205
- pageSize,
206
- pageCount,
207
- pageNumber
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
208
193
  };
209
194
  }
210
195
  });
211
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
212
- const _component_CellHistory = resolveComponent("CellHistory");
213
- const _component_DataTable = resolveComponent("DataTable");
214
- const _component_Page = resolveComponent("Page");
215
- return openBlock(), createBlock(_component_Page, {
216
- title: _ctx.$i18n.t("import:import"),
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"),
217
200
  "header-buttons": [
218
201
  {
219
- text: _ctx.$i18n.t("import:newImport"),
220
- href: _ctx.getImportFormUrl({ importId: "create" })
202
+ text: e.$i18n.t("import:newImport"),
203
+ href: e.getImportFormUrl({ importId: "create" })
221
204
  }
222
205
  ]
223
206
  }, {
224
- default: withCtx(() => [
225
- createVNode(_component_DataTable, {
226
- "column-defs": _ctx.columnDefs,
227
- "row-data": _ctx.rowData,
228
- loading: _ctx.isRowDataLoading,
229
- "error-message": _ctx.errorMessage,
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,
230
213
  pagination: {
231
- pageSize: _ctx.pageSize,
232
- pageCount: _ctx.pageCount,
233
- pageNumber: _ctx.pageNumber,
234
- disabled: _ctx.isRowDataLoading
214
+ pageSize: e.pageSize,
215
+ pageCount: e.pageCount,
216
+ pageNumber: e.pageNumber,
217
+ disabled: e.isRowDataLoading
235
218
  },
236
- "use-search": false,
237
- onChange: _ctx.handleChange
219
+ "use-search": !1,
220
+ onChange: e.handleChange
238
221
  }, {
239
- "cell(history)": withCtx(({ row }) => [
240
- createVNode(_component_CellHistory, {
241
- history: row.history
222
+ "cell(history)": v(({ row: s }) => [
223
+ h(n, {
224
+ history: s.history
242
225
  }, null, 8, ["history"])
243
226
  ]),
244
227
  _: 1
@@ -247,193 +230,176 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
247
230
  _: 1
248
231
  }, 8, ["title", "header-buttons"]);
249
232
  }
250
- var ImportList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
251
- function convertImportFormValuesToCreationPayload(values, templateValues) {
252
- var _a, _b, _c, _d;
233
+ const Ie = /* @__PURE__ */ _(ye, [["render", he]]);
234
+ function Fe(e, t) {
235
+ var a, i;
253
236
  return {
254
- strategy: (_b = (_a = values.strategy) == null ? void 0 : _a.value) != null ? _b : "",
255
- file: (_d = (_c = values.file) == null ? void 0 : _c.file.id) != null ? _d : "",
256
- params: templateValues.map((field) => ({
257
- name: field.config.name,
258
- value: universalFieldUtils.getOutgoingValue(field)
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)
259
242
  }))
260
243
  };
261
244
  }
262
- function convertStrategiesToStrategyOptionList(strategies) {
263
- return strategies.map((strategy) => ({
264
- value: strategy.id,
265
- label: strategy.name
245
+ function ve(e) {
246
+ return e.map((t) => ({
247
+ value: t.id,
248
+ label: t.name
266
249
  }));
267
250
  }
268
- const _sfc_main = defineComponent({
251
+ const Te = R({
269
252
  name: "ImportForm",
270
- components: { Page, FormFieldFileInput, DynamicField, FormFooter, FormFieldSelect },
253
+ components: { Page: U, FormFieldFileInput: x, DynamicField: ee, FormFooter: Z, FormFieldSelect: Y },
271
254
  setup() {
272
- const { t } = useI18n();
273
- const toast = useToast();
274
- const router = useRouter();
275
- const [
276
- fetchModuleInfo,
277
- { data: moduleInfo, loading: isModuleInfoLoading }
278
- ] = useResource({
279
- fetchResource: getModuleInfo,
255
+ const { t: e } = P(), t = B(), a = oe(), [
256
+ i,
257
+ { data: r, loading: d }
258
+ ] = H({
259
+ fetchResource: se,
280
260
  initialValue: {
281
261
  fileScenario: "",
282
262
  strategies: []
283
263
  },
284
264
  resourceName: "Module info"
285
- });
286
- const strategyFileScenario = computed(
287
- () => moduleInfo.value.fileScenario
265
+ }), n = S(
266
+ () => r.value.fileScenario
267
+ ), m = S(
268
+ () => ve(r.value.strategies)
288
269
  );
289
- const strategyOptionList = computed(
290
- () => convertStrategiesToStrategyOptionList(moduleInfo.value.strategies)
291
- );
292
- onMounted(() => {
293
- fetchModuleInfo();
270
+ L(() => {
271
+ i();
294
272
  });
295
- const errors = ref({});
296
- const values = ref({ strategy: null, file: null });
297
- const isSubmitting = ref(false);
298
- const templateValues = ref([]);
299
- function updateTemplateValues() {
300
- var _a;
301
- const selectedStrategy = moduleInfo.value.strategies.find(
302
- (strategy) => {
303
- var _a2;
304
- return strategy.id === ((_a2 = values.value.strategy) == null ? void 0 : _a2.value);
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);
305
279
  }
306
- );
307
- const fieldTemplateList = (_a = selectedStrategy == null ? void 0 : selectedStrategy.fields) != null ? _a : [];
308
- templateValues.value = fieldTemplateList.map(
309
- (fieldConfig) => universalFieldUtils.createFormField(fieldConfig, null)
280
+ ), b = (p == null ? void 0 : p.fields) ?? [];
281
+ o.value = b.map(
282
+ (f) => V.createFormField(f, null)
310
283
  );
311
284
  }
312
- watch(
313
- () => values.value.strategy,
285
+ J(
286
+ () => s.value.strategy,
314
287
  () => {
315
- updateTemplateValues();
288
+ y();
316
289
  }
317
- );
318
- onMounted(() => {
319
- updateTemplateValues();
290
+ ), L(() => {
291
+ y();
320
292
  });
321
- function submitForm(event) {
322
- isSubmitting.value = true;
323
- const creationPayload = convertImportFormValuesToCreationPayload(
324
- values.value,
325
- templateValues.value
293
+ function z(p) {
294
+ g.value = !0;
295
+ const b = Fe(
296
+ s.value,
297
+ o.value
326
298
  );
327
- createImport(creationPayload).then(() => {
328
- errors.value = {};
329
- if (event.type === "create" || event.type === "save" || event.type === "create_exit" || event.type === "save_exit") {
330
- navigateBack(router, getImportListUrl());
331
- }
332
- toast.show({
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({
333
301
  variant: "success",
334
- title: t("import:success"),
335
- body: t("import:createdSuccessMessage")
302
+ title: e("import:success"),
303
+ body: e("import:createdSuccessMessage")
336
304
  });
337
- }).catch((error) => {
338
- console.error(error);
339
- errors.value = convertRequestErrorToMap(error);
340
- toast.show({
305
+ }).catch((f) => {
306
+ console.error(f), l.value = Q(f), t.show({
341
307
  variant: "danger",
342
- title: t("import:error"),
343
- body: t("import:createdErrorMessage")
308
+ title: e("import:error"),
309
+ body: e("import:createdErrorMessage")
344
310
  });
345
311
  }).finally(() => {
346
- isSubmitting.value = false;
312
+ g.value = !1;
347
313
  });
348
314
  }
349
- const isContentLoading = computed(() => isModuleInfoLoading.value);
315
+ const A = S(() => d.value);
350
316
  return {
351
- values,
352
- errors,
353
- isSubmitting,
354
- submitForm,
355
- getImportListUrl,
356
- strategyOptionList,
357
- strategyFileScenario,
358
- isContentLoading,
359
- templateValues
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
360
326
  };
361
327
  }
362
328
  });
363
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
364
- const _component_FormFieldSelect = resolveComponent("FormFieldSelect");
365
- const _component_FormFieldFileInput = resolveComponent("FormFieldFileInput");
366
- const _component_DynamicField = resolveComponent("DynamicField");
367
- const _component_FormFooter = resolveComponent("FormFooter");
368
- const _component_Page = resolveComponent("Page");
369
- return openBlock(), createBlock(_component_Page, {
370
- title: _ctx.$i18n.t("import:importCreation"),
371
- "is-content-loading": _ctx.isContentLoading
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
372
334
  }, {
373
- footer: withCtx(() => [
374
- createVNode(_component_FormFooter, {
375
- "back-href": _ctx.getImportListUrl(),
376
- onSubmit: _ctx.submitForm,
377
- "is-submitting": _ctx.isSubmitting,
378
- "is-creation": true
379
- }, null, 8, ["back-href", "onSubmit", "is-submitting"])
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"])
380
342
  ]),
381
- default: withCtx(() => [
382
- createElementVNode("form", {
343
+ default: v(() => [
344
+ k("form", {
383
345
  novalidate: "",
384
- onSubmit: _cache[2] || (_cache[2] = withModifiers(() => {
346
+ onSubmit: t[2] || (t[2] = K(() => {
385
347
  }, ["prevent"]))
386
348
  }, [
387
- createVNode(_component_FormFieldSelect, {
388
- value: _ctx.values.strategy,
389
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.values.strategy = $event),
390
- options: _ctx.strategyOptionList,
391
- error: _ctx.errors.strategy,
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,
392
354
  name: "importType",
393
- label: _ctx.$i18n.t("import:importType")
355
+ label: e.$i18n.t("import:importType")
394
356
  }, null, 8, ["value", "options", "error", "label"]),
395
- createVNode(_component_FormFieldFileInput, {
396
- value: _ctx.values.file,
397
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.values.file = $event),
398
- error: _ctx.errors.file,
399
- label: _ctx.$i18n.t("import:file"),
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"),
400
362
  name: "file",
401
- scenario: _ctx.strategyFileScenario
363
+ scenario: e.strategyFileScenario
402
364
  }, null, 8, ["value", "error", "label", "scenario"]),
403
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.templateValues, (field) => {
404
- return openBlock(), createBlock(_component_DynamicField, {
405
- key: field.config.name,
406
- field
407
- }, null, 8, ["field"]);
408
- }), 128))
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))
409
369
  ], 32)
410
370
  ]),
411
371
  _: 1
412
372
  }, 8, ["title", "is-content-loading"]);
413
373
  }
414
- var ImportForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
415
- const IMPORT_LIST_ROUTE = {
416
- path: IMPORT_ROUTE_PATHS.IMPORT_LIST,
417
- component: ImportList,
374
+ const Se = /* @__PURE__ */ _(Te, [["render", be]]), Le = {
375
+ path: T.IMPORT_LIST,
376
+ component: Ie,
418
377
  name: "Import List",
419
378
  meta: {
420
- getBreadcrumbs: (route, i18n2) => [
421
- { url: "/", text: i18n2.t("import:home") },
422
- { url: route.path, text: i18n2.t("import:importList") }
379
+ getBreadcrumbs: (e, t) => [
380
+ { url: "/", text: t.t("import:home") },
381
+ { url: e.path, text: t.t("import:importList") }
423
382
  ]
424
383
  }
425
- };
426
- const IMPORT_FORM_ROUTE = {
427
- path: IMPORT_ROUTE_PATHS.IMPORT_FORM,
428
- component: ImportForm,
384
+ }, De = {
385
+ path: T.IMPORT_FORM,
386
+ component: Se,
429
387
  name: "Import Form",
430
388
  meta: {
431
- getBreadcrumbs: (route, i18n2) => [
432
- { url: "/", text: i18n2.t("import:home") },
433
- { url: IMPORT_LIST_ROUTE.path, text: i18n2.t("import:importList") },
434
- { url: route.path, text: i18n2.t("import:importForm") }
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") }
435
393
  ]
436
394
  }
437
395
  };
438
- applyTranslations();
439
- export { IMPORT_FORM_ROUTE, IMPORT_LIST_ROUTE, createImport, getImportFormUrl, getImportList, getImportListUrl, getModuleInfo };
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
+ };