-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chatbot/sessions-list
- Loading branch information
Showing
96 changed files
with
2,313 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Set font size to be 16px on bold and italic sections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": minor | ||
--- | ||
|
||
Add links to headings created with CKEditor in the in-page menu of Tutorial pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"strapi-cms": minor | ||
--- | ||
|
||
Add product to ApiData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Add padding and margin to mobile version in ecosystem cards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"nextjs-website": minor | ||
"storybook-app": minor | ||
--- | ||
|
||
Add chatbot history list component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"strapi-cms": patch | ||
--- | ||
|
||
Require all entries with a slug field to have it unique |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Add margin bottom to block content images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Add wordwrap break word to links |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Fix product layout path for Api page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"nextjs-website": minor | ||
"storybook-app": minor | ||
--- | ||
|
||
Add chatobot layout component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": minor | ||
--- | ||
|
||
Add structured data to alla pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": minor | ||
--- | ||
|
||
Guest chatbot message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"nextjs-website": minor | ||
"storybook-app": minor | ||
--- | ||
|
||
Add chatbot chat history detail layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Remove input text and history button if user not logged in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Fix ecosystem and card grid for correct card box shadows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"strapi-cms": patch | ||
--- | ||
|
||
Remove unique validator from api rest detail component because of strapi bug https://github.com/strapi/strapi/issues/12541 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"nextjs-website": patch | ||
--- | ||
|
||
Add api title to breadcrumbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
apps/nextjs-website/public/icons/chatbotChatUserBorder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions
43
apps/nextjs-website/src/__tests__/helpers/anchor.helpers.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { generateIdFromString } from '@/helpers/anchor.helpers'; | ||
|
||
describe('generateIdFromString', () => { | ||
it('should return an empty string when id is undefined', () => { | ||
const result = generateIdFromString(undefined); | ||
expect(result).toBe(''); | ||
}); | ||
|
||
it('should trim, lowercase, and replace spaces with hyphens', () => { | ||
const result = generateIdFromString(' Test String '); | ||
expect(result).toBe('test-string'); | ||
}); | ||
|
||
it('should remove accents and special characters @#', () => { | ||
const result = generateIdFromString('Éxámplé String!@#!@#$%^&*()_+'); | ||
expect(result).toBe('example-string!!$%^&*()_'); | ||
}); | ||
|
||
it('should not modify an already normalized string', () => { | ||
const result = generateIdFromString('simple-string'); | ||
expect(result).toBe('simple-string'); | ||
}); | ||
|
||
it('should handle numbers correctly', () => { | ||
const result = generateIdFromString('12345 test'); | ||
expect(result).toBe('12345-test'); | ||
}); | ||
|
||
it('should remove invalid characters but keep punctuation', () => { | ||
const result = generateIdFromString('This is valid?!'); | ||
expect(result).toBe('this-is-valid?!'); | ||
}); | ||
|
||
it('should handle strings with multiple spaces', () => { | ||
const result = generateIdFromString('Test multiple spaces'); | ||
expect(result).toBe('test-multiple-spaces'); | ||
}); | ||
|
||
it('should handle strings with only spaces', () => { | ||
const result = generateIdFromString(' '); | ||
expect(result).toBe(''); | ||
}); | ||
}); |
45 changes: 45 additions & 0 deletions
45
apps/nextjs-website/src/__tests__/helpers/parseCkEditorContent.helpers.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { parseCkEditorContent } from '@/helpers/parseCkEditorContent.helpers'; | ||
|
||
describe('parseCkEditorContent', () => { | ||
it('should correctly parse content and generate menu items', () => { | ||
const content = `<h1>titolo h1</h1><h2>Éxámplé String!@#!@#$%^&*()_+</h2><h3>titolo h3</h3><h4>titolo h4</h4><p><strong>titolo h5</strong></p><p><i>titolo h6</i></p><h2>Un esempio: la TARI</h2><p>Nella tabella che segue trovi un esempio sbagliato, con un numero inutilmente elevato di servizi relativi alla TARI:</p><figure class="table"><table><thead><tr><th><strong>SERVIZIO</strong></th><th><strong>MESSAGGIO</strong></th></tr></thead><tbody><tr><td>❌ TRIBUTI - TARI - Notifica sollecito</td><td>Notifica sollecito TARI</td></tr><tr><td>❌ TRIBUTI - TARI - Notifica provvedimento ordinario</td><td>Notifica provvedimento ordinario TARI</td></tr><tr><td>❌ TRIBUTI - TARI - Notifica provvedimento sanzionatorio</td><td>Notifica provvedimento sanzionatorio TARI</td></tr></tbody></table></figure><p>In realtà, <strong>l’unico servizio è la TARI</strong>, e <strong>da questo unico servizio dovrai inviare tutti i messaggi relativi al suo ciclo di vita</strong>, come ad esempio:</p><ul><li>inviare un messaggio informativo che ricorda ai destinatari che è il momento di fare la dichiarazione di occupazione, nel caso in cui debbano farla;</li><li>inviare uno o più messaggi sullo stato della richiesta di occupazione;<ul><li>inviare un messaggio con l'avviso di pagamento;</li></ul></li><li>inviare promemoria in prossimità della scadenza di un pagamento. daFAFDV</li></ul><blockquote><p>quote dei quote</p></blockquote>`; | ||
|
||
const result = parseCkEditorContent(content); | ||
|
||
// Test the parsedContent | ||
expect(result.parsedContent).toContain('titolo h1'); // Check if a h1 heading is present | ||
expect(result.parsedContent).toContain('Éxámplé String!@#!@#$%^&*()_+'); // Check if a h2 heading is present | ||
expect(result.parsedContent).toContain( | ||
`id="ckeditor-example-string!!$%^&*()_"` | ||
); // Check if IDs are added correctly around a h2 heading | ||
expect(result.parsedContent).toContain( | ||
`<div class="menuAnchor" id="ckeditor-example-string!!$%^&*()_"><h2>Éxámplé String!@#!@#$%^&*()_+</h2></div>` | ||
); // Check if IDs are added correctly around a h2 heading | ||
|
||
// Test the menuItems array | ||
expect(result.menuItems).toEqual([ | ||
{ | ||
title: 'Éxámplé String!@#!@#$%^&*()_+', | ||
href: '#ckeditor-example-string!!$%^&*()_', | ||
level: 2, | ||
}, | ||
{ title: 'titolo h3', href: '#ckeditor-titolo-h3', level: 3 }, | ||
{ | ||
title: 'Un esempio: la TARI', | ||
href: '#ckeditor-un-esempio:-la-tari', | ||
level: 2, | ||
}, | ||
]); | ||
}); | ||
|
||
it('should return an empty menuItems array if there are no headings', () => { | ||
const content = `<p>Some content without headings</p>`; | ||
|
||
const result = parseCkEditorContent(content); | ||
|
||
expect(result.parsedContent).toContain( | ||
'<p>Some content without headings</p>' | ||
); | ||
expect(result.menuItems).toEqual([]); // Expecting no menu items | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.