@fgv/ts-res-browser 1.0.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.
Files changed (95) hide show
  1. package/.rush/temp/5fc90bc7c2ccf812114ea099111568e5429be2a2.tar.log +15 -0
  2. package/.rush/temp/chunked-rush-logs/ts-res-browser.build.chunks.jsonl +35 -0
  3. package/.rush/temp/operation/build/all.log +35 -0
  4. package/.rush/temp/operation/build/log-chunks.jsonl +35 -0
  5. package/.rush/temp/operation/build/state.json +3 -0
  6. package/.rush/temp/shrinkwrap-deps.json +1217 -0
  7. package/README.md +95 -0
  8. package/TS_RES_BROWSER_PLAN.md +689 -0
  9. package/babel.config.js +17 -0
  10. package/config/jest.config.json +13 -0
  11. package/config/rig.json +16 -0
  12. package/dist/bundle.js +2 -0
  13. package/dist/bundle.js.LICENSE.txt +62 -0
  14. package/dist/index.html +1 -0
  15. package/package.json +78 -0
  16. package/postcss.config.js +3 -0
  17. package/public/index.html +15 -0
  18. package/rush-logs/ts-res-browser.build.cache.log +3 -0
  19. package/rush-logs/ts-res-browser.build.log +35 -0
  20. package/src/App.tsx +153 -0
  21. package/src/cli.ts +44 -0
  22. package/src/components/common/FileImporter.tsx +138 -0
  23. package/src/components/common/NavigationWarningModal.tsx +62 -0
  24. package/src/components/layout/AppLayout.tsx +46 -0
  25. package/src/components/layout/Header.tsx +22 -0
  26. package/src/components/layout/MessagesWindow.tsx +108 -0
  27. package/src/components/layout/Sidebar.tsx +92 -0
  28. package/src/components/tools/CompiledBrowser.tsx +949 -0
  29. package/src/components/tools/ConfigurationTool.tsx +1402 -0
  30. package/src/components/tools/FilterTool.tsx +1027 -0
  31. package/src/components/tools/ImportTool.tsx +246 -0
  32. package/src/components/tools/ResolutionViewer.tsx +1672 -0
  33. package/src/components/tools/SourceBrowser.tsx +496 -0
  34. package/src/hooks/useAppState.ts +107 -0
  35. package/src/hooks/useFileImport.ts +86 -0
  36. package/src/hooks/useNavigationWarning.ts +67 -0
  37. package/src/hooks/useResourceManager.ts +244 -0
  38. package/src/index.css +38 -0
  39. package/src/main.tsx +16 -0
  40. package/src/types/app.ts +62 -0
  41. package/src/types/fileSystemAccess.d.ts +94 -0
  42. package/src/utils/browserFileTreeAccessors.ts +245 -0
  43. package/src/utils/fileImport.ts +334 -0
  44. package/src/utils/filterResources.ts +677 -0
  45. package/src/utils/tsResIntegration.ts +467 -0
  46. package/tailwind.config.js +21 -0
  47. package/test-data/README.md +184 -0
  48. package/test-data/config-variations/README.md +64 -0
  49. package/test-data/config-variations/composition-terminology.json +112 -0
  50. package/test-data/config-variations/enterprise-complex.json +129 -0
  51. package/test-data/config-variations/gaming-app.json +87 -0
  52. package/test-data/config-variations/high-priority-language.json +65 -0
  53. package/test-data/config-variations/minimal-basic.json +37 -0
  54. package/test-data/config-variations/qualifier-default-values.json +71 -0
  55. package/test-data/config-variations/territory-first.json +68 -0
  56. package/test-data/config-variations/territory-hierarchy-test.json +31 -0
  57. package/test-data/config-variations/territory-hierarchy-unconstrained.json +32 -0
  58. package/test-data/default-matching-test/greeting.res.json +83 -0
  59. package/test-data/default-matching-test/only-defaults.res.json +48 -0
  60. package/test-data/sample-project/package.json +27 -0
  61. package/test-data/sample-project/src/resources/app-config.json +27 -0
  62. package/test-data/sample-project/src/resources/app.json +177 -0
  63. package/test-data/sample-project/src/resources/config/app.env=development.json +21 -0
  64. package/test-data/sample-project/src/resources/config/app.json +21 -0
  65. package/test-data/sample-project/src/resources/config/app.platform=mobile.json +23 -0
  66. package/test-data/sample-project/src/resources/feature-flags.json +23 -0
  67. package/test-data/sample-project/src/resources/home=CA/common.json +16 -0
  68. package/test-data/sample-project/src/resources/images/density=hdpi.json +29 -0
  69. package/test-data/sample-project/src/resources/images/home.json +29 -0
  70. package/test-data/sample-project/src/resources/images/logout.json +14 -0
  71. package/test-data/sample-project/src/resources/images/settings.json +14 -0
  72. package/test-data/sample-project/src/resources/images/ui-icons.json +29 -0
  73. package/test-data/sample-project/src/resources/images/user.density=hdpi.json +14 -0
  74. package/test-data/sample-project/src/resources/images/user.json +14 -0
  75. package/test-data/sample-project/src/resources/lang=en-US/common.json +15 -0
  76. package/test-data/sample-project/src/resources/language=en-CA/ui-terms.json +19 -0
  77. package/test-data/sample-project/src/resources/language=en-GB/ui-terms.json +30 -0
  78. package/test-data/sample-project/src/resources/language=fr-CA/ui-terms.json +25 -0
  79. package/test-data/sample-project/src/resources/language=nl-BE/ui-terms.json +17 -0
  80. package/test-data/sample-project/src/resources/region=europe/feature-flags.json +17 -0
  81. package/test-data/sample-project/src/resources/region=north-america/feature-flags.json +18 -0
  82. package/test-data/sample-project/src/resources/strings/dashboard.home=CA,language=fr.json +20 -0
  83. package/test-data/sample-project/src/resources/strings/dashboard.json +18 -0
  84. package/test-data/sample-project/src/resources/strings/dashboard.role=admin.json +23 -0
  85. package/test-data/sample-project/src/resources/strings/dashboard.role=user.json +21 -0
  86. package/test-data/sample-project/src/resources/strings/language=en-US.json +16 -0
  87. package/test-data/sample-project/src/resources/strings.json +78 -0
  88. package/test-data/sample-project/src/resources/territory=BE/app-config.json +19 -0
  89. package/test-data/sample-project/src/resources/territory=CA/app-config.json +21 -0
  90. package/test-data/sample-project/src/resources/territory=GB/app-config.json +25 -0
  91. package/test-data/sample-project/src/resources/territory=NL/app-config.json +25 -0
  92. package/test-data/sample-project/src/resources/ui-terms.json +96 -0
  93. package/test-data/sample-project/src/resources-config.json +111 -0
  94. package/tsconfig.json +27 -0
  95. package/webpack.config.js +54 -0
