@xwiki/cristal-history-ui 0.14.0 → 0.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @xwiki/cristal-history-ui
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.16 Release
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @xwiki/cristal-api@0.16.0
13
+ - @xwiki/cristal-document-api@0.16.0
14
+ - @xwiki/cristal-extra-tabs-api@0.16.0
15
+ - @xwiki/cristal-history-api@0.16.0
16
+ - @xwiki/cristal-user-ui@0.16.0
17
+
18
+ ## 0.15.0
19
+
20
+ ### Minor Changes
21
+
22
+ - Cristal 0.15 Release
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+ - @xwiki/cristal-api@0.15.0
28
+ - @xwiki/cristal-document-api@0.15.0
29
+ - @xwiki/cristal-extra-tabs-api@0.15.0
30
+ - @xwiki/cristal-history-api@0.15.0
31
+ - @xwiki/cristal-user-ui@0.15.0
32
+
3
33
  ## 0.14.0
4
34
 
5
35
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode("p[data-v-4a4df957]{font-size:var(--cr-font-size-medium)}table[data-v-4a4df957]{border-collapse:collapse}table tr[data-v-4a4df957]:hover{background-color:var(--cr-color-neutral-200)}table td[data-v-4a4df957]{vertical-align:top;padding:var(--cr-spacing-small)}table td[data-v-4a4df957]:first-child{border-radius:var(--cr-border-radius-medium) 0 0 var(--cr-border-radius-medium)}table td[data-v-4a4df957]:last-child{border-radius:0 var(--cr-border-radius-medium) var(--cr-border-radius-medium) 0}table .history-revision-cell[data-v-4a4df957]{text-align:center}table .history-revision[data-v-4a4df957]{background-color:var(--cr-color-neutral-300);border-radius:var(--cr-border-radius-pill);padding:var(--cr-spacing-2x-small);font-size:var(--cr-font-size-x-small)}")),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { defineComponent as x, inject as T, ref as y, onMounted as P, resolveComponent as C, openBlock as c, createElementBlock as l, Fragment as m, toDisplayString as d, unref as p, createElementVNode as u, renderList as R, createVNode as _, withCtx as g, createTextVNode as S, createCommentVNode as j } from "vue";
2
+ import { defineComponent as x, inject as T, ref as m, onMounted as P, resolveComponent as C, openBlock as c, createElementBlock as l, Fragment as v, toDisplayString as d, unref as p, createElementVNode as u, renderList as R, createVNode as _, withCtx as g, createTextVNode as S, createCommentVNode as j } from "vue";
3
3
  import { name as E } from "@xwiki/cristal-document-api";
4
4
  import { User as H } from "@xwiki/cristal-user-ui";
5
5
  import { useI18n as M } from "vue-i18n";
