@festo-ui/angular 3.1.0 → 3.2.0
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 +5 -1
- package/css/bundle.css +1 -0
- package/css/image-gallery.css +1 -0
- package/css/popover.css +1 -0
- package/esm2020/festo-ui-angular.mjs +5 -0
- package/esm2020/index.mjs +20 -0
- package/esm2020/lib/components/accordion/accordion-header/accordion-header.component.mjs +11 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.mjs +15 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.mjs +28 -0
- package/esm2020/lib/components/accordion/accordion-item/accordion-item.component.mjs +143 -0
- package/esm2020/lib/components/accordion/accordion.component.mjs +59 -0
- package/esm2020/lib/components/accordion/index.mjs +6 -0
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +23 -0
- package/esm2020/lib/components/buttons/button/button.component.mjs +41 -0
- package/esm2020/lib/components/buttons/link-button/link-button.component.mjs +33 -0
- package/esm2020/lib/components/chips/chip/chip.component.mjs +37 -0
- package/esm2020/lib/components/chips/chip-container/chip-container.component.mjs +16 -0
- package/esm2020/lib/components/click-outside.directive.mjs +28 -0
- package/esm2020/lib/components/components.module.mjs +223 -0
- package/esm2020/lib/components/image-gallery/image-gallery.component.mjs +58 -0
- package/esm2020/lib/components/image-gallery/image-gallery.module.mjs +21 -0
- package/esm2020/lib/components/loading-indicator/loading-indicator.component.mjs +16 -0
- package/esm2020/lib/components/mobile-flyout/mobile-flyout-item/mobile-flyout-item.component.mjs +27 -0
- package/esm2020/lib/components/mobile-flyout/mobile-flyout-page/mobile-flyout-page.component.mjs +43 -0
- package/esm2020/lib/components/mobile-flyout/mobile-flyout.component.mjs +41 -0
- package/esm2020/lib/components/modals/alert/alert.component.mjs +52 -0
- package/esm2020/lib/components/modals/confirm/confirm.component.mjs +53 -0
- package/esm2020/lib/components/modals/custom-modal/custom-modal.component.mjs +70 -0
- package/esm2020/lib/components/modals/index.mjs +2 -0
- package/esm2020/lib/components/modals/modal.service.mjs +121 -0
- package/esm2020/lib/components/modals/modals.module.mjs +31 -0
- package/esm2020/lib/components/modals/prompt/prompt.component.mjs +102 -0
- package/esm2020/lib/components/pagination/pagination.component.mjs +55 -0
- package/esm2020/lib/components/popovers/legend/legend.component.mjs +42 -0
- package/esm2020/lib/components/popovers/legend/legend.directive.mjs +31 -0
- package/esm2020/lib/components/popovers/popover/popover.component.mjs +31 -0
- package/esm2020/lib/components/popovers/popover-content/popover-content.component.mjs +82 -0
- package/esm2020/lib/components/popovers/popover-content/popover-content.directive.mjs +39 -0
- package/esm2020/lib/components/popovers/popover-menu/popover-menu.component.mjs +68 -0
- package/esm2020/lib/components/popovers/popover-ref.mjs +25 -0
- package/esm2020/lib/components/popovers/popover.defaults.mjs +60 -0
- package/esm2020/lib/components/popovers/popover.models.mjs +23 -0
- package/esm2020/lib/components/popovers/popover.service.mjs +123 -0
- package/esm2020/lib/components/popovers/tooltip/tooltip.directive.mjs +100 -0
- package/esm2020/lib/components/progress/progress.component.mjs +20 -0
- package/esm2020/lib/components/scroll/index.mjs +2 -0
- package/esm2020/lib/components/scroll/scrollable.directive.mjs +72 -0
- package/esm2020/lib/components/search-input/safe-html.pipe.mjs +21 -0
- package/esm2020/lib/components/search-input/search-input.component.mjs +172 -0
- package/esm2020/lib/components/snackbar/snackbar-container.component.mjs +21 -0
- package/esm2020/lib/components/snackbar/snackbar-container.directive.mjs +83 -0
- package/esm2020/lib/components/snackbar/snackbar.component.mjs +79 -0
- package/esm2020/lib/components/snackbar/snackbar.models.mjs +2 -0
- package/esm2020/lib/components/snackbar/snackbar.module.mjs +26 -0
- package/esm2020/lib/components/snackbar/snackbar.service.mjs +23 -0
- package/esm2020/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.mjs +19 -0
- package/esm2020/lib/components/stepper-horizontal/stepper-horizontal.component.mjs +51 -0
- package/esm2020/lib/components/stepper-vertical/step-vertical/step-vertical.component.mjs +56 -0
- package/esm2020/lib/components/stepper-vertical/stepper-vertical.component.mjs +54 -0
- package/esm2020/lib/components/table-header-cell/table-header-cell.directive.mjs +58 -0
- package/esm2020/lib/components/tabs/tab-pane/tab-pane.component.mjs +31 -0
- package/esm2020/lib/components/tabs/tabs.component.mjs +353 -0
- package/esm2020/lib/content/content.module.mjs +20 -0
- package/esm2020/lib/content/icon/icon.component.mjs +17 -0
- package/esm2020/lib/festo-angular.module.mjs +65 -0
- package/esm2020/lib/forms/checkbox/checkbox.component.mjs +149 -0
- package/esm2020/lib/forms/color-indicator/color-indicator.component.mjs +68 -0
- package/esm2020/lib/forms/color-picker/color-helper.mjs +121 -0
- package/esm2020/lib/forms/color-picker/color-picker.component.mjs +273 -0
- package/esm2020/lib/forms/container-host.mjs +27 -0
- package/esm2020/lib/forms/date-picker/date-picker.component.mjs +199 -0
- package/esm2020/lib/forms/date-range-picker/date-range-picker.component.mjs +224 -0
- package/esm2020/lib/forms/forms.module.mjs +146 -0
- package/esm2020/lib/forms/radio/radio.component.mjs +346 -0
- package/esm2020/lib/forms/segment/segment-control/segment-control.component.mjs +57 -0
- package/esm2020/lib/forms/segment/segment.component.mjs +109 -0
- package/esm2020/lib/forms/select/chip-text.pipe.mjs +34 -0
- package/esm2020/lib/forms/select/select-option/select-option.component.mjs +22 -0
- package/esm2020/lib/forms/select/select.component.mjs +257 -0
- package/esm2020/lib/forms/slider/slider.component.mjs +110 -0
- package/esm2020/lib/forms/switch/switch.component.mjs +120 -0
- package/esm2020/lib/forms/text-area/text-area.component.mjs +180 -0
- package/esm2020/lib/forms/text-editor/text-editor.component.mjs +286 -0
- package/esm2020/lib/forms/text-input/text-input.component.mjs +183 -0
- package/esm2020/lib/forms/time-picker/time-picker-dropdown/time-picker-dropdown.component.mjs +89 -0
- package/esm2020/lib/forms/time-picker/time-picker.component.mjs +188 -0
- package/esm2020/lib/forms/unique-selection-dispatcher.mjs +39 -0
- package/esm2020/lib/forms/value-accessor-base.mjs +41 -0
- package/esm2020/lib/layout/layout.module.mjs +18 -0
- package/esm2020/lib/wrappers/flatpickr/flatpickr.component.mjs +59 -0
- package/fesm2015/festo-ui-angular.mjs +6117 -0
- package/fesm2015/festo-ui-angular.mjs.map +1 -0
- package/fesm2020/festo-ui-angular.mjs +6101 -0
- package/fesm2020/festo-ui-angular.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/lib/components/accordion/accordion-header/accordion-header.component.d.ts +5 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.d.ts +6 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.d.ts +15 -0
- package/lib/components/accordion/accordion-item/accordion-item.component.d.ts +34 -0
- package/lib/components/accordion/accordion.component.d.ts +24 -0
- package/lib/components/accordion/index.d.ts +5 -0
- package/lib/components/components.module.d.ts +40 -20
- package/lib/components/image-gallery/image-gallery.component.d.ts +33 -0
- package/lib/components/image-gallery/image-gallery.module.d.ts +10 -0
- package/lib/components/mobile-flyout/mobile-flyout-item/mobile-flyout-item.component.d.ts +10 -0
- package/lib/components/mobile-flyout/mobile-flyout-page/mobile-flyout-page.component.d.ts +15 -0
- package/lib/components/mobile-flyout/mobile-flyout.component.d.ts +11 -0
- package/lib/components/modals/confirm/confirm.component.d.ts +1 -3
- package/lib/components/modals/custom-modal/custom-modal.component.d.ts +21 -0
- package/lib/components/modals/modal.service.d.ts +2 -0
- package/lib/components/modals/modals.module.d.ts +8 -5
- package/lib/components/popovers/tooltip/tooltip.directive.d.ts +5 -3
- package/lib/components/search-input/safe-html.pipe.d.ts +10 -0
- package/lib/components/search-input/search-input.component.d.ts +22 -5
- package/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.d.ts +7 -0
- package/lib/components/stepper-horizontal/stepper-horizontal.component.d.ts +14 -0
- package/lib/components/stepper-vertical/step-vertical/step-vertical.component.d.ts +18 -0
- package/lib/components/stepper-vertical/stepper-vertical.component.d.ts +14 -0
- package/lib/festo-angular.module.d.ts +2 -1
- package/package.json +41 -19
- package/scss/base/components/accordion/accordion-header/accordion-header.component.scss +12 -0
- package/scss/base/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.scss +109 -0
- package/scss/base/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.scss +9 -0
- package/scss/base/components/accordion/accordion-item/accordion-item.component.scss +71 -0
- package/scss/base/components/accordion/accordion.component.scss +6 -0
- package/scss/base/components/breadcrumb/breadcrumb.component.scss +0 -1
- package/scss/base/components/buttons/button/button.component.scss +6 -1
- package/scss/base/components/image-gallery/image-gallery.component.scss +0 -0
- package/scss/base/components/image-gallery/styles.scss +5 -0
- package/scss/base/components/modals/prompt/prompt.component.scss +0 -1
- package/scss/base/components/popovers/legend/legend.component.scss +2 -2
- package/scss/base/components/popovers/popover/styles.scss +2 -3
- package/scss/base/components/popovers/popover-content/popover-content.component.scss +1 -1
- package/scss/base/components/scroll/scroll-story-helper.scss +1 -3
- package/scss/base/components/search-input/search-input.component.scss +4 -0
- package/scss/base/components/snackbar/snackbar.component.scss +1 -1
- package/scss/base/components/stepper-horizontal/step-horizontal/step-horizontal.component.scss +23 -0
- package/scss/base/components/stepper-vertical/step-vertical/step-vertical.component.scss +6 -0
- package/scss/base/forms/color-indicator/color-indicator.component.scss +1 -1
- package/scss/base/forms/color-picker/color-picker.component.scss +15 -15
- package/scss/base/forms/date-picker/date-picker.component.scss +1 -1
- package/scss/base/forms/date-range-picker/date-range-picker.component.scss +1 -1
- package/scss/base/forms/text-area/text-area.component.scss +4 -4
- package/scss/base/forms/text-editor/text-editor.component.scss +8 -10
- package/scss/base/forms/time-picker/time-picker-dropdown/time-picker-dropdown.component.scss +1 -1
- package/bundles/festo-ui-angular.umd.js +0 -6429
- package/bundles/festo-ui-angular.umd.js.map +0 -1
- package/esm2015/festo-ui-angular.js +0 -5
- package/esm2015/festo-ui-angular.js.map +0 -1
- package/esm2015/index.js +0 -18
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js +0 -27
- package/esm2015/lib/components/breadcrumb/breadcrumb.component.js.map +0 -1
- package/esm2015/lib/components/buttons/button/button.component.js +0 -46
- package/esm2015/lib/components/buttons/button/button.component.js.map +0 -1
- package/esm2015/lib/components/buttons/link-button/link-button.component.js +0 -38
- package/esm2015/lib/components/buttons/link-button/link-button.component.js.map +0 -1
- package/esm2015/lib/components/chips/chip/chip.component.js +0 -42
- package/esm2015/lib/components/chips/chip/chip.component.js.map +0 -1
- package/esm2015/lib/components/chips/chip-container/chip-container.component.js +0 -21
- package/esm2015/lib/components/chips/chip-container/chip-container.component.js.map +0 -1
- package/esm2015/lib/components/click-outside.directive.js +0 -28
- package/esm2015/lib/components/click-outside.directive.js.map +0 -1
- package/esm2015/lib/components/components.module.js +0 -155
- package/esm2015/lib/components/components.module.js.map +0 -1
- package/esm2015/lib/components/loading-indicator/loading-indicator.component.js +0 -21
- package/esm2015/lib/components/loading-indicator/loading-indicator.component.js.map +0 -1
- package/esm2015/lib/components/modals/alert/alert.component.js +0 -57
- package/esm2015/lib/components/modals/alert/alert.component.js.map +0 -1
- package/esm2015/lib/components/modals/confirm/confirm.component.js +0 -73
- package/esm2015/lib/components/modals/confirm/confirm.component.js.map +0 -1
- package/esm2015/lib/components/modals/index.js +0 -2
- package/esm2015/lib/components/modals/index.js.map +0 -1
- package/esm2015/lib/components/modals/modal.service.js +0 -91
- package/esm2015/lib/components/modals/modal.service.js.map +0 -1
- package/esm2015/lib/components/modals/modals.module.js +0 -28
- package/esm2015/lib/components/modals/modals.module.js.map +0 -1
- package/esm2015/lib/components/modals/prompt/prompt.component.js +0 -110
- package/esm2015/lib/components/modals/prompt/prompt.component.js.map +0 -1
- package/esm2015/lib/components/pagination/pagination.component.js +0 -60
- package/esm2015/lib/components/pagination/pagination.component.js.map +0 -1
- package/esm2015/lib/components/popovers/legend/legend.component.js +0 -46
- package/esm2015/lib/components/popovers/legend/legend.component.js.map +0 -1
- package/esm2015/lib/components/popovers/legend/legend.directive.js +0 -31
- package/esm2015/lib/components/popovers/legend/legend.directive.js.map +0 -1
- package/esm2015/lib/components/popovers/popover/popover.component.js +0 -35
- package/esm2015/lib/components/popovers/popover/popover.component.js.map +0 -1
- package/esm2015/lib/components/popovers/popover-content/popover-content.component.js +0 -86
- package/esm2015/lib/components/popovers/popover-content/popover-content.component.js.map +0 -1
- package/esm2015/lib/components/popovers/popover-content/popover-content.directive.js +0 -39
- package/esm2015/lib/components/popovers/popover-content/popover-content.directive.js.map +0 -1
- package/esm2015/lib/components/popovers/popover-menu/popover-menu.component.js +0 -72
- package/esm2015/lib/components/popovers/popover-menu/popover-menu.component.js.map +0 -1
- package/esm2015/lib/components/popovers/popover-ref.js +0 -25
- package/esm2015/lib/components/popovers/popover-ref.js.map +0 -1
- package/esm2015/lib/components/popovers/popover.defaults.js +0 -60
- package/esm2015/lib/components/popovers/popover.defaults.js.map +0 -1
- package/esm2015/lib/components/popovers/popover.models.js +0 -23
- package/esm2015/lib/components/popovers/popover.models.js.map +0 -1
- package/esm2015/lib/components/popovers/popover.service.js +0 -117
- package/esm2015/lib/components/popovers/popover.service.js.map +0 -1
- package/esm2015/lib/components/popovers/tooltip/tooltip.directive.js +0 -96
- package/esm2015/lib/components/popovers/tooltip/tooltip.directive.js.map +0 -1
- package/esm2015/lib/components/progress/progress.component.js +0 -23
- package/esm2015/lib/components/progress/progress.component.js.map +0 -1
- package/esm2015/lib/components/scroll/index.js +0 -2
- package/esm2015/lib/components/scroll/index.js.map +0 -1
- package/esm2015/lib/components/scroll/scrollable.directive.js +0 -73
- package/esm2015/lib/components/scroll/scrollable.directive.js.map +0 -1
- package/esm2015/lib/components/search-input/search-input.component.js +0 -155
- package/esm2015/lib/components/search-input/search-input.component.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar-container.component.js +0 -26
- package/esm2015/lib/components/snackbar/snackbar-container.component.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar-container.directive.js +0 -83
- package/esm2015/lib/components/snackbar/snackbar-container.directive.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar.component.js +0 -85
- package/esm2015/lib/components/snackbar/snackbar.component.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar.models.js +0 -2
- package/esm2015/lib/components/snackbar/snackbar.models.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar.module.js +0 -26
- package/esm2015/lib/components/snackbar/snackbar.module.js.map +0 -1
- package/esm2015/lib/components/snackbar/snackbar.service.js +0 -23
- package/esm2015/lib/components/snackbar/snackbar.service.js.map +0 -1
- package/esm2015/lib/components/stepper/stepper.component.js +0 -28
- package/esm2015/lib/components/stepper/stepper.component.js.map +0 -1
- package/esm2015/lib/components/table-header-cell/table-header-cell.directive.js +0 -58
- package/esm2015/lib/components/table-header-cell/table-header-cell.directive.js.map +0 -1
- package/esm2015/lib/components/tabs/tab-pane/tab-pane.component.js +0 -35
- package/esm2015/lib/components/tabs/tab-pane/tab-pane.component.js.map +0 -1
- package/esm2015/lib/components/tabs/tabs.component.js +0 -362
- package/esm2015/lib/components/tabs/tabs.component.js.map +0 -1
- package/esm2015/lib/content/content.module.js +0 -24
- package/esm2015/lib/content/content.module.js.map +0 -1
- package/esm2015/lib/content/icon/icon.component.js +0 -23
- package/esm2015/lib/content/icon/icon.component.js.map +0 -1
- package/esm2015/lib/festo-angular.module.js +0 -58
- package/esm2015/lib/festo-angular.module.js.map +0 -1
- package/esm2015/lib/forms/checkbox/checkbox.component.js +0 -156
- package/esm2015/lib/forms/checkbox/checkbox.component.js.map +0 -1
- package/esm2015/lib/forms/color-indicator/color-indicator.component.js +0 -72
- package/esm2015/lib/forms/color-indicator/color-indicator.component.js.map +0 -1
- package/esm2015/lib/forms/color-picker/color-helper.js +0 -121
- package/esm2015/lib/forms/color-picker/color-helper.js.map +0 -1
- package/esm2015/lib/forms/color-picker/color-picker.component.js +0 -280
- package/esm2015/lib/forms/color-picker/color-picker.component.js.map +0 -1
- package/esm2015/lib/forms/container-host.js +0 -27
- package/esm2015/lib/forms/container-host.js.map +0 -1
- package/esm2015/lib/forms/date-picker/date-picker.component.js +0 -205
- package/esm2015/lib/forms/date-picker/date-picker.component.js.map +0 -1
- package/esm2015/lib/forms/date-range-picker/date-range-picker.component.js +0 -230
- package/esm2015/lib/forms/date-range-picker/date-range-picker.component.js.map +0 -1
- package/esm2015/lib/forms/forms.module.js +0 -146
- package/esm2015/lib/forms/forms.module.js.map +0 -1
- package/esm2015/lib/forms/radio/radio.component.js +0 -353
- package/esm2015/lib/forms/radio/radio.component.js.map +0 -1
- package/esm2015/lib/forms/segment/segment-control/segment-control.component.js +0 -58
- package/esm2015/lib/forms/segment/segment-control/segment-control.component.js.map +0 -1
- package/esm2015/lib/forms/segment/segment.component.js +0 -116
- package/esm2015/lib/forms/segment/segment.component.js.map +0 -1
- package/esm2015/lib/forms/select/chip-text.pipe.js +0 -34
- package/esm2015/lib/forms/select/chip-text.pipe.js.map +0 -1
- package/esm2015/lib/forms/select/select-option/select-option.component.js +0 -29
- package/esm2015/lib/forms/select/select-option/select-option.component.js.map +0 -1
- package/esm2015/lib/forms/select/select.component.js +0 -265
- package/esm2015/lib/forms/select/select.component.js.map +0 -1
- package/esm2015/lib/forms/slider/slider.component.js +0 -116
- package/esm2015/lib/forms/slider/slider.component.js.map +0 -1
- package/esm2015/lib/forms/switch/switch.component.js +0 -127
- package/esm2015/lib/forms/switch/switch.component.js.map +0 -1
- package/esm2015/lib/forms/text-area/text-area.component.js +0 -186
- package/esm2015/lib/forms/text-area/text-area.component.js.map +0 -1
- package/esm2015/lib/forms/text-editor/text-editor.component.js +0 -294
- package/esm2015/lib/forms/text-editor/text-editor.component.js.map +0 -1
- package/esm2015/lib/forms/text-input/text-input.component.js +0 -189
- package/esm2015/lib/forms/text-input/text-input.component.js.map +0 -1
- package/esm2015/lib/forms/time-picker/time-picker-dropdown/time-picker-dropdown.component.js +0 -103
- package/esm2015/lib/forms/time-picker/time-picker-dropdown/time-picker-dropdown.component.js.map +0 -1
- package/esm2015/lib/forms/time-picker/time-picker.component.js +0 -194
- package/esm2015/lib/forms/time-picker/time-picker.component.js.map +0 -1
- package/esm2015/lib/forms/unique-selection-dispatcher.js +0 -39
- package/esm2015/lib/forms/unique-selection-dispatcher.js.map +0 -1
- package/esm2015/lib/forms/value-accessor-base.js +0 -41
- package/esm2015/lib/forms/value-accessor-base.js.map +0 -1
- package/esm2015/lib/layout/layout.module.js +0 -18
- package/esm2015/lib/layout/layout.module.js.map +0 -1
- package/esm2015/lib/wrappers/flatpickr/flatpickr.component.js +0 -63
- package/esm2015/lib/wrappers/flatpickr/flatpickr.component.js.map +0 -1
- package/fesm2015/festo-ui-angular.js +0 -5596
- package/fesm2015/festo-ui-angular.js.map +0 -1
- package/lib/components/stepper/stepper.component.d.ts +0 -30
- package/scss/base/components/stepper/stepper.component.scss +0 -118
- package/scss/styles.scss +0 -2056
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class ProgressComponent {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.background = 'white';
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
ProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
-
ProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: ProgressComponent, selector: "fng-progress", inputs: { progress: "progress", error: "error", background: "background" }, ngImport: i0, template: "<div class=\"fwe-progress\">\n <div\n class=\"fwe-progress-bar\"\n role=\"progressbar\"\n [style.width.%]=\"progress\"\n [class.fwe-bg-red]=\"error\"\n [class.fwe-progress-bar-black]=\"background === 'black'\"\n [class.fwe-progress-bar-background]=\"background === 'background'\"\n [attr.aria-valuenow]=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n ></div>\n</div>\n" });
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ProgressComponent, decorators: [{
|
|
11
|
-
type: Component,
|
|
12
|
-
args: [{
|
|
13
|
-
selector: 'fng-progress',
|
|
14
|
-
templateUrl: './progress.component.html'
|
|
15
|
-
}]
|
|
16
|
-
}], propDecorators: { progress: [{
|
|
17
|
-
type: Input
|
|
18
|
-
}], error: [{
|
|
19
|
-
type: Input
|
|
20
|
-
}], background: [{
|
|
21
|
-
type: Input
|
|
22
|
-
}] } });
|
|
23
|
-
//# sourceMappingURL=progress.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/progress/progress.component.ts","../../../../../../../libs/angular/src/lib/components/progress/progress.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAMjD,MAAM,OAAO,iBAAiB;IAJ9B;QAOW,eAAU,GAAqC,OAAO,CAAC;KACjE;;8GAJY,iBAAiB;kGAAjB,iBAAiB,gICN9B,4ZAaA;2FDPa,iBAAiB;kBAJ7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,WAAW,EAAE,2BAA2B;iBACzC;8BAEU,QAAQ;sBAAhB,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACG,UAAU;sBAAlB,KAAK","sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'fng-progress',\n templateUrl: './progress.component.html'\n})\nexport class ProgressComponent {\n @Input() progress: number;\n @Input() error: boolean;\n @Input() background: 'white' | 'background' | 'black' = 'white';\n}\n","<div class=\"fwe-progress\">\n <div\n class=\"fwe-progress-bar\"\n role=\"progressbar\"\n [style.width.%]=\"progress\"\n [class.fwe-bg-red]=\"error\"\n [class.fwe-progress-bar-black]=\"background === 'black'\"\n [class.fwe-progress-bar-background]=\"background === 'background'\"\n [attr.aria-valuenow]=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n ></div>\n</div>\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/scroll/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './scrollable.directive';\r\n"]}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Directive, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
|
|
2
|
-
import SimpleBar from 'simplebar';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class ScrollableDirective {
|
|
5
|
-
constructor(el, ngZone, renderer) {
|
|
6
|
-
this.el = el;
|
|
7
|
-
this.ngZone = ngZone;
|
|
8
|
-
this.renderer = renderer;
|
|
9
|
-
this.scrollbarMinSize = 25;
|
|
10
|
-
this.isScrolling = false;
|
|
11
|
-
}
|
|
12
|
-
ngOnChanges(changes) {
|
|
13
|
-
if ((changes === null || changes === void 0 ? void 0 : changes.viewReady.currentValue) === true) {
|
|
14
|
-
this.initScrollbar();
|
|
15
|
-
this.initResizeObserver();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
ngOnDestroy() {
|
|
19
|
-
var _a;
|
|
20
|
-
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
21
|
-
}
|
|
22
|
-
initScrollbar() {
|
|
23
|
-
const el = this.el.nativeElement;
|
|
24
|
-
// yes, we explict want to run outside angular to avoid unnecessary change detection cycles
|
|
25
|
-
this.ngZone.runOutsideAngular(() => {
|
|
26
|
-
this.sb = new SimpleBar(el, { scrollbarMinSize: this.scrollbarMinSize });
|
|
27
|
-
this.sb.getScrollElement().addEventListener('scroll', this.delay(() => {
|
|
28
|
-
// triggered on scroll stop
|
|
29
|
-
this.isScrolling = false;
|
|
30
|
-
}), false);
|
|
31
|
-
});
|
|
32
|
-
this.updateMaxWidth();
|
|
33
|
-
}
|
|
34
|
-
initResizeObserver() {
|
|
35
|
-
const el = this.el.nativeElement;
|
|
36
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
37
|
-
this.updateMaxWidth();
|
|
38
|
-
});
|
|
39
|
-
this.resizeObserver.observe(el);
|
|
40
|
-
}
|
|
41
|
-
updateMaxWidth() {
|
|
42
|
-
const el = this.el.nativeElement;
|
|
43
|
-
const wrapper = el.querySelector('.simplebar-content-wrapper');
|
|
44
|
-
const width = el.getBoundingClientRect().width;
|
|
45
|
-
this.renderer.setStyle(wrapper, 'max-width', width + 'px');
|
|
46
|
-
}
|
|
47
|
-
delay(callback) {
|
|
48
|
-
let timer;
|
|
49
|
-
return () => {
|
|
50
|
-
if (!this.isScrolling) {
|
|
51
|
-
// triggered on scroll start
|
|
52
|
-
this.isScrolling = true;
|
|
53
|
-
}
|
|
54
|
-
window.clearTimeout(timer);
|
|
55
|
-
timer = window.setTimeout(callback, 50);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
ScrollableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ScrollableDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
60
|
-
ScrollableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: ScrollableDirective, selector: "[fngScrollable]", inputs: { scrollbarMinSize: ["fngScrollableScrollbarMinSize", "scrollbarMinSize"], viewReady: ["fngScrollableViewReady", "viewReady"] }, usesOnChanges: true, ngImport: i0 });
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: ScrollableDirective, decorators: [{
|
|
62
|
-
type: Directive,
|
|
63
|
-
args: [{
|
|
64
|
-
selector: '[fngScrollable]'
|
|
65
|
-
}]
|
|
66
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { scrollbarMinSize: [{
|
|
67
|
-
type: Input,
|
|
68
|
-
args: ['fngScrollableScrollbarMinSize']
|
|
69
|
-
}], viewReady: [{
|
|
70
|
-
type: Input,
|
|
71
|
-
args: ['fngScrollableViewReady']
|
|
72
|
-
}] } });
|
|
73
|
-
//# sourceMappingURL=scrollable.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable.directive.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/scroll/scrollable.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAA4B,KAAK,EAAiB,MAAM,EAAE,SAAS,EAAa,MAAM,eAAe,CAAC;AACpI,OAAO,SAAS,MAAM,WAAW,CAAC;;AASlC,MAAM,OAAO,mBAAmB;IAQ9B,YAAoB,EAAc,EAAU,MAAc,EAAU,QAAmB;QAAnE,OAAE,GAAF,EAAE,CAAY;QAAU,WAAM,GAAN,MAAM,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAW;QAP/C,qBAAgB,GAAW,EAAE,CAAC;QAI9D,gBAAW,GAAG,KAAK,CAAC;IAG8D,CAAC;IAE3F,WAAW,CAAC,OAAsB;QAChC,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,YAAY,MAAK,IAAI,EAAE;YAC5C,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAC3B;IACH,CAAC;IAED,WAAW;;QACT,MAAA,IAAI,CAAC,cAAc,0CAAE,UAAU,EAAE,CAAC;IACpC,CAAC;IAEO,aAAa;QACnB,MAAM,EAAE,GAAgB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QAC9C,2FAA2F;QAC3F,IAAI,CAAC,MAAM,CAAC,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,KAAK,CAAC,CAAC;YAC3B,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC;IACJ,CAAC;;gHAhEU,mBAAmB;oGAAnB,mBAAmB;2FAAnB,mBAAmB;kBAH/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;iBAC5B;8IAEyC,gBAAgB;sBAAvD,KAAK;uBAAC,+BAA+B;gBACL,SAAS;sBAAzC,KAAK;uBAAC,wBAAwB","sourcesContent":["import { Directive, ElementRef, OnChanges, SimpleChanges, Input, AfterViewInit, NgZone, Renderer2, OnDestroy } from '@angular/core';\nimport SimpleBar from 'simplebar';\n\nexport interface ScrollableAware extends AfterViewInit {\n scrollableViewReady: boolean;\n}\n\n@Directive({\n selector: '[fngScrollable]'\n})\nexport class ScrollableDirective implements OnChanges, OnDestroy {\n @Input('fngScrollableScrollbarMinSize') scrollbarMinSize: number = 25;\n @Input('fngScrollableViewReady') viewReady: boolean;\n\n private sb: SimpleBar;\n private isScrolling = false;\n private resizeObserver: ResizeObserver;\n\n constructor(private el: ElementRef, private ngZone: NgZone, private renderer: Renderer2) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes?.viewReady.currentValue === true) {\n this.initScrollbar();\n this.initResizeObserver();\n }\n }\n\n ngOnDestroy(): void {\n this.resizeObserver?.disconnect();\n }\n\n private initScrollbar() {\n const el: HTMLElement = this.el.nativeElement;\n // yes, we explict want to run outside angular to avoid unnecessary change detection cycles\n this.ngZone.runOutsideAngular(() => {\n this.sb = new SimpleBar(el, { scrollbarMinSize: this.scrollbarMinSize });\n this.sb.getScrollElement().addEventListener(\n 'scroll',\n this.delay(() => {\n // triggered on scroll stop\n this.isScrolling = false;\n }),\n false\n );\n });\n this.updateMaxWidth();\n }\n\n private initResizeObserver() {\n const el: HTMLElement = this.el.nativeElement;\n this.resizeObserver = new ResizeObserver(() => {\n this.updateMaxWidth();\n });\n this.resizeObserver.observe(el);\n }\n\n private updateMaxWidth() {\n const el: HTMLElement = this.el.nativeElement;\n const wrapper = el.querySelector('.simplebar-content-wrapper');\n const width = el.getBoundingClientRect().width;\n this.renderer.setStyle(wrapper, 'max-width', width + 'px');\n }\n\n private delay(callback: any) {\n let timer: number;\n return () => {\n if (!this.isScrolling) {\n // triggered on scroll start\n this.isScrolling = true;\n }\n\n window.clearTimeout(timer);\n timer = window.setTimeout(callback, 50);\n };\n }\n}\n"]}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Component, Input, ViewChild, ElementRef, ViewEncapsulation, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "../click-outside.directive";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
/**
|
|
7
|
-
* A custom form element for search inputs.
|
|
8
|
-
*/
|
|
9
|
-
export class SearchInputComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
/**
|
|
12
|
-
* the querrry was changed, update the suggetion list
|
|
13
|
-
*/
|
|
14
|
-
this.fngChange = new EventEmitter();
|
|
15
|
-
/**
|
|
16
|
-
* Start search on this event
|
|
17
|
-
*/
|
|
18
|
-
this.fngSearch = new EventEmitter();
|
|
19
|
-
/**
|
|
20
|
-
* The search input label.
|
|
21
|
-
*/
|
|
22
|
-
this.label = '';
|
|
23
|
-
this.innerDisabled = false;
|
|
24
|
-
this.innerValue = '';
|
|
25
|
-
this.innerSuggestions = [];
|
|
26
|
-
this.hideSuggestionList = false;
|
|
27
|
-
// This is the index of the selected element in dhe suggestion list.
|
|
28
|
-
this.selectedSuggestionIndex = -1;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* When true the control's disabled attribute is set
|
|
32
|
-
* and it gets addeed the .disabled css class.
|
|
33
|
-
*/
|
|
34
|
-
get disabled() {
|
|
35
|
-
return this.innerDisabled;
|
|
36
|
-
}
|
|
37
|
-
set disabled(value) {
|
|
38
|
-
this.innerDisabled = coerceBooleanProperty(value);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The getter for value.
|
|
42
|
-
*/
|
|
43
|
-
get value() {
|
|
44
|
-
return this.innerValue;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* The setter for value.
|
|
48
|
-
*/
|
|
49
|
-
set value(value) {
|
|
50
|
-
if (value != null) {
|
|
51
|
-
value = '' + value;
|
|
52
|
-
}
|
|
53
|
-
this.innerValue = value;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* The list of suggestions
|
|
57
|
-
*/
|
|
58
|
-
set suggestions(value) {
|
|
59
|
-
this.selectedSuggestionIndex = -1;
|
|
60
|
-
this.innerSuggestions = value;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* The list of suggestions capped by 10 entries
|
|
64
|
-
*/
|
|
65
|
-
get cappedSuggestions() {
|
|
66
|
-
return this.innerSuggestions.slice(0, 10);
|
|
67
|
-
}
|
|
68
|
-
keyhandler(event) {
|
|
69
|
-
if (!this.cappedSuggestions || !this.cappedSuggestions.length) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
// navigate inside the suggestion list
|
|
73
|
-
if (event.key === 'ArrowUp') {
|
|
74
|
-
if (this.selectedSuggestionIndex > 0) {
|
|
75
|
-
this.selectedSuggestionIndex--;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.selectedSuggestionIndex = this.cappedSuggestions.length - 1;
|
|
79
|
-
}
|
|
80
|
-
this.value = this.cappedSuggestions[this.selectedSuggestionIndex];
|
|
81
|
-
}
|
|
82
|
-
if (event.key === 'ArrowDown') {
|
|
83
|
-
if (this.selectedSuggestionIndex >= this.cappedSuggestions.length - 1) {
|
|
84
|
-
this.selectedSuggestionIndex = 0;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
this.selectedSuggestionIndex++;
|
|
88
|
-
}
|
|
89
|
-
this.value = this.cappedSuggestions[this.selectedSuggestionIndex];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
onClickOutside() {
|
|
93
|
-
this.hideSuggestionList = true;
|
|
94
|
-
}
|
|
95
|
-
onFocus() {
|
|
96
|
-
this.hideSuggestionList = false;
|
|
97
|
-
}
|
|
98
|
-
onInput(event) {
|
|
99
|
-
this.selectedSuggestionIndex = -1;
|
|
100
|
-
this.value = event.target.value;
|
|
101
|
-
this.fngChange.emit(this.value);
|
|
102
|
-
}
|
|
103
|
-
// also triggert on "Enter" and "Escape"
|
|
104
|
-
onSearch(event) {
|
|
105
|
-
event.stopPropagation();
|
|
106
|
-
this.selectedSuggestionIndex = -1;
|
|
107
|
-
this.fngSearch.emit(this.value);
|
|
108
|
-
this.hideSuggestionList = true;
|
|
109
|
-
this.inputRef.nativeElement.blur();
|
|
110
|
-
}
|
|
111
|
-
onSuggestionClick(suggestion) {
|
|
112
|
-
this.selectedSuggestionIndex = -1;
|
|
113
|
-
this.value = suggestion;
|
|
114
|
-
this.fngSearch.emit(this.value);
|
|
115
|
-
this.hideSuggestionList = true;
|
|
116
|
-
this.inputRef.nativeElement.blur();
|
|
117
|
-
}
|
|
118
|
-
clearQuerry() {
|
|
119
|
-
this.selectedSuggestionIndex = -1;
|
|
120
|
-
this.value = '';
|
|
121
|
-
this.fngSearch.emit(this.value);
|
|
122
|
-
this.hideSuggestionList = true;
|
|
123
|
-
this.inputRef.nativeElement.blur();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
SearchInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
127
|
-
SearchInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: SearchInputComponent, selector: "fng-search-input", inputs: { label: "label", disabled: "disabled", value: "value", suggestions: "suggestions" }, outputs: { fngChange: "fngChange", fngSearch: "fngSearch" }, host: { listeners: { "document:keydown": "keyhandler($event)" } }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputElement"], descendants: true }], ngImport: i0, template: "<div class=\"fwe-search-input fwe-w-100\" (clickOutside)=\"onClickOutside()\" fngClickOutside>\n <input\n class=\"fwe-w-100\"\n #inputElement\n [attr.disabled]=\"disabled ? '' : null\"\n [placeholder]=\"label\"\n (focus)=\"onFocus()\"\n type=\"search\"\n (input)=\"onInput($event)\"\n (search)=\"onSearch($event)\"\n [value]=\"innerValue\"\n />\n <div class=\"fwe-search-icon\"></div>\n <div class=\"fwe-clear-icon\" (click)=\"clearQuerry()\"></div>\n <div class=\"fwe-search-suggestions\" *ngIf=\"innerSuggestions?.length && !hideSuggestionList\">\n <div\n *ngFor=\"let suggestion of cappedSuggestions; let i = index\"\n (click)=\"onSuggestionClick(suggestion)\"\n [class.fwe-selected]=\"selectedSuggestionIndex === i\"\n class=\"fwe-search-suggestion\"\n >\n {{ suggestion }}\n </div>\n <div class=\"fwe-ml-xxs\" *ngIf=\"innerSuggestions.length > 10\">...</div>\n </div>\n</div>\n", styles: [".fwe-w-100{width:100%}\n"], directives: [{ type: i1.ClickOutsideDirective, selector: "[fngClickOutside]", outputs: ["clickOutside"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SearchInputComponent, decorators: [{
|
|
129
|
-
type: Component,
|
|
130
|
-
args: [{
|
|
131
|
-
selector: 'fng-search-input',
|
|
132
|
-
templateUrl: './search-input.component.html',
|
|
133
|
-
styleUrls: ['./search-input.component.scss'],
|
|
134
|
-
encapsulation: ViewEncapsulation.None
|
|
135
|
-
}]
|
|
136
|
-
}], propDecorators: { inputRef: [{
|
|
137
|
-
type: ViewChild,
|
|
138
|
-
args: ['inputElement']
|
|
139
|
-
}], fngChange: [{
|
|
140
|
-
type: Output
|
|
141
|
-
}], fngSearch: [{
|
|
142
|
-
type: Output
|
|
143
|
-
}], label: [{
|
|
144
|
-
type: Input
|
|
145
|
-
}], disabled: [{
|
|
146
|
-
type: Input
|
|
147
|
-
}], value: [{
|
|
148
|
-
type: Input
|
|
149
|
-
}], suggestions: [{
|
|
150
|
-
type: Input
|
|
151
|
-
}], keyhandler: [{
|
|
152
|
-
type: HostListener,
|
|
153
|
-
args: ['document:keydown', ['$event']]
|
|
154
|
-
}] } });
|
|
155
|
-
//# sourceMappingURL=search-input.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/search-input/search-input.component.ts","../../../../../../../libs/angular/src/lib/components/search-input/search-input.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC/H,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;;;;AAE9D;;GAEG;AAOH,MAAM,OAAO,oBAAoB;IANjC;QAUE;;WAEG;QAEM,cAAS,GAAG,IAAI,YAAY,EAAU,CAAC;QAEhD;;WAEG;QAEM,cAAS,GAAG,IAAI,YAAY,EAAU,CAAC;QAEhD;;WAEG;QACM,UAAK,GAAW,EAAE,CAAC;QAalB,kBAAa,GAAG,KAAK,CAAC;QAEhC,eAAU,GAAW,EAAE,CAAC;QAoCxB,qBAAgB,GAAa,EAAE,CAAC;QAChC,uBAAkB,GAAY,KAAK,CAAC;QAEpC,oEAAoE;QACpE,4BAAuB,GAAG,CAAC,CAAC,CAAC;KAkE9B;IAvHC;;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Q,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAED,WAAW;QACT,IAAI,CAAC,uBAAuB,GAAG,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;;iHA3IU,oBAAoB;qGAApB,oBAAoB,gYCZjC,07BA0BA;2FDda,oBAAoB;kBANhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,WAAW,EAAE,+BAA+B;oBAC5C,SAAS,EAAE,CAAC,+BAA+B,CAAC;oBAC5C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAGC,QAAQ;sBADP,SAAS;uBAAC,cAAc;gBAOhB,SAAS;sBADjB,MAAM;gBAOE,SAAS;sBADjB,MAAM;gBAME,KAAK;sBAAb,KAAK;gBAOF,QAAQ;sBADX,KAAK;gBAsBF,KAAK;sBADR,KAAK;gBAYF,WAAW;sBADd,KAAK;gBAoBN,UAAU;sBADT,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import { Component, Input, ViewChild, ElementRef, ViewEncapsulation, Output, EventEmitter, HostListener } from '@angular/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\n\n/**\n * A custom form element for search inputs.\n */\n@Component({\n selector: 'fng-search-input',\n templateUrl: './search-input.component.html',\n styleUrls: ['./search-input.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SearchInputComponent {\n @ViewChild('inputElement')\n inputRef!: ElementRef<HTMLInputElement>;\n\n /**\n * the querrry was changed, update the suggetion list\n */\n @Output()\n readonly fngChange = new EventEmitter<string>();\n\n /**\n * Start search on this event\n */\n @Output()\n readonly fngSearch = new EventEmitter<string>();\n\n /**\n * The search input label.\n */\n @Input() label: string = '';\n\n /**\n * When true the control's disabled attribute is set\n * and it gets addeed the .disabled css class.\n */\n @Input()\n get disabled(): boolean {\n return this.innerDisabled;\n }\n set disabled(value: boolean) {\n this.innerDisabled = coerceBooleanProperty(value);\n }\n protected innerDisabled = false;\n\n innerValue: string = '';\n\n /**\n * The getter for value.\n */\n get value(): string {\n return this.innerValue;\n }\n\n /**\n * The setter for value.\n */\n @Input()\n set value(value: string) {\n if (value != null) {\n value = '' + value;\n }\n this.innerValue = value;\n }\n\n /**\n * The list of suggestions\n */\n @Input()\n set suggestions(value: string[]) {\n this.selectedSuggestionIndex = -1;\n this.innerSuggestions = value;\n }\n\n /**\n * The list of suggestions capped by 10 entries\n */\n get cappedSuggestions(): string[] {\n return this.innerSuggestions.slice(0, 10);\n }\n\n innerSuggestions: string[] = [];\n hideSuggestionList: boolean = false;\n\n // This is the index of the selected element in dhe suggestion list.\n selectedSuggestionIndex = -1;\n\n @HostListener('document:keydown', ['$event'])\n keyhandler(event: KeyboardEvent) {\n if (!this.cappedSuggestions || !this.cappedSuggestions.length) {\n return;\n }\n\n // navigate inside the suggestion list\n if (event.key === 'ArrowUp') {\n if (this.selectedSuggestionIndex > 0) {\n this.selectedSuggestionIndex--;\n } else {\n this.selectedSuggestionIndex = this.cappedSuggestions.length - 1;\n }\n this.value = this.cappedSuggestions[this.selectedSuggestionIndex];\n }\n\n if (event.key === 'ArrowDown') {\n if (this.selectedSuggestionIndex >= this.cappedSuggestions.length - 1) {\n this.selectedSuggestionIndex = 0;\n } else {\n this.selectedSuggestionIndex++;\n }\n this.value = this.cappedSuggestions[this.selectedSuggestionIndex];\n }\n }\n\n onClickOutside(): void {\n this.hideSuggestionList = true;\n }\n\n onFocus() {\n this.hideSuggestionList = false;\n }\n\n onInput(event: any) {\n this.selectedSuggestionIndex = -1;\n this.value = event.target.value;\n this.fngChange.emit(this.value);\n }\n\n // also triggert on \"Enter\" and \"Escape\"\n onSearch(event: any): void {\n event.stopPropagation();\n this.selectedSuggestionIndex = -1;\n this.fngSearch.emit(this.value);\n this.hideSuggestionList = true;\n this.inputRef.nativeElement.blur();\n }\n\n onSuggestionClick(suggestion: string) {\n this.selectedSuggestionIndex = -1;\n this.value = suggestion;\n this.fngSearch.emit(this.value);\n this.hideSuggestionList = true;\n this.inputRef.nativeElement.blur();\n }\n\n clearQuerry(): void {\n this.selectedSuggestionIndex = -1;\n this.value = '';\n this.fngSearch.emit(this.value);\n this.hideSuggestionList = true;\n this.inputRef.nativeElement.blur();\n }\n}\n","<div class=\"fwe-search-input fwe-w-100\" (clickOutside)=\"onClickOutside()\" fngClickOutside>\n <input\n class=\"fwe-w-100\"\n #inputElement\n [attr.disabled]=\"disabled ? '' : null\"\n [placeholder]=\"label\"\n (focus)=\"onFocus()\"\n type=\"search\"\n (input)=\"onInput($event)\"\n (search)=\"onSearch($event)\"\n [value]=\"innerValue\"\n />\n <div class=\"fwe-search-icon\"></div>\n <div class=\"fwe-clear-icon\" (click)=\"clearQuerry()\"></div>\n <div class=\"fwe-search-suggestions\" *ngIf=\"innerSuggestions?.length && !hideSuggestionList\">\n <div\n *ngFor=\"let suggestion of cappedSuggestions; let i = index\"\n (click)=\"onSuggestionClick(suggestion)\"\n [class.fwe-selected]=\"selectedSuggestionIndex === i\"\n class=\"fwe-search-suggestion\"\n >\n {{ suggestion }}\n </div>\n <div class=\"fwe-ml-xxs\" *ngIf=\"innerSuggestions.length > 10\">...</div>\n </div>\n</div>\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component, Input, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./snackbar-container.directive";
|
|
4
|
-
export class SnackbarContainerComponent {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.config = {
|
|
7
|
-
darkBackground: true,
|
|
8
|
-
disappearAfter: 5000,
|
|
9
|
-
closeOnAction: true
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
SnackbarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
-
SnackbarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: SnackbarContainerComponent, selector: "fng-snackbar-container", inputs: { config: "config" }, ngImport: i0, template: "<div class=\"fwe-snackbar-container\">\n <div [fngSnackbarContainer]=\"config\"></div>\n</div>\n", styles: [".fwe-snackbar-container{pointer-events:none}\n"], directives: [{ type: i1.SnackbarContainerDirective, selector: "[fngSnackbarContainer]", inputs: ["fngSnackbarContainer"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarContainerComponent, decorators: [{
|
|
16
|
-
type: Component,
|
|
17
|
-
args: [{
|
|
18
|
-
selector: 'fng-snackbar-container',
|
|
19
|
-
templateUrl: './snackbar-container.component.html',
|
|
20
|
-
styleUrls: ['./snackbar-container.component.scss'],
|
|
21
|
-
encapsulation: ViewEncapsulation.None
|
|
22
|
-
}]
|
|
23
|
-
}], propDecorators: { config: [{
|
|
24
|
-
type: Input
|
|
25
|
-
}] } });
|
|
26
|
-
//# sourceMappingURL=snackbar-container.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-container.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/snackbar/snackbar-container.component.ts","../../../../../../../libs/angular/src/lib/components/snackbar/snackbar-container.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;;;AASpE,MAAM,OAAO,0BAA0B;IANvC;QAOW,WAAM,GAAmB;YAChC,cAAc,EAAE,IAAI;YACpB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB,CAAC;KACH;;uHANY,0BAA0B;2GAA1B,0BAA0B,4FCTvC,mGAGA;2FDMa,0BAA0B;kBANtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,WAAW,EAAE,qCAAqC;oBAClD,SAAS,EAAE,CAAC,qCAAqC,CAAC;oBAClD,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAEU,MAAM;sBAAd,KAAK","sourcesContent":["import { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { SnackbarConfig } from './snackbar.models';\n\n@Component({\n selector: 'fng-snackbar-container',\n templateUrl: './snackbar-container.component.html',\n styleUrls: ['./snackbar-container.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class SnackbarContainerComponent {\n @Input() config: SnackbarConfig = {\n darkBackground: true,\n disappearAfter: 5000,\n closeOnAction: true\n };\n}\n","<div class=\"fwe-snackbar-container\">\n <div [fngSnackbarContainer]=\"config\"></div>\n</div>\n"]}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ComponentFactoryResolver, Directive, Input, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import { takeUntil } from 'rxjs/operators';
|
|
4
|
-
import { SnackbarComponent } from './snackbar.component';
|
|
5
|
-
import { SnackbarService } from './snackbar.service';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "./snackbar.service";
|
|
8
|
-
export class SnackbarContainerDirective {
|
|
9
|
-
constructor(viewContainerRef, componentFactoryResolver, snackbarService) {
|
|
10
|
-
this.viewContainerRef = viewContainerRef;
|
|
11
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
12
|
-
this.snackbarService = snackbarService;
|
|
13
|
-
this.snacks = [];
|
|
14
|
-
this.factory = this.componentFactoryResolver.resolveComponentFactory(SnackbarComponent);
|
|
15
|
-
}
|
|
16
|
-
ngOnInit() {
|
|
17
|
-
this.snacksSub = this.snackbarService.snacks$.subscribe(SnackDescription => this.push(SnackDescription));
|
|
18
|
-
}
|
|
19
|
-
ngOnDestroy() {
|
|
20
|
-
if (this.snacks != null && this.snacks.length > 0) {
|
|
21
|
-
this.snacks.forEach(snack => {
|
|
22
|
-
snack.complete.next(true);
|
|
23
|
-
snack.complete.complete();
|
|
24
|
-
snack.complete.unsubscribe();
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
if (this.snacksSub != null) {
|
|
28
|
-
this.snacksSub.unsubscribe();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
push(snackDescription) {
|
|
32
|
-
const complete = new Subject();
|
|
33
|
-
const componentRef = this.viewContainerRef.createComponent(this.factory, 0);
|
|
34
|
-
const componentInstance = componentRef.instance;
|
|
35
|
-
componentInstance.data = Object.assign(Object.assign({}, this.fngSnackbarContainer), snackDescription.data);
|
|
36
|
-
componentInstance.animationState = this.snacks.length === 0 ? 'first' : 'fadeIn';
|
|
37
|
-
const snackbarRef = { componentRef, complete };
|
|
38
|
-
componentInstance.close.pipe(takeUntil(complete)).subscribe(() => {
|
|
39
|
-
this.remove(snackbarRef);
|
|
40
|
-
if (snackDescription.closeCallback) {
|
|
41
|
-
snackDescription.closeCallback();
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
componentInstance.action.pipe(takeUntil(complete)).subscribe(() => {
|
|
45
|
-
if (componentInstance.data.closeOnAction) {
|
|
46
|
-
this.remove(snackbarRef);
|
|
47
|
-
}
|
|
48
|
-
if (snackDescription.actionCallback) {
|
|
49
|
-
snackDescription.actionCallback();
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
this.snacks.push(snackbarRef);
|
|
53
|
-
snackDescription.resolve(snackbarRef.componentRef);
|
|
54
|
-
}
|
|
55
|
-
remove(snackbarRef) {
|
|
56
|
-
const index = this.snacks.indexOf(snackbarRef);
|
|
57
|
-
if (index !== -1) {
|
|
58
|
-
const deletedSnackbarRef = this.snacks.splice(index, 1);
|
|
59
|
-
if (deletedSnackbarRef != null && deletedSnackbarRef.length > 0) {
|
|
60
|
-
const deletedSnackbar = deletedSnackbarRef[0];
|
|
61
|
-
if (deletedSnackbar.complete != null) {
|
|
62
|
-
deletedSnackbar.complete.next(true);
|
|
63
|
-
deletedSnackbar.complete.complete();
|
|
64
|
-
deletedSnackbar.complete.unsubscribe();
|
|
65
|
-
}
|
|
66
|
-
if (deletedSnackbar.componentRef != null) {
|
|
67
|
-
deletedSnackbar.componentRef.destroy();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
SnackbarContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarContainerDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i1.SnackbarService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
74
|
-
SnackbarContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.0", type: SnackbarContainerDirective, selector: "[fngSnackbarContainer]", inputs: { fngSnackbarContainer: "fngSnackbarContainer" }, ngImport: i0 });
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarContainerDirective, decorators: [{
|
|
76
|
-
type: Directive,
|
|
77
|
-
args: [{
|
|
78
|
-
selector: '[fngSnackbarContainer]'
|
|
79
|
-
}]
|
|
80
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i1.SnackbarService }]; }, propDecorators: { fngSnackbarContainer: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}] } });
|
|
83
|
-
//# sourceMappingURL=snackbar-container.directive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-container.direct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,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9B,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC;IAEO,MAAM,CAAC,WAAwB;QACrC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC/C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAChB,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACxD,IAAI,kBAAkB,IAAI,IAAI,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC/D,MAAM,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;gBAC9C,IAAI,eAAe,CAAC,QAAQ,IAAI,IAAI,EAAE;oBACpC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACpC,eAAe,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;oBACpC,eAAe,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;iBACxC;gBACD,IAAI,eAAe,CAAC,YAAY,IAAI,IAAI,EAAE;oBACxC,eAAe,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;iBACxC;aACF;SACF;IACH,CAAC;;uHA1EU,0BAA0B;2GAA1B,0BAA0B;2FAA1B,0BAA0B;kBAHtC,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;iBACnC;4KAEU,oBAAoB;sBAA5B,KAAK","sourcesContent":["import {\n ComponentFactory,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n Input,\n OnDestroy,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { Subject, Subscription } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SnackbarComponent } from './snackbar.component';\nimport { SnackbarConfig } from './snackbar.models';\nimport { SnackbarService, SnackDescription } from './snackbar.service';\n\ninterface SnackbarRef {\n componentRef: ComponentRef<SnackbarComponent>;\n complete: Subject<boolean>;\n}\n\n@Directive({\n selector: '[fngSnackbarContainer]'\n})\nexport class SnackbarContainerDirective implements OnDestroy, OnInit {\n @Input() fngSnackbarContainer: SnackbarConfig;\n\n private snacks: SnackbarRef[] = [];\n\n private snacksSub: Subscription;\n private factory: ComponentFactory<SnackbarComponent>;\n\n constructor(\n private viewContainerRef: ViewContainerRef,\n private componentFactoryResolver: ComponentFactoryResolver,\n private snackbarService: SnackbarService\n ) {\n this.factory = this.componentFactoryResolver.resolveComponentFactory(SnackbarComponent);\n }\n\n ngOnInit() {\n this.snacksSub = this.snackbarService.snacks$.subscribe(SnackDescription => this.push(SnackDescription));\n }\n\n ngOnDestroy() {\n if (this.snacks != null && this.snacks.length > 0) {\n this.snacks.forEach(snack => {\n snack.complete.next(true);\n snack.complete.complete();\n snack.complete.unsubscribe();\n });\n }\n if (this.snacksSub != null) {\n this.snacksSub.unsubscribe();\n }\n }\n\n private push(snackDescription: SnackDescription) {\n const complete = new Subject<boolean>();\n const componentRef = this.viewContainerRef.createComponent(this.factory, 0);\n const componentInstance = componentRef.instance;\n componentInstance.data = { ...this.fngSnackbarContainer, ...snackDescription.data };\n componentInstance.animationState = this.snacks.length === 0 ? 'first' : 'fadeIn';\n const snackbarRef = { componentRef, complete };\n componentInstance.close.pipe(takeUntil(complete)).subscribe(() => {\n this.remove(snackbarRef);\n if (snackDescription.closeCallback) {\n snackDescription.closeCallback();\n }\n });\n componentInstance.action.pipe(takeUntil(complete)).subscribe(() => {\n if (componentInstance.data.closeOnAction) {\n this.remove(snackbarRef);\n }\n if (snackDescription.actionCallback) {\n snackDescription.actionCallback();\n }\n });\n this.snacks.push(snackbarRef);\n snackDescription.resolve(snackbarRef.componentRef);\n }\n\n private remove(snackbarRef: SnackbarRef) {\n const index = this.snacks.indexOf(snackbarRef);\n if (index !== -1) {\n const deletedSnackbarRef = this.snacks.splice(index, 1);\n if (deletedSnackbarRef != null && deletedSnackbarRef.length > 0) {\n const deletedSnackbar = deletedSnackbarRef[0];\n if (deletedSnackbar.complete != null) {\n deletedSnackbar.complete.next(true);\n deletedSnackbar.complete.complete();\n deletedSnackbar.complete.unsubscribe();\n }\n if (deletedSnackbar.componentRef != null) {\n deletedSnackbar.componentRef.destroy();\n }\n }\n }\n }\n}\n"]}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
2
|
-
import { animate, sequence, state, style, transition, trigger } from '@angular/animations';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
export class SnackbarComponent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.close = new EventEmitter();
|
|
8
|
-
this.action = new EventEmitter();
|
|
9
|
-
this.blockDisplay = 'block';
|
|
10
|
-
this.animationState = 'init';
|
|
11
|
-
}
|
|
12
|
-
ngAfterViewInit() {
|
|
13
|
-
if (this.data && this.data.disappearAfter) {
|
|
14
|
-
this.timeout = setTimeout(() => this.onClose(), this.data.disappearAfter);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ngOnDestroy() {
|
|
18
|
-
if (this.timeout) {
|
|
19
|
-
clearTimeout(this.timeout);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
onAction() {
|
|
23
|
-
this.action.emit();
|
|
24
|
-
}
|
|
25
|
-
onClose() {
|
|
26
|
-
this.close.emit();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
SnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
SnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: SnackbarComponent, selector: "fng-snackbar", inputs: { data: "data" }, outputs: { close: "close", action: "action" }, host: { properties: { "style.display": "this.blockDisplay", "@appearDisappear": "this.animationState" } }, ngImport: i0, template: "<div\n [ngClass]=\"{\n 'fwe-snackbar': true,\n 'fwe-snackbar-b': data?.variant === 'b',\n 'fwe-snackbar-c': data?.variant === 'c',\n 'fwe-snackbar-warning': data?.type === 'warning',\n 'fwe-snackbar-error': data?.type === 'error',\n 'fwe-snackbar-shadow': data?.darkBackground\n }\"\n>\n <i\n *ngIf=\"data?.type\"\n aria-hidden=\"true\"\n [ngClass]=\"{\n 'fwe-icon': true,\n 'fwe-icon-status-info': data?.type === 'info',\n 'fwe-icon-status-warning': data?.type === 'warning',\n 'fwe-icon-status-failure': data?.type === 'error'\n }\"\n ></i>\n <span>{{ data?.text }}</span>\n <button *ngIf=\"data?.action\" aria-label=\"UserAction\" type=\"button\" class=\"fwe-btn fwe-btn-link\" (click)=\"onAction()\">\n {{ data?.action }}\n </button>\n <button *ngIf=\"data?.showClose\" aria-label=\"Close\" type=\"button\" class=\"fwe-btn fwe-btn-link\" (click)=\"onClose()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-close-small\"></i>\n <span class=\"fwe-sr-only\">Close</span>\n </button>\n</div>\n", styles: [".fwe-snackbar{pointer-events:all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
|
31
|
-
trigger('appearDisappear', [
|
|
32
|
-
state('init', style({ opacity: 0 })),
|
|
33
|
-
state('first', style({
|
|
34
|
-
opacity: 1,
|
|
35
|
-
transform: 'translateY(0)'
|
|
36
|
-
})),
|
|
37
|
-
state('fadeIn', style({ opacity: '1' })),
|
|
38
|
-
transition('void => fadeIn', [style({ opacity: 0 }), animate('0.6s ease-out')]),
|
|
39
|
-
transition('void => first', [style({ transform: 'translateY(100px)' }), animate('0.6s ease-out')]),
|
|
40
|
-
transition(':leave', sequence([
|
|
41
|
-
style({ 'margin-bottom': '24px' }),
|
|
42
|
-
animate('0.3s ease-out', style({ opacity: 0 })),
|
|
43
|
-
animate('0.3s ease-out', style({ height: '0px', 'margin-bottom': '0px' }))
|
|
44
|
-
]))
|
|
45
|
-
])
|
|
46
|
-
], encapsulation: i0.ViewEncapsulation.None });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarComponent, decorators: [{
|
|
48
|
-
type: Component,
|
|
49
|
-
args: [{
|
|
50
|
-
selector: 'fng-snackbar',
|
|
51
|
-
templateUrl: './snackbar.component.html',
|
|
52
|
-
styleUrls: ['./snackbar.component.scss'],
|
|
53
|
-
encapsulation: ViewEncapsulation.None,
|
|
54
|
-
animations: [
|
|
55
|
-
trigger('appearDisappear', [
|
|
56
|
-
state('init', style({ opacity: 0 })),
|
|
57
|
-
state('first', style({
|
|
58
|
-
opacity: 1,
|
|
59
|
-
transform: 'translateY(0)'
|
|
60
|
-
})),
|
|
61
|
-
state('fadeIn', style({ opacity: '1' })),
|
|
62
|
-
transition('void => fadeIn', [style({ opacity: 0 }), animate('0.6s ease-out')]),
|
|
63
|
-
transition('void => first', [style({ transform: 'translateY(100px)' }), animate('0.6s ease-out')]),
|
|
64
|
-
transition(':leave', sequence([
|
|
65
|
-
style({ 'margin-bottom': '24px' }),
|
|
66
|
-
animate('0.3s ease-out', style({ opacity: 0 })),
|
|
67
|
-
animate('0.3s ease-out', style({ height: '0px', 'margin-bottom': '0px' }))
|
|
68
|
-
]))
|
|
69
|
-
])
|
|
70
|
-
]
|
|
71
|
-
}]
|
|
72
|
-
}], propDecorators: { data: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], close: [{
|
|
75
|
-
type: Output
|
|
76
|
-
}], action: [{
|
|
77
|
-
type: Output
|
|
78
|
-
}], blockDisplay: [{
|
|
79
|
-
type: HostBinding,
|
|
80
|
-
args: ['style.display']
|
|
81
|
-
}], animationState: [{
|
|
82
|
-
type: HostBinding,
|
|
83
|
-
args: ['@appearDisappear']
|
|
84
|
-
}] } });
|
|
85
|
-
//# sourceMappingURL=snackbar.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/snackbar/snackbar.component.ts","../../../../../../../libs/angular/src/lib/components/snackbar/snackbar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAa,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjI,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;;;AAgC3F,MAAM,OAAO,iBAAiB;IA7B9B;QA+BY,UAAK,GAAG,IAAI,YAAY,EAAO,CAAC;QAChC,WAAM,GAAG,IAAI,YAAY,EAAO,CAAC;QAEb,iBAAY,GAAG,OAAO,CAAC;QACpB,mBAAc,GAAgC,MAAM,CAAC;KAuBvF;IAnBC,eAAe;QACb,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAC3E;IACH,CAAC;IAED,WAAW;QACT,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC5B;IACH,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;;8GA5BU,iBAAiB;kGAAjB,iBAAiB,wOCjC9B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ACH,OAAO,EACP,KAAK,CAAC;gCACJ,OAAO,EAAE,CAAC;gCACV,SAAS,EAAE,eAAe;6BAC3B,CAAC,CACH;4BACD,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;4BACxC,UAAU,CAAC,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;4BAC/E,UAAU,CAAC,eAAe,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;4BAClG,UAAU,CACR,QAAQ,EACR,QAAQ,CAAC;gCACP,KAAK,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC;gCAClC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;gCAC/C,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC;6BAC3E,CAAC,CACH;yBACF,CAAC;qBACH;iBACF;8BAEU,IAAI;sBAAZ,KAAK;gBACI,KAAK;sBAAd,MAAM;gBACG,MAAM;sBAAf,MAAM;gBAEuB,YAAY;sBAAzC,WAAW;uBAAC,eAAe;gBACK,cAAc;sBAA9C,WAAW;uBAAC,kBAAkB","sourcesContent":["import { AfterViewInit, Component, EventEmitter, HostBinding, Input, OnDestroy, Output, ViewEncapsulation } from '@angular/core';\nimport { animate, sequence, state, style, transition, trigger } from '@angular/animations';\nimport { SnackbarData } from './snackbar.models';\n\n@Component({\n selector: 'fng-snackbar',\n templateUrl: './snackbar.component.html',\n styleUrls: ['./snackbar.component.scss'],\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('appearDisappear', [\n state('init', style({ opacity: 0 })),\n state(\n 'first',\n style({\n opacity: 1,\n transform: 'translateY(0)'\n })\n ),\n state('fadeIn', style({ opacity: '1' })),\n transition('void => fadeIn', [style({ opacity: 0 }), animate('0.6s ease-out')]),\n transition('void => first', [style({ transform: 'translateY(100px)' }), animate('0.6s ease-out')]),\n transition(\n ':leave',\n sequence([\n style({ 'margin-bottom': '24px' }),\n animate('0.3s ease-out', style({ opacity: 0 })),\n animate('0.3s ease-out', style({ height: '0px', 'margin-bottom': '0px' }))\n ])\n )\n ])\n ]\n})\nexport class SnackbarComponent implements AfterViewInit, OnDestroy {\n @Input() data: SnackbarData;\n @Output() close = new EventEmitter<any>();\n @Output() action = new EventEmitter<any>();\n\n @HostBinding('style.display') blockDisplay = 'block';\n @HostBinding('@appearDisappear') animationState: 'init' | 'first' | 'fadeIn' = 'init';\n\n private timeout: any;\n\n ngAfterViewInit() {\n if (this.data && this.data.disappearAfter) {\n this.timeout = setTimeout(() => this.onClose(), this.data.disappearAfter);\n }\n }\n\n ngOnDestroy() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n }\n\n onAction() {\n this.action.emit();\n }\n\n onClose() {\n this.close.emit();\n }\n}\n","<div\n [ngClass]=\"{\n 'fwe-snackbar': true,\n 'fwe-snackbar-b': data?.variant === 'b',\n 'fwe-snackbar-c': data?.variant === 'c',\n 'fwe-snackbar-warning': data?.type === 'warning',\n 'fwe-snackbar-error': data?.type === 'error',\n 'fwe-snackbar-shadow': data?.darkBackground\n }\"\n>\n <i\n *ngIf=\"data?.type\"\n aria-hidden=\"true\"\n [ngClass]=\"{\n 'fwe-icon': true,\n 'fwe-icon-status-info': data?.type === 'info',\n 'fwe-icon-status-warning': data?.type === 'warning',\n 'fwe-icon-status-failure': data?.type === 'error'\n }\"\n ></i>\n <span>{{ data?.text }}</span>\n <button *ngIf=\"data?.action\" aria-label=\"UserAction\" type=\"button\" class=\"fwe-btn fwe-btn-link\" (click)=\"onAction()\">\n {{ data?.action }}\n </button>\n <button *ngIf=\"data?.showClose\" aria-label=\"Close\" type=\"button\" class=\"fwe-btn fwe-btn-link\" (click)=\"onClose()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-close-small\"></i>\n <span class=\"fwe-sr-only\">Close</span>\n </button>\n</div>\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.models.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/snackbar/snackbar.models.ts"],"names":[],"mappings":"","sourcesContent":["export interface SnackbarConfig {\n type?: 'info' | 'warning' | 'error';\n variant?: 'a' | 'b' | 'c';\n darkBackground?: boolean;\n showClose?: boolean;\n action?: string;\n disappearAfter?: number;\n closeOnAction?: boolean;\n}\n\nexport interface SnackbarData extends SnackbarConfig {\n text: string;\n}\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { SnackbarComponent } from './snackbar.component';
|
|
4
|
-
import { SnackbarContainerDirective } from './snackbar-container.directive';
|
|
5
|
-
import { SnackbarContainerComponent } from './snackbar-container.component';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export * from './snackbar.models';
|
|
8
|
-
export * from './snackbar.component';
|
|
9
|
-
export * from './snackbar-container.component';
|
|
10
|
-
export * from './snackbar-container.directive';
|
|
11
|
-
export class FestoAngularSnackbarModule {
|
|
12
|
-
}
|
|
13
|
-
FestoAngularSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FestoAngularSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
14
|
-
FestoAngularSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FestoAngularSnackbarModule, bootstrap: [SnackbarComponent], declarations: [SnackbarComponent, SnackbarContainerDirective, SnackbarContainerComponent], imports: [CommonModule], exports: [SnackbarContainerComponent, SnackbarContainerDirective, SnackbarContainerComponent] });
|
|
15
|
-
FestoAngularSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FestoAngularSnackbarModule, providers: [], imports: [[CommonModule]] });
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: FestoAngularSnackbarModule, decorators: [{
|
|
17
|
-
type: NgModule,
|
|
18
|
-
args: [{
|
|
19
|
-
declarations: [SnackbarComponent, SnackbarContainerDirective, SnackbarContainerComponent],
|
|
20
|
-
imports: [CommonModule],
|
|
21
|
-
exports: [SnackbarContainerComponent, SnackbarContainerDirective, SnackbarContainerComponent],
|
|
22
|
-
providers: [],
|
|
23
|
-
bootstrap: [SnackbarComponent]
|
|
24
|
-
}]
|
|
25
|
-
}] });
|
|
26
|
-
//# sourceMappingURL=snackbar.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.module.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/snackbar/snackbar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;;AAE5E,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAS/C,MAAM,OAAO,0BAA0B;;uHAA1B,0BAA0B;wHAA1B,0BAA0B,cAFzB,iBAAiB,kBAJd,iBAAiB,EAAE,0BAA0B,EAAE,0BAA0B,aAC9E,YAAY,aACZ,0BAA0B,EAAE,0BAA0B,EAAE,0BAA0B;wHAIjF,0BAA0B,aAH1B,EAAE,YAFJ,CAAC,YAAY,CAAC;2FAKZ,0BAA0B;kBAPtC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;oBACzF,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,0BAA0B,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;oBAC7F,SAAS,EAAE,EAAE;oBACb,SAAS,EAAE,CAAC,iBAAiB,CAAC;iBAC/B","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { SnackbarComponent } from './snackbar.component';\nimport { SnackbarContainerDirective } from './snackbar-container.directive';\nimport { SnackbarContainerComponent } from './snackbar-container.component';\n\nexport * from './snackbar.models';\nexport * from './snackbar.component';\nexport * from './snackbar-container.component';\nexport * from './snackbar-container.directive';\n\n@NgModule({\n declarations: [SnackbarComponent, SnackbarContainerDirective, SnackbarContainerComponent],\n imports: [CommonModule],\n exports: [SnackbarContainerComponent, SnackbarContainerDirective, SnackbarContainerComponent],\n providers: [],\n bootstrap: [SnackbarComponent]\n})\nexport class FestoAngularSnackbarModule {}\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class SnackbarService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.snacks = new Subject();
|
|
7
|
-
this.snacks$ = this.snacks.asObservable();
|
|
8
|
-
}
|
|
9
|
-
snack(data, actionCallback, closeCallback) {
|
|
10
|
-
return new Promise(resolve => {
|
|
11
|
-
this.snacks.next({ data, actionCallback, closeCallback, resolve });
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
SnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16
|
-
SnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarService, providedIn: 'root' });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0, type: SnackbarService, decorators: [{
|
|
18
|
-
type: Injectable,
|
|
19
|
-
args: [{
|
|
20
|
-
providedIn: 'root'
|
|
21
|
-
}]
|
|
22
|
-
}], ctorParameters: function () { return []; } });
|
|
23
|
-
//# sourceMappingURL=snackbar.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.service.js","sourceRoot":"","sources":["../../../../../../../libs/angular/src/lib/components/snackbar/snackbar.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;;AAa3C,MAAM,OAAO,eAAe;IAK1B;QAFQ,WAAM,GAAG,IAAI,OAAO,EAAoB,CAAC;QAG/C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,IAAkB,EAAE,cAA2B,EAAE,aAA0B;QAC/E,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;;4GAbU,eAAe;gHAAf,eAAe,cAFd,MAAM;2FAEP,eAAe;kBAH3B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { SnackbarData } from './snackbar.models';\n\nexport type SnackDescription = {\n data: SnackbarData;\n actionCallback?: () => void;\n closeCallback?: () => void;\n resolve: (value: unknown) => void;\n};\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnackbarService {\n snacks$: Observable<SnackDescription>;\n\n private snacks = new Subject<SnackDescription>();\n\n constructor() {\n this.snacks$ = this.snacks.asObservable();\n }\n\n snack(data: SnackbarData, actionCallback?: () => void, closeCallback?: () => void) {\n return new Promise(resolve => {\n this.snacks.next({ data, actionCallback, closeCallback, resolve });\n });\n }\n}\n"]}
|