Skip to content

Commit

Permalink
Merge branch 'dev' into bugfix/SXA-7554-redirects-double-parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sc-ruslanmatkovskyi authored Oct 8, 2024
2 parents 9e6ae1a + 50eb0f6 commit 760411d
Show file tree
Hide file tree
Showing 252 changed files with 2,919 additions and 2,884 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Our versioning strategy is as follows:
* `[templates/nextjs]` Fix embedded personalization not rendering correctly after navigation through router links. ([#1911](https://github.com/Sitecore/jss/pull/1911))
* `[template/angular]` Prevent client-side dictionary API call when SSR data is available ([#1930](https://github.com/Sitecore/jss/pull/1930)) ([#1932](https://github.com/Sitecore/jss/pull/1932))
* `[sitecore-jss-nextjs]` `[sitecore-jss]` Resolved an issue with Netlify where URL query parameters were being sorted, causing redirect failures. Added a method to generate all possible permutations of query parameters, ensuring proper matching with URL patterns regardless of their order. ([#1935](https://github.com/Sitecore/jss/pull/1935))
* `[sitecore-jss-angular]` Fix default empty field components to not render the unwanted wrapping tags ([#1937](https://github.com/Sitecore/jss/pull/1937)) ([#1940](https://github.com/Sitecore/jss/pull/1940))

### 🎉 New Features & Improvements

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lerna": "3.22.1",
"packages": ["packages/*", "samples/*"],
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"npmClient": "yarn",
"useWorkspaces": true
}
2 changes: 1 addition & 1 deletion packages/create-sitecore-jss/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-sitecore-jss",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "Sitecore JSS initializer",
"bin": "./dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sitecore-jss-angular-schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-angular-schematics",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "Scaffolding schematics for Sitecore JSS Angular apps",
"scripts": {
"build": "tsc -p tsconfig.json",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-angular",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "",
"scripts": {
"build": "ng-packagr -p ng-package.json",
Expand Down Expand Up @@ -58,7 +58,7 @@
"rxjs": "~7.8.1"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59"
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61"
},
"main": "dist/esm2022/sitecore-jss-sitecore-jss-angular.mjs",
"module": "dist/esm2022/sitecore-jss-sitecore-jss-angular.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ describe('<span *scTestBase />', () => {
fixture.detectChanges();

const rendered = de.nativeElement.innerHTML;
expect(rendered).toContain('<span>[No text in field]</span>');
expect(rendered).toContain(
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>'
);
});

it('should render custom empty editing template if provided', () => {
Expand Down Expand Up @@ -199,7 +201,9 @@ describe('<span *scTestBase />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ describe('<span *scDate />', () => {
fixture.detectChanges();

const rendered = de.nativeElement.innerHTML;
expect(rendered).toContain('<span>[No text in field]</span>');
expect(rendered).toContain(
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>'
);
});

it('should render default empty field component when field value is the default empty date value', () => {
Expand All @@ -172,7 +174,9 @@ describe('<span *scDate />', () => {
fixture.detectChanges();

const rendered = de.nativeElement.innerHTML;
expect(rendered).toContain('<span>[No text in field]</span>');
expect(rendered).toContain(
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>'
);
});

it('should render custom empty field component when provided, when field value is empty', () => {
Expand Down Expand Up @@ -256,7 +260,9 @@ describe('<span *scDate />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ import { Component } from '@angular/core';
* Default component that will be rendered in pages when image field is empty.
*/
@Component({
selector: 'sc-default-empty-image-field-editing-placeholder',
selector: '[sc-default-empty-image-field-editing-placeholder]',
template: `
<img
alt=""
src='data:image/svg+xml,%3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 240 240" style="enable-background:new 0 0 240 240;" xml:space="preserve"%3E%3Cstyle type="text/css"%3E .st0%7Bfill:none;%7D .st1%7Bfill:%23969696;%7D .st2%7Bfill:%23FFFFFF;%7D .st3%7Bfill:%23FFFFFF;stroke:%23FFFFFF;stroke-width:0.75;stroke-miterlimit:10;%7D%0A%3C/style%3E%3Cg%3E%3Crect class="st0" width="240" height="240"/%3E%3Cg%3E%3Cg%3E%3Crect x="20" y="20" class="st1" width="200" height="200"/%3E%3C/g%3E%3Cg%3E%3Ccircle class="st2" cx="174" cy="67" r="14"/%3E%3Cpath class="st2" d="M174,54c7.17,0,13,5.83,13,13s-5.83,13-13,13s-13-5.83-13-13S166.83,54,174,54 M174,52 c-8.28,0-15,6.72-15,15s6.72,15,15,15s15-6.72,15-15S182.28,52,174,52L174,52z"/%3E%3C/g%3E%3Cpolyline class="st3" points="29.5,179.25 81.32,122.25 95.41,137.75 137.23,91.75 209.5,179.75 "/%3E%3C/g%3E%3C/g%3E%3C/svg%3E'
class="scEmptyImage"
/>
`,
styles:
'img { min-width:48px; min-height:48px; max-width:400px; max-height:400px; cursor:pointer }',
styles: [
`
:host {
min-width: 48px;
min-height: 48px;
max-width: 400px;
max-height: 400px;
cursor: pointer;
}
`,
],
})
export class DefaultEmptyImageFieldEditingComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Component } from '@angular/core';
* Default component that will be rendered in pages when field is empty; applies for text, richtext, date and link fields.
*/
@Component({
selector: 'sc-default-empty-text-field-editing-placeholder',
template: '<span>[No text in field]</span>',
selector: '<span>[sc-default-empty-text-field-editing-placeholder]</span>',
template: '[No text in field]',
})
export class DefaultEmptyFieldEditingComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class TestComponent {

const emptyLinkFieldEditingTemplateId = 'emptyLinkFieldEditingTemplate';
const emptyLinkFieldEditingTemplate = '<span>[This is a *custom* empty field template]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString = '<span>[No text in field]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString =
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>';

@Component({
selector: 'test-empty-template-generic-link',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ describe('<img *scImage />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-image-field-editing-placeholder'));
const fieldValue = de.query(By.css('[sc-default-empty-image-field-editing-placeholder]'));
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class TestComponent {

const emptyLinkFieldEditingTemplateId = 'emptyLinkFieldEditingTemplate';
const emptyLinkFieldEditingTemplate = '<span>[This is a *custom* empty field template]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString = '<span>[No text in field]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString =
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>';

@Component({
selector: 'test-empty-template-link',
Expand Down Expand Up @@ -389,7 +390,9 @@ describe('<a *scLink />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down Expand Up @@ -740,7 +743,9 @@ describe('<a *scLink>children</a>', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ describe('<div *scRichText />', () => {
fixture.detectChanges();

const rendered = de.nativeElement.innerHTML;
expect(rendered).toContain('<span>[No text in field]</span>');
expect(rendered).toContain(
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>'
);
});

it('should render custom empty field component when provided, when field value is empty', () => {
Expand Down Expand Up @@ -238,7 +240,9 @@ describe('<div *scRichText />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class TestComponent {

const emptyLinkFieldEditingTemplateId = 'emptyLinkFieldEditingTemplate';
const emptyLinkFieldEditingTemplate = '<span>[This is a *custom* empty field template]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString = '<span>[No text in field]</span>';
const emptyLinkFieldEditingTemplateDefaultTestString =
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>';

@Component({
selector: 'test-empty-template-router-link',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ describe('<span *scText />', () => {
fixture.detectChanges();

const rendered = de.nativeElement.innerHTML;
expect(rendered).toContain('<span>[No text in field]</span>');
expect(rendered).toContain(
'<span sc-default-empty-text-field-editing-placeholder="">[No text in field]</span>'
);
});

it('should render custom empty field component when provided, when field value is empty', () => {
Expand Down Expand Up @@ -281,7 +283,9 @@ describe('<span *scText />', () => {
comp.field = field;
fixture.detectChanges();

const fieldValue = de.query(By.css('sc-default-empty-text-field-editing-placeholder'));
const fieldValue = de.query(
By.css('span[sc-default-empty-text-field-editing-placeholder]')
);
const metadataOpenTag = fieldValue.nativeElement.previousElementSibling;
const metadataCloseTag = fieldValue.nativeElement.nextElementSibling;

Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-cli",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "Sitecore JSS command-line",
"main": "dist/cjs/cli.js",
"module": "dist/esm/cli.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"url": "https://github.com/sitecore/jss/issues"
},
"dependencies": {
"@sitecore-jss/sitecore-jss-dev-tools": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss-dev-tools": "22.2.0-canary.61",
"chalk": "^4.1.2",
"cross-spawn": "^7.0.3",
"dotenv": "^16.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-dev-tools",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "Utilities to assist in the development and deployment of Sitecore JSS apps.",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@babel/parser": "^7.24.0",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61",
"axios": "^1.3.2",
"chalk": "^4.1.2",
"chokidar": "^3.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-forms",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -43,7 +43,7 @@
"typescript": "~4.9.5"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59"
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61"
},
"description": "",
"types": "types/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions packages/sitecore-jss-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-nextjs",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -72,9 +72,9 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss-dev-tools": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss-react": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61",
"@sitecore-jss/sitecore-jss-dev-tools": "22.2.0-canary.61",
"@sitecore-jss/sitecore-jss-react": "22.2.0-canary.61",
"@vercel/kv": "^0.2.1",
"prop-types": "^15.8.1",
"regex-parser": "^2.2.11",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-proxy",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "Middlewares, utilities to work in a headless mode",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand All @@ -27,7 +27,7 @@
"url": "https://github.com/sitecore/jss/issues"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61",
"http-proxy-middleware": "^2.0.6",
"http-status-codes": "^2.2.0",
"set-cookie-parser": "^2.5.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-react-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-react-forms",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -54,7 +54,7 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@sitecore-jss/sitecore-jss-forms": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss-forms": "22.2.0-canary.61",
"prop-types": "^15.8.1"
},
"description": "",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-react-native",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand All @@ -27,7 +27,7 @@
"url": "https://github.com/sitecore/jss/issues"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61",
"prop-types": "^15.7.2",
"react-native-htmlview": "^0.15.0",
"react-native-svg": "^5.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sitecore-jss-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-react",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
Expand Down Expand Up @@ -61,7 +61,7 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@sitecore-jss/sitecore-jss": "22.2.0-canary.59",
"@sitecore-jss/sitecore-jss": "22.2.0-canary.61",
"fast-deep-equal": "^3.1.3",
"prop-types": "^15.8.1",
"style-attr": "^1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/sitecore-jss-rendering-host/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sitecore-jss/sitecore-jss-rendering-host",
"version": "22.2.0-canary.59",
"version": "22.2.0-canary.61",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"sideEffects": false,
Expand Down
Loading

0 comments on commit 760411d

Please sign in to comment.