@@ -23,16 +23,16 @@ const D = {
23
23
  setup(r) {
24
24
  const { t: e } = M({
25
25
  messages: b
26
- }), s = T("cristal"), t = s.getContainer().get(E).getCurrentDocument(), n = y([]), a = y(!0);
26
+ }), s = T("cristal"), t = s.getContainer().get(E).getCurrentDocument(), n = m([]), a = m(!0);
27
27
  return P(async () => {
28
28
  t.value && (n.value = await s.getContainer().get("PageRevisionManagerProvider").get().getRevisions(t.value)), a.value = !1;
29
29
  }), (Q, h) => {
30
30
  const f = C("i18n-t");
31
- return c(), l(m, null, [
31
+ return c(), l(v, null, [
32
32
  a.value ? (c(), l("p", N, d(p(e)("history.extraTabs.loading")), 1)) : (c(), l("p", V, d(p(e)("history.extraTabs.header", { nRevisions: n.value.length })), 1)),
33
33
  h[1] || (h[1] = u("br", null, null, -1)),
34
34
  a.value ? j("", !0) : (c(), l("table", I, [
35
- (c(!0), l(m, null, R(n.value, (i) => (c(), l("tr", {
35
+ (c(!0), l(v, null, R(n.value, (i) => (c(), l("tr", {
36
36
  key: i.version
37
37
  }, [
38
38
  u("td", B, [
@@ -77,7 +77,7 @@ var z = Object.defineProperty, G = Object.getOwnPropertyDescriptor, J = (r, e, s
77
77
  (a = r[n]) && (t = (o ? a(e, s, t) : a(t)) || t);
78
78
  return o && t && z(e, s, t), t;
79
79
  }, K = (r, e) => (s, o) => e(s, o, r);
80
- let v = class extends O {
80
+ let y = class extends O {
81
81
  constructor(r) {
82
82
  super(b), this.pageRevisionManagerProvider = r, this.order = 3e3, this.id = "history", this.title = this.t("history.extraTabs.title");
83
83
  }
@@ -88,13 +88,13 @@ let v = class extends O {
88
88
  return this.pageRevisionManagerProvider.has();
89
89
  }
90
90
  };
91
- v = J([
91
+ y = J([
92
92
  k(),
93
93
  K(0, w("PageRevisionManagerProvider"))
94
- ], v);
94
+ ], y);
95
95
  class re {
96
96
  constructor(e) {
97
- e.bind("ExtraTab").to(v).inSingletonScope();
97
+ e.bind("ExtraTab").to(y).inSingletonScope();
98
98
  }
99
99
  }
100
100
  export {
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode("p[data-v-4a4df957]{font-size:var(--cr-font-size-medium)}table[data-v-4a4df957]{border-collapse:collapse}table tr[data-v-4a4df957]:hover{background-color:var(--cr-color-neutral-200)}table td[data-v-4a4df957]{vertical-align:top;padding:var(--cr-spacing-small)}table td[data-v-4a4df957]:first-child{border-radius:var(--cr-border-radius-medium) 0 0 var(--cr-border-radius-medium)}table td[data-v-4a4df957]:last-child{border-radius:0 var(--cr-border-radius-medium) var(--cr-border-radius-medium) 0}table .history-revision-cell[data-v-4a4df957]{text-align:center}table .history-revision[data-v-4a4df957]{background-color:var(--cr-color-neutral-300);border-radius:var(--cr-border-radius-pill);padding:var(--cr-spacing-2x-small);font-size:var(--cr-font-size-x-small)}")),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@xwiki/cristal-document-api"),require("@xwiki/cristal-user-ui"),require("vue-i18n"),require("@xwiki/cristal-extra-tabs-api"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","vue","@xwiki/cristal-document-api","@xwiki/cristal-user-ui","vue-i18n","@xwiki/cristal-extra-tabs-api","inversify"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["cristal_history-ui"]={},r.Vue,r.cristalDocumentApi,r.cristalUserUi,r.vueI18n,r.cristalExtraTabsApi,r.inversify))})(this,function(r,e,f,y,b,_,u){"use strict";var m=document.createElement("style");m.textContent=`p[data-v-4a4df957]{font-size:var(--cr-font-size-medium)}table[data-v-4a4df957]{border-collapse:collapse}table tr[data-v-4a4df957]:hover{background-color:var(--cr-color-neutral-200)}table td[data-v-4a4df957]{vertical-align:top;padding:var(--cr-spacing-small)}table td[data-v-4a4df957]:first-child{border-radius:var(--cr-border-radius-medium) 0 0 var(--cr-border-radius-medium)}table td[data-v-4a4df957]:last-child{border-radius:0 var(--cr-border-radius-medium) var(--cr-border-radius-medium) 0}table .history-revision-cell[data-v-4a4df957]{text-align:center}table .history-revision[data-v-4a4df957]{background-color:var(--cr-color-neutral-300);border-radius:var(--cr-border-radius-pill);padding:var(--cr-spacing-2x-small);font-size:var(--cr-font-size-x-small)}
3
- /*$vite$:1*/`,document.head.appendChild(m);const h={en:{"history.extraTabs.title":"History","history.extraTabs.loading":"Loading...","history.extraTabs.header":"This page has {nRevisions} versions stored.","history.extraTabs.entry":"{date} by {user}"},fr:{"history.extraTabs.title":"Historique","history.extraTabs.loading":"Chargement en cours ...","history.extraTabs.header":"Ce document a {nRevisions} versions stockées.","history.extraTabs.entry":"{date} par {user}"}},g={key:0},x={key:1},v={key:2},T={class:"history-revision-cell"},k={class:"history-revision"},E=["href"],C=((i,t)=>{const s=i.__vccOpts||i;for(const[n,a]of t)s[n]=a;return s})(e.defineComponent({__name:"HistoryTab",setup(i){const{t}=b.useI18n({messages:h}),s=e.inject("cristal"),a=s.getContainer().get(f.name).getCurrentDocument(),o=e.ref([]),c=e.ref(!0);return e.onMounted(async()=>{a.value&&(o.value=await s.getContainer().get("PageRevisionManagerProvider").get().getRevisions(a.value)),c.value=!1}),(M,d)=>{const N=e.resolveComponent("i18n-t");return e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(t)("history.extraTabs.loading")),1)):(e.openBlock(),e.createElementBlock("p",x,e.toDisplayString(e.unref(t)("history.extraTabs.header",{nRevisions:o.value.length})),1)),d[1]||(d[1]=e.createElementVNode("br",null,null,-1)),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("table",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.version},[e.createElementVNode("td",T,[e.createElementVNode("span",k,e.toDisplayString(l.version),1)]),e.createElementVNode("td",null,[e.createVNode(N,{keypath:"history.extraTabs.entry",tag:"span"},{date:e.withCtx(()=>[e.createElementVNode("a",{href:l.url},e.toDisplayString(l.date.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})),9,E)]),user:e.withCtx(()=>[e.createVNode(e.unref(y.User),{user:l.user},null,8,["user"])]),_:2},1024),d[0]||(d[0]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(l.comment),1)])]))),128))]))],64)}}}),[["__scopeId","data-v-4a4df957"]]);var S=Object.defineProperty,P=Object.getOwnPropertyDescriptor,B=(i,t,s,n)=>{for(var a=n>1?void 0:n?P(t,s):t,o=i.length-1,c;o>=0;o--)(c=i[o])&&(a=(n?c(t,s,a):c(a))||a);return n&&a&&S(t,s,a),a},w=(i,t)=>(s,n)=>t(s,n,i);let p=class extends _.AbstractExtraTab{constructor(i){super(h),this.pageRevisionManagerProvider=i,this.order=3e3,this.id="history",this.title=this.t("history.extraTabs.title")}async panel(){return C}async enabled(){return this.pageRevisionManagerProvider.has()}};p=B([u.injectable(),w(0,u.inject("PageRevisionManagerProvider"))],p);class V{constructor(t){t.bind("ExtraTab").to(p).inSingletonScope()}}r.ComponentInit=V,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
2
+ (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@xwiki/cristal-document-api"),require("@xwiki/cristal-user-ui"),require("vue-i18n"),require("@xwiki/cristal-extra-tabs-api"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","vue","@xwiki/cristal-document-api","@xwiki/cristal-user-ui","vue-i18n","@xwiki/cristal-extra-tabs-api","inversify"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["cristal_history-ui"]={},r.Vue,r.cristalDocumentApi,r.cristalUserUi,r.vueI18n,r.cristalExtraTabsApi,r.inversify))})(this,function(r,e,h,y,b,_,u){"use strict";var m=document.createElement("style");m.textContent=`p[data-v-4a4df957]{font-size:var(--cr-font-size-medium)}table[data-v-4a4df957]{border-collapse:collapse}table tr[data-v-4a4df957]:hover{background-color:var(--cr-color-neutral-200)}table td[data-v-4a4df957]{vertical-align:top;padding:var(--cr-spacing-small)}table td[data-v-4a4df957]:first-child{border-radius:var(--cr-border-radius-medium) 0 0 var(--cr-border-radius-medium)}table td[data-v-4a4df957]:last-child{border-radius:0 var(--cr-border-radius-medium) var(--cr-border-radius-medium) 0}table .history-revision-cell[data-v-4a4df957]{text-align:center}table .history-revision[data-v-4a4df957]{background-color:var(--cr-color-neutral-300);border-radius:var(--cr-border-radius-pill);padding:var(--cr-spacing-2x-small);font-size:var(--cr-font-size-x-small)}
3
+ /*$vite$:1*/`,document.head.appendChild(m);const f={en:{"history.extraTabs.title":"History","history.extraTabs.loading":"Loading...","history.extraTabs.header":"This page has {nRevisions} versions stored.","history.extraTabs.entry":"{date} by {user}"},fr:{"history.extraTabs.title":"Historique","history.extraTabs.loading":"Chargement en cours ...","history.extraTabs.header":"Ce document a {nRevisions} versions stockées.","history.extraTabs.entry":"{date} par {user}"}},g={key:0},x={key:1},v={key:2},T={class:"history-revision-cell"},k={class:"history-revision"},E=["href"],C=((n,t)=>{const i=n.__vccOpts||n;for(const[s,a]of t)i[s]=a;return i})(e.defineComponent({__name:"HistoryTab",setup(n){const{t}=b.useI18n({messages:f}),i=e.inject("cristal"),a=i.getContainer().get(h.name).getCurrentDocument(),o=e.ref([]),c=e.ref(!0);return e.onMounted(async()=>{a.value&&(o.value=await i.getContainer().get("PageRevisionManagerProvider").get().getRevisions(a.value)),c.value=!1}),(M,d)=>{const N=e.resolveComponent("i18n-t");return e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(t)("history.extraTabs.loading")),1)):(e.openBlock(),e.createElementBlock("p",x,e.toDisplayString(e.unref(t)("history.extraTabs.header",{nRevisions:o.value.length})),1)),d[1]||(d[1]=e.createElementVNode("br",null,null,-1)),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("table",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.version},[e.createElementVNode("td",T,[e.createElementVNode("span",k,e.toDisplayString(l.version),1)]),e.createElementVNode("td",null,[e.createVNode(N,{keypath:"history.extraTabs.entry",tag:"span"},{date:e.withCtx(()=>[e.createElementVNode("a",{href:l.url},e.toDisplayString(l.date.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})),9,E)]),user:e.withCtx(()=>[e.createVNode(e.unref(y.User),{user:l.user},null,8,["user"])]),_:2},1024),d[0]||(d[0]=e.createElementVNode("br",null,null,-1)),e.createTextVNode(" "+e.toDisplayString(l.comment),1)])]))),128))]))],64)}}}),[["__scopeId","data-v-4a4df957"]]);var S=Object.defineProperty,P=Object.getOwnPropertyDescriptor,B=(n,t,i,s)=>{for(var a=s>1?void 0:s?P(t,i):t,o=n.length-1,c;o>=0;o--)(c=n[o])&&(a=(s?c(t,i,a):c(a))||a);return s&&a&&S(t,i,a),a},w=(n,t)=>(i,s)=>t(i,s,n);let p=class extends _.AbstractExtraTab{constructor(n){super(f),this.pageRevisionManagerProvider=n,this.order=3e3,this.id="history",this.title=this.t("history.extraTabs.title")}async panel(){return C}async enabled(){return this.pageRevisionManagerProvider.has()}};p=B([u.injectable(),w(0,u.inject("PageRevisionManagerProvider"))],p);class V{constructor(t){t.bind("ExtraTab").to(p).inSingletonScope()}}r.ComponentInit=V,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
4
4
  //# sourceMappingURL=index.umd.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-history-ui",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -22,26 +22,26 @@
