@xwiki/cristal-user-ui 0.21.1 → 0.22.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,12 +1,15 @@
1
1
  # @xwiki/cristal-user-ui
2
2
 
3
- ## 0.21.1
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.22 Release
4
8
 
5
9
  ### Patch Changes
6
10
 
7
- - Cristal 0.21.1 Release
8
11
  - Updated dependencies
9
- - @xwiki/cristal-authentication-api@0.21.1
12
+ - @xwiki/cristal-authentication-api@0.22.0
10
13
 
11
14
  ## 0.21.0
12
15
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../api-extractor.json"
4
+ }
package/dist/index.d.cts CHANGED
@@ -1,2 +1,29 @@
1
- import { default as User } from './vue/CUser.vue';
2
- export { User };
1
+ /**
2
+ * See the LICENSE file distributed with this work for additional
3
+ * information regarding copyright ownership.
4
+ *
5
+ * This is free software; you can redistribute it and/or modify it
6
+ * under the terms of the GNU Lesser General Public License as
7
+ * published by the Free Software Foundation; either version 2.1 of
8
+ * the License, or (at your option) any later version.
9
+ *
10
+ * This software is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this software; if not, write to the Free
17
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
+ */
20
+ /**
21
+ * @since 0.12
22
+ * @beta
23
+ */
24
+ declare const UserAnnotated: import('vue').DefineComponent<{
25
+ user: import('@xwiki/cristal-authentication-api').UserDetails;
26
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
27
+ user: import('@xwiki/cristal-authentication-api').UserDetails;
28
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ export { UserAnnotated as User };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,29 @@
1
- import { default as User } from './vue/CUser.vue';
2
- export { User };
1
+ /**
2
+ * See the LICENSE file distributed with this work for additional
3
+ * information regarding copyright ownership.
4
+ *
5
+ * This is free software; you can redistribute it and/or modify it
6
+ * under the terms of the GNU Lesser General Public License as
7
+ * published by the Free Software Foundation; either version 2.1 of
8
+ * the License, or (at your option) any later version.
9
+ *
10
+ * This software is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this software; if not, write to the Free
17
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
+ */
20
+ /**
21
+ * @since 0.12
22
+ * @beta
23
+ */
24
+ declare const UserAnnotated: import('vue').DefineComponent<{
25
+ user: import('@xwiki/cristal-authentication-api').UserDetails;
26
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
27
+ user: import('@xwiki/cristal-authentication-api').UserDetails;
28
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ export { UserAnnotated as User };
package/dist/index.es.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as n, createElementBlock as r, openBlock as s, toDisplayString as o } from "vue";
2
- const p = ["href"], t = { key: 1 }, u = /* @__PURE__ */ n({
2
+ const t = ["href"], p = { key: 1 }, a = /* @__PURE__ */ n({
3
3
  __name: "CUser",
4
4
  props: {
5
5
  user: {}
6
6
  },
7
- setup(a) {
8
- return (e, i) => e.user.profile ? (s(), r("a", {
7
+ setup(i) {
8
+ return (e, m) => e.user.profile ? (s(), r("a", {
9
9
  key: 0,
10
10
  href: e.user.profile
11
- }, o(e.user.name), 9, p)) : (s(), r("span", t, o(e.user.name), 1));
11
+ }, o(e.user.name), 9, t)) : (s(), r("span", p, o(e.user.name), 1));
12
12
  }
13
- });
13
+ }), _ = a;
14
14
  export {
15
- u as User
15
+ _ as User
16
16
  };
17
17
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/vue/CUser.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\n// For now this component is mostly useful to centralize user display use. Several ways to display user or users must be\n// provided over time, and more adapted to the design systems.\nimport { UserDetails } from \"@xwiki/cristal-authentication-api\";\n\ndefineProps<{ user: UserDetails }>();\n</script>\n\n<template>\n <a v-if=\"user.profile\" :href=\"user.profile\">\n {{ user.name }}\n </a>\n <span v-else>{{ user.name }}</span>\n</template>\n\n<style scoped></style>\n"],"names":["user","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString"],"mappings":";;;;;;;qBA4BWA,EAAAA,KAAK,gBAAdC,EAEI,KAAA;AAAA;MAFoB,MAAMD,EAAAA,KAAK;AAAA,IAAA,GAC9BA,EAAAA,EAAAA,KAAK,IAAI,GAAA,GAAAE,CAAA,WAEdD,EAAmC,QAAAE,GAAAC,EAAnBJ,EAAAA,KAAK,IAAI,GAAA,CAAA;AAAA;;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/vue/CUser.vue","../src/index.ts"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\n// For now this component is mostly useful to centralize user display use. Several ways to display user or users must be\n// provided over time, and more adapted to the design systems.\nimport type { UserDetails } from \"@xwiki/cristal-authentication-api\";\n\ndefineProps<{ user: UserDetails }>();\n</script>\n\n<template>\n <a v-if=\"user.profile\" :href=\"user.profile\">\n {{ user.name }}\n </a>\n <span v-else>{{ user.name }}</span>\n</template>\n\n<style scoped></style>\n","/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport User from \"./vue/CUser.vue\";\n\n/**\n * @since 0.12\n * @beta\n */\nconst UserAnnotated = User;\n\nexport { UserAnnotated as User };\n"],"names":["user","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString","UserAnnotated","User"],"mappings":";;;;;;;qBA4BWA,EAAAA,KAAK,gBAAdC,EAEI,KAAA;AAAA;MAFoB,MAAMD,EAAAA,KAAK;AAAA,IAAA,GAC9BA,EAAAA,EAAAA,KAAK,IAAI,GAAA,GAAAE,CAAA,WAEdD,EAAmC,QAAAE,GAAAC,EAAnBJ,EAAAA,KAAK,IAAI,GAAA,CAAA;AAAA;ICLrBK,IAAgBC;"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["cristal_user-ui"]={},n.Vue))})(this,function(n,e){"use strict";const t=["href"],r={key:1},s=e.defineComponent({__name:"CUser",props:{user:{}},setup(i){return(o,p)=>o.user.profile?(e.openBlock(),e.createElementBlock("a",{key:0,href:o.user.profile},e.toDisplayString(o.user.name),9,t)):(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(o.user.name),1))}});n.User=s,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["cristal_user-ui"]={},n.Vue))})(this,(function(n,e){"use strict";const t=["href"],s={key:1},r=e.defineComponent({__name:"CUser",props:{user:{}},setup(p){return(o,f)=>o.user.profile?(e.openBlock(),e.createElementBlock("a",{key:0,href:o.user.profile},e.toDisplayString(o.user.name),9,t)):(e.openBlock(),e.createElementBlock("span",s,e.toDisplayString(o.user.name),1))}});n.User=r,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/vue/CUser.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\n// For now this component is mostly useful to centralize user display use. Several ways to display user or users must be\n// provided over time, and more adapted to the design systems.\nimport { UserDetails } from \"@xwiki/cristal-authentication-api\";\n\ndefineProps<{ user: UserDetails }>();\n</script>\n\n<template>\n <a v-if=\"user.profile\" :href=\"user.profile\">\n {{ user.name }}\n </a>\n <span v-else>{{ user.name }}</span>\n</template>\n\n<style scoped></style>\n"],"names":["user","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString"],"mappings":"4WA4BWA,EAAAA,KAAK,uBAAdC,EAAAA,mBAEI,IAAA,OAFoB,KAAMD,EAAAA,KAAK,OAAA,EAC9BA,EAAAA,gBAAAA,EAAAA,KAAK,IAAI,EAAA,EAAAE,CAAA,kBAEdD,EAAAA,mBAAmC,OAAAE,EAAAC,kBAAnBJ,EAAAA,KAAK,IAAI,EAAA,CAAA"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/index.ts","../src/vue/CUser.vue"],"sourcesContent":["/**\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport User from \"./vue/CUser.vue\";\n\n/**\n * @since 0.12\n * @beta\n */\nconst UserAnnotated = User;\n\nexport { UserAnnotated as User };\n","<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\n// For now this component is mostly useful to centralize user display use. Several ways to display user or users must be\n// provided over time, and more adapted to the design systems.\nimport type { UserDetails } from \"@xwiki/cristal-authentication-api\";\n\ndefineProps<{ user: UserDetails }>();\n</script>\n\n<template>\n <a v-if=\"user.profile\" :href=\"user.profile\">\n {{ user.name }}\n </a>\n <span v-else>{{ user.name }}</span>\n</template>\n\n<style scoped></style>\n"],"names":["UserAnnotated","user","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString"],"mappings":"mSA0BMA,0ECEKC,EAAAA,KAAK,uBAAdC,EAAAA,mBAEI,IAAA,OAFoB,KAAMD,EAAAA,KAAK,OAAA,EAC9BA,EAAAA,gBAAAA,EAAAA,KAAK,IAAI,EAAA,EAAAE,CAAA,kBAEdD,EAAAA,mBAAmC,OAAAE,EAAAC,kBAAnBJ,EAAAA,KAAK,IAAI,EAAA,CAAA"}
@@ -0,0 +1,22 @@
1
+ ## API Report File for "@xwiki/cristal-user-ui"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { ComponentOptionsMixin } from 'vue';
8
+ import { ComponentProvideOptions } from 'vue';
9
+ import { DefineComponent } from 'vue';
10
+ import { PublicProps } from 'vue';
11
+ import { UserDetails } from '@xwiki/cristal-authentication-api';
12
+
13
+ // @beta (undocumented)
14
+ export const User: DefineComponent< {
15
+ user: UserDetails;
16
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
17
+ user: UserDetails;
18
+ }> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
19
+
20
+ // (No @packageDocumentation comment for this package)
21
+
22
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-user-ui",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -26,8 +26,9 @@
26
26
  }
27
27
  },
