@nice2dev/ui 1.4.14 → 1.4.15

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 (51) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/{NiceColorPicker-BLwYNSXJ.cjs → NiceColorPicker-79rkvaSk.cjs} +1 -1
  3. package/dist/NiceDataGrid-B1AOjgjm.cjs +10 -0
  4. package/dist/NiceForm-fmePSeA9.cjs +1 -0
  5. package/dist/{NiceHtmlEditor-BzECmDO3.cjs → NiceHtmlEditor-By7R1wRo.cjs} +1 -1
  6. package/dist/{NiceMention-CYRqPKGU.cjs → NiceMention-i7n2BoMw.cjs} +1 -1
  7. package/dist/{NiceModuleLifecyclePanel-CiYbPcHV.cjs → NiceModuleLifecyclePanel-DVHQuhc-.cjs} +1 -1
  8. package/dist/{NicePagination-BAxwqeEd.cjs → NicePagination-D9JguOl0.cjs} +1 -1
  9. package/dist/NicePivotGrid-B_7iQJys.cjs +2 -0
  10. package/dist/NiceSavedQueryPanel-ChY4HwpM.cjs +587 -0
  11. package/dist/{NiceScheduler-BqYiHPvz.cjs → NiceScheduler-B2DamQ_L.cjs} +1 -1
  12. package/dist/backup/NiceBackupScheduler.mjs +171 -119
  13. package/dist/charts/NiceOrganizationChart.mjs +159 -59
  14. package/dist/charts/orgChartExport.mjs +71 -0
  15. package/dist/charts/tidyTree.mjs +43 -0
  16. package/dist/charts-C3Q3r8Yz.cjs +918 -0
  17. package/dist/charts.cjs +1 -1
  18. package/dist/charts.d.ts +9 -0
  19. package/dist/{core-lazy-BQexApr7.cjs → core-lazy-ChKRuEPb.cjs} +1 -1
  20. package/dist/data/NiceDataGrid.mjs +301 -320
  21. package/dist/data/NiceRowEditDialog.mjs +57 -0
  22. package/dist/data/NiceTreeGrid.mjs +478 -433
  23. package/dist/data.cjs +1 -1
  24. package/dist/data.d.ts +43 -2
  25. package/dist/{devops-cgRBnZVX.cjs → devops-o6Zm0VKB.cjs} +3 -3
  26. package/dist/devops.cjs +1 -1
  27. package/dist/editors/forms/NiceForm.mjs +216 -167
  28. package/dist/editors/inputs/NiceUpload.mjs +238 -238
  29. package/dist/editors.cjs +1 -1
  30. package/dist/editors.d.ts +13 -1
  31. package/dist/feedback.cjs +1 -1
  32. package/dist/index.cjs +254 -254
  33. package/dist/index.d.ts +198 -5
  34. package/dist/index.mjs +928 -920
  35. package/dist/lazy.cjs +1 -1
  36. package/dist/lazy.d.ts +11 -1
  37. package/dist/navigation.cjs +1 -1
  38. package/dist/no-code/NiceDataMapper.mjs +398 -361
  39. package/dist/no-code-CN_q6TcB.cjs +331 -0
  40. package/dist/no-code.cjs +1 -1
  41. package/dist/no-code.d.ts +11 -1
  42. package/dist/style.css +1 -1
  43. package/dist/tools/NicePermissionMatrix.mjs +171 -138
  44. package/dist/tools/NiceRoleEditor.mjs +334 -297
  45. package/package.json +4 -4
  46. package/dist/NiceDataGrid-D3qRQSjy.cjs +0 -10
  47. package/dist/NiceForm-BWb4LTQJ.cjs +0 -1
  48. package/dist/NicePivotGrid-Cxu5PECg.cjs +0 -152
  49. package/dist/NiceSavedQueryPanel-C1nxEmMu.cjs +0 -587
  50. package/dist/charts-BzlvCCg9.cjs +0 -768
  51. package/dist/no-code-B1jzfUF5.cjs +0 -331
