@stack-spot/portal-components 2.24.1 → 2.24.2

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.24.2](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.1...portal-components@v2.24.2) (2025-07-22)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Adds Secure attribute to cookies for HTTPS ([#1114](https://github.com/stack-spot/portal-commons/issues/1114)) ([18e06fb](https://github.com/stack-spot/portal-commons/commit/18e06fbe08b1c89e2d554295627298c4723c99c6))
9
+ * reviewing error messages in ai ([#1270](https://github.com/stack-spot/portal-commons/issues/1270)) ([5de8012](https://github.com/stack-spot/portal-commons/commit/5de8012538c22f0fd061233154619afcd4b589a5))
10
+
3
11
  ## [2.24.1](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.0...portal-components@v2.24.1) (2025-06-16)
4
12
 
5
13
 
@@ -72,41 +72,39 @@ export const ErrorFeedback = ({ code = 0, message, debug, title, body, image, ac
72
72
  const dictionary = {
73
73
  en: {
74
74
  altLogo: 'Logo Stackspot',
75
- '0.title': 'Unknown client error',
76
- '0.description': 'An unknown error happened while trying to load the resource.',
77
- '0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
78
- '401.title': 'Not authorized',
79
- '401.description': 'There was a failure loading credentials for this page.',
80
- '401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
81
- '403.title': 'Private access',
82
- '403.description': 'The page you have tried to visit is private.',
83
- '403.help': 'Log in with another account or request access from the person who manages your organization.',
84
- '404.title': 'Resource not found',
85
- '404.description': 'This resource no longer exists.',
86
- '404.help': 'Please try again or request a new URL from the person who manages your organization.',
87
- '500.title': 'Server error',
88
- '500.description': "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
89
- '500.help': 'Please try again after a few minutes.',
75
+ '0.title': 'Something didn’t go as expected',
76
+ '0.description': 'This can happen from time to time.',
77
+ '0.help': 'Try refreshing the page. If it still doesnt work, reach out. We’re here to help.',
78
+ '401.title': 'Erro 401. You need a valid credential',
79
+ '401.description': 'We couldn’t verify your credentials.',
80
+ '401.help': 'Check the link or log in with a different account to continue.',
81
+ '403.title': '403. Access restricted to your organization',
82
+ '403.help': 'Log in with an account from your organization or request access from your Account Holder.',
83
+ '404.title': 'Error 404. This resource is no longer available',
84
+ '404.description': 'It may have been moved or removed.',
85
+ '404.help': 'You can try again or ask your organization’s Account Holder for a new link.',
86
+ '500.title': 'Error 500. We\'re making some adjustments',
87
+ '500.description': 'Something unexpected happened on our side. It might just be a momentary glitch.',
88
+ '500.help': 'Try refreshing later to pick up where you left off.',
90
89
  showDetails: 'Show Details',
91
90
  hideDetails: 'Hide Details',
92
91
  },
93
92
  pt: {
94
93
  altLogo: 'Logo Stackspot',
95
- '0.title': 'Erro desconhecido (cliente)',
96
- '0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
97
- '0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
98
- '401.title': 'Não autorizado',
99
- '401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
100
- '401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
101
- '403.title': 'Acesso privado',
102
- '403.description': '"A página que você tentou visualizar é particular."',
103
- '403.help': 'Solicite acesso com o administrador da sua organização.',
104
- '404.title': 'Recurso não encontrado',
105
- '404.description': 'Este recurso não existe mais.',
106
- '404.help': 'Tente novamente ou fale com o administrador da sua organização.',
107
- '500.title': 'Erro ao exibir o recurso',
108
- '500.description': 'Mas não se preocupe, estamos investigando o que aconteceu.',
109
- '500.help': 'Tente novamente após alguns minutos.',
94
+ '0.title': 'Algo saiu diferente do esperado',
95
+ '0.description': 'Isso pode acontecer de vez em quando.',
96
+ '0.help': 'Tente recarregar a página. Se ainda não funcionar, chama a gente. Estamos por aqui para ajudar.',
97
+ '401.title': 'Erro 401. Você precisa de uma credencial válida',
98
+ '401.description': 'Não conseguimos confirmar suas credenciais.',
99
+ '401.help': 'Verifique o link ou faça login com outra conta para continuar.',
100
+ '403.title': 'Erro 403. Acesso exclusivo da sua organização',
101
+ '403.help': 'Faça login com uma conta da sua organização ou peça acesso ao Account Holder.',
102
+ '404.title': 'Erro 404. Este recurso não está mais disponível',
103
+ '404.description': 'Ele pode ter sido movido ou removido.',
104
+ '404.help': 'Você pode tentar de novo ou pedir um novo link ao Account Holder da sua organização.',
105
+ '500.title': 'Erro 500. Estamos ajustando o sistema',
106
+ '500.description': 'Algo inesperado aconteceu do nosso lado. Pode ser só por alguns instantes.',
107
+ '500.help': 'Tente recarregar mais tarde para continuar de onde parou.',
110
108
  showDetails: 'Ver Detalhes',
111
109
  hideDetails: 'Esconder Detalhes',
112
110
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFeedback.js","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,UAAU,GAAwB;IACtC,KAAK,EAAE,OAAO;IACd,MAAM,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UAAU,EAAE,gEAAgE;QAC5E,WAAW,EAAE,+CAA+C;QAC5D,UAAU,EAAE,+EAA+E;QAC3F,WAAW,EAAE,iDAAiD;QAC9D,iBAAiB,EAAE,uCAAuC;QAC1D,UAAU,EAAE,sFAAsF;QAClG,WAAW,EAAE,uCAAuC;QACpD,iBAAiB,EAAE,4EAA4E;QAC/F,UAAU,EAAE,2DAA2D;QACvE,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,mBAAmB;KACjC;CACmB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,QAI/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,WAG9B;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,QAGlG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,QAGvC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,sBAEpC"}
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,QAQ/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,WAG9B;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,QAGlG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,QAGvC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,sBAEpC"}
@@ -10,6 +10,10 @@ export function setupCookies(domainRegex) {
10
10
  const portalUrl = new URL(location.href);
11
11
  cookieDomain = domainRegex.exec(portalUrl.host)?.[0] ?? '';
12
12
  cookieAttributes = { domain: cookieDomain, SameSite: 'Strict' };
13
+ // Add Secure attribute if using HTTPS
14
+ if (portalUrl.protocol === 'https:') {
15
+ cookieAttributes['Secure'] = '';
16
+ }
13
17
  }
14
18
  /**
15
19
  * Retrieves the current domain used for cookies. To change the domain, use `setupCookies(domainRegex)`.
@@ -42,7 +46,7 @@ export function getCookies() {
42
46
  export function setCookie(key, value, customAttributes = {}) {
43
47
  if (isEmpty(cookieAttributes))
44
48
  setupCookies(DEFAULT_DOMAIN_REGEX);
45
- document.cookie = `${key}=${value}; ${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`;
49
+ document.cookie = `${key}=${value};${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`;
46
50
  }
47
51
  /**
48
52
  * Removes a cookie.
@@ -51,7 +55,7 @@ export function setCookie(key, value, customAttributes = {}) {
51
55
  export function removeCookie(key) {
52
56
  if (isEmpty(cookieAttributes))
53
57
  setupCookies(DEFAULT_DOMAIN_REGEX);
54
- document.cookie = `${key}= ; ${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`;
58
+ document.cookie = `${key}=;${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`;
55
59
  }
56
60
  /**
57
61
  * Retrieves the value of a cookie given its key/name.
@@ -61,5 +65,5 @@ export function removeCookie(key) {
61
65
  export function getCookie(key) {
62
66
  return getCookies()[key];
63
67
  }
64
- const objectToCookieString = (object) => Object.entries(object).reduce((prev, current) => `${prev} ${current[0]}=${current[1]};`, '');
68
+ const objectToCookieString = (object) => Object.entries(object).reduce((prev, [k, v]) => `${prev} ${k}${v !== '' ? `=${v}` : ''};`, '').trim();
65
69
  //# sourceMappingURL=cookie.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,MAAM,oBAAoB,GAAG,IAAI,MAAM,CAAC,6CAA6C,CAAC,CAAA;AACtF,IAAI,YAAY,GAAG,EAAE,CAAA;AACrB,IAAI,gBAAgB,GAA2B,EAAE,CAAA;AAEjD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACxC,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC1D,gBAAgB,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAAE,YAAY,CAAC,oBAAoB,CAAC,CAAA;IACjE,OAAO,YAAY,CAAA;AACrB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU;IACxB,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAAE,YAAY,CAAC,oBAAoB,CAAC,CAAA;IACjE,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE;QAC5D,MAAM,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,OAAO,CA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AE,EAA4B,CAAC,CAAA;AAClC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,KAAa,EAAE,mBAA2C,EAAE;IACjG,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAAE,YAAY,CAAC,oBAAoB,CAAC,CAAA;IACjE,QAAQ,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,KAAK,IAAI,oBAAoB,CAAC,EAAE,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAAC,EAAE,CAAA;AAC3G,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAAE,YAAY,CAAC,oBAAoB,CAAC,CAAA;IACjE,QAAQ,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,oBAAoB,CAAC,EAAE,GAAG,gBAAgB,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC,EAAE,CAAA;AACxH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC;AAED,MAAM,oBAAoB,GAAG,CAAC,MAA8B,EAAU,EAAE,CACtE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-components",
3
- "version": "2.24.1",
3
+ "version": "2.24.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -174,42 +174,40 @@ export const ErrorFeedback = (
174
174
  const dictionary = {
175
175
  en: {
176
176
  altLogo: 'Logo Stackspot',
177
- '0.title': 'Unknown client error',
178
- '0.description': 'An unknown error happened while trying to load the resource.',
179
- '0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
180
- '401.title': 'Not authorized',
181
- '401.description': 'There was a failure loading credentials for this page.',
182
- '401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
183
- '403.title': 'Private access',
184
- '403.description': 'The page you have tried to visit is private.',
185
- '403.help': 'Log in with another account or request access from the person who manages your organization.',
186
- '404.title': 'Resource not found',
187
- '404.description': 'This resource no longer exists.',
188
- '404.help': 'Please try again or request a new URL from the person who manages your organization.',
189
- '500.title': 'Server error',
177
+ '0.title': 'Something didn’t go as expected',
178
+ '0.description': 'This can happen from time to time.',
179
+ '0.help': 'Try refreshing the page. If it still doesnt work, reach out. We’re here to help.',
180
+ '401.title': 'Erro 401. You need a valid credential',
181
+ '401.description': 'We couldn’t verify your credentials.',
182
+ '401.help': 'Check the link or log in with a different account to continue.',
183
+ '403.title': '403. Access restricted to your organization',
184
+ '403.help': 'Log in with an account from your organization or request access from your Account Holder.',
185
+ '404.title': 'Error 404. This resource is no longer available',
186
+ '404.description': 'It may have been moved or removed.',
187
+ '404.help': 'You can try again or ask your organization’s Account Holder for a new link.',
188
+ '500.title': 'Error 500. We\'re making some adjustments',
190
189
  '500.description':
191
- "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
192
- '500.help': 'Please try again after a few minutes.',
190
+ 'Something unexpected happened on our side. It might just be a momentary glitch.',
191
+ '500.help': 'Try refreshing later to pick up where you left off.',
193
192
  showDetails: 'Show Details',
194
193
  hideDetails: 'Hide Details',
195
194
  },
196
195
  pt: {
197
196
  altLogo: 'Logo Stackspot',
198
- '0.title': 'Erro desconhecido (cliente)',
199
- '0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
200
- '0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
201
- '401.title': 'Não autorizado',
202
- '401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
203
- '401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
204
- '403.title': 'Acesso privado',
205
- '403.description': '"A página que você tentou visualizar é particular."',
206
- '403.help': 'Solicite acesso com o administrador da sua organização.',
207
- '404.title': 'Recurso não encontrado',
208
- '404.description': 'Este recurso não existe mais.',
209
- '404.help': 'Tente novamente ou fale com o administrador da sua organização.',
210
- '500.title': 'Erro ao exibir o recurso',
211
- '500.description': 'Mas não se preocupe, estamos investigando o que aconteceu.',
212
- '500.help': 'Tente novamente após alguns minutos.',
197
+ '0.title': 'Algo saiu diferente do esperado',
198
+ '0.description': 'Isso pode acontecer de vez em quando.',
199
+ '0.help': 'Tente recarregar a página. Se ainda não funcionar, chama a gente. Estamos por aqui para ajudar.',
200
+ '401.title': 'Erro 401. Você precisa de uma credencial válida',
201
+ '401.description': 'Não conseguimos confirmar suas credenciais.',
202
+ '401.help': 'Verifique o link ou faça login com outra conta para continuar.',
203
+ '403.title': 'Erro 403. Acesso exclusivo da sua organização',
204
+ '403.help': 'Faça login com uma conta da sua organização ou peça acesso ao Account Holder.',
205
+ '404.title': 'Erro 404. Este recurso não está mais disponível',
206
+ '404.description': 'Ele pode ter sido movido ou removido.',
207
+ '404.help': 'Você pode tentar de novo ou pedir um novo link ao Account Holder da sua organização.',
208
+ '500.title': 'Erro 500. Estamos ajustando o sistema',
209
+ '500.description': 'Algo inesperado aconteceu do nosso lado. Pode ser só por alguns instantes.',
210
+ '500.help': 'Tente recarregar mais tarde para continuar de onde parou.',
213
211
  showDetails: 'Ver Detalhes',
214
212
  hideDetails: 'Esconder Detalhes',
215
213
  },
@@ -12,6 +12,10 @@ export function setupCookies(domainRegex: RegExp) {
12
12
  const portalUrl = new URL(location.href)
13
13
  cookieDomain = domainRegex.exec(portalUrl.host)?.[0] ?? ''
14
14
  cookieAttributes = { domain: cookieDomain, SameSite: 'Strict' }
15
+ // Add Secure attribute if using HTTPS
16
+ if (portalUrl.protocol === 'https:') {
17
+ cookieAttributes['Secure'] = ''
18
+ }
15
19
  }
16
20
 
17
21
  /**
@@ -44,7 +48,7 @@ export function getCookies(): Record<string, string | undefined> {
44
48
  */
45
49
  export function setCookie(key: string, value: string, customAttributes: Record<string, string> = {}) {
46
50
  if (isEmpty(cookieAttributes)) setupCookies(DEFAULT_DOMAIN_REGEX)
47
- document.cookie = `${key}=${value}; ${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`
51
+ document.cookie = `${key}=${value};${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`
48
52
  }
49
53
 
50
54
  /**
@@ -53,7 +57,7 @@ export function setCookie(key: string, value: string, customAttributes: Record<s
53
57
  */
54
58
  export function removeCookie(key: string) {
55
59
  if (isEmpty(cookieAttributes)) setupCookies(DEFAULT_DOMAIN_REGEX)
56
- document.cookie = `${key}= ; ${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`
60
+ document.cookie = `${key}=;${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`
57
61
  }
58
62
 
59
63
  /**
@@ -65,4 +69,5 @@ export function getCookie(key: string) {
65
69
  return getCookies()[key]
66
70
  }
67
71
 
68
- const objectToCookieString = (object: Record<string, string>): string => Object.entries(object).reduce((prev, current) => `${prev} ${current[0]}=${current[1]};`, '')
72
+ const objectToCookieString = (object: Record<string, string>): string =>
73
+ Object.entries(object).reduce((prev, [k, v]) => `${prev} ${k}${v !== '' ? `=${v}` : ''};`, '').trim()