28
28
  "main": "./dist/index.es.js",
29
+ "types": "./dist/index.d.ts",
29
30
  "dependencies": {
30
- "@xwiki/cristal-authentication-api": "0.21.1"
31
+ "@xwiki/cristal-authentication-api": "0.22.0"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "reflect-metadata": "0.x",
@@ -35,16 +36,17 @@
35
36
  },
36
37
  "devDependencies": {
37
38
  "typescript": "5.9.2",
38
- "vite": "7.0.6",
39
- "vue": "3.5.18",
39
+ "vite": "7.1.5",
40
+ "vue": "3.5.20",
40
41
  "vue-tsc": "2.2.12",
41
- "@xwiki/cristal-dev-config": "0.21.1"
42
+ "@xwiki/cristal-dev-config": "0.22.0"
42
43
  },
43
44
  "scripts": {
44
- "build": "vue-tsc --project tsconfig.json && vite build",
45
+ "api-extractor:local": "api-extractor run --local",
46
+ "build": "vite build",
45
47
  "clean": "rimraf dist",
46
48
  "lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
47
- "test": "vitest --run"
48
- },
49
- "types": "./dist/index.d.ts"
49
+ "test": "vitest --run",
50
+ "typecheck": "vue-tsc"
51
+ }
50
52
  }
