@tacdaed/fragments 1.0.0-beta.4 → 1.0.0-beta.5
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/README.md +16 -11
- package/assets/styles/scss/_all.scss +0 -1
- package/fesm2022/tacdaed-fragments.mjs +8928 -0
- package/index.d.ts +3929 -0
- package/package.json +34 -22
- package/assets/resources/fonts/OpenSans/OpenSans-Italic-VariableFont_wdth_wght.ttf +0 -0
- package/assets/resources/fonts/OpenSans/OpenSans-VariableFont_wdth_wght.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/assets/resources/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/assets/styles/scss/_fonts.scss +0 -122
- package/ng-package.json +0 -20
- package/src/lib/components/accordion/accordion.component.html +0 -103
- package/src/lib/components/accordion/accordion.component.scss +0 -382
- package/src/lib/components/accordion/accordion.component.spec.ts +0 -147
- package/src/lib/components/accordion/accordion.component.ts +0 -211
- package/src/lib/components/accordion/accordion.type.ts +0 -82
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -43
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -112
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -33
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -103
- package/src/lib/components/breadcrumb/breadcrumb.interface.ts +0 -7
- package/src/lib/components/button/button.component.html +0 -57
- package/src/lib/components/button/button.component.scss +0 -445
- package/src/lib/components/button/button.component.spec.ts +0 -99
- package/src/lib/components/button/button.component.ts +0 -143
- package/src/lib/components/button/button.type.ts +0 -7
- package/src/lib/components/card/card.component.html +0 -44
- package/src/lib/components/card/card.component.scss +0 -114
- package/src/lib/components/card/card.component.spec.ts +0 -65
- package/src/lib/components/card/card.component.ts +0 -21
- package/src/lib/components/card/card.type.ts +0 -3
- package/src/lib/components/code-block/code-block.component.html +0 -55
- package/src/lib/components/code-block/code-block.component.scss +0 -122
- package/src/lib/components/code-block/code-block.component.spec.ts +0 -81
- package/src/lib/components/code-block/code-block.component.ts +0 -302
- package/src/lib/components/code-block/code-block.interface.ts +0 -28
- package/src/lib/components/code-block/code-block.type.ts +0 -73
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.html +0 -14
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.scss +0 -20
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.spec.ts +0 -38
- package/src/lib/components/decorative/sparkle-field/sparkle-field.component.ts +0 -181
- package/src/lib/components/input/input-base.ts +0 -187
- package/src/lib/components/input/input-calendar/input-calendar.component.html +0 -76
- package/src/lib/components/input/input-calendar/input-calendar.component.scss +0 -179
- package/src/lib/components/input/input-calendar/input-calendar.component.spec.ts +0 -44
- package/src/lib/components/input/input-calendar/input-calendar.component.ts +0 -299
- package/src/lib/components/input/input-checkbox/input-checkbox.component.html +0 -37
- package/src/lib/components/input/input-checkbox/input-checkbox.component.scss +0 -128
- package/src/lib/components/input/input-checkbox/input-checkbox.component.spec.ts +0 -43
- package/src/lib/components/input/input-checkbox/input-checkbox.component.ts +0 -112
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.html +0 -43
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.scss +0 -140
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.spec.ts +0 -62
- package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.ts +0 -136
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.html +0 -81
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.scss +0 -228
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.spec.ts +0 -62
- package/src/lib/components/input/input-clock-picker/input-clock-picker.component.ts +0 -178
- package/src/lib/components/input/input-consts.ts +0 -132
- package/src/lib/components/input/input-date/input-date-validators.ts +0 -41
- package/src/lib/components/input/input-date/input-date.component.html +0 -41
- package/src/lib/components/input/input-date/input-date.component.scss +0 -95
- package/src/lib/components/input/input-date/input-date.component.spec.ts +0 -43
- package/src/lib/components/input/input-date/input-date.component.ts +0 -359
- package/src/lib/components/input/input-date-time/input-date-time.component.html +0 -70
- package/src/lib/components/input/input-date-time/input-date-time.component.scss +0 -133
- package/src/lib/components/input/input-date-time/input-date-time.component.spec.ts +0 -36
- package/src/lib/components/input/input-date-time/input-date-time.component.ts +0 -387
- package/src/lib/components/input/input-file-upload/input-file-upload.component.html +0 -89
- package/src/lib/components/input/input-file-upload/input-file-upload.component.scss +0 -171
- package/src/lib/components/input/input-file-upload/input-file-upload.component.spec.ts +0 -43
- package/src/lib/components/input/input-file-upload/input-file-upload.component.ts +0 -351
- package/src/lib/components/input/input-interface.ts +0 -8
- package/src/lib/components/input/input-number/input-number-validators.ts +0 -0
- package/src/lib/components/input/input-number/input-number.component.html +0 -51
- package/src/lib/components/input/input-number/input-number.component.scss +0 -140
- package/src/lib/components/input/input-number/input-number.component.spec.ts +0 -44
- package/src/lib/components/input/input-number/input-number.component.ts +0 -343
- package/src/lib/components/input/input-radio-group/input-radio-group.component.html +0 -44
- package/src/lib/components/input/input-radio-group/input-radio-group.component.scss +0 -139
- package/src/lib/components/input/input-radio-group/input-radio-group.component.spec.ts +0 -58
- package/src/lib/components/input/input-radio-group/input-radio-group.component.ts +0 -132
- package/src/lib/components/input/input-slider/input-slider.component.html +0 -111
- package/src/lib/components/input/input-slider/input-slider.component.scss +0 -203
- package/src/lib/components/input/input-slider/input-slider.component.spec.ts +0 -46
- package/src/lib/components/input/input-slider/input-slider.component.ts +0 -410
- package/src/lib/components/input/input-text/input-text-validators.ts +0 -67
- package/src/lib/components/input/input-text/input-text.component.html +0 -71
- package/src/lib/components/input/input-text/input-text.component.scss +0 -118
- package/src/lib/components/input/input-text/input-text.component.spec.ts +0 -55
- package/src/lib/components/input/input-text/input-text.component.ts +0 -215
- package/src/lib/components/input/input-time/input-time-validators.ts +0 -42
- package/src/lib/components/input/input-time/input-time.component.html +0 -92
- package/src/lib/components/input/input-time/input-time.component.scss +0 -191
- package/src/lib/components/input/input-time/input-time.component.spec.ts +0 -39
- package/src/lib/components/input/input-time/input-time.component.ts +0 -691
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.html +0 -36
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.scss +0 -121
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.spec.ts +0 -54
- package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.ts +0 -117
- package/src/lib/components/input/input-type.ts +0 -18
- package/src/lib/components/input/input-validation/input-validation.component.html +0 -19
- package/src/lib/components/input/input-validation/input-validation.component.scss +0 -39
- package/src/lib/components/input/input-validation/input-validation.component.spec.ts +0 -45
- package/src/lib/components/input/input-validation/input-validation.component.ts +0 -13
- package/src/lib/components/input/input.pipe.ts +0 -14
- package/src/lib/components/layout/container/container.component.html +0 -1
- package/src/lib/components/layout/container/container.component.scss +0 -33
- package/src/lib/components/layout/container/container.component.ts +0 -32
- package/src/lib/components/layout/container/container.type.ts +0 -1
- package/src/lib/components/layout/divider/divider.component.html +0 -1
- package/src/lib/components/layout/divider/divider.component.scss +0 -60
- package/src/lib/components/layout/divider/divider.component.ts +0 -38
- package/src/lib/components/layout/divider/divider.type.ts +0 -2
- package/src/lib/components/layout/section/section.component.html +0 -21
- package/src/lib/components/layout/section/section.component.scss +0 -43
- package/src/lib/components/layout/section/section.component.ts +0 -33
- package/src/lib/components/layout/section/section.type.ts +0 -2
- package/src/lib/components/layout/separator/separator.component.html +0 -9
- package/src/lib/components/layout/separator/separator.component.scss +0 -52
- package/src/lib/components/layout/separator/separator.component.ts +0 -25
- package/src/lib/components/layout/separator/separator.type.ts +0 -1
- package/src/lib/components/loader/content-blur/content-blur.component.html +0 -13
- package/src/lib/components/loader/content-blur/content-blur.component.scss +0 -43
- package/src/lib/components/loader/content-blur/content-blur.component.spec.ts +0 -42
- package/src/lib/components/loader/content-blur/content-blur.component.ts +0 -34
- package/src/lib/components/loader/loader.type.ts +0 -2
- package/src/lib/components/loader/progress-bar/progress-bar.component.html +0 -26
- package/src/lib/components/loader/progress-bar/progress-bar.component.scss +0 -151
- package/src/lib/components/loader/progress-bar/progress-bar.component.spec.ts +0 -47
- package/src/lib/components/loader/progress-bar/progress-bar.component.ts +0 -28
- package/src/lib/components/loader/progress-bar/progress-bar.type.ts +0 -8
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.html +0 -12
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.scss +0 -202
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.spec.ts +0 -55
- package/src/lib/components/loader/pulse-loader/pulse-loader.component.ts +0 -73
- package/src/lib/components/loader/pulse-loader/pulse-loader.type.ts +0 -6
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.html +0 -13
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.scss +0 -113
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.spec.ts +0 -37
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.ts +0 -51
- package/src/lib/components/loader/skeleton-loader/skeleton-loader.type.ts +0 -6
- package/src/lib/components/loader/spinner/spinner.component.html +0 -20
- package/src/lib/components/loader/spinner/spinner.component.scss +0 -137
- package/src/lib/components/loader/spinner/spinner.component.spec.ts +0 -43
- package/src/lib/components/loader/spinner/spinner.component.ts +0 -32
- package/src/lib/components/loader/spinner/spinner.type.ts +0 -6
- package/src/lib/components/modal/modal.component.html +0 -47
- package/src/lib/components/modal/modal.component.scss +0 -139
- package/src/lib/components/modal/modal.component.spec.ts +0 -60
- package/src/lib/components/modal/modal.component.ts +0 -83
- package/src/lib/components/modal/modal.type.ts +0 -9
- package/src/lib/components/morph/blob-moph/blob-moprh.component.spec.ts +0 -79
- package/src/lib/components/morph/blob-moph/blob-moprh.component.ts +0 -96
- package/src/lib/components/morph/blob-moph/blob-morph.component.html +0 -34
- package/src/lib/components/morph/blob-moph/blob-morph.component.scss +0 -7
- package/src/lib/components/morph/morph.abstract.ts +0 -13
- package/src/lib/components/pagination/pagination.interface.ts +0 -4
- package/src/lib/components/pagination/small-pagination/small-pagination.component.html +0 -61
- package/src/lib/components/pagination/small-pagination/small-pagination.component.scss +0 -187
- package/src/lib/components/pagination/small-pagination/small-pagination.component.spec.ts +0 -88
- package/src/lib/components/pagination/small-pagination/small-pagination.component.ts +0 -177
- package/src/lib/components/selection-lists/multi-select/multi-select.component.html +0 -170
- package/src/lib/components/selection-lists/multi-select/multi-select.component.scss +0 -312
- package/src/lib/components/selection-lists/multi-select/multi-select.component.spec.ts +0 -61
- package/src/lib/components/selection-lists/multi-select/multi-select.component.ts +0 -372
- package/src/lib/components/selection-lists/selection-list/selection-list.component.html +0 -125
- package/src/lib/components/selection-lists/selection-list/selection-list.component.scss +0 -267
- package/src/lib/components/selection-lists/selection-list/selection-list.component.spec.ts +0 -66
- package/src/lib/components/selection-lists/selection-list/selection-list.component.ts +0 -315
- package/src/lib/components/selection-lists/selection-lists-base.ts +0 -35
- package/src/lib/components/selection-lists/selection-lists-const.ts +0 -17
- package/src/lib/components/selection-lists/selection-lists-interface.ts +0 -7
- package/src/lib/components/selection-lists/selection-lists.type.ts +0 -1
- package/src/lib/components/side-nav/side-nav.component.html +0 -101
- package/src/lib/components/side-nav/side-nav.component.scss +0 -295
- package/src/lib/components/side-nav/side-nav.component.spec.ts +0 -0
- package/src/lib/components/side-nav/side-nav.component.ts +0 -18
- package/src/lib/components/side-nav/side-nav.type.ts +0 -28
- package/src/lib/components/snackbar/snackbar.component.html +0 -33
- package/src/lib/components/snackbar/snackbar.component.scss +0 -195
- package/src/lib/components/snackbar/snackbar.component.ts +0 -112
- package/src/lib/components/snackbar/snackbar.type.ts +0 -27
- package/src/lib/components/status/chip/chip.component.html +0 -51
- package/src/lib/components/status/chip/chip.component.scss +0 -149
- package/src/lib/components/status/chip/chip.component.spec.ts +0 -62
- package/src/lib/components/status/chip/chip.component.ts +0 -83
- package/src/lib/components/status/chip/chip.type.ts +0 -42
- package/src/lib/components/status/directives/badge/badge.directive.spec.ts +0 -60
- package/src/lib/components/status/directives/badge/badge.directive.ts +0 -190
- package/src/lib/components/status/directives/badge/badge.interface.ts +0 -19
- package/src/lib/components/status/pill/pill.component.html +0 -40
- package/src/lib/components/status/pill/pill.component.scss +0 -113
- package/src/lib/components/status/pill/pill.component.spec.ts +0 -47
- package/src/lib/components/status/pill/pill.component.ts +0 -83
- package/src/lib/components/status/pill/pill.type.ts +0 -42
- package/src/lib/components/status/status.interface.ts +0 -57
- package/src/lib/components/status/status.type.ts +0 -62
- package/src/lib/components/status/tag/tag.component.html +0 -39
- package/src/lib/components/status/tag/tag.component.scss +0 -140
- package/src/lib/components/status/tag/tag.component.spec.ts +0 -47
- package/src/lib/components/status/tag/tag.component.ts +0 -83
- package/src/lib/components/status/tag/tag.type.ts +0 -42
- package/src/lib/components/stepper/stepper.component.html +0 -83
- package/src/lib/components/stepper/stepper.component.scss +0 -196
- package/src/lib/components/stepper/stepper.component.ts +0 -482
- package/src/lib/components/stepper/stepper.type.ts +0 -60
- package/src/lib/components/table/table.component.html +0 -438
- package/src/lib/components/table/table.component.scss +0 -259
- package/src/lib/components/table/table.component.spec.ts +0 -117
- package/src/lib/components/table/table.component.ts +0 -215
- package/src/lib/components/table/table.enum.ts +0 -4
- package/src/lib/components/table/table.function.ts +0 -47
- package/src/lib/components/table/table.interface.ts +0 -143
- package/src/lib/components/table/table.pipe.ts +0 -62
- package/src/lib/components/table/table.type.ts +0 -15
- package/src/lib/components/tabs/tabs.component.html +0 -88
- package/src/lib/components/tabs/tabs.component.scss +0 -305
- package/src/lib/components/tabs/tabs.component.spec.ts +0 -94
- package/src/lib/components/tabs/tabs.component.ts +0 -282
- package/src/lib/components/tabs/tabs.type.ts +0 -81
- package/src/lib/components/title-bar/title-bar.component.html +0 -21
- package/src/lib/components/title-bar/title-bar.component.scss +0 -139
- package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -44
- package/src/lib/components/title-bar/title-bar.component.ts +0 -13
- package/src/lib/components/toast/toast.component.html +0 -36
- package/src/lib/components/toast/toast.component.scss +0 -241
- package/src/lib/components/toast/toast.component.ts +0 -165
- package/src/lib/components/toast/toast.type.ts +0 -37
- package/src/lib/components/toast-stack/toast-stack.component.html +0 -30
- package/src/lib/components/toast-stack/toast-stack.component.scss +0 -35
- package/src/lib/components/toast-stack/toast-stack.component.ts +0 -51
- package/src/lib/consts/country-prefix.ts +0 -244
- package/src/lib/directives/tooltip/popover.directive.ts +0 -274
- package/src/lib/directives/tooltip/tooltip.directive.spec.ts +0 -86
- package/src/lib/directives/tooltip/tooltip.directive.ts +0 -234
- package/src/lib/directives/tooltip/tooltip.interface.ts +0 -29
- package/src/lib/directives/tooltip/tooltip.type.ts +0 -9
- package/src/lib/interfaces/common.interfaces.ts +0 -4
- package/src/lib/pipes/chunk.pipe.ts +0 -16
- package/src/lib/pipes/safe-html.pipe.ts +0 -14
- package/src/lib/pipes/sanitize-html.pipe.ts +0 -23
- package/src/lib/types/base.types.ts +0 -23
- package/src/lib/types/common.types.ts +0 -98
- package/src/lib/types/form.types.ts +0 -5
- package/src/lib/utils/common.utils.ts +0 -53
- package/src/lib/utils/date.utils.ts +0 -474
- package/src/lib/utils/number.utils.ts +0 -16
- package/src/lib/utils/uuid.utils.ts +0 -39
- package/src/public-api.ts +0 -114
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -9
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
@use './../../../../../assets/styles/scss/variables' as *;
|
|
2
|
-
|
|
3
|
-
@keyframes frg-spin {
|
|
4
|
-
to {
|
|
5
|
-
transform: rotate(360deg);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
display: block;
|
|
11
|
-
|
|
12
|
-
.frg-spinner {
|
|
13
|
-
display: inline-block;
|
|
14
|
-
line-height: 0;
|
|
15
|
-
vertical-align: middle;
|
|
16
|
-
|
|
17
|
-
&--center {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&__circle {
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
display: inline-block;
|
|
26
|
-
border-radius: 50%;
|
|
27
|
-
border-style: solid;
|
|
28
|
-
animation: frg-spin 0.8s linear infinite;
|
|
29
|
-
width: $frg-loader-size-md;
|
|
30
|
-
height: $frg-loader-size-md;
|
|
31
|
-
border-width: $frg-loader-border-width;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Varianti dimensione
|
|
35
|
-
&--xs .frg-spinner__circle {
|
|
36
|
-
width: $frg-loader-size-xs;
|
|
37
|
-
height: $frg-loader-size-xs;
|
|
38
|
-
border-width: 0.125rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&--sm .frg-spinner__circle {
|
|
42
|
-
width: $frg-loader-size-sm;
|
|
43
|
-
height: $frg-loader-size-sm;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&--md .frg-spinner__circle {
|
|
47
|
-
width: $frg-loader-size-md;
|
|
48
|
-
height: $frg-loader-size-md;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&--lg .frg-spinner__circle {
|
|
52
|
-
width: $frg-loader-size-lg;
|
|
53
|
-
height: $frg-loader-size-lg;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&--xl .frg-spinner__circle {
|
|
57
|
-
width: $frg-loader-size-xl;
|
|
58
|
-
height: $frg-loader-size-xl;
|
|
59
|
-
border-width: 0.25rem;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Colore
|
|
63
|
-
&--primary .frg-spinner__circle {
|
|
64
|
-
border-color: $frg-loader-color-primary;
|
|
65
|
-
border-left-color: transparent;
|
|
66
|
-
border-right-color: transparent;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&--secondary .frg-spinner__circle {
|
|
70
|
-
border-color: $frg-loader-color-secondary;
|
|
71
|
-
border-left-color: transparent;
|
|
72
|
-
border-right-color: transparent;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&--tertiary .frg-spinner__circle {
|
|
76
|
-
border-color: $frg-loader-color-tertiary;
|
|
77
|
-
border-left-color: transparent;
|
|
78
|
-
border-right-color: transparent;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&--dark .frg-spinner__circle {
|
|
82
|
-
border-color: $frg-loader-color-dark;
|
|
83
|
-
border-left-color: transparent;
|
|
84
|
-
border-right-color: transparent;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&--light .frg-spinner__circle {
|
|
88
|
-
border-color: $frg-loader-color-light;
|
|
89
|
-
border-left-color: transparent;
|
|
90
|
-
border-right-color: transparent;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@media (prefers-reduced-motion: reduce) {
|
|
94
|
-
&__circle {
|
|
95
|
-
animation: none;
|
|
96
|
-
transform: rotate(0);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&--overlay {
|
|
101
|
-
position: fixed;
|
|
102
|
-
top: 0;
|
|
103
|
-
left: 0;
|
|
104
|
-
width: 100vw;
|
|
105
|
-
height: 100vh;
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
justify-content: center;
|
|
109
|
-
background: rgba($color-light-neutral, .6);
|
|
110
|
-
z-index: 9999;
|
|
111
|
-
backdrop-filter: blur(.2rem);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&--overlay-item {
|
|
115
|
-
position: absolute;
|
|
116
|
-
inset: 0;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
z-index: 1;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* Accessibilità */
|
|
125
|
-
.sr-only {
|
|
126
|
-
position: absolute !important;
|
|
127
|
-
width: 1px !important;
|
|
128
|
-
height: 1px !important;
|
|
129
|
-
padding: 0 !important;
|
|
130
|
-
margin: -1px !important;
|
|
131
|
-
overflow: hidden !important;
|
|
132
|
-
clip: rect(0, 0, 0, 0) !important;
|
|
133
|
-
white-space: nowrap !important;
|
|
134
|
-
border: 0 !important;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { SimpleChange } from '@angular/core';
|
|
3
|
-
import { By } from '@angular/platform-browser';
|
|
4
|
-
import { SpinnerComponent } from './spinner.component';
|
|
5
|
-
|
|
6
|
-
describe('SpinnerComponent', () => {
|
|
7
|
-
let fixture: ComponentFixture<SpinnerComponent>;
|
|
8
|
-
let component: SpinnerComponent;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule({
|
|
12
|
-
imports: [SpinnerComponent]
|
|
13
|
-
}).compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(SpinnerComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
afterEach(() => {
|
|
20
|
-
document.body.style.overflow = '';
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it('applies overlay class when enabled', () => {
|
|
24
|
-
component.isOverlay = true;
|
|
25
|
-
|
|
26
|
-
fixture.detectChanges();
|
|
27
|
-
|
|
28
|
-
const spinner = fixture.debugElement.query(By.css('.frg-spinner'));
|
|
29
|
-
expect(spinner.nativeElement.classList).toContain('frg-spinner--overlay');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('toggles body scroll when overlay changes', () => {
|
|
33
|
-
component.isOverlay = true;
|
|
34
|
-
component.ngOnChanges({
|
|
35
|
-
isOverlay: new SimpleChange(false, true, false)
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
expect(document.body.style.overflow).toBe('hidden');
|
|
39
|
-
|
|
40
|
-
component.ngOnDestroy();
|
|
41
|
-
expect(document.body.style.overflow).toBe('');
|
|
42
|
-
});
|
|
43
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { NgClass } from '@angular/common';
|
|
2
|
-
import { Component, Input, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
3
|
-
import { TSpinnerSize, TSpinnerType } from './spinner.type';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'frg-spinner',
|
|
7
|
-
templateUrl: './spinner.component.html',
|
|
8
|
-
styleUrls: ['./spinner.component.scss'],
|
|
9
|
-
imports: [NgClass]
|
|
10
|
-
})
|
|
11
|
-
export class SpinnerComponent implements OnChanges, OnDestroy {
|
|
12
|
-
@Input() size: TSpinnerSize = 'medium';
|
|
13
|
-
@Input() isCentered: boolean = false;
|
|
14
|
-
@Input() isOverlay = false;
|
|
15
|
-
@Input() isOverlayItem = false;
|
|
16
|
-
@Input() label = 'Loading...';
|
|
17
|
-
@Input() styleType: TSpinnerType = 'primary';
|
|
18
|
-
|
|
19
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
20
|
-
if (changes['isOverlay']) {
|
|
21
|
-
this.toggleBodyScroll(this.isOverlay);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
ngOnDestroy(): void {
|
|
26
|
-
this.toggleBodyScroll(false);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private toggleBodyScroll(disable: boolean): void {
|
|
30
|
-
document.body.style.overflow = disable ? 'hidden' : '';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@if (open) {
|
|
2
|
-
<div class="frg-modal__backdrop">
|
|
3
|
-
<button
|
|
4
|
-
type="button"
|
|
5
|
-
class="frg-modal__backdrop-btn"
|
|
6
|
-
aria-label="Close dialog"
|
|
7
|
-
(click)="onBackdropClick()"
|
|
8
|
-
></button>
|
|
9
|
-
<dialog
|
|
10
|
-
class="frg-modal"
|
|
11
|
-
[ngClass]="modalClassMap"
|
|
12
|
-
aria-modal="true"
|
|
13
|
-
[attr.aria-labelledby]="ariaLabelledBy || null"
|
|
14
|
-
[attr.aria-describedby]="ariaDescribedBy || null"
|
|
15
|
-
[attr.aria-label]="ariaLabelledBy ? null : ariaLabel"
|
|
16
|
-
open
|
|
17
|
-
>
|
|
18
|
-
@if (showHeader) {
|
|
19
|
-
<div class="frg-modal__header">
|
|
20
|
-
<div class="frg-modal__header-content">
|
|
21
|
-
<ng-content select="[frg-modal-head]"></ng-content>
|
|
22
|
-
</div>
|
|
23
|
-
@if (hasCloseButton) {
|
|
24
|
-
<button
|
|
25
|
-
type="button"
|
|
26
|
-
class="frg-modal__close-btn"
|
|
27
|
-
(click)="onCloseClick()"
|
|
28
|
-
aria-label="Close dialog"
|
|
29
|
-
>
|
|
30
|
-
×
|
|
31
|
-
</button>
|
|
32
|
-
}
|
|
33
|
-
</div>
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
<div class="frg-modal__body" [ngClass]="{ 'frg-modal__body--with-footer': hasFooter }">
|
|
37
|
-
<ng-content select="[frg-modal-body]"></ng-content>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
@if (hasFooter) {
|
|
41
|
-
<div class="frg-modal__footer">
|
|
42
|
-
<ng-content select="[frg-modal-footer]"></ng-content>
|
|
43
|
-
</div>
|
|
44
|
-
}
|
|
45
|
-
</dialog>
|
|
46
|
-
</div>
|
|
47
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
@use '../../../../assets/styles/scss/variables' as *;
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
dialog {
|
|
5
|
-
padding: 0.25rem;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.frg-modal__backdrop {
|
|
9
|
-
position: fixed;
|
|
10
|
-
inset: 0;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
padding: 1.5rem;
|
|
15
|
-
background: rgba($color-dark, 0.45);
|
|
16
|
-
backdrop-filter: blur(6px);
|
|
17
|
-
z-index: 1050;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.frg-modal__backdrop-btn {
|
|
21
|
-
position: absolute;
|
|
22
|
-
inset: 0;
|
|
23
|
-
border: 0;
|
|
24
|
-
padding: 0;
|
|
25
|
-
margin: 0;
|
|
26
|
-
background: transparent;
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
z-index: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.frg-modal {
|
|
32
|
-
width: 100%;
|
|
33
|
-
gap: 1rem;
|
|
34
|
-
max-width: 5rem;
|
|
35
|
-
max-height: calc(100vh - 3rem);
|
|
36
|
-
background: $color-light;
|
|
37
|
-
color: $color-dark;
|
|
38
|
-
border-radius: 0.6rem;
|
|
39
|
-
border: 1px solid rgba($color-dark, 0.08);
|
|
40
|
-
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
font-family: $base-font;
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
animation: frg-modal-enter 0.2s ease-out;
|
|
46
|
-
z-index: 1;
|
|
47
|
-
position: relative;
|
|
48
|
-
|
|
49
|
-
&__size-small {
|
|
50
|
-
max-width: 28rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&__size-medium {
|
|
54
|
-
max-width: 40rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&__size-large {
|
|
58
|
-
max-width: 56rem;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.frg-modal__header {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: space-between;
|
|
66
|
-
gap: 1rem;
|
|
67
|
-
padding: 0.75rem 1.5rem 0.75rem;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.frg-modal__header-content {
|
|
71
|
-
min-width: 0;
|
|
72
|
-
flex: 1;
|
|
73
|
-
font-size: 0.95rem;
|
|
74
|
-
|
|
75
|
-
h1,
|
|
76
|
-
h2,
|
|
77
|
-
h3,
|
|
78
|
-
h4,
|
|
79
|
-
h5,
|
|
80
|
-
h6 {
|
|
81
|
-
font-size: 1.1rem;
|
|
82
|
-
margin-bottom: 0.25rem;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
p {
|
|
86
|
-
font-size: 0.9rem;
|
|
87
|
-
margin-bottom: 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.frg-modal__body {
|
|
92
|
-
padding: 0.75rem 1.5rem 0.75rem;
|
|
93
|
-
overflow-y: auto;
|
|
94
|
-
font-size: 0.95rem;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.frg-modal__body--with-footer {
|
|
98
|
-
border-bottom: 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.frg-modal__footer {
|
|
102
|
-
padding: 0 1.5rem 0.75rem;
|
|
103
|
-
display: flex;
|
|
104
|
-
justify-content: flex-end;
|
|
105
|
-
gap: 0.75rem;
|
|
106
|
-
flex-wrap: wrap;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.frg-modal__close-btn {
|
|
110
|
-
background: transparent;
|
|
111
|
-
border: none;
|
|
112
|
-
color: $color-dark-soft;
|
|
113
|
-
font-size: 1.5rem;
|
|
114
|
-
line-height: 1;
|
|
115
|
-
padding: 0.15rem 0.4rem;
|
|
116
|
-
border-radius: 50%;
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
position: absolute;
|
|
119
|
-
top: 0.65rem;
|
|
120
|
-
right: 0.75rem;
|
|
121
|
-
|
|
122
|
-
&:hover,
|
|
123
|
-
&:focus {
|
|
124
|
-
color: $color-dark;
|
|
125
|
-
outline: none;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@keyframes frg-modal-enter {
|
|
130
|
-
from {
|
|
131
|
-
opacity: 0;
|
|
132
|
-
transform: translateY(6px);
|
|
133
|
-
}
|
|
134
|
-
to {
|
|
135
|
-
opacity: 1;
|
|
136
|
-
transform: translateY(0);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { By } from '@angular/platform-browser';
|
|
4
|
-
import { ModalCloseEvent } from './modal.type';
|
|
5
|
-
import { ModalComponent } from './modal.component';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
standalone: true,
|
|
9
|
-
imports: [ModalComponent],
|
|
10
|
-
template: `
|
|
11
|
-
<frg-modal [(open)]="open" (closed)="onClosed($event)">
|
|
12
|
-
<div frg-modal-head>
|
|
13
|
-
<h5 id="modal-title">Title</h5>
|
|
14
|
-
</div>
|
|
15
|
-
<div frg-modal-body>Body</div>
|
|
16
|
-
<div frg-modal-footer>Footer</div>
|
|
17
|
-
</frg-modal>
|
|
18
|
-
`
|
|
19
|
-
})
|
|
20
|
-
class TestHostComponent {
|
|
21
|
-
open = true;
|
|
22
|
-
closedEvent: ModalCloseEvent | null = null;
|
|
23
|
-
|
|
24
|
-
onClosed(event: ModalCloseEvent): void {
|
|
25
|
-
this.open = false;
|
|
26
|
-
this.closedEvent = event;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
describe('ModalComponent', () => {
|
|
31
|
-
let fixture: ComponentFixture<TestHostComponent>;
|
|
32
|
-
|
|
33
|
-
beforeEach(async () => {
|
|
34
|
-
await TestBed.configureTestingModule({
|
|
35
|
-
imports: [TestHostComponent]
|
|
36
|
-
}).compileComponents();
|
|
37
|
-
|
|
38
|
-
fixture = TestBed.createComponent(TestHostComponent);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('renders header, body, and footer slots when open', () => {
|
|
42
|
-
fixture.detectChanges();
|
|
43
|
-
|
|
44
|
-
expect(fixture.debugElement.query(By.css('.frg-modal__header'))).toBeTruthy();
|
|
45
|
-
expect(fixture.debugElement.query(By.css('.frg-modal__body'))?.nativeElement.textContent).toContain('Body');
|
|
46
|
-
expect(fixture.debugElement.query(By.css('.frg-modal__footer'))?.nativeElement.textContent).toContain('Footer');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('closes on close button click and emits reason', () => {
|
|
50
|
-
fixture.detectChanges();
|
|
51
|
-
|
|
52
|
-
const closeBtn = fixture.debugElement.query(By.css('.frg-modal__close-btn'));
|
|
53
|
-
closeBtn.nativeElement.click();
|
|
54
|
-
fixture.detectChanges();
|
|
55
|
-
|
|
56
|
-
expect(fixture.componentInstance.open).toBeFalse();
|
|
57
|
-
expect(fixture.componentInstance.closedEvent?.reason).toBe('close-button');
|
|
58
|
-
expect(fixture.debugElement.query(By.css('.frg-modal'))).toBeNull();
|
|
59
|
-
});
|
|
60
|
-
});
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { NgClass } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, HostListener, Input, OnChanges, OnDestroy, Output, SimpleChanges } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
import { ModalCloseEvent, TModalCloseReason, TModalSize } from './modal.type';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'frg-modal',
|
|
8
|
-
imports: [NgClass],
|
|
9
|
-
templateUrl: './modal.component.html',
|
|
10
|
-
styleUrl: './modal.component.scss'
|
|
11
|
-
})
|
|
12
|
-
export class ModalComponent implements OnChanges, OnDestroy {
|
|
13
|
-
@Input() open: boolean = false;
|
|
14
|
-
@Input() size: TModalSize = 'medium';
|
|
15
|
-
@Input() closeOnBackdrop: boolean = true;
|
|
16
|
-
@Input() closeOnEscape: boolean = true;
|
|
17
|
-
@Input() hasCloseButton: boolean = true;
|
|
18
|
-
@Input() hasHeader: boolean = true;
|
|
19
|
-
@Input() hasFooter: boolean = true;
|
|
20
|
-
@Input() lockBodyScroll: boolean = true;
|
|
21
|
-
@Input() ariaLabel: string = 'Dialog';
|
|
22
|
-
@Input() ariaLabelledBy: string | null = null;
|
|
23
|
-
@Input() ariaDescribedBy: string | null = null;
|
|
24
|
-
|
|
25
|
-
@Output() closed = new EventEmitter<ModalCloseEvent>();
|
|
26
|
-
|
|
27
|
-
get modalClassMap() {
|
|
28
|
-
return {
|
|
29
|
-
'frg-modal__size-small': this.size === 'small',
|
|
30
|
-
'frg-modal__size-medium': this.size === 'medium',
|
|
31
|
-
'frg-modal__size-large': this.size === 'large',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
get showHeader(): boolean {
|
|
36
|
-
return this.hasHeader || this.hasCloseButton;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public ngOnChanges(changes: SimpleChanges): void {
|
|
40
|
-
if (changes['open'] || changes['lockBodyScroll']) {
|
|
41
|
-
this.toggleBodyScroll(this.open && this.lockBodyScroll);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
public ngOnDestroy(): void {
|
|
46
|
-
this.toggleBodyScroll(false);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
protected onBackdropClick(): void {
|
|
50
|
-
if (!this.closeOnBackdrop) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.requestClose('backdrop');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
protected onCloseClick(): void {
|
|
57
|
-
this.requestClose('close-button');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@HostListener('document:keydown', ['$event'])
|
|
61
|
-
onKeydown(event: KeyboardEvent): void {
|
|
62
|
-
if (!this.open || !this.closeOnEscape) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (event.key === 'Escape') {
|
|
67
|
-
event.preventDefault();
|
|
68
|
-
this.requestClose('escape');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
private requestClose(reason: TModalCloseReason): void {
|
|
73
|
-
if (!this.open) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
this.closed.emit({ reason });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
private toggleBodyScroll(disable: boolean): void {
|
|
81
|
-
document.body.style.overflow = disable ? 'hidden' : '';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { By } from '@angular/platform-browser';
|
|
3
|
-
import { BlobMorphComponent } from './blob-moprh.component';
|
|
4
|
-
import { SpinnerComponent } from '../../loader/spinner/spinner.component';
|
|
5
|
-
|
|
6
|
-
describe('BlobMorphComponent', () => {
|
|
7
|
-
let fixture: ComponentFixture<BlobMorphComponent>;
|
|
8
|
-
let component: BlobMorphComponent;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule({
|
|
12
|
-
imports: [BlobMorphComponent, SpinnerComponent]
|
|
13
|
-
}).compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(BlobMorphComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders an image when imageUrl is provided', () => {
|
|
20
|
-
component.imageUrl = 'https://example.com/image.jpg';
|
|
21
|
-
|
|
22
|
-
fixture.detectChanges();
|
|
23
|
-
|
|
24
|
-
const imageEl = fixture.debugElement.query(By.css('image'));
|
|
25
|
-
const rectEl = fixture.debugElement.query(By.css('rect'));
|
|
26
|
-
|
|
27
|
-
expect(imageEl).toBeTruthy();
|
|
28
|
-
expect(rectEl).toBeNull();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('renders a fallback rect when no imageUrl is provided', () => {
|
|
32
|
-
component.imageUrl = null;
|
|
33
|
-
component.fillColor = '#123456';
|
|
34
|
-
|
|
35
|
-
fixture.detectChanges();
|
|
36
|
-
|
|
37
|
-
const rectEl = fixture.debugElement.query(By.css('rect'));
|
|
38
|
-
expect(rectEl).toBeTruthy();
|
|
39
|
-
expect(rectEl.attributes['fill']).toBe('#123456');
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('shows a spinner until load completes', () => {
|
|
43
|
-
component.imageUrl = 'https://example.com/image.jpg';
|
|
44
|
-
|
|
45
|
-
fixture.detectChanges();
|
|
46
|
-
|
|
47
|
-
expect(fixture.debugElement.query(By.css('frg-spinner'))).toBeTruthy();
|
|
48
|
-
|
|
49
|
-
component.onLoadEvent();
|
|
50
|
-
fixture.detectChanges();
|
|
51
|
-
|
|
52
|
-
expect((component as any).isLoaded).toBeTrue();
|
|
53
|
-
expect(fixture.debugElement.query(By.css('frg-spinner'))).toBeNull();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('emits loadEvent on image load', () => {
|
|
57
|
-
const emitSpy = spyOn(component.loadEvent, 'emit');
|
|
58
|
-
|
|
59
|
-
component.onLoadEvent();
|
|
60
|
-
|
|
61
|
-
expect(emitSpy).toHaveBeenCalled();
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('does not log an error when morph paths exist', () => {
|
|
65
|
-
const errorSpy = spyOn(console, 'error');
|
|
66
|
-
component.duration = 1234;
|
|
67
|
-
component.clipId = 'test-clip';
|
|
68
|
-
|
|
69
|
-
fixture.detectChanges();
|
|
70
|
-
|
|
71
|
-
expect(errorSpy).not.toHaveBeenCalled();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('generates a valid SVG path string', () => {
|
|
75
|
-
const path = (component as any).generateRandomPath(6, 40, 10) as string;
|
|
76
|
-
expect(path.startsWith('M')).toBeTrue();
|
|
77
|
-
expect(path.trim().endsWith('Z')).toBeTrue();
|
|
78
|
-
});
|
|
79
|
-
});
|