@enerex/template-studio 1.1.28 → 1.1.29

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.
@@ -1,11 +1,11 @@
1
- import { jsx as a, jsxs as v } from "react/jsx-runtime";
2
- import I, { useContext as J, useState as E, useEffect as C } from "react";
3
- import { QueryClient as ce, QueryClientProvider as pe, useQuery as q, useMutation as Z, useQueryClient as me } from "@tanstack/react-query";
4
- import V from "axios";
5
- import { Spinner as B, Form as S, Card as K, Row as ue, Col as P, Button as z } from "react-bootstrap";
6
- import { Controller as ge, useForm as fe } from "react-hook-form";
7
- import G from "react-select";
8
- const L = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
1
+ import { jsx as s, jsxs as C, Fragment as ve } from "react/jsx-runtime";
2
+ import A, { useContext as oe, useState as S, useRef as xe, useEffect as j } from "react";
3
+ import { QueryClient as Se, QueryClientProvider as Ce, useQuery as z, useMutation as ae, useQueryClient as Ee } from "@tanstack/react-query";
4
+ import J from "axios";
5
+ import { Spinner as W, Form as R, Card as X, Row as Ie, Col as q, Button as Z } from "react-bootstrap";
6
+ import { Controller as Ne, useForm as _e } from "react-hook-form";
7
+ import ee, { components as Pe } from "react-select";
8
+ const F = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
9
9
  <html\r
10
10
  dir="ltr"\r
11
11
  xmlns:o="urn:schemas-microsoft-com:office:office"\r
@@ -361,173 +361,201 @@ const L = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:
361
361
  </div>\r
362
362
  </body>\r
363
363
  </html>\r
