valtech-components 2.0.46 → 2.0.47
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/esm2022/lib/components/atoms/avatar/avatar.component.mjs +31 -0
- package/esm2022/lib/components/atoms/avatar/types.mjs +2 -0
- package/esm2022/lib/components/atoms/box/box.component.mjs +47 -0
- package/esm2022/lib/components/atoms/box/types.mjs +2 -0
- package/esm2022/lib/components/atoms/button/button.component.mjs +69 -0
- package/esm2022/lib/components/atoms/button/factory.mjs +217 -0
- package/esm2022/lib/components/atoms/display/display.component.mjs +28 -0
- package/esm2022/lib/components/atoms/display/types.mjs +2 -0
- package/esm2022/lib/components/atoms/divider/divider.component.mjs +17 -0
- package/esm2022/lib/components/atoms/divider/types.mjs +2 -0
- package/esm2022/lib/components/atoms/href/href.component.mjs +51 -0
- package/esm2022/lib/components/atoms/href/types.mjs +2 -0
- package/esm2022/lib/components/atoms/icon/icon.component.mjs +19 -0
- package/esm2022/lib/components/atoms/icon/types.mjs +2 -0
- package/esm2022/lib/components/atoms/image/image.component.mjs +50 -0
- package/esm2022/lib/components/atoms/image/types.mjs +2 -0
- package/esm2022/lib/components/atoms/progress-bar/progress-bar.component.mjs +36 -0
- package/esm2022/lib/components/atoms/progress-bar/types.mjs +2 -0
- package/esm2022/lib/components/atoms/text/text.component.mjs +24 -0
- package/esm2022/lib/components/atoms/text/types.mjs +2 -0
- package/esm2022/lib/components/atoms/title/title.component.mjs +31 -0
- package/esm2022/lib/components/atoms/title/types.mjs +2 -0
- package/esm2022/lib/components/molecules/alert-box/alert-box.component.mjs +32 -0
- package/esm2022/lib/components/molecules/alert-box/types.mjs +2 -0
- package/esm2022/lib/components/molecules/button-group/button-group.component.mjs +49 -0
- package/esm2022/lib/components/molecules/button-group/types.mjs +2 -0
- package/esm2022/lib/components/molecules/card/card.component.mjs +365 -0
- package/esm2022/lib/components/molecules/card/types.mjs +16 -0
- package/esm2022/lib/components/molecules/check-input/check-input.component.mjs +15 -0
- package/esm2022/lib/components/molecules/comment-input/comment-input.component.mjs +23 -0
- package/esm2022/lib/components/molecules/content-loader/content-loader.component.mjs +32 -0
- package/esm2022/lib/components/molecules/content-loader/types.mjs +2 -0
- package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +73 -0
- package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +19 -0
- package/esm2022/lib/components/molecules/expandable-text/expandable-text.component.mjs +58 -0
- package/esm2022/lib/components/molecules/expandable-text/types.mjs +2 -0
- package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +69 -0
- package/esm2022/lib/components/molecules/hint/hint.component.mjs +52 -0
- package/esm2022/lib/components/molecules/hour-input/hour-input.component.mjs +18 -0
- package/esm2022/lib/components/molecules/link/link.component.mjs +53 -0
- package/esm2022/lib/components/molecules/link/types.mjs +2 -0
- package/esm2022/lib/components/molecules/links-cake/links-cake.component.mjs +37 -0
- package/esm2022/lib/components/molecules/links-cake/types.mjs +2 -0
- package/esm2022/lib/components/molecules/notes-box/notes-box.component.mjs +33 -0
- package/esm2022/lib/components/molecules/notes-box/types.mjs +2 -0
- package/esm2022/lib/components/molecules/number-input/number-input.component.mjs +18 -0
- package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +44 -0
- package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +45 -0
- package/esm2022/lib/components/molecules/progress-status/progress-status.component.mjs +94 -0
- package/esm2022/lib/components/molecules/progress-status/types.mjs +2 -0
- package/esm2022/lib/components/molecules/prompter/prompter.component.mjs +84 -0
- package/esm2022/lib/components/molecules/prompter/types.mjs +2 -0
- package/esm2022/lib/components/molecules/radio-input/radio-input.component.mjs +33 -0
- package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +61 -0
- package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +18 -0
- package/esm2022/lib/components/molecules/title-block/title-block.component.mjs +77 -0
- package/esm2022/lib/components/molecules/title-block/types.mjs +2 -0
- package/esm2022/lib/components/organisms/banner/banner.component.mjs +75 -0
- package/esm2022/lib/components/organisms/banner/types.mjs +2 -0
- package/esm2022/lib/components/organisms/footer/footer.component.mjs +50 -0
- package/esm2022/lib/components/organisms/footer/types.mjs +2 -0
- package/esm2022/lib/components/organisms/form/factory.mjs +8 -0
- package/esm2022/lib/components/organisms/form/form-footer/form-footer.component.mjs +76 -0
- package/esm2022/lib/components/organisms/form/form.component.mjs +230 -0
- package/esm2022/lib/components/organisms/header/header.component.mjs +32 -0
- package/esm2022/lib/components/organisms/header/types.mjs +2 -0
- package/esm2022/lib/components/organisms/item-list/item-list.component.mjs +362 -0
- package/esm2022/lib/components/organisms/item-list/types.mjs +2 -0
- package/esm2022/lib/components/organisms/no-content/no-content.component.mjs +44 -0
- package/esm2022/lib/components/organisms/no-content/types.mjs +2 -0
- package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +171 -0
- package/esm2022/lib/components/organisms/toolbar/types.mjs +2 -0
- package/esm2022/lib/components/organisms/wizard/types.mjs +7 -0
- package/esm2022/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.mjs +107 -0
- package/esm2022/lib/components/organisms/wizard/wizard.component.mjs +103 -0
- package/esm2022/lib/components/templates/layout/layout.component.mjs +19 -0
- package/esm2022/lib/components/templates/simple/simple.component.mjs +102 -0
- package/esm2022/lib/components/templates/simple/types.mjs +2 -0
- package/esm2022/lib/components/types.mjs +36 -0
- package/esm2022/lib/services/download.service.mjs +63 -0
- package/esm2022/lib/services/icons.service.mjs +30 -0
- package/esm2022/lib/services/in-app-browser.service.mjs +24 -0
- package/esm2022/lib/services/lang-provider/components/lang-settings.mjs +13 -0
- package/esm2022/lib/services/lang-provider/components/theme-settings.mjs +15 -0
- package/esm2022/lib/services/lang-provider/content.mjs +8 -0
- package/esm2022/lib/services/lang-provider/lang-provider.service.mjs +39 -0
- package/esm2022/lib/services/lang-provider/types.mjs +14 -0
- package/esm2022/lib/services/local-storage.service.mjs +16 -0
- package/esm2022/lib/services/navigation.service.mjs +39 -0
- package/esm2022/lib/services/theme.service.mjs +97 -0
- package/esm2022/lib/services/types.mjs +3 -0
- package/esm2022/lib/shared/constants/storage.mjs +3 -0
- package/esm2022/lib/shared/utils/dom.mjs +17 -0
- package/esm2022/lib/shared/utils/styles.mjs +25 -0
- package/esm2022/public-api.mjs +95 -0
- package/esm2022/valtech-components.mjs +5 -0
- package/fesm2022/valtech-components.mjs +3556 -0
- package/fesm2022/valtech-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/atoms/avatar/avatar.component.d.ts +12 -0
- package/lib/components/atoms/avatar/types.d.ts +6 -0
- package/lib/components/atoms/box/box.component.d.ts +12 -0
- package/lib/components/atoms/box/types.d.ts +7 -0
- package/lib/components/atoms/button/button.component.d.ts +20 -0
- package/lib/components/atoms/button/factory.d.ts +71 -0
- package/lib/components/atoms/display/display.component.d.ts +10 -0
- package/lib/components/atoms/display/types.d.ts +6 -0
- package/lib/components/atoms/divider/divider.component.d.ts +10 -0
- package/lib/components/atoms/divider/types.d.ts +5 -0
- package/lib/components/atoms/href/href.component.d.ts +15 -0
- package/lib/components/atoms/href/types.d.ts +9 -0
- package/lib/components/atoms/icon/icon.component.d.ts +11 -0
- package/lib/components/atoms/icon/types.d.ts +6 -0
- package/lib/components/atoms/image/image.component.d.ts +12 -0
- package/lib/components/atoms/image/types.d.ts +11 -0
- package/lib/components/atoms/progress-bar/progress-bar.component.d.ts +10 -0
- package/lib/components/atoms/progress-bar/types.d.ts +9 -0
- package/lib/components/atoms/text/text.component.d.ts +10 -0
- package/lib/components/atoms/text/types.d.ts +7 -0
- package/lib/components/atoms/title/title.component.d.ts +10 -0
- package/lib/components/atoms/title/types.d.ts +7 -0
- package/lib/components/molecules/alert-box/alert-box.component.d.ts +10 -0
- package/{src/lib/components/molecules/alert-box/types.ts → lib/components/molecules/alert-box/types.d.ts} +3 -4
- package/lib/components/molecules/button-group/button-group.component.d.ts +13 -0
- package/lib/components/molecules/button-group/types.d.ts +6 -0
- package/lib/components/molecules/card/card.component.d.ts +16 -0
- package/lib/components/molecules/card/types.d.ts +32 -0
- package/lib/components/molecules/check-input/check-input.component.d.ts +8 -0
- package/lib/components/molecules/comment-input/comment-input.component.d.ts +10 -0
- package/lib/components/molecules/content-loader/content-loader.component.d.ts +10 -0
- package/lib/components/molecules/content-loader/types.d.ts +7 -0
- package/lib/components/molecules/date-input/date-input.component.d.ts +10 -0
- package/lib/components/molecules/email-input/email-input.component.d.ts +10 -0
- package/lib/components/molecules/expandable-text/expandable-text.component.d.ts +13 -0
- package/lib/components/molecules/expandable-text/types.d.ts +6 -0
- package/lib/components/molecules/file-input/file-input.component.d.ts +15 -0
- package/lib/components/molecules/hint/hint.component.d.ts +11 -0
- package/lib/components/molecules/hour-input/hour-input.component.d.ts +10 -0
- package/lib/components/molecules/link/link.component.d.ts +14 -0
- package/lib/components/molecules/link/types.d.ts +9 -0
- package/lib/components/molecules/links-cake/links-cake.component.d.ts +10 -0
- package/{src/lib/components/molecules/links-cake/types.ts → lib/components/molecules/links-cake/types.d.ts} +3 -4
- package/lib/components/molecules/notes-box/notes-box.component.d.ts +10 -0
- package/lib/components/molecules/notes-box/types.d.ts +8 -0
- package/lib/components/molecules/number-input/number-input.component.d.ts +10 -0
- package/lib/components/molecules/password-input/password-input.component.d.ts +11 -0
- package/lib/components/molecules/pin-input/pin-input.component.d.ts +15 -0
- package/lib/components/molecules/progress-status/progress-status.component.d.ts +14 -0
- package/lib/components/molecules/progress-status/types.d.ts +10 -0
- package/lib/components/molecules/prompter/prompter.component.d.ts +12 -0
- package/{src/lib/components/molecules/prompter/types.ts → lib/components/molecules/prompter/types.d.ts} +6 -7
- package/lib/components/molecules/radio-input/radio-input.component.d.ts +10 -0
- package/lib/components/molecules/searchbar/searchbar.component.d.ts +14 -0
- package/lib/components/molecules/text-input/text-input.component.d.ts +10 -0
- package/lib/components/molecules/title-block/title-block.component.d.ts +10 -0
- package/lib/components/molecules/title-block/types.d.ts +12 -0
- package/lib/components/organisms/banner/banner.component.d.ts +14 -0
- package/lib/components/organisms/banner/types.d.ts +12 -0
- package/lib/components/organisms/footer/footer.component.d.ts +12 -0
- package/{src/lib/components/organisms/footer/types.ts → lib/components/organisms/footer/types.d.ts} +3 -4
- package/lib/components/organisms/form/factory.d.ts +5 -0
- package/lib/components/organisms/form/form-footer/form-footer.component.d.ts +15 -0
- package/lib/components/organisms/form/form.component.d.ts +23 -0
- package/lib/components/organisms/header/header.component.d.ts +12 -0
- package/{src/lib/components/organisms/header/types.ts → lib/components/organisms/header/types.d.ts} +3 -4
- package/lib/components/organisms/item-list/item-list.component.d.ts +23 -0
- package/lib/components/organisms/item-list/types.d.ts +38 -0
- package/lib/components/organisms/no-content/no-content.component.d.ts +12 -0
- package/{src/lib/components/organisms/no-content/types.ts → lib/components/organisms/no-content/types.d.ts} +3 -4
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +21 -0
- package/lib/components/organisms/toolbar/types.d.ts +11 -0
- package/lib/components/organisms/wizard/types.d.ts +20 -0
- package/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.d.ts +21 -0
- package/lib/components/organisms/wizard/wizard.component.d.ts +22 -0
- package/lib/components/templates/layout/layout.component.d.ts +5 -0
- package/lib/components/templates/simple/simple.component.d.ts +10 -0
- package/{src/lib/components/templates/simple/types.ts → lib/components/templates/simple/types.d.ts} +5 -6
- package/lib/components/types.d.ts +113 -0
- package/lib/services/download.service.d.ts +8 -0
- package/lib/services/icons.service.d.ts +6 -0
- package/lib/services/in-app-browser.service.d.ts +9 -0
- package/lib/services/lang-provider/components/lang-settings.d.ts +3 -0
- package/lib/services/lang-provider/components/theme-settings.d.ts +3 -0
- package/lib/services/lang-provider/content.d.ts +6 -0
- package/lib/services/lang-provider/lang-provider.service.d.ts +17 -0
- package/lib/services/lang-provider/types.d.ts +15 -0
- package/lib/services/local-storage.service.d.ts +6 -0
- package/lib/services/navigation.service.d.ts +15 -0
- package/lib/services/theme.service.d.ts +27 -0
- package/{src/lib/services/types.ts → lib/services/types.d.ts} +2 -4
- package/lib/shared/constants/storage.d.ts +2 -0
- package/lib/shared/utils/dom.d.ts +3 -0
- package/lib/shared/utils/styles.d.ts +1 -0
- package/package.json +13 -15
- package/{src/public-api.ts → public-api.d.ts} +0 -13
- package/ng-package.json +0 -10
- package/release.sh +0 -76
- package/src/lib/components/atoms/avatar/avatar.component.scss +0 -20
- package/src/lib/components/atoms/avatar/avatar.component.ts +0 -29
- package/src/lib/components/atoms/avatar/types.ts +0 -6
- package/src/lib/components/atoms/box/box.component.scss +0 -57
- package/src/lib/components/atoms/box/box.component.ts +0 -38
- package/src/lib/components/atoms/box/types.ts +0 -8
- package/src/lib/components/atoms/button/button.component.scss +0 -5
- package/src/lib/components/atoms/button/button.component.ts +0 -53
- package/src/lib/components/atoms/button/factory.ts +0 -444
- package/src/lib/components/atoms/display/display.component.scss +0 -17
- package/src/lib/components/atoms/display/display.component.ts +0 -25
- package/src/lib/components/atoms/display/types.ts +0 -7
- package/src/lib/components/atoms/divider/divider.component.scss +0 -62
- package/src/lib/components/atoms/divider/divider.component.ts +0 -18
- package/src/lib/components/atoms/divider/types.ts +0 -5
- package/src/lib/components/atoms/href/href.component.scss +0 -25
- package/src/lib/components/atoms/href/href.component.ts +0 -43
- package/src/lib/components/atoms/href/types.ts +0 -10
- package/src/lib/components/atoms/icon/icon.component.scss +0 -33
- package/src/lib/components/atoms/icon/icon.component.ts +0 -21
- package/src/lib/components/atoms/icon/types.ts +0 -7
- package/src/lib/components/atoms/image/image.component.scss +0 -70
- package/src/lib/components/atoms/image/image.component.ts +0 -40
- package/src/lib/components/atoms/image/types.ts +0 -11
- package/src/lib/components/atoms/progress-bar/progress-bar.component.scss +0 -22
- package/src/lib/components/atoms/progress-bar/progress-bar.component.ts +0 -29
- package/src/lib/components/atoms/progress-bar/types.ts +0 -10
- package/src/lib/components/atoms/text/text.component.scss +0 -33
- package/src/lib/components/atoms/text/text.component.ts +0 -23
- package/src/lib/components/atoms/text/types.ts +0 -8
- package/src/lib/components/atoms/title/title.component.scss +0 -17
- package/src/lib/components/atoms/title/title.component.ts +0 -27
- package/src/lib/components/atoms/title/types.ts +0 -8
- package/src/lib/components/molecules/alert-box/alert-box.component.scss +0 -10
- package/src/lib/components/molecules/alert-box/alert-box.component.ts +0 -28
- package/src/lib/components/molecules/button-group/button-group.component.scss +0 -31
- package/src/lib/components/molecules/button-group/button-group.component.ts +0 -44
- package/src/lib/components/molecules/button-group/types.ts +0 -7
- package/src/lib/components/molecules/card/card.component.scss +0 -46
- package/src/lib/components/molecules/card/card.component.ts +0 -218
- package/src/lib/components/molecules/card/types.ts +0 -36
- package/src/lib/components/molecules/check-input/check-input.component.scss +0 -0
- package/src/lib/components/molecules/check-input/check-input.component.ts +0 -16
- package/src/lib/components/molecules/comment-input/comment-input.component.scss +0 -0
- package/src/lib/components/molecules/comment-input/comment-input.component.ts +0 -22
- package/src/lib/components/molecules/content-loader/content-loader.component.scss +0 -42
- package/src/lib/components/molecules/content-loader/content-loader.component.ts +0 -27
- package/src/lib/components/molecules/content-loader/types.ts +0 -8
- package/src/lib/components/molecules/date-input/date-input.component.scss +0 -11
- package/src/lib/components/molecules/date-input/date-input.component.ts +0 -47
- package/src/lib/components/molecules/email-input/email-input.component.scss +0 -0
- package/src/lib/components/molecules/email-input/email-input.component.ts +0 -20
- package/src/lib/components/molecules/expandable-text/expandable-text.component.ts +0 -89
- package/src/lib/components/molecules/expandable-text/types.ts +0 -6
- package/src/lib/components/molecules/file-input/file-input.component.scss +0 -11
- package/src/lib/components/molecules/file-input/file-input.component.ts +0 -56
- package/src/lib/components/molecules/hint/hint.component.scss +0 -5
- package/src/lib/components/molecules/hint/hint.component.ts +0 -42
- package/src/lib/components/molecules/hour-input/hour-input.component.scss +0 -0
- package/src/lib/components/molecules/hour-input/hour-input.component.ts +0 -19
- package/src/lib/components/molecules/link/link.component.scss +0 -5
- package/src/lib/components/molecules/link/link.component.ts +0 -52
- package/src/lib/components/molecules/link/types.ts +0 -10
- package/src/lib/components/molecules/links-cake/links-cake.component.scss +0 -9
- package/src/lib/components/molecules/links-cake/links-cake.component.ts +0 -30
- package/src/lib/components/molecules/notes-box/notes-box.component.scss +0 -5
- package/src/lib/components/molecules/notes-box/notes-box.component.ts +0 -28
- package/src/lib/components/molecules/notes-box/types.ts +0 -9
- package/src/lib/components/molecules/number-input/number-input.component.scss +0 -0
- package/src/lib/components/molecules/number-input/number-input.component.ts +0 -19
- package/src/lib/components/molecules/password-input/password-input.component.scss +0 -7
- package/src/lib/components/molecules/password-input/password-input.component.ts +0 -33
- package/src/lib/components/molecules/pin-input/pin-input.component.scss +0 -13
- package/src/lib/components/molecules/pin-input/pin-input.component.ts +0 -42
- package/src/lib/components/molecules/progress-status/progress-status.component.scss +0 -41
- package/src/lib/components/molecules/progress-status/progress-status.component.ts +0 -70
- package/src/lib/components/molecules/progress-status/types.ts +0 -11
- package/src/lib/components/molecules/prompter/prompter.component.scss +0 -34
- package/src/lib/components/molecules/prompter/prompter.component.ts +0 -58
- package/src/lib/components/molecules/radio-input/radio-input.component.scss +0 -0
- package/src/lib/components/molecules/radio-input/radio-input.component.ts +0 -27
- package/src/lib/components/molecules/searchbar/searchbar.component.scss +0 -9
- package/src/lib/components/molecules/searchbar/searchbar.component.ts +0 -47
- package/src/lib/components/molecules/text-input/text-input.component.scss +0 -1
- package/src/lib/components/molecules/text-input/text-input.component.ts +0 -19
- package/src/lib/components/molecules/title-block/title-block.component.scss +0 -36
- package/src/lib/components/molecules/title-block/title-block.component.ts +0 -50
- package/src/lib/components/molecules/title-block/types.ts +0 -14
- package/src/lib/components/organisms/banner/banner.component.scss +0 -45
- package/src/lib/components/organisms/banner/banner.component.ts +0 -57
- package/src/lib/components/organisms/banner/types.ts +0 -13
- package/src/lib/components/organisms/footer/footer.component.scss +0 -3
- package/src/lib/components/organisms/footer/footer.component.ts +0 -40
- package/src/lib/components/organisms/form/factory.ts +0 -11
- 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 +0 -63
- package/src/lib/components/organisms/form/form.component.scss +0 -16
- package/src/lib/components/organisms/form/form.component.ts +0 -183
- package/src/lib/components/organisms/header/header.component.scss +0 -0
- package/src/lib/components/organisms/header/header.component.ts +0 -31
- package/src/lib/components/organisms/item-list/item-list.component.scss +0 -41
- package/src/lib/components/organisms/item-list/item-list.component.ts +0 -223
- package/src/lib/components/organisms/item-list/types.ts +0 -42
- package/src/lib/components/organisms/no-content/no-content.component.scss +0 -11
- package/src/lib/components/organisms/no-content/no-content.component.ts +0 -37
- package/src/lib/components/organisms/toolbar/toolbar.component.scss +0 -13
- package/src/lib/components/organisms/toolbar/toolbar.component.ts +0 -123
- package/src/lib/components/organisms/toolbar/types.ts +0 -12
- package/src/lib/components/organisms/wizard/types.ts +0 -24
- 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 +0 -90
- package/src/lib/components/organisms/wizard/wizard.component.scss +0 -15
- package/src/lib/components/organisms/wizard/wizard.component.ts +0 -99
- package/src/lib/components/templates/layout/layout.component.scss +0 -22
- package/src/lib/components/templates/layout/layout.component.ts +0 -14
- package/src/lib/components/templates/simple/simple.component.ts +0 -75
- package/src/lib/components/types.ts +0 -122
- package/src/lib/services/download.service.ts +0 -58
- package/src/lib/services/icons.service.ts +0 -36
- package/src/lib/services/in-app-browser.service.ts +0 -19
- package/src/lib/services/lang-provider/components/lang-settings.ts +0 -14
- package/src/lib/services/lang-provider/components/theme-settings.ts +0 -16
- package/src/lib/services/lang-provider/content.ts +0 -14
- package/src/lib/services/lang-provider/lang-provider.service.ts +0 -38
- package/src/lib/services/lang-provider/types.ts +0 -25
- package/src/lib/services/local-storage.service.ts +0 -18
- package/src/lib/services/navigation.service.ts +0 -39
- package/src/lib/services/theme.service.ts +0 -102
- package/src/lib/shared/constants/storage.ts +0 -2
- package/src/lib/shared/utils/dom.ts +0 -19
- package/src/lib/shared/utils/styles.ts +0 -27
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
3
|
-
import { goToTop } from '../../../shared/utils/dom';
|
|
4
|
-
import { ContentLoaderComponent } from '../../molecules/content-loader/content-loader.component';
|
|
5
|
-
import { ComponentStates } from '../../types';
|
|
6
|
-
import { NoContentComponent } from '../no-content/no-content.component';
|
|
7
|
-
import { MOTION, Step, WizardMetadata } from './types';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'val-wizard',
|
|
11
|
-
standalone: true,
|
|
12
|
-
imports: [CommonModule, NoContentComponent, ContentLoaderComponent],
|
|
13
|
-
template: `
|
|
14
|
-
<div [id]="wrapperId" class="wrapper">
|
|
15
|
-
<ng-container *ngIf="props.state !== 'ERROR'">
|
|
16
|
-
<val-no-content [props]="Current.titles"></val-no-content>
|
|
17
|
-
<div class="step">
|
|
18
|
-
<div *ngIf="props.state === 'WORKING'">
|
|
19
|
-
<val-content-loader color="dark" size="large" text="Por favor espere..."></val-content-loader>
|
|
20
|
-
</div>
|
|
21
|
-
<ng-content select="[step]"></ng-content>
|
|
22
|
-
</div>
|
|
23
|
-
</ng-container>
|
|
24
|
-
<ng-container *ngIf="props.state === 'ERROR'">
|
|
25
|
-
<val-no-content [props]="props.error.titles" (onClick)="clickHandler($event)"></val-no-content>
|
|
26
|
-
</ng-container>
|
|
27
|
-
</div>
|
|
28
|
-
`,
|
|
29
|
-
styleUrls: ['./wizard.component.scss'],
|
|
30
|
-
})
|
|
31
|
-
export class WizardComponent implements OnInit {
|
|
32
|
-
@Input()
|
|
33
|
-
props: WizardMetadata;
|
|
34
|
-
|
|
35
|
-
@Output()
|
|
36
|
-
onClick = new EventEmitter<{ current: number; motion: MOTION }>();
|
|
37
|
-
|
|
38
|
-
wrapperId = 'wizard-wrapper';
|
|
39
|
-
|
|
40
|
-
constructor() {}
|
|
41
|
-
|
|
42
|
-
ngOnInit() {}
|
|
43
|
-
|
|
44
|
-
working() {
|
|
45
|
-
this.props.state = ComponentStates.WORKING;
|
|
46
|
-
this.Current.buttons.map(x => {
|
|
47
|
-
x.state = ComponentStates.DISABLED;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
done() {
|
|
52
|
-
if (this.props.state === ComponentStates.ENABLED) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
this.props.state = ComponentStates.ENABLED;
|
|
57
|
-
this.Current.buttons.map(x => {
|
|
58
|
-
x.state = ComponentStates.ENABLED;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
get Current(): Step {
|
|
63
|
-
return this.props.steps[this.props.current];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
setCurrent(newStep: number) {
|
|
67
|
-
if (newStep === this.props.current) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.props.current = newStep;
|
|
71
|
-
goToTop(this.wrapperId);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
setError(error: string) {
|
|
75
|
-
if (this.props.state === ComponentStates.ERROR) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
this.props.error.titles.bottomContent.content.bellowTitle.text = error;
|
|
80
|
-
this.props.state = ComponentStates.ERROR;
|
|
81
|
-
goToTop(this.wrapperId);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
reset() {
|
|
85
|
-
this.props.error.titles.bottomContent.content.bellowTitle.text = '';
|
|
86
|
-
this.done();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
clickHandler(token?: string) {
|
|
90
|
-
if (!token) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (token.includes('retry')) {
|
|
94
|
-
this.reset();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
this.onClick.emit({ current: this.props.current, motion: MOTION.RETRY });
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@import '../../styles/mixins.scss';
|
|
2
|
-
|
|
3
|
-
.layout-container {
|
|
4
|
-
margin: 0 auto;
|
|
5
|
-
padding: 0;
|
|
6
|
-
width: 100%;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
margin-bottom: pxToRem(16);
|
|
9
|
-
|
|
10
|
-
@include max-media-medium {
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@include media-medium {
|
|
15
|
-
max-width: pxToRem($container-max-large);
|
|
16
|
-
margin-bottom: pxToRem(24);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@include media-xlarge {
|
|
20
|
-
max-width: pxToRem($container-max-xlarge);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'val-layout',
|
|
5
|
-
standalone: true,
|
|
6
|
-
imports: [],
|
|
7
|
-
template: `
|
|
8
|
-
<div class="layout-container">
|
|
9
|
-
<ng-content></ng-content>
|
|
10
|
-
</div>
|
|
11
|
-
`,
|
|
12
|
-
styleUrl: './layout.component.scss',
|
|
13
|
-
})
|
|
14
|
-
export class LayoutComponent {}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { NgIf } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
3
|
-
import { IonContent, IonHeader, IonText, IonTitle, IonToolbar } from '@ionic/angular/standalone';
|
|
4
|
-
import { DividerComponent } from '../../atoms/divider/divider.component';
|
|
5
|
-
import { ExpandableTextComponent } from '../../molecules/expandable-text/expandable-text.component';
|
|
6
|
-
import { LinkComponent } from '../../molecules/link/link.component';
|
|
7
|
-
import { HeaderComponent } from '../../organisms/header/header.component';
|
|
8
|
-
import { LayoutComponent } from '../layout/layout.component';
|
|
9
|
-
import { SimpleMetadata } from './types';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'val-simple',
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [
|
|
15
|
-
NgIf,
|
|
16
|
-
IonHeader,
|
|
17
|
-
IonToolbar,
|
|
18
|
-
IonTitle,
|
|
19
|
-
IonText,
|
|
20
|
-
IonContent,
|
|
21
|
-
HeaderComponent,
|
|
22
|
-
LayoutComponent,
|
|
23
|
-
DividerComponent,
|
|
24
|
-
LinkComponent,
|
|
25
|
-
ExpandableTextComponent,
|
|
26
|
-
],
|
|
27
|
-
template: `
|
|
28
|
-
<val-header [props]="props.header" />
|
|
29
|
-
|
|
30
|
-
<ion-content [fullscreen]="true">
|
|
31
|
-
<ion-header collapse="condense">
|
|
32
|
-
<ion-toolbar>
|
|
33
|
-
<ion-title style="padding: 0;" size="large">{{ props.pageTitle }}</ion-title>
|
|
34
|
-
</ion-toolbar>
|
|
35
|
-
</ion-header>
|
|
36
|
-
@if (props.pageDescription) {
|
|
37
|
-
<div class="description-container">
|
|
38
|
-
<val-expandable-text
|
|
39
|
-
[props]="{
|
|
40
|
-
limit: 180,
|
|
41
|
-
content: props.pageDescription,
|
|
42
|
-
color: 'primary',
|
|
43
|
-
expandText: 'Ver más',
|
|
44
|
-
}"
|
|
45
|
-
/>
|
|
46
|
-
</div>
|
|
47
|
-
}
|
|
48
|
-
@if (props.link) {
|
|
49
|
-
<val-link [props]="props.link" (onClick)="onClickHandler($event)"></val-link>
|
|
50
|
-
}
|
|
51
|
-
@if (props.withDivider) {
|
|
52
|
-
<val-divider [props]="{ fill: 'solid', size: 'medium', color: 'dark' }" />
|
|
53
|
-
}
|
|
54
|
-
<val-layout>
|
|
55
|
-
<ng-content></ng-content>
|
|
56
|
-
</val-layout>
|
|
57
|
-
</ion-content>
|
|
58
|
-
`,
|
|
59
|
-
styles: `
|
|
60
|
-
.description-container {
|
|
61
|
-
padding: 0px 16px;
|
|
62
|
-
}
|
|
63
|
-
`,
|
|
64
|
-
})
|
|
65
|
-
export class SimpleComponent {
|
|
66
|
-
@Input()
|
|
67
|
-
props: SimpleMetadata;
|
|
68
|
-
|
|
69
|
-
@Output()
|
|
70
|
-
onClick = new EventEmitter<string>();
|
|
71
|
-
|
|
72
|
-
onClickHandler(token?: string) {
|
|
73
|
-
this.onClick.emit(token);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { FormControl, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { ImageMetadata } from './atoms/image/types';
|
|
3
|
-
import { Color } from '@ionic/core';
|
|
4
|
-
|
|
5
|
-
export type ComponentState = 'ENABLED' | 'DISABLED' | 'WORKING' | 'ERROR';
|
|
6
|
-
const ENABLED: ComponentState = 'ENABLED';
|
|
7
|
-
const DISABLED: ComponentState = 'DISABLED';
|
|
8
|
-
const WORKING: ComponentState = 'WORKING';
|
|
9
|
-
const ERROR: ComponentState = 'ERROR';
|
|
10
|
-
export const ComponentStates = { ENABLED, DISABLED, WORKING, ERROR };
|
|
11
|
-
|
|
12
|
-
export enum ActionType {
|
|
13
|
-
BROWSER_NEW_TAB,
|
|
14
|
-
BROWSER_DOWNLOAD,
|
|
15
|
-
NATIVE_DOWNLOAD,
|
|
16
|
-
APP_NAVIGATION,
|
|
17
|
-
BROWSER_NAVIGATION,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type Action = {
|
|
21
|
-
description: string;
|
|
22
|
-
type: ActionType;
|
|
23
|
-
source: string;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export enum InputType {
|
|
27
|
-
TEXT,
|
|
28
|
-
EMAIL,
|
|
29
|
-
PASSWORD,
|
|
30
|
-
COMMENT,
|
|
31
|
-
NUMBER,
|
|
32
|
-
PIN_CODE,
|
|
33
|
-
DATE,
|
|
34
|
-
HOUR,
|
|
35
|
-
CHECK,
|
|
36
|
-
RADIO,
|
|
37
|
-
SELECT,
|
|
38
|
-
FILE,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type InputOption = {
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
selected?: boolean;
|
|
45
|
-
order: number;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type InputMetadata = {
|
|
49
|
-
control: FormControl;
|
|
50
|
-
token: string;
|
|
51
|
-
label: string;
|
|
52
|
-
name: string;
|
|
53
|
-
hint: string;
|
|
54
|
-
placeholder: string;
|
|
55
|
-
type: InputType;
|
|
56
|
-
order: number;
|
|
57
|
-
validators: ValidatorFn[];
|
|
58
|
-
options?: InputOption[];
|
|
59
|
-
range?: {
|
|
60
|
-
min: number;
|
|
61
|
-
max: number;
|
|
62
|
-
};
|
|
63
|
-
errors: {
|
|
64
|
-
[key: string]: string;
|
|
65
|
-
};
|
|
66
|
-
value?: string;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type FormSection = {
|
|
70
|
-
name: string;
|
|
71
|
-
order: number;
|
|
72
|
-
fields: InputMetadata[];
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export type FormSubmit = {
|
|
76
|
-
fields: { key: string; value: string }[];
|
|
77
|
-
token?: string;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export type FormMetadata = {
|
|
81
|
-
name: string;
|
|
82
|
-
sections: FormSection[];
|
|
83
|
-
actions: ButtonMetadata;
|
|
84
|
-
state: ComponentState;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export enum ToolbarActionType {
|
|
88
|
-
AVATAR = 'AVATAR',
|
|
89
|
-
ICON = 'ICON',
|
|
90
|
-
IMAGE = 'IMAGE',
|
|
91
|
-
BUTTON = 'BUTTON',
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export type ToolbarAction = {
|
|
95
|
-
type: 'AVATAR' | 'ICON' | 'IMAGE' | 'BUTTON';
|
|
96
|
-
token?: string;
|
|
97
|
-
position: 'left' | 'right' | 'center';
|
|
98
|
-
description?: string;
|
|
99
|
-
image?: ImageMetadata;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export interface IconMetada {
|
|
103
|
-
name: string;
|
|
104
|
-
slot: 'start' | 'end';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface ButtonMetadata {
|
|
108
|
-
actionType?: ActionType;
|
|
109
|
-
expand?: 'full' | 'block';
|
|
110
|
-
href?: string;
|
|
111
|
-
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
112
|
-
download?: string;
|
|
113
|
-
color: Color;
|
|
114
|
-
state: ComponentState;
|
|
115
|
-
text: string;
|
|
116
|
-
icon?: IconMetada;
|
|
117
|
-
shape?: 'round';
|
|
118
|
-
size?: 'small' | 'default' | 'large';
|
|
119
|
-
fill?: 'clear' | 'outline' | 'solid' | 'default';
|
|
120
|
-
type: 'button' | 'submit' | 'reset';
|
|
121
|
-
token?: string;
|
|
122
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Injectable({
|
|
4
|
-
providedIn: 'root',
|
|
5
|
-
})
|
|
6
|
-
export class DownloadService {
|
|
7
|
-
getFileNameFromUrl(url: string): string {
|
|
8
|
-
try {
|
|
9
|
-
const pathSegments = url.split('/');
|
|
10
|
-
const lastSegment = pathSegments[pathSegments.length - 1];
|
|
11
|
-
const fileName = decodeURIComponent(lastSegment);
|
|
12
|
-
return fileName;
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.error('Error al obtener nombre de archivo: ', JSON.stringify(error));
|
|
15
|
-
return 'filename';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
openNewTab(url: string): void {
|
|
20
|
-
if (url) {
|
|
21
|
-
const fileName = this.getFileNameFromUrl(url);
|
|
22
|
-
const link = document.createElement('a');
|
|
23
|
-
link.href = url;
|
|
24
|
-
link.download = fileName;
|
|
25
|
-
link.target = '_blank';
|
|
26
|
-
document.body.appendChild(link);
|
|
27
|
-
link.click();
|
|
28
|
-
document.body.removeChild(link);
|
|
29
|
-
} else {
|
|
30
|
-
console.error('La URL no está definida');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
downloadLinkFromBrowser(url: string): void {
|
|
35
|
-
console.log('trying to download file from url');
|
|
36
|
-
if (url) {
|
|
37
|
-
fetch(url)
|
|
38
|
-
.then(response => response.blob())
|
|
39
|
-
.then(blob => {
|
|
40
|
-
const url = window.URL.createObjectURL(blob);
|
|
41
|
-
const link = document.createElement('a');
|
|
42
|
-
link.href = url;
|
|
43
|
-
|
|
44
|
-
const fileName = this.getFileNameFromUrl(url);
|
|
45
|
-
link.download = `${+new Date()}-${fileName}`;
|
|
46
|
-
link.target = '_self';
|
|
47
|
-
link.click();
|
|
48
|
-
|
|
49
|
-
window.URL.revokeObjectURL(url);
|
|
50
|
-
})
|
|
51
|
-
.catch(error => {
|
|
52
|
-
console.error('Error al descargar el archivo:', JSON.stringify(error));
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
console.error('La URL no está definida');
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
|
|
3
|
-
import { Injectable } from '@angular/core';
|
|
4
|
-
import { addIcons } from 'ionicons';
|
|
5
|
-
import {
|
|
6
|
-
addCircleOutline,
|
|
7
|
-
addOutline,
|
|
8
|
-
alertCircleOutline,
|
|
9
|
-
alertOutline,
|
|
10
|
-
arrowBackOutline,
|
|
11
|
-
arrowDownOutline,
|
|
12
|
-
arrowForwardOutline,
|
|
13
|
-
checkmarkCircleOutline,
|
|
14
|
-
ellipsisHorizontalOutline,
|
|
15
|
-
notificationsOutline,
|
|
16
|
-
} from 'ionicons/icons';
|
|
17
|
-
|
|
18
|
-
@Injectable({
|
|
19
|
-
providedIn: 'root',
|
|
20
|
-
})
|
|
21
|
-
export class IconService {
|
|
22
|
-
constructor() {
|
|
23
|
-
addIcons({
|
|
24
|
-
addOutline,
|
|
25
|
-
addCircleOutline,
|
|
26
|
-
alertOutline,
|
|
27
|
-
alertCircleOutline,
|
|
28
|
-
arrowBackOutline,
|
|
29
|
-
arrowForwardOutline,
|
|
30
|
-
arrowDownOutline,
|
|
31
|
-
checkmarkCircleOutline,
|
|
32
|
-
ellipsisHorizontalOutline,
|
|
33
|
-
notificationsOutline,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
|
2
|
-
|
|
3
|
-
import { Injectable } from '@angular/core';
|
|
4
|
-
import { Browser, OpenOptions } from '@capacitor/browser';
|
|
5
|
-
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root',
|
|
8
|
-
})
|
|
9
|
-
export class InAppBrowserService {
|
|
10
|
-
options: OpenOptions = {
|
|
11
|
-
presentationStyle: 'popover',
|
|
12
|
-
url: '',
|
|
13
|
-
};
|
|
14
|
-
constructor() {}
|
|
15
|
-
|
|
16
|
-
async openWithInAppBrowser(url: string) {
|
|
17
|
-
await Browser.open({ ...this.options, url });
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LanguagesContent, TextContent } from '../types';
|
|
2
|
-
|
|
3
|
-
const text: LanguagesContent = {
|
|
4
|
-
es: {
|
|
5
|
-
spanish: 'Español',
|
|
6
|
-
english: 'Inglés',
|
|
7
|
-
},
|
|
8
|
-
en: {
|
|
9
|
-
spanish: 'Spanish',
|
|
10
|
-
english: 'English',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default new TextContent(text);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LanguagesContent, TextContent } from '../types';
|
|
2
|
-
|
|
3
|
-
const text: LanguagesContent = {
|
|
4
|
-
es: {
|
|
5
|
-
light: 'Siempre claro',
|
|
6
|
-
dark: 'Siempre oscuro',
|
|
7
|
-
auto: 'Automático',
|
|
8
|
-
},
|
|
9
|
-
en: {
|
|
10
|
-
light: 'Always light',
|
|
11
|
-
dark: 'Always dark',
|
|
12
|
-
auto: 'System settings',
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default new TextContent(text);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import LangSettings from './components/lang-settings';
|
|
2
|
-
import ThemeSettings from './components/theme-settings';
|
|
3
|
-
import { TextContent } from './types';
|
|
4
|
-
|
|
5
|
-
export interface Provider {
|
|
6
|
-
[x: string]: TextContent;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const content: Provider = {
|
|
10
|
-
LangSettings,
|
|
11
|
-
ThemeSettings,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default content;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import { Provider } from './content';
|
|
4
|
-
import { LangOption, LanguageText } from './types';
|
|
5
|
-
import { LocalStorageService } from '../local-storage.service';
|
|
6
|
-
import { LANG } from '../../shared/constants/storage';
|
|
7
|
-
import { ValtechConfig, ValtechConfigService } from '../types';
|
|
8
|
-
|
|
9
|
-
@Injectable({
|
|
10
|
-
providedIn: 'root',
|
|
11
|
-
})
|
|
12
|
-
export class LangService {
|
|
13
|
-
content: Provider;
|
|
14
|
-
default = LangOption.ES;
|
|
15
|
-
selectedLang: BehaviorSubject<LangOption>;
|
|
16
|
-
config: ValtechConfig;
|
|
17
|
-
|
|
18
|
-
constructor(@Inject(ValtechConfigService) config: ValtechConfig) {
|
|
19
|
-
console.log('injected config: ', config);
|
|
20
|
-
this.content = config.content;
|
|
21
|
-
this.config = config;
|
|
22
|
-
const current = LocalStorageService.get<LangOption>(LANG);
|
|
23
|
-
this.selectedLang = new BehaviorSubject<LangOption>(current || this.default);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
Text(className: string): LanguageText {
|
|
27
|
-
return this.content[className].Content[this.selectedLang.value];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get Lang(): LangOption {
|
|
31
|
-
return this.selectedLang.value;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set Lang(lang: LangOption) {
|
|
35
|
-
this.selectedLang.next(lang);
|
|
36
|
-
LocalStorageService.set<LangOption>(LANG, lang);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Provider } from './content';
|
|
2
|
-
|
|
3
|
-
export type LanguageText = {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type LanguagesContent = {
|
|
8
|
-
[key: string]: LanguageText;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export class TextContent {
|
|
12
|
-
text: LanguagesContent;
|
|
13
|
-
constructor(text: LanguagesContent) {
|
|
14
|
-
this.text = text;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
get Content(): LanguagesContent {
|
|
18
|
-
return this.text;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export enum LangOption {
|
|
23
|
-
ES = 'es',
|
|
24
|
-
EN = 'en',
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export class LocalStorageService {
|
|
2
|
-
static set<T>(reference: string, value: T): void {
|
|
3
|
-
localStorage.setItem(reference, JSON.stringify(value));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
static get<T>(reference: string): T {
|
|
7
|
-
const value = localStorage.getItem(reference);
|
|
8
|
-
return JSON.parse(value) as T;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static remove(reference: string): void {
|
|
12
|
-
localStorage.removeItem(reference);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
static clear() {
|
|
16
|
-
localStorage.clear();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { NavigationExtras, Router } from '@angular/router';
|
|
3
|
-
import { InAppBrowserService } from './in-app-browser.service';
|
|
4
|
-
|
|
5
|
-
@Injectable({
|
|
6
|
-
providedIn: 'root',
|
|
7
|
-
})
|
|
8
|
-
export class NavigationService {
|
|
9
|
-
data: any;
|
|
10
|
-
router = inject(Router);
|
|
11
|
-
inAppBrowser = inject(InAppBrowserService);
|
|
12
|
-
|
|
13
|
-
constructor() {}
|
|
14
|
-
|
|
15
|
-
navigateInApp(url: string) {
|
|
16
|
-
this.inAppBrowser.openWithInAppBrowser(url);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
navigateWithData(route: string, dataTransfer: any) {
|
|
20
|
-
const navigationExtras: NavigationExtras = {
|
|
21
|
-
state: {
|
|
22
|
-
data: dataTransfer,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
this.router.navigate([route], navigationExtras);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
navigateByUrl(url: string) {
|
|
30
|
-
this.router
|
|
31
|
-
.navigateByUrl(url)
|
|
32
|
-
.then(response => {})
|
|
33
|
-
.catch(error => {});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
openInNewTab(url: string): void {
|
|
37
|
-
window.open(url, '_blank', 'noopener,noreferrer');
|
|
38
|
-
}
|
|
39
|
-
}
|