@crowdin/app-project-module 0.22.4 → 0.22.6

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
@@ -450,6 +450,7 @@ configuration.projectIntegration.getConfiguration = (projectId, crowdinClient, i
450
450
  key: 'option',
451
451
  label: 'Select',
452
452
  type: 'select',
453
+ defaultValue: '12',
453
454
  isSearchable: true, //allow to search for option(s), default is `false`
454
455
  isMulti: true, //allow to select multiple options, default is `false`
455
456
  options: [
@@ -221,28 +221,7 @@ export interface IntegrationLogic {
221
221
  */
222
222
  integrationSearchListener?: boolean;
223
223
  }
224
- export declare type ConfigurationModalEntity = ConfigurationField | ConfigurationDelimeter;
225
- export interface ConfigurationField {
226
- key: string;
227
- label: string;
228
- type: 'text' | 'checkbox' | 'select';
229
- helpText?: string;
230
- /**
231
- * only for select
232
- */
233
- isMulti?: boolean;
234
- /**
235
- * only for select
236
- */
237
- isSearchable?: boolean;
238
- /**
239
- * only for select
240
- */
241
- options?: {
242
- label: string;
243
- value: string;
244
- }[];
245
- }
224
+ export declare type ConfigurationModalEntity = FormField | ConfigurationDelimeter;
246
225
  export interface ConfigurationDelimeter {
247
226
  label: string;
248
227
  }
@@ -25,6 +25,7 @@
25
25
 
26
26
  .login {
27
27
  margin-bottom: 10px;
28
+ overflow: unset;
28
29
  }
29
30
 
30
31
  .login img {
@@ -76,48 +76,60 @@
76
76
  {{#if key}}
77
77
  {{#ifeq type "checkbox"}}
78
78
  <crowdin-checkbox
79
- use-switch
80
- label="{{label}}"
81
- value="false"
82
79
  id="{{key}}-settings"
83
80
  key="{{key}}"
81
+ label="{{label}}"
82
+ value="false"
83
+ use-switch
84
84
  {{#if helpText}}
85
85
  help-text="{{helpText}}"
86
86
  {{/if}}
87
+ {{#if helpTextHtml}}
88
+ help-text-html="{{helpTextHtml}}"
89
+ {{/if}}
90
+ {{#ifeq defaultValue true}}
91
+ checked="{{defaultValue}}"
92
+ {{/ifeq}}
87
93
  >
88
94
  </crowdin-checkbox>
89
95
  {{/ifeq}}
90
96
  {{#ifeq type "select"}}
91
97
  <crowdin-select
92
98
  {{#if isMulti}}
93
- is-multi
94
- close-on-select="false"
99
+ is-multi
100
+ close-on-select="false"
95
101
  {{/if}}
96
102
  {{#if isSearchable}}
97
- is-searchable
103
+ is-searchable
98
104
  {{/if}}
99
- id="{{key}}-settings"
100
- key="{{key}}"
101
- label="{{label}}"
105
+ id="{{key}}-settings"
106
+ key="{{key}}"
107
+ label="{{label}}"
102
108
  {{#if helpText}}
103
109
  help-text="{{helpText}}"
104
110
  {{/if}}
111
+ {{#if helpTextHtml}}
112
+ help-text-html="{{helpTextHtml}}"
113
+ {{/if}}
105
114
  >
106
115
  {{#each options}}
107
- <option value="{{value}}">{{label}}</option>
116
+ <option {{#ifeq ../defaultValue value}} selected {{/ifeq}} value="{{value}}">{{label}}</option>
108
117
  {{/each}}
109
118
  </crowdin-select>
110
119
  {{/ifeq}}
111
120
  {{#ifeq type "text"}}
112
121
  <crowdin-input
113
- with-fixed-height
114
- label="{{label}}"
115
- value=""
116
122
  id="{{key}}-settings"
123
+ label="{{label}}"
117
124
  key="{{key}}"
125
+ with-fixed-height
118
126
  {{#if helpText}}
119
127
  help-text="{{helpText}}"
120
128
  {{/if}}
129
+ {{#if helpTextHtml}}
130
+ help-text-html="{{helpTextHtml}}"
131
+ {{/if}}
132
+ value="{{#if defaultValue}}{{defaultValue}}{{/if}}"
121
133
  >
122
134
  </crowdin-input>
123
135
  {{/ifeq}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.22.4",
3
+ "version": "0.22.6",
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",