cozy-sharing 26.6.1 → 26.7.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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [26.7.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@26.6.2...cozy-sharing@26.7.0) (2025-10-28)
7
+
8
+ ### Features
9
+
10
+ - Change signup link in public banner :sparkles: ([52c7dc0](https://github.com/cozy/cozy-libs/commit/52c7dc000b9455164a2d977de8aa64c6dd7cc41c))
11
+
12
+ ## [26.6.2](https://github.com/cozy/cozy-libs/compare/cozy-sharing@26.6.1...cozy-sharing@26.6.2) (2025-10-20)
13
+
14
+ ### Bug Fixes
15
+
16
+ - Bind fetchAllSharings before state init in SharingProvider 🐛 ([df12219](https://github.com/cozy/cozy-libs/commit/df12219852b473867e37788e74b442c792060cc8))
17
+
6
18
  ## [26.6.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@26.6.0...cozy-sharing@26.6.1) (2025-10-15)
7
19
 
8
20
  ### Bug Fixes
@@ -585,6 +585,7 @@ export var SharingProvider = /*#__PURE__*/function (_Component) {
585
585
 
586
586
  var onShared = props.onShared || function () {};
587
587
 
588
+ _this2.fetchAllSharings = _this2.fetchAllSharings.bind(_this2);
588
589
  _this2.state = {
589
590
  byDocId: {},
590
591
  sharings: [],
@@ -648,7 +649,6 @@ export var SharingProvider = /*#__PURE__*/function (_Component) {
648
649
  var _client = props.client;
649
650
  _this2.sharingCol = _client.collection(SHARING_DOCTYPE);
650
651
  _this2.permissionCol = _client.collection(PERMISSION_DOCTYPE);
651
- _this2.fetchAllSharings = _this2.fetchAllSharings.bind(_this2);
652
652
  return _this2;
653
653
  }
654
654
 
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
  import snarkdown from 'snarkdown';
5
5
  import { useClient } from 'cozy-client';
6
+ import flag from 'cozy-flags';
6
7
  import Banner from 'cozy-ui/transpiled/react/Banner';
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons';
8
9
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
@@ -10,7 +11,6 @@ import CozyHomeLinkIcon from './CozyHomeLinkIcon';
10
11
  var styles = {
11
12
  "bannermarkdown": "publicBanner__bannermarkdown___1dR1E"
12
13
  };
13
- var HOME_LINK_HREF = 'https://manager.cozycloud.cc/cozy/create';
14
14
 
15
15
  var getPublicNameFromSharing = function getPublicNameFromSharing(sharing) {
16
16
  return sharing.attributes.members[0].public_name;
@@ -122,6 +122,7 @@ var SharingBannerByLink = function SharingBannerByLink(_ref3) {
122
122
  var _useI18n4 = useI18n(),
123
123
  t = _useI18n4.t;
124
124
 
125
+ var HOME_LINK_HREF = flag('signup.url');
125
126
  return /*#__PURE__*/React.createElement(Banner, {
126
127
  bgcolor: "var(--defaultBackgroundColor)",
127
128
  text: /*#__PURE__*/React.createElement(SharingBannerByLinkText, null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "26.6.1",
3
+ "version": "26.7.0",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -79,5 +79,5 @@
79
79
  "sideEffects": [
80
80
  "*.css"
81
81
  ],
82
- "gitHead": "94812ab94b4a3a279eda58ec1e225b4691c904b1"
82
+ "gitHead": "158085847b8f55dc52daf39fe0cc4f56bab6d958"
83
83
  }
@@ -54,6 +54,8 @@ export class SharingProvider extends Component {
54
54
  const instanceUri = props.client.getStackClient().uri
55
55
  const documentType = props.documentType || 'Document'
56
56
  const onShared = props.onShared || (() => {})
57
+
58
+ this.fetchAllSharings = this.fetchAllSharings.bind(this)
57
59
  this.state = {
58
60
  byDocId: {},
59
61
  sharings: [],
@@ -98,8 +100,6 @@ export class SharingProvider extends Component {
98
100
  const { client } = props
99
101
  this.sharingCol = client.collection(SHARING_DOCTYPE)
100
102
  this.permissionCol = client.collection(PERMISSION_DOCTYPE)
101
-
102
- this.fetchAllSharings = this.fetchAllSharings.bind(this)
103
103
  }
104
104
 
105
105
  dispatch = action =>
@@ -3,6 +3,7 @@ import React from 'react'
3
3
  import snarkdown from 'snarkdown'
4
4
 
5
5
  import { useClient } from 'cozy-client'
6
+ import flag from 'cozy-flags'
6
7
  import Banner from 'cozy-ui/transpiled/react/Banner'
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons'
8
9
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
@@ -10,8 +11,6 @@ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
10
11
  import CozyHomeLinkIcon from './CozyHomeLinkIcon'
11
12
  import styles from '../../../styles/publicBanner.styl'
12
13
 
13
- const HOME_LINK_HREF = 'https://manager.cozycloud.cc/cozy/create'
14
-
15
14
  const getPublicNameFromSharing = sharing =>
16
15
  sharing.attributes.members[0].public_name
17
16
 
@@ -112,6 +111,9 @@ const SharingBannerByLinkText = () => {
112
111
 
113
112
  const SharingBannerByLink = ({ onClose }) => {
114
113
  const { t } = useI18n()
114
+
115
+ const HOME_LINK_HREF = flag('signup.url')
116
+
115
117
  return (
116
118
  <Banner
117
119
  bgcolor="var(--defaultBackgroundColor)"