@ea-lab/reactive-json 0.0.12 → 0.0.13

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.
@@ -21208,7 +21208,7 @@ const sx = (n, ...l) => l.length ? sx(n = n.replace(sx.token || "$token", l.shif
21208
21208
  return /* @__PURE__ */ te.jsx(tl, { ...n, children: n != null && n.paginated ? /* @__PURE__ */ te.jsx(bD.Provider, { value: { pagination: z }, children: L }) : L });
21209
21209
  };
21210
21210
  function ka({ props: n, currentData: l, datafield: u, path: f }) {
21211
- const p = nt(La), v = nt(Aa), g = {
21211
+ const p = nt(La), v = nt(Aa), g = p.plugins ?? {}, A = {
21212
21212
  AccordionItem: bB,
21213
21213
  CheckBoxField: sB,
21214
21214
  Count: s7,
@@ -21230,37 +21230,38 @@ function ka({ props: n, currentData: l, datafield: u, path: f }) {
21230
21230
  Switch: g7,
21231
21231
  Tabs: l7,
21232
21232
  TextAreaField: gB,
21233
- TextField: yB
21234
- }, A = {
21233
+ TextField: yB,
21234
+ ...g == null ? void 0 : g.element
21235
+ }, S = {
21235
21236
  BsAccordion: tS,
21236
21237
  BsAlert: S4,
21237
21238
  BsBadge: XO,
21238
21239
  BsButton: $O
21239
- }, { element: S } = p;
21240
+ }, { element: x } = p;
21240
21241
  if (l === void 0 && (l = ""), n != null && n.type) {
21241
- let x, C;
21242
- const w = [
21243
- { registryId: "module", components: g },
21244
- { registryId: "bootstrap", components: A }
21242
+ let C, w;
21243
+ const M = [
21244
+ { registryId: "module", components: A },
21245
+ { registryId: "bootstrap", components: S }
21245
21246
  ];
21246
- for (; w.length; ) {
21247
- const { registryId: M, components: z } = w.shift();
21248
- if (C = z[n.type] ?? void 0, C !== void 0) {
21249
- x = M;
21247
+ for (; M.length; ) {
21248
+ const { registryId: z, components: B } = M.shift();
21249
+ if (w = B[n.type] ?? void 0, w !== void 0) {
21250
+ C = z;
21250
21251
  break;
21251
21252
  }
21252
21253
  }
21253
- return C === void 0 && (C = TA, x = "module"), x === "bootstrap" ? /* @__PURE__ */ te.jsx(
21254
+ return w === void 0 && (w = TA, C = "module"), C === "bootstrap" ? /* @__PURE__ */ te.jsx(
21254
21255
  u7,
21255
21256
  {
21256
- bsComponent: C,
21257
+ bsComponent: w,
21257
21258
  path: f,
21258
21259
  props: n,
21259
21260
  currentData: l,
21260
21261
  datafield: u
21261
21262
  }
21262
- ) : (TA === C && (n.tag = n.tag ?? n.type), /* @__PURE__ */ te.jsx(
21263
- C,
21263
+ ) : (TA === w && (n.tag = n.tag ?? n.type), /* @__PURE__ */ te.jsx(
21264
+ w,
21264
21265
  {
21265
21266
  path: f,
21266
21267
  props: n,
@@ -21270,55 +21271,55 @@ function ka({ props: n, currentData: l, datafield: u, path: f }) {
21270
21271
  ));
21271
21272
  }
21272
21273
  if (n != null && n.load) {
21273
- let x;
21274
- const C = (n == null ? void 0 : n.customDataLocation) ?? void 0;
21275
- if (C) debugger;
21276
- const w = C ? Ea({
21274
+ let C;
21275
+ const w = (n == null ? void 0 : n.customDataLocation) ?? void 0;
21276
+ if (w) debugger;
21277
+ const M = w ? Ea({
21277
21278
  globalDataContext: p,
21278
21279
  templateContext: v,
21279
- valueToEvaluate: C
21280
- }) : l, M = C ? Zc({ dataLocation: C, currentPath: f, globalDataContext: p, templateContext: v }) : f;
21281
- typeof n.load == "function" ? x = n.load(w) : x = S[n.load];
21282
- const { load: z, customDataLocation: B, ...L } = n;
21283
- return x = { ...x, ...L }, n.keepTemplateContext ? /* @__PURE__ */ te.jsx(
21280
+ valueToEvaluate: w
21281
+ }) : l, z = w ? Zc({ dataLocation: w, currentPath: f, globalDataContext: p, templateContext: v }) : f;
21282
+ typeof n.load == "function" ? C = n.load(M) : C = x[n.load];
21283
+ const { load: B, customDataLocation: L, ...O } = n;
21284
+ return C = { ...C, ...O }, n.keepTemplateContext ? /* @__PURE__ */ te.jsx(
21284
21285
  ka,
21285
21286
  {
21286
- currentData: w,
21287
+ currentData: M,
21287
21288
  datafield: u,
21288
- path: M,
21289
- props: x
21289
+ path: z,
21290
+ props: C
21290
21291
  }
21291
- ) : /* @__PURE__ */ te.jsx(Aa.Provider, { value: { templateData: w, templatePath: M }, children: /* @__PURE__ */ te.jsx(
21292
+ ) : /* @__PURE__ */ te.jsx(Aa.Provider, { value: { templateData: M, templatePath: z }, children: /* @__PURE__ */ te.jsx(
21292
21293
  ka,
21293
21294
  {
21294
- currentData: w,
21295
+ currentData: M,
21295
21296
  datafield: u,
21296
- path: M,
21297
- props: x
21297
+ path: z,
21298
+ props: C
21298
21299
  }
21299
21300
  ) });
21300
21301
  }
21301
21302
  return Array.isArray(n) ? n.map(
21302
- (x, C) => /* @__PURE__ */ te.jsx(
21303
+ (C, w) => /* @__PURE__ */ te.jsx(
21303
21304
  ka,
21304
21305
  {
21305
- currentData: l[C] ?? void 0,
21306
- datafield: C,
21307
- path: f + "." + C,
21308
- props: x ?? void 0
21306
+ currentData: l[w] ?? void 0,
21307
+ datafield: w,
21308
+ path: f + "." + w,
21309
+ props: C ?? void 0
21309
21310
  },
21310
- f + "." + C
21311
+ f + "." + w
21311
21312
  )
21312
21313
  ) : typeof n == "object" ? Object.entries(n).map(
21313
- ([x, C]) => /* @__PURE__ */ te.jsx(
21314
+ ([C, w]) => /* @__PURE__ */ te.jsx(
21314
21315
  ka,
21315
21316
  {
21316
- currentData: l[x] ?? void 0,
21317
- datafield: x ?? void 0,
21318
- path: f + "." + x,
21319
- props: C
21317
+ currentData: l[C] ?? void 0,
21318
+ datafield: C ?? void 0,
21319
+ path: f + "." + C,
21320
+ props: w
21320
21321
  },
21321
- f + "." + x
21322
+ f + "." + C
21322
21323
  )
21323
21324
  ) : /* @__PURE__ */ te.jsx(cB, { valueToEvaluate: l || (n ?? null) });
21324
21325
  }
@@ -22441,14 +22442,13 @@ function lz({
22441
22442
  return he.length > 0;
22442
22443
  }
22443
22444
  }
22444
- const re = F(p);
22445
- console.log(f);
22446
- const ue = /* @__PURE__ */ te.jsx(x_, { children: /* @__PURE__ */ te.jsxs(
22445
+ const re = F(p), ue = /* @__PURE__ */ te.jsx(x_, { children: /* @__PURE__ */ te.jsxs(
22447
22446
  T_,
22448
22447
  {
22449
22448
  value: {
22450
22449
  element: M,
22451
22450
  headersForData: u,
22451
+ plugins: f,
22452
22452
  setRawAppData: I,
22453
22453
  templateData: S.realCurrentData,
22454
22454
  templatePath: "data",