-
Notifications
You must be signed in to change notification settings - Fork 936
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4205 from activepieces/reafctor/piece-form
refactor: piece form
- Loading branch information
Showing
142 changed files
with
3,186 additions
and
2,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,4 +293,4 @@ | |
"nx": { | ||
"includedScripts": [] | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...e/components/src/lib/embedded-connection-dialog/embedded-connection-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "@activepieces/pieces-framework", | ||
"version": "0.7.27", | ||
"version": "0.7.28", | ||
"type": "commonjs" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
packages/ui/common/src/lib/components/control-description/control-description.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { AbstractControl } from '@angular/forms'; | ||
import { | ||
BOTTOM_MARGIN_FOR_DESCRIPTION_IN_PIECE_PROPERTIES_FORM, | ||
EMPTY_SPACE_BETWEEN_INPUTS_IN_PIECE_PROPERTIES_FORM, | ||
} from '../../utils/consts'; | ||
import { CommonModule } from '@angular/common'; | ||
import { MarkdownModule } from 'ngx-markdown'; | ||
import { CheckOverflowDirective } from '../../directives'; | ||
@Component({ | ||
selector: 'ap-control-description', | ||
standalone: true, | ||
imports: [CommonModule, MarkdownModule, CheckOverflowDirective], | ||
template: ` | ||
@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) | ||
" | ||
> | ||
<div | ||
class="ap-line-clamp-1" | ||
[style.display]="isExpanded ? 'block' : '-webkit-box'" | ||
[class.ap-h-[24px]]="!isExpanded" | ||
> | ||
<div | ||
class="ap-typography-caption" | ||
apCheckOverflow | ||
(isOverflowed)="isOverFlown = $event" | ||
> | ||
<markdown | ||
[data]=" | ||
passedFormControl.touched && passedFormControl.invalid | ||
? errorMessageOpeningTag + | ||
errorMessage + | ||
errorMessageClosingTag + | ||
' ' + | ||
description | ||
: description | ||
" | ||
> | ||
</markdown> | ||
</div> | ||
</div> | ||
<div class="ap-flex ap-items-start"> | ||
<button | ||
class="ap-underline ap-typography-caption ap-mt-2" | ||
*ngIf="isExpanded || isOverFlown" | ||
(click)="isExpanded = !isExpanded" | ||
> | ||
{{ isExpanded ? 'less' : 'more' }} | ||
</button> | ||
</div> | ||
</div> | ||
} | ||
`, | ||
}) | ||
export class ControlDescriptionComponent { | ||
readonly BOTTOM_MARGIN_FOR_DESCRIPTION_IN_PIECE_PROPERTIES_FORM = | ||
BOTTOM_MARGIN_FOR_DESCRIPTION_IN_PIECE_PROPERTIES_FORM; | ||
readonly MIN_SPACING_BETWEEN_INPUTS = | ||
EMPTY_SPACE_BETWEEN_INPUTS_IN_PIECE_PROPERTIES_FORM; | ||
isOverFlown = false; | ||
isExpanded = false; | ||
errorMessageOpeningTag = "<span class='ap-text-danger'>"; | ||
errorMessageClosingTag = '</span>'; | ||
@Input({ required: true }) errorMessage = ''; | ||
@Input({ required: true }) description = ''; | ||
@Input({ required: true }) passedFormControl: AbstractControl; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/ui/common/src/lib/store/app-connections/connections-dropdown-item.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import { DropdownOption } from '@activepieces/pieces-framework'; | ||
|
||
export interface ConnectionDropdownItem { | ||
label: { pieceName: string | null; name: string }; | ||
value: string; | ||
} | ||
|
||
export type PieceConnectionDropdownItem = | ||
DropdownOption<`{{connections['${string}']}}`>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './app-connections.action'; | ||
export * from './app-connections.selector'; | ||
export * from './app-connections.reducer'; | ||
export { PieceConnectionDropdownItem } from './connections-dropdown-item'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
export * from './lib/interpolating-text-form-control/builder-autocomplete-dropdown-handler/builder-autocomplete-dropdown-handler.component'; | ||
export * from './lib/components/interpolating-text-form-control/builder-autocomplete-dropdown-handler/builder-autocomplete-dropdown-handler.component'; | ||
export * from './lib/ui-feature-builder-form-controls.module'; | ||
export * from './lib/models/piece-properties-form-value'; | ||
export * from './lib/interpolating-text-form-control/utils'; | ||
export * from './lib/interpolating-text-form-control/interpolating-text-form-control.component'; | ||
export * from './lib/array-form-control/array-form-control.component'; | ||
export * from './lib/branch-condition-form-control/branch-condition-form-control.component'; | ||
export * from './lib/branch-conditions-group-form-control/branch-conditions-group-form-control.component'; | ||
export * from './lib/code-artifact-form-control/code-artifact-control-fullscreen/add-npm-package-modal/add-npm-package-modal.component'; | ||
export * from './lib/code-artifact-form-control/code-artifact-control-fullscreen/code-artifact-control-fullscreen.component'; | ||
export * from './lib/code-artifact-form-control/code-artifact-form-control.component'; | ||
export * from './lib/piece-properties-form/piece-properties-form.component'; | ||
export * from './lib/dictionary-form-control/dictionary-form-control.component'; | ||
export * from './lib/interpolating-text-form-control/fixed-selection-mention'; | ||
export * from './lib/interpolating-text-form-control/builder-autocomplete-mentions-dropdown/builder-autocomplete-mentions-dropdown.component'; | ||
export * from './lib/action-error-handling-form-control/action-error-handling-form-control.component'; | ||
|
||
export * from './lib/components/interpolating-text-form-control/utils'; | ||
export * from './lib/components/interpolating-text-form-control/interpolating-text-form-control.component'; | ||
export * from './lib/components/array-form-control/array-form-control.component'; | ||
export * from './lib/components/branch-condition-form-control/branch-condition-form-control.component'; | ||
export * from './lib/components/branch-conditions-group-form-control/branch-conditions-group-form-control.component'; | ||
export * from './lib/components/code-artifact-form-control/code-artifact-control-fullscreen/add-npm-package-modal/add-npm-package-modal.component'; | ||
export * from './lib/components/code-artifact-form-control/code-artifact-control-fullscreen/code-artifact-control-fullscreen.component'; | ||
export * from './lib/components/code-artifact-form-control/code-artifact-form-control.component'; | ||
export * from './lib/components/dictionary-form-control/dictionary-form-control.component'; | ||
export * from './lib/components/interpolating-text-form-control/fixed-selection-mention'; | ||
export * from './lib/components/interpolating-text-form-control/builder-autocomplete-mentions-dropdown/builder-autocomplete-mentions-dropdown.component'; | ||
export * from './lib/components/action-error-handling-form-control/action-error-handling-form-control.component'; | ||
export * from './lib/components/new-piece-properties-form/piece-properties-form.component'; | ||
export * from './lib/components/action-or-trigger-dropdown/action-or-trigger-dropdown.component'; | ||
import '@angular/localize/init'; | ||
export * from './lib/components/dynamic-property-control/dynamic-property-control.component'; |
Oops, something went wrong.