@crowdin/app-project-module 0.28.6 → 0.28.7

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.
@@ -84,7 +84,7 @@ function handle(config) {
84
84
  modules['organization-menu'] = [
85
85
  {
86
86
  key: config.identifier + '-resources',
87
- name: config.name,
87
+ name: config.organizationMenu.name || config.name,
88
88
  url: '/resources/' + (config.organizationMenu.fileName || 'index.html'),
89
89
  icon: (0, util_1.getLogoUrl)(config, config.organizationMenu, '/resources'),
90
90
  },
@@ -94,7 +94,7 @@ function handle(config) {
94
94
  modules['profile-resources-menu'] = [
95
95
  {
96
96
  key: config.identifier + '-profile-resources-menu',
97
- name: config.name,
97
+ name: config.profileResourcesMenu.name || config.name,
98
98
  url: '/resources/' + (config.profileResourcesMenu.fileName || 'index.html'),
99
99
  icon: (0, util_1.getLogoUrl)(config, config.profileResourcesMenu, '/resources'),
100
100
  environments: config.profileResourcesMenu.environments,
@@ -105,7 +105,7 @@ function handle(config) {
105
105
  modules['editor-right-panel'] = [
106
106
  {
107
107
  key: config.identifier + '-editor-panels',
108
- name: config.name,
108
+ name: config.editorRightPanel.name || config.name,
109
109
  url: '/editor-panels/' + (config.editorRightPanel.fileName || 'index.html'),
110
110
  modes: config.editorRightPanel.modes,
111
111
  environments: config.editorRightPanel.environments,
@@ -116,7 +116,7 @@ function handle(config) {
116
116
  modules['project-menu'] = [
117
117
  {
118
118
  key: config.identifier + '-project-menu',
119
- name: config.name,
119
+ name: config.projectMenu.name || config.name,
120
120
  url: '/project-menu/' + (config.projectMenu.fileName || 'index.html'),
121
121
  environments: config.projectMenu.environments,
122
122
  },
@@ -126,7 +126,7 @@ function handle(config) {
126
126
  modules['project-menu-crowdsource'] = [
127
127
  {
128
128
  key: config.identifier + '-project-menu-crowdsource',
129
- name: config.name,
129
+ name: config.projectMenuCrowdsource.name || config.name,
130
130
  url: '/project-menu-crowdsource/' + (config.projectMenuCrowdsource.fileName || 'index.html'),
131
131
  },
132
132
  ];
@@ -135,7 +135,7 @@ function handle(config) {
135
135
  modules['project-tools'] = [
136
136
  {
137
137
  key: config.identifier + '-tools',
138
- name: config.name,
138
+ name: config.projectTools.name || config.name,
139
139
  description: config.description,
140
140
  logo: (0, util_1.getLogoUrl)(config, config.projectTools, '/tools'),
141
141
  url: '/tools/' + (config.projectTools.fileName || 'index.html'),
@@ -147,7 +147,7 @@ function handle(config) {
147
147
  modules['project-reports'] = [
148
148
  {
149
149
  key: config.identifier + '-project-reports',
150
- name: config.name,
150
+ name: config.projectReports.name || config.name,
151
151
  description: config.description,
152
152
  logo: (0, util_1.getLogoUrl)(config, config.projectReports, '/reports'),
153
153
  url: '/reports/' + (config.projectReports.fileName || 'index.html'),
@@ -158,7 +158,7 @@ function handle(config) {
158
158
  modules['modal'] = [
159
159
  {
160
160
  key: config.identifier + '-modal',
161
- name: config.name,
161
+ name: config.modal.name || config.name,
162
162
  url: config.modal.url || '/modal/' + (config.modal.fileName || 'index.html'),
163
163
  environments: config.modal.environments,
164
164
  },
@@ -168,7 +168,7 @@ function handle(config) {
168
168
  modules['context-menu'] = [
169
169
  {
170
170
  key: config.identifier + '-context-menu',
171
- name: config.name,
171
+ name: config.contextMenu.name || config.name,
172
172
  description: config.description,
173
173
  options: Object.assign(Object.assign({ location: config.contextMenu.location, type: config.contextMenu.type }, (config.contextMenu.module
174
174
  ? {
@@ -177,6 +177,7 @@ function handle(config) {
177
177
  },
178
178
  }
179
179
  : {})), { url: '/context/' + (config.contextMenu.fileName || 'index.html') }),
180
+ signaturePatterns: config.contextMenu.signaturePatterns,
180
181
  environments: config.contextMenu.environments,
181
182
  },
182
183
  ];
@@ -683,6 +683,10 @@ export interface UiModule {
683
683
  * make module publicly available without crowdin context
684
684
  */
685
685
  allowUnauthorized?: boolean;
686
+ /**
687
+ * Module name
688
+ */
689
+ name?: string;
686
690
  }
687
691
  export interface EditorPanels extends UiModule {
688
692
  /**
@@ -706,6 +710,14 @@ export interface ContextModule {
706
710
  location: ContextOptionsLocations;
707
711
  type: ContextOptionsTypes;
708
712
  module: string;
713
+ /**
714
+ * Context menu name
715
+ */
716
+ name?: string;
717
+ /**
718
+ * Support fileName pattern only. Contains fileName field regular expressions used to detect the file type. If the file name matches any of the regular expressions, the context menu will be displayed.
719
+ */
720
+ signaturePatterns?: SignaturePatterns;
709
721
  }
710
722
  export declare enum ContextOptionsLocations {
711
723
  TM = "tm",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.28.6",
3
+ "version": "0.28.7",
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",