valtech-components 2.0.26 → 2.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +10 -0
- package/package.json +12 -14
- package/src/lib/components/atoms/avatar/avatar.component.scss +20 -0
- package/src/lib/components/atoms/avatar/avatar.component.ts +29 -0
- package/src/lib/components/atoms/avatar/types.ts +6 -0
- package/src/lib/components/atoms/box/box.component.scss +57 -0
- package/src/lib/components/atoms/box/box.component.ts +38 -0
- package/src/lib/components/atoms/box/types.ts +8 -0
- package/src/lib/components/atoms/button/button.component.scss +5 -0
- package/src/lib/components/atoms/button/button.component.ts +53 -0
- package/src/lib/components/atoms/button/factory.ts +444 -0
- package/src/lib/components/atoms/display/display.component.scss +17 -0
- package/src/lib/components/atoms/display/display.component.ts +25 -0
- package/src/lib/components/atoms/display/types.ts +7 -0
- package/src/lib/components/atoms/divider/divider.component.scss +62 -0
- package/src/lib/components/atoms/divider/divider.component.ts +18 -0
- package/src/lib/components/atoms/divider/types.ts +5 -0
- package/src/lib/components/atoms/href/href.component.scss +25 -0
- package/src/lib/components/atoms/href/href.component.ts +43 -0
- package/src/lib/components/atoms/href/types.ts +10 -0
- package/src/lib/components/atoms/icon/icon.component.scss +33 -0
- package/src/lib/components/atoms/icon/icon.component.ts +20 -0
- package/src/lib/components/atoms/icon/types.ts +7 -0
- package/src/lib/components/atoms/image/image.component.scss +70 -0
- package/src/lib/components/atoms/image/image.component.ts +40 -0
- package/src/lib/components/atoms/image/types.ts +11 -0
- package/src/lib/components/atoms/progress-bar/progress-bar.component.scss +22 -0
- package/src/lib/components/atoms/progress-bar/progress-bar.component.ts +29 -0
- package/src/lib/components/atoms/progress-bar/types.ts +10 -0
- package/src/lib/components/atoms/text/text.component.scss +33 -0
- package/src/lib/components/atoms/text/text.component.ts +23 -0
- package/src/lib/components/atoms/text/types.ts +8 -0
- package/src/lib/components/atoms/title/title.component.scss +17 -0
- package/src/lib/components/atoms/title/title.component.ts +27 -0
- package/src/lib/components/atoms/title/types.ts +8 -0
- package/src/lib/components/molecules/alert-box/alert-box.component.scss +10 -0
- package/src/lib/components/molecules/alert-box/alert-box.component.ts +28 -0
- package/{lib/components/molecules/alert-box/types.d.ts → src/lib/components/molecules/alert-box/types.ts} +4 -3
- package/src/lib/components/molecules/button-group/button-group.component.scss +31 -0
- package/src/lib/components/molecules/button-group/button-group.component.ts +44 -0
- package/src/lib/components/molecules/button-group/types.ts +7 -0
- package/src/lib/components/molecules/card/card.component.scss +46 -0
- package/src/lib/components/molecules/card/card.component.ts +218 -0
- package/src/lib/components/molecules/card/types.ts +36 -0
- package/src/lib/components/molecules/check-input/check-input.component.scss +0 -0
- package/src/lib/components/molecules/check-input/check-input.component.ts +16 -0
- package/src/lib/components/molecules/comment-input/comment-input.component.scss +0 -0
- package/src/lib/components/molecules/comment-input/comment-input.component.ts +22 -0
- package/src/lib/components/molecules/content-loader/content-loader.component.scss +42 -0
- package/src/lib/components/molecules/content-loader/content-loader.component.ts +27 -0
- package/src/lib/components/molecules/content-loader/types.ts +8 -0
- package/src/lib/components/molecules/date-input/date-input.component.scss +11 -0
- package/src/lib/components/molecules/date-input/date-input.component.ts +47 -0
- package/src/lib/components/molecules/email-input/email-input.component.scss +0 -0
- package/src/lib/components/molecules/email-input/email-input.component.ts +20 -0
- package/src/lib/components/molecules/file-input/file-input.component.scss +11 -0
- package/src/lib/components/molecules/file-input/file-input.component.ts +56 -0
- package/src/lib/components/molecules/hint/hint.component.scss +5 -0
- package/src/lib/components/molecules/hint/hint.component.ts +42 -0
- package/src/lib/components/molecules/hour-input/hour-input.component.scss +0 -0
- package/src/lib/components/molecules/hour-input/hour-input.component.ts +19 -0
- package/src/lib/components/molecules/link/link.component.scss +5 -0
- package/src/lib/components/molecules/link/link.component.ts +52 -0
- package/src/lib/components/molecules/link/types.ts +10 -0
- package/src/lib/components/molecules/links-cake/links-cake.component.scss +9 -0
- package/src/lib/components/molecules/links-cake/links-cake.component.ts +30 -0
- package/{lib/components/molecules/links-cake/types.d.ts → src/lib/components/molecules/links-cake/types.ts} +4 -3
- package/src/lib/components/molecules/notes-box/notes-box.component.scss +5 -0
- package/src/lib/components/molecules/notes-box/notes-box.component.ts +28 -0
- package/src/lib/components/molecules/notes-box/types.ts +9 -0
- package/src/lib/components/molecules/number-input/number-input.component.scss +0 -0
- package/src/lib/components/molecules/number-input/number-input.component.ts +19 -0
- package/src/lib/components/molecules/password-input/password-input.component.scss +7 -0
- package/src/lib/components/molecules/password-input/password-input.component.ts +33 -0
- package/src/lib/components/molecules/pin-input/pin-input.component.scss +13 -0
- package/src/lib/components/molecules/pin-input/pin-input.component.ts +42 -0
- package/src/lib/components/molecules/progress-status/progress-status.component.scss +41 -0
- package/src/lib/components/molecules/progress-status/progress-status.component.ts +70 -0
- package/src/lib/components/molecules/progress-status/types.ts +11 -0
- package/src/lib/components/molecules/prompter/prompter.component.scss +34 -0
- package/src/lib/components/molecules/prompter/prompter.component.ts +58 -0
- package/{lib/components/molecules/prompter/types.d.ts → src/lib/components/molecules/prompter/types.ts} +7 -6
- package/src/lib/components/molecules/radio-input/radio-input.component.scss +0 -0
- package/src/lib/components/molecules/radio-input/radio-input.component.ts +27 -0
- package/src/lib/components/molecules/searchbar/searchbar.component.scss +9 -0
- package/src/lib/components/molecules/searchbar/searchbar.component.ts +47 -0
- package/src/lib/components/molecules/text-input/text-input.component.scss +1 -0
- package/src/lib/components/molecules/text-input/text-input.component.ts +19 -0
- package/src/lib/components/molecules/title-block/title-block.component.scss +36 -0
- package/src/lib/components/molecules/title-block/title-block.component.ts +50 -0
- package/src/lib/components/molecules/title-block/types.ts +14 -0
- package/src/lib/components/organisms/banner/banner.component.scss +45 -0
- package/src/lib/components/organisms/banner/banner.component.ts +57 -0
- package/src/lib/components/organisms/banner/types.ts +13 -0
- package/src/lib/components/organisms/footer/footer.component.scss +3 -0
- package/src/lib/components/organisms/footer/footer.component.ts +40 -0
- package/{lib/components/organisms/footer/types.d.ts → src/lib/components/organisms/footer/types.ts} +4 -3
- package/src/lib/components/organisms/form/factory.ts +11 -0
- package/src/lib/components/organisms/form/form-footer/form-footer.component.scss +0 -0
- package/src/lib/components/organisms/form/form-footer/form-footer.component.ts +63 -0
- package/src/lib/components/organisms/form/form.component.scss +16 -0
- package/src/lib/components/organisms/form/form.component.ts +183 -0
- package/src/lib/components/organisms/header/header.component.scss +0 -0
- package/src/lib/components/organisms/header/header.component.ts +32 -0
- package/{lib/components/organisms/header/types.d.ts → src/lib/components/organisms/header/types.ts} +4 -3
- package/src/lib/components/organisms/no-content/no-content.component.scss +11 -0
- package/src/lib/components/organisms/no-content/no-content.component.ts +32 -0
- package/{lib/components/organisms/no-content/types.d.ts → src/lib/components/organisms/no-content/types.ts} +3 -2
- package/src/lib/components/organisms/toolbar/toolbar.component.scss +13 -0
- package/src/lib/components/organisms/toolbar/toolbar.component.ts +119 -0
- package/src/lib/components/organisms/toolbar/types.ts +12 -0
- package/src/lib/components/organisms/wizard/types.ts +24 -0
- package/src/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.scss +0 -0
- package/src/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.ts +90 -0
- package/src/lib/components/organisms/wizard/wizard.component.scss +15 -0
- package/src/lib/components/organisms/wizard/wizard.component.ts +99 -0
- package/src/lib/components/templates/layout/layout.component.scss +22 -0
- package/src/lib/components/templates/layout/layout.component.ts +14 -0
- package/src/lib/components/templates/simple/simple.component.scss +30 -0
- package/src/lib/components/templates/simple/simple.component.ts +60 -0
- package/{lib/components/templates/simple/types.d.ts → src/lib/components/templates/simple/types.ts} +6 -5
- package/src/lib/components/types.ts +122 -0
- package/src/lib/services/download.service.ts +58 -0
- package/src/lib/services/in-app-browser.service.ts +19 -0
- package/src/lib/services/lang-provider/components/lang-settings.ts +14 -0
- package/src/lib/services/lang-provider/components/theme-settings.ts +16 -0
- package/src/lib/services/lang-provider/content.ts +14 -0
- package/src/lib/services/lang-provider/lang-provider.service.ts +38 -0
- package/src/lib/services/lang-provider/types.ts +25 -0
- package/src/lib/services/local-storage.service.ts +18 -0
- package/src/lib/services/navigation.service.ts +39 -0
- package/src/lib/services/theme.service.ts +102 -0
- package/{lib/services/types.d.ts → src/lib/services/types.ts} +4 -2
- package/src/lib/shared/constants/storage.ts +2 -0
- package/src/lib/shared/utils/dom.ts +19 -0
- package/{public-api.d.ts → src/public-api.ts} +13 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/atoms/avatar/avatar.component.mjs +0 -31
- package/esm2022/lib/components/atoms/avatar/types.mjs +0 -2
- package/esm2022/lib/components/atoms/box/box.component.mjs +0 -47
- package/esm2022/lib/components/atoms/box/types.mjs +0 -2
- package/esm2022/lib/components/atoms/button/button.component.mjs +0 -69
- package/esm2022/lib/components/atoms/button/factory.mjs +0 -217
- package/esm2022/lib/components/atoms/display/display.component.mjs +0 -28
- package/esm2022/lib/components/atoms/display/types.mjs +0 -2
- package/esm2022/lib/components/atoms/divider/divider.component.mjs +0 -17
- package/esm2022/lib/components/atoms/divider/types.mjs +0 -2
- package/esm2022/lib/components/atoms/href/href.component.mjs +0 -51
- package/esm2022/lib/components/atoms/href/types.mjs +0 -2
- package/esm2022/lib/components/atoms/icon/icon.component.mjs +0 -18
- package/esm2022/lib/components/atoms/icon/types.mjs +0 -2
- package/esm2022/lib/components/atoms/image/image.component.mjs +0 -50
- package/esm2022/lib/components/atoms/image/types.mjs +0 -2
- package/esm2022/lib/components/atoms/progress-bar/progress-bar.component.mjs +0 -36
- package/esm2022/lib/components/atoms/progress-bar/types.mjs +0 -2
- package/esm2022/lib/components/atoms/text/text.component.mjs +0 -24
- package/esm2022/lib/components/atoms/text/types.mjs +0 -2
- package/esm2022/lib/components/atoms/title/title.component.mjs +0 -31
- package/esm2022/lib/components/atoms/title/types.mjs +0 -2
- package/esm2022/lib/components/molecules/alert-box/alert-box.component.mjs +0 -32
- package/esm2022/lib/components/molecules/alert-box/types.mjs +0 -2
- package/esm2022/lib/components/molecules/button-group/button-group.component.mjs +0 -49
- package/esm2022/lib/components/molecules/button-group/types.mjs +0 -2
- package/esm2022/lib/components/molecules/card/card.component.mjs +0 -369
- package/esm2022/lib/components/molecules/card/types.mjs +0 -16
- package/esm2022/lib/components/molecules/check-input/check-input.component.mjs +0 -15
- package/esm2022/lib/components/molecules/comment-input/comment-input.component.mjs +0 -23
- package/esm2022/lib/components/molecules/content-loader/content-loader.component.mjs +0 -32
- package/esm2022/lib/components/molecules/content-loader/types.mjs +0 -2
- package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +0 -73
- package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +0 -19
- package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +0 -69
- package/esm2022/lib/components/molecules/hint/hint.component.mjs +0 -52
- package/esm2022/lib/components/molecules/hour-input/hour-input.component.mjs +0 -18
- package/esm2022/lib/components/molecules/link/link.component.mjs +0 -37
- package/esm2022/lib/components/molecules/link/types.mjs +0 -2
- package/esm2022/lib/components/molecules/links-cake/links-cake.component.mjs +0 -37
- package/esm2022/lib/components/molecules/links-cake/types.mjs +0 -2
- package/esm2022/lib/components/molecules/notes-box/notes-box.component.mjs +0 -33
- package/esm2022/lib/components/molecules/notes-box/types.mjs +0 -2
- package/esm2022/lib/components/molecules/number-input/number-input.component.mjs +0 -18
- package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +0 -44
- package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +0 -45
- package/esm2022/lib/components/molecules/progress-status/progress-status.component.mjs +0 -94
- package/esm2022/lib/components/molecules/progress-status/types.mjs +0 -2
- package/esm2022/lib/components/molecules/prompter/prompter.component.mjs +0 -84
- package/esm2022/lib/components/molecules/prompter/types.mjs +0 -2
- package/esm2022/lib/components/molecules/radio-input/radio-input.component.mjs +0 -33
- package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +0 -61
- package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +0 -18
- package/esm2022/lib/components/molecules/title-block/title-block.component.mjs +0 -77
- package/esm2022/lib/components/molecules/title-block/types.mjs +0 -2
- package/esm2022/lib/components/organisms/banner/banner.component.mjs +0 -75
- package/esm2022/lib/components/organisms/banner/types.mjs +0 -2
- package/esm2022/lib/components/organisms/footer/footer.component.mjs +0 -50
- package/esm2022/lib/components/organisms/footer/types.mjs +0 -2
- package/esm2022/lib/components/organisms/form/factory.mjs +0 -8
- package/esm2022/lib/components/organisms/form/form-footer/form-footer.component.mjs +0 -76
- package/esm2022/lib/components/organisms/form/form.component.mjs +0 -230
- package/esm2022/lib/components/organisms/header/header.component.mjs +0 -33
- package/esm2022/lib/components/organisms/header/types.mjs +0 -2
- package/esm2022/lib/components/organisms/no-content/no-content.component.mjs +0 -34
- package/esm2022/lib/components/organisms/no-content/types.mjs +0 -2
- package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +0 -168
- package/esm2022/lib/components/organisms/toolbar/types.mjs +0 -2
- package/esm2022/lib/components/organisms/wizard/types.mjs +0 -7
- package/esm2022/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.mjs +0 -107
- package/esm2022/lib/components/organisms/wizard/wizard.component.mjs +0 -103
- package/esm2022/lib/components/templates/layout/layout.component.mjs +0 -19
- package/esm2022/lib/components/templates/simple/simple.component.mjs +0 -72
- package/esm2022/lib/components/templates/simple/types.mjs +0 -2
- package/esm2022/lib/components/types.mjs +0 -36
- package/esm2022/lib/services/download.service.mjs +0 -63
- package/esm2022/lib/services/lang-provider/components/lang-settings.mjs +0 -13
- package/esm2022/lib/services/lang-provider/components/theme-settings.mjs +0 -15
- package/esm2022/lib/services/lang-provider/content.mjs +0 -8
- package/esm2022/lib/services/lang-provider/lang-provider.service.mjs +0 -39
- package/esm2022/lib/services/lang-provider/types.mjs +0 -14
- package/esm2022/lib/services/local-storage.service.mjs +0 -16
- package/esm2022/lib/services/theme.service.mjs +0 -97
- package/esm2022/lib/services/types.mjs +0 -3
- package/esm2022/lib/shared/constants/storage.mjs +0 -3
- package/esm2022/lib/shared/utils/dom.mjs +0 -17
- package/esm2022/public-api.mjs +0 -88
- package/esm2022/valtech-components.mjs +0 -5
- package/fesm2022/valtech-components.mjs +0 -2987
- package/fesm2022/valtech-components.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/atoms/avatar/avatar.component.d.ts +0 -12
- package/lib/components/atoms/avatar/types.d.ts +0 -6
- package/lib/components/atoms/box/box.component.d.ts +0 -12
- package/lib/components/atoms/box/types.d.ts +0 -7
- package/lib/components/atoms/button/button.component.d.ts +0 -20
- package/lib/components/atoms/button/factory.d.ts +0 -71
- package/lib/components/atoms/display/display.component.d.ts +0 -10
- package/lib/components/atoms/display/types.d.ts +0 -6
- package/lib/components/atoms/divider/divider.component.d.ts +0 -10
- package/lib/components/atoms/divider/types.d.ts +0 -5
- package/lib/components/atoms/href/href.component.d.ts +0 -15
- package/lib/components/atoms/href/types.d.ts +0 -9
- package/lib/components/atoms/icon/icon.component.d.ts +0 -10
- package/lib/components/atoms/icon/types.d.ts +0 -6
- package/lib/components/atoms/image/image.component.d.ts +0 -12
- package/lib/components/atoms/image/types.d.ts +0 -11
- package/lib/components/atoms/progress-bar/progress-bar.component.d.ts +0 -10
- package/lib/components/atoms/progress-bar/types.d.ts +0 -9
- package/lib/components/atoms/text/text.component.d.ts +0 -10
- package/lib/components/atoms/text/types.d.ts +0 -7
- package/lib/components/atoms/title/title.component.d.ts +0 -10
- package/lib/components/atoms/title/types.d.ts +0 -7
- package/lib/components/molecules/alert-box/alert-box.component.d.ts +0 -10
- package/lib/components/molecules/button-group/button-group.component.d.ts +0 -13
- package/lib/components/molecules/button-group/types.d.ts +0 -6
- package/lib/components/molecules/card/card.component.d.ts +0 -16
- package/lib/components/molecules/card/types.d.ts +0 -32
- package/lib/components/molecules/check-input/check-input.component.d.ts +0 -8
- package/lib/components/molecules/comment-input/comment-input.component.d.ts +0 -10
- package/lib/components/molecules/content-loader/content-loader.component.d.ts +0 -10
- package/lib/components/molecules/content-loader/types.d.ts +0 -7
- package/lib/components/molecules/date-input/date-input.component.d.ts +0 -10
- package/lib/components/molecules/email-input/email-input.component.d.ts +0 -10
- package/lib/components/molecules/file-input/file-input.component.d.ts +0 -15
- package/lib/components/molecules/hint/hint.component.d.ts +0 -11
- package/lib/components/molecules/hour-input/hour-input.component.d.ts +0 -10
- package/lib/components/molecules/link/link.component.d.ts +0 -12
- package/lib/components/molecules/link/types.d.ts +0 -6
- package/lib/components/molecules/links-cake/links-cake.component.d.ts +0 -10
- package/lib/components/molecules/notes-box/notes-box.component.d.ts +0 -10
- package/lib/components/molecules/notes-box/types.d.ts +0 -8
- package/lib/components/molecules/number-input/number-input.component.d.ts +0 -10
- package/lib/components/molecules/password-input/password-input.component.d.ts +0 -11
- package/lib/components/molecules/pin-input/pin-input.component.d.ts +0 -15
- package/lib/components/molecules/progress-status/progress-status.component.d.ts +0 -14
- package/lib/components/molecules/progress-status/types.d.ts +0 -10
- package/lib/components/molecules/prompter/prompter.component.d.ts +0 -12
- package/lib/components/molecules/radio-input/radio-input.component.d.ts +0 -10
- package/lib/components/molecules/searchbar/searchbar.component.d.ts +0 -14
- package/lib/components/molecules/text-input/text-input.component.d.ts +0 -10
- package/lib/components/molecules/title-block/title-block.component.d.ts +0 -10
- package/lib/components/molecules/title-block/types.d.ts +0 -12
- package/lib/components/organisms/banner/banner.component.d.ts +0 -14
- package/lib/components/organisms/banner/types.d.ts +0 -12
- package/lib/components/organisms/footer/footer.component.d.ts +0 -12
- package/lib/components/organisms/form/factory.d.ts +0 -5
- package/lib/components/organisms/form/form-footer/form-footer.component.d.ts +0 -15
- package/lib/components/organisms/form/form.component.d.ts +0 -23
- package/lib/components/organisms/header/header.component.d.ts +0 -12
- package/lib/components/organisms/no-content/no-content.component.d.ts +0 -12
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +0 -21
- package/lib/components/organisms/toolbar/types.d.ts +0 -11
- package/lib/components/organisms/wizard/types.d.ts +0 -20
- package/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.d.ts +0 -21
- package/lib/components/organisms/wizard/wizard.component.d.ts +0 -22
- package/lib/components/templates/layout/layout.component.d.ts +0 -5
- package/lib/components/templates/simple/simple.component.d.ts +0 -7
- package/lib/components/types.d.ts +0 -113
- package/lib/services/download.service.d.ts +0 -8
- package/lib/services/lang-provider/components/lang-settings.d.ts +0 -3
- package/lib/services/lang-provider/components/theme-settings.d.ts +0 -3
- package/lib/services/lang-provider/content.d.ts +0 -6
- package/lib/services/lang-provider/lang-provider.service.d.ts +0 -17
- package/lib/services/lang-provider/types.d.ts +0 -15
- package/lib/services/local-storage.service.d.ts +0 -6
- package/lib/services/theme.service.d.ts +0 -27
- package/lib/shared/constants/storage.d.ts +0 -2
- package/lib/shared/utils/dom.d.ts +0 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
3
|
+
import {
|
|
4
|
+
IonButton,
|
|
5
|
+
IonButtons,
|
|
6
|
+
IonCard,
|
|
7
|
+
IonCardContent,
|
|
8
|
+
IonCardHeader,
|
|
9
|
+
IonCardSubtitle,
|
|
10
|
+
IonCardTitle,
|
|
11
|
+
IonCheckbox,
|
|
12
|
+
IonIcon,
|
|
13
|
+
} from '@ionic/angular/standalone';
|
|
14
|
+
import { AvatarComponent } from '../../atoms/avatar/avatar.component';
|
|
15
|
+
import { ButtonComponent } from '../../atoms/button/button.component';
|
|
16
|
+
import { ImageComponent } from '../../atoms/image/image.component';
|
|
17
|
+
import { TextComponent } from '../../atoms/text/text.component';
|
|
18
|
+
import { ToolbarActionType } from '../../types';
|
|
19
|
+
import { CardClickEvent, CardMetadata, CardSection, CardType } from './types';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'val-card',
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [
|
|
25
|
+
CommonModule,
|
|
26
|
+
ButtonComponent,
|
|
27
|
+
AvatarComponent,
|
|
28
|
+
ImageComponent,
|
|
29
|
+
TextComponent,
|
|
30
|
+
IonCard,
|
|
31
|
+
IonCardContent,
|
|
32
|
+
IonCardHeader,
|
|
33
|
+
IonCardTitle,
|
|
34
|
+
IonCardSubtitle,
|
|
35
|
+
IonCheckbox,
|
|
36
|
+
IonButtons,
|
|
37
|
+
IonButton,
|
|
38
|
+
IonIcon,
|
|
39
|
+
],
|
|
40
|
+
template: `
|
|
41
|
+
<ion-card *ngIf="props.type === types.native">
|
|
42
|
+
<img alt="image" [src]="props.image" />
|
|
43
|
+
<ion-card-header *ngIf="props.title || props.overtitle">
|
|
44
|
+
<ion-card-title *ngIf="props.title">{{ props.title }}</ion-card-title>
|
|
45
|
+
<ion-card-subtitle *ngIf="props.overtitle">{{ props.overtitle }}</ion-card-subtitle>
|
|
46
|
+
</ion-card-header>
|
|
47
|
+
|
|
48
|
+
<ion-card-content *ngIf="props.content">{{ props.content }}</ion-card-content>
|
|
49
|
+
|
|
50
|
+
<val-button
|
|
51
|
+
*ngFor="let b of props.footerActions"
|
|
52
|
+
[props]="b"
|
|
53
|
+
(click)="clickHandler(sections.footer, b.token)"
|
|
54
|
+
></val-button>
|
|
55
|
+
</ion-card>
|
|
56
|
+
|
|
57
|
+
<ion-card
|
|
58
|
+
*ngIf="props.type === types.tappable"
|
|
59
|
+
(click)="clickHandler(sections.content, props.token)"
|
|
60
|
+
class="tapable"
|
|
61
|
+
>
|
|
62
|
+
<img alt="image" [src]="props.image" />
|
|
63
|
+
<ion-card-header *ngIf="props.title || props.overtitle">
|
|
64
|
+
<ion-card-title *ngIf="props.title">{{ props.title }}</ion-card-title>
|
|
65
|
+
<ion-card-subtitle *ngIf="props.overtitle">{{ props.overtitle }}</ion-card-subtitle>
|
|
66
|
+
</ion-card-header>
|
|
67
|
+
|
|
68
|
+
<ion-card-content *ngIf="props.content">{{ props.content }}</ion-card-content>
|
|
69
|
+
</ion-card>
|
|
70
|
+
|
|
71
|
+
<ion-card
|
|
72
|
+
*ngIf="props.type === types.checker"
|
|
73
|
+
(click)="clickHandler(sections.content, props.token)"
|
|
74
|
+
class="tapable"
|
|
75
|
+
>
|
|
76
|
+
<ion-card-header *ngIf="props.title || props.overtitle" class="checker">
|
|
77
|
+
<div>
|
|
78
|
+
<ion-card-subtitle *ngIf="props.overtitle">{{ props.overtitle }}</ion-card-subtitle>
|
|
79
|
+
<ion-card-title *ngIf="props.title">{{ props.title }}</ion-card-title>
|
|
80
|
+
</div>
|
|
81
|
+
<div>
|
|
82
|
+
<ion-checkbox [checked]="props.selected"></ion-checkbox>
|
|
83
|
+
</div>
|
|
84
|
+
</ion-card-header>
|
|
85
|
+
|
|
86
|
+
<ion-card-content *ngIf="props.content">{{ props.content }}</ion-card-content>
|
|
87
|
+
</ion-card>
|
|
88
|
+
|
|
89
|
+
<ion-card *ngIf="props.type === types.complex" class="complex">
|
|
90
|
+
<ion-card-header class="complex-header">
|
|
91
|
+
<ion-buttons style="display: flex; align-items: center" *ngIf="props.leftActions.length > 0">
|
|
92
|
+
<ng-container *ngFor="let action of props.leftActions">
|
|
93
|
+
<ion-button
|
|
94
|
+
*ngIf="action.type === actionTypes.ICON"
|
|
95
|
+
(click)="clickHandler(sections.headerLeft, action.token)"
|
|
96
|
+
>
|
|
97
|
+
<ion-icon slot="icon-only" [name]="action.description" color="dark"></ion-icon>
|
|
98
|
+
</ion-button>
|
|
99
|
+
<val-avatar
|
|
100
|
+
style="margin-right: 4px; cursor: pointer"
|
|
101
|
+
*ngIf="action.type === actionTypes.AVATAR"
|
|
102
|
+
[props]="{ size: 'small', image: action.description, default: '' }"
|
|
103
|
+
(onClick)="clickHandler(sections.headerLeft, action.token)"
|
|
104
|
+
></val-avatar>
|
|
105
|
+
<val-image
|
|
106
|
+
*ngIf="action.type === actionTypes.IMAGE"
|
|
107
|
+
[props]="action.image"
|
|
108
|
+
(click)="clickHandler(sections.headerLeft, action.token)"
|
|
109
|
+
></val-image>
|
|
110
|
+
<ion-button
|
|
111
|
+
*ngIf="action.type === actionTypes.BUTTON"
|
|
112
|
+
(click)="clickHandler(sections.headerLeft, action.token)"
|
|
113
|
+
>
|
|
114
|
+
{{ action.description }}
|
|
115
|
+
</ion-button>
|
|
116
|
+
<div *ngIf="props.headerText">
|
|
117
|
+
<val-text [props]="{ content: props.headerText, color: 'dark', bold: true, size: 'medium' }" />
|
|
118
|
+
</div>
|
|
119
|
+
</ng-container>
|
|
120
|
+
</ion-buttons>
|
|
121
|
+
<ion-buttons style="display: flex; align-items: center" *ngIf="props.rightActions.length > 0">
|
|
122
|
+
<ng-container *ngFor="let action of props.rightActions">
|
|
123
|
+
<ion-button
|
|
124
|
+
*ngIf="action.type === actionTypes.ICON"
|
|
125
|
+
(click)="clickHandler(sections.headerRight, action.token)"
|
|
126
|
+
>
|
|
127
|
+
<ion-icon slot="icon-only" [name]="action.description" color="dark"></ion-icon>
|
|
128
|
+
</ion-button>
|
|
129
|
+
<val-avatar
|
|
130
|
+
style="margin-right: 4px; cursor: pointer"
|
|
131
|
+
*ngIf="action.type === actionTypes.AVATAR"
|
|
132
|
+
[props]="{ size: 'small', image: action.description, default: '' }"
|
|
133
|
+
(onClick)="clickHandler(sections.headerRight, action.token)"
|
|
134
|
+
></val-avatar>
|
|
135
|
+
<val-image
|
|
136
|
+
*ngIf="action.type === actionTypes.IMAGE"
|
|
137
|
+
[props]="action.image"
|
|
138
|
+
(click)="clickHandler(sections.headerRight, action.token)"
|
|
139
|
+
></val-image>
|
|
140
|
+
<ion-button
|
|
141
|
+
*ngIf="action.type === actionTypes.BUTTON"
|
|
142
|
+
(click)="clickHandler(sections.headerRight, action.token)"
|
|
143
|
+
>
|
|
144
|
+
{{ action.description }}
|
|
145
|
+
</ion-button>
|
|
146
|
+
</ng-container>
|
|
147
|
+
</ion-buttons>
|
|
148
|
+
</ion-card-header>
|
|
149
|
+
|
|
150
|
+
<div class="tapable" (click)="clickHandler(sections.content, props.token)">
|
|
151
|
+
<ion-card-header *ngIf="props.title || props.overtitle" class="complex-header">
|
|
152
|
+
<div>
|
|
153
|
+
<ion-card-subtitle *ngIf="props.overtitle">{{ props.overtitle }}</ion-card-subtitle>
|
|
154
|
+
<ion-card-title *ngIf="props.title">{{ props.title }}</ion-card-title>
|
|
155
|
+
</div>
|
|
156
|
+
</ion-card-header>
|
|
157
|
+
|
|
158
|
+
<img alt="image" [src]="props.image" />
|
|
159
|
+
<ion-card-content *ngIf="props.content" class="complex-content">{{ props.content }}</ion-card-content>
|
|
160
|
+
</div>
|
|
161
|
+
<val-button
|
|
162
|
+
*ngFor="let b of props.footerActions"
|
|
163
|
+
[props]="b"
|
|
164
|
+
(click)="clickHandler(sections.footer, b.token)"
|
|
165
|
+
></val-button>
|
|
166
|
+
<ion-buttons
|
|
167
|
+
style="display: flex; align-items: center; justify-content: flex-end; margin: 8px"
|
|
168
|
+
*ngIf="props.footerComplexActions.length > 0"
|
|
169
|
+
>
|
|
170
|
+
<ng-container *ngFor="let action of props.footerComplexActions">
|
|
171
|
+
<ion-button
|
|
172
|
+
*ngIf="action.type === actionTypes.ICON"
|
|
173
|
+
(click)="clickHandler(sections.footerExtra, action.token)"
|
|
174
|
+
>
|
|
175
|
+
<ion-icon slot="icon-only" [name]="action.description" color="dark"></ion-icon>
|
|
176
|
+
</ion-button>
|
|
177
|
+
<val-avatar
|
|
178
|
+
style="margin-right: 4px; cursor: pointer"
|
|
179
|
+
*ngIf="action.type === actionTypes.AVATAR"
|
|
180
|
+
[props]="{ size: 'small', image: action.description, default: '' }"
|
|
181
|
+
(onClick)="clickHandler(sections.footerExtra, action.token)"
|
|
182
|
+
></val-avatar>
|
|
183
|
+
<val-image
|
|
184
|
+
*ngIf="action.type === actionTypes.IMAGE"
|
|
185
|
+
[props]="action.image"
|
|
186
|
+
(click)="clickHandler(sections.footerExtra, action.token)"
|
|
187
|
+
></val-image>
|
|
188
|
+
<ion-button
|
|
189
|
+
*ngIf="action.type === actionTypes.BUTTON"
|
|
190
|
+
(click)="clickHandler(sections.footerExtra, action.token)"
|
|
191
|
+
color="dark"
|
|
192
|
+
>
|
|
193
|
+
{{ action.description }}
|
|
194
|
+
</ion-button>
|
|
195
|
+
</ng-container>
|
|
196
|
+
</ion-buttons>
|
|
197
|
+
</ion-card>
|
|
198
|
+
`,
|
|
199
|
+
styleUrls: ['./card.component.scss'],
|
|
200
|
+
})
|
|
201
|
+
export class CardComponent implements OnInit {
|
|
202
|
+
@Input() props: CardMetadata;
|
|
203
|
+
|
|
204
|
+
@Output()
|
|
205
|
+
onClick = new EventEmitter<CardClickEvent>();
|
|
206
|
+
|
|
207
|
+
types = CardType;
|
|
208
|
+
actionTypes = ToolbarActionType;
|
|
209
|
+
sections = CardSection;
|
|
210
|
+
|
|
211
|
+
constructor() {}
|
|
212
|
+
|
|
213
|
+
ngOnInit() {}
|
|
214
|
+
|
|
215
|
+
clickHandler(section: CardSection, token?: string) {
|
|
216
|
+
this.onClick.emit({ section, token });
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ButtonMetadata, ToolbarAction } from '../../types';
|
|
2
|
+
|
|
3
|
+
export enum CardType {
|
|
4
|
+
native = 'native',
|
|
5
|
+
checker = 'checker',
|
|
6
|
+
tappable = 'tappable',
|
|
7
|
+
complex = 'complex',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CardClickEvent {
|
|
11
|
+
section: CardSection;
|
|
12
|
+
token?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum CardSection {
|
|
16
|
+
headerLeft,
|
|
17
|
+
headerRight,
|
|
18
|
+
content,
|
|
19
|
+
footer,
|
|
20
|
+
footerExtra,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CardMetadata {
|
|
24
|
+
token?: string;
|
|
25
|
+
type: CardType;
|
|
26
|
+
title?: string;
|
|
27
|
+
overtitle?: string;
|
|
28
|
+
content?: string;
|
|
29
|
+
image?: string;
|
|
30
|
+
footerActions: ButtonMetadata[];
|
|
31
|
+
footerComplexActions: ToolbarAction[];
|
|
32
|
+
leftActions: ToolbarAction[];
|
|
33
|
+
rightActions: ToolbarAction[];
|
|
34
|
+
selected: boolean;
|
|
35
|
+
headerText?: string;
|
|
36
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, OnInit } from '@angular/core';
|
|
3
|
+
import { IonCheckbox } from '@ionic/angular/standalone';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'val-check-input',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule, IonCheckbox],
|
|
9
|
+
template: ` <ion-checkbox>I agree to the terms and conditions</ion-checkbox> `,
|
|
10
|
+
styleUrls: ['./check-input.component.scss'],
|
|
11
|
+
})
|
|
12
|
+
export class CheckInputComponent implements OnInit {
|
|
13
|
+
constructor() {}
|
|
14
|
+
|
|
15
|
+
ngOnInit() {}
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { IonCheckbox, IonTextarea } from '@ionic/angular/standalone';
|
|
5
|
+
import { InputMetadata } from '../../types';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'val-comment-input',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, ReactiveFormsModule, IonCheckbox, IonTextarea],
|
|
11
|
+
template: `
|
|
12
|
+
<ion-textarea [formControl]="props.control" [counter]="true" [maxlength]="props.range.max"></ion-textarea>
|
|
13
|
+
`,
|
|
14
|
+
styleUrls: ['./comment-input.component.scss'],
|
|
15
|
+
})
|
|
16
|
+
export class CommentInputComponent implements OnInit {
|
|
17
|
+
@Input() props: InputMetadata;
|
|
18
|
+
|
|
19
|
+
constructor() {}
|
|
20
|
+
|
|
21
|
+
ngOnInit() {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@import '../../styles/mixins.scss';
|
|
2
|
+
|
|
3
|
+
.small {
|
|
4
|
+
width: pxToRem(24);
|
|
5
|
+
height: pxToRem(24);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.medium {
|
|
9
|
+
width: pxToRem(38);
|
|
10
|
+
height: pxToRem(38);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.large {
|
|
14
|
+
width: pxToRem(48);
|
|
15
|
+
height: pxToRem(48);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.spinner-wrapper {
|
|
19
|
+
width: 100%;
|
|
20
|
+
text-align: center;
|
|
21
|
+
|
|
22
|
+
&.small {
|
|
23
|
+
height: pxToRem(72);
|
|
24
|
+
padding-top: pxToRem(24);
|
|
25
|
+
|
|
26
|
+
@include body-small;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.medium {
|
|
30
|
+
height: pxToRem(98);
|
|
31
|
+
padding-top: pxToRem(32);
|
|
32
|
+
|
|
33
|
+
@include body-medium;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.large {
|
|
37
|
+
height: pxToRem(108);
|
|
38
|
+
padding-top: pxToRem(42);
|
|
39
|
+
|
|
40
|
+
@include body-large;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { IonSpinner, IonText } from '@ionic/angular/standalone';
|
|
4
|
+
import { ContentLoaderMetadata } from './types';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'val-content-loader',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule, IonSpinner, IonText],
|
|
10
|
+
template: `
|
|
11
|
+
<div [ngClass]="['spinner-wrapper', props.size]">
|
|
12
|
+
<ion-spinner [ngClass]="[props.size]" [name]="props.name" [color]="props.color"></ion-spinner>
|
|
13
|
+
<ion-text [color]="props.color">
|
|
14
|
+
<p>{{ props.text }}</p>
|
|
15
|
+
</ion-text>
|
|
16
|
+
</div>
|
|
17
|
+
`,
|
|
18
|
+
styleUrls: ['./content-loader.component.scss'],
|
|
19
|
+
})
|
|
20
|
+
export class ContentLoaderComponent implements OnInit {
|
|
21
|
+
@Input()
|
|
22
|
+
props: ContentLoaderMetadata;
|
|
23
|
+
|
|
24
|
+
constructor() {}
|
|
25
|
+
|
|
26
|
+
ngOnInit() {}
|
|
27
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { IonDatetime, IonDatetimeButton, IonModal } from '@ionic/angular/standalone';
|
|
5
|
+
import { InputMetadata } from '../../types';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'val-date-input',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, ReactiveFormsModule, IonDatetime, IonDatetimeButton, IonModal],
|
|
11
|
+
template: `
|
|
12
|
+
<div class="button-container">
|
|
13
|
+
<ion-datetime-button class="action" datetime="datetime"></ion-datetime-button>
|
|
14
|
+
</div>
|
|
15
|
+
<ion-modal [keepContentsMounted]="true">
|
|
16
|
+
<ng-template>
|
|
17
|
+
<ion-datetime
|
|
18
|
+
[formControl]="props.control"
|
|
19
|
+
id="datetime"
|
|
20
|
+
presentation="date"
|
|
21
|
+
locale="es-ES"
|
|
22
|
+
[firstDayOfWeek]="1"
|
|
23
|
+
[showDefaultButtons]="true"
|
|
24
|
+
doneText="Aceptar"
|
|
25
|
+
cancelText="Cancelar"
|
|
26
|
+
formatOptions="{
|
|
27
|
+
date: { weekday: 'short', month: 'long', day: '2-digit' },
|
|
28
|
+
time: {
|
|
29
|
+
hour: '2-digit',
|
|
30
|
+
minute: '2-digit',
|
|
31
|
+
},
|
|
32
|
+
}"
|
|
33
|
+
>
|
|
34
|
+
<span slot="title">{{ props.hint }}</span>
|
|
35
|
+
</ion-datetime>
|
|
36
|
+
</ng-template>
|
|
37
|
+
</ion-modal>
|
|
38
|
+
`,
|
|
39
|
+
styleUrls: ['./date-input.component.scss'],
|
|
40
|
+
})
|
|
41
|
+
export class DateInputComponent implements OnInit {
|
|
42
|
+
@Input() props: InputMetadata;
|
|
43
|
+
|
|
44
|
+
constructor() {}
|
|
45
|
+
|
|
46
|
+
ngOnInit() {}
|
|
47
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { IonInput } from '@ionic/angular/standalone';
|
|
5
|
+
import { InputMetadata } from '../../types';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'val-email-input',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, ReactiveFormsModule, IonInput],
|
|
11
|
+
template: ` <ion-input [formControl]="props.control" type="email" [placeholder]="props.placeholder"></ion-input> `,
|
|
12
|
+
styleUrls: ['./email-input.component.scss'],
|
|
13
|
+
})
|
|
14
|
+
export class EmailInputComponent implements OnInit {
|
|
15
|
+
@Input() props: InputMetadata;
|
|
16
|
+
|
|
17
|
+
constructor() {}
|
|
18
|
+
|
|
19
|
+
ngOnInit() {}
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
|
2
|
+
import { IonIcon } from '@ionic/angular/standalone';
|
|
3
|
+
import { ButtonComponent } from '../../atoms/button/button.component';
|
|
4
|
+
import { PrimarySolidDefaultRoundButton } from '../../atoms/button/factory';
|
|
5
|
+
import { TextComponent } from '../../atoms/text/text.component';
|
|
6
|
+
import { ButtonMetadata, InputMetadata } from '../../types';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'val-file-input',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [IonIcon, TextComponent, ButtonComponent],
|
|
12
|
+
template: `
|
|
13
|
+
<div class="file-container">
|
|
14
|
+
<input style="display: none" type="file" (change)="onFileSelected($event)" #fileInput />
|
|
15
|
+
<div class="name-container">
|
|
16
|
+
<ion-icon [name]="selectedFile ? 'checkmark-circle-outline' : 'alert-circle-outline'"></ion-icon>
|
|
17
|
+
<val-text
|
|
18
|
+
style="margin-left: 4px;"
|
|
19
|
+
[props]="{
|
|
20
|
+
content: selectedFile ? selectedFile.name : 'No has seleccionado archivo',
|
|
21
|
+
color: 'dark',
|
|
22
|
+
bold: false,
|
|
23
|
+
size: 'medium',
|
|
24
|
+
}"
|
|
25
|
+
></val-text>
|
|
26
|
+
</div>
|
|
27
|
+
<val-button [props]="contrastButton" (onClick)="fileInput.click()"></val-button>
|
|
28
|
+
</div>
|
|
29
|
+
`,
|
|
30
|
+
styleUrls: ['./file-input.component.scss'],
|
|
31
|
+
})
|
|
32
|
+
export class FileInputComponent implements OnInit {
|
|
33
|
+
@ViewChild('fileInput') fileInput;
|
|
34
|
+
|
|
35
|
+
@Input() props: InputMetadata;
|
|
36
|
+
|
|
37
|
+
contrastButton: ButtonMetadata = {
|
|
38
|
+
...PrimarySolidDefaultRoundButton('Subir archivo'),
|
|
39
|
+
color: 'light',
|
|
40
|
+
};
|
|
41
|
+
selectedFile: File;
|
|
42
|
+
|
|
43
|
+
constructor() {}
|
|
44
|
+
|
|
45
|
+
ngOnInit() {}
|
|
46
|
+
|
|
47
|
+
onFileSelected(event): void {
|
|
48
|
+
this.selectedFile = event.target.files[0];
|
|
49
|
+
this.props.control.setValue(this.selectedFile);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
reset(): void {
|
|
53
|
+
this.selectedFile = null;
|
|
54
|
+
this.fileInput.nativeElement.value = '';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
3
|
+
import { TextComponent } from '../../atoms/text/text.component';
|
|
4
|
+
import { InputMetadata } from '../../types';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'val-hint',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [CommonModule, TextComponent],
|
|
10
|
+
template: `
|
|
11
|
+
<div class="hint-container" *ngIf="props.control.invalid && (props.control.touched || props.control.dirty)">
|
|
12
|
+
<val-text
|
|
13
|
+
*ngFor="let e of Errors"
|
|
14
|
+
[props]="{
|
|
15
|
+
content: e,
|
|
16
|
+
color: 'danger',
|
|
17
|
+
bold: false,
|
|
18
|
+
size: 'small',
|
|
19
|
+
}"
|
|
20
|
+
></val-text>
|
|
21
|
+
</div>
|
|
22
|
+
`,
|
|
23
|
+
styleUrls: ['./hint.component.scss'],
|
|
24
|
+
})
|
|
25
|
+
export class HintComponent implements OnInit {
|
|
26
|
+
@Input() props: InputMetadata;
|
|
27
|
+
|
|
28
|
+
constructor() {}
|
|
29
|
+
|
|
30
|
+
ngOnInit() {}
|
|
31
|
+
|
|
32
|
+
get Errors(): string[] {
|
|
33
|
+
const keys = Object.keys(this.props.errors);
|
|
34
|
+
const errors = [];
|
|
35
|
+
keys.map((e: string) => {
|
|
36
|
+
if (this.props.control.hasError(e)) {
|
|
37
|
+
errors.push(this.props.errors[e]);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return errors;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
+
import { IonDatetime } from '@ionic/angular/standalone';
|
|
4
|
+
import { InputMetadata } from '../../types';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'val-hour-input',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [ReactiveFormsModule, IonDatetime],
|
|
10
|
+
template: ` <ion-datetime [formControl]="props.control" presentation="time"></ion-datetime>`,
|
|
11
|
+
styleUrls: ['./hour-input.component.scss'],
|
|
12
|
+
})
|
|
13
|
+
export class HourInputComponent implements OnInit {
|
|
14
|
+
@Input() props: InputMetadata;
|
|
15
|
+
|
|
16
|
+
constructor() {}
|
|
17
|
+
|
|
18
|
+
ngOnInit() {}
|
|
19
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Component, EventEmitter, inject, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { IonButton, IonIcon, IonText } from '@ionic/angular/standalone';
|
|
3
|
+
import { addIcons } from 'ionicons';
|
|
4
|
+
import { chevronForwardOutline } from 'ionicons/icons';
|
|
5
|
+
import { NavigationService } from '../../../services/navigation.service';
|
|
6
|
+
import { LinkMetadata } from './types';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'val-link',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [IonButton, IonIcon, IonText],
|
|
12
|
+
template: `
|
|
13
|
+
<div>
|
|
14
|
+
<ion-button type="button" [color]="props.color" fill="clear" [size]="props.size" (click)="onClickHandler()">
|
|
15
|
+
<ion-icon slot="end" name="chevron-forward-outline"></ion-icon>
|
|
16
|
+
<ion-text>{{ props.text }}</ion-text>
|
|
17
|
+
</ion-button>
|
|
18
|
+
</div>
|
|
19
|
+
`,
|
|
20
|
+
styleUrls: ['./link.component.scss'],
|
|
21
|
+
})
|
|
22
|
+
export class LinkComponent implements OnInit {
|
|
23
|
+
@Input()
|
|
24
|
+
props: LinkMetadata;
|
|
25
|
+
|
|
26
|
+
@Output()
|
|
27
|
+
onClick = new EventEmitter<string>();
|
|
28
|
+
|
|
29
|
+
service = inject(NavigationService);
|
|
30
|
+
|
|
31
|
+
constructor() {
|
|
32
|
+
addIcons({ chevronForwardOutline });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ngOnInit() {}
|
|
36
|
+
|
|
37
|
+
onClickHandler() {
|
|
38
|
+
this.onClick.emit(this.props.token);
|
|
39
|
+
|
|
40
|
+
switch (this.props.type) {
|
|
41
|
+
case 'internal':
|
|
42
|
+
this.service.navigateByUrl(this.props.link);
|
|
43
|
+
break;
|
|
44
|
+
case 'browse':
|
|
45
|
+
this.service.navigateInApp(this.props.link);
|
|
46
|
+
break;
|
|
47
|
+
case 'tab':
|
|
48
|
+
this.service.openInNewTab(this.props.link);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|