@crowdin/app-project-module 0.22.6 → 0.23.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/README.md CHANGED
@@ -795,6 +795,7 @@ Framework also supports following modules:
795
795
  - [organization-menu module](https://support.crowdin.com/enterprise/crowdin-apps-modules/#organization-menu-module)
796
796
  - [editor-right-panel module](https://support.crowdin.com/crowdin-apps-modules/#editor-panels-module)
797
797
  - [project-menu module](https://support.crowdin.com/crowdin-apps-modules/#project-menu-module)
798
+ - [project-menu-crowdsource module](https://developer.crowdin.com/crowdin-apps-module-project-menu-crowdsource/)
798
799
  - [project-tools module](https://support.crowdin.com/crowdin-apps-modules/#tools-module)
799
800
  - [project-reports module](https://support.crowdin.com/crowdin-apps-modules/#reports-module)
800
801
 
@@ -812,7 +813,7 @@ const configuration = {
812
813
  description: 'Sample App description',
813
814
  dbFolder: __dirname,
814
815
  imagePath: __dirname + '/' + 'logo.png',
815
- projectReports: { //can be editorRightPanel, projectMenu, projectTools
816
+ projectReports: { //can be editorRightPanel, projectMenu, projectTools, projectMenuCrowdsource
816
817
  imagePath: __dirname + '/' + 'reports.png',
817
818
  fileName: 'reports.html', //optional, only needed if file is not index.html
818
819
  uiPath: __dirname + '/' + 'public' // folder where UI of the module is located (js, html, css files)
@@ -77,6 +77,15 @@ function handle(config) {
77
77
  },
78
78
  ];
79
79
  }
80
+ if (config.projectMenuCrowdsource) {
81
+ modules['project-menu-crowdsource'] = [
82
+ {
83
+ key: config.identifier + '-project-menu-crowdsource',
84
+ name: config.name,
85
+ url: '/project-menu-crowdsource/' + (config.projectMenuCrowdsource.fileName || 'index.html'),
86
+ },
87
+ ];
88
+ }
80
89
  if (config.projectTools) {
81
90
  modules['project-tools'] = [
82
91
  {
package/out/index.js CHANGED
@@ -154,6 +154,9 @@ function addCrowdinEndpoints(app, config) {
154
154
  if (config.projectMenu) {
155
155
  app.use('/project-menu', (0, ui_module_1.default)(config), express_1.default.static(config.projectMenu.uiPath));
156
156
  }
157
+ if (config.projectMenuCrowdsource) {
158
+ app.use('/project-menu-crowdsource', (0, ui_module_1.default)(config), express_1.default.static(config.projectMenuCrowdsource.uiPath));
159
+ }
157
160
  if (config.projectTools) {
158
161
  app.get('/logo/tools/logo.png', (req, res) => { var _a; return res.sendFile(((_a = config.projectTools) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath || (0, path_1.join)(__dirname, 'logo.png')); });
159
162
  app.use('/tools', (0, ui_module_1.default)(config), express_1.default.static(config.projectTools.uiPath));
@@ -92,6 +92,10 @@ export interface Config extends ImagePath {
92
92
  * project menu module
93
93
  */
94
94
  projectMenu?: UiModule;
95
+ /**
96
+ * project menu crowdsource module
97
+ */
98
+ projectMenuCrowdsource?: UiModule;
95
99
  /**
96
100
  * tools module
97
101
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.22.6",
3
+ "version": "0.23.0",
4
4
  "description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",