create-sitecore-jss 22.10.0-canary.10 → 22.10.0-canary.12
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.
|
@@ -8,6 +8,7 @@ import { JssContextService } from './jss-context.service';
|
|
|
8
8
|
import { JssContextServerSideService } from './jss-context.server-side.service';
|
|
9
9
|
import { JssTranslationServerLoaderService } from './i18n/jss-translation-server-loader.service';
|
|
10
10
|
import { JSS_SERVER_VIEWBAG } from './src/app/injection-tokens';
|
|
11
|
+
import { ViewBag } from './ViewBag';
|
|
11
12
|
|
|
12
13
|
@NgModule({
|
|
13
14
|
imports: [
|
|
@@ -20,10 +21,7 @@ import { JSS_SERVER_VIEWBAG } from './src/app/injection-tokens';
|
|
|
20
21
|
loader: {
|
|
21
22
|
provide: TranslateLoader,
|
|
22
23
|
useFactory: (
|
|
23
|
-
ssrViewBag:
|
|
24
|
-
[key: string]: unknown;
|
|
25
|
-
dictionary: { [key: string]: string };
|
|
26
|
-
},
|
|
24
|
+
ssrViewBag: ViewBag,
|
|
27
25
|
transferState: TransferState
|
|
28
26
|
) => new JssTranslationServerLoaderService(ssrViewBag, transferState),
|
|
29
27
|
deps: [JSS_SERVER_VIEWBAG, TransferState],
|
|
@@ -3,6 +3,7 @@ import { Injectable, makeStateKey, StateKey, TransferState } from '@angular/core
|
|
|
3
3
|
import { TranslateLoader } from '@ngx-translate/core';
|
|
4
4
|
import { DictionaryPhrases } from '@sitecore-jss/sitecore-jss-angular';
|
|
5
5
|
import { of as observableOf, EMPTY } from 'rxjs';
|
|
6
|
+
import { ViewBag } from '../ViewBag';
|
|
6
7
|
|
|
7
8
|
export const dictionaryStateKey: StateKey<DictionaryPhrases> = makeStateKey<DictionaryPhrases>(
|
|
8
9
|
'dictionary'
|
|
@@ -12,10 +13,7 @@ export const dictionaryStateKey: StateKey<DictionaryPhrases> = makeStateKey<Dict
|
|
|
12
13
|
export class JssTranslationServerLoaderService implements TranslateLoader {
|
|
13
14
|
constructor(
|
|
14
15
|
// this initial state from sitecore is injected by server.bundle for "integrated" mode
|
|
15
|
-
protected serverViewBag:
|
|
16
|
-
[key: string]: unknown;
|
|
17
|
-
dictionary: { [key: string]: string };
|
|
18
|
-
},
|
|
16
|
+
protected serverViewBag: ViewBag,
|
|
19
17
|
protected transferState: TransferState
|
|
20
18
|
) {}
|
|
21
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.10.0-canary.
|
|
3
|
+
"version": "22.10.0-canary.12",
|
|
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.2",
|
|
64
64
|
"typescript": "~5.9.2"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "9497316ac7f1c8ddd44fd5ee183f0ba784f4c237"
|
|
67
67
|
}
|