Adding lists support in text component (#17065)

* Adding lists support in text component

* Fixing get textType

* Code cleanup

* Combining values into value
This commit is contained in:
Aasim Khan
2021-09-14 12:43:14 -07:00
committed by GitHub
parent 32e6a24115
commit 95e82d53e6
10 changed files with 79 additions and 37 deletions

View File

@@ -68,7 +68,7 @@ export class AddEditLanguageTab extends LanguageViewBase {
public get updatedData(): LanguageUpdateModel {
return {
language: {
name: this.languageName?.value || '',
name: this.languageName?.value as string || '',
contents: this._languageUpdateModel.language.contents
},
content: this.languageView?.updatedContent || this._languageUpdateModel.content,

View File

@@ -146,10 +146,10 @@ export class LanguageContentView extends LanguageViewBase {
public get updatedContent(): mssql.ExternalLanguageContent {
return {
pathToExtension: this.extensionFile.value || '',
extensionFileName: this.extensionFileName.value || '',
parameters: this.parameters.value || '',
environmentVariables: this.envVariables.value || '',
pathToExtension: this.extensionFile.value as string || '',
extensionFileName: this.extensionFileName.value as string || '',
parameters: this.parameters.value as string || '',
environmentVariables: this.envVariables.value as string || '',
isLocalFile: this._isLocalPath || false,
platform: this._languageContent?.platform
};

View File

@@ -183,7 +183,7 @@ export class AddNewPackageTab {
private async doPackageInstall(): Promise<void> {
let packageName = this.newPackagesName.value;
let packageName = this.newPackagesName.value as string;
let packageVersion = this.newPackagesVersions.value as string;
if (!packageName || packageName.length === 0 ||
!packageVersion || packageVersion.length === 0) {

View File

@@ -1252,7 +1252,7 @@ function createAzureSubscriptionComponent(
}
subscriptionInputInfo.labelComponent = label;
context.fieldInfo.subFields!.push({
label: label.value!,
label: label.value! as string,
variableName: context.fieldInfo.subscriptionVariableName
});
context.onNewInputComponentCreated(context.fieldInfo.subscriptionVariableName || context.fieldInfo.label, {
@@ -1407,7 +1407,7 @@ function createAzureResourceGroupsComponent(
}
resourceGroupInputInfo.labelComponent = label;
context.fieldInfo.subFields!.push({
label: label.value!,
label: label.value! as string,
variableName: context.fieldInfo.resourceGroupVariableName
});
const rgValueChangedEmitter = new vscode.EventEmitter<void>();
@@ -1517,7 +1517,7 @@ async function processAzureLocationsField(context: AzureLocationsFieldContext):
context.fieldInfo.subFields = context.fieldInfo.subFields || [];
if (context.fieldInfo.locationVariableName) {
context.fieldInfo.subFields!.push({
label: label.value!,
label: label.value! as string,
variableName: context.fieldInfo.locationVariableName
});
context.onNewInputComponentCreated(context.fieldInfo.locationVariableName, locationInputInfo);

View File

@@ -170,14 +170,14 @@ export class DashboardWidget {
const migrateButton = this.createTaskButton(view, migrateButtonMetadata);
const points = `${loc.PRE_REQ_1}
${loc.PRE_REQ_2}
${loc.PRE_REQ_3}`;
const preRequisiteListElement = view.modelBuilder.text().withProps({
value: points,
value: [
loc.PRE_REQ_1,
loc.PRE_REQ_2,
loc.PRE_REQ_3
],
CSSStyles: {
'padding-left': '15px',
'padding-left': '30px',
'margin-bottom': '5px',
'margin-top': '10px'
}