Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulTheActivePiecer committed Mar 22, 2024
1 parent d5555c4 commit 1d0c073
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 64 deletions.
10 changes: 1 addition & 9 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"singleQuote": true,
"overrides": [
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
"singleQuote": true
}
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"postcss-import": "14.1.0",
"postcss-preset-env": "7.5.0",
"postcss-url": "10.1.3",
"prettier": "3.2.5",
"prettier": "2.8.4",
"tailwindcss": "3.3.3",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/activepieces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.4",
"dependencies": {
"@activepieces/pieces-common": "0.2.12",
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/pieces-framework": "0.7.28",
"tslib": "2.6.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@activepieces/piece-brilliant-directories",
"version": "0.0.6",
"dependencies": {
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/pieces-framework": "0.7.28",
"@activepieces/pieces-common": "0.2.12",
"tslib": "^2.6.2",
"@activepieces/shared": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/convertkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@activepieces/piece-convertkit",
"version": "0.1.3",
"dependencies": {
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/pieces-framework": "0.7.28",
"@activepieces/pieces-common": "0.2.12",
"tslib": "^2.6.2",
"@activepieces/shared": "*"
Expand Down
4 changes: 2 additions & 2 deletions packages/pieces/community/math-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@activepieces/piece-math-helper",
"version": "0.0.6",
"dependencies": {
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/shared": "0.10.97",
"@activepieces/pieces-framework": "0.7.28",
"@activepieces/shared": "0.10.98",
"tslib": "2.6.2"
}
}
4 changes: 2 additions & 2 deletions packages/pieces/community/retune/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.5",
"dependencies": {
"@activepieces/pieces-common": "0.2.12",
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/shared": "0.10.97",
"@activepieces/pieces-framework": "0.7.28",
"@activepieces/shared": "0.10.98",
"tslib": "2.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/pieces/community/saastic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@activepieces/piece-saastic",
"version": "0.0.6",
"dependencies": {
"@activepieces/pieces-framework": "0.7.25",
"@activepieces/pieces-framework": "0.7.28",
"@activepieces/pieces-common": "0.2.12",
"tslib": "^2.6.2",
"@activepieces/shared": "*"
Expand Down
1 change: 1 addition & 0 deletions packages/ui/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export * from './lib/pipe/comma-seperated.pipe';
export * from './lib/utils/consts';
export * from './lib/components/is-feature-enabled-base/is-feature-enabled-base.component';
export * from './lib/models/mention-list-item';
export * from './lib/components/control-description/control-description.component';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input } from '@angular/core';
import { Component, Input } from '@angular/core';
import { AbstractControl } from '@angular/forms';
import {
BOTTOM_MARGIN_FOR_DESCRIPTION_IN_PIECE_PROPERTIES_FORM,
Expand All @@ -12,21 +12,17 @@ import { CheckOverflowDirective } from '../../directives';
standalone: true,
imports: [CommonModule, MarkdownModule, CheckOverflowDirective],
template: `
@if( !(description || (passedFormControl.touched && passedFormControl.invalid)))
{
<div
[style.height]="MIN_SPACING_BETWEEN_INPUTS"
></div>
}
@else() {
@if( !(description || (passedFormControl.touched &&
passedFormControl.invalid))) {
<div [style.height]="MIN_SPACING_BETWEEN_INPUTS"></div>
} @else() {
<div
class="ap-flex ap-justify-between ap-markdown "
[style.marginBottom]="
BOTTOM_MARGIN_FOR_DESCRIPTION_IN_PIECE_PROPERTIES_FORM
"
*ngIf="
description ||
(passedFormControl.touched && passedFormControl.invalid)
description || (passedFormControl.touched && passedFormControl.invalid)
"
>
<div
Expand All @@ -39,7 +35,6 @@ import { CheckOverflowDirective } from '../../directives';
apCheckOverflow
(isOverflowed)="isOverFlown = $event"
>
<markdown
[data]="
passedFormControl.touched && passedFormControl.invalid
Expand All @@ -64,11 +59,7 @@ import { CheckOverflowDirective } from '../../directives';
</button>
</div>
</div>
}
}
`,
})
export class ControlDescriptionComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Output,
} from '@angular/core';
import { CommonModule } from '@angular/common';
import { UiCommonModule } from '@activepieces/ui/common';
import { UiCommonModule } from '@activepieces/ui/common';
import { FormControl, Validators } from '@angular/forms';
import {
ActionBase,
Expand All @@ -25,13 +25,13 @@ import { selectedTirggerOrActionPipe } from '../../pipes/selected-action-or-trig
UiCommonModule,
IsTriggerGuardPipe,
DropdownSelectedValuesPipe,
selectedTirggerOrActionPipe
selectedTirggerOrActionPipe,
],
templateUrl: './action-or-trigger-dropdown.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ActionOrTriggerDropdownComponent {
@Input({ required: true }) items: (ActionBase[] | TriggerBase[]) = [];
@Input({ required: true }) items: ActionBase[] | TriggerBase[] = [];
@Output() newActionOrTriggerSelected = new EventEmitter<
ActionBase | TriggerBase
>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import {
} from '@angular/forms';
import { map, Observable, tap } from 'rxjs';
import { InterpolatingTextFormControlComponent } from '../interpolating-text-form-control/interpolating-text-form-control.component';
import { InsertMentionOperation, PieceMetadataModel } from '@activepieces/ui/common';
import {
InsertMentionOperation,
PieceMetadataModel,
} from '@activepieces/ui/common';
import { ArrayProperty } from '@activepieces/pieces-framework';
import { PopulatedFlow } from '@activepieces/shared';

Expand Down Expand Up @@ -58,9 +61,7 @@ export class ArrayFormControlComponent implements ControlValueAccessor {
properties &&
Object.keys(properties).length > 0
) {
this.formArray.push(
this.fb.group({})
);
this.formArray.push(this.fb.group({}));
} else if (typeof propertiesValues === 'string') {
this.formArray.push(
new FormControl<string>(propertiesValues, { nonNullable: true })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class DictionaryFormControlComponent
this.valueChanges$ = this.form.valueChanges.pipe(
tap(() => {
this.dictionaryControlValueChanged();
}),
})
);
}
ngOnInit(): void {
Expand Down Expand Up @@ -81,7 +81,7 @@ export class DictionaryFormControlComponent

addPair(
pair: { key: string; value: unknown },
triggerChangeDetection = true,
triggerChangeDetection = true
) {
const pairGroup = this.fb.group({
key: new UntypedFormControl(pair.key),
Expand Down Expand Up @@ -124,13 +124,13 @@ export class DictionaryFormControlComponent
}
async addMention(
textControl: InterpolatingTextFormControlComponent,
mention: InsertMentionOperation,
mention: InsertMentionOperation
) {
await textControl.addMention(mention);
}
showMenu(
$event: MouseEvent | boolean,
mentionsDropdown: BuilderAutocompleteDropdownHandlerComponent,
mentionsDropdown: BuilderAutocompleteDropdownHandlerComponent
) {
//if it is boolean it means that the invocation of this function was from editorfocused
if (typeof $event !== 'boolean') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class JsonControlComponent {
beautify() {
try {
this.passedFormControl.setValue(
this.codeService.beautifyJson(JSON.parse(this.passedFormControl.value)),
this.codeService.beautifyJson(JSON.parse(this.passedFormControl.value))
);
} catch {
//ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export class StaticDropdownControlComponent {
searchControl = new FormControl('', { nonNullable: true });
readonly PropertyType = PropertyType;
dropdownCompareWithFunction(opt: unknown, formControlValue: string) {
return formControlValue !== undefined && deepEqual(opt, formControlValue,{ strict: true });
return (
formControlValue !== undefined &&
deepEqual(opt, formControlValue, { strict: true })
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ import { PieceProperty, PropertyType } from '@activepieces/pieces-framework';
standalone: true,
})
export class ExtractControlErrorMessagePipe implements PipeTransform {
transform(ctrl: FormControl, property: PieceProperty,isDynamicInput:boolean): Observable<string> {
transform(
ctrl: FormControl,
property: PieceProperty,
isDynamicInput: boolean
): Observable<string> {
return ctrl.valueChanges.pipe(
startWith(ctrl.value),
map(() => {
if(property.type === PropertyType.ARRAY && property.properties !== undefined && !isDynamicInput)
{
if (
property.type === PropertyType.ARRAY &&
property.properties !== undefined &&
!isDynamicInput
) {
return '';
}
if (ctrl.invalid && ctrl.hasError('required')) {
Expand All @@ -23,7 +30,7 @@ export class ExtractControlErrorMessagePipe implements PipeTransform {
return `${property.displayName} is invalid`;
}
return '';
}),
})
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { Pipe, PipeTransform } from '@angular/core';
pure: true,
})
export class selectedTirggerOrActionPipe implements PipeTransform {
transform(value:string, items: (ActionBase[] | TriggerBase[])): (string | undefined) {
return items.find(i => i.name === value)?.displayName;
transform(
value: string,
items: ActionBase[] | TriggerBase[]
): string | undefined {
return items.find((i) => i.name === value)?.displayName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const exportedDeclarations = [
BuilderAutocompleteMentionsDropdownComponent,
ActionErrorHandlingFormControlComponent,
PiecePropertiesFormComponent,
DynamicPropertyControlComponent
DynamicPropertyControlComponent,
];
@NgModule({
imports: [
Expand All @@ -83,7 +83,7 @@ const exportedDeclarations = [
ActionOrTriggerDropdownComponent,
DynamicInputToggleComponent,
ShouldShwoDynamicInputToggleAboveInputPipe,
FormGroupCasterPipe
FormGroupCasterPipe,
],
declarations: [
...exportedDeclarations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
FlowStatus,
ApId,
} from '@activepieces/shared';
import { PiecePropertyMap } from '../../../../../../pieces/community/framework/src';
import { PiecePropertyMap } from '@activepieces/pieces-framework';

export enum FlowsActionType {
// Flow Version Modifying Action
Expand Down Expand Up @@ -48,7 +48,7 @@ const updateTrigger = createAction(
);
const newTriggerOrActionSelected = createAction(
FlowsActionType.NEW_TRIGGER_OR_ACTION_SELECTED,
props<{ displayName: string; name: string; properties:PiecePropertyMap }>()
props<{ displayName: string; name: string; properties: PiecePropertyMap }>()
);
const moveAction = createAction(
FlowsActionType.MOVE_ACTION,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/feature-flow-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@angular/material": "17.1.2",
"@angular/cdk": "17.1.2",
"@activepieces/ui/feature-builder-left-sidebar": "0.0.1",
"@activepieces/shared": "0.10.97",
"@activepieces/shared": "0.10.98",
"@activepieces/ui-canvas-utils": "0.0.1",
"@ctrl/ngx-codemirror": "5.1.1",
"angular-svg-icon": "15.0.0",
Expand Down

0 comments on commit 1d0c073

Please sign in to comment.