create-sitecore-jss 22.2.0-canary.22 → 22.2.0-canary.24
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/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.html +10 -0
- package/dist/templates/angular-xmcloud/src/app/components/column-splitter/column-splitter.component.ts +35 -0
- package/dist/templates/angular-xmcloud/src/app/lib/graphql-client-factory/config.ts +1 -1
- package/dist/templates/node-xmcloud-proxy/src/config.ts +7 -1
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div class="row component column-splitter" [ngClass]="columnSplitterStyles" [attr.id]="id">
|
|
2
|
+
<div *ngFor="let ph of enabledPlaceholders" [ngClass]="getColumnClass(+ph - 1)">
|
|
3
|
+
<div class="row">
|
|
4
|
+
<sc-placeholder
|
|
5
|
+
[name]="getPlaceholderName(ph)"
|
|
6
|
+
[rendering]="rendering">
|
|
7
|
+
</sc-placeholder>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { SxaComponent } from '../sxa.component';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-column-splitter',
|
|
6
|
+
templateUrl: './column-splitter.component.html',
|
|
7
|
+
})
|
|
8
|
+
export class ColumnSplitterComponent extends SxaComponent {
|
|
9
|
+
get columnSplitterStyles(): string {
|
|
10
|
+
return `${this.rendering.params.GridParameters ?? ''} ${this.rendering.params.Styles ??
|
|
11
|
+
''}`.trimEnd();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
get columnWidths(): string[] {
|
|
15
|
+
return Array.from({ length: 8 }, (_, i) => this.rendering.params[`ColumnWidth${i + 1}`]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get columnStyles(): string[] {
|
|
19
|
+
return Array.from({ length: 8 }, (_, i) => this.rendering.params[`Styles${i + 1}`]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get enabledPlaceholders(): string[] {
|
|
23
|
+
return this.rendering.params.EnabledPlaceholders.split(',');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
getColumnClass(index: number): string {
|
|
27
|
+
const widthClass = this.columnWidths[index] || '';
|
|
28
|
+
const styleClass = this.columnStyles[index] || '';
|
|
29
|
+
return `${widthClass} ${styleClass}`.trim();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getPlaceholderName(ph: string): string {
|
|
33
|
+
return `column-${ph}-{*}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -5,7 +5,13 @@ import { Config, ServerBundle } from './types';
|
|
|
5
5
|
*/
|
|
6
6
|
const bundlePath = process.env.PROXY_BUNDLE_PATH || '../dist/server.bundle';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
let serverBundle: ServerBundle;
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
serverBundle = require(bundlePath);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
throw new Error(`ERROR: The server.bundle.js error. ${error}`);
|
|
14
|
+
}
|
|
9
15
|
|
|
10
16
|
export const config: Config = {
|
|
11
17
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.2.0-canary.
|
|
3
|
+
"version": "22.2.0-canary.24",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
64
|
"typescript": "~4.9.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "2c4ab55cbdb879def573fd9e88b6d5d2dc530c36"
|
|
67
67
|
}
|