($selectedComponent = undefined)}
+ on:click|preventDefault={() => $selectedComponent = undefined}
>
@@ -64,7 +64,7 @@
'h-full w-full flex justify-center align-center',
gridComponent.data.card ? 'border border-gray-100' : ''
)}
- on:click|preventDefault|stopPropagation={() => {
+ on:click|stopPropagation={() => {
if (!$connectingInput.opened) {
$selectedComponent = dataItem.data.id
}
diff --git a/frontend/src/lib/components/apps/editor/componentsPanel/data.ts b/frontend/src/lib/components/apps/editor/componentsPanel/data.ts
index caa7a44ad3..5f6051ab8d 100644
--- a/frontend/src/lib/components/apps/editor/componentsPanel/data.ts
+++ b/frontend/src/lib/components/apps/editor/componentsPanel/data.ts
@@ -5,6 +5,7 @@ const inputs: ComponentSet = {
title: 'Inputs',
components: [
{
+ verticalAlignment: 'center',
id: 'textinputcomponent',
type: 'textinputcomponent',
componentInput: undefined,
@@ -20,6 +21,23 @@ const inputs: ComponentSet = {
card: false
},
{
+ verticalAlignment: 'center',
+ id: 'passwordinputcomponent',
+ type: 'passwordinputcomponent',
+ componentInput: undefined,
+ configuration: {
+ label: {
+ type: 'static',
+ visible: false,
+ value: 'Label',
+ fieldType: 'textarea',
+ defaultValue: 'Label'
+ }
+ },
+ card: false
+ },
+ {
+ verticalAlignment: 'center',
id: 'numberinputcomponent',
type: 'numberinputcomponent',
componentInput: undefined,
@@ -34,6 +52,37 @@ const inputs: ComponentSet = {
},
card: false
},
+ {
+ verticalAlignment: 'center',
+ id: 'dateinputcomponent',
+ type: 'dateinputcomponent',
+ componentInput: undefined,
+ configuration: {
+ label: {
+ type: 'static',
+ visible: false,
+ value: 'Title',
+ fieldType: 'textarea',
+ defaultValue: 'Title'
+ },
+ minDate: {
+ type: 'static',
+ visible: false,
+ value: '',
+ fieldType: 'date',
+ defaultValue: ''
+ },
+ maxDate: {
+ type: 'static',
+ visible: false,
+ value: '',
+ fieldType: 'date',
+ defaultValue: ''
+ },
+ },
+ card: false,
+ softWrap: true
+ },
{
...defaultAlignement,
id: 'checkboxcomponent',
@@ -51,7 +100,7 @@ const inputs: ComponentSet = {
card: false
},
{
- ...defaultAlignement,
+ verticalAlignment: 'center',
id: 'selectcomponent',
type: 'selectcomponent',
componentInput: undefined,
@@ -133,7 +182,7 @@ const buttons: ComponentSet = {
card: false
},
{
- ...defaultAlignement,
+ horizontalAlignment: 'center',
id: 'formcomponent',
type: 'formcomponent',
componentInput: {
diff --git a/frontend/src/lib/components/apps/types.ts b/frontend/src/lib/components/apps/types.ts
index 659452d179..e01837df35 100644
--- a/frontend/src/lib/components/apps/types.ts
+++ b/frontend/src/lib/components/apps/types.ts
@@ -17,6 +17,8 @@ type BaseComponent
= {
export type TextComponent = BaseComponent<'textcomponent'>
export type TextInputComponent = BaseComponent<'textinputcomponent'>
+export type PasswordInputComponent = BaseComponent<'passwordinputcomponent'>
+export type DateInputComponent = BaseComponent<'dateinputcomponent'>
export type NumberInputComponent = BaseComponent<'numberinputcomponent'>
export type ButtonComponent = BaseComponent<'buttoncomponent'> & {
recomputeIds: string[] | undefined
@@ -67,6 +69,8 @@ export type AppComponent = BaseAppComponent &
| RunFormComponent
| DisplayComponent
| TextInputComponent
+ | PasswordInputComponent
+ | DateInputComponent
| NumberInputComponent
| BarChartComponent
| TableComponent
diff --git a/frontend/src/lib/components/apps/utils.ts b/frontend/src/lib/components/apps/utils.ts
index 31ef2202c3..e3101bad83 100644
--- a/frontend/src/lib/components/apps/utils.ts
+++ b/frontend/src/lib/components/apps/utils.ts
@@ -13,6 +13,8 @@ import {
Table2,
TextCursorInput,
Type,
+ Lock,
+ Calendar,
ToggleLeft
} from 'lucide-svelte'
import type { AppInput, AppInputs, InputType } from './inputType'
@@ -121,6 +123,14 @@ export const displayData: Record