@paroicms/internal-link-plugin 0.1.3 → 0.3.0

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.
@@ -9,7 +9,7 @@ const E = 1, R = 2, it = {
9
9
  owner: null
10
10
  };
11
11
  var k = null;
12
- let H = null, ht = null, w = null, b = null, I = null, M = 0;
12
+ let H = null, ht = null, w = null, b = null, I = null, U = 0;
13
13
  function pt(t, e) {
14
14
  const n = w, i = k, l = t.length === 0, r = i, o = l ? it : {
15
15
  owned: null,
@@ -85,7 +85,7 @@ function rt(t, e, n) {
85
85
  function x(t) {
86
86
  if (!t.fn) return;
87
87
  T(t);
88
- const e = M;
88
+ const e = U;
89
89
  gt(
90
90
  t,
91
91
  t.value,
@@ -126,7 +126,7 @@ function V(t) {
126
126
  if (t.state === R) return j(t);
127
127
  if (t.suspense && C(t.suspense.inFallback)) return t.suspense.effects.push(t);
128
128
  const e = [t];
129
- for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < M); )
129
+ for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < U); )
130
130
  t.state && e.push(t);
131
131
  for (let n = e.length - 1; n >= 0; n--)
132
132
  if (t = e[n], t.state === E)
@@ -139,7 +139,7 @@ function V(t) {
139
139
  function N(t, e) {
140
140
  if (b) return t();
141
141
  let n = !1;
142
- e || (b = []), I ? n = !0 : I = [], M++;
142
+ e || (b = []), I ? n = !0 : I = [], U++;
143
143
  try {
144
144
  const i = t();
145
145
  return $t(n), i;
@@ -169,7 +169,7 @@ function j(t, e) {
169
169
  const i = t.sources[n];
170
170
  if (i.sources) {
171
171
  const l = i.state;
172
- l === E ? i !== e && (!i.updatedAt || i.updatedAt < M) && V(i) : l === R && j(i, e);
172
+ l === E ? i !== e && (!i.updatedAt || i.updatedAt < U) && V(i) : l === R && j(i, e);
173
173
  }
174
174
  }
175
175
  }
@@ -298,8 +298,8 @@ function kt(t, e) {
298
298
  e == null ? t.removeAttribute("class") : t.className = e;
299
299
  }
300
300
  function p(t, e, n, i) {
301
- if (n !== void 0 && !i && (i = []), typeof e != "function") return U(t, e, i, n);
302
- P((l) => U(t, e(), l, n), i);
301
+ if (n !== void 0 && !i && (i = []), typeof e != "function") return M(t, e, i, n);
302
+ P((l) => M(t, e(), l, n), i);
303
303
  }
304
304
  function _t(t) {
305
305
  let e = t.target;
@@ -335,7 +335,7 @@ function _t(t) {
335
335
  } else s();
336
336
  r(i);
337
337
  }
338
- function U(t, e, n, i, l) {
338
+ function M(t, e, n, i, l) {
339
339
  for (; typeof n == "function"; ) n = n();
340
340
  if (e === n) return n;
341
341
  const r = typeof e, o = i !== void 0;
@@ -354,12 +354,12 @@ function U(t, e, n, i, l) {
354
354
  return P(() => {
355
355
  let s = e();
356
356
  for (; typeof s == "function"; ) s = s();
357
- n = U(t, s, n, i);
357
+ n = M(t, s, n, i);
358
358
  }), () => n;
359
359
  if (Array.isArray(e)) {
360
360
  const s = [], a = n && Array.isArray(n);
361
361
  if (F(s, e, n, l))
362
- return P(() => n = U(t, s, n, i, !0)), () => n;
362
+ return P(() => n = M(t, s, n, i, !0)), () => n;
363
363
  if (s.length === 0) {
364
364
  if (n = D(t, n, i), o) return n;
365
365
  } else a ? n.length === 0 ? X(t, s, i) : bt(t, n, s) : (n && D(t), X(t, s));
@@ -560,7 +560,7 @@ function ft(t) {
560
560
  })();
561
561
  }
562
562
  K(["input", "click"]);
563
- var Nt = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Bt = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), Ot = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Rt = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>'), tt = /* @__PURE__ */ y("<div>"), Vt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), jt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), et = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), Ut = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Mt = /* @__PURE__ */ y('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn pi pi-pencil"type=button>');
563
+ var Nt = /* @__PURE__ */ y("<div class=InternalLinkDialog-header><span class=InternalLinkDialog-title>"), Bt = /* @__PURE__ */ y('<button class="PlgBtn pi pi-arrow-left"type=button>'), Ot = /* @__PURE__ */ y("<div class=InternalLinkDialog-content>"), Rt = /* @__PURE__ */ y('<div class=ILPreview><div class=ILPreview-title></div><button class="PlgBtn outlined iconBtn pi pi-pencil"type=button>'), tt = /* @__PURE__ */ y("<div>"), Vt = /* @__PURE__ */ y('<div><button class="PlgBtn primary"type=button>'), jt = /* @__PURE__ */ y('<button type=button class="PlgBtn danger outlined">'), et = /* @__PURE__ */ y("<button class=PlgBtn type=button>"), Mt = /* @__PURE__ */ y('<button class="PlgBtn primary"type=button>'), Ut = /* @__PURE__ */ y('<div class=InternalLinkDialog-linkPreview><div></div><button class="PlgBtn iconBtn pi pi-pencil"type=button>');
564
564
  function Ht({
565
565
  service: t,
566
566
  setValue: e,
@@ -633,7 +633,7 @@ function Ht({
633
633
  m.hide();
634
634
  }, p(g, () => l("InternalLink.dialog.ok")), d;
635
635
  })() : (() => {
636
- var d = Ut();
636
+ var d = Mt();
637
637
  return d.$$click = () => {
638
638
  m.hide();
639
639
  }, p(d, () => l("InternalLink.dialog.ok")), d;
@@ -649,7 +649,7 @@ function Ht({
649
649
  return p(c, (() => {
650
650
  var f = _(() => !!n());
651
651
  return () => f() ? (() => {
652
- var d = Mt(), g = d.firstChild, L = g.nextSibling;
652
+ var d = Ut(), g = d.firstChild, L = g.nextSibling;
653
653
  return p(g, () => r()?.title), L.$$click = () => m.show(), d;
654
654
  })() : (() => {
655
655
  var d = et();
@@ -780,13 +780,13 @@ function ne(t) {
780
780
  if (t.fieldType.dataType !== "string")
781
781
  throw new Error(`data type '${t.fieldType.dataType}' is incompatible, should be 'string'`);
782
782
  return pt((e) => {
783
- const [n, i] = S(t.value ?? ""), [l, r] = S(t.language);
783
+ const [n, i] = S(t.initialValue ?? ""), [l, r] = S(t.language);
784
784
  return {
785
785
  element: A(Ht, {
786
786
  language: l,
787
787
  value: n,
788
788
  setValue: (o) => {
789
- i(o ?? ""), t.onChange(o);
789
+ i(o ?? ""), t.setModifiedValue(o);
790
790
  },
791
791
  service: t
792
792
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/internal-link-plugin",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "Internal link plugin for ParoiCMS",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -30,15 +30,15 @@
30
30
  "@paroicms/public-server-lib": "0"
31
31
  },
32
32
  "devDependencies": {
33
- "@paroicms/public-anywhere-lib": "0.9.1",
34
- "@paroicms/public-bo-lib": "0.15.5",
35
- "@paroicms/public-server-lib": "0.16.6",
36
- "@paroicms/quill-editor-plugin": "^1.16.2",
33
+ "@paroicms/public-anywhere-lib": "0.10.0",
34
+ "@paroicms/public-bo-lib": "0.16.0",
35
+ "@paroicms/public-server-lib": "0.17.0",
36
+ "@paroicms/quill-editor-plugin": "^1.18.0",
37
37
  "@solid-primitives/i18n": "~2.1.1",
38
38
  "@types/node": "~20.14.8",
39
39
  "primeicons": "^7.0.0",
40
40
  "rimraf": "~6.0.1",
41
- "sass": "~1.77.8",
41
+ "sass": "~1.82.0",
42
42
  "solid-devtools": "~0.30.1",
43
43
  "solid-js": "1.9.3",
44
44
  "sortablejs": "^1.15.2",