364
- `, ee = I.createContext(
364
+ `, le = A.createContext(
365
365
  void 0
366
- ), ye = ({
367
- children: n,
368
- configs: r
366
+ ), je = ({
367
+ children: e,
368
+ configs: n
369
369
  }) => {
370
- const [s, l] = I.useState(r.clientId), [e, t] = I.useState(r.apiKey), [i, o] = I.useState(
371
- r.enerexIdentifier
372
- ), [c, y] = I.useState(r.userName), [f, h] = I.useState(r.projectId), b = (m) => {
373
- t(m.apiKey), l(m.clientId), h(m.projectId), o(m.enerexIdentifier), y(m.userName);
370
+ const [i, a] = A.useState(n.clientId), [r, t] = A.useState(n.apiKey), [o, d] = A.useState(
371
+ n.enerexIdentifier
372
+ ), [p, x] = A.useState(n.userName), [I, h] = A.useState(n.projectId), T = (b) => {
373
+ t(b.apiKey), a(b.clientId), h(b.projectId), d(b.enerexIdentifier), x(b.userName);
374
374
  };
375
- return /* @__PURE__ */ a(
376
- ee.Provider,
375
+ return /* @__PURE__ */ s(
376
+ le.Provider,
377
377
  {
378
378
  value: {
379
- clientId: s,
380
- apiKey: e,
381
- setConfiguration: b,
382
- enerexIdentifier: i,
383
- projectId: f,
384
- userName: c
379
+ clientId: i,
380
+ apiKey: r,
381
+ setConfiguration: T,
382
+ enerexIdentifier: o,
383
+ projectId: I,
384
+ userName: p
385
385
  },
386
- children: n
386
+ children: e
387
387
  }
388
388
  );
389
- }, T = () => {
390
- const n = J(ee);
391
- if (!n)
389
+ }, E = () => {
390
+ const e = oe(le);
391
+ if (!e)
392
392
  throw new Error("widgetConfig must be used within a ConfigProvider");
393
- return n;
394
- }, te = (n = "", r) => ({ get: async (e, t) => {
393
+ return e;
394
+ }, de = (e = "", n) => ({ get: async (r, t) => {
395
395
  try {
396
- const i = await V.get(
397
- `${n}${e}`,
398
- t ?? r
399
- );
400
- if (i.status === 200)
401
- return i.data;
402
- } catch (i) {
403
- throw i;
404
- }
405
- }, post: async (e, t, i) => {
406
- try {
407
- const o = await V.post(
408
- `${n}${e}`,
409
- t,
410
- i ?? r
396
+ const o = await J.get(
397
+ `${e}${r}`,
398
+ t ?? n
411
399
  );
412
400
  if (o.status === 200)
413
401
  return o.data;
414
402
  } catch (o) {
415
403
  throw o;
416
404
  }
417
- } }), $ = {
405
+ }, post: async (r, t, o) => {
406
+ try {
407
+ const d = await J.post(
408
+ `${e}${r}`,
409
+ t,
410
+ o ?? n
411
+ );
412
+ if (d.status === 200)
413
+ return d.data;
414
+ } catch (d) {
415
+ throw d;
416
+ }
417
+ } }), H = {
418
418
  EDITOR_SCRIPT_URL: "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js",
419
419
  EDITOR_PLUGIN_ID: "1afdc3161ec7409a8627a1c8561d45f5",
420
420
  EDITOR_SECRET_KEY: "54ba748ed7e94f2e929555783acb03da",
421
421
  API_BASE_URL: "https://dev-socket.enerex.com/common/api"
422
422
  //API_BASE_URL: "https://localhost:44338/api",
423
423
  // more env variables...
424
- }, ne = I.createContext({
424
+ }, ce = A.createContext({
425
425
  get: () => {
426
426
  throw new Error("HttpClientContext.get not implemented");
427
427
  },
428
428
  post: () => {
429
429
  throw new Error("HttpClientContext.post not implemented");
430
430
  }
431
- }), he = ({ children: n }) => {
432
- const { clientId: r, apiKey: s } = T(), l = {
431
+ }), Ae = ({ children: e }) => {
432
+ const { clientId: n, apiKey: i } = E(), a = {
433
433
  headers: {
434
- client_id: r,
435
- "x-api-key": s
434
+ client_id: n,
435
+ "x-api-key": i
436
436
  }
437
- }, { get: e, post: t } = te($.API_BASE_URL, l);
438
- return /* @__PURE__ */ a(ne.Provider, { value: { get: e, post: t }, children: n });
439
- }, be = ({ children: n }) => {
440
- const r = new ce();
441
- return /* @__PURE__ */ a(he, { children: /* @__PURE__ */ a(pe, { client: r, children: n }) });
442
- }, we = (n) => {
443
- const r = Array.from(new Set(n.map((l) => l.category))), s = [];
444
- return r.forEach((l) => {
445
- const e = n.filter((t) => t.category === l).map((t) => ({
437
+ }, { get: r, post: t } = de(H.API_BASE_URL, a);
438
+ return /* @__PURE__ */ s(ce.Provider, { value: { get: r, post: t }, children: e });
439
+ }, Re = ({ children: e }) => {
440
+ const n = new Se();
441
+ return /* @__PURE__ */ s(Ae, { children: /* @__PURE__ */ s(Ce, { client: n, children: e }) });
442
+ }, Oe = (e) => {
443
+ const n = Array.from(new Set(e.map((a) => a.category))), i = [];
444
+ return n.forEach((a) => {
445
+ const r = e.filter((t) => t.category === a).map((t) => ({
446
446
  label: t.label,
447
447
  value: t.value,
448
448
  hint: t.hint,
449
449
  hidden: t.hidden
450
450
  }));
451
- s.push({ category: l, entries: e });
452
- }), s;
453
- }, N = () => {
454
- const n = J(ne);
455
- if (n)
456
- return n;
451
+ i.push({ category: a, entries: r });
452
+ }), i;
453
+ }, D = () => {
454
+ const e = oe(ce);
455
+ if (e)
456
+ return e;
457
457
  throw new Error("useHttpClient must be used within a HttpClientProvider");
458
- }, A = {
458
+ }, $ = {
459
459
  Template_list: "/Template/list/",
460
460
  Template: "/Template/GetTemplate/",
461
461
  MergeTags: "/Template/TemplateMergeTags/",
462
462
  ExcludeCategory: "/Template/GetExcludeCategories/",
463
463
  SaveTemplate: "/Template/save-update/",
464
464
  TemplateTypes: "/Template/TemplateTypes/"
465
- }, ve = () => {
466
- const n = N(), { enerexIdentifier: r, projectId: s } = T();
467
- return q({
465
+ }, qe = () => {
466
+ const e = D(), { enerexIdentifier: n, projectId: i } = E();
467
+ return z({
468
468
  queryKey: ["getTemplateTags"],
469
- queryFn: async (e) => await n.get(
470
- `${A.MergeTags}${s}/${r}`
469
+ queryFn: async (r) => await e.get(
470
+ `${$.MergeTags}${i}/${n}`
471
471
  )
472
472
  });
473
- }, Te = () => {
474
- const n = N(), { enerexIdentifier: r, projectId: s } = T();
475
- return q({
473
+ }, De = () => {
474
+ const e = D(), { enerexIdentifier: n, projectId: i } = E();
475
+ return z({
476
476
  queryKey: ["getExcludeCategory"],
477
- queryFn: async (e) => await n.get(
478
- `${A.ExcludeCategory}${s}/${r}`
477
+ queryFn: async (r) => await e.get(
478
+ `${$.ExcludeCategory}${i}/${n}`
479
479
  )
480
480
  });
481
- }, xe = ({
482
- templateHTML: n,
483
- className: r = "",
484
- loading: s = !1
481
+ }, $e = ({
482
+ templateHTML: e,
483
+ className: n = "",
484
+ loading: i = !1
485
485
  }) => {
486
- const { post: l } = te(), { data: e } = ve(), { data: t } = Te(), [i, o] = E(
487
- n ?? { html: L, css: "" }
488
- ), { enerexIdentifier: c, projectId: y, userName: f } = T(), h = "https://plugin.stripocdn.email/content/guids/CABINET_eab4e7d5a4603ac03f4120652a3a5a540f0c79c688514939f095f67433ed4a67/images/photo256.png", b = "https://plugins.stripo.email/api/v1/auth";
489
- C(() => {
490
- if (e && t && !document.getElementById("UiEditorScript")) {
491
- const u = document.createElement("script");
492
- u.id = "UiEditorScript", u.type = "module", u.src = $.EDITOR_SCRIPT_URL, u.onload = m, document.body.appendChild(u);
493
- }
494
- }, [e, t]);
495
- const m = async () => {
496
- window.UIEditor.initEditor(
497
- document.querySelector("#stripoEditorContainer"),
498
- {
499
- html: i.html,
500
- css: i.css,
501
- modulesExcludedCategories: t ?? [],
502
- forceRecreate: !0,
503
- metadata: {
504
- emailId: `${y}_${c}`,
505
- userId: "1",
506
- username: f,
507
- avatarUrl: h
508
- },
509
- locale: "en",
510
- onTokenRefreshRequest: async function(u) {
511
- const p = {
512
- pluginId: $.EDITOR_PLUGIN_ID,
513
- secretKey: $.EDITOR_SECRET_KEY,
514
- userId: "12",
515
- role: "user"
516
- }, g = await l(b, p);
517
- g && u(g.token);
518
- },
519
- codeEditorButtonSelector: "#codeEditor",
520
- undoButtonSelector: "#undoButton",
521
- redoButtonSelector: "#redoButton",
522
- mobileViewButtonSelector: "#mobileViewButton",
523
- desktopViewButtonSelector: "#desktopViewButton",
524
- mergeTags: we(e ?? [])
525
- }
486
+ const { post: a } = de(), { data: r } = qe(), { data: t } = De(), [o, d] = S(
487
+ e ?? { html: F, css: "" }
488
+ ), { enerexIdentifier: p, projectId: x, userName: I } = E(), h = xe(null), T = "https://plugin.stripocdn.email/content/guids/CABINET_eab4e7d5a4603ac03f4120652a3a5a540f0c79c688514939f095f67433ed4a67/images/photo256.png", b = "https://plugins.stripo.email/api/v1/auth";
489
+ j(() => {
490
+ (async () => (await N(), r && t && await m(H.EDITOR_SCRIPT_URL)))();
491
+ }, [r, t]);
492
+ async function N() {
493
+ window.Zone || await new Promise((f, u) => {
494
+ const g = document.createElement("script");
495
+ g.src = "https://unpkg.com/zone.js@0.13.1/bundles/zone.umd.min.js";
496
+ const v = document.querySelector("script[nonce]")?.nonce;
497
+ v && g.setAttribute("nonce", v), g.onload = () => f(), g.onerror = () => u(new Error("Failed to load zone.js")), document.head.appendChild(g);
498
+ });
499
+ }
500
+ async function m(f) {
501
+ let u = document.getElementById(
502
+ "UiEditorScript"
503
+ );
504
+ u || (u = document.createElement("script"), u.id = "UiEditorScript", u.src = f, u.onload = async () => {
505
+ await _();
506
+ }, document.body.appendChild(u)), await new Promise(
507
+ (g) => u.addEventListener("load", () => g(), { once: !0 })
526
508
  );
509
+ }
510
+ const _ = async () => {
511
+ const f = h.current;
512
+ if (!f) {
513
+ console.error("Missing #stripoEditorContainer in DOM");
514
+ return;
515
+ }
516
+ if (!window.UIEditor || typeof window.UIEditor.initEditor != "function") {
517
+ console.error("UIEditor script not loaded or not exposing initEditor");
518
+ return;
519
+ }
520
+ const u = {
521
+ html: o.html,
522
+ css: o.css,
523
+ modulesExcludedCategories: t ?? [],
524
+ forceRecreate: !0,
525
+ metadata: {
526
+ emailId: `${x}_${p}`,
527
+ userId: "1",
528
+ username: I,
529
+ avatarUrl: T
530
+ },
531
+ locale: "en",
532
+ onTokenRefreshRequest: async (g) => {
533
+ const v = {
534
+ pluginId: H.EDITOR_PLUGIN_ID,
535
+ secretKey: H.EDITOR_SECRET_KEY,
536
+ userId: "12",
537
+ role: "user"
538
+ }, L = await a(
539
+ b,
540
+ v
541
+ );
542
+ L?.token && g(L.token);
543
+ },
544
+ mergeTags: Oe(r ?? [])
545
+ };
546
+ for (const [g, v] of Object.entries({
547
+ codeEditorButtonSelector: "#codeEditor",
548
+ undoButtonSelector: "#undoButton",
549
+ redoButtonSelector: "#redoButton",
550
+ mobileViewButtonSelector: "#mobileViewButton",
551
+ desktopViewButtonSelector: "#desktopViewButton"
552
+ }))
553
+ f.ownerDocument && f.getRootNode() instanceof ShadowRoot && f.getRootNode().querySelector(v) && (u[g] = v);
554
+ await window.UIEditor.initEditor(f, u);
527
555
  };
528
- return /* @__PURE__ */ a("div", { className: "position-relative", children: /* @__PURE__ */ v("div", { className: `editor-container ${r}`, children: [
529
- s && /* @__PURE__ */ a("div", { className: "loading-overlay", children: /* @__PURE__ */ a(
530
- B,
556
+ return /* @__PURE__ */ s("div", { className: "position-relative", children: /* @__PURE__ */ C("div", { className: `editor-container ${n}`, children: [
557
+ i && /* @__PURE__ */ s("div", { className: "loading-overlay", children: /* @__PURE__ */ s(
558
+ W,
531
559
  {
532
560
  animation: "border",
533
561
  style: { width: "11px", height: "11px" },
@@ -536,148 +564,150 @@ const L = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:
536
564
  className: "me-1"
537
565
  }
538
566
  ) }),
539
- /* @__PURE__ */ a("div", { id: "externalSystemContainer" }),
540
- /* @__PURE__ */ a("div", { id: "stripoEditorContainer" })
567
+ /* @__PURE__ */ s("div", { id: "externalSystemContainer" }),
568
+ /* @__PURE__ */ s("div", { id: "stripoEditorContainer", ref: h })
541
569
  ] }) });
542
- }, Q = ({
543
- label: n,
544
- register: r,
545
- validation: s,
546
- required: l = !1,
547
- name: e,
570
+ }, te = ({
571
+ label: e,
572
+ register: n,
573
+ validation: i,
574
+ required: a = !1,
575
+ name: r,
548
576
  error: t,
549
- className: i = "",
550
- ...o
551
- }) => /* @__PURE__ */ v(S.Group, { className: i + " mb-1", children: [
552
- n ? /* @__PURE__ */ v(S.Label, { className: "mb-3 d-block form-label", children: [
553
- n,
554
- l && /* @__PURE__ */ a("label", { className: "text-danger", children: "*" })
577
+ className: o = "",
578
+ ...d
579
+ }) => /* @__PURE__ */ C(R.Group, { className: o + " mb-1", children: [
580
+ e ? /* @__PURE__ */ C(R.Label, { className: "mb-3 d-block form-label", children: [
581
+ e,
582
+ a && /* @__PURE__ */ s("label", { className: "text-danger", children: "*" })
555
583
  ] }) : null,
556
- /* @__PURE__ */ a(
557
- S.Control,
584
+ /* @__PURE__ */ s(
585
+ R.Control,
558
586
  {
559
- name: e,
587
+ name: r,
560
588
  type: "text",
561
- ...o,
562
- isInvalid: !!(t && t[e]),
563
- ...r ? r(e, {
564
- ...s
589
+ ...d,
590
+ isInvalid: !!(t && t[r]),
591
+ ...n ? n(r, {
592
+ ...i
565
593
  }) : {},
566
- className: `react-select__control ${t && t[e] && "border border-danger"}`
594
+ className: `react-select__control ${t && t[r] && "border border-danger"}`
567
595
  }
568
596
  ),
569
- t && t[e] ? /* @__PURE__ */ a(S.Control.Feedback, { type: "invalid", children: t[e].message }) : null
570
- ] }), Ce = () => {
571
- const n = N(), { enerexIdentifier: r, projectId: s } = T();
572
- return q({
597
+ t && t[r] ? /* @__PURE__ */ s(R.Control.Feedback, { type: "invalid", children: t[r].message }) : null
598
+ ] }), Le = () => {
599
+ const e = D(), { enerexIdentifier: n, projectId: i } = E();
600
+ return z({
573
601
  queryKey: ["getTemplatesList"],
574
- queryFn: async (e) => await n.get(
575
- `${A.Template_list}${s}/${r}`
602
+ queryFn: async (r) => await e.get(
603
+ `${$.Template_list}${i}/${n}`
576
604
  )
577
605
  });
578
606
  };
579
- function Ie(n) {
580
- let r = [], s = n.filter((e) => e.id != null), l = [];
581
- return s.forEach((e) => {
582
- e.parent_id !== 0 && !l.includes(e.parent_id) && l.push(e.parent_id);
583
- }), l.forEach((e) => {
584
- let t = s.filter((o) => o.parent_id === e).map((o) => ({ name: o.name, id: o.id })), i = s.find((o) => o.id === e)?.name;
585
- i && r.push({ label: i, options: t });
586
- }), s.forEach((e) => {
587
- e.parent_id === 0 && !l.includes(e.id) && r.push({ name: e.name, id: e.id });
588
- }), r;
607
+ function V(e) {
608
+ return e.sort((n, i) => n.name.localeCompare(i.name));
589
609
  }
590
- const Ee = () => {
591
- const n = N(), { enerexIdentifier: r, projectId: s } = T();
592
- return Z({
610
+ const ke = () => {
611
+ const e = D(), { enerexIdentifier: n, projectId: i } = E();
612
+ return ae({
593
613
  mutationKey: ["getTemplate"],
594
- mutationFn: async ({ id: e }) => {
595
- if (e)
596
- return await n.get(
597
- `${A.Template}${r}/${e}/${s}`
614
+ mutationFn: async ({ id: r }) => {
615
+ if (r)
616
+ return await e.get(
617
+ `${$.Template}${n}/${r}/${i}`
598
618
  );
599
619
  }
600
620
  });
601
- }, Se = () => {
602
- const n = N(), { enerexIdentifier: r, projectId: s } = T();
603
- return q({
621
+ }, Be = () => {
622
+ const e = D(), { enerexIdentifier: n, projectId: i } = E();
623
+ return z({
604
624
  queryKey: ["getTemplateTypes"],
605
- queryFn: async (e) => await n.get(
606
- `${A.TemplateTypes}${r}/${s}`
625
+ queryFn: async (r) => await e.get(
626
+ `${$.TemplateTypes}${n}/${i}`
607
627
  )
608
628
  });
609
629
  };
610
- function _e(n) {
611
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
630
+ function Ue(e) {
631
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
612
632
  }
613
- var k = { exports: {} };
633
+ var K = { exports: {} };
614
634
  /*!
615
635
  Copyright (c) 2018 Jed Watson.
616
636
  Licensed under the MIT License (MIT), see
617
637
  http://jedwatson.github.io/classnames
618
638
  */
619
- var W;
620
- function Ne() {
621
- return W || (W = 1, function(n) {
639
+ var ne;
640
+ function Me() {
641
+ return ne || (ne = 1, function(e) {
622
642
  (function() {
623
- var r = {}.hasOwnProperty;
624
- function s() {
625
- for (var t = "", i = 0; i < arguments.length; i++) {
626
- var o = arguments[i];
627
- o && (t = e(t, l(o)));
643
+ var n = {}.hasOwnProperty;
644
+ function i() {
645
+ for (var t = "", o = 0; o < arguments.length; o++) {
646
+ var d = arguments[o];
647
+ d && (t = r(t, a(d)));
628
648
  }
629
649
  return t;
630
650
  }
631
- function l(t) {
651
+ function a(t) {
632
652
  if (typeof t == "string" || typeof t == "number")
633
653
  return t;
634
654
  if (typeof t != "object")
635
655
  return "";
636
656
  if (Array.isArray(t))
637
- return s.apply(null, t);
657
+ return i.apply(null, t);
638
658
  if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
639
659
  return t.toString();
640
- var i = "";
641
- for (var o in t)
642
- r.call(t, o) && t[o] && (i = e(i, o));
643
- return i;
660
+ var o = "";
661
+ for (var d in t)
662
+ n.call(t, d) && t[d] && (o = r(o, d));
663
+ return o;
644
664
  }
645
- function e(t, i) {
646
- return i ? t ? t + " " + i : t + i : t;
665
+ function r(t, o) {
666
+ return o ? t ? t + " " + o : t + o : t;
647
667
  }
648
- n.exports ? (s.default = s, n.exports = s) : window.classNames = s;
668
+ e.exports ? (i.default = i, e.exports = i) : window.classNames = i;
649
669
  })();
650
- }(k)), k.exports;
670
+ }(K)), K.exports;
651
671
  }
652
- var Ae = Ne();
653
- const Y = /* @__PURE__ */ _e(Ae), Pe = ({
654
- name: n = "",
655
- control: r,
656
- options: s,
657
- multiple: l = !1,
658
- placeholder: e,
672
+ var Fe = Me();
673
+ const re = /* @__PURE__ */ Ue(Fe), se = (e) => e.data.isSeparator ? /* @__PURE__ */ s("div", { style: { padding: 0, margin: "2px 0" }, children: /* @__PURE__ */ s(
674
+ "hr",
675
+ {
676
+ style: {
677
+ border: 0,
678
+ borderTop: "1px solid #bdbdbdff",
679
+ padding: 0,
680
+ margin: 0
681
+ }
682
+ }
683
+ ) }) : /* @__PURE__ */ s(Pe.Option, { ...e }), He = ({
684
+ name: e = "",
685
+ control: n,
686
+ options: i,
687
+ multiple: a = !1,
688
+ placeholder: r,
659
689
  validation: t,
660
- labelKey: i = "name",
661
- disabled: o,
662
- isInvalid: c,
663
- value: y,
664
- onChange: f,
690
+ labelKey: o = "name",
691
+ disabled: d,
692
+ isInvalid: p,
693
+ value: x,
694
+ onChange: I,
665
695
  uncontrolled: h,
666
- menuPlacement: b = "auto",
667
- closeOnSelect: m = !0
696
+ menuPlacement: T = "auto",
697
+ closeOnSelect: b = !0
668
698
  }) => {
669
- const u = {
670
- control: (p) => ({
671
- ...p,
699
+ const N = {
700
+ control: (m) => ({
701
+ ...m,
672
702
  minHeight: "33px",
673
703
  // state.isFocused can display different borderColor if you need it
674
- borderColor: c ? "var(--bs-form-invalid-border-color) !important" : "var(--ct-input-border-color)",
675
- backgroundImage: c ? 'url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23fa5c7c%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23fa5c7c%27 stroke=%27none%27/%3e%3c/svg%3e")' : "none",
704
+ borderColor: p ? "var(--bs-form-invalid-border-color) !important" : "var(--ct-input-border-color)",
705
+ backgroundImage: p ? 'url("data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23fa5c7c%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23fa5c7c%27 stroke=%27none%27/%3e%3c/svg%3e")' : "none",
676
706
  backgroundRepeat: "no-repeat",
677
707
  backgroundPosition: "right calc(0.375em + 0.225rem) center",
678
708
  backgroundSize: "calc(0.75em + 0.45rem) calc(0.75em + 0.45rem)",
679
709
  "&:hover": {
680
- borderColor: c ? "var(--bs-form-invalid-border-color)" : "var(--ct-input-border-color)"
710
+ borderColor: p ? "var(--bs-form-invalid-border-color)" : "var(--ct-input-border-color)"
681
711
  },
682
712
  "& .react-select__single-value": {
683
713
  color: "var(--ct-input-color) !important"
@@ -689,182 +719,264 @@ const Y = /* @__PURE__ */ _e(Ae), Pe = ({
689
719
  display: "none"
690
720
  }
691
721
  }),
692
- menu: (p) => ({
693
- ...p,
722
+ menu: (m) => ({
723
+ ...m,
694
724
  marginTop: 0,
695
725
  width: "max-content",
696
726
  minWidth: "100%"
697
727
  }),
698
- menuPortal: (p) => ({
699
- ...p,
728
+ menuPortal: (m) => ({
729
+ ...m,
700
730
  zIndex: 9999
701
731
  }),
702
- multiValueRemove: (p) => ({
703
- ...p,
704
- display: o ? "none" : "block"
732
+ multiValueRemove: (m) => ({
733
+ ...m,
734
+ display: d ? "none" : "block"
705
735
  })
706
736
  };
707
- return h ? /* @__PURE__ */ a(
708
- G,
737
+ return h ? /* @__PURE__ */ s(
738
+ ee,
709
739
  {
710
- className: Y({
711
- "is-invalid": c
740
+ components: { Option: se },
741
+ isOptionDisabled: (m) => !!m.isSeparator,
742
+ className: re({
743
+ "is-invalid": p
712
744
  }),
713
- styles: u,
745
+ styles: N,
714
746
  classNamePrefix: "react-select",
715
- isMulti: l,
716
- options: s,
717
- onChange: f,
718
- placeholder: e,
747
+ isMulti: a,
748
+ options: i,
749
+ onChange: I,
750
+ placeholder: r,
719
751
  menuPortalTarget: document.body,
720
- value: y,
721
- getOptionLabel: typeof i == "string" ? (p) => p[i] : i,
722
- getOptionValue: (p) => p.id,
723
- isDisabled: o,
724
- menuPlacement: b,
725
- closeMenuOnSelect: m
752
+ value: x,
753
+ getOptionLabel: typeof o == "string" ? (m) => m[o] : o,
754
+ getOptionValue: (m) => m.id,
755
+ isDisabled: d,
756
+ menuPlacement: T,
757
+ closeMenuOnSelect: b
726
758
  }
727
- ) : /* @__PURE__ */ a(
728
- ge,
759
+ ) : /* @__PURE__ */ s(
760
+ Ne,
729
761
  {
730
- control: r,
731
- name: n,
762
+ control: n,
763
+ name: e,
732
764
  rules: t,
733
- render: ({ field: { onChange: p, value: g, onBlur: j } }) => /* @__PURE__ */ a(
734
- G,
765
+ render: ({ field: { onChange: m, value: _, onBlur: f } }) => /* @__PURE__ */ s(
766
+ ee,
735
767
  {
736
- className: Y({
737
- "is-invalid": c
768
+ components: { Option: se },
769
+ isOptionDisabled: (u) => !!u.isSeparator,
770
+ className: re({
771
+ "is-invalid": p
738
772
  }),
739
- styles: u,
773
+ styles: N,
740
774
  classNamePrefix: "react-select",
741
- isMulti: l,
742
- options: s,
743
- onBlur: j,
744
- onChange: p,
745
- placeholder: e,
775
+ isMulti: a,
776
+ options: i,
777
+ onBlur: f,
778
+ onChange: m,
779
+ placeholder: r,
746
780
  menuPortalTarget: document.body,
747
- value: g,
748
- getOptionLabel: typeof i == "string" ? (w) => w[i] : i,
749
- getOptionValue: (w) => w.id,
750
- isDisabled: o,
751
- menuPlacement: b,
752
- closeMenuOnSelect: m
781
+ value: _,
782
+ getOptionLabel: typeof o == "string" ? (u) => u[o] : o,
783
+ getOptionValue: (u) => u.id,
784
+ isDisabled: d,
785
+ menuPlacement: T,
786
+ closeMenuOnSelect: b
753
787
  },
754
- g ? JSON.stringify(g) : "reset"
788
+ _ ? JSON.stringify(_) : "reset"
755
789
  )
756
790
  }
757
791
  );
758
- }, X = ({
759
- label: n,
760
- name: r,
761
- validation: s,
762
- control: l,
763
- error: e,
792
+ }, G = ({
793
+ label: e,
794
+ name: n,
795
+ validation: i,
796
+ control: a,
797
+ error: r,
764
798
  ...t
765
- }) => /* @__PURE__ */ v(S.Group, { className: "mb-1", children: [
766
- n && /* @__PURE__ */ v(S.Label, { className: "mb-3 d-block form-label", children: [
767
- n,
799
+ }) => /* @__PURE__ */ C(R.Group, { className: "mb-1", children: [
800
+ e && /* @__PURE__ */ C(R.Label, { className: "mb-3 d-block form-label", children: [
801
+ e,
768
802
  " ",
769
- t.required && /* @__PURE__ */ a("span", { className: "text-danger", children: "*" })
803
+ t.required && /* @__PURE__ */ s("span", { className: "text-danger", children: "*" })
770
804
  ] }),
771
- /* @__PURE__ */ a(
772
- Pe,
805
+ /* @__PURE__ */ s(
806
+ He,
773
807
  {
774
- control: l,
808
+ control: a,
775
809
  options: t.options ?? [],
776
- validation: s,
777
- isInvalid: e && !!e[r],
778
- name: r
810
+ validation: i,
811
+ isInvalid: r && !!r[n],
812
+ name: n
779
813
  }
780
814
  ),
781
- e && e[r] ? /* @__PURE__ */ a(S.Control.Feedback, { type: "invalid", children: e[r].message }) : null
782
- ] }), je = () => {
783
- const n = N();
784
- me();
785
- const { enerexIdentifier: r, projectId: s } = T();
786
- return Z({
815
+ r && r[n] ? /* @__PURE__ */ s(R.Control.Feedback, { type: "invalid", children: r[n].message }) : null
816
+ ] }), ze = () => {
817
+ const e = D();
818
+ Ee();
819
+ const { enerexIdentifier: n, projectId: i } = E();
820
+ return ae({
787
821
  mutationKey: ["saveTemplate"],
788
- mutationFn: async (e) => (e.enerexIdentifier = r ?? "", e.projectId = s ?? "", await n.post(
789
- `${A.SaveTemplate}`,
790
- e
822
+ mutationFn: async (r) => (r.enerexIdentifier = n ?? "", r.projectId = i ?? "", await e.post(
823
+ `${$.SaveTemplate}`,
824
+ r
791
825
  ))
792
826
  });
793
- }, O = { id: "", name: "New (Blank)" }, Re = ({
794
- onSelectItem: n,
795
- templateLoading: r,
796
- onReset: s
827
+ }, Q = {
828
+ id: "",
829
+ name: "New (Blank)"
830
+ }, ie = {
831
+ id: "",
832
+ name: "Separator",
833
+ isSeparator: !0
834
+ }, Ve = ({
835
+ onSelectItem: e,
836
+ templateLoading: n,
837
+ onReset: i
797
838
  }) => {
798
839
  const {
799
- register: l,
800
- handleSubmit: e,
840
+ register: a,
841
+ handleSubmit: r,
801
842
  clearErrors: t,
802
- setValue: i,
803
- control: o,
804
- watch: c,
805
- reset: y,
806
- formState: { errors: f }
807
- } = fe({
843
+ setValue: o,
844
+ control: d,
845
+ watch: p,
846
+ reset: x,
847
+ setError: I,
848
+ formState: { errors: h }
849
+ } = _e({
808
850
  defaultValues: {
809
851
  templateName: "",
852
+ subTemplateType: void 0,
810
853
  subject: "",
811
854
  templateType: void 0,
812
- template: O
855
+ template: Q
813
856
  },
814
857
  mode: "onChange"
815
858
  }), {
816
- data: h,
859
+ data: T,
817
860
  refetch: b,
818
- isLoading: m
819
- } = Ce(), [u, p] = E([]), [g, j] = E(), [w, M] = E(), { mutateAsync: re, isPending: _ } = Ee(), { mutateAsync: se, isPending: R } = je(), { data: D, isLoading: U } = Se(), [ie, ae] = E([]);
820
- C(() => {
821
- D && ae(Ie(D));
822
- }, [D]), C(() => {
823
- r(!!_);
824
- }, [_]), C(() => {
825
- p(h ?? []);
826
- }, [h]);
827
- const le = async (d) => {
828
- j(d), d ? (i("templateName", d?.name), t()) : (i("templateName", ""), i("subject", ""));
829
- const x = await re({ id: d?.id });
830
- M(x || void 0);
861
+ isLoading: N
862
+ } = Le(), [m, _] = S([]), [f, u] = S(), [g, v] = S(), { mutateAsync: L, isPending: O } = ke(), { mutateAsync: pe, isPending: B } = ze(), { data: U, isLoading: Y } = Be(), [me, ue] = S([]), [P, M] = S([]);
863
+ j(() => {
864
+ if (U) {
865
+ let l = U.filter((c) => c.id != null).sort((c, w) => c.name.localeCompare(w.name));
866
+ ue(
867
+ V(l.filter((c) => c.parent_id === 0))
868
+ ), M(
869
+ V(
870
+ l.filter(
871
+ (c) => c.parent_id.toString() === `${p("templateType")?.id}`
872
+ )
873
+ )
874
+ );
875
+ }
876
+ }, [U]);
877
+ const fe = (l, c) => {
878
+ let w = [];
879
+ return l.forEach((y, k) => {
880
+ c.includes(k) && k !== 0 && w.push(ie), w.push(y);
881
+ }), w;
882
+ };
883
+ j(() => {
884
+ n(!!O);
885
+ }, [O]), j(() => {
886
+ T?.sort((l, c) => l.readonly !== c.readonly ? (l.readonly ? 0 : 1) - (c.readonly ? 0 : 1) : l.name.localeCompare(c.name)), _(T ?? []);
887
+ }, [T]);
888
+ const ge = async (l) => {
889
+ u(l), l && !l.readonly ? (o("templateName", l?.name), t()) : (o("templateName", ""), o("subject", ""));
890
+ const c = await L({ id: l?.id });
891
+ v(c || void 0);
831
892
  };
832
- C(() => {
833
- i("template", O);
834
- }, [c("templateType")]), C(() => {
835
- let d = u.find((x) => x.id === c("template")?.id);
836
- le(d);
837
- }, [c("template")]), C(() => {
838
- w && g ? (n(w), i("subject", w.subject ?? "")) : n(void 0);
839
- }, [w, g, n]);
840
- const oe = (d) => {
893
+ j(() => {
894
+ if (o("template", Q), p("templateType")) {
895
+ let l = U?.filter((c) => c.id !== void 0) ?? [];
896
+ M(
897
+ V(
898
+ l.filter(
899
+ (c) => c.parent_id.toString() === `${p("templateType")?.id}`
900
+ )
901
+ )
902
+ ), o("subTemplateType", void 0);
903
+ }
904
+ }, [p("templateType")]), j(() => {
905
+ let l = m.find((c) => c.id === p("template")?.id);
906
+ ge(l);
907
+ }, [p("template")]), j(() => {
908
+ g && f ? (e(g), o("subject", g.subject ?? "")) : e(void 0);
909
+ }, [g, f, e]);
910
+ const ye = () => {
911
+ let l = [Q], c = m.filter(
912
+ (y) => (y.type?.toString() === p(
913
+ P.length > 0 ? "subTemplateType" : "templateType"
914
+ )?.id.toString() || y.type === null) && p(P.length > 0 ? "subTemplateType" : "templateType")?.id != null
915
+ ), w = fe(c, [c.findIndex((y) => !y.readonly)]);
916
+ return w.length > 0 && (l.push(ie), l = [
917
+ ...l,
918
+ ...w.map((y) => ({
919
+ id: y.id,
920
+ name: y.name,
921
+ isSeparator: y.isSeparator
922
+ }))
923
+ ]), l.length ? l : [];
924
+ }, he = (l) => {
841
925
  window.StripoEditorApi.actionsApi.getTemplateData(
842
- async (x) => {
843
- let H = d.template.id, F = "";
844
- g?.readonly && (H = "", F = d.template.id);
845
- const de = {
926
+ async (c) => {
927
+ let w = l.template.id, y = "";
928
+ f?.readonly && (w = "", y = l.template.id);
929
+ let k = m.find(
930
+ (Te) => Te.name === l.templateName.trim()
931
+ );
932
+ if (k && k.id !== w) {
933
+ I("templateName", {
934
+ type: "validate",
935
+ message: "Template name already exists. Please choose a different name."
936
+ });
937
+ return;
938
+ }
939
+ let be = !!(P && P.length > 0);
940
+ const we = {
846
941
  enerexIdentifier: "",
847
942
  projectId: "",
848
- templateId: H,
849
- templateType: d.templateType.id,
850
- name: d.templateName,
851
- html: x.html,
852
- css: x.css,
853
- subject: d.templateType.id === "2" ? d?.subject ?? "" : "",
854
- parent_id: F
943
+ templateId: w,
944
+ templateType: be ? l.subTemplateType.id : l.templateType.id,
945
+ name: l.templateName.trim(),
946
+ html: c.html,
947
+ css: c.css,
948
+ subject: l.templateType.id === "2" ? l?.subject ?? "" : "",
949
+ parent_id: y
855
950
  };
856
- await se(de) && (t(), y(), b());
951
+ await pe(we) && (t(), x(), M([]), b());
857
952
  }
858
953
  );
859
954
  };
860
- return /* @__PURE__ */ a(K, { className: "border border-0 text-start", children: /* @__PURE__ */ a(K.Body, { className: "pe-0 ps-2", children: /* @__PURE__ */ a("form", { onSubmit: e(oe), children: /* @__PURE__ */ a("div", { className: "template-list-container gap-3", children: /* @__PURE__ */ v(ue, { children: [
861
- /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
862
- X,
955
+ return /* @__PURE__ */ s(X, { className: "border border-0 text-start", children: /* @__PURE__ */ s(X.Body, { className: "pe-0 ps-2", children: /* @__PURE__ */ s("form", { onSubmit: r(he), children: /* @__PURE__ */ s("div", { className: "template-list-container gap-3", children: /* @__PURE__ */ C(Ie, { children: [
956
+ /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(
957
+ G,
863
958
  {
864
959
  label: "Type",
865
- control: o,
866
- error: f,
867
- options: ie,
960
+ control: d,
961
+ error: h,
962
+ options: me,
963
+ required: !0,
964
+ validation: {
965
+ required: {
966
+ value: !0,
967
+ message: "Select a type"
968
+ }
969
+ },
970
+ ...a("templateType")
971
+ }
972
+ ) }),
973
+ P && P.length > 0 && /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(
974
+ G,
975
+ {
976
+ label: "Sub Type",
977
+ control: d,
978
+ error: h,
979
+ options: P,
868
980
  required: !0,
869
981
  validation: {
870
982
  required: {
@@ -872,34 +984,26 @@ const Y = /* @__PURE__ */ _e(Ae), Pe = ({
872
984
  message: "Select a type"
873
985
  }
874
986
  },
875
- ...l("templateType")
987
+ ...a("subTemplateType")
876
988
  }
877
989
  ) }),
878
- /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
879
- X,
990
+ /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(
991
+ G,
880
992
  {
881
993
  label: "Template",
882
- control: o,
883
- error: f,
884
- options: [
885
- O,
886
- ...u.filter(
887
- (d) => (d.type?.toString() === c("templateType")?.id.toString() || d.type === null) && c("templateType")?.id != null
888
- ).map((d) => ({
889
- id: d.id,
890
- name: d.name
891
- }))
892
- ],
994
+ control: d,
995
+ error: h,
996
+ options: ye(),
893
997
  required: !1,
894
- ...l("template")
998
+ ...a("template")
895
999
  }
896
1000
  ) }),
897
- /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
898
- Q,
1001
+ /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(
1002
+ te,
899
1003
  {
900
1004
  label: "Name",
901
- register: l,
902
- error: f,
1005
+ register: a,
1006
+ error: h,
903
1007
  required: !0,
904
1008
  name: "templateName",
905
1009
  validation: {
@@ -910,93 +1014,100 @@ const Y = /* @__PURE__ */ _e(Ae), Pe = ({
910
1014
  }
911
1015
  }
912
1016
  ) }),
913
- c("templateType")?.id === "2" && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
914
- Q,
1017
+ p("templateType")?.id === "2" && /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(
1018
+ te,
915
1019
  {
916
1020
  label: "Subject",
917
- register: l,
918
- error: f,
1021
+ register: a,
1022
+ error: h,
919
1023
  required: !1,
920
1024
  name: "subject"
921
1025
  }
922
1026
  ) }),
923
- /* @__PURE__ */ v(P, { className: "d-flex align-items-end justify-content-end gap-2 mb-3", children: [
924
- /* @__PURE__ */ a(
925
- z,
1027
+ /* @__PURE__ */ C(q, { className: "d-flex align-items-end justify-content-end gap-2 mb-3", children: [
1028
+ /* @__PURE__ */ s(
1029
+ Z,
926
1030
  {
927
1031
  style: { width: "70px" },
928
1032
  variant: "primary",
929
- disabled: m || _ || R || U,
1033
+ disabled: N || O || B || Y,
930
1034
  onClick: () => {
931
- j(void 0), y(), s();
1035
+ u(void 0), x(), M([]), i();
932
1036
  },
933
- children: _ || R ? /* @__PURE__ */ a(
934
- B,
1037
+ children: O || B ? /* @__PURE__ */ s(
1038
+ W,
935
1039
  {
936
1040
  animation: "border",
937
1041
  style: { width: "11px", height: "11px" },
938
1042
  size: "sm",
939
1043
  role: "status",
940
1044
  className: "me-1",
941
- children: /* @__PURE__ */ a("span", { className: "visually-hidden", children: "Loading..." })
1045
+ children: /* @__PURE__ */ s("span", { className: "visually-hidden", children: "Loading..." })
942
1046
  }
943
1047
  ) : "Clear"
944
1048
  }
945
1049
  ),
946
- (c("templateType")?.id !== "2" || (g?.id ?? "") !== "") && /* @__PURE__ */ a(
947
- z,
1050
+ (p("templateType")?.id.toString() !== "2" || (p("templateType")?.id.toString() === "2" && (f?.id ?? "")) !== "") && /* @__PURE__ */ s(ve, { children: /* @__PURE__ */ s(
1051
+ Z,
948
1052
  {
949
1053
  type: "submit",
950
1054
  variant: "primary",
951
1055
  style: { width: "80px" },
952
- disabled: m || _ || R || U,
953
- children: _ || R ? /* @__PURE__ */ a(
954
- B,
1056
+ disabled: N || O || B || Y,
1057
+ children: O || B ? /* @__PURE__ */ s(
1058
+ W,
955
1059
  {
956
1060
  animation: "border",
957
1061
  style: { width: "11px", height: "11px" },
958
1062
  size: "sm",
959
1063
  role: "status",
960
1064
  className: "me-1",
961
- children: /* @__PURE__ */ a("span", { className: "visually-hidden", children: "Loading..." })
1065
+ children: /* @__PURE__ */ s("span", { className: "visually-hidden", children: "Loading..." })
962
1066
  }
963
- ) : g?.readonly ? "Save as" : "Save"
1067
+ ) : f?.readonly ? "Save as" : "Save"
964
1068
  }
965
- )
1069
+ ) })
966
1070
  ] })
967
1071
  ] }) }) }) }) });
968
- }, Ue = ({ config: n }) => {
969
- const [r, s] = E(), [l, e] = E(!1);
970
- return /* @__PURE__ */ a(ye, { configs: n, children: /* @__PURE__ */ a(be, { children: /* @__PURE__ */ v("div", { className: "root-widget", children: [
971
- /* @__PURE__ */ a(
972
- Re,
1072
+ }, et = ({ config: e }) => {
1073
+ const [n, i] = S(), [a, r] = S(!1);
1074
+ return /* @__PURE__ */ s(je, { configs: e, children: /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ C("div", { className: "root-widget", children: [
1075
+ /* @__PURE__ */ s(
1076
+ Ve,
973
1077
  {
974
- templateLoading: e,
975
- onSelectItem: (o) => {
976
- s(o), window.StripoEditorApi && window.StripoEditorApi.actionsApi && window.StripoEditorApi.actionsApi.updateHtmlAndCss(
977
- o?.html ?? L,
978
- o?.css ?? "",
979
- ""
980
- );
1078
+ templateLoading: r,
1079
+ onSelectItem: (d) => {
1080
+ if (i(d), window.StripoEditorApi && window.StripoEditorApi.actionsApi) {
1081
+ let p = F;
1082
+ window.StripoEditorApi.actionsApi.updateHtmlAndCss(
1083
+ d?.html ?? p,
1084
+ d?.css ?? "",
1085
+ ""
1086
+ );
1087
+ }
981
1088
  },
982
1089
  onReset: () => {
983
- e(!1), s(void 0), window.StripoEditorApi && window.StripoEditorApi.actionsApi && window.StripoEditorApi.actionsApi.updateHtmlAndCss(L, "", "");
1090
+ r(!1), i(void 0), window.StripoEditorApi && window.StripoEditorApi.actionsApi && window.StripoEditorApi.actionsApi.updateHtmlAndCss(
1091
+ F,
1092
+ "",
1093
+ ""
1094
+ );
984
1095
  }
985
1096
  }
986
1097
  ),
987
- /* @__PURE__ */ a(
988
- xe,
1098
+ /* @__PURE__ */ s(
1099
+ $e,
989
1100
  {
990
1101
  templateHTML: {
991
- css: r?.css ?? "",
992
- html: r?.html ?? L
1102
+ css: n?.css ?? "",
1103
+ html: n?.html ?? F
993
1104
  },
994
- loading: l,
1105
+ loading: !1,
995
1106
  className: "col-span-5"
996
1107
  }
997
1108
  )
998
1109
  ] }) }) });
999
1110
  };
1000
1111
  export {
1001
- Ue as EditorWidget
1112
+ et as EditorWidget
1002
1113
  };