From 23e6d4f7b7dc15584ceabc88d3b4cec982e71814 Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:03:39 +0100 Subject: [PATCH 1/6] feat: option to disable the button --- .../src/lib/components/button/button.component.html | 4 ++-- .../components/src/lib/components/button/button.component.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/components/src/lib/components/button/button.component.html b/projects/components/src/lib/components/button/button.component.html index 0df2206..d2eed00 100644 --- a/projects/components/src/lib/components/button/button.component.html +++ b/projects/components/src/lib/components/button/button.component.html @@ -1,11 +1,11 @@ @switch (type) { @case ('raised') { - } @case ('stroked') { - } diff --git a/projects/components/src/lib/components/button/button.component.ts b/projects/components/src/lib/components/button/button.component.ts index 1736f1d..45e3ed3 100644 --- a/projects/components/src/lib/components/button/button.component.ts +++ b/projects/components/src/lib/components/button/button.component.ts @@ -17,6 +17,7 @@ export class ButtonComponent { @Input({ required: true }) type!: 'raised' | 'stroked'; @Input({ required: true }) function!: () => Promise | void; + @Input({ required: false }) disabled: boolean = false; @Input({ required: false }) color: 'primary' | 'accent' | 'warn' = 'primary'; protected loading = false; From 5f3308802158795e2219cff81d0c729b5c894f6c Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:03:57 +0100 Subject: [PATCH 2/6] doc: example in the doc --- src/app/components/loading/loading.component.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/components/loading/loading.component.html b/src/app/components/loading/loading.component.html index 69f6ae0..2d4f76a 100644 --- a/src/app/components/loading/loading.component.html +++ b/src/app/components/loading/loading.component.html @@ -14,3 +14,7 @@ {{ longText }}

+ + {{ longText }} + +

From 49660cd9f573a41186fcdea0d3efd71acf610636 Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:07:34 +0100 Subject: [PATCH 3/6] doc: text in example --- src/app/components/loading/loading.component.html | 1 + src/app/components/loading/loading.component.ts | 2 ++ src/app/i18n/de.json | 3 ++- src/app/i18n/en.json | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/components/loading/loading.component.html b/src/app/components/loading/loading.component.html index 2d4f76a..f8ee22c 100644 --- a/src/app/components/loading/loading.component.html +++ b/src/app/components/loading/loading.component.html @@ -1,3 +1,4 @@ +

content.text.loading_button

{{ text }} diff --git a/src/app/components/loading/loading.component.ts b/src/app/components/loading/loading.component.ts index c4a136c..e120a68 100644 --- a/src/app/components/loading/loading.component.ts +++ b/src/app/components/loading/loading.component.ts @@ -2,6 +2,7 @@ import { Component, signal } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { ButtonComponent } from '@bolzplatzarena/components/button'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'app-loading', @@ -10,6 +11,7 @@ import { ButtonComponent } from '@bolzplatzarena/components/button'; ButtonComponent, MatButtonModule, MatProgressSpinnerModule, + TranslateModule, ], templateUrl: './loading.component.html', }) diff --git a/src/app/i18n/de.json b/src/app/i18n/de.json index 00ebd93..e0d3d0e 100644 --- a/src/app/i18n/de.json +++ b/src/app/i18n/de.json @@ -9,7 +9,8 @@ "enum": "Enums sind toll, Enums sind wichtig. Aber manchmal sind sie schwer zu nutzen, vor allem in Tempülates.
Hier findet ihr Tools die euch unterstützen.", "enum_options": "Dies ist eine Methode um aus einem Enum eine Datenquelle für ein Dropdown zu machen und dabei die Werte auch noch zu übersetzen.", "pipe": "Die Pipe gibt euch die Möglichkeit den Enum-Schlüssel in einer View zu nutzen. Dies ist vor allem dann wichtig, wenn das Enum nicht auf einem String basiert.", - "dialogs": "Diese Bibliothek gibt einige Möglichkeiten, einfach Dialoge zu erstellen und vorgefertigte Dialoge zu nutzen." + "dialogs": "Diese Bibliothek gibt einige Möglichkeiten, einfach Dialoge zu erstellen und vorgefertigte Dialoge zu nutzen.", + "loading_button": "Unterschiedliche Varianten für die Loading-Button." }, "headline": { "first": "Bolzplatzarena Components", diff --git a/src/app/i18n/en.json b/src/app/i18n/en.json index ee2b784..e8c580b 100644 --- a/src/app/i18n/en.json +++ b/src/app/i18n/en.json @@ -9,7 +9,8 @@ "enum": "Sometimes it is hard to handle enums, but it is important to use an enum instead of just using a number or a string.\n
Here you can find some little helpers, which enable you to use enum for material select or in the tempalte as a\n string very easily.", "enum_options": "Easy way to use a typescript enum as source of the material select.", "pipe": "The pipe provides an easy way to get the selected key of an enumeration in the template.", - "dialogs": "This library provides a way to use dialogs in your application." + "dialogs": "This library provides a way to use dialogs in your application.", + "loading_button": "Unterschiedliche Varianten für die Loading-Button." }, "headline": { "first": "Bolzplatzarena Components", From dce0b69d64a5e9f39b4dd100ae861e73c515861b Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:08:53 +0100 Subject: [PATCH 4/6] doc: fix styling in enum docs --- src/app/components/enum/enum.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/enum/enum.component.html b/src/app/components/enum/enum.component.html index e831ee1..9cb9755 100644 --- a/src/app/components/enum/enum.component.html +++ b/src/app/components/enum/enum.component.html @@ -1,7 +1,7 @@ -