@@ -1,7 +1,7 @@
1
- import { jsxs as n, jsx as t, Fragment as z } from "react/jsx-runtime";
2
- import { useNiceTranslation as H, NiceIcon as l } from "@nice2dev/ui-core";
3
- import { useState as $, useCallback as K, useMemo as C } from "react";
4
- const Q = {
1
+ import { jsxs as i, jsx as a, Fragment as z } from "react/jsx-runtime";
2
+ import { useNiceTranslation as X, useControllableState as Z, NiceIcon as s } from "@nice2dev/ui-core";
3
+ import { useState as k, useCallback as ee, useMemo as T } from "react";
4
+ const ae = {
5
5
  id: "map-1",
6
6
  name: "UserToContact",
7
7
  description: "Transform User API response to Contact entity",
@@ -92,7 +92,7 @@ const Q = {
92
92
  },
93
93
  { id: "v3", field: "contactId", type: "required", message: "Contact ID is required" }
94
94
  ]
95
- }, j = {
95
+ }, Y = {
96
96
  string: "var(--nice-color-success, #22c55e)",
97
97
  number: "var(--nice-color-primary, #3b82f6)",
98
98
  boolean: "var(--nice-color-warning, #f59e0b)",
@@ -100,7 +100,7 @@ const Q = {
100
100
  array: "var(--nice-color-info, #06b6d4)",
101
101
  object: "var(--nice-color-accent-pink, #ec4899)",
102
102
  any: "var(--nice-text-muted, #6b7280)"
103
- }, O = {
103
+ }, L = {
104
104
  string: "edit",
105
105
  number: "hash",
106
106
  boolean: "check",
@@ -108,7 +108,7 @@ const Q = {
108
108
  array: "clipboard",
109
109
  object: "box",
110
110
  any: "help"
111
- }, V = {
111
+ }, P = {
112
112
  direct: "arrow-right",
113
113
  format: "edit",
114
114
  convert: "refresh",
@@ -118,33 +118,33 @@ const Q = {
118
118
  lookup: "search",
119
119
  conditional: "help",
120
120
  custom: "settings"
121
- }, X = (c) => {
122
- const k = Y(c.sourceSchema), v = Y(c.targetSchema), b = c.fieldMappings.map((p) => {
123
- const y = c.transformations.find((u) => u.id === p.transform), f = p.targetField;
121
+ }, te = (c) => {
122
+ const $ = E(c.sourceSchema), f = E(c.targetSchema), v = c.fieldMappings.map((p) => {
123
+ const b = c.transformations.find((u) => u.id === p.transform), h = p.targetField;
124
124
  if (!p.sourceField)
125
- return ` result.${f} = ${JSON.stringify(p.defaultValue)};`;
125
+ return ` result.${h} = ${JSON.stringify(p.defaultValue)};`;
126
126
  const x = p.sourceField.split(",").map((u) => u.trim());
127
- if (y)
128
- switch (y.type) {
127
+ if (b)
128
+ switch (b.type) {
129
129
  case "concat":
130
- return ` result.${f} = [${x.map((u) => `source.${u}`).join(", ")}].filter(Boolean).join('${y.config.separator || " "}');`;
130
+ return ` result.${h} = [${x.map((u) => `source.${u}`).join(", ")}].filter(Boolean).join('${b.config.separator || " "}');`;
131
131
  case "format":
132
132
  if (x.length === 1) {
133
- const u = y.config.format || "{value}";
134
- return u.includes("{value}") ? ` result.${f} = '${u}'.replace('{value}', String(source.${x[0]}));` : ` result.${f} = formatDate(source.${x[0]}, '${u}');`;
133
+ const u = b.config.format || "{value}";
134
+ return u.includes("{value}") ? ` result.${h} = '${u}'.replace('{value}', String(source.${x[0]}));` : ` result.${h} = formatDate(source.${x[0]}, '${u}');`;
135
135
  }
136
136
  break;
137
137
  case "custom":
138
- return ` result.${f} = ${y.config.expression?.replace(/(\w+)\.(\w+)/g, "source.$1.$2")};`;
138
+ return ` result.${h} = ${b.config.expression?.replace(/(\w+)\.(\w+)/g, "source.$1.$2")};`;
139
139
  case "convert":
140
- return ` result.${f} = ${y.config.convertTo}(source.${x[0]});`;
140
+ return ` result.${h} = ${b.config.convertTo}(source.${x[0]});`;
141
141
  }
142
142
  if (x.length === 1) {
143
143
  const u = p.defaultValue !== void 0 ? ` ?? ${JSON.stringify(p.defaultValue)}` : "";
144
- return ` result.${f} = source.${x[0]}${u};`;
144
+ return ` result.${h} = source.${x[0]}${u};`;
145
145
  }
146
- return ` // TODO: Manual mapping for ${f}`;
147
- }), g = c.validationRules.map((p) => {
146
+ return ` // TODO: Manual mapping for ${h}`;
147
+ }), y = c.validationRules.map((p) => {
148
148
  switch (p.type) {
149
149
  case "required":
150
150
  return ` if (!data.${p.field}) errors.push('${p.message || p.field + " is required"}');`;
@@ -161,15 +161,15 @@ const Q = {
161
161
  */
162
162
 
163
163
  // Source Type
164
- ${k}
164
+ ${$}
165
165
 
166
166
  // Target Type
167
- ${v}
167
+ ${f}
168
168
 
169
169
  // Validation
170
170
  export function validate${c.targetSchema.name}(data: ${c.targetSchema.name}): string[] {
171
171
  const errors: string[] = [];
172
- ${g.join(`
172
+ ${y.join(`
173
173
  `)}
174
174
  return errors;
175
175
  }
@@ -178,7 +178,7 @@ ${g.join(`
178
178
  export function ${c.name.charAt(0).toLowerCase() + c.name.slice(1)}(source: ${c.sourceSchema.name}): ${c.targetSchema.name} {
179
179
  const result = {} as ${c.targetSchema.name};
180
180
 
181
- ${b.join(`
181
+ ${v.join(`
182
182
  `)}
183
183
 
184
184
  return result;
@@ -196,15 +196,15 @@ function formatDate(date: string | Date, format: string): string {
196
196
  .replace('DD', day);
197
197
  }
198
198
  `;
199
- }, Y = (c, k) => {
200
- const v = (g, p) => {
201
- const y = " ".repeat(p), f = g.nullable ? "?" : "";
202
- if (g.type === "object" && g.children) {
203
- const u = g.children.map((r) => v(r, p + 1)).join(`
199
+ }, E = (c, $) => {
200
+ const f = (y, p) => {
201
+ const b = " ".repeat(p), h = y.nullable ? "?" : "";
202
+ if (y.type === "object" && y.children) {
203
+ const u = y.children.map((F) => f(F, p + 1)).join(`
204
204
  `);
205
- return `${y}${g.name}${f}: {
205
+ return `${b}${y.name}${h}: {
206
206
  ${u}
207
- ${y}};`;
207
+ ${b}};`;
208
208
  }
209
209
  const x = {
210
210
  string: "string",
@@ -214,74 +214,81 @@ ${y}};`;
214
214
  array: "unknown[]",
215
215
  object: "Record<string, unknown>",
216
216
  any: "unknown"
217
- }[g.type];
218
- return `${y}${g.name}${f}: ${x};`;
219
- }, b = c.fields.map((g) => v(g, 1)).join(`
217
+ }[y.type];
218
+ return `${b}${y.name}${h}: ${x};`;
219
+ }, v = c.fields.map((y) => f(y, 1)).join(`
220
220
  `);
221
221
  return `interface ${c.name} {
222
- ${b}
222
+ ${v}
223
223
  }`;
224
- }, D = (c, k = "") => {
225
- const v = [];
226
- return c.forEach((b) => {
227
- v.push(b), b.children && v.push(...D(b.children, b.path + "."));
228
- }), v;
229
- }, ne = ({
230
- mapping: c = Q,
231
- sourceSchemas: k = [],
232
- targetSchemas: v = [],
233
- onMappingChange: b,
234
- onExport: g,
235
- onTest: p,
236
- onSave: y,
237
- className: f,
238
- style: x,
239
- "data-testid": u
224
+ }, I = (c, $ = "") => {
225
+ const f = [];
226
+ return c.forEach((v) => {
227
+ f.push(v), v.children && f.push(...I(v.children, v.path + "."));
228
+ }), f;
229
+ }, le = ({
230
+ mapping: c,
231
+ defaultMapping: $,
232
+ mode: f = "full",
233
+ sourceSchemas: v = [],
234
+ targetSchemas: y = [],
235
+ onMappingChange: p,
236
+ onExport: b,
237
+ onTest: h,
238
+ onSave: x,
239
+ className: u,
240
+ style: F,
241
+ "data-testid": J
240
242
  }) => {
241
- const { t: r } = H(), [s, E] = $(c), [S, L] = $("mapping"), [Z, ee] = $(null), [T, I] = $(""), [P, B] = $(""), [F, N] = $(null), m = K(
243
+ const { t: n } = X(), [l, B] = Z({
244
+ value: c,
245
+ defaultValue: $,
246
+ fallbackValue: ae,
247
+ onChange: p,
248
+ componentName: "NiceDataMapper"
249
+ }), [q, _] = k("mapping"), M = f === "mapping" ? "mapping" : q, [re, ne] = k(null), [N, A] = k(""), [W, j] = k(""), [C, O] = k(null), g = ee(
242
250
  (e) => {
243
- const o = { ...s, ...e };
244
- E(o), b?.(o);
251
+ B({ ...l, ...e });
245
252
  },
246
- [s, b]
247
- ), J = C(
248
- () => D(s.sourceSchema.fields),
249
- [s.sourceSchema.fields]
250
- ), A = C(
251
- () => D(s.targetSchema.fields),
252
- [s.targetSchema.fields]
253
- ), q = (e, o) => {
253
+ [l, B]
254
+ ), U = T(
255
+ () => I(l.sourceSchema.fields),
256
+ [l.sourceSchema.fields]
257
+ ), w = T(
258
+ () => I(l.targetSchema.fields),
259
+ [l.targetSchema.fields]
260
+ ), V = (e, o) => {
254
261
  const d = {
255
262
  id: `mapping-${Date.now()}`,
256
263
  sourceField: e,
257
264
  targetField: o
258
265
  };
259
- m({ fieldMappings: [...s.fieldMappings, d] });
260
- }, _ = (e) => {
261
- m({ fieldMappings: s.fieldMappings.filter((o) => o.id !== e) });
262
- }, W = () => {
266
+ g({ fieldMappings: [...l.fieldMappings, d] });
267
+ }, G = (e) => {
268
+ g({ fieldMappings: l.fieldMappings.filter((o) => o.id !== e) });
269
+ }, H = () => {
263
270
  try {
264
- const e = JSON.parse(T), o = {};
265
- s.fieldMappings.forEach((d) => {
271
+ const e = JSON.parse(N), o = {};
272
+ l.fieldMappings.forEach((d) => {
266
273
  if (!d.sourceField) {
267
274
  o[d.targetField] = d.defaultValue;
268
275
  return;
269
276
  }
270
- const i = d.sourceField.split(",").map((M) => M.trim()), h = (M) => M.split(".").reduce((U, G) => U?.[G], e), R = s.transformations.find((M) => M.id === d.transform);
277
+ const r = d.sourceField.split(",").map((S) => S.trim()), m = (S) => S.split(".").reduce((K, Q) => K?.[Q], e), R = l.transformations.find((S) => S.id === d.transform);
271
278
  if (R?.type === "concat")
272
- o[d.targetField] = i.map(h).filter(Boolean).join(R.config.separator || " ");
273
- else if (R?.type === "format" && i.length === 1) {
274
- const M = h(i[0]);
279
+ o[d.targetField] = r.map(m).filter(Boolean).join(R.config.separator || " ");
280
+ else if (R?.type === "format" && r.length === 1) {
281
+ const S = m(r[0]);
275
282
  o[d.targetField] = (R.config.format || "{value}").replace(
276
283
  "{value}",
277
- String(M)
284
+ String(S)
278
285
  );
279
- } else i.length === 1 && (o[d.targetField] = h(i[0]) ?? d.defaultValue);
280
- }), B(JSON.stringify(o, null, 2)), p?.(o);
286
+ } else r.length === 1 && (o[d.targetField] = m(r[0]) ?? d.defaultValue);
287
+ }), j(JSON.stringify(o, null, 2)), h?.(o);
281
288
  } catch (e) {
282
- B(`Error: ${e.message}`);
289
+ j(`Error: ${e.message}`);
283
290
  }
284
- }, w = C(() => X(s), [s]), a = {
291
+ }, D = T(() => te(l), [l]), t = {
285
292
  bg: "var(--nice-bg-elevated, #1e1e1e)",
286
293
  cardBg: "var(--nice-bg-elevated, #252525)",
287
294
  border: "var(--nice-bg-tertiary, #333)",
@@ -289,64 +296,66 @@ ${b}
289
296
  textMuted: "var(--nice-text-muted, #888)",
290
297
  accent: "var(--nice-color-primary, #3b82f6)"
291
298
  };
292
- return /* @__PURE__ */ n(
299
+ return /* @__PURE__ */ i(
293
300
  "div",
294
301
  {
295
- className: `nice-data-mapper ${f || ""}`,
302
+ className: `nice-data-mapper ${u || ""}`,
296
303
  style: {
297
304
  display: "flex",
298
305
  flexDirection: "column",
299
306
  height: "100%",
300
- background: a.bg,
301
- color: a.text,
307
+ background: t.bg,
308
+ color: t.text,
302
309
  fontFamily: "system-ui, sans-serif",
303
- ...x
310
+ ...F
304
311
  },
305
- "data-testid": u,
312
+ "data-testid": J,
306
313
  children: [
307
- /* @__PURE__ */ n(
314
+ /* @__PURE__ */ i(
308
315
  "div",
309
316
  {
310
317
  style: {
311
318
  padding: "16px 20px",
312
- borderBottom: `1px solid ${a.border}`,
319
+ borderBottom: `1px solid ${t.border}`,
313
320
  display: "flex",
314
321
  alignItems: "center",
315
322
  gap: 16
316
323
  },
317
324
  children: [
318
- /* @__PURE__ */ n(
325
+ /* @__PURE__ */ i(
319
326
  "h3",
320
327
  {
321
328
  style: { margin: 0, fontSize: 18, display: "inline-flex", alignItems: "center", gap: 6 },
322
329
  children: [
323
- /* @__PURE__ */ t(l, { name: "refresh", size: 16 }),
330
+ /* @__PURE__ */ a(s, { name: "refresh", size: 16 }),
324
331
  " ",
325
- r("dataMapper.dataMapper", "Data Mapper")
332
+ n("dataMapper.dataMapper", "Data Mapper")
326
333
  ]
327
334
  }
328
335
  ),
329
- /* @__PURE__ */ t(
336
+ f !== "mapping" && /* @__PURE__ */ a(
330
337
  "input",
331
338
  {
332
339
  type: "text",
333
- value: s.name,
334
- onChange: (e) => m({ name: e.target.value }),
340
+ "aria-label": n("dataMapper.name", "Mapping name"),
341
+ value: l.name,
342
+ onChange: (e) => g({ name: e.target.value }),
335
343
  style: {
336
344
  padding: "6px 12px",
337
345
  borderRadius: 4,
338
- border: `1px solid ${a.border}`,
339
- background: a.cardBg,
340
- color: a.text,
346
+ border: `1px solid ${t.border}`,
347
+ background: t.cardBg,
348
+ color: t.text,
341
349
  fontSize: 14,
342
350
  fontWeight: 600
343
351
  }
344
352
  }
345
353
  ),
346
- /* @__PURE__ */ t("div", { style: { marginLeft: "auto", display: "flex", gap: 8 }, children: /* @__PURE__ */ n(
354
+ f !== "mapping" && /* @__PURE__ */ a("div", { style: { marginLeft: "auto", display: "flex", gap: 8 }, children: /* @__PURE__ */ i(
347
355
  "button",
348
356
  {
349
- onClick: () => y?.(s),
357
+ type: "button",
358
+ onClick: () => x?.(l),
350
359
  style: {
351
360
  padding: "8px 16px",
352
361
  borderRadius: 6,
@@ -358,64 +367,64 @@ ${b}
358
367
  fontWeight: 500
359
368
  },
360
369
  children: [
361
- /* @__PURE__ */ t(l, { name: "save", size: 14 }),
370
+ /* @__PURE__ */ a(s, { name: "save", size: 14 }),
362
371
  " ",
363
- r("dataMapper.save", "Save")
372
+ n("dataMapper.save", "Save")
364
373
  ]
365
374
  }
366
375
  ) })
367
376
  ]
368
377
  }
369
378
  ),
370
- /* @__PURE__ */ t(
379
+ f !== "mapping" && /* @__PURE__ */ a(
371
380
  "div",
372
381
  {
373
382
  style: {
374
383
  display: "flex",
375
- borderBottom: `1px solid ${a.border}`,
384
+ borderBottom: `1px solid ${t.border}`,
376
385
  padding: "0 20px"
377
386
  },
378
387
  children: ["mapping", "transforms", "validation", "test", "preview"].map(
379
- (e) => /* @__PURE__ */ n(
388
+ (e) => /* @__PURE__ */ i(
380
389
  "button",
381
390
  {
382
- onClick: () => L(e),
391
+ onClick: () => _(e),
383
392
  style: {
384
393
  padding: "12px 20px",
385
394
  border: "none",
386
395
  background: "transparent",
387
- color: S === e ? a.text : a.textMuted,
396
+ color: M === e ? t.text : t.textMuted,
388
397
  cursor: "pointer",
389
398
  fontSize: 13,
390
- fontWeight: S === e ? 600 : 400,
391
- borderBottom: S === e ? `2px solid ${a.accent}` : "2px solid transparent",
399
+ fontWeight: M === e ? 600 : 400,
400
+ borderBottom: M === e ? `2px solid ${t.accent}` : "2px solid transparent",
392
401
  marginBottom: -1
393
402
  },
394
403
  children: [
395
- e === "mapping" && /* @__PURE__ */ n(z, { children: [
396
- /* @__PURE__ */ t(l, { name: "link", size: 14 }),
404
+ e === "mapping" && /* @__PURE__ */ i(z, { children: [
405
+ /* @__PURE__ */ a(s, { name: "link", size: 14 }),
397
406
  " ",
398
- r("dataMapper.mapping", "Mapping")
407
+ n("dataMapper.mapping", "Mapping")
399
408
  ] }),
400
- e === "transforms" && /* @__PURE__ */ n(z, { children: [
401
- /* @__PURE__ */ t(l, { name: "zap", size: 14 }),
409
+ e === "transforms" && /* @__PURE__ */ i(z, { children: [
410
+ /* @__PURE__ */ a(s, { name: "zap", size: 14 }),
402
411
  " ",
403
- r("dataMapper.transforms", "Transforms")
412
+ n("dataMapper.transforms", "Transforms")
404
413
  ] }),
405
- e === "validation" && /* @__PURE__ */ n(z, { children: [
406
- /* @__PURE__ */ t(l, { name: "check", size: 14 }),
414
+ e === "validation" && /* @__PURE__ */ i(z, { children: [
415
+ /* @__PURE__ */ a(s, { name: "check", size: 14 }),
407
416
  " ",
408
- r("dataMapper.validation", "Validation")
417
+ n("dataMapper.validation", "Validation")
409
418
  ] }),
410
- e === "test" && /* @__PURE__ */ n(z, { children: [
411
- /* @__PURE__ */ t(l, { name: "flask", size: 14 }),
419
+ e === "test" && /* @__PURE__ */ i(z, { children: [
420
+ /* @__PURE__ */ a(s, { name: "flask", size: 14 }),
412
421
  " ",
413
- r("dataMapper.test", "Test")
422
+ n("dataMapper.test", "Test")
414
423
  ] }),
415
- e === "preview" && /* @__PURE__ */ n(z, { children: [
416
- /* @__PURE__ */ t(l, { name: "eye", size: 14 }),
424
+ e === "preview" && /* @__PURE__ */ i(z, { children: [
425
+ /* @__PURE__ */ a(s, { name: "eye", size: 14 }),
417
426
  " ",
418
- r("dataMapper.preview", "Preview")
427
+ n("dataMapper.preview", "Preview")
419
428
  ] })
420
429
  ]
421
430
  },
@@ -424,10 +433,10 @@ ${b}
424
433
  )
425
434
  }
426
435
  ),
427
- /* @__PURE__ */ n("div", { style: { flex: 1, overflow: "auto", padding: 20 }, children: [
428
- S === "mapping" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 24, height: "100%" }, children: [
429
- /* @__PURE__ */ n("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
430
- /* @__PURE__ */ n(
436
+ /* @__PURE__ */ i("div", { style: { flex: 1, overflow: "auto", padding: 20 }, children: [
437
+ M === "mapping" && /* @__PURE__ */ i("div", { style: { display: "flex", gap: 24, height: "100%" }, children: [
438
+ /* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
439
+ /* @__PURE__ */ i(
431
440
  "div",
432
441
  {
433
442
  style: {
@@ -438,39 +447,39 @@ ${b}
438
447
  fontWeight: 600
439
448
  },
440
449
  children: [
441
- /* @__PURE__ */ t(l, { name: "download", size: 14 }),
450
+ /* @__PURE__ */ a(s, { name: "download", size: 14 }),
442
451
  " ",
443
- r("dataMapper.source", "Source: {name}").replace(
452
+ n("dataMapper.source", "Source: {name}").replace(
444
453
  "{name}",
445
- String(s.sourceSchema.name)
454
+ String(l.sourceSchema.name)
446
455
  )
447
456
  ]
448
457
  }
449
458
  ),
450
- /* @__PURE__ */ t(
459
+ /* @__PURE__ */ a(
451
460
  "div",
452
461
  {
453
462
  style: {
454
463
  flex: 1,
455
- border: `1px solid ${a.border}`,
464
+ border: `1px solid ${t.border}`,
456
465
  borderTop: "none",
457
466
  borderRadius: "0 0 8px 8px",
458
467
  overflow: "auto"
459
468
  },
460
- children: J.map((e) => {
461
- const o = e.path.split(".").length - 1, d = s.fieldMappings.some(
462
- (i) => i.sourceField.split(",").some((h) => h.trim() === e.path)
469
+ children: U.map((e) => {
470
+ const o = e.path.split(".").length - 1, d = l.fieldMappings.some(
471
+ (r) => r.sourceField.split(",").some((m) => m.trim() === e.path)
463
472
  );
464
- return /* @__PURE__ */ n(
473
+ return /* @__PURE__ */ i(
465
474
  "div",
466
475
  {
467
476
  draggable: !0,
468
- onDragStart: () => N(e.path),
469
- onDragEnd: () => N(null),
477
+ onDragStart: () => O(e.path),
478
+ onDragEnd: () => O(null),
470
479
  style: {
471
480
  padding: "10px 12px",
472
481
  paddingLeft: 12 + o * 16,
473
- borderBottom: `1px solid ${a.border}`,
482
+ borderBottom: `1px solid ${t.border}`,
474
483
  display: "flex",
475
484
  alignItems: "center",
476
485
  gap: 8,
@@ -479,10 +488,10 @@ ${b}
479
488
  opacity: e.type === "object" && e.children ? 0.7 : 1
480
489
  },
481
490
  children: [
482
- /* @__PURE__ */ t("span", { style: { color: j[e.type], fontSize: 14 }, children: /* @__PURE__ */ t(l, { name: O[e.type], size: 14 }) }),
483
- /* @__PURE__ */ t("span", { style: { fontFamily: "monospace", fontSize: 12 }, children: e.name }),
484
- /* @__PURE__ */ t("span", { style: { fontSize: 10, color: a.textMuted }, children: e.type }),
485
- d && /* @__PURE__ */ t(
491
+ /* @__PURE__ */ a("span", { style: { color: Y[e.type], fontSize: 14 }, children: /* @__PURE__ */ a(s, { name: L[e.type], size: 14 }) }),
492
+ /* @__PURE__ */ a("span", { style: { fontFamily: "monospace", fontSize: 12 }, children: e.name }),
493
+ /* @__PURE__ */ a("span", { style: { fontSize: 10, color: t.textMuted }, children: e.type }),
494
+ d && /* @__PURE__ */ a(
486
495
  "span",
487
496
  {
488
497
  style: {
@@ -490,7 +499,35 @@ ${b}
490
499
  color: "var(--nice-color-success, #22c55e)",
491
500
  fontSize: 10
492
501
  },
493
- children: /* @__PURE__ */ t(l, { name: "check", size: 14 })
502
+ children: /* @__PURE__ */ a(s, { name: "check", size: 14 })
503
+ }
504
+ ),
505
+ !(e.type === "object" && e.children) && /* @__PURE__ */ i(
506
+ "select",
507
+ {
508
+ "aria-label": n("dataMapper.mapTo", "Map {field} to").replace(
509
+ "{field}",
510
+ e.name
511
+ ),
512
+ value: "",
513
+ onChange: (r) => {
514
+ r.target.value && V(e.path, r.target.value);
515
+ },
516
+ style: {
517
+ marginLeft: d ? 4 : "auto",
518
+ maxWidth: 130,
519
+ fontSize: 11,
520
+ background: t.cardBg,
521
+ color: t.text,
522
+ border: `1px solid ${t.border}`,
523
+ borderRadius: 4
524
+ },
525
+ children: [
526
+ /* @__PURE__ */ a("option", { value: "", children: n("dataMapper.mapToPlaceholder", "Map to…") }),
527
+ w.filter(
528
+ (r) => !(r.type === "object" && r.children) && !l.fieldMappings.some((m) => m.targetField === r.path)
529
+ ).map((r) => /* @__PURE__ */ a("option", { value: r.path, children: r.path }, r.id))
530
+ ]
494
531
  }
495
532
  )
496
533
  ]
@@ -501,64 +538,64 @@ ${b}
501
538
  }
502
539
  )
503
540
  ] }),
504
- /* @__PURE__ */ n("div", { style: { width: 300, display: "flex", flexDirection: "column" }, children: [
505
- /* @__PURE__ */ n(
541
+ /* @__PURE__ */ i("div", { style: { width: 300, display: "flex", flexDirection: "column" }, children: [
542
+ /* @__PURE__ */ i(
506
543
  "div",
507
544
  {
508
545
  style: {
509
546
  padding: "12px 16px",
510
- background: a.accent + "20",
547
+ background: t.accent + "20",
511
548
  borderRadius: "8px 8px 0 0",
512
549
  fontSize: 13,
513
550
  fontWeight: 600
514
551
  },
515
552
  children: [
516
- /* @__PURE__ */ t(l, { name: "link", size: 16 }),
553
+ /* @__PURE__ */ a(s, { name: "link", size: 16 }),
517
554
  " ",
518
- r("dataMapper.mappings", "Mappings ({fieldMappings})").replace(
555
+ n("dataMapper.mappings", "Mappings ({fieldMappings})").replace(
519
556
  "{fieldMappings}",
520
- String(s.fieldMappings.length)
557
+ String(l.fieldMappings.length)
521
558
  )
522
559
  ]
523
560
  }
524
561
  ),
525
- /* @__PURE__ */ t(
562
+ /* @__PURE__ */ a(
526
563
  "div",
527
564
  {
528
565
  style: {
529
566
  flex: 1,
530
- border: `1px solid ${a.border}`,
567
+ border: `1px solid ${t.border}`,
531
568
  borderTop: "none",
532
569
  borderRadius: "0 0 8px 8px",
533
570
  overflow: "auto",
534
571
  padding: 8
535
572
  },
536
- children: s.fieldMappings.map((e) => {
537
- const o = s.transformations.find((d) => d.id === e.transform);
538
- return /* @__PURE__ */ n(
573
+ children: l.fieldMappings.map((e) => {
574
+ const o = l.transformations.find((d) => d.id === e.transform);
575
+ return /* @__PURE__ */ i(
539
576
  "div",
540
577
  {
541
578
  style: {
542
579
  padding: 8,
543
- background: a.cardBg,
580
+ background: t.cardBg,
544
581
  borderRadius: 6,
545
582
  marginBottom: 8,
546
583
  fontSize: 11
547
584
  },
548
585
  children: [
549
- /* @__PURE__ */ n(
586
+ /* @__PURE__ */ i(
550
587
  "div",
551
588
  {
552
589
  style: { display: "flex", alignItems: "center", gap: 4, marginBottom: 4 },
553
590
  children: [
554
- /* @__PURE__ */ t("code", { style: { color: "var(--nice-color-success, #22c55e)" }, children: e.sourceField || "(default)" }),
555
- /* @__PURE__ */ t("span", { style: { color: a.textMuted }, children: /* @__PURE__ */ t(l, { name: "arrow-right", size: 12 }) }),
556
- /* @__PURE__ */ t("code", { style: { color: "var(--nice-color-primary, #3b82f6)" }, children: e.targetField }),
557
- /* @__PURE__ */ t(
591
+ /* @__PURE__ */ a("code", { style: { color: "var(--nice-color-success, #22c55e)" }, children: e.sourceField || "(default)" }),
592
+ /* @__PURE__ */ a("span", { style: { color: t.textMuted }, children: /* @__PURE__ */ a(s, { name: "arrow-right", size: 12 }) }),
593
+ /* @__PURE__ */ a("code", { style: { color: "var(--nice-color-primary, #3b82f6)" }, children: e.targetField }),
594
+ /* @__PURE__ */ a(
558
595
  "button",
559
596
  {
560
- onClick: () => _(e.id),
561
- "aria-label": r("dataMapper.removeMapping", "Remove mapping"),
597
+ onClick: () => G(e.id),
598
+ "aria-label": n("dataMapper.removeMapping", "Remove mapping"),
562
599
  style: {
563
600
  marginLeft: "auto",
564
601
  padding: 2,
@@ -568,29 +605,29 @@ ${b}
568
605
  cursor: "pointer",
569
606
  fontSize: 10
570
607
  },
571
- children: /* @__PURE__ */ t(l, { name: "close", size: 14 })
608
+ children: /* @__PURE__ */ a(s, { name: "close", size: 14 })
572
609
  }
573
610
  )
574
611
  ]
575
612
  }
576
613
  ),
577
- o && /* @__PURE__ */ n(
614
+ o && /* @__PURE__ */ i(
578
615
  "div",
579
616
  {
580
617
  style: {
581
- color: a.textMuted,
618
+ color: t.textMuted,
582
619
  display: "flex",
583
620
  alignItems: "center",
584
621
  gap: 4
585
622
  },
586
623
  children: [
587
- /* @__PURE__ */ t(l, { name: V[o.type], size: 14 }),
624
+ /* @__PURE__ */ a(s, { name: P[o.type], size: 14 }),
588
625
  " ",
589
626
  o.name
590
627
  ]
591
628
  }
592
629
  ),
593
- e.defaultValue !== void 0 && /* @__PURE__ */ t("div", { style: { color: "var(--nice-color-warning, #f59e0b)" }, children: r("dataMapper.default", "Default: {defaultValue}").replace(
630
+ e.defaultValue !== void 0 && /* @__PURE__ */ a("div", { style: { color: "var(--nice-color-warning, #f59e0b)" }, children: n("dataMapper.default", "Default: {defaultValue}").replace(
594
631
  "{defaultValue}",
595
632
  String(JSON.stringify(e.defaultValue))
596
633
  ) })
@@ -602,8 +639,8 @@ ${b}
602
639
  }
603
640
  )
604
641
  ] }),
605
- /* @__PURE__ */ n("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
606
- /* @__PURE__ */ n(
642
+ /* @__PURE__ */ i("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
643
+ /* @__PURE__ */ i(
607
644
  "div",
608
645
  {
609
646
  style: {
@@ -614,50 +651,50 @@ ${b}
614
651
  fontWeight: 600
615
652
  },
616
653
  children: [
617
- /* @__PURE__ */ t(l, { name: "upload", size: 14 }),
654
+ /* @__PURE__ */ a(s, { name: "upload", size: 14 }),
618
655
  " ",
619
- r("dataMapper.target", "Target: {name}").replace(
656
+ n("dataMapper.target", "Target: {name}").replace(
620
657
  "{name}",
621
- String(s.targetSchema.name)
658
+ String(l.targetSchema.name)
622
659
  )
623
660
  ]
624
661
  }
625
662
  ),
626
- /* @__PURE__ */ t(
663
+ /* @__PURE__ */ a(
627
664
  "div",
628
665
  {
629
666
  style: {
630
667
  flex: 1,
631
- border: `1px solid ${a.border}`,
668
+ border: `1px solid ${t.border}`,
632
669
  borderTop: "none",
633
670
  borderRadius: "0 0 8px 8px",
634
671
  overflow: "auto"
635
672
  },
636
- children: A.map((e) => {
637
- const o = e.path.split(".").length - 1, d = s.fieldMappings.some((i) => i.targetField === e.path);
638
- return /* @__PURE__ */ n(
673
+ children: w.map((e) => {
674
+ const o = e.path.split(".").length - 1, d = l.fieldMappings.some((r) => r.targetField === e.path);
675
+ return /* @__PURE__ */ i(
639
676
  "div",
640
677
  {
641
- onDragOver: (i) => i.preventDefault(),
678
+ onDragOver: (r) => r.preventDefault(),
642
679
  onDrop: () => {
643
- F && !d && q(F, e.path);
680
+ C && !d && V(C, e.path);
644
681
  },
645
682
  style: {
646
683
  padding: "10px 12px",
647
684
  paddingLeft: 12 + o * 16,
648
- borderBottom: `1px solid ${a.border}`,
685
+ borderBottom: `1px solid ${t.border}`,
649
686
  display: "flex",
650
687
  alignItems: "center",
651
688
  gap: 8,
652
- background: F && !d ? a.accent + "10" : d ? "color-mix(in srgb, var(--nice-color-primary, #3b82f6) 6%, transparent)" : "transparent",
689
+ background: C && !d ? t.accent + "10" : d ? "color-mix(in srgb, var(--nice-color-primary, #3b82f6) 6%, transparent)" : "transparent",
653
690
  transition: "background 0.15s"
654
691
  },
655
692
  children: [
656
- /* @__PURE__ */ t("span", { style: { color: j[e.type], fontSize: 14 }, children: /* @__PURE__ */ t(l, { name: O[e.type], size: 14 }) }),
657
- /* @__PURE__ */ t("span", { style: { fontFamily: "monospace", fontSize: 12 }, children: e.name }),
658
- /* @__PURE__ */ t("span", { style: { fontSize: 10, color: a.textMuted }, children: e.type }),
659
- e.nullable && /* @__PURE__ */ t("span", { style: { fontSize: 10, color: a.textMuted }, children: "?" }),
660
- d && /* @__PURE__ */ t(
693
+ /* @__PURE__ */ a("span", { style: { color: Y[e.type], fontSize: 14 }, children: /* @__PURE__ */ a(s, { name: L[e.type], size: 14 }) }),
694
+ /* @__PURE__ */ a("span", { style: { fontFamily: "monospace", fontSize: 12 }, children: e.name }),
695
+ /* @__PURE__ */ a("span", { style: { fontSize: 10, color: t.textMuted }, children: e.type }),
696
+ e.nullable && /* @__PURE__ */ a("span", { style: { fontSize: 10, color: t.textMuted }, children: "?" }),
697
+ d && /* @__PURE__ */ a(
661
698
  "span",
662
699
  {
663
700
  style: {
@@ -665,7 +702,7 @@ ${b}
665
702
  color: "var(--nice-color-primary, #3b82f6)",
666
703
  fontSize: 10
667
704
  },
668
- children: /* @__PURE__ */ t(l, { name: "check", size: 14 })
705
+ children: /* @__PURE__ */ a(s, { name: "check", size: 14 })
669
706
  }
670
707
  )
671
708
  ]
@@ -677,14 +714,14 @@ ${b}
677
714
  )
678
715
  ] })
679
716
  ] }),
680
- S === "transforms" && /* @__PURE__ */ n("div", { children: [
681
- /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 20 }, children: [
682
- /* @__PURE__ */ n("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
683
- /* @__PURE__ */ t(l, { name: "zap", size: 16 }),
717
+ M === "transforms" && /* @__PURE__ */ i("div", { children: [
718
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 20 }, children: [
719
+ /* @__PURE__ */ i("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
720
+ /* @__PURE__ */ a(s, { name: "zap", size: 16 }),
684
721
  " ",
685
- r("dataMapper.transformations", "Transformations")
722
+ n("dataMapper.transformations", "Transformations")
686
723
  ] }),
687
- /* @__PURE__ */ t(
724
+ /* @__PURE__ */ a(
688
725
  "button",
689
726
  {
690
727
  onClick: () => {
@@ -694,22 +731,22 @@ ${b}
694
731
  type: "direct",
695
732
  config: {}
696
733
  };
697
- m({ transformations: [...s.transformations, e] });
734
+ g({ transformations: [...l.transformations, e] });
698
735
  },
699
736
  style: {
700
737
  padding: "6px 12px",
701
738
  borderRadius: 4,
702
739
  border: "none",
703
- background: a.accent,
740
+ background: t.accent,
704
741
  color: "var(--nice-color-white, #fff)",
705
742
  cursor: "pointer",
706
743
  fontSize: 12
707
744
  },
708
- children: r("dataMapper.addTransform", "+ Add Transform")
745
+ children: n("dataMapper.addTransform", "+ Add Transform")
709
746
  }
710
747
  )
711
748
  ] }),
712
- /* @__PURE__ */ t(
749
+ /* @__PURE__ */ a(
713
750
  "div",
714
751
  {
715
752
  style: {
@@ -717,126 +754,126 @@ ${b}
717
754
  gridTemplateColumns: "repeat(auto-fill, minmax(300px, 1fr))",
718
755
  gap: 16
719
756
  },
720
- children: s.transformations.map((e) => /* @__PURE__ */ n(
757
+ children: l.transformations.map((e) => /* @__PURE__ */ i(
721
758
  "div",
722
759
  {
723
760
  style: {
724
761
  padding: 16,
725
- background: a.cardBg,
762
+ background: t.cardBg,
726
763
  borderRadius: 8,
727
- border: `1px solid ${a.border}`
764
+ border: `1px solid ${t.border}`
728
765
  },
729
766
  children: [
730
- /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
731
- /* @__PURE__ */ t("span", { style: { fontSize: 20 }, children: /* @__PURE__ */ t(l, { name: V[e.type], size: 20 }) }),
732
- /* @__PURE__ */ t(
767
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
768
+ /* @__PURE__ */ a("span", { style: { fontSize: 20 }, children: /* @__PURE__ */ a(s, { name: P[e.type], size: 20 }) }),
769
+ /* @__PURE__ */ a(
733
770
  "input",
734
771
  {
735
772
  type: "text",
736
773
  value: e.name,
737
774
  onChange: (o) => {
738
- const d = s.transformations.map(
739
- (i) => i.id === e.id ? { ...i, name: o.target.value } : i
775
+ const d = l.transformations.map(
776
+ (r) => r.id === e.id ? { ...r, name: o.target.value } : r
740
777
  );
741
- m({ transformations: d });
778
+ g({ transformations: d });
742
779
  },
743
780
  style: {
744
781
  flex: 1,
745
782
  padding: "6px 8px",
746
783
  borderRadius: 4,
747
- border: `1px solid ${a.border}`,
748
- background: a.bg,
749
- color: a.text,
784
+ border: `1px solid ${t.border}`,
785
+ background: t.bg,
786
+ color: t.text,
750
787
  fontSize: 13,
751
788
  fontWeight: 600
752
789
  }
753
790
  }
754
791
  )
755
792
  ] }),
756
- /* @__PURE__ */ n("div", { style: { marginBottom: 12 }, children: [
757
- /* @__PURE__ */ t(
793
+ /* @__PURE__ */ i("div", { style: { marginBottom: 12 }, children: [
794
+ /* @__PURE__ */ a(
758
795
  "label",
759
796
  {
760
797
  style: {
761
798
  display: "block",
762
799
  fontSize: 11,
763
- color: a.textMuted,
800
+ color: t.textMuted,
764
801
  marginBottom: 4
765
802
  },
766
- children: r("dataMapper.type", "Type")
803
+ children: n("dataMapper.type", "Type")
767
804
  }
768
805
  ),
769
- /* @__PURE__ */ n(
806
+ /* @__PURE__ */ i(
770
807
  "select",
771
808
  {
772
809
  value: e.type,
773
810
  onChange: (o) => {
774
- const d = s.transformations.map(
775
- (i) => i.id === e.id ? { ...i, type: o.target.value } : i
811
+ const d = l.transformations.map(
812
+ (r) => r.id === e.id ? { ...r, type: o.target.value } : r
776
813
  );
777
- m({ transformations: d });
814
+ g({ transformations: d });
778
815
  },
779
816
  style: {
780
817
  width: "100%",
781
818
  padding: "8px 12px",
782
819
  borderRadius: 4,
783
- border: `1px solid ${a.border}`,
784
- background: a.bg,
785
- color: a.text,
820
+ border: `1px solid ${t.border}`,
821
+ background: t.bg,
822
+ color: t.text,
786
823
  fontSize: 12
787
824
  },
788
825
  children: [
789
- /* @__PURE__ */ t("option", { value: "direct", children: r("dataMapper.direct", "Direct") }),
790
- /* @__PURE__ */ t("option", { value: "format", children: r("dataMapper.format", "Format") }),
791
- /* @__PURE__ */ t("option", { value: "convert", children: r("dataMapper.convert", "Convert") }),
792
- /* @__PURE__ */ t("option", { value: "concat", children: r("dataMapper.concatenate", "Concatenate") }),
793
- /* @__PURE__ */ t("option", { value: "split", children: r("dataMapper.split", "Split") }),
794
- /* @__PURE__ */ t("option", { value: "calculate", children: r("dataMapper.calculate", "Calculate") }),
795
- /* @__PURE__ */ t("option", { value: "lookup", children: r("dataMapper.lookup", "Lookup") }),
796
- /* @__PURE__ */ t("option", { value: "conditional", children: r("dataMapper.conditional", "Conditional") }),
797
- /* @__PURE__ */ t("option", { value: "custom", children: r("dataMapper.custom", "Custom") })
826
+ /* @__PURE__ */ a("option", { value: "direct", children: n("dataMapper.direct", "Direct") }),
827
+ /* @__PURE__ */ a("option", { value: "format", children: n("dataMapper.format", "Format") }),
828
+ /* @__PURE__ */ a("option", { value: "convert", children: n("dataMapper.convert", "Convert") }),
829
+ /* @__PURE__ */ a("option", { value: "concat", children: n("dataMapper.concatenate", "Concatenate") }),
830
+ /* @__PURE__ */ a("option", { value: "split", children: n("dataMapper.split", "Split") }),
831
+ /* @__PURE__ */ a("option", { value: "calculate", children: n("dataMapper.calculate", "Calculate") }),
832
+ /* @__PURE__ */ a("option", { value: "lookup", children: n("dataMapper.lookup", "Lookup") }),
833
+ /* @__PURE__ */ a("option", { value: "conditional", children: n("dataMapper.conditional", "Conditional") }),
834
+ /* @__PURE__ */ a("option", { value: "custom", children: n("dataMapper.custom", "Custom") })
798
835
  ]
799
836
  }
800
837
  )
801
838
  ] }),
802
- (e.type === "format" || e.type === "concat") && /* @__PURE__ */ n("div", { children: [
803
- /* @__PURE__ */ t(
839
+ (e.type === "format" || e.type === "concat") && /* @__PURE__ */ i("div", { children: [
840
+ /* @__PURE__ */ a(
804
841
  "label",
805
842
  {
806
843
  style: {
807
844
  display: "block",
808
845
  fontSize: 11,
809
- color: a.textMuted,
846
+ color: t.textMuted,
810
847
  marginBottom: 4
811
848
  },
812
- children: e.type === "format" ? r("dataMapper.formatPattern", "Format Pattern") : r("dataMapper.separator", "Separator")
849
+ children: e.type === "format" ? n("dataMapper.formatPattern", "Format Pattern") : n("dataMapper.separator", "Separator")
813
850
  }
814
851
  ),
815
- /* @__PURE__ */ t(
852
+ /* @__PURE__ */ a(
816
853
  "input",
817
854
  {
818
855
  type: "text",
819
856
  value: e.type === "format" ? e.config.format || "" : e.config.separator || "",
820
857
  onChange: (o) => {
821
- const d = s.transformations.map(
822
- (i) => i.id === e.id ? {
823
- ...i,
858
+ const d = l.transformations.map(
859
+ (r) => r.id === e.id ? {
860
+ ...r,
824
861
  config: {
825
- ...i.config,
862
+ ...r.config,
826
863
  [e.type === "format" ? "format" : "separator"]: o.target.value
827
864
  }
828
- } : i
865
+ } : r
829
866
  );
830
- m({ transformations: d });
867
+ g({ transformations: d });
831
868
  },
832
- placeholder: e.type === "format" ? r("dataMapper.orYyyyMmDd", "{value} or YYYY-MM-DD") : ", ",
869
+ placeholder: e.type === "format" ? n("dataMapper.orYyyyMmDd", "{value} or YYYY-MM-DD") : ", ",
833
870
  style: {
834
871
  width: "100%",
835
872
  padding: "8px 12px",
836
873
  borderRadius: 4,
837
- border: `1px solid ${a.border}`,
838
- background: a.bg,
839
- color: a.text,
874
+ border: `1px solid ${t.border}`,
875
+ background: t.bg,
876
+ color: t.text,
840
877
  fontSize: 12,
841
878
  fontFamily: "monospace",
842
879
  boxSizing: "border-box"
@@ -844,37 +881,37 @@ ${b}
844
881
  }
845
882
  )
846
883
  ] }),
847
- e.type === "custom" && /* @__PURE__ */ n("div", { children: [
848
- /* @__PURE__ */ t(
884
+ e.type === "custom" && /* @__PURE__ */ i("div", { children: [
885
+ /* @__PURE__ */ a(
849
886
  "label",
850
887
  {
851
888
  style: {
852
889
  display: "block",
853
890
  fontSize: 11,
854
- color: a.textMuted,
891
+ color: t.textMuted,
855
892
  marginBottom: 4
856
893
  },
857
- children: r("dataMapper.expression", "Expression")
894
+ children: n("dataMapper.expression", "Expression")
858
895
  }
859
896
  ),
860
- /* @__PURE__ */ t(
897
+ /* @__PURE__ */ a(
861
898
  "textarea",
862
899
  {
863
900
  value: e.config.expression || "",
864
901
  onChange: (o) => {
865
- const d = s.transformations.map(
866
- (i) => i.id === e.id ? { ...i, config: { ...i.config, expression: o.target.value } } : i
902
+ const d = l.transformations.map(
903
+ (r) => r.id === e.id ? { ...r, config: { ...r.config, expression: o.target.value } } : r
867
904
  );
868
- m({ transformations: d });
905
+ g({ transformations: d });
869
906
  },
870
907
  rows: 3,
871
908
  style: {
872
909
  width: "100%",
873
910
  padding: "8px 12px",
874
911
  borderRadius: 4,
875
- border: `1px solid ${a.border}`,
876
- background: a.bg,
877
- color: a.text,
912
+ border: `1px solid ${t.border}`,
913
+ background: t.bg,
914
+ color: t.text,
878
915
  fontSize: 12,
879
916
  fontFamily: "monospace",
880
917
  resize: "vertical",
@@ -890,14 +927,14 @@ ${b}
890
927
  }
891
928
  )
892
929
  ] }),
893
- S === "validation" && /* @__PURE__ */ n("div", { children: [
894
- /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 20 }, children: [
895
- /* @__PURE__ */ n("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
896
- /* @__PURE__ */ t(l, { name: "check", size: 16 }),
930
+ M === "validation" && /* @__PURE__ */ i("div", { children: [
931
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 20 }, children: [
932
+ /* @__PURE__ */ i("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
933
+ /* @__PURE__ */ a(s, { name: "check", size: 16 }),
897
934
  " ",
898
- r("dataMapper.validationRules", "Validation Rules")
935
+ n("dataMapper.validationRules", "Validation Rules")
899
936
  ] }),
900
- /* @__PURE__ */ t(
937
+ /* @__PURE__ */ a(
901
938
  "button",
902
939
  {
903
940
  onClick: () => {
@@ -907,141 +944,141 @@ ${b}
907
944
  type: "required",
908
945
  message: ""
909
946
  };
910
- m({ validationRules: [...s.validationRules, e] });
947
+ g({ validationRules: [...l.validationRules, e] });
911
948
  },
912
949
  style: {
913
950
  padding: "6px 12px",
914
951
  borderRadius: 4,
915
952
  border: "none",
916
- background: a.accent,
953
+ background: t.accent,
917
954
  color: "var(--nice-color-white, #fff)",
918
955
  cursor: "pointer",
919
956
  fontSize: 12
920
957
  },
921
- children: r("dataMapper.addRule", "+ Add Rule")
958
+ children: n("dataMapper.addRule", "+ Add Rule")
922
959
  }
923
960
  )
924
961
  ] }),
925
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: s.validationRules.map((e) => /* @__PURE__ */ n(
962
+ /* @__PURE__ */ a("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: l.validationRules.map((e) => /* @__PURE__ */ i(
926
963
  "div",
927
964
  {
928
965
  style: {
929
966
  padding: 16,
930
- background: a.cardBg,
967
+ background: t.cardBg,
931
968
  borderRadius: 8,
932
969
  display: "flex",
933
970
  gap: 12,
934
971
  alignItems: "center"
935
972
  },
936
973
  children: [
937
- /* @__PURE__ */ n(
974
+ /* @__PURE__ */ i(
938
975
  "select",
939
976
  {
940
977
  value: e.field,
941
978
  onChange: (o) => {
942
- const d = s.validationRules.map(
943
- (i) => i.id === e.id ? { ...i, field: o.target.value } : i
979
+ const d = l.validationRules.map(
980
+ (r) => r.id === e.id ? { ...r, field: o.target.value } : r
944
981
  );
945
- m({ validationRules: d });
982
+ g({ validationRules: d });
946
983
  },
947
984
  style: {
948
985
  padding: "8px 12px",
949
986
  borderRadius: 4,
950
- border: `1px solid ${a.border}`,
951
- background: a.bg,
952
- color: a.text,
987
+ border: `1px solid ${t.border}`,
988
+ background: t.bg,
989
+ color: t.text,
953
990
  fontSize: 12
954
991
  },
955
992
  children: [
956
- /* @__PURE__ */ t("option", { value: "", children: r("dataMapper.selectField", "Select field...") }),
957
- A.map((o) => /* @__PURE__ */ t("option", { value: o.path, children: o.path }, o.id))
993
+ /* @__PURE__ */ a("option", { value: "", children: n("dataMapper.selectField", "Select field...") }),
994
+ w.map((o) => /* @__PURE__ */ a("option", { value: o.path, children: o.path }, o.id))
958
995
  ]
959
996
  }
960
997
  ),
961
- /* @__PURE__ */ n(
998
+ /* @__PURE__ */ i(
962
999
  "select",
963
1000
  {
964
1001
  value: e.type,
965
1002
  onChange: (o) => {
966
- const d = s.validationRules.map(
967
- (i) => i.id === e.id ? { ...i, type: o.target.value } : i
1003
+ const d = l.validationRules.map(
1004
+ (r) => r.id === e.id ? { ...r, type: o.target.value } : r
968
1005
  );
969
- m({ validationRules: d });
1006
+ g({ validationRules: d });
970
1007
  },
971
1008
  style: {
972
1009
  padding: "8px 12px",
973
1010
  borderRadius: 4,
974
- border: `1px solid ${a.border}`,
975
- background: a.bg,
976
- color: a.text,
1011
+ border: `1px solid ${t.border}`,
1012
+ background: t.bg,
1013
+ color: t.text,
977
1014
  fontSize: 12
978
1015
  },
979
1016
  children: [
980
- /* @__PURE__ */ t("option", { value: "required", children: r("dataMapper.required", "Required") }),
981
- /* @__PURE__ */ t("option", { value: "type", children: r("dataMapper.type", "Type") }),
982
- /* @__PURE__ */ t("option", { value: "min", children: r("dataMapper.min", "Min") }),
983
- /* @__PURE__ */ t("option", { value: "max", children: r("dataMapper.max", "Max") }),
984
- /* @__PURE__ */ t("option", { value: "pattern", children: r("dataMapper.pattern", "Pattern") }),
985
- /* @__PURE__ */ t("option", { value: "enum", children: r("dataMapper.enum", "Enum") }),
986
- /* @__PURE__ */ t("option", { value: "custom", children: r("dataMapper.custom", "Custom") })
1017
+ /* @__PURE__ */ a("option", { value: "required", children: n("dataMapper.required", "Required") }),
1018
+ /* @__PURE__ */ a("option", { value: "type", children: n("dataMapper.type", "Type") }),
1019
+ /* @__PURE__ */ a("option", { value: "min", children: n("dataMapper.min", "Min") }),
1020
+ /* @__PURE__ */ a("option", { value: "max", children: n("dataMapper.max", "Max") }),
1021
+ /* @__PURE__ */ a("option", { value: "pattern", children: n("dataMapper.pattern", "Pattern") }),
1022
+ /* @__PURE__ */ a("option", { value: "enum", children: n("dataMapper.enum", "Enum") }),
1023
+ /* @__PURE__ */ a("option", { value: "custom", children: n("dataMapper.custom", "Custom") })
987
1024
  ]
988
1025
  }
989
1026
  ),
990
- (e.type === "pattern" || e.type === "min" || e.type === "max") && /* @__PURE__ */ t(
1027
+ (e.type === "pattern" || e.type === "min" || e.type === "max") && /* @__PURE__ */ a(
991
1028
  "input",
992
1029
  {
993
1030
  type: "text",
994
1031
  value: String(e.value || ""),
995
1032
  onChange: (o) => {
996
- const d = s.validationRules.map(
997
- (i) => i.id === e.id ? { ...i, value: o.target.value } : i
1033
+ const d = l.validationRules.map(
1034
+ (r) => r.id === e.id ? { ...r, value: o.target.value } : r
998
1035
  );
999
- m({ validationRules: d });
1036
+ g({ validationRules: d });
1000
1037
  },
1001
- placeholder: r("dataMapper.value", "Value"),
1038
+ placeholder: n("dataMapper.value", "Value"),
1002
1039
  style: {
1003
1040
  padding: "8px 12px",
1004
1041
  borderRadius: 4,
1005
- border: `1px solid ${a.border}`,
1006
- background: a.bg,
1007
- color: a.text,
1042
+ border: `1px solid ${t.border}`,
1043
+ background: t.bg,
1044
+ color: t.text,
1008
1045
  fontSize: 12,
1009
1046
  width: 150
1010
1047
  }
1011
1048
  }
1012
1049
  ),
1013
- /* @__PURE__ */ t(
1050
+ /* @__PURE__ */ a(
1014
1051
  "input",
1015
1052
  {
1016
1053
  type: "text",
1017
1054
  value: e.message || "",
1018
1055
  onChange: (o) => {
1019
- const d = s.validationRules.map(
1020
- (i) => i.id === e.id ? { ...i, message: o.target.value } : i
1056
+ const d = l.validationRules.map(
1057
+ (r) => r.id === e.id ? { ...r, message: o.target.value } : r
1021
1058
  );
1022
- m({ validationRules: d });
1059
+ g({ validationRules: d });
1023
1060
  },
1024
- placeholder: r("dataMapper.errorMessage", "Error message"),
1061
+ placeholder: n("dataMapper.errorMessage", "Error message"),
1025
1062
  style: {
1026
1063
  flex: 1,
1027
1064
  padding: "8px 12px",
1028
1065
  borderRadius: 4,
1029
- border: `1px solid ${a.border}`,
1030
- background: a.bg,
1031
- color: a.text,
1066
+ border: `1px solid ${t.border}`,
1067
+ background: t.bg,
1068
+ color: t.text,
1032
1069
  fontSize: 12
1033
1070
  }
1034
1071
  }
1035
1072
  ),
1036
- /* @__PURE__ */ t(
1073
+ /* @__PURE__ */ a(
1037
1074
  "button",
1038
1075
  {
1039
1076
  onClick: () => {
1040
- m({
1041
- validationRules: s.validationRules.filter((o) => o.id !== e.id)
1077
+ g({
1078
+ validationRules: l.validationRules.filter((o) => o.id !== e.id)
1042
1079
  });
1043
1080
  },
1044
- "aria-label": r("dataMapper.delete", "Delete"),
1081
+ "aria-label": n("dataMapper.delete", "Delete"),
1045
1082
  style: {
1046
1083
  padding: 6,
1047
1084
  border: "none",
@@ -1050,7 +1087,7 @@ ${b}
1050
1087
  cursor: "pointer",
1051
1088
  fontSize: 14
1052
1089
  },
1053
- children: /* @__PURE__ */ t(l, { name: "trash", size: 14 })
1090
+ children: /* @__PURE__ */ a(s, { name: "trash", size: 14 })
1054
1091
  }
1055
1092
  )
1056
1093
  ]
@@ -1058,21 +1095,21 @@ ${b}
1058
1095
  e.id
1059
1096
  )) })
1060
1097
  ] }),
1061
- S === "test" && /* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 20, height: "100%" }, children: [
1062
- /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column" }, children: [
1063
- /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }, children: [
1064
- /* @__PURE__ */ n("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
1065
- /* @__PURE__ */ t(l, { name: "download", size: 16 }),
1098
+ M === "test" && /* @__PURE__ */ i("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 20, height: "100%" }, children: [
1099
+ /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column" }, children: [
1100
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }, children: [
1101
+ /* @__PURE__ */ i("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
1102
+ /* @__PURE__ */ a(s, { name: "download", size: 16 }),
1066
1103
  " ",
1067
- r("dataMapper.input", "Input")
1104
+ n("dataMapper.input", "Input")
1068
1105
  ] }),
1069
- /* @__PURE__ */ t(
1106
+ /* @__PURE__ */ a(
1070
1107
  "button",
1071
1108
  {
1072
1109
  onClick: () => {
1073
- const e = {}, o = (d, i) => {
1074
- d.forEach((h) => {
1075
- h.children && h.type === "object" ? (i[h.name] = {}, o(h.children, i[h.name])) : i[h.name] = {
1110
+ const e = {}, o = (d, r) => {
1111
+ d.forEach((m) => {
1112
+ m.children && m.type === "object" ? (r[m.name] = {}, o(m.children, r[m.name])) : r[m.name] = {
1076
1113
  string: "sample",
1077
1114
  number: 42,
1078
1115
  boolean: !0,
@@ -1080,37 +1117,37 @@ ${b}
1080
1117
  array: [],
1081
1118
  object: {},
1082
1119
  any: null
1083
- }[h.type];
1120
+ }[m.type];
1084
1121
  });
1085
1122
  };
1086
- o(s.sourceSchema.fields, e), I(JSON.stringify(e, null, 2));
1123
+ o(l.sourceSchema.fields, e), A(JSON.stringify(e, null, 2));
1087
1124
  },
1088
1125
  style: {
1089
1126
  padding: "4px 8px",
1090
1127
  borderRadius: 4,
1091
- border: `1px solid ${a.border}`,
1128
+ border: `1px solid ${t.border}`,
1092
1129
  background: "transparent",
1093
- color: a.text,
1130
+ color: t.text,
1094
1131
  cursor: "pointer",
1095
1132
  fontSize: 11
1096
1133
  },
1097
- children: r("dataMapper.generateSample", "Generate Sample")
1134
+ children: n("dataMapper.generateSample", "Generate Sample")
1098
1135
  }
1099
1136
  )
1100
1137
  ] }),
1101
- /* @__PURE__ */ t(
1138
+ /* @__PURE__ */ a(
1102
1139
  "textarea",
1103
1140
  {
1104
- value: T,
1105
- onChange: (e) => I(e.target.value),
1106
- placeholder: r("dataMapper.pasteJsonInputHere", "Paste JSON input here..."),
1141
+ value: N,
1142
+ onChange: (e) => A(e.target.value),
1143
+ placeholder: n("dataMapper.pasteJsonInputHere", "Paste JSON input here..."),
1107
1144
  style: {
1108
1145
  flex: 1,
1109
1146
  padding: 12,
1110
1147
  borderRadius: 8,
1111
- border: `1px solid ${a.border}`,
1112
- background: a.cardBg,
1113
- color: a.text,
1148
+ border: `1px solid ${t.border}`,
1149
+ background: t.cardBg,
1150
+ color: t.text,
1114
1151
  fontSize: 12,
1115
1152
  fontFamily: "JetBrains Mono, Consolas, monospace",
1116
1153
  resize: "none"
@@ -1118,102 +1155,102 @@ ${b}
1118
1155
  }
1119
1156
  )
1120
1157
  ] }),
1121
- /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column" }, children: [
1122
- /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }, children: [
1123
- /* @__PURE__ */ n("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
1124
- /* @__PURE__ */ t(l, { name: "upload", size: 16 }),
1158
+ /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column" }, children: [
1159
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 12 }, children: [
1160
+ /* @__PURE__ */ i("h4", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 6 }, children: [
1161
+ /* @__PURE__ */ a(s, { name: "upload", size: 16 }),
1125
1162
  " ",
1126
- r("dataMapper.output", "Output")
1163
+ n("dataMapper.output", "Output")
1127
1164
  ] }),
1128
- /* @__PURE__ */ n(
1165
+ /* @__PURE__ */ i(
1129
1166
  "button",
1130
1167
  {
1131
- onClick: W,
1168
+ onClick: H,
1132
1169
  style: {
1133
1170
  padding: "6px 16px",
1134
1171
  borderRadius: 4,
1135
1172
  border: "none",
1136
- background: a.accent,
1173
+ background: t.accent,
1137
1174
  color: "var(--nice-color-white, #fff)",
1138
1175
  cursor: "pointer",
1139
1176
  fontSize: 12
1140
1177
  },
1141
1178
  children: [
1142
- /* @__PURE__ */ t(l, { name: "refresh", size: 14 }),
1179
+ /* @__PURE__ */ a(s, { name: "refresh", size: 14 }),
1143
1180
  " ",
1144
- r("dataMapper.transform", "Transform")
1181
+ n("dataMapper.transform", "Transform")
1145
1182
  ]
1146
1183
  }
1147
1184
  )
1148
1185
  ] }),
1149
- /* @__PURE__ */ t(
1186
+ /* @__PURE__ */ a(
1150
1187
  "pre",
1151
1188
  {
1152
1189
  style: {
1153
1190
  flex: 1,
1154
1191
  padding: 12,
1155
1192
  borderRadius: 8,
1156
- background: a.cardBg,
1193
+ background: t.cardBg,
1157
1194
  margin: 0,
1158
1195
  overflow: "auto",
1159
1196
  fontSize: 12,
1160
1197
  fontFamily: "JetBrains Mono, Consolas, monospace"
1161
1198
  },
1162
- children: P || "Run transform to see output"
1199
+ children: W || "Run transform to see output"
1163
1200
  }
1164
1201
  )
1165
1202
  ] })
1166
1203
  ] }),
1167
- S === "preview" && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1168
- /* @__PURE__ */ n("div", { style: { display: "flex", gap: 12, marginBottom: 16 }, children: [
1169
- /* @__PURE__ */ n(
1204
+ M === "preview" && /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1205
+ /* @__PURE__ */ i("div", { style: { display: "flex", gap: 12, marginBottom: 16 }, children: [
1206
+ /* @__PURE__ */ i(
1170
1207
  "button",
1171
1208
  {
1172
- onClick: () => g?.(w),
1209
+ onClick: () => b?.(D),
1173
1210
  style: {
1174
1211
  padding: "8px 16px",
1175
1212
  borderRadius: 4,
1176
1213
  border: "none",
1177
- background: a.accent,
1214
+ background: t.accent,
1178
1215
  color: "var(--nice-color-white, #fff)",
1179
1216
  cursor: "pointer",
1180
1217
  fontSize: 13
1181
1218
  },
1182
1219
  children: [
1183
- /* @__PURE__ */ t(l, { name: "upload", size: 14 }),
1220
+ /* @__PURE__ */ a(s, { name: "upload", size: 14 }),
1184
1221
  " ",
1185
- r("dataMapper.export", "Export")
1222
+ n("dataMapper.export", "Export")
1186
1223
  ]
1187
1224
  }
1188
1225
  ),
1189
- /* @__PURE__ */ n(
1226
+ /* @__PURE__ */ i(
1190
1227
  "button",
1191
1228
  {
1192
- onClick: () => navigator.clipboard.writeText(w),
1229
+ onClick: () => navigator.clipboard.writeText(D),
1193
1230
  style: {
1194
1231
  padding: "8px 16px",
1195
1232
  borderRadius: 4,
1196
- border: `1px solid ${a.border}`,
1233
+ border: `1px solid ${t.border}`,
1197
1234
  background: "transparent",
1198
- color: a.text,
1235
+ color: t.text,
1199
1236
  cursor: "pointer",
1200
1237
  fontSize: 13
1201
1238
  },
1202
1239
  children: [
1203
- /* @__PURE__ */ t(l, { name: "clipboard", size: 14 }),
1240
+ /* @__PURE__ */ a(s, { name: "clipboard", size: 14 }),
1204
1241
  " ",
1205
- r("dataMapper.copy", "Copy")
1242
+ n("dataMapper.copy", "Copy")
1206
1243
  ]
1207
1244
  }
1208
1245
  )
1209
1246
  ] }),
1210
- /* @__PURE__ */ t(
1247
+ /* @__PURE__ */ a(
1211
1248
  "pre",
1212
1249
  {
1213
1250
  style: {
1214
1251
  flex: 1,
1215
1252
  padding: 16,
1216
- background: a.cardBg,
1253
+ background: t.cardBg,
1217
1254
  borderRadius: 8,
1218
1255
  overflow: "auto",
1219
1256
  fontSize: 12,
@@ -1221,7 +1258,7 @@ ${b}
1221
1258
  margin: 0,
1222
1259
  whiteSpace: "pre-wrap"
1223
1260
  },
1224
- children: w
1261
+ children: D
1225
1262
  }
1226
1263
  )
1227
1264
  ] })
@@ -1231,5 +1268,5 @@ ${b}
1231
1268
  );
1232
1269
  };
1233
1270
  export {
1234
- ne as NiceDataMapper
1271
+ le as NiceDataMapper
1235
1272
  };