@@ -0,0 +1,64 @@
1
+ # Configuration Variations
2
+
3
+ This directory contains various system configuration files for testing the ts-res browser tool. Each configuration demonstrates different priority schemes and use cases.
4
+
5
+ ## Available Configurations
6
+
7
+ ### high-priority-language.json
8
+ - **Use Case**: Internationalization-focused applications
9
+ - **Priority**: Language (900) > Territory (600/500) > Role (400) > Platform (300)
10
+ - **Features**: Simplified role set, basic platform types
11
+
12
+ ### territory-first.json
13
+ - **Use Case**: Region-specific applications
14
+ - **Priority**: Territory (950/900) > Language (700) > Role (600) > Environment (500)
15
+ - **Features**: Case-sensitive roles, territory context lists enabled, non-optional home territory token
16
+
17
+ ### gaming-app.json
18
+ - **Use Case**: Gaming applications
19
+ - **Priority**: Platform (850) > Language (800) > Territory (750) > Graphics (700) > Player Level (600) > Game Mode (550)
20
+ - **Features**: Gaming-specific qualifiers (graphics quality, player level, game mode), platform-focused hierarchy
21
+
22
+ ### minimal-basic.json
23
+ - **Use Case**: Simple applications with basic requirements
24
+ - **Priority**: Language (600) > Device (500)
25
+ - **Features**: Only two qualifiers, minimal complexity
26
+
27
+ ### qualifier-default-values.json
28
+ - **Use Case**: Demonstrating qualifier default values functionality
29
+ - **Priority**: Language (600) > Territory (500) > Device (400) > Environment (300)
30
+ - **Features**: All qualifiers have default values configured (language with multiple values, territory single value, device with list, environment single value)
31
+ - **Demonstrates**: How default values are defined and used when qualifiers are not specified in context
32
+
33
+ ### enterprise-complex.json
34
+ - **Use Case**: Large enterprise applications with complex permissions and multi-tenancy
35
+ - **Priority**: Tenant (1000) > Environment (950) > Security (900) > Territory (850/800) > Language (750) > Role (700) > Department (650) > Feature Flags (600)
36
+ - **Features**: Multi-tenant support, security levels, department-based access, feature flags, complex role hierarchies
37
+
38
+ ### composition-terminology.json
39
+ - **Use Case**: Demonstrating resource composition with international terminology variations plus full application context
40
+ - **Priority**: Home Territory (850) > Language (800) > Territory (700) > Region (600) > Role (500) > Environment (400) > Platform (300) > Density (200)
41
+ - **Features**: Comprehensive terminology resources showing composition with partial candidates for regional variations, plus full application qualifiers for testing existing resources
42
+ - **Resources**: UI terms with base English/French/Dutch candidates and partial variants for Canadian English, British English, Canadian French, Belgian Dutch; App configuration with territory-specific settings; Feature flags with regional overrides; Plus supports existing sample project resources
43
+ - **Demonstrates**: How partial candidates compose with base candidates to create localized terminology sets while maintaining compatibility with existing test resources
44
+
45
+ ## Usage
46
+
47
+ These configurations can be loaded into the Configuration Tool to test different system setups and see how they affect resource resolution behavior.
48
+
49
+ Each configuration includes:
50
+ - **name**: Human-readable name for the configuration
51
+ - **description**: Explanation of the use case and features
52
+ - **qualifierTypes**: Defines the available qualifier types with their configurations
53
+ - **qualifiers**: Defines the actual qualifiers with their priorities and tokens
54
+ - **resourceTypes**: Available resource types (currently just JSON)
55
+
56
+ ## Testing Different Scenarios
57
+
58
+ Use these configurations to test:
59
+ 1. **Priority Effects**: How different priority schemes affect resource resolution
60
+ 2. **Context Lists**: Territory and role configurations with `allowContextList` enabled
61
+ 3. **Case Sensitivity**: Role configurations with different case sensitivity settings
62
+ 4. **Token Usage**: Various token configurations (optional vs required)
63
+ 5. **Default Values**: Qualifier default values for fallback behavior (see qualifier-default-values.json)
64
+ 6. **Complexity Scaling**: From minimal (2 qualifiers) to complex (9 qualifiers)
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "Composition Terminology Configuration",
3
+ "description": "Configuration demonstrating composition with international terminology variations plus full application context",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "territory",
11
+ "systemType": "territory",
12
+ "configuration": {
13
+ "allowContextList": true
14
+ }
15
+ },
16
+ {
17
+ "name": "role",
18
+ "systemType": "literal",
19
+ "configuration": {
20
+ "allowContextList": false,
21
+ "caseSensitive": false,
22
+ "enumeratedValues": ["admin", "user", "guest", "anonymous"]
23
+ }
24
+ },
25
+ {
26
+ "name": "environment",
27
+ "systemType": "literal",
28
+ "configuration": {
29
+ "enumeratedValues": ["development", "integration", "production", "test"]
30
+ }
31
+ },
32
+ {
33
+ "name": "platform",
34
+ "systemType": "literal",
35
+ "configuration": {
36
+ "enumeratedValues": ["ios", "android", "web", "mobile", "tv", "desktop"]
37
+ },
38
+ "hierarchy": {
39
+ "ios": "mobile",
40
+ "android": "mobile"
41
+ }
42
+ },
43
+ {
44
+ "name": "density",
45
+ "systemType": "literal",
46
+ "configuration": {
47
+ "allowContextList": false,
48
+ "caseSensitive": false,
49
+ "enumeratedValues": ["hdpi", "mdpi", "ldpi"]
50
+ }
51
+ },
52
+ {
53
+ "name": "region",
54
+ "systemType": "literal",
55
+ "configuration": {
56
+ "allowContextList": false,
57
+ "caseSensitive": false,
58
+ "enumeratedValues": ["north-america", "europe", "asia-pacific", "latin-america"]
59
+ }
60
+ }
61
+ ],
62
+ "qualifiers": [
63
+ {
64
+ "name": "language",
65
+ "typeName": "language",
66
+ "defaultPriority": 800
67
+ },
68
+ {
69
+ "name": "homeTerritory",
70
+ "typeName": "territory",
71
+ "defaultPriority": 850,
72
+ "token": "home",
73
+ "tokenIsOptional": true
74
+ },
75
+ {
76
+ "name": "territory",
77
+ "typeName": "territory",
78
+ "defaultPriority": 700
79
+ },
80
+ {
81
+ "name": "role",
82
+ "typeName": "role",
83
+ "defaultPriority": 500
84
+ },
85
+ {
86
+ "name": "env",
87
+ "typeName": "environment",
88
+ "defaultPriority": 400
89
+ },
90
+ {
91
+ "name": "platform",
92
+ "typeName": "platform",
93
+ "defaultPriority": 300
94
+ },
95
+ {
96
+ "name": "density",
97
+ "typeName": "density",
98
+ "defaultPriority": 200
99
+ },
100
+ {
101
+ "name": "region",
102
+ "typeName": "region",
103
+ "defaultPriority": 600
104
+ }
105
+ ],
106
+ "resourceTypes": [
107
+ {
108
+ "name": "json",
109
+ "typeName": "json"
110
+ }
111
+ ]
112
+ }
@@ -0,0 +1,129 @@
1
+ {
2
+ "name": "Enterprise Complex Configuration",
3
+ "description": "Comprehensive configuration for enterprise applications with many conditional dimensions",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "territory",
11
+ "systemType": "territory",
12
+ "configuration": {
13
+ "allowContextList": true
14
+ }
15
+ },
16
+ {
17
+ "name": "role",
18
+ "systemType": "literal",
19
+ "configuration": {
20
+ "allowContextList": true,
21
+ "caseSensitive": false,
22
+ "enumeratedValues": ["admin", "manager", "employee", "contractor", "guest", "api", "service"]
23
+ }
24
+ },
25
+ {
26
+ "name": "department",
27
+ "systemType": "literal",
28
+ "configuration": {
29
+ "allowContextList": false,
30
+ "caseSensitive": false,
31
+ "enumeratedValues": ["hr", "finance", "engineering", "sales", "marketing", "support", "legal"]
32
+ }
33
+ },
34
+ {
35
+ "name": "environment",
36
+ "systemType": "literal",
37
+ "configuration": {
38
+ "enumeratedValues": ["development", "testing", "staging", "production", "dr"]
39
+ }
40
+ },
41
+ {
42
+ "name": "tenant",
43
+ "systemType": "literal",
44
+ "configuration": {
45
+ "allowContextList": false,
46
+ "caseSensitive": true,
47
+ "enumeratedValues": ["corp", "subsidiary1", "subsidiary2", "partner1", "partner2"]
48
+ }
49
+ },
50
+ {
51
+ "name": "feature-flag",
52
+ "systemType": "literal",
53
+ "configuration": {
54
+ "allowContextList": true,
55
+ "caseSensitive": false,
56
+ "enumeratedValues": ["enabled", "disabled", "beta", "alpha"]
57
+ }
58
+ },
59
+ {
60
+ "name": "security-level",
61
+ "systemType": "literal",
62
+ "configuration": {
63
+ "allowContextList": false,
64
+ "caseSensitive": false,
65
+ "enumeratedValues": ["public", "internal", "confidential", "restricted"]
66
+ }
67
+ }
68
+ ],
69
+ "qualifiers": [
70
+ {
71
+ "name": "tenant",
72
+ "typeName": "tenant",
73
+ "defaultPriority": 1000
74
+ },
75
+ {
76
+ "name": "environment",
77
+ "typeName": "environment",
78
+ "defaultPriority": 950,
79
+ "token": "env"
80
+ },
81
+ {
82
+ "name": "securityLevel",
83
+ "typeName": "security-level",
84
+ "defaultPriority": 900,
85
+ "token": "security"
86
+ },
87
+ {
88
+ "name": "homeTerritory",
89
+ "typeName": "territory",
90
+ "defaultPriority": 850,
91
+ "token": "home",
92
+ "tokenIsOptional": true
93
+ },
94
+ {
95
+ "name": "currentTerritory",
96
+ "typeName": "territory",
97
+ "defaultPriority": 800
98
+ },
99
+ {
100
+ "name": "language",
101
+ "typeName": "language",
102
+ "defaultPriority": 750
103
+ },
104
+ {
105
+ "name": "role",
106
+ "typeName": "role",
107
+ "defaultPriority": 700
108
+ },
109
+ {
110
+ "name": "department",
111
+ "typeName": "department",
112
+ "defaultPriority": 650,
113
+ "token": "dept"
114
+ },
115
+ {
116
+ "name": "featureFlag",
117
+ "typeName": "feature-flag",
118
+ "defaultPriority": 600,
119
+ "token": "feature",
120
+ "tokenIsOptional": true
121
+ }
122
+ ],
123
+ "resourceTypes": [
124
+ {
125
+ "name": "json",
126
+ "typeName": "json"
127
+ }
128
+ ]
129
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "Gaming Application Configuration",
3
+ "description": "Configuration tailored for gaming applications with device and graphics quality considerations",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "territory",
11
+ "systemType": "territory"
12
+ },
13
+ {
14
+ "name": "platform",
15
+ "systemType": "literal",
16
+ "configuration": {
17
+ "enumeratedValues": ["pc", "console", "mobile", "vr", "ar"]
18
+ }
19
+ },
20
+ {
21
+ "name": "graphics-quality",
22
+ "systemType": "literal",
23
+ "configuration": {
24
+ "allowContextList": false,
25
+ "caseSensitive": false,
26
+ "enumeratedValues": ["low", "medium", "high", "ultra", "rtx"]
27
+ }
28
+ },
29
+ {
30
+ "name": "player-level",
31
+ "systemType": "literal",
32
+ "configuration": {
33
+ "allowContextList": false,
34
+ "caseSensitive": false,
35
+ "enumeratedValues": ["beginner", "intermediate", "advanced", "expert", "pro"]
36
+ }
37
+ },
38
+ {
39
+ "name": "game-mode",
40
+ "systemType": "literal",
41
+ "configuration": {
42
+ "enumeratedValues": ["single", "multiplayer", "cooperative", "competitive", "tutorial"]
43
+ }
44
+ }
45
+ ],
46
+ "qualifiers": [
47
+ {
48
+ "name": "platform",
49
+ "typeName": "platform",
50
+ "defaultPriority": 850
51
+ },
52
+ {
53
+ "name": "language",
54
+ "typeName": "language",
55
+ "defaultPriority": 800
56
+ },
57
+ {
58
+ "name": "territory",
59
+ "typeName": "territory",
60
+ "defaultPriority": 750
61
+ },
62
+ {
63
+ "name": "graphics",
64
+ "typeName": "graphics-quality",
65
+ "defaultPriority": 700,
66
+ "token": "gfx"
67
+ },
68
+ {
69
+ "name": "playerLevel",
70
+ "typeName": "player-level",
71
+ "defaultPriority": 600,
72
+ "token": "level"
73
+ },
74
+ {
75
+ "name": "gameMode",
76
+ "typeName": "game-mode",
77
+ "defaultPriority": 550,
78
+ "token": "mode"
79
+ }
80
+ ],
81
+ "resourceTypes": [
82
+ {
83
+ "name": "json",
84
+ "typeName": "json"
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "High Priority Language Configuration",
3
+ "description": "Configuration that prioritizes language over territory, useful for internationalization-focused applications",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "territory",
11
+ "systemType": "territory"
12
+ },
13
+ {
14
+ "name": "role",
15
+ "systemType": "literal",
16
+ "configuration": {
17
+ "allowContextList": false,
18
+ "caseSensitive": false,
19
+ "enumeratedValues": ["admin", "user", "guest"]
20
+ }
21
+ },
22
+ {
23
+ "name": "platform",
24
+ "systemType": "literal",
25
+ "configuration": {
26
+ "enumeratedValues": ["web", "mobile", "desktop"]
27
+ }
28
+ }
29
+ ],
30
+ "qualifiers": [
31
+ {
32
+ "name": "language",
33
+ "typeName": "language",
34
+ "defaultPriority": 900
35
+ },
36
+ {
37
+ "name": "homeTerritory",
38
+ "typeName": "territory",
39
+ "defaultPriority": 600,
40
+ "token": "home",
41
+ "tokenIsOptional": true
42
+ },
43
+ {
44
+ "name": "currentTerritory",
45
+ "typeName": "territory",
46
+ "defaultPriority": 500
47
+ },
48
+ {
49
+ "name": "role",
50
+ "typeName": "role",
51
+ "defaultPriority": 400
52
+ },
53
+ {
54
+ "name": "platform",
55
+ "typeName": "platform",
56
+ "defaultPriority": 300
57
+ }
58
+ ],
59
+ "resourceTypes": [
60
+ {
61
+ "name": "json",
62
+ "typeName": "json"
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "Minimal Basic Configuration",
3
+ "description": "Simplified configuration with only essential qualifiers for basic applications",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "device",
11
+ "systemType": "literal",
12
+ "configuration": {
13
+ "allowContextList": false,
14
+ "caseSensitive": false,
15
+ "enumeratedValues": ["phone", "tablet", "desktop"]
16
+ }
17
+ }
18
+ ],
19
+ "qualifiers": [
20
+ {
21
+ "name": "language",
22
+ "typeName": "language",
23
+ "defaultPriority": 600
24
+ },
25
+ {
26
+ "name": "device",
27
+ "typeName": "device",
28
+ "defaultPriority": 500
29
+ }
30
+ ],
31
+ "resourceTypes": [
32
+ {
33
+ "name": "json",
34
+ "typeName": "json"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "Qualifier Default Values Demo",
3
+ "description": "Configuration demonstrating qualifier default values functionality with language, territory, and device qualifiers",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language",
8
+ "configuration": {
9
+ "allowContextList": true
10
+ }
11
+ },
12
+ {
13
+ "name": "territory",
14
+ "systemType": "territory",
15
+ "configuration": {
16
+ "allowContextList": false,
17
+ "acceptLowercase": true
18
+ }
19
+ },
20
+ {
21
+ "name": "device",
22
+ "systemType": "literal",
23
+ "configuration": {
24
+ "allowContextList": true,
25
+ "caseSensitive": false,
26
+ "enumeratedValues": ["phone", "tablet", "desktop", "watch", "tv"]
27
+ }
28
+ },
29
+ {
30
+ "name": "environment",
31
+ "systemType": "literal",
32
+ "configuration": {
33
+ "allowContextList": false,
34
+ "caseSensitive": true,
35
+ "enumeratedValues": ["development", "staging", "production"]
36
+ }
37
+ }
38
+ ],
39
+ "qualifiers": [
40
+ {
41
+ "name": "language",
42
+ "typeName": "language",
43
+ "defaultPriority": 600,
44
+ "defaultValue": "en-US, en-CA, en-GB"
45
+ },
46
+ {
47
+ "name": "territory",
48
+ "typeName": "territory",
49
+ "defaultPriority": 500,
50
+ "defaultValue": "US"
51
+ },
52
+ {
53
+ "name": "device",
54
+ "typeName": "device",
55
+ "defaultPriority": 400,
56
+ "defaultValue": "desktop, tablet"
57
+ },
58
+ {
59
+ "name": "environment",
60
+ "typeName": "environment",
61
+ "defaultPriority": 300,
62
+ "defaultValue": "production"
63
+ }
64
+ ],
65
+ "resourceTypes": [
66
+ {
67
+ "name": "json",
68
+ "typeName": "json"
69
+ }
70
+ ]
71
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "Territory-First Configuration",
3
+ "description": "Configuration that prioritizes territory/region over language, useful for region-specific applications",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "language",
7
+ "systemType": "language"
8
+ },
9
+ {
10
+ "name": "territory",
11
+ "systemType": "territory",
12
+ "configuration": {
13
+ "allowContextList": true
14
+ }
15
+ },
16
+ {
17
+ "name": "role",
18
+ "systemType": "literal",
19
+ "configuration": {
20
+ "allowContextList": false,
21
+ "caseSensitive": true,
22
+ "enumeratedValues": ["ADMIN", "USER", "GUEST", "MODERATOR"]
23
+ }
24
+ },
25
+ {
26
+ "name": "environment",
27
+ "systemType": "literal",
28
+ "configuration": {
29
+ "enumeratedValues": ["development", "staging", "production"]
30
+ }
31
+ }
32
+ ],
33
+ "qualifiers": [
34
+ {
35
+ "name": "homeTerritory",
36
+ "typeName": "territory",
37
+ "defaultPriority": 950,
38
+ "token": "home",
39
+ "tokenIsOptional": false
40
+ },
41
+ {
42
+ "name": "currentTerritory",
43
+ "typeName": "territory",
44
+ "defaultPriority": 900
45
+ },
46
+ {
47
+ "name": "language",
48
+ "typeName": "language",
49
+ "defaultPriority": 700
50
+ },
51
+ {
52
+ "name": "role",
53
+ "typeName": "role",
54
+ "defaultPriority": 600
55
+ },
56
+ {
57
+ "name": "env",
58
+ "typeName": "environment",
59
+ "defaultPriority": 500
60
+ }
61
+ ],
62
+ "resourceTypes": [
63
+ {
64
+ "name": "json",
65
+ "typeName": "json"
66
+ }
67
+ ]
68
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "territory-hierarchy-test",
3
+ "description": "Test configuration for territory qualifier type hierarchy support",
4
+ "qualifierTypes": [
5
+ {
6
+ "name": "territory",
7
+ "systemType": "territory",
8
+ "configuration": {
9
+ "allowContextList": true,
10
+ "acceptLowercase": true,
11
+ "allowedTerritories": ["US", "PR", "VI", "CA", "GB", "DE"],
12
+ "hierarchy": {
13
+ "PR": "US",
14
+ "VI": "US"
15
+ }
16
+ }
17
+ }
18
+ ],
19
+ "qualifiers": [
20
+ {
21
+ "name": "territory",
22
+ "type": "territory"
23
+ }
24
+ ],
25
+ "resourceTypes": [
26
+ {
27
+ "name": "message",
28
+ "qualifiers": ["territory"]
29
+ }
30
+ ]
31
+ }