@digitaldefiance/express-suite-starter 2.3.28 → 2.4.0
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/src/i18n/branded-starter-string-key.d.ts +39 -0
- package/dist/src/i18n/branded-starter-string-key.d.ts.map +1 -0
- package/dist/src/i18n/branded-starter-string-key.js +38 -0
- package/dist/src/i18n/branded-starter-string-key.js.map +1 -0
- package/dist/src/i18n/index.d.ts +1 -0
- package/dist/src/i18n/index.d.ts.map +1 -1
- package/dist/src/i18n/index.js +1 -0
- package/dist/src/i18n/index.js.map +1 -1
- package/package.json +2 -2
- package/scaffolding/react/src/app/app.tsx.mustache +2 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded enum version of StarterStringKey for runtime-identifiable string keys
|
|
3
|
+
*
|
|
4
|
+
* This module provides the branded enum version of StarterStringKey,
|
|
5
|
+
* enabling runtime identification of string key sources and collision detection.
|
|
6
|
+
*
|
|
7
|
+
* @module branded-starter-string-key
|
|
8
|
+
*/
|
|
9
|
+
import { BrandedStringKeyValue } from '@digitaldefiance/i18n-lib';
|
|
10
|
+
import { StarterStringKey } from './starter-string-key';
|
|
11
|
+
/**
|
|
12
|
+
* Branded enum version of StarterStringKey
|
|
13
|
+
*
|
|
14
|
+
* Provides runtime identification, allowing you to:
|
|
15
|
+
* - Detect which component a string key belongs to
|
|
16
|
+
* - Find collisions between components
|
|
17
|
+
* - Route translations to the correct handler
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { StarterStringKeys, findStringKeySources } from '@digitaldefiance/express-suite-starter';
|
|
22
|
+
*
|
|
23
|
+
* // Use keys directly
|
|
24
|
+
* const key = StarterStringKeys.CLI_BANNER; // 'cli_banner'
|
|
25
|
+
*
|
|
26
|
+
* // Find which component owns a key
|
|
27
|
+
* findStringKeySources('cli_banner'); // ['i18n:express-suite-starter']
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const StarterStringKeys: import("@digitaldefiance/i18n-lib").BrandedStringKeys<typeof StarterStringKey>;
|
|
31
|
+
/**
|
|
32
|
+
* Type for starter string key values from the branded enum
|
|
33
|
+
*/
|
|
34
|
+
export type StarterStringKeyValue = BrandedStringKeyValue<typeof StarterStringKeys>;
|
|
35
|
+
/**
|
|
36
|
+
* Component ID for the express-suite-starter component
|
|
37
|
+
*/
|
|
38
|
+
export declare const STARTER_COMPONENT_ID = "express-suite-starter";
|
|
39
|
+
//# sourceMappingURL=branded-starter-string-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branded-starter-string-key.d.ts","sourceRoot":"","sources":["../../../src/i18n/branded-starter-string-key.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,qBAAqB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,gFAG7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CACvD,OAAO,iBAAiB,CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Branded enum version of StarterStringKey for runtime-identifiable string keys
|
|
4
|
+
*
|
|
5
|
+
* This module provides the branded enum version of StarterStringKey,
|
|
6
|
+
* enabling runtime identification of string key sources and collision detection.
|
|
7
|
+
*
|
|
8
|
+
* @module branded-starter-string-key
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.STARTER_COMPONENT_ID = exports.StarterStringKeys = void 0;
|
|
12
|
+
const i18n_lib_1 = require("@digitaldefiance/i18n-lib");
|
|
13
|
+
const starter_string_key_1 = require("./starter-string-key");
|
|
14
|
+
/**
|
|
15
|
+
* Branded enum version of StarterStringKey
|
|
16
|
+
*
|
|
17
|
+
* Provides runtime identification, allowing you to:
|
|
18
|
+
* - Detect which component a string key belongs to
|
|
19
|
+
* - Find collisions between components
|
|
20
|
+
* - Route translations to the correct handler
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import { StarterStringKeys, findStringKeySources } from '@digitaldefiance/express-suite-starter';
|
|
25
|
+
*
|
|
26
|
+
* // Use keys directly
|
|
27
|
+
* const key = StarterStringKeys.CLI_BANNER; // 'cli_banner'
|
|
28
|
+
*
|
|
29
|
+
* // Find which component owns a key
|
|
30
|
+
* findStringKeySources('cli_banner'); // ['i18n:express-suite-starter']
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
exports.StarterStringKeys = (0, i18n_lib_1.createI18nStringKeysFromEnum)('express-suite-starter', starter_string_key_1.StarterStringKey);
|
|
34
|
+
/**
|
|
35
|
+
* Component ID for the express-suite-starter component
|
|
36
|
+
*/
|
|
37
|
+
exports.STARTER_COMPONENT_ID = 'express-suite-starter';
|
|
38
|
+
//# sourceMappingURL=branded-starter-string-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branded-starter-string-key.js","sourceRoot":"","sources":["../../../src/i18n/branded-starter-string-key.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,wDAGmC;AACnC,6DAAwD;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,iBAAiB,GAAG,IAAA,uCAA4B,EAC3D,uBAAuB,EACvB,qCAAgB,CACjB,CAAC;AASF;;GAEG;AACU,QAAA,oBAAoB,GAAG,uBAAuB,CAAC"}
|
package/dist/src/i18n/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
package/dist/src/i18n/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./branded-starter-string-key"), exports);
|
|
17
18
|
__exportStar(require("./starter-string-key"), exports);
|
|
18
19
|
__exportStar(require("./i18n-setup"), exports);
|
|
19
20
|
__exportStar(require("./translations-all"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+CAA6B;AAC7B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,uDAAqC;AACrC,+CAA6B;AAC7B,qDAAmC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/express-suite-starter",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-express-suite": "./dist/src/cli.js"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"publish:public": "npm publish --access public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@digitaldefiance/i18n-lib": "^
|
|
34
|
+
"@digitaldefiance/i18n-lib": "^4.0.3",
|
|
35
35
|
"@inquirer/prompts": "^7.5.0",
|
|
36
36
|
"chalk": "^4.1.2",
|
|
37
37
|
"handlebars": "^4.7.8",
|
|
@@ -13,7 +13,7 @@ import AlbatrossLogo from '../assets/albatross.svg';
|
|
|
13
13
|
import { AppConstants, EciesConfig } from '{{namespace}}/lib';
|
|
14
14
|
import { appMenuConfigs } from './menus';
|
|
15
15
|
import { LanguageRegistry } from '@digitaldefiance/i18n-lib';
|
|
16
|
-
import { SuiteCoreComponentId, SuiteCoreStringKey } from '@digitaldefiance/suite-core-lib';
|
|
16
|
+
import { SuiteCoreComponentId, SuiteCoreStringKey, SuiteCoreStringKeyValue } from '@digitaldefiance/suite-core-lib';
|
|
17
17
|
|
|
18
18
|
const getApiBaseUrl = () => {
|
|
19
19
|
if (
|
|
@@ -65,7 +65,7 @@ const App: FC = () => {
|
|
|
65
65
|
return (
|
|
66
66
|
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
|
67
67
|
<TranslationProvider i18nEngine={i18nEngine}>
|
|
68
|
-
<TranslatedTitle<
|
|
68
|
+
<TranslatedTitle<SuiteCoreStringKeyValue>
|
|
69
69
|
componentId={SuiteCoreComponentId}
|
|
70
70
|
stringKey={SuiteCoreStringKey.Common_SiteTemplate} />
|
|
71
71
|
<AppThemeProvider customTheme={createAppTheme}>
|