package/src/index.ts CHANGED
@@ -20,4 +20,10 @@
20
20
 
21
21
  import User from "./vue/CUser.vue";
22
22
 
23
- export { User };
23
+ /**
24
+ * @since 0.12
25
+ * @beta
26
+ */
27
+ const UserAnnotated = User;
28
+
29
+ export { UserAnnotated as User };
package/src/vue/CUser.vue CHANGED
@@ -20,7 +20,7 @@
20
20
  <script lang="ts" setup>
21
21
  // For now this component is mostly useful to centralize user display use. Several ways to display user or users must be
22
22
  // provided over time, and more adapted to the design systems.
23
- import { UserDetails } from "@xwiki/cristal-authentication-api";
23
+ import type { UserDetails } from "@xwiki/cristal-authentication-api";
24
24
 
25
25
  defineProps<{ user: UserDetails }>();
26
26
  </script>
package/tsdoc.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
3
+ "extends": ["../../../tsdoc.json"]
4
+ }
package/vitest.config.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  */
20
20
 
21
21
  import localConfig from "./vite.config";
22
+ import { vitestVue as defaultConfig } from "@xwiki/cristal-dev-config";
22
23
  import { mergeConfig } from "vitest/config";
23
- import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";
24
24
 
25
25
  export default mergeConfig(defaultConfig, localConfig);