@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.
- package/.rush/temp/5fc90bc7c2ccf812114ea099111568e5429be2a2.tar.log +15 -0
- package/.rush/temp/chunked-rush-logs/ts-res-browser.build.chunks.jsonl +35 -0
- package/.rush/temp/operation/build/all.log +35 -0
- package/.rush/temp/operation/build/log-chunks.jsonl +35 -0
- package/.rush/temp/operation/build/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +1217 -0
- package/README.md +95 -0
- package/TS_RES_BROWSER_PLAN.md +689 -0
- package/babel.config.js +17 -0
- package/config/jest.config.json +13 -0
- package/config/rig.json +16 -0
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +62 -0
- package/dist/index.html +1 -0
- package/package.json +78 -0
- package/postcss.config.js +3 -0
- package/public/index.html +15 -0
- package/rush-logs/ts-res-browser.build.cache.log +3 -0
- package/rush-logs/ts-res-browser.build.log +35 -0
- package/src/App.tsx +153 -0
- package/src/cli.ts +44 -0
- package/src/components/common/FileImporter.tsx +138 -0
- package/src/components/common/NavigationWarningModal.tsx +62 -0
- package/src/components/layout/AppLayout.tsx +46 -0
- package/src/components/layout/Header.tsx +22 -0
- package/src/components/layout/MessagesWindow.tsx +108 -0
- package/src/components/layout/Sidebar.tsx +92 -0
- package/src/components/tools/CompiledBrowser.tsx +949 -0
- package/src/components/tools/ConfigurationTool.tsx +1402 -0
- package/src/components/tools/FilterTool.tsx +1027 -0
- package/src/components/tools/ImportTool.tsx +246 -0
- package/src/components/tools/ResolutionViewer.tsx +1672 -0
- package/src/components/tools/SourceBrowser.tsx +496 -0
- package/src/hooks/useAppState.ts +107 -0
- package/src/hooks/useFileImport.ts +86 -0
- package/src/hooks/useNavigationWarning.ts +67 -0
- package/src/hooks/useResourceManager.ts +244 -0
- package/src/index.css +38 -0
- package/src/main.tsx +16 -0
- package/src/types/app.ts +62 -0
- package/src/types/fileSystemAccess.d.ts +94 -0
- package/src/utils/browserFileTreeAccessors.ts +245 -0
- package/src/utils/fileImport.ts +334 -0
- package/src/utils/filterResources.ts +677 -0
- package/src/utils/tsResIntegration.ts +467 -0
- package/tailwind.config.js +21 -0
- package/test-data/README.md +184 -0
- package/test-data/config-variations/README.md +64 -0
- package/test-data/config-variations/composition-terminology.json +112 -0
- package/test-data/config-variations/enterprise-complex.json +129 -0
- package/test-data/config-variations/gaming-app.json +87 -0
- package/test-data/config-variations/high-priority-language.json +65 -0
- package/test-data/config-variations/minimal-basic.json +37 -0
- package/test-data/config-variations/qualifier-default-values.json +71 -0
- package/test-data/config-variations/territory-first.json +68 -0
- package/test-data/config-variations/territory-hierarchy-test.json +31 -0
- package/test-data/config-variations/territory-hierarchy-unconstrained.json +32 -0
- package/test-data/default-matching-test/greeting.res.json +83 -0
- package/test-data/default-matching-test/only-defaults.res.json +48 -0
- package/test-data/sample-project/package.json +27 -0
- package/test-data/sample-project/src/resources/app-config.json +27 -0
- package/test-data/sample-project/src/resources/app.json +177 -0
- package/test-data/sample-project/src/resources/config/app.env=development.json +21 -0
- package/test-data/sample-project/src/resources/config/app.json +21 -0
- package/test-data/sample-project/src/resources/config/app.platform=mobile.json +23 -0
- package/test-data/sample-project/src/resources/feature-flags.json +23 -0
- package/test-data/sample-project/src/resources/home=CA/common.json +16 -0
- package/test-data/sample-project/src/resources/images/density=hdpi.json +29 -0
- package/test-data/sample-project/src/resources/images/home.json +29 -0
- package/test-data/sample-project/src/resources/images/logout.json +14 -0
- package/test-data/sample-project/src/resources/images/settings.json +14 -0
- package/test-data/sample-project/src/resources/images/ui-icons.json +29 -0
- package/test-data/sample-project/src/resources/images/user.density=hdpi.json +14 -0
- package/test-data/sample-project/src/resources/images/user.json +14 -0
- package/test-data/sample-project/src/resources/lang=en-US/common.json +15 -0
- package/test-data/sample-project/src/resources/language=en-CA/ui-terms.json +19 -0
- package/test-data/sample-project/src/resources/language=en-GB/ui-terms.json +30 -0
- package/test-data/sample-project/src/resources/language=fr-CA/ui-terms.json +25 -0
- package/test-data/sample-project/src/resources/language=nl-BE/ui-terms.json +17 -0
- package/test-data/sample-project/src/resources/region=europe/feature-flags.json +17 -0
- package/test-data/sample-project/src/resources/region=north-america/feature-flags.json +18 -0
- package/test-data/sample-project/src/resources/strings/dashboard.home=CA,language=fr.json +20 -0
- package/test-data/sample-project/src/resources/strings/dashboard.json +18 -0
- package/test-data/sample-project/src/resources/strings/dashboard.role=admin.json +23 -0
- package/test-data/sample-project/src/resources/strings/dashboard.role=user.json +21 -0
- package/test-data/sample-project/src/resources/strings/language=en-US.json +16 -0
- package/test-data/sample-project/src/resources/strings.json +78 -0
- package/test-data/sample-project/src/resources/territory=BE/app-config.json +19 -0
- package/test-data/sample-project/src/resources/territory=CA/app-config.json +21 -0
- package/test-data/sample-project/src/resources/territory=GB/app-config.json +25 -0
- package/test-data/sample-project/src/resources/territory=NL/app-config.json +25 -0
- package/test-data/sample-project/src/resources/ui-terms.json +96 -0
- package/test-data/sample-project/src/resources-config.json +111 -0
- package/tsconfig.json +27 -0
- package/webpack.config.js +54 -0
package/babel.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [
|
|
3
|
+
[
|
|
4
|
+
'@babel/preset-env',
|
|
5
|
+
{
|
|
6
|
+
targets: {
|
|
7
|
+
browsers: ['last 2 versions', 'not dead']
|
|
8
|
+
},
|
|
9
|
+
useBuiltIns: 'usage',
|
|
10
|
+
corejs: 3
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
'@babel/preset-react',
|
|
14
|
+
'@babel/preset-typescript'
|
|
15
|
+
],
|
|
16
|
+
plugins: []
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"preset": "ts-jest",
|
|
3
|
+
"testEnvironment": "jsdom",
|
|
4
|
+
"roots": ["<rootDir>/src"],
|
|
5
|
+
"testMatch": ["**/__tests__/**/*.ts?(x)", "**/?(*.)+(spec|test).ts?(x)"],
|
|
6
|
+
"transform": {
|
|
7
|
+
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
8
|
+
},
|
|
9
|
+
"moduleNameMapping": {
|
|
10
|
+
"^@/(.*)$": "<rootDir>/src/$1"
|
|
11
|
+
},
|
|
12
|
+
"setupFilesAfterEnv": ["<rootDir>/src/setupTests.ts"]
|
|
13
|
+
}
|
package/config/rig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The "rig.json" file directs tools to look for their config files in an external package.
|
|
2
|
+
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
|
|
3
|
+
{
|
|
4
|
+
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
|
5
|
+
/**
|
|
6
|
+
* (Required) The name of the rig package to inherit from.
|
|
7
|
+
* It should be an NPM package name with the "-rig" suffix.
|
|
8
|
+
*/
|
|
9
|
+
"rigPackageName": "@rushstack/heft-web-rig",
|
|
10
|
+
/**
|
|
11
|
+
* (Optional) Selects a config profile from the rig package. The name must consist of
|
|
12
|
+
* lowercase alphanumeric words separated by hyphens, for example "sample-profile".
|
|
13
|
+
* If omitted, then the "default" profile will be used."
|
|
14
|
+
*/
|
|
15
|
+
"rigProfile": "app"
|
|
16
|
+
}
|