22
22
  },
23
23
  "main": "./dist/index.es.js",
24
24
  "dependencies": {
25
- "inversify": "6.2.1",
25
+ "inversify": "7.1.0",
26
26
  "vue": "3.5.13",
27
- "vue-i18n": "11.0.1",
27
+ "vue-i18n": "11.1.2",
28
28
  "vue-router": "4.5.0",
29
- "@xwiki/cristal-document-api": "0.14.0",
30
- "@xwiki/cristal-history-api": "0.14.0",
31
- "@xwiki/cristal-user-ui": "0.14.0",
32
- "@xwiki/cristal-api": "0.14.0",
33
- "@xwiki/cristal-extra-tabs-api": "0.14.0"
29
+ "@xwiki/cristal-api": "0.16.0",
30
+ "@xwiki/cristal-document-api": "0.16.0",
31
+ "@xwiki/cristal-extra-tabs-api": "0.16.0",
32
+ "@xwiki/cristal-history-api": "0.16.0",
33
+ "@xwiki/cristal-user-ui": "0.16.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "reflect-metadata": "0.2.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "reflect-metadata": "0.2.2",
40
- "typescript": "5.7.3",
41
- "vite": "6.0.11",
42
- "vue-tsc": "2.2.0",
43
- "@xwiki/cristal-dev-config": "0.14.0",
44
- "@xwiki/cristal-dsapi": "0.14.0"
40
+ "typescript": "5.8.2",
41
+ "vite": "6.2.2",
42
+ "vue-tsc": "2.2.8",
43
+ "@xwiki/cristal-dev-config": "0.16.0",
44
+ "@xwiki/cristal-dsapi": "0.16.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "vue-tsc --project tsconfig.json && vite build",