content.headline.enum

-

-

content.headline.enum_options

-

content.text.enum_options

+

content.headline.enum

+

+

content.headline.enum_options

+

content.text.enum_options

Hero Type @@ -12,8 +12,8 @@

content.headline.enum_options

}
-

content.headline.pipe

-

content.text.pipe

+

content.headline.pipe

+

content.text.pipe

Original value: {{ HeroType.Scientist }} Original value: {{ '{{ HeroType.Scientist }}' }} From 74cacae9fe4aca45df90850f9b73c85ead73f6d5 Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:10:34 +0100 Subject: [PATCH 5/6] doc: fix styling in table docs --- src/app/components/table/table.component.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/components/table/table.component.html b/src/app/components/table/table.component.html index 5e95015..5433e84 100644 --- a/src/app/components/table/table.component.html +++ b/src/app/components/table/table.component.html @@ -1,6 +1,6 @@ -

content.headline.table

-

content.text.table

-

content.text.column

+

content.headline.table

+

content.text.table

+

content.text.column

  • Date
  • Enumeration
  • @@ -42,5 +42,5 @@

    content.headline.observables

    (editEvent)="view($event)" translateKey="hero.components.hero-list."> -

    content.headline.options

    -

    content.text.options

    +

    content.headline.options

    +

    content.text.options

    From 14407718244f3eef6e023285ae8108d1bcb35cb1 Mon Sep 17 00:00:00 2001 From: Thomas Renger Date: Sun, 24 Dec 2023 12:11:28 +0100 Subject: [PATCH 6/6] doc: fix styling in dialog docs --- src/app/components/dialogs/dialogs.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/dialogs/dialogs.component.html b/src/app/components/dialogs/dialogs.component.html index f9e2bf2..dacac16 100644 --- a/src/app/components/dialogs/dialogs.component.html +++ b/src/app/components/dialogs/dialogs.component.html @@ -1,5 +1,5 @@ -

    content.headline.dialogs

    -

    content.text.dialogs

    +

    content.headline.dialogs

    +

    content.text.dialogs

    dialog.simple_dialog.title

    dialog.simple_dialog.content