@sebgroup/green-angular 3.7.0 → 4.0.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/{esm2020 → esm2022}/lib/accordion/accordion-list-item.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/accordion/accordion.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/accordion/accordion.module.mjs +5 -5
- package/esm2022/lib/badge/badge.component.mjs +80 -0
- package/{esm2020 → esm2022}/lib/badge/badge.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/button/button.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/button/button.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/cell-table/cell-table-item.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/cell-table/cell-table.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/cell-table/cell-table.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/cell-table/cell-underline.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/context-menu/context-menu.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/context-menu/context-menu.module.mjs +5 -5
- package/esm2022/lib/datepicker/datepicker.component.mjs +138 -0
- package/{esm2020 → esm2022}/lib/datepicker/datepicker.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/dropdown/dropdown-button.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/dropdown/dropdown-option.directive.mjs +4 -4
- package/esm2022/lib/dropdown/dropdown.component.mjs +212 -0
- package/{esm2020 → esm2022}/lib/dropdown/dropdown.module.mjs +9 -9
- package/{esm2020 → esm2022}/lib/green-angular.module.mjs +31 -31
- package/{esm2020 → esm2022}/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/in-page-wizard/in-page-wizard.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/modal/modal-footer.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/modal/modal-header.directive.mjs +4 -4
- package/esm2022/lib/modal/modal.component.mjs +258 -0
- package/{esm2020 → esm2022}/lib/modal/modal.module.mjs +12 -12
- package/{esm2020 → esm2022}/lib/pagination/pagination.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/pagination/pagination.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/progress-circle/progress-circle.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/progress-circle/progress-circle.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/segmented-control/segmented-control.component.mjs +6 -6
- package/{esm2020 → esm2022}/lib/segmented-control/segmented-control.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/shared/core-element/core-element.directive.mjs +4 -4
- package/{esm2020 → esm2022}/lib/shared/core-element/core-element.module.mjs +5 -5
- package/{esm2020/src → esm2022}/lib/shared/on-scroll.directive.mjs +10 -10
- package/{esm2020 → esm2022}/lib/shared/shared.module.mjs +5 -5
- package/esm2022/lib/slider/slider.component.mjs +113 -0
- package/{esm2020 → esm2022}/lib/slider/slider.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/sortable-list/sortable-list.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/sortable-list/sortable-list.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/accordion/accordion-list-item.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/accordion/accordion.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/accordion/accordion.module.mjs +5 -5
- package/esm2022/src/lib/badge/badge.component.mjs +80 -0
- package/{esm2020 → esm2022}/src/lib/badge/badge.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/button/button.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/button/button.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/cell-table/cell-table-item.component.mjs +6 -6
- package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.module.mjs +7 -7
- package/{esm2020 → esm2022}/src/lib/cell-table/cell-underline.directive.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/context-menu/context-menu.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/context-menu/context-menu.module.mjs +5 -5
- package/esm2022/src/lib/datepicker/datepicker.component.mjs +138 -0
- package/{esm2020 → esm2022}/src/lib/datepicker/datepicker.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/dropdown/dropdown-button.directive.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/dropdown/dropdown-option.directive.mjs +4 -4
- package/esm2022/src/lib/dropdown/dropdown.component.mjs +212 -0
- package/{esm2020 → esm2022}/src/lib/dropdown/dropdown.module.mjs +9 -9
- package/{esm2020 → esm2022}/src/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/in-page-wizard/in-page-wizard.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/modal/modal-footer.directive.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/modal/modal-header.directive.mjs +4 -4
- package/esm2022/src/lib/modal/modal.component.mjs +258 -0
- package/{esm2020 → esm2022}/src/lib/modal/modal.module.mjs +12 -12
- package/{esm2020 → esm2022}/src/lib/pagination/pagination.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/pagination/pagination.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/progress-circle/progress-circle.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/progress-circle/progress-circle.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/segmented-control/segmented-control.component.mjs +6 -6
- package/{esm2020 → esm2022}/src/lib/segmented-control/segmented-control.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/shared/core-element/core-element.directive.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/shared/core-element/core-element.module.mjs +5 -5
- package/esm2022/src/lib/shared/on-scroll.directive.mjs +47 -0
- package/{esm2020 → esm2022}/src/lib/shared/shared.module.mjs +5 -5
- package/esm2022/src/lib/slider/slider.component.mjs +113 -0
- package/{esm2020 → esm2022}/src/lib/slider/slider.module.mjs +5 -5
- package/{esm2020 → esm2022}/src/lib/sortable-list/sortable-list.component.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/sortable-list/sortable-list.module.mjs +5 -5
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-accordion.mjs +10 -10
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-badge.mjs +16 -16
- package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-button.mjs +7 -7
- package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-button.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-cell-table.mjs +17 -17
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-context-menu.mjs +7 -7
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-datepicker.mjs +20 -20
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-dropdown.mjs +69 -69
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-in-page-wizard.mjs +7 -7
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-modal.mjs +56 -49
- package/fesm2022/sebgroup-green-angular-src-lib-modal.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-pagination.mjs +7 -7
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-progress-circle.mjs +7 -7
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/sebgroup-green-angular-src-lib-segmented-control.mjs +9 -9
- package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-shared.mjs +20 -20
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-shared.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-slider.mjs +13 -13
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-slider.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-sortable-list.mjs +7 -7
- package/{fesm2020 → fesm2022}/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/sebgroup-green-angular.mjs +302 -295
- package/fesm2022/sebgroup-green-angular.mjs.map +1 -0
- package/lib/accordion/accordion-list-item.component.d.ts +1 -1
- package/lib/accordion/accordion.component.d.ts +1 -1
- package/lib/badge/badge.component.d.ts +1 -1
- package/lib/button/button.component.d.ts +1 -1
- package/lib/cell-table/cell-table-item.component.d.ts +1 -1
- package/lib/cell-table/cell-table.component.d.ts +1 -1
- package/lib/cell-table/cell-table.types.d.ts +1 -1
- package/lib/cell-table/cell-underline.directive.d.ts +1 -1
- package/lib/context-menu/context-menu.component.d.ts +1 -1
- package/lib/datepicker/datepicker.component.d.ts +1 -1
- package/lib/dropdown/dropdown.component.d.ts +4 -4
- package/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +1 -1
- package/lib/modal/modal.component.d.ts +4 -3
- package/lib/pagination/pagination.component.d.ts +1 -1
- package/lib/progress-circle/progress-circle.component.d.ts +1 -1
- package/lib/segmented-control/segmented-control.component.d.ts +1 -1
- package/lib/slider/slider.component.d.ts +1 -1
- package/lib/sortable-list/sortable-list.component.d.ts +1 -1
- package/package.json +60 -95
- package/src/lib/accordion/accordion-list-item.component.d.ts +1 -1
- package/src/lib/accordion/accordion.component.d.ts +1 -1
- package/src/lib/badge/badge.component.d.ts +1 -1
- package/src/lib/button/button.component.d.ts +1 -1
- package/src/lib/cell-table/cell-table-item.component.d.ts +1 -1
- package/src/lib/cell-table/cell-table.component.d.ts +1 -1
- package/src/lib/cell-table/cell-table.types.d.ts +1 -1
- package/src/lib/cell-table/cell-underline.directive.d.ts +1 -1
- package/src/lib/context-menu/context-menu.component.d.ts +1 -1
- package/src/lib/datepicker/datepicker.component.d.ts +1 -1
- package/src/lib/dropdown/dropdown.component.d.ts +4 -4
- package/src/lib/in-page-wizard/in-page-wizard-step-card.component.d.ts +1 -1
- package/src/lib/modal/modal.component.d.ts +4 -3
- package/src/lib/pagination/pagination.component.d.ts +1 -1
- package/src/lib/progress-circle/progress-circle.component.d.ts +1 -1
- package/src/lib/segmented-control/segmented-control.component.d.ts +1 -1
- package/src/lib/slider/slider.component.d.ts +1 -1
- package/src/lib/sortable-list/sortable-list.component.d.ts +1 -1
- package/esm2020/lib/badge/badge.component.mjs +0 -80
- package/esm2020/lib/datepicker/datepicker.component.mjs +0 -138
- package/esm2020/lib/dropdown/dropdown.component.mjs +0 -212
- package/esm2020/lib/modal/modal.component.mjs +0 -251
- package/esm2020/lib/shared/on-scroll.directive.mjs +0 -47
- package/esm2020/lib/slider/slider.component.mjs +0 -113
- package/esm2020/src/lib/badge/badge.component.mjs +0 -80
- package/esm2020/src/lib/datepicker/datepicker.component.mjs +0 -138
- package/esm2020/src/lib/dropdown/dropdown.component.mjs +0 -212
- package/esm2020/src/lib/modal/modal.component.mjs +0 -251
- package/esm2020/src/lib/slider/slider.component.mjs +0 -113
- package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs +0 -140
- package/fesm2015/sebgroup-green-angular-src-lib-accordion.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-badge.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-button.mjs +0 -50
- package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs +0 -272
- package/fesm2015/sebgroup-green-angular-src-lib-cell-table.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-context-menu.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs +0 -166
- package/fesm2015/sebgroup-green-angular-src-lib-datepicker.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs +0 -266
- package/fesm2015/sebgroup-green-angular-src-lib-dropdown.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs +0 -321
- package/fesm2015/sebgroup-green-angular-src-lib-modal.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs +0 -197
- package/fesm2015/sebgroup-green-angular-src-lib-pagination.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs +0 -63
- package/fesm2015/sebgroup-green-angular-src-lib-progress-circle.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-segmented-control.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs +0 -114
- package/fesm2015/sebgroup-green-angular-src-lib-shared.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs +0 -136
- package/fesm2015/sebgroup-green-angular-src-lib-slider.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs +0 -204
- package/fesm2015/sebgroup-green-angular-src-lib-sortable-list.mjs.map +0 -1
- package/fesm2015/sebgroup-green-angular.mjs +0 -2158
- package/fesm2015/sebgroup-green-angular.mjs.map +0 -1
- package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs +0 -102
- package/fesm2020/sebgroup-green-angular-src-lib-badge.mjs.map +0 -1
- package/fesm2020/sebgroup-green-angular-src-lib-button.mjs.map +0 -1
- package/fesm2020/sebgroup-green-angular-src-lib-context-menu.mjs +0 -104
- package/fesm2020/sebgroup-green-angular-src-lib-in-page-wizard.mjs +0 -72
- package/fesm2020/sebgroup-green-angular-src-lib-modal.mjs.map +0 -1
- package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs +0 -58
- package/fesm2020/sebgroup-green-angular-src-lib-segmented-control.mjs.map +0 -1
- package/fesm2020/sebgroup-green-angular.mjs.map +0 -1
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/accordion/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/badge/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/button/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/cell-table/cell-table.types.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/cell-table/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/context-menu/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/datepicker/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/dropdown/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/in-page-wizard/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/modal/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/pagination/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/progress-circle/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/segmented-control/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/shared/core-element/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/shared/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/slider/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/sortable-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/sebgroup-green-angular.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/accordion/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/accordion/sebgroup-green-angular-src-lib-accordion.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/badge/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/badge/sebgroup-green-angular-src-lib-badge.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/button/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/button/sebgroup-green-angular-src-lib-button.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/cell-table/cell-table.types.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/cell-table/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/cell-table/sebgroup-green-angular-src-lib-cell-table.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/context-menu/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/context-menu/sebgroup-green-angular-src-lib-context-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/datepicker/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/datepicker/sebgroup-green-angular-src-lib-datepicker.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/dropdown/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/dropdown/sebgroup-green-angular-src-lib-dropdown.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/in-page-wizard/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/in-page-wizard/sebgroup-green-angular-src-lib-in-page-wizard.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/modal/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/modal/sebgroup-green-angular-src-lib-modal.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/pagination/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/pagination/sebgroup-green-angular-src-lib-pagination.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/progress-circle/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/progress-circle/sebgroup-green-angular-src-lib-progress-circle.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/segmented-control/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/segmented-control/sebgroup-green-angular-src-lib-segmented-control.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/shared/core-element/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/shared/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/shared/sebgroup-green-angular-src-lib-shared.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/slider/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/slider/sebgroup-green-angular-src-lib-slider.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/sortable-list/index.mjs +0 -0
- /package/{esm2020 → esm2022}/src/lib/sortable-list/sebgroup-green-angular-src-lib-sortable-list.mjs +0 -0
|
@@ -1,2158 +0,0 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
|
-
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Component, Input, Output, ContentChildren, NgModule, ChangeDetectionStrategy, HostBinding, ViewChild, CUSTOM_ELEMENTS_SCHEMA, Directive, Injector, Inject, ContentChild, InjectionToken, QueryList, ViewChildren, inject, Renderer2, ViewContainerRef, ChangeDetectorRef, TemplateRef } from '@angular/core';
|
|
5
|
-
import { randomId, calculateDegrees, sliderColors, getSliderTrackBackground, PaginationI18n } from '@sebgroup/extract';
|
|
6
|
-
import '@sebgroup/green-core/components/context-menu/index.js';
|
|
7
|
-
import * as ContextMenuTransStyles from '@sebgroup/green-core/components/context-menu/context-menu.trans.styles.js';
|
|
8
|
-
import * as i2 from '@sebgroup/green-angular/src/lib/shared';
|
|
9
|
-
import { NggCoreWrapperModule as NggCoreWrapperModule$1 } from '@sebgroup/green-angular/src/lib/shared';
|
|
10
|
-
import * as i2$1 from '@angular/forms';
|
|
11
|
-
import { NG_VALUE_ACCESSOR, NgControl, FormsModule } from '@angular/forms';
|
|
12
|
-
import { startOfDay, endOfDay } from 'date-fns';
|
|
13
|
-
import '@sebgroup/green-core/components/datepicker/index.js';
|
|
14
|
-
import * as DatepickerTransStyles from '@sebgroup/green-core/components/datepicker/datepicker.trans.styles.js';
|
|
15
|
-
import '@sebgroup/green-core/components/dropdown/index.js';
|
|
16
|
-
import * as DropdownTransStyles from '@sebgroup/green-core/components/dropdown/dropdown.trans.styles.js';
|
|
17
|
-
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
|
18
|
-
import * as i1$1 from '@angular/cdk/a11y';
|
|
19
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
20
|
-
import * as i1$2 from '@angular/router';
|
|
21
|
-
import { RouterModule } from '@angular/router';
|
|
22
|
-
import { Subject, fromEvent, interval } from 'rxjs';
|
|
23
|
-
import { takeUntil, throttle } from 'rxjs/operators';
|
|
24
|
-
import * as i2$2 from '@angular/cdk/drag-drop';
|
|
25
|
-
import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
26
|
-
import * as i1$3 from '@angular/platform-browser';
|
|
27
|
-
import { getScopedTagName } from '@sebgroup/green-core/scoping';
|
|
28
|
-
|
|
29
|
-
class NggAccordionListItemComponent {
|
|
30
|
-
constructor() {
|
|
31
|
-
this.id = randomId();
|
|
32
|
-
this.listItemHeader = '';
|
|
33
|
-
this.listItemSubHeader = '';
|
|
34
|
-
this.expandedChange = new EventEmitter();
|
|
35
|
-
this.contentHeight = '0px';
|
|
36
|
-
this.isExpanded = false;
|
|
37
|
-
}
|
|
38
|
-
shrink() {
|
|
39
|
-
this.isExpanded = false;
|
|
40
|
-
this.contentHeight = '0px';
|
|
41
|
-
}
|
|
42
|
-
expand() {
|
|
43
|
-
this.isExpanded = true;
|
|
44
|
-
this.contentHeight = 'auto';
|
|
45
|
-
}
|
|
46
|
-
toggleExpanded() {
|
|
47
|
-
this.isExpanded = !this.isExpanded;
|
|
48
|
-
if (this.isExpanded) {
|
|
49
|
-
this.contentHeight = 'auto';
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.contentHeight = '0px';
|
|
53
|
-
}
|
|
54
|
-
this.expandedChange.emit(this);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
NggAccordionListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
NggAccordionListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggAccordionListItemComponent, selector: "div[ngg-accordion-list-item]", inputs: { id: "id", listItemHeader: "listItemHeader", listItemSubHeader: "listItemSubHeader" }, outputs: { expandedChange: "expandedChange" }, ngImport: i0, template: "<ng-container data-testid=\"accordion-list-item-root\">\n <div role=\"heading\" aria-level=\"2\" [attr.id]=\"id\">\n <button\n data-testid=\"accordion-list-item-expander-button\"\n [attr.id]=\"id + '_header'\"\n (click)=\"toggleExpanded()\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"this.isExpanded\"\n [attr.aria-controls]=\"id + '_section'\"\n >\n <span data-testid=\"accordion-list-item-header\">{{ listItemHeader }}</span>\n <span data-testid=\"accordion-list-item-subheader\">{{\n listItemSubHeader\n }}</span>\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.8095 9.22817L18.1907 8.60942C18.0438 8.46255 17.8063 8.46255 17.6595 8.60942L12.0001 14.2563L6.34072 8.60942C6.19385 8.46255 5.95635 8.46255 5.80947 8.60942L5.19072 9.22817C5.04385 9.37505 5.04385 9.61255 5.19072 9.75942L11.7345 16.3032C11.8813 16.45 12.1188 16.45 12.2657 16.3032L18.8095 9.75942C18.9563 9.61255 18.9563 9.37505 18.8095 9.22817Z\"\n fill=\"#333333\"\n />\n </svg>\n </button>\n <div\n role=\"region\"\n [hidden]=\"!this.isExpanded\"\n [ngStyle]=\"{ height: this.contentHeight }\"\n [id]=\"id + '_section'\"\n [attr.aria-labelledby]=\"id + '_header'\"\n data-testid=\"accordion-list-item-content\"\n >\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionListItemComponent, decorators: [{
|
|
60
|
-
type: Component,
|
|
61
|
-
args: [{ selector: 'div[ngg-accordion-list-item]', template: "<ng-container data-testid=\"accordion-list-item-root\">\n <div role=\"heading\" aria-level=\"2\" [attr.id]=\"id\">\n <button\n data-testid=\"accordion-list-item-expander-button\"\n [attr.id]=\"id + '_header'\"\n (click)=\"toggleExpanded()\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"this.isExpanded\"\n [attr.aria-controls]=\"id + '_section'\"\n >\n <span data-testid=\"accordion-list-item-header\">{{ listItemHeader }}</span>\n <span data-testid=\"accordion-list-item-subheader\">{{\n listItemSubHeader\n }}</span>\n <svg\n width=\"1em\"\n height=\"1em\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.8095 9.22817L18.1907 8.60942C18.0438 8.46255 17.8063 8.46255 17.6595 8.60942L12.0001 14.2563L6.34072 8.60942C6.19385 8.46255 5.95635 8.46255 5.80947 8.60942L5.19072 9.22817C5.04385 9.37505 5.04385 9.61255 5.19072 9.75942L11.7345 16.3032C11.8813 16.45 12.1188 16.45 12.2657 16.3032L18.8095 9.75942C18.9563 9.61255 18.9563 9.37505 18.8095 9.22817Z\"\n fill=\"#333333\"\n />\n </svg>\n </button>\n <div\n role=\"region\"\n [hidden]=\"!this.isExpanded\"\n [ngStyle]=\"{ height: this.contentHeight }\"\n [id]=\"id + '_section'\"\n [attr.aria-labelledby]=\"id + '_header'\"\n data-testid=\"accordion-list-item-content\"\n >\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
|
|
62
|
-
}], propDecorators: { id: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}], listItemHeader: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}], listItemSubHeader: [{
|
|
67
|
-
type: Input
|
|
68
|
-
}], expandedChange: [{
|
|
69
|
-
type: Output
|
|
70
|
-
}] } });
|
|
71
|
-
|
|
72
|
-
class NggAccordionComponent {
|
|
73
|
-
constructor() {
|
|
74
|
-
this.closeOthers = false;
|
|
75
|
-
}
|
|
76
|
-
get expandAll() {
|
|
77
|
-
return this._expandAll;
|
|
78
|
-
}
|
|
79
|
-
set expandAll(value) {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
if (value === this._expandAll)
|
|
82
|
-
return;
|
|
83
|
-
if (this._expandAll) {
|
|
84
|
-
(_a = this.expandAllSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
85
|
-
}
|
|
86
|
-
this._expandAll = value;
|
|
87
|
-
this.expandAllSubscription = (_b = this._expandAll) === null || _b === void 0 ? void 0 : _b.subscribe(() => {
|
|
88
|
-
if (this.closeOthers === false) {
|
|
89
|
-
const itemArray = this.items ? Array.from(this.items) : undefined;
|
|
90
|
-
if (itemArray) {
|
|
91
|
-
for (const i of itemArray) {
|
|
92
|
-
i.expand();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
ngAfterContentChecked() {
|
|
99
|
-
if (this.closeOthers) {
|
|
100
|
-
const itemArray = this.items ? Array.from(this.items) : undefined;
|
|
101
|
-
if (itemArray) {
|
|
102
|
-
for (const i of itemArray) {
|
|
103
|
-
i.expandedChange.subscribe((child) => this.onChildExpanded(child));
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
ngOnDestroy() {
|
|
109
|
-
var _a;
|
|
110
|
-
if (this.closeOthers) {
|
|
111
|
-
const itemArray = this.items ? Array.from(this.items) : undefined;
|
|
112
|
-
if (itemArray) {
|
|
113
|
-
for (const i of itemArray) {
|
|
114
|
-
i.expandedChange.unsubscribe();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
(_a = this.expandAllSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
119
|
-
}
|
|
120
|
-
onChildExpanded(childIdentity) {
|
|
121
|
-
if (this.closeOthers && childIdentity.isExpanded && this.items) {
|
|
122
|
-
this.items.forEach((item) => {
|
|
123
|
-
if (item !== childIdentity)
|
|
124
|
-
item.shrink();
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
NggAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
130
|
-
NggAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggAccordionComponent, selector: "ngg-accordion", inputs: { closeOthers: "closeOthers", expandAll: "expandAll" }, queries: [{ propertyName: "items", predicate: NggAccordionListItemComponent }], ngImport: i0, template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" });
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionComponent, decorators: [{
|
|
132
|
-
type: Component,
|
|
133
|
-
args: [{ selector: 'ngg-accordion', template: "<div class=\"accordion\" data-testid=\"accordion-root\">\n <ng-content></ng-content>\n</div>\n" }]
|
|
134
|
-
}], propDecorators: { items: [{
|
|
135
|
-
type: ContentChildren,
|
|
136
|
-
args: [NggAccordionListItemComponent]
|
|
137
|
-
}], closeOthers: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], expandAll: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}] } });
|
|
142
|
-
|
|
143
|
-
class NggAccordionModule {
|
|
144
|
-
}
|
|
145
|
-
NggAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
146
|
-
NggAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionModule, declarations: [NggAccordionListItemComponent, NggAccordionComponent], imports: [CommonModule], exports: [NggAccordionListItemComponent, NggAccordionComponent] });
|
|
147
|
-
NggAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionModule, imports: [CommonModule] });
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggAccordionModule, decorators: [{
|
|
149
|
-
type: NgModule,
|
|
150
|
-
args: [{
|
|
151
|
-
imports: [CommonModule],
|
|
152
|
-
exports: [NggAccordionListItemComponent, NggAccordionComponent],
|
|
153
|
-
declarations: [NggAccordionListItemComponent, NggAccordionComponent],
|
|
154
|
-
}]
|
|
155
|
-
}] });
|
|
156
|
-
|
|
157
|
-
class NggBadgeComponent {
|
|
158
|
-
//eslint-disable-next-line
|
|
159
|
-
constructor() {
|
|
160
|
-
/** The color of the component */
|
|
161
|
-
this.badgeType = '';
|
|
162
|
-
/** Callback when component is dismissed */
|
|
163
|
-
this.handleClose = new EventEmitter();
|
|
164
|
-
}
|
|
165
|
-
/** Flag whether the component can be dismissed */
|
|
166
|
-
set isCloseable(value) {
|
|
167
|
-
this._isCloseable = value;
|
|
168
|
-
}
|
|
169
|
-
get isCloseable() {
|
|
170
|
-
return this._isCloseable === '' || !!this._isCloseable;
|
|
171
|
-
}
|
|
172
|
-
get class() {
|
|
173
|
-
return ['badge', this.badgeType].join(' ');
|
|
174
|
-
}
|
|
175
|
-
ngOnInit() {
|
|
176
|
-
if (!!this.customColor || !!this.customBackgroundColor) {
|
|
177
|
-
this.badgeType = '';
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
close(e) {
|
|
181
|
-
this.handleClose.emit(e);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
NggBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
-
NggBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggBadgeComponent, selector: "[ngg-badge]", inputs: { badgeType: "badgeType", isCloseable: "isCloseable", closeText: "closeText", customColor: "customColor", customBackgroundColor: "customBackgroundColor" }, outputs: { handleClose: "handleClose" }, host: { properties: { "style.color": "this.customColor", "style.background-color": "this.customBackgroundColor", "class": "this.class" } }, ngImport: i0, template: `
|
|
186
|
-
<strong>
|
|
187
|
-
<ng-content></ng-content>
|
|
188
|
-
</strong>
|
|
189
|
-
<button *ngIf="isCloseable" class="close" (click)="close($event)">
|
|
190
|
-
{{ closeText }}
|
|
191
|
-
<i></i>
|
|
192
|
-
</button>
|
|
193
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeComponent, decorators: [{
|
|
195
|
-
type: Component,
|
|
196
|
-
args: [{
|
|
197
|
-
// we need to disable this warning since we don't want the badge component to create a new element
|
|
198
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
199
|
-
selector: '[ngg-badge]',
|
|
200
|
-
template: `
|
|
201
|
-
<strong>
|
|
202
|
-
<ng-content></ng-content>
|
|
203
|
-
</strong>
|
|
204
|
-
<button *ngIf="isCloseable" class="close" (click)="close($event)">
|
|
205
|
-
{{ closeText }}
|
|
206
|
-
<i></i>
|
|
207
|
-
</button>
|
|
208
|
-
`,
|
|
209
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
210
|
-
}]
|
|
211
|
-
}], ctorParameters: function () { return []; }, propDecorators: { badgeType: [{
|
|
212
|
-
type: Input
|
|
213
|
-
}], isCloseable: [{
|
|
214
|
-
type: Input
|
|
215
|
-
}], closeText: [{
|
|
216
|
-
type: Input
|
|
217
|
-
}], customColor: [{
|
|
218
|
-
type: HostBinding,
|
|
219
|
-
args: ['style.color']
|
|
220
|
-
}, {
|
|
221
|
-
type: Input
|
|
222
|
-
}], customBackgroundColor: [{
|
|
223
|
-
type: HostBinding,
|
|
224
|
-
args: ['style.background-color']
|
|
225
|
-
}, {
|
|
226
|
-
type: Input
|
|
227
|
-
}], class: [{
|
|
228
|
-
type: HostBinding,
|
|
229
|
-
args: ['class']
|
|
230
|
-
}], handleClose: [{
|
|
231
|
-
type: Output
|
|
232
|
-
}] } });
|
|
233
|
-
|
|
234
|
-
class NggBadgeModule {
|
|
235
|
-
}
|
|
236
|
-
NggBadgeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
237
|
-
NggBadgeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeModule, declarations: [NggBadgeComponent], imports: [CommonModule], exports: [NggBadgeComponent] });
|
|
238
|
-
NggBadgeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeModule, imports: [CommonModule] });
|
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggBadgeModule, decorators: [{
|
|
240
|
-
type: NgModule,
|
|
241
|
-
args: [{
|
|
242
|
-
declarations: [NggBadgeComponent],
|
|
243
|
-
imports: [CommonModule],
|
|
244
|
-
exports: [NggBadgeComponent],
|
|
245
|
-
}]
|
|
246
|
-
}] });
|
|
247
|
-
|
|
248
|
-
class NggButtonComponent {
|
|
249
|
-
get classes() {
|
|
250
|
-
return [this.variant, this.size ? this.size : false]
|
|
251
|
-
.filter(Boolean)
|
|
252
|
-
.join(' ');
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
NggButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
256
|
-
NggButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggButtonComponent, selector: "[ngg-button]", inputs: { variant: "variant", size: "size" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggButtonComponent, decorators: [{
|
|
258
|
-
type: Component,
|
|
259
|
-
args: [{
|
|
260
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
261
|
-
selector: '[ngg-button]',
|
|
262
|
-
template: `<ng-content></ng-content>`,
|
|
263
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
264
|
-
}]
|
|
265
|
-
}], propDecorators: { variant: [{
|
|
266
|
-
type: Input
|
|
267
|
-
}], size: [{
|
|
268
|
-
type: Input
|
|
269
|
-
}], classes: [{
|
|
270
|
-
type: HostBinding,
|
|
271
|
-
args: ['class']
|
|
272
|
-
}] } });
|
|
273
|
-
|
|
274
|
-
class NggButtonModule {
|
|
275
|
-
}
|
|
276
|
-
NggButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
277
|
-
NggButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggButtonModule, declarations: [NggButtonComponent], imports: [CommonModule], exports: [NggButtonComponent] });
|
|
278
|
-
NggButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggButtonModule, imports: [CommonModule] });
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggButtonModule, decorators: [{
|
|
280
|
-
type: NgModule,
|
|
281
|
-
args: [{
|
|
282
|
-
declarations: [NggButtonComponent],
|
|
283
|
-
imports: [CommonModule],
|
|
284
|
-
exports: [NggButtonComponent],
|
|
285
|
-
}]
|
|
286
|
-
}] });
|
|
287
|
-
|
|
288
|
-
class NggContextMenuComponent {
|
|
289
|
-
constructor(elementRef) {
|
|
290
|
-
this.elementRef = elementRef;
|
|
291
|
-
/**
|
|
292
|
-
* Placement of the popover relative to the anchor element.
|
|
293
|
-
*/
|
|
294
|
-
this.direction = 'ltr';
|
|
295
|
-
/**
|
|
296
|
-
* List of items to be displayed in the context menu.
|
|
297
|
-
*/
|
|
298
|
-
this.menuItems = [];
|
|
299
|
-
/**
|
|
300
|
-
* Custom menu item template.
|
|
301
|
-
*/
|
|
302
|
-
this.menuItemTemplate = null;
|
|
303
|
-
/**
|
|
304
|
-
* Custom menu trigger template.
|
|
305
|
-
*/
|
|
306
|
-
this.menuAnchorTemplate = null;
|
|
307
|
-
/**
|
|
308
|
-
* @deprecated
|
|
309
|
-
* This property no longer has any effect and will be removed in a future version.
|
|
310
|
-
*/
|
|
311
|
-
this.closeOnScroll = false;
|
|
312
|
-
/**
|
|
313
|
-
* Emits when a menu item is clicked.
|
|
314
|
-
*/
|
|
315
|
-
this.contextMenuItemClicked = new EventEmitter();
|
|
316
|
-
this.isActive = false;
|
|
317
|
-
ContextMenuTransStyles.register();
|
|
318
|
-
}
|
|
319
|
-
get placement() {
|
|
320
|
-
return this.direction === 'ltr' ? 'bottom-start' : 'bottom-end';
|
|
321
|
-
}
|
|
322
|
-
open() {
|
|
323
|
-
if (this.isActive) {
|
|
324
|
-
this.close();
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
this.isActive = true;
|
|
328
|
-
}
|
|
329
|
-
close() {
|
|
330
|
-
this.isActive = false;
|
|
331
|
-
}
|
|
332
|
-
onItemClick(item) {
|
|
333
|
-
this.contextMenuItemClicked.emit(item);
|
|
334
|
-
this.close();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
NggContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
338
|
-
NggContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggContextMenuComponent, selector: "ngg-context-menu", inputs: { direction: "direction", menuItems: "menuItems", menuItemTemplate: "menuItemTemplate", menuAnchorTemplate: "menuAnchorTemplate", closeOnScroll: "closeOnScroll" }, outputs: { contextMenuItemClicked: "contextMenuItemClicked" }, viewQueries: [{ propertyName: "popover", first: true, predicate: ["contextMenuPopover"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["contextMenuAnchor"], descendants: true }], ngImport: i0, template: "<gds-context-menu\n *nggCoreElement\n data-testid=\"context-menu\"\n [placement]=\"placement\"\n [open]=\"isActive\"\n>\n <div style=\"display: contents\" slot=\"trigger\">\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n </div>\n <ng-container *ngFor=\"let menuItem of menuItems\">\n <gds-menu-item *nggCoreElement (click)=\"onItemClick(menuItem)\">\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </gds-menu-item>\n </ng-container>\n</gds-context-menu>\n\n<ng-template #defaultMenuItemTemplate let-menuItem>\n <span>{{ menuItem.label }}</span>\n</ng-template>\n\n<ng-template #defaultButtonTemplate>\n <i class=\"sg-icon sg-icon-ellipsis\">Open context menu</i>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NggCoreElementDirective, selector: "[nggCoreElement]" }] });
|
|
339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuComponent, decorators: [{
|
|
340
|
-
type: Component,
|
|
341
|
-
args: [{ selector: 'ngg-context-menu', template: "<gds-context-menu\n *nggCoreElement\n data-testid=\"context-menu\"\n [placement]=\"placement\"\n [open]=\"isActive\"\n>\n <div style=\"display: contents\" slot=\"trigger\">\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n </div>\n <ng-container *ngFor=\"let menuItem of menuItems\">\n <gds-menu-item *nggCoreElement (click)=\"onItemClick(menuItem)\">\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </gds-menu-item>\n </ng-container>\n</gds-context-menu>\n\n<ng-template #defaultMenuItemTemplate let-menuItem>\n <span>{{ menuItem.label }}</span>\n</ng-template>\n\n<ng-template #defaultButtonTemplate>\n <i class=\"sg-icon sg-icon-ellipsis\">Open context menu</i>\n</ng-template>\n" }]
|
|
342
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { direction: [{
|
|
343
|
-
type: Input
|
|
344
|
-
}], menuItems: [{
|
|
345
|
-
type: Input
|
|
346
|
-
}], menuItemTemplate: [{
|
|
347
|
-
type: Input
|
|
348
|
-
}], menuAnchorTemplate: [{
|
|
349
|
-
type: Input
|
|
350
|
-
}], closeOnScroll: [{
|
|
351
|
-
type: Input
|
|
352
|
-
}], contextMenuItemClicked: [{
|
|
353
|
-
type: Output
|
|
354
|
-
}], popover: [{
|
|
355
|
-
type: ViewChild,
|
|
356
|
-
args: ['contextMenuPopover']
|
|
357
|
-
}], anchor: [{
|
|
358
|
-
type: ViewChild,
|
|
359
|
-
args: ['contextMenuAnchor']
|
|
360
|
-
}] } });
|
|
361
|
-
|
|
362
|
-
class NggContextMenuModule {
|
|
363
|
-
}
|
|
364
|
-
NggContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
365
|
-
NggContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuModule, declarations: [NggContextMenuComponent], imports: [CommonModule, NggCoreWrapperModule$1], exports: [NggContextMenuComponent] });
|
|
366
|
-
NggContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuModule, imports: [CommonModule, NggCoreWrapperModule$1] });
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggContextMenuModule, decorators: [{
|
|
368
|
-
type: NgModule,
|
|
369
|
-
args: [{
|
|
370
|
-
declarations: [NggContextMenuComponent],
|
|
371
|
-
imports: [CommonModule, NggCoreWrapperModule$1],
|
|
372
|
-
exports: [NggContextMenuComponent],
|
|
373
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
374
|
-
}]
|
|
375
|
-
}] });
|
|
376
|
-
|
|
377
|
-
class NggDatepickerComponent {
|
|
378
|
-
constructor(_cdr) {
|
|
379
|
-
this._cdr = _cdr;
|
|
380
|
-
this.id = randomId();
|
|
381
|
-
this.isValid = null;
|
|
382
|
-
this.valueChange = new EventEmitter();
|
|
383
|
-
DatepickerTransStyles.register();
|
|
384
|
-
}
|
|
385
|
-
get options() {
|
|
386
|
-
return this._options;
|
|
387
|
-
}
|
|
388
|
-
set options(value) {
|
|
389
|
-
this._options = value;
|
|
390
|
-
}
|
|
391
|
-
get showWeekNumbers() {
|
|
392
|
-
var _a, _b;
|
|
393
|
-
return (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.showWeeks) !== null && _b !== void 0 ? _b : false;
|
|
394
|
-
}
|
|
395
|
-
get dateFormat() {
|
|
396
|
-
var _a, _b;
|
|
397
|
-
return (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.dateFormat) !== null && _b !== void 0 ? _b : 'y-m-d';
|
|
398
|
-
}
|
|
399
|
-
get value() {
|
|
400
|
-
return this._value;
|
|
401
|
-
}
|
|
402
|
-
set value(newValue) {
|
|
403
|
-
if (typeof newValue === 'string') {
|
|
404
|
-
newValue = new Date(newValue);
|
|
405
|
-
}
|
|
406
|
-
if (newValue !== this._value) {
|
|
407
|
-
this._value = newValue || undefined;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
get min() {
|
|
411
|
-
var _a;
|
|
412
|
-
const minDate = (_a = this.options) === null || _a === void 0 ? void 0 : _a.minDate;
|
|
413
|
-
return minDate ? minDate : new Date(new Date().getFullYear() - 10, 0, 1);
|
|
414
|
-
}
|
|
415
|
-
get max() {
|
|
416
|
-
var _a;
|
|
417
|
-
const maxDate = (_a = this.options) === null || _a === void 0 ? void 0 : _a.maxDate;
|
|
418
|
-
return maxDate ? maxDate : new Date(new Date().getFullYear() + 10, 0, 1);
|
|
419
|
-
}
|
|
420
|
-
writeValue(value) {
|
|
421
|
-
this.value = value;
|
|
422
|
-
this._cdr.detectChanges();
|
|
423
|
-
}
|
|
424
|
-
registerOnChange(fn) {
|
|
425
|
-
this.onChangeFn = fn;
|
|
426
|
-
}
|
|
427
|
-
registerOnTouched(fn) {
|
|
428
|
-
this.onTouchedFn = fn;
|
|
429
|
-
}
|
|
430
|
-
onDateChange(evt) {
|
|
431
|
-
const e = evt;
|
|
432
|
-
this.value = e.detail.value;
|
|
433
|
-
this.valueChange.emit(e.detail.value);
|
|
434
|
-
this.onChangeFn && this.onChangeFn(e.detail.value);
|
|
435
|
-
}
|
|
436
|
-
ngAfterViewInit() {
|
|
437
|
-
this._cdr.detectChanges();
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
NggDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
441
|
-
NggDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggDatepickerComponent, selector: "ngg-datepicker", inputs: { size: "size", hideLabel: "hideLabel", disabledWeekends: "disabledWeekends", disabledDates: "disabledDates", options: "options", value: "value", id: "id", label: "label", isValid: "isValid" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
442
|
-
{
|
|
443
|
-
provide: NG_VALUE_ACCESSOR,
|
|
444
|
-
useExisting: NggDatepickerComponent,
|
|
445
|
-
multi: true,
|
|
446
|
-
},
|
|
447
|
-
], ngImport: i0, template: "<div class=\"form-group\">\n <gds-datepicker\n *nggCoreElement\n [attr.id]=\"id\"\n [label]=\"label\"\n [value]=\"value\"\n (change)=\"onDateChange($event)\"\n [invalid]=\"isValid === false\"\n [min]=\"min\"\n [max]=\"max\"\n [showWeekNumbers]=\"showWeekNumbers\"\n [dateformat]=\"dateFormat\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [disabledWeekends]=\"disabledWeekends\"\n [disabledDates]=\"disabledDates\"\n >\n <span slot=\"message\">\n <ng-content select=\"[data-form-info]\"></ng-content>\n </span>\n </gds-datepicker>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NggCoreElementDirective, selector: "[nggCoreElement]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerComponent, decorators: [{
|
|
449
|
-
type: Component,
|
|
450
|
-
args: [{ selector: 'ngg-datepicker', providers: [
|
|
451
|
-
{
|
|
452
|
-
provide: NG_VALUE_ACCESSOR,
|
|
453
|
-
useExisting: NggDatepickerComponent,
|
|
454
|
-
multi: true,
|
|
455
|
-
},
|
|
456
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <gds-datepicker\n *nggCoreElement\n [attr.id]=\"id\"\n [label]=\"label\"\n [value]=\"value\"\n (change)=\"onDateChange($event)\"\n [invalid]=\"isValid === false\"\n [min]=\"min\"\n [max]=\"max\"\n [showWeekNumbers]=\"showWeekNumbers\"\n [dateformat]=\"dateFormat\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [disabledWeekends]=\"disabledWeekends\"\n [disabledDates]=\"disabledDates\"\n >\n <span slot=\"message\">\n <ng-content select=\"[data-form-info]\"></ng-content>\n </span>\n </gds-datepicker>\n</div>\n" }]
|
|
457
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { size: [{
|
|
458
|
-
type: Input
|
|
459
|
-
}], hideLabel: [{
|
|
460
|
-
type: Input
|
|
461
|
-
}], disabledWeekends: [{
|
|
462
|
-
type: Input
|
|
463
|
-
}], disabledDates: [{
|
|
464
|
-
type: Input
|
|
465
|
-
}], options: [{
|
|
466
|
-
type: Input
|
|
467
|
-
}], value: [{
|
|
468
|
-
type: Input
|
|
469
|
-
}], id: [{
|
|
470
|
-
type: Input
|
|
471
|
-
}], label: [{
|
|
472
|
-
type: Input
|
|
473
|
-
}], isValid: [{
|
|
474
|
-
type: Input
|
|
475
|
-
}], valueChange: [{
|
|
476
|
-
type: Output
|
|
477
|
-
}] } });
|
|
478
|
-
function dateValidator(dates) {
|
|
479
|
-
return (control) => {
|
|
480
|
-
const value = control.value;
|
|
481
|
-
if (!value) {
|
|
482
|
-
return null;
|
|
483
|
-
}
|
|
484
|
-
const newDate = new Date(value);
|
|
485
|
-
const isValidDate = !isNaN(newDate.getTime());
|
|
486
|
-
if (!isValidDate) {
|
|
487
|
-
return { validDate: true };
|
|
488
|
-
}
|
|
489
|
-
const validMinDate = (dates === null || dates === void 0 ? void 0 : dates.min) ? newDate >= startOfDay(dates.min) : true;
|
|
490
|
-
const validMaxDate = (dates === null || dates === void 0 ? void 0 : dates.max) ? newDate <= endOfDay(dates.max) : true;
|
|
491
|
-
if (!validMinDate && (dates === null || dates === void 0 ? void 0 : dates.min)) {
|
|
492
|
-
return {
|
|
493
|
-
validDate: {
|
|
494
|
-
minDate: startOfDay(dates.min),
|
|
495
|
-
actualDate: newDate,
|
|
496
|
-
},
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
if (!validMaxDate && (dates === null || dates === void 0 ? void 0 : dates.max)) {
|
|
500
|
-
return {
|
|
501
|
-
validDate: {
|
|
502
|
-
maxDate: endOfDay(dates.max),
|
|
503
|
-
actualDate: newDate,
|
|
504
|
-
},
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
|
-
return null;
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
class NggDatepickerModule {
|
|
512
|
-
}
|
|
513
|
-
NggDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
514
|
-
NggDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerModule, declarations: [NggDatepickerComponent], imports: [CommonModule, NggCoreWrapperModule$1], exports: [NggDatepickerComponent] });
|
|
515
|
-
NggDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerModule, imports: [CommonModule, NggCoreWrapperModule$1] });
|
|
516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDatepickerModule, decorators: [{
|
|
517
|
-
type: NgModule,
|
|
518
|
-
args: [{
|
|
519
|
-
declarations: [NggDatepickerComponent],
|
|
520
|
-
imports: [CommonModule, NggCoreWrapperModule$1],
|
|
521
|
-
exports: [NggDatepickerComponent],
|
|
522
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
523
|
-
}]
|
|
524
|
-
}] });
|
|
525
|
-
|
|
526
|
-
class NggDropdownOptionDirective {
|
|
527
|
-
constructor(templateRef) {
|
|
528
|
-
this.templateRef = templateRef;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
NggDropdownOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
532
|
-
NggDropdownOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggDropdownOptionDirective, selector: "[nggDropdownOption]", ngImport: i0 });
|
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownOptionDirective, decorators: [{
|
|
534
|
-
type: Directive,
|
|
535
|
-
args: [{
|
|
536
|
-
selector: '[nggDropdownOption]',
|
|
537
|
-
}]
|
|
538
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
539
|
-
|
|
540
|
-
class NggDropdownButtonDirective {
|
|
541
|
-
constructor(templateRef) {
|
|
542
|
-
this.templateRef = templateRef;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
NggDropdownButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownButtonDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
546
|
-
NggDropdownButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggDropdownButtonDirective, selector: "[nggDropdownButton]", ngImport: i0 });
|
|
547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownButtonDirective, decorators: [{
|
|
548
|
-
type: Directive,
|
|
549
|
-
args: [{
|
|
550
|
-
selector: '[nggDropdownButton]',
|
|
551
|
-
}]
|
|
552
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
553
|
-
|
|
554
|
-
class NggDropdownComponent {
|
|
555
|
-
constructor(injector, _cdr) {
|
|
556
|
-
this.injector = injector;
|
|
557
|
-
this._cdr = _cdr;
|
|
558
|
-
this.loop = false;
|
|
559
|
-
this.display = 'label';
|
|
560
|
-
this.useValue = 'value';
|
|
561
|
-
this._multiSelect = false;
|
|
562
|
-
this._searchable = false;
|
|
563
|
-
this.valueChange = new EventEmitter();
|
|
564
|
-
this.touched = new EventEmitter();
|
|
565
|
-
this.onValueChange = (event) => {
|
|
566
|
-
var _a;
|
|
567
|
-
const target = event.target;
|
|
568
|
-
this._value = target.value;
|
|
569
|
-
this.texts = Object.assign(Object.assign({}, this.texts), { select: this.displayTextByValue(this._value) });
|
|
570
|
-
(_a = this.onChangeFn) === null || _a === void 0 ? void 0 : _a.call(this, this.value);
|
|
571
|
-
this.valueChange.emit(this.value);
|
|
572
|
-
this._cdr.detectChanges();
|
|
573
|
-
};
|
|
574
|
-
// These adapter functions are used to maintain backwards compatibility with the old interface
|
|
575
|
-
this.compareWithAdapter = (o1, o2) => {
|
|
576
|
-
const compareFn = this.compareWith || ((a, b) => a === b);
|
|
577
|
-
return compareFn(o1, o2);
|
|
578
|
-
};
|
|
579
|
-
this.searchFilterAdapter = (q, o) => {
|
|
580
|
-
if (this.searchFilter)
|
|
581
|
-
return this.searchFilter(q, o.value);
|
|
582
|
-
else
|
|
583
|
-
return ((q, o) => o.innerHTML.toLowerCase().includes(q.toLowerCase()))(q, o);
|
|
584
|
-
};
|
|
585
|
-
this.optionByValue = (value) => {
|
|
586
|
-
var _a;
|
|
587
|
-
return (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((o) => o[this.useValue] === value);
|
|
588
|
-
};
|
|
589
|
-
this.displayTextByValue = (value) => {
|
|
590
|
-
var _a, _b, _c, _d, _e, _f;
|
|
591
|
-
if (!Array.isArray(value))
|
|
592
|
-
return (((_a = this.optionByValue(value)) === null || _a === void 0 ? void 0 : _a[this.display]) ||
|
|
593
|
-
((_c = (_b = this.texts) === null || _b === void 0 ? void 0 : _b.placeholder) !== null && _c !== void 0 ? _c : 'Select'));
|
|
594
|
-
const displayValues = value.map((v) => { var _a; return (_a = this.optionByValue(v)) === null || _a === void 0 ? void 0 : _a[this.display]; });
|
|
595
|
-
return (displayValues === null || displayValues === void 0 ? void 0 : displayValues.length) > 2
|
|
596
|
-
? `${displayValues.length} ${(_d = this.texts) === null || _d === void 0 ? void 0 : _d.selected} `
|
|
597
|
-
: (displayValues === null || displayValues === void 0 ? void 0 : displayValues.join(', ')) || ((_f = (_e = this.texts) === null || _e === void 0 ? void 0 : _e.placeholder) !== null && _f !== void 0 ? _f : 'Select');
|
|
598
|
-
};
|
|
599
|
-
DropdownTransStyles.register();
|
|
600
|
-
}
|
|
601
|
-
//
|
|
602
|
-
set options(value) {
|
|
603
|
-
this._options = value;
|
|
604
|
-
this.texts = Object.assign(Object.assign({}, this.texts), { select: this.displayTextByValue(this._value) });
|
|
605
|
-
}
|
|
606
|
-
get options() {
|
|
607
|
-
return this._options;
|
|
608
|
-
}
|
|
609
|
-
//
|
|
610
|
-
set multiSelect(value) {
|
|
611
|
-
this._multiSelect = this.convertToBoolean(value);
|
|
612
|
-
}
|
|
613
|
-
get multiSelect() {
|
|
614
|
-
return this._multiSelect;
|
|
615
|
-
}
|
|
616
|
-
//
|
|
617
|
-
set searchable(value) {
|
|
618
|
-
this._searchable = this.convertToBoolean(value);
|
|
619
|
-
}
|
|
620
|
-
get searchable() {
|
|
621
|
-
return this._searchable;
|
|
622
|
-
}
|
|
623
|
-
//
|
|
624
|
-
set value(newValue) {
|
|
625
|
-
if (!this.options)
|
|
626
|
-
return;
|
|
627
|
-
this._value = newValue;
|
|
628
|
-
this.texts = Object.assign(Object.assign({}, this.texts), { select: this.displayTextByValue(this._value) });
|
|
629
|
-
}
|
|
630
|
-
get value() {
|
|
631
|
-
return this._value;
|
|
632
|
-
}
|
|
633
|
-
//
|
|
634
|
-
get selectedOption() {
|
|
635
|
-
return Array.isArray(this.value)
|
|
636
|
-
? this.value.map((v) => this.optionByValue(v))
|
|
637
|
-
: this.optionByValue(this.value);
|
|
638
|
-
}
|
|
639
|
-
get control() {
|
|
640
|
-
return this.injector.get(NgControl);
|
|
641
|
-
}
|
|
642
|
-
ngOnInit() {
|
|
643
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
644
|
-
if (!this._value) {
|
|
645
|
-
if (this.multiSelect)
|
|
646
|
-
this._value = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.filter((o) => o.selected === true)) === null || _b === void 0 ? void 0 : _b.map((o) => o[this.useValue]);
|
|
647
|
-
else
|
|
648
|
-
this._value = (_d = (_c = this.options) === null || _c === void 0 ? void 0 : _c.find((o) => o.selected === true)) === null || _d === void 0 ? void 0 : _d[this.useValue];
|
|
649
|
-
this.texts = Object.assign(Object.assign({}, this.texts), { select: this.displayTextByValue(this._value) });
|
|
650
|
-
}
|
|
651
|
-
this.texts = {
|
|
652
|
-
close: (_f = (_e = this.texts) === null || _e === void 0 ? void 0 : _e.close) !== null && _f !== void 0 ? _f : 'Close',
|
|
653
|
-
optionsDescription: (_h = (_g = this.texts) === null || _g === void 0 ? void 0 : _g.optionsDescription) !== null && _h !== void 0 ? _h : 'Options',
|
|
654
|
-
placeholder: (_k = (_j = this.texts) === null || _j === void 0 ? void 0 : _j.placeholder) !== null && _k !== void 0 ? _k : 'Select',
|
|
655
|
-
searchPlaceholder: (_m = (_l = this.texts) === null || _l === void 0 ? void 0 : _l.searchPlaceholder) !== null && _m !== void 0 ? _m : 'Search',
|
|
656
|
-
selected: (_p = (_o = this.texts) === null || _o === void 0 ? void 0 : _o.selected) !== null && _p !== void 0 ? _p : 'selected',
|
|
657
|
-
select: this.displayTextByValue(this._value),
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
writeValue(value) {
|
|
661
|
-
this.value = value;
|
|
662
|
-
this._cdr.detectChanges();
|
|
663
|
-
}
|
|
664
|
-
registerOnChange(fn) {
|
|
665
|
-
this.onChangeFn = fn;
|
|
666
|
-
}
|
|
667
|
-
registerOnTouched(fn) {
|
|
668
|
-
this.onTouchedFn = fn;
|
|
669
|
-
}
|
|
670
|
-
convertToBoolean(value) {
|
|
671
|
-
return (value === '' || value === 'true' || value.toString() === 'true' || false);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
NggDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownComponent, deps: [{ token: Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
675
|
-
NggDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggDropdownComponent, selector: "ngg-dropdown", inputs: { id: "id", texts: "texts", loop: "loop", display: "display", useValue: "useValue", label: "label", valid: "valid", invalid: "invalid", compareWith: "compareWith", searchFilter: "searchFilter", syncPopoverWidth: "syncPopoverWidth", size: "size", hideLabel: "hideLabel", maxHeight: "maxHeight", fixedPlacement: "fixedPlacement", options: "options", multiSelect: "multiSelect", searchable: "searchable", value: "value" }, outputs: { valueChange: "valueChange", touched: "touched" }, providers: [
|
|
676
|
-
{
|
|
677
|
-
provide: NG_VALUE_ACCESSOR,
|
|
678
|
-
useExisting: NggDropdownComponent,
|
|
679
|
-
multi: true,
|
|
680
|
-
},
|
|
681
|
-
], queries: [{ propertyName: "customOption", first: true, predicate: NggDropdownOptionDirective, descendants: true }, { propertyName: "customButton", first: true, predicate: NggDropdownButtonDirective, descendants: true }], viewQueries: [{ propertyName: "gdsDropdown", first: true, predicate: ["gdsDropdown"], descendants: true }], ngImport: i0, template: "<div class=\"form-group\">\n <gds-dropdown\n *nggCoreElement\n #gdsDropdown\n [value]=\"value\"\n [searchable]=\"searchable\"\n [label]=\"label\"\n (change)=\"onValueChange($event)\"\n [multiple]=\"multiSelect\"\n [invalid]=\"invalid\"\n [compareWith]=\"compareWithAdapter\"\n [searchFilter]=\"searchFilterAdapter\"\n [syncPopoverWidth]=\"syncPopoverWidth\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [maxHeight]=\"maxHeight\"\n >\n <span slot=\"message\" #formInfo\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n\n <span slot=\"trigger\"\n ><ng-container\n *ngTemplateOutlet=\"\n customButton?.templateRef && selectedOption\n ? customButton!.templateRef\n : defaultButton;\n context: { option: selectedOption }\n \"\n ></ng-container\n ></span>\n\n <ng-container *ngFor=\"let option of options; let index = index\">\n <ng-container *ngIf=\"!option.heading; else optionHeading\">\n <gds-option *nggCoreElement [value]=\"option[useValue]\"\n ><ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container\n ></gds-option>\n </ng-container>\n <ng-template #optionHeading>\n <gds-menu-heading *nggCoreElement>{{ option.label }}</gds-menu-heading>\n </ng-template>\n </ng-container>\n </gds-dropdown>\n</div>\n\n<ng-template #defaultButton let-selected=\"option\">\n <span class=\"trigger\">{{ texts?.select }}</span>\n</ng-template>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ display ? option[display] : option.name }}\n</ng-template>\n", styles: [".trigger{display:block;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NggCoreElementDirective, selector: "[nggCoreElement]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownComponent, decorators: [{
|
|
683
|
-
type: Component,
|
|
684
|
-
args: [{ selector: 'ngg-dropdown', providers: [
|
|
685
|
-
{
|
|
686
|
-
provide: NG_VALUE_ACCESSOR,
|
|
687
|
-
useExisting: NggDropdownComponent,
|
|
688
|
-
multi: true,
|
|
689
|
-
},
|
|
690
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"form-group\">\n <gds-dropdown\n *nggCoreElement\n #gdsDropdown\n [value]=\"value\"\n [searchable]=\"searchable\"\n [label]=\"label\"\n (change)=\"onValueChange($event)\"\n [multiple]=\"multiSelect\"\n [invalid]=\"invalid\"\n [compareWith]=\"compareWithAdapter\"\n [searchFilter]=\"searchFilterAdapter\"\n [syncPopoverWidth]=\"syncPopoverWidth\"\n [size]=\"size\"\n [hideLabel]=\"hideLabel\"\n [maxHeight]=\"maxHeight\"\n >\n <span slot=\"message\" #formInfo\n ><ng-content select=\"[data-form-info]\"></ng-content\n ></span>\n\n <span slot=\"trigger\"\n ><ng-container\n *ngTemplateOutlet=\"\n customButton?.templateRef && selectedOption\n ? customButton!.templateRef\n : defaultButton;\n context: { option: selectedOption }\n \"\n ></ng-container\n ></span>\n\n <ng-container *ngFor=\"let option of options; let index = index\">\n <ng-container *ngIf=\"!option.heading; else optionHeading\">\n <gds-option *nggCoreElement [value]=\"option[useValue]\"\n ><ng-container\n *ngTemplateOutlet=\"\n customOption?.templateRef\n ? customOption!.templateRef\n : defaultOption;\n context: { option: option, index: index }\n \"\n ></ng-container\n ></gds-option>\n </ng-container>\n <ng-template #optionHeading>\n <gds-menu-heading *nggCoreElement>{{ option.label }}</gds-menu-heading>\n </ng-template>\n </ng-container>\n </gds-dropdown>\n</div>\n\n<ng-template #defaultButton let-selected=\"option\">\n <span class=\"trigger\">{{ texts?.select }}</span>\n</ng-template>\n\n<ng-template #defaultOption let-option=\"option\">\n {{ display ? option[display] : option.name }}\n</ng-template>\n", styles: [".trigger{display:block;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}\n"] }]
|
|
691
|
-
}], ctorParameters: function () {
|
|
692
|
-
return [{ type: i0.Injector, decorators: [{
|
|
693
|
-
type: Inject,
|
|
694
|
-
args: [Injector]
|
|
695
|
-
}] }, { type: i0.ChangeDetectorRef }];
|
|
696
|
-
}, propDecorators: { id: [{
|
|
697
|
-
type: Input
|
|
698
|
-
}], texts: [{
|
|
699
|
-
type: Input
|
|
700
|
-
}], loop: [{
|
|
701
|
-
type: Input
|
|
702
|
-
}], display: [{
|
|
703
|
-
type: Input
|
|
704
|
-
}], useValue: [{
|
|
705
|
-
type: Input
|
|
706
|
-
}], label: [{
|
|
707
|
-
type: Input
|
|
708
|
-
}], valid: [{
|
|
709
|
-
type: Input
|
|
710
|
-
}], invalid: [{
|
|
711
|
-
type: Input
|
|
712
|
-
}], compareWith: [{
|
|
713
|
-
type: Input
|
|
714
|
-
}], searchFilter: [{
|
|
715
|
-
type: Input
|
|
716
|
-
}], syncPopoverWidth: [{
|
|
717
|
-
type: Input
|
|
718
|
-
}], size: [{
|
|
719
|
-
type: Input
|
|
720
|
-
}], hideLabel: [{
|
|
721
|
-
type: Input
|
|
722
|
-
}], maxHeight: [{
|
|
723
|
-
type: Input
|
|
724
|
-
}], fixedPlacement: [{
|
|
725
|
-
type: Input
|
|
726
|
-
}], options: [{
|
|
727
|
-
type: Input
|
|
728
|
-
}], multiSelect: [{
|
|
729
|
-
type: Input
|
|
730
|
-
}], searchable: [{
|
|
731
|
-
type: Input
|
|
732
|
-
}], value: [{
|
|
733
|
-
type: Input
|
|
734
|
-
}], valueChange: [{
|
|
735
|
-
type: Output
|
|
736
|
-
}], touched: [{
|
|
737
|
-
type: Output
|
|
738
|
-
}], customOption: [{
|
|
739
|
-
type: ContentChild,
|
|
740
|
-
args: [NggDropdownOptionDirective]
|
|
741
|
-
}], customButton: [{
|
|
742
|
-
type: ContentChild,
|
|
743
|
-
args: [NggDropdownButtonDirective]
|
|
744
|
-
}], gdsDropdown: [{
|
|
745
|
-
type: ViewChild,
|
|
746
|
-
args: ['gdsDropdown', { static: false }]
|
|
747
|
-
}] } });
|
|
748
|
-
|
|
749
|
-
class NggDropdownModule {
|
|
750
|
-
}
|
|
751
|
-
NggDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
752
|
-
NggDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownModule, declarations: [NggDropdownComponent,
|
|
753
|
-
NggDropdownOptionDirective,
|
|
754
|
-
NggDropdownButtonDirective], imports: [CommonModule, NggCoreWrapperModule$1], exports: [NggDropdownComponent,
|
|
755
|
-
NggDropdownOptionDirective,
|
|
756
|
-
NggDropdownButtonDirective] });
|
|
757
|
-
NggDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownModule, imports: [CommonModule, NggCoreWrapperModule$1] });
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggDropdownModule, decorators: [{
|
|
759
|
-
type: NgModule,
|
|
760
|
-
args: [{
|
|
761
|
-
declarations: [
|
|
762
|
-
NggDropdownComponent,
|
|
763
|
-
NggDropdownOptionDirective,
|
|
764
|
-
NggDropdownButtonDirective,
|
|
765
|
-
],
|
|
766
|
-
imports: [CommonModule, NggCoreWrapperModule$1],
|
|
767
|
-
exports: [
|
|
768
|
-
NggDropdownComponent,
|
|
769
|
-
NggDropdownOptionDirective,
|
|
770
|
-
NggDropdownButtonDirective,
|
|
771
|
-
],
|
|
772
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
773
|
-
}]
|
|
774
|
-
}] });
|
|
775
|
-
|
|
776
|
-
class NggInPageWizardStepCardComponent {
|
|
777
|
-
constructor() {
|
|
778
|
-
this.handleNextClick = new EventEmitter();
|
|
779
|
-
this.handleEditClick = new EventEmitter();
|
|
780
|
-
this.stepText = '';
|
|
781
|
-
this.title = '';
|
|
782
|
-
this.editBtnText = '';
|
|
783
|
-
this.nextBtnText = '';
|
|
784
|
-
this.isCompleted = false;
|
|
785
|
-
this.disableNext = false;
|
|
786
|
-
this.isActive = false;
|
|
787
|
-
}
|
|
788
|
-
handleOnEditBtnClick(event) {
|
|
789
|
-
this.isActive = !this.isActive;
|
|
790
|
-
this.handleEditClick.emit(event);
|
|
791
|
-
}
|
|
792
|
-
handleOnNextBtnClick(event) {
|
|
793
|
-
this.isActive = false;
|
|
794
|
-
this.isCompleted = true;
|
|
795
|
-
this.handleNextClick.emit(event);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
NggInPageWizardStepCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardStepCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
799
|
-
NggInPageWizardStepCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggInPageWizardStepCardComponent, selector: "ngg-in-page-wizard-step-card", inputs: { stepText: "stepText", title: "title", editBtnText: "editBtnText", nextBtnText: "nextBtnText", isCompleted: "isCompleted", disableNext: "disableNext", isActive: "isActive" }, outputs: { handleNextClick: "handleNextClick", handleEditClick: "handleEditClick" }, ngImport: i0, template: "<section\n class=\"gds-in-page-wizard-step-card card\"\n data-testid=\"in-page-wizard-step-card-root\"\n [class.active]=\"!!isActive\"\n [class.completed]=\"!!isCompleted\"\n>\n <header class=\"gds-in-page-wizard-step-card__header\">\n <div class=\"gds-in-page-wizard-step-card__header__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) -->\n <path\n d=\"M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z\"\n />\n </svg>\n </div>\n <div\n class=\"gds-in-page-wizard-step-card__header__progress\"\n data-testid=\"in-page-wizard-step-card-step-text\"\n >\n {{ stepText }}\n </div>\n <div\n class=\"gds-in-page-wizard-step-card__header__title\"\n data-testid=\"in-page-wizard-step-card-title\"\n >\n <h2 class=\"h4\">{{ title }}</h2>\n </div>\n\n <div\n class=\"gds-in-page-wizard-step-card__header__edit\"\n *ngIf=\"isCompleted && !isActive\"\n >\n <button\n class=\"secondary small\"\n (click)=\"handleOnEditBtnClick($event)\"\n data-testid=\"in-page-wizard-step-card-edit-btn\"\n >\n {{ editBtnText }}\n </button>\n </div>\n </header>\n\n <div\n class=\"gds-in-page-wizard-step-card__content\"\n *ngIf=\"!!isActive || !!isCompleted\"\n data-testid=\"in-page-wizard-step-card-content\"\n >\n <ng-content></ng-content>\n </div>\n <footer class=\"gds-in-page-wizard-step-card__footer\" *ngIf=\"isActive\">\n <button\n class=\"primary\"\n [disabled]=\"disableNext\"\n (click)=\"handleOnNextBtnClick($event)\"\n data-testid=\"in-page-wizard-step-card-next-btn\"\n >\n {{ nextBtnText }}\n </button>\n </footer>\n</section>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardStepCardComponent, decorators: [{
|
|
801
|
-
type: Component,
|
|
802
|
-
args: [{ selector: 'ngg-in-page-wizard-step-card', template: "<section\n class=\"gds-in-page-wizard-step-card card\"\n data-testid=\"in-page-wizard-step-card-root\"\n [class.active]=\"!!isActive\"\n [class.completed]=\"!!isCompleted\"\n>\n <header class=\"gds-in-page-wizard-step-card__header\">\n <div class=\"gds-in-page-wizard-step-card__header__icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) -->\n <path\n d=\"M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z\"\n />\n </svg>\n </div>\n <div\n class=\"gds-in-page-wizard-step-card__header__progress\"\n data-testid=\"in-page-wizard-step-card-step-text\"\n >\n {{ stepText }}\n </div>\n <div\n class=\"gds-in-page-wizard-step-card__header__title\"\n data-testid=\"in-page-wizard-step-card-title\"\n >\n <h2 class=\"h4\">{{ title }}</h2>\n </div>\n\n <div\n class=\"gds-in-page-wizard-step-card__header__edit\"\n *ngIf=\"isCompleted && !isActive\"\n >\n <button\n class=\"secondary small\"\n (click)=\"handleOnEditBtnClick($event)\"\n data-testid=\"in-page-wizard-step-card-edit-btn\"\n >\n {{ editBtnText }}\n </button>\n </div>\n </header>\n\n <div\n class=\"gds-in-page-wizard-step-card__content\"\n *ngIf=\"!!isActive || !!isCompleted\"\n data-testid=\"in-page-wizard-step-card-content\"\n >\n <ng-content></ng-content>\n </div>\n <footer class=\"gds-in-page-wizard-step-card__footer\" *ngIf=\"isActive\">\n <button\n class=\"primary\"\n [disabled]=\"disableNext\"\n (click)=\"handleOnNextBtnClick($event)\"\n data-testid=\"in-page-wizard-step-card-next-btn\"\n >\n {{ nextBtnText }}\n </button>\n </footer>\n</section>\n" }]
|
|
803
|
-
}], propDecorators: { handleNextClick: [{
|
|
804
|
-
type: Output
|
|
805
|
-
}], handleEditClick: [{
|
|
806
|
-
type: Output
|
|
807
|
-
}], stepText: [{
|
|
808
|
-
type: Input
|
|
809
|
-
}], title: [{
|
|
810
|
-
type: Input
|
|
811
|
-
}], editBtnText: [{
|
|
812
|
-
type: Input
|
|
813
|
-
}], nextBtnText: [{
|
|
814
|
-
type: Input
|
|
815
|
-
}], isCompleted: [{
|
|
816
|
-
type: Input
|
|
817
|
-
}], disableNext: [{
|
|
818
|
-
type: Input
|
|
819
|
-
}], isActive: [{
|
|
820
|
-
type: Input
|
|
821
|
-
}] } });
|
|
822
|
-
|
|
823
|
-
class NggInPageWizardModule {
|
|
824
|
-
}
|
|
825
|
-
NggInPageWizardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
826
|
-
NggInPageWizardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardModule, declarations: [NggInPageWizardStepCardComponent], imports: [CommonModule], exports: [NggInPageWizardStepCardComponent] });
|
|
827
|
-
NggInPageWizardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardModule, imports: [CommonModule] });
|
|
828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggInPageWizardModule, decorators: [{
|
|
829
|
-
type: NgModule,
|
|
830
|
-
args: [{
|
|
831
|
-
declarations: [NggInPageWizardStepCardComponent],
|
|
832
|
-
imports: [CommonModule],
|
|
833
|
-
exports: [NggInPageWizardStepCardComponent],
|
|
834
|
-
}]
|
|
835
|
-
}] });
|
|
836
|
-
|
|
837
|
-
class NggModalHeaderDirective {
|
|
838
|
-
constructor(viewContainerRef) {
|
|
839
|
-
this.viewContainerRef = viewContainerRef;
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
NggModalHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalHeaderDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
843
|
-
NggModalHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggModalHeaderDirective, selector: "[nggModalHeader]", ngImport: i0 });
|
|
844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalHeaderDirective, decorators: [{
|
|
845
|
-
type: Directive,
|
|
846
|
-
args: [{
|
|
847
|
-
selector: '[nggModalHeader]',
|
|
848
|
-
}]
|
|
849
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
850
|
-
|
|
851
|
-
class NggModalFooterDirective {
|
|
852
|
-
constructor(viewContainerRef) {
|
|
853
|
-
this.viewContainerRef = viewContainerRef;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
NggModalFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalFooterDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
857
|
-
NggModalFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggModalFooterDirective, selector: "[nggModalFooter]", ngImport: i0 });
|
|
858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalFooterDirective, decorators: [{
|
|
859
|
-
type: Directive,
|
|
860
|
-
args: [{
|
|
861
|
-
selector: '[nggModalFooter]',
|
|
862
|
-
}]
|
|
863
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
864
|
-
|
|
865
|
-
class NggModalComponent {
|
|
866
|
-
constructor(ref, configurableFocusTrapFactory) {
|
|
867
|
-
this.ref = ref;
|
|
868
|
-
this.configurableFocusTrapFactory = configurableFocusTrapFactory;
|
|
869
|
-
this.isOpenChange = new EventEmitter();
|
|
870
|
-
this.closed = new EventEmitter();
|
|
871
|
-
this.confirm = new EventEmitter();
|
|
872
|
-
this.dismiss = new EventEmitter();
|
|
873
|
-
this.configurableFocusTrap = this.configurableFocusTrapFactory.create(this.ref.nativeElement);
|
|
874
|
-
}
|
|
875
|
-
get trapFocus() {
|
|
876
|
-
return this._trapFocus;
|
|
877
|
-
}
|
|
878
|
-
set trapFocus(value) {
|
|
879
|
-
this._trapFocus = value;
|
|
880
|
-
if (value) {
|
|
881
|
-
if (this._isOpen) {
|
|
882
|
-
this.enableFocusTrap();
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
else {
|
|
886
|
-
this.disableFocusTrap();
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
get isOpen() {
|
|
890
|
-
return this._isOpen;
|
|
891
|
-
}
|
|
892
|
-
set isOpen(value) {
|
|
893
|
-
this._isOpen = value;
|
|
894
|
-
if (value) {
|
|
895
|
-
if (this.trapFocus) {
|
|
896
|
-
this.enableFocusTrap();
|
|
897
|
-
}
|
|
898
|
-
disableBodyScroll(this.ref.nativeElement, {
|
|
899
|
-
allowTouchMove: (el) => {
|
|
900
|
-
// Allow touchmove for elements inside modal, its required for scroll to work on iOS devices
|
|
901
|
-
return this.ref.nativeElement.contains(el);
|
|
902
|
-
},
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
else {
|
|
906
|
-
this.disableFocusTrap();
|
|
907
|
-
enableBodyScroll(this.ref.nativeElement);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
get open() {
|
|
911
|
-
return this.isOpen;
|
|
912
|
-
}
|
|
913
|
-
ngOnInit() {
|
|
914
|
-
if (this._isOpen && this.trapFocus)
|
|
915
|
-
this.enableFocusTrap();
|
|
916
|
-
else
|
|
917
|
-
this.disableFocusTrap();
|
|
918
|
-
}
|
|
919
|
-
handleCloseClick(event) {
|
|
920
|
-
this.closeModal(event);
|
|
921
|
-
}
|
|
922
|
-
handleBackdropClick(event) {
|
|
923
|
-
var _a;
|
|
924
|
-
if (event.target == ((_a = this.backdropRef) === null || _a === void 0 ? void 0 : _a.nativeElement))
|
|
925
|
-
this.closeModal(event);
|
|
926
|
-
}
|
|
927
|
-
handleDismiss(event) {
|
|
928
|
-
this.dismiss.emit(event);
|
|
929
|
-
}
|
|
930
|
-
handleConfirm(event) {
|
|
931
|
-
this.confirm.emit(event);
|
|
932
|
-
}
|
|
933
|
-
closeModal(event) {
|
|
934
|
-
if (this.closed.observers.length > 0) {
|
|
935
|
-
this.closed.emit(event);
|
|
936
|
-
}
|
|
937
|
-
else {
|
|
938
|
-
this.isOpen = false;
|
|
939
|
-
this.isOpenChange.emit(this.isOpen);
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
enableFocusTrap() {
|
|
943
|
-
if (this.configurableFocusTrap) {
|
|
944
|
-
this.configurableFocusTrap.enabled = true;
|
|
945
|
-
this.configurableFocusTrap.focusInitialElementWhenReady();
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
disableFocusTrap() {
|
|
949
|
-
if (this.configurableFocusTrap) {
|
|
950
|
-
this.configurableFocusTrap.enabled = false;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
ngOnDestroy() {
|
|
954
|
-
var _a;
|
|
955
|
-
(_a = this.configurableFocusTrap) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
956
|
-
enableBodyScroll(this.ref.nativeElement);
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
NggModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
960
|
-
NggModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalComponent, selector: "ngg-modal", inputs: { modalType: "modalType", header: "header", confirmLabel: "confirmLabel", dismissLabel: "dismissLabel", size: "size", hideHeader: "hideHeader", hideFooter: "hideFooter", trapFocus: "trapFocus", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange", closed: "closed", confirm: "confirm", dismiss: "dismiss" }, host: { properties: { "class.open": "this.open" } }, queries: [{ propertyName: "modalHeaderContent", first: true, predicate: NggModalHeaderDirective, descendants: true }, { propertyName: "modalFooterContent", first: true, predicate: NggModalFooterDirective, descendants: true }], viewQueries: [{ propertyName: "backdropRef", first: true, predicate: ["backdrop"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </aside>\n <main\n data-testid=\"modal\"\n *ngSwitchCase=\"'takeover'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </main>\n <section\n data-testid=\"modal\"\n *ngSwitchDefault\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </section>\n <ng-template #contentTemplate>\n <ng-container *ngIf=\"!hideHeader\">\n <header\n *ngIf=\"!modalHeaderContent; else headerContentTemplate\"\n ngg-modal-header\n data-testid=\"modal-header\"\n [header]=\"header\"\n (closed)=\"this.handleCloseClick($event)\"\n ></header>\n </ng-container>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"bodyContentTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"!hideFooter && (dismissLabel || confirmLabel)\">\n <footer\n *ngIf=\"!modalFooterContent; else footerContentTemplate\"\n ngg-modal-footer\n data-testid=\"modal-footer\"\n [dismissLabel]=\"dismissLabel\"\n [confirmLabel]=\"confirmLabel\"\n (dismiss)=\"this.handleDismiss($event)\"\n (confirm)=\"this.handleConfirm($event)\"\n ></footer>\n </ng-container>\n </ng-template>\n <ng-template #headerContentTemplate>\n <header data-testid=\"modal-header\">\n <ng-content select=\"[nggModalHeader]\"></ng-content>\n </header>\n </ng-template>\n <ng-template #bodyContentTemplate>\n <ng-content></ng-content>\n </ng-template>\n <ng-template #footerContentTemplate>\n <footer data-testid=\"modal-footer\">\n <ng-content select=\"[nggModalFooter]\"></ng-content>\n </footer>\n </ng-template>\n <div\n #backdrop\n data-testid=\"modal-backdrop\"\n class=\"backdrop entered\"\n (click)=\"this.handleBackdropClick($event)\"\n [attr.aria-hidden]=\"true\"\n ></div>\n </div>\n</ng-container>\n", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalHeaderComponent; }), selector: "[ngg-modal-header]", inputs: ["header"], outputs: ["closed"] }, { kind: "component", type: i0.forwardRef(function () { return NggModalBodyComponent; }), selector: "[ngg-modal-body]" }, { kind: "component", type: i0.forwardRef(function () { return NggModalFooterComponent; }), selector: "[ngg-modal-footer]", inputs: ["dismissLabel", "confirmLabel"], outputs: ["dismiss", "confirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalComponent, decorators: [{
|
|
962
|
-
type: Component,
|
|
963
|
-
args: [{ selector: 'ngg-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"isOpen\" [ngSwitch]=\"modalType\">\n <div class=\"gds-dialog-wrapper\">\n <aside\n data-testid=\"modal\"\n *ngSwitchCase=\"'slideout'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </aside>\n <main\n data-testid=\"modal\"\n *ngSwitchCase=\"'takeover'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </main>\n <section\n data-testid=\"modal\"\n *ngSwitchDefault\n role=\"dialog\"\n aria-modal=\"true\"\n [class.small]=\"size === 'sm'\"\n [class.medium]=\"size === 'md'\"\n [class.large]=\"size === 'lg'\"\n [class.entered]=\"isOpen\"\n >\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </section>\n <ng-template #contentTemplate>\n <ng-container *ngIf=\"!hideHeader\">\n <header\n *ngIf=\"!modalHeaderContent; else headerContentTemplate\"\n ngg-modal-header\n data-testid=\"modal-header\"\n [header]=\"header\"\n (closed)=\"this.handleCloseClick($event)\"\n ></header>\n </ng-container>\n <div ngg-modal-body data-testid=\"modal-body\" class=\"body\">\n <ng-container *ngTemplateOutlet=\"bodyContentTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"!hideFooter && (dismissLabel || confirmLabel)\">\n <footer\n *ngIf=\"!modalFooterContent; else footerContentTemplate\"\n ngg-modal-footer\n data-testid=\"modal-footer\"\n [dismissLabel]=\"dismissLabel\"\n [confirmLabel]=\"confirmLabel\"\n (dismiss)=\"this.handleDismiss($event)\"\n (confirm)=\"this.handleConfirm($event)\"\n ></footer>\n </ng-container>\n </ng-template>\n <ng-template #headerContentTemplate>\n <header data-testid=\"modal-header\">\n <ng-content select=\"[nggModalHeader]\"></ng-content>\n </header>\n </ng-template>\n <ng-template #bodyContentTemplate>\n <ng-content></ng-content>\n </ng-template>\n <ng-template #footerContentTemplate>\n <footer data-testid=\"modal-footer\">\n <ng-content select=\"[nggModalFooter]\"></ng-content>\n </footer>\n </ng-template>\n <div\n #backdrop\n data-testid=\"modal-backdrop\"\n class=\"backdrop entered\"\n (click)=\"this.handleBackdropClick($event)\"\n [attr.aria-hidden]=\"true\"\n ></div>\n </div>\n</ng-container>\n", styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
|
|
964
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }]; }, propDecorators: { modalType: [{
|
|
965
|
-
type: Input
|
|
966
|
-
}], header: [{
|
|
967
|
-
type: Input
|
|
968
|
-
}], confirmLabel: [{
|
|
969
|
-
type: Input
|
|
970
|
-
}], dismissLabel: [{
|
|
971
|
-
type: Input
|
|
972
|
-
}], size: [{
|
|
973
|
-
type: Input
|
|
974
|
-
}], hideHeader: [{
|
|
975
|
-
type: Input
|
|
976
|
-
}], hideFooter: [{
|
|
977
|
-
type: Input
|
|
978
|
-
}], trapFocus: [{
|
|
979
|
-
type: Input
|
|
980
|
-
}], isOpen: [{
|
|
981
|
-
type: Input
|
|
982
|
-
}], isOpenChange: [{
|
|
983
|
-
type: Output
|
|
984
|
-
}], closed: [{
|
|
985
|
-
type: Output
|
|
986
|
-
}], confirm: [{
|
|
987
|
-
type: Output
|
|
988
|
-
}], dismiss: [{
|
|
989
|
-
type: Output
|
|
990
|
-
}], open: [{
|
|
991
|
-
type: HostBinding,
|
|
992
|
-
args: ['class.open']
|
|
993
|
-
}], backdropRef: [{
|
|
994
|
-
type: ViewChild,
|
|
995
|
-
args: ['backdrop']
|
|
996
|
-
}], modalHeaderContent: [{
|
|
997
|
-
type: ContentChild,
|
|
998
|
-
args: [NggModalHeaderDirective]
|
|
999
|
-
}], modalFooterContent: [{
|
|
1000
|
-
type: ContentChild,
|
|
1001
|
-
args: [NggModalFooterDirective]
|
|
1002
|
-
}] } });
|
|
1003
|
-
class NggModalHeaderComponent {
|
|
1004
|
-
constructor() {
|
|
1005
|
-
this.closed = new EventEmitter();
|
|
1006
|
-
}
|
|
1007
|
-
handleClose(event) {
|
|
1008
|
-
this.closed.emit(event);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
NggModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1012
|
-
NggModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalHeaderComponent, selector: "[ngg-modal-header]", inputs: { header: "header" }, outputs: { closed: "closed" }, ngImport: i0, template: `
|
|
1013
|
-
<h3 data-testid="modal-header-text">{{ header }}</h3>
|
|
1014
|
-
<button
|
|
1015
|
-
data-testid="modal-close-button"
|
|
1016
|
-
class="close"
|
|
1017
|
-
(click)="this.handleClose($event)"
|
|
1018
|
-
>
|
|
1019
|
-
<span className="sr-only">Close</span>
|
|
1020
|
-
<i></i>
|
|
1021
|
-
</button>
|
|
1022
|
-
`, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] });
|
|
1023
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalHeaderComponent, decorators: [{
|
|
1024
|
-
type: Component,
|
|
1025
|
-
args: [{ selector: '[ngg-modal-header]', template: `
|
|
1026
|
-
<h3 data-testid="modal-header-text">{{ header }}</h3>
|
|
1027
|
-
<button
|
|
1028
|
-
data-testid="modal-close-button"
|
|
1029
|
-
class="close"
|
|
1030
|
-
(click)="this.handleClose($event)"
|
|
1031
|
-
>
|
|
1032
|
-
<span className="sr-only">Close</span>
|
|
1033
|
-
<i></i>
|
|
1034
|
-
</button>
|
|
1035
|
-
`, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
|
|
1036
|
-
}], propDecorators: { header: [{
|
|
1037
|
-
type: Input
|
|
1038
|
-
}], closed: [{
|
|
1039
|
-
type: Output
|
|
1040
|
-
}] } });
|
|
1041
|
-
class NggModalBodyComponent {
|
|
1042
|
-
}
|
|
1043
|
-
NggModalBodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1044
|
-
NggModalBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalBodyComponent, selector: "[ngg-modal-body]", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] });
|
|
1045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalBodyComponent, decorators: [{
|
|
1046
|
-
type: Component,
|
|
1047
|
-
args: [{ selector: '[ngg-modal-body]', template: `<ng-content></ng-content>`, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
|
|
1048
|
-
}] });
|
|
1049
|
-
class NggModalFooterComponent {
|
|
1050
|
-
constructor() {
|
|
1051
|
-
this.dismiss = new EventEmitter();
|
|
1052
|
-
this.confirm = new EventEmitter();
|
|
1053
|
-
}
|
|
1054
|
-
handleDismiss(event) {
|
|
1055
|
-
this.dismiss.emit(event);
|
|
1056
|
-
}
|
|
1057
|
-
handleConfirm(event) {
|
|
1058
|
-
this.confirm.emit(event);
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
NggModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1062
|
-
NggModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggModalFooterComponent, selector: "[ngg-modal-footer]", inputs: { dismissLabel: "dismissLabel", confirmLabel: "confirmLabel" }, outputs: { dismiss: "dismiss", confirm: "confirm" }, ngImport: i0, template: `
|
|
1063
|
-
<button
|
|
1064
|
-
data-testid="modal-dismiss-button"
|
|
1065
|
-
*ngIf="dismissLabel"
|
|
1066
|
-
class="secondary"
|
|
1067
|
-
(click)="this.handleDismiss($event)"
|
|
1068
|
-
>
|
|
1069
|
-
{{ dismissLabel }}
|
|
1070
|
-
</button>
|
|
1071
|
-
<button
|
|
1072
|
-
data-testid="modal-confirm-button"
|
|
1073
|
-
*ngIf="confirmLabel"
|
|
1074
|
-
class="primary"
|
|
1075
|
-
(click)="this.handleConfirm($event)"
|
|
1076
|
-
>
|
|
1077
|
-
{{ confirmLabel }}
|
|
1078
|
-
</button>
|
|
1079
|
-
`, isInline: true, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalFooterComponent, decorators: [{
|
|
1081
|
-
type: Component,
|
|
1082
|
-
args: [{ selector: '[ngg-modal-footer]', template: `
|
|
1083
|
-
<button
|
|
1084
|
-
data-testid="modal-dismiss-button"
|
|
1085
|
-
*ngIf="dismissLabel"
|
|
1086
|
-
class="secondary"
|
|
1087
|
-
(click)="this.handleDismiss($event)"
|
|
1088
|
-
>
|
|
1089
|
-
{{ dismissLabel }}
|
|
1090
|
-
</button>
|
|
1091
|
-
<button
|
|
1092
|
-
data-testid="modal-confirm-button"
|
|
1093
|
-
*ngIf="confirmLabel"
|
|
1094
|
-
class="primary"
|
|
1095
|
-
(click)="this.handleConfirm($event)"
|
|
1096
|
-
>
|
|
1097
|
-
{{ confirmLabel }}
|
|
1098
|
-
</button>
|
|
1099
|
-
`, styles: [":host.open{height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:var(--sg-z-index-modal)}:host.open>section[role=dialog]{left:50%;top:50%;transform:translate(-50%,-50%)}.body::-webkit-scrollbar{background-color:#f8f8f8;height:10px;width:10px}.body::-webkit-scrollbar-thumb{background-color:#cecece}.body::-webkit-scrollbar-track{background-color:#f8f8f8;box-shadow:inset 0 0 10px #00000040}\n"] }]
|
|
1100
|
-
}], propDecorators: { dismissLabel: [{
|
|
1101
|
-
type: Input
|
|
1102
|
-
}], confirmLabel: [{
|
|
1103
|
-
type: Input
|
|
1104
|
-
}], dismiss: [{
|
|
1105
|
-
type: Output
|
|
1106
|
-
}], confirm: [{
|
|
1107
|
-
type: Output
|
|
1108
|
-
}] } });
|
|
1109
|
-
|
|
1110
|
-
const DECLARATIONS = [
|
|
1111
|
-
NggModalComponent,
|
|
1112
|
-
NggModalHeaderComponent,
|
|
1113
|
-
NggModalBodyComponent,
|
|
1114
|
-
NggModalFooterComponent,
|
|
1115
|
-
NggModalHeaderDirective,
|
|
1116
|
-
NggModalFooterDirective,
|
|
1117
|
-
];
|
|
1118
|
-
const EXPORTS = [
|
|
1119
|
-
NggModalComponent,
|
|
1120
|
-
NggModalHeaderDirective,
|
|
1121
|
-
NggModalFooterDirective,
|
|
1122
|
-
];
|
|
1123
|
-
class NggModalModule {
|
|
1124
|
-
}
|
|
1125
|
-
NggModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1126
|
-
NggModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggModalModule, declarations: [NggModalComponent,
|
|
1127
|
-
NggModalHeaderComponent,
|
|
1128
|
-
NggModalBodyComponent,
|
|
1129
|
-
NggModalFooterComponent,
|
|
1130
|
-
NggModalHeaderDirective,
|
|
1131
|
-
NggModalFooterDirective], imports: [A11yModule, CommonModule], exports: [NggModalComponent,
|
|
1132
|
-
NggModalHeaderDirective,
|
|
1133
|
-
NggModalFooterDirective] });
|
|
1134
|
-
NggModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalModule, imports: [A11yModule, CommonModule] });
|
|
1135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModalModule, decorators: [{
|
|
1136
|
-
type: NgModule,
|
|
1137
|
-
args: [{
|
|
1138
|
-
imports: [A11yModule, CommonModule],
|
|
1139
|
-
exports: EXPORTS,
|
|
1140
|
-
declarations: DECLARATIONS,
|
|
1141
|
-
}]
|
|
1142
|
-
}] });
|
|
1143
|
-
|
|
1144
|
-
class NggProgressCircleComponent {
|
|
1145
|
-
constructor() {
|
|
1146
|
-
this._startValue = '0deg';
|
|
1147
|
-
this._endValue = '0deg';
|
|
1148
|
-
/** id of the progress circle */
|
|
1149
|
-
this.id = `${randomId()}-progress-circle`;
|
|
1150
|
-
/** theme of the progress circle */
|
|
1151
|
-
this.theme = 'warning';
|
|
1152
|
-
}
|
|
1153
|
-
/** progress circle value in percentage */
|
|
1154
|
-
set value(val) {
|
|
1155
|
-
const degrees = `${calculateDegrees(val)}deg`;
|
|
1156
|
-
this._endValue = degrees;
|
|
1157
|
-
if (this.theme === 'disabled') {
|
|
1158
|
-
this._startValue = degrees;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
NggProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1163
|
-
NggProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggProgressCircleComponent, selector: "ngg-progress-circle", inputs: { id: "id", theme: "theme", value: "value" }, host: { properties: { "style.--start-value": "this._startValue", "style.--end-value": "this._endValue" } }, ngImport: i0, template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleComponent, decorators: [{
|
|
1165
|
-
type: Component,
|
|
1166
|
-
args: [{ selector: 'ngg-progress-circle', template: "<div\n class=\"gds-progress-circle\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-label]=\"id\"\n>\n <div class=\"ring full-ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"ring\">\n <div class=\"ring-progress\" [ngClass]=\"theme\"></div>\n </div>\n <div class=\"inner-circle\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
|
|
1167
|
-
}], propDecorators: { _startValue: [{
|
|
1168
|
-
type: HostBinding,
|
|
1169
|
-
args: ['style.--start-value']
|
|
1170
|
-
}], _endValue: [{
|
|
1171
|
-
type: HostBinding,
|
|
1172
|
-
args: ['style.--end-value']
|
|
1173
|
-
}], id: [{
|
|
1174
|
-
type: Input
|
|
1175
|
-
}], theme: [{
|
|
1176
|
-
type: Input
|
|
1177
|
-
}], value: [{
|
|
1178
|
-
type: Input
|
|
1179
|
-
}] } });
|
|
1180
|
-
|
|
1181
|
-
class NggProgressCircleModule {
|
|
1182
|
-
}
|
|
1183
|
-
NggProgressCircleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1184
|
-
NggProgressCircleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, declarations: [NggProgressCircleComponent], imports: [CommonModule], exports: [NggProgressCircleComponent] });
|
|
1185
|
-
NggProgressCircleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, imports: [CommonModule] });
|
|
1186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggProgressCircleModule, decorators: [{
|
|
1187
|
-
type: NgModule,
|
|
1188
|
-
args: [{
|
|
1189
|
-
declarations: [NggProgressCircleComponent],
|
|
1190
|
-
imports: [CommonModule],
|
|
1191
|
-
exports: [NggProgressCircleComponent],
|
|
1192
|
-
}]
|
|
1193
|
-
}] });
|
|
1194
|
-
|
|
1195
|
-
class NggSegmentedControlComponent {
|
|
1196
|
-
}
|
|
1197
|
-
NggSegmentedControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1198
|
-
NggSegmentedControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSegmentedControlComponent, selector: "ngg-segmented-control", inputs: { $controls: "$controls" }, ngImport: i0, template: `
|
|
1199
|
-
<div class="group">
|
|
1200
|
-
<a
|
|
1201
|
-
*ngFor="let control of $controls | async"
|
|
1202
|
-
[routerLink]="control.url"
|
|
1203
|
-
routerLinkActive="active"
|
|
1204
|
-
class="button"
|
|
1205
|
-
>{{ control.text }}</a
|
|
1206
|
-
>
|
|
1207
|
-
</div>
|
|
1208
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlComponent, decorators: [{
|
|
1210
|
-
type: Component,
|
|
1211
|
-
args: [{ selector: 'ngg-segmented-control', template: `
|
|
1212
|
-
<div class="group">
|
|
1213
|
-
<a
|
|
1214
|
-
*ngFor="let control of $controls | async"
|
|
1215
|
-
[routerLink]="control.url"
|
|
1216
|
-
routerLinkActive="active"
|
|
1217
|
-
class="button"
|
|
1218
|
-
>{{ control.text }}</a
|
|
1219
|
-
>
|
|
1220
|
-
</div>
|
|
1221
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
1222
|
-
}], propDecorators: { $controls: [{
|
|
1223
|
-
type: Input
|
|
1224
|
-
}] } });
|
|
1225
|
-
|
|
1226
|
-
class NggSegmentedControlModule {
|
|
1227
|
-
}
|
|
1228
|
-
NggSegmentedControlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1229
|
-
NggSegmentedControlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlModule, declarations: [NggSegmentedControlComponent], imports: [RouterModule, CommonModule], exports: [NggSegmentedControlComponent] });
|
|
1230
|
-
NggSegmentedControlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlModule, imports: [RouterModule, CommonModule] });
|
|
1231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSegmentedControlModule, decorators: [{
|
|
1232
|
-
type: NgModule,
|
|
1233
|
-
args: [{
|
|
1234
|
-
declarations: [NggSegmentedControlComponent],
|
|
1235
|
-
imports: [RouterModule, CommonModule],
|
|
1236
|
-
exports: [NggSegmentedControlComponent],
|
|
1237
|
-
}]
|
|
1238
|
-
}] });
|
|
1239
|
-
|
|
1240
|
-
const ON_SCROLL_TOKEN = new InjectionToken('ON_SCROLL_TOKEN');
|
|
1241
|
-
class NggOnScrollDirective {
|
|
1242
|
-
constructor(elementRef) {
|
|
1243
|
-
this.elementRef = elementRef;
|
|
1244
|
-
this.onScroll$ = new Subject();
|
|
1245
|
-
this.destroy$ = new Subject();
|
|
1246
|
-
}
|
|
1247
|
-
ngAfterViewInit() {
|
|
1248
|
-
var _a;
|
|
1249
|
-
if (this.elementRef) {
|
|
1250
|
-
fromEvent((_a = this.elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement, 'scroll')
|
|
1251
|
-
.pipe(takeUntil(this.destroy$), throttle(() => interval(30)))
|
|
1252
|
-
.subscribe(() => {
|
|
1253
|
-
this.onScroll$.next();
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
ngOnDestroy() {
|
|
1258
|
-
this.destroy$.next(null);
|
|
1259
|
-
this.destroy$.complete();
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
NggOnScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggOnScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1263
|
-
NggOnScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggOnScrollDirective, selector: "[nggOnScroll]", providers: [
|
|
1264
|
-
{
|
|
1265
|
-
provide: ON_SCROLL_TOKEN,
|
|
1266
|
-
useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
|
|
1267
|
-
deps: [NggOnScrollDirective],
|
|
1268
|
-
},
|
|
1269
|
-
], ngImport: i0 });
|
|
1270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggOnScrollDirective, decorators: [{
|
|
1271
|
-
type: Directive,
|
|
1272
|
-
args: [{
|
|
1273
|
-
selector: '[nggOnScroll]',
|
|
1274
|
-
providers: [
|
|
1275
|
-
{
|
|
1276
|
-
provide: ON_SCROLL_TOKEN,
|
|
1277
|
-
useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
|
|
1278
|
-
deps: [NggOnScrollDirective],
|
|
1279
|
-
},
|
|
1280
|
-
],
|
|
1281
|
-
}]
|
|
1282
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
1283
|
-
|
|
1284
|
-
class NggSharedModule {
|
|
1285
|
-
}
|
|
1286
|
-
NggSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1287
|
-
NggSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, declarations: [NggOnScrollDirective], imports: [CommonModule], exports: [NggOnScrollDirective] });
|
|
1288
|
-
NggSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, imports: [CommonModule] });
|
|
1289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSharedModule, decorators: [{
|
|
1290
|
-
type: NgModule,
|
|
1291
|
-
args: [{
|
|
1292
|
-
declarations: [NggOnScrollDirective],
|
|
1293
|
-
imports: [CommonModule],
|
|
1294
|
-
exports: [NggOnScrollDirective],
|
|
1295
|
-
}]
|
|
1296
|
-
}] });
|
|
1297
|
-
|
|
1298
|
-
class NggSliderComponent {
|
|
1299
|
-
constructor() {
|
|
1300
|
-
this.name = `${randomId()}-slider`;
|
|
1301
|
-
this.min = 0;
|
|
1302
|
-
this.max = 100;
|
|
1303
|
-
this.step = 1;
|
|
1304
|
-
this.label = '';
|
|
1305
|
-
this.instruction = '';
|
|
1306
|
-
this.placeholder = '';
|
|
1307
|
-
this.errorMessage = '';
|
|
1308
|
-
this.hasTextbox = false;
|
|
1309
|
-
this.unitLabel = 'kr';
|
|
1310
|
-
this.disabled = false;
|
|
1311
|
-
this.value = 0;
|
|
1312
|
-
this.sliderChange = new EventEmitter();
|
|
1313
|
-
this.sliderTouch = new EventEmitter();
|
|
1314
|
-
this.style = {};
|
|
1315
|
-
}
|
|
1316
|
-
ngOnInit() {
|
|
1317
|
-
this.setTrackBackground();
|
|
1318
|
-
}
|
|
1319
|
-
ngOnChanges(changes) {
|
|
1320
|
-
if (['min', 'max', 'value'].some((x) => Object.prototype.hasOwnProperty.call(changes, x))) {
|
|
1321
|
-
this.setTrackBackground();
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
onBlur() {
|
|
1325
|
-
this.sliderTouch.emit(true);
|
|
1326
|
-
this.onTouchedFn && this.onTouchedFn();
|
|
1327
|
-
}
|
|
1328
|
-
handleChange() {
|
|
1329
|
-
var _a;
|
|
1330
|
-
this.value = (_a = this.value) !== null && _a !== void 0 ? _a : 0;
|
|
1331
|
-
this.setTrackBackground();
|
|
1332
|
-
this.sliderChange.emit(this.value);
|
|
1333
|
-
this.onChangeFn && this.onChangeFn(this.value);
|
|
1334
|
-
}
|
|
1335
|
-
setTrackBackground() {
|
|
1336
|
-
if (this.disabled) {
|
|
1337
|
-
this.style.background = sliderColors.disabled;
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
const percent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
1341
|
-
this.style.background = getSliderTrackBackground(percent);
|
|
1342
|
-
}
|
|
1343
|
-
/** control value accessor functions */
|
|
1344
|
-
writeValue(val) {
|
|
1345
|
-
if (this.value !== val) {
|
|
1346
|
-
this.value = val !== null && val !== void 0 ? val : 0;
|
|
1347
|
-
this.handleChange();
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
registerOnChange(fn) {
|
|
1351
|
-
this.onChangeFn = fn;
|
|
1352
|
-
}
|
|
1353
|
-
registerOnTouched(fn) {
|
|
1354
|
-
this.onTouchedFn = fn;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
NggSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1358
|
-
NggSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSliderComponent, selector: "ngg-slider", inputs: { name: "name", min: "min", max: "max", step: "step", label: "label", instruction: "instruction", placeholder: "placeholder", errorMessage: "errorMessage", hasTextbox: "hasTextbox", unitLabel: "unitLabel", disabled: "disabled", value: "value", enterkeyhint: "enterkeyhint" }, outputs: { sliderChange: "sliderChange", sliderTouch: "sliderTouch" }, providers: [
|
|
1359
|
-
{
|
|
1360
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1361
|
-
useExisting: NggSliderComponent,
|
|
1362
|
-
multi: true,
|
|
1363
|
-
},
|
|
1364
|
-
], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\" [attr.id]=\"name + '-label'\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <ng-container *ngIf=\"hasTextbox\">\n <ng-container *ngIf=\"!!unitLabel\">\n <div class=\"group group-border group-focus\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n <span class=\"form-text\">{{ unitLabel }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!unitLabel\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n\n<ng-template #inputField>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-labelledby]=\"name + '-label'\"\n [attr.enterkeyhint]=\"enterkeyhint\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderComponent, decorators: [{
|
|
1366
|
-
type: Component,
|
|
1367
|
-
args: [{ selector: 'ngg-slider', providers: [
|
|
1368
|
-
{
|
|
1369
|
-
provide: NG_VALUE_ACCESSOR,
|
|
1370
|
-
useExisting: NggSliderComponent,
|
|
1371
|
-
multi: true,
|
|
1372
|
-
},
|
|
1373
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\" [attr.id]=\"name + '-label'\">{{ label }}</label>\n <p *ngIf=\"!!instruction\">{{ instruction }}</p>\n </div>\n <ng-container *ngIf=\"hasTextbox\">\n <ng-container *ngIf=\"!!unitLabel\">\n <div class=\"group group-border group-focus\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n <span class=\"form-text\">{{ unitLabel }}</span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!unitLabel\">\n <ng-container *ngTemplateOutlet=\"inputField\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<input\n type=\"range\"\n [attr.id]=\"name\"\n [attr.name]=\"name\"\n [attr.min]=\"min\"\n [attr.max]=\"max\"\n [attr.step]=\"step\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"value\"\n [ngStyle]=\"style\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n/>\n\n<p *ngIf=\"!!errorMessage\" class=\"gds-slider-error-info\">\n {{ errorMessage }}\n</p>\n\n<ng-template #inputField>\n <input\n type=\"text\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-labelledby]=\"name + '-label'\"\n [attr.enterkeyhint]=\"enterkeyhint\"\n [disabled]=\"disabled\"\n (blur)=\"onBlur()\"\n (input)=\"handleChange()\"\n />\n</ng-template>\n" }]
|
|
1374
|
-
}], propDecorators: { name: [{
|
|
1375
|
-
type: Input
|
|
1376
|
-
}], min: [{
|
|
1377
|
-
type: Input
|
|
1378
|
-
}], max: [{
|
|
1379
|
-
type: Input
|
|
1380
|
-
}], step: [{
|
|
1381
|
-
type: Input
|
|
1382
|
-
}], label: [{
|
|
1383
|
-
type: Input
|
|
1384
|
-
}], instruction: [{
|
|
1385
|
-
type: Input
|
|
1386
|
-
}], placeholder: [{
|
|
1387
|
-
type: Input
|
|
1388
|
-
}], errorMessage: [{
|
|
1389
|
-
type: Input
|
|
1390
|
-
}], hasTextbox: [{
|
|
1391
|
-
type: Input
|
|
1392
|
-
}], unitLabel: [{
|
|
1393
|
-
type: Input
|
|
1394
|
-
}], disabled: [{
|
|
1395
|
-
type: Input
|
|
1396
|
-
}], value: [{
|
|
1397
|
-
type: Input
|
|
1398
|
-
}], enterkeyhint: [{
|
|
1399
|
-
type: Input
|
|
1400
|
-
}], sliderChange: [{
|
|
1401
|
-
type: Output
|
|
1402
|
-
}], sliderTouch: [{
|
|
1403
|
-
type: Output
|
|
1404
|
-
}] } });
|
|
1405
|
-
|
|
1406
|
-
class NggSliderModule {
|
|
1407
|
-
}
|
|
1408
|
-
NggSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1409
|
-
NggSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, declarations: [NggSliderComponent], imports: [CommonModule, FormsModule], exports: [NggSliderComponent] });
|
|
1410
|
-
NggSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, imports: [CommonModule, FormsModule] });
|
|
1411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSliderModule, decorators: [{
|
|
1412
|
-
type: NgModule,
|
|
1413
|
-
args: [{
|
|
1414
|
-
imports: [CommonModule, FormsModule],
|
|
1415
|
-
exports: [NggSliderComponent],
|
|
1416
|
-
declarations: [NggSliderComponent],
|
|
1417
|
-
}]
|
|
1418
|
-
}] });
|
|
1419
|
-
|
|
1420
|
-
class NggSortableListComponent {
|
|
1421
|
-
constructor() {
|
|
1422
|
-
this.groups = [];
|
|
1423
|
-
this.shouldDisplayCheckboxes = false;
|
|
1424
|
-
this.isReadOnly = false;
|
|
1425
|
-
this.isDraggable = true;
|
|
1426
|
-
this.description = '';
|
|
1427
|
-
this.suffixTemplate = null;
|
|
1428
|
-
this.itemSelectionChanged = new EventEmitter();
|
|
1429
|
-
this.itemOrderChanged = new EventEmitter();
|
|
1430
|
-
this.focusedIndex = { 0: 0 };
|
|
1431
|
-
}
|
|
1432
|
-
/**
|
|
1433
|
-
* Toggles the selection of a checklist item and updates its position in the list.
|
|
1434
|
-
*
|
|
1435
|
-
* @param item - The checklist item to update.
|
|
1436
|
-
*/
|
|
1437
|
-
toggleSelection(item) {
|
|
1438
|
-
item.selected = !item.selected;
|
|
1439
|
-
this.emitCheckListItem(item);
|
|
1440
|
-
}
|
|
1441
|
-
/**
|
|
1442
|
-
* Handles the onDragDrop event.
|
|
1443
|
-
*
|
|
1444
|
-
* @param event - The drag and drop event.
|
|
1445
|
-
*/
|
|
1446
|
-
onDragDrop(event) {
|
|
1447
|
-
if (event.previousContainer === event.container) {
|
|
1448
|
-
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
1449
|
-
}
|
|
1450
|
-
else {
|
|
1451
|
-
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
1452
|
-
}
|
|
1453
|
-
this.emitItemOrderChanged([Number(event.previousContainer.id), event.previousIndex], [Number(event.container.id), event.currentIndex]);
|
|
1454
|
-
}
|
|
1455
|
-
/**
|
|
1456
|
-
* Handles moving items up or down using the alt + arrow up or alt + arrow down keys.
|
|
1457
|
-
*
|
|
1458
|
-
* @param groupIndex - The index of the group.
|
|
1459
|
-
* @param currentItemIndex - The current index of the item.
|
|
1460
|
-
* @param newItemIndex - The new index of the item.
|
|
1461
|
-
*/
|
|
1462
|
-
onAltArrowKeydown(groupIndex, currentItemIndex, newItemIndex, event) {
|
|
1463
|
-
event.preventDefault();
|
|
1464
|
-
let newIndex = newItemIndex;
|
|
1465
|
-
let newGroupIndex = groupIndex;
|
|
1466
|
-
let transfer = false;
|
|
1467
|
-
if (newIndex > this.groups[groupIndex].items.length - 1) {
|
|
1468
|
-
newIndex = 0;
|
|
1469
|
-
newGroupIndex = groupIndex + 1;
|
|
1470
|
-
transfer = true;
|
|
1471
|
-
this.focusedIndex[groupIndex] = this.groups[groupIndex].items.length - 2;
|
|
1472
|
-
}
|
|
1473
|
-
else if (newIndex < 0) {
|
|
1474
|
-
newGroupIndex = groupIndex - 1;
|
|
1475
|
-
newIndex = this.groups[newGroupIndex].items.length;
|
|
1476
|
-
transfer = true;
|
|
1477
|
-
this.focusedIndex[groupIndex] = 0;
|
|
1478
|
-
}
|
|
1479
|
-
if (transfer) {
|
|
1480
|
-
transferArrayItem(this.groups[groupIndex].items, this.groups[newGroupIndex].items, currentItemIndex, newIndex);
|
|
1481
|
-
}
|
|
1482
|
-
else {
|
|
1483
|
-
moveItemInArray(this.groups[groupIndex].items, currentItemIndex, newIndex);
|
|
1484
|
-
}
|
|
1485
|
-
this.emitItemOrderChanged([groupIndex, currentItemIndex], [newGroupIndex, newIndex]);
|
|
1486
|
-
setTimeout(() => {
|
|
1487
|
-
this.focusItem(newGroupIndex, newIndex);
|
|
1488
|
-
});
|
|
1489
|
-
}
|
|
1490
|
-
/**
|
|
1491
|
-
* Handles focus by arrow keydown event.
|
|
1492
|
-
*
|
|
1493
|
-
* @param groupIndex - The index of the group.
|
|
1494
|
-
* @param itemIndex - The index of the item.
|
|
1495
|
-
* @param event - The keyboard event.
|
|
1496
|
-
*/
|
|
1497
|
-
onArrowKeydown(groupIndex, itemIndex, event) {
|
|
1498
|
-
event.preventDefault();
|
|
1499
|
-
setTimeout(() => {
|
|
1500
|
-
let gi = groupIndex;
|
|
1501
|
-
if (itemIndex > this.groups[groupIndex].items.length - 1) {
|
|
1502
|
-
gi = groupIndex + 1;
|
|
1503
|
-
itemIndex = 0;
|
|
1504
|
-
}
|
|
1505
|
-
if (itemIndex < 0) {
|
|
1506
|
-
gi = groupIndex - 1;
|
|
1507
|
-
if (gi < 0) {
|
|
1508
|
-
return;
|
|
1509
|
-
}
|
|
1510
|
-
itemIndex = this.groups[gi].items.length - 1;
|
|
1511
|
-
}
|
|
1512
|
-
this.focusItem(gi, itemIndex);
|
|
1513
|
-
});
|
|
1514
|
-
}
|
|
1515
|
-
/**
|
|
1516
|
-
* Emits the item order changed event.
|
|
1517
|
-
*
|
|
1518
|
-
* @param previousIndex - The previous index of the item.
|
|
1519
|
-
* @param currentIndex - The current index of the item.
|
|
1520
|
-
*/
|
|
1521
|
-
emitItemOrderChanged(previousIndex, currentIndex) {
|
|
1522
|
-
this.itemOrderChanged.emit({
|
|
1523
|
-
previousIndex,
|
|
1524
|
-
currentIndex,
|
|
1525
|
-
groups: [...this.groups],
|
|
1526
|
-
});
|
|
1527
|
-
}
|
|
1528
|
-
/**
|
|
1529
|
-
* Emits the selected checklist item through an event.
|
|
1530
|
-
*
|
|
1531
|
-
* @param item - The checklist item to emit.
|
|
1532
|
-
*/
|
|
1533
|
-
emitCheckListItem(item) {
|
|
1534
|
-
this.itemSelectionChanged.emit({ changedItem: item, groups: this.groups });
|
|
1535
|
-
}
|
|
1536
|
-
/**
|
|
1537
|
-
* Focuses on a specific item in the sortable list.
|
|
1538
|
-
*
|
|
1539
|
-
* @param groupIndex - The index of the group.
|
|
1540
|
-
* @param itemIndex - The index of the item.
|
|
1541
|
-
*/
|
|
1542
|
-
focusItem(groupIndex, itemIndex) {
|
|
1543
|
-
const groupElements = this.sortableListGroups.nativeElement.querySelectorAll('.item-list-group');
|
|
1544
|
-
if (groupElements && groupElements.length > groupIndex) {
|
|
1545
|
-
const itemElements = groupElements[groupIndex].querySelectorAll('.item');
|
|
1546
|
-
if (itemElements && itemElements.length > itemIndex) {
|
|
1547
|
-
if (this.shouldDisplayCheckboxes) {
|
|
1548
|
-
itemElements[itemIndex].querySelector('input').focus();
|
|
1549
|
-
}
|
|
1550
|
-
else {
|
|
1551
|
-
itemElements[itemIndex].focus();
|
|
1552
|
-
}
|
|
1553
|
-
this.focusedIndex[groupIndex] = itemIndex;
|
|
1554
|
-
}
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
/**
|
|
1558
|
-
* Checks if an item has focus.
|
|
1559
|
-
*
|
|
1560
|
-
* @param groupIndex - The index of the group.
|
|
1561
|
-
* @param itemIndex - The index of the item.
|
|
1562
|
-
*/
|
|
1563
|
-
itemHasFocus(groupIndex, itemIndex) {
|
|
1564
|
-
if (!this.focusedIndex[groupIndex]) {
|
|
1565
|
-
this.focusedIndex[groupIndex] = 0;
|
|
1566
|
-
}
|
|
1567
|
-
return this.focusedIndex[groupIndex] === itemIndex;
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
NggSortableListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1571
|
-
NggSortableListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggSortableListComponent, selector: "ngg-sortable-list", inputs: { groups: "groups", shouldDisplayCheckboxes: "shouldDisplayCheckboxes", isReadOnly: "isReadOnly", isDraggable: "isDraggable", description: "description", suffixTemplate: "suffixTemplate" }, outputs: { itemSelectionChanged: "itemSelectionChanged", itemOrderChanged: "itemOrderChanged" }, viewQueries: [{ propertyName: "sortableListGroups", first: true, predicate: ["sortableListGroups"], descendants: true }], ngImport: i0, template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }] });
|
|
1572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListComponent, decorators: [{
|
|
1573
|
-
type: Component,
|
|
1574
|
-
args: [{ selector: 'ngg-sortable-list', template: "<div class=\"item-list\">\n <ng-container>\n <p class=\"item-list-header\">\n <span class=\"item-list-header-title\">{{ description }}</span>\n </p>\n <div #sortableListGroups cdkDropListGroup>\n <div\n *ngFor=\"let group of groups; let g_i = index\"\n class=\"item-list-group\"\n [class.drag-enabled]=\"isDraggable && !isReadOnly\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"group.items\"\n [id]=\"g_i.toString()\"\n (cdkDropListDropped)=\"onDragDrop($event)\"\n >\n <p\n *ngIf=\"group.title && group.title.length > 0\"\n class=\"item-list-header\"\n >\n <span class=\"item-list-header-title\">{{ group.title }}</span>\n </p>\n <p\n *ngIf=\"group.description && group.description.length > 0\"\n class=\"item-list-header-description\"\n >\n {{ group.description }}\n </p>\n <div\n *ngFor=\"let checklistItem of group.items; let i = index\"\n [cdkDragDisabled]=\"!isDraggable || isReadOnly\"\n [cdkDragData]=\"checklistItem\"\n cdkDrag\n cdkDragLockAxis=\"y\"\n class=\"item-box\"\n role=\"listitem\"\n >\n <div *cdkDragPlaceholder class=\"item-custom-placeholder\"></div>\n <label\n (keydown.alt.arrowDown)=\"onAltArrowKeydown(g_i, i, i + 1, $event)\"\n (keydown.alt.arrowUp)=\"onAltArrowKeydown(g_i, i, i - 1, $event)\"\n (keydown.arrowDown)=\"onArrowKeydown(g_i, i + 1, $event)\"\n (keydown.arrowUp)=\"onArrowKeydown(g_i, i - 1, $event)\"\n class=\"form-control item-control align-items-center item\"\n [tabindex]=\"shouldDisplayCheckboxes ? '-1' : '0'\"\n >\n <div class=\"form-control\">\n <input\n (change)=\"toggleSelection(checklistItem)\"\n [checked]=\"checklistItem.selected\"\n [disabled]=\"isReadOnly\"\n [type]=\"shouldDisplayCheckboxes ? 'checkbox' : 'hidden'\"\n />\n <div class=\"item-box-title\">\n <span name=\"agendaItemName\"\n >{{ checklistItem.name }}\n <span\n *ngIf=\"checklistItem.hasCustomSuffix\"\n class=\"item-list-suffix\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n suffixTemplate;\n context: { $implicit: checklistItem }\n \"\n class=\"user-icon\"\n >\n </ng-container>\n </span>\n </span>\n <br />\n <span *ngIf=\"!!checklistItem.description\">\n <span class=\"item-list-suffix\" name=\"agendaItemToolTip\">\n {{ checklistItem.description }}\n </span>\n <br />\n </span>\n </div>\n <i></i>\n </div>\n <div *ngIf=\"isDraggable && !isReadOnly\" class=\"item-grip-icon\">\n <i class=\"sg-icon sg-icon-grip-vertical text-primary\"></i>\n </div>\n </label>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n", styles: [".item-list{width:100%;display:block}label.item{padding:0!important}.item-box{background-color:var(--sg-card-background);color:var(--text-primary-color);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px;margin:5px 0;border:1px solid var(--border-color);border-radius:4px}.form-control{line-height:20px;font-size:16px;font-weight:500}.item-list-header{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.item-list-header-title{font-weight:600;font-size:1rem;line-height:1.25rem;font-style:normal}.item-list-header-subtitle{font-size:.75rem;color:var(--text-primary-color);display:flex;justify-content:center;align-content:center}.item-list-suffix{font-weight:400;font-size:.85rem}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.item-grip-icon{font-weight:400;padding:.75rem 1rem .75rem 0rem}.cdk-drop-list.cdk-drop-list-dragging{cursor:grabbing!important;pointer-events:all!important}.item-custom-placeholder.cdk-drag-placeholder{pointer-events:all!important}.cdk-drop-list.drag-enabled:not(.cdk-drag-placeholder) label{cursor:grab}.cdk-drop-list label:focus-visible{outline-color:#333;outline-offset:4px}.item-list.cdk-drop-list-dragging .item-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1);pointer-events:all!important}.item-custom-placeholder{border:dotted 1px #999;min-height:44px;transition:transform .25s cubic-bezier(0,0,.2,1);border-radius:4px;margin:5px 0;padding:12px 12px 12px 16px}.user-icon{margin-right:.5rem}.item-control{width:100%;display:flex;flex-direction:row;justify-content:space-between}.form-control.item-layout{display:flex;justify-content:space-between}\n"] }]
|
|
1575
|
-
}], propDecorators: { groups: [{
|
|
1576
|
-
type: Input
|
|
1577
|
-
}], shouldDisplayCheckboxes: [{
|
|
1578
|
-
type: Input
|
|
1579
|
-
}], isReadOnly: [{
|
|
1580
|
-
type: Input
|
|
1581
|
-
}], isDraggable: [{
|
|
1582
|
-
type: Input
|
|
1583
|
-
}], description: [{
|
|
1584
|
-
type: Input
|
|
1585
|
-
}], suffixTemplate: [{
|
|
1586
|
-
type: Input
|
|
1587
|
-
}], itemSelectionChanged: [{
|
|
1588
|
-
type: Output
|
|
1589
|
-
}], itemOrderChanged: [{
|
|
1590
|
-
type: Output
|
|
1591
|
-
}], sortableListGroups: [{
|
|
1592
|
-
type: ViewChild,
|
|
1593
|
-
args: ['sortableListGroups']
|
|
1594
|
-
}] } });
|
|
1595
|
-
|
|
1596
|
-
class NggSortableListModule {
|
|
1597
|
-
}
|
|
1598
|
-
NggSortableListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1599
|
-
NggSortableListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, declarations: [NggSortableListComponent], imports: [CommonModule, FormsModule, DragDropModule], exports: [NggSortableListComponent] });
|
|
1600
|
-
NggSortableListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, imports: [CommonModule, FormsModule, DragDropModule] });
|
|
1601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggSortableListModule, decorators: [{
|
|
1602
|
-
type: NgModule,
|
|
1603
|
-
args: [{
|
|
1604
|
-
imports: [CommonModule, FormsModule, DragDropModule],
|
|
1605
|
-
exports: [NggSortableListComponent],
|
|
1606
|
-
declarations: [NggSortableListComponent],
|
|
1607
|
-
}]
|
|
1608
|
-
}] });
|
|
1609
|
-
|
|
1610
|
-
class SlidingUnderlineDirective {
|
|
1611
|
-
constructor(element) {
|
|
1612
|
-
this.element = element;
|
|
1613
|
-
}
|
|
1614
|
-
ngOnInit() {
|
|
1615
|
-
var _a;
|
|
1616
|
-
if ((_a = this.element) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1617
|
-
this.element.nativeElement.classList.add('slider');
|
|
1618
|
-
this.element.nativeElement.addEventListener('animationend', () => {
|
|
1619
|
-
this.element.nativeElement.classList.remove('left', 'slider-positive', 'slider-negative');
|
|
1620
|
-
});
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
ngOnChanges(changes) {
|
|
1624
|
-
var _a;
|
|
1625
|
-
if (!this.disabled) {
|
|
1626
|
-
if (changes.slidingUnderline &&
|
|
1627
|
-
changes.key &&
|
|
1628
|
-
!changes.slidingUnderline.isFirstChange() &&
|
|
1629
|
-
!((_a = changes === null || changes === void 0 ? void 0 : changes.key) === null || _a === void 0 ? void 0 : _a.isFirstChange())) {
|
|
1630
|
-
if (changes.key.currentValue === changes.key.previousValue) {
|
|
1631
|
-
this.addAnimation(changes.slidingUnderline.currentValue, changes.slidingUnderline.previousValue);
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
else {
|
|
1635
|
-
if (changes.slidingUnderline &&
|
|
1636
|
-
!changes.slidingUnderline.isFirstChange()) {
|
|
1637
|
-
this.addAnimation(changes.slidingUnderline.currentValue, changes.slidingUnderline.previousValue);
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
addAnimation(current, previous) {
|
|
1643
|
-
if (current > previous)
|
|
1644
|
-
this.element.nativeElement.classList.add('slider-positive');
|
|
1645
|
-
else
|
|
1646
|
-
this.element.nativeElement.classList.add('slider-negative');
|
|
1647
|
-
this.element.nativeElement.classList.add('left');
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
SlidingUnderlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SlidingUnderlineDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1651
|
-
SlidingUnderlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SlidingUnderlineDirective, selector: "[nggSlidingUnderline]", inputs: { nggSlidingUnderline: "nggSlidingUnderline", key: "key", disabled: "disabled" }, usesOnChanges: true, ngImport: i0 });
|
|
1652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SlidingUnderlineDirective, decorators: [{
|
|
1653
|
-
type: Directive,
|
|
1654
|
-
args: [{
|
|
1655
|
-
selector: '[nggSlidingUnderline]',
|
|
1656
|
-
}]
|
|
1657
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { nggSlidingUnderline: [{
|
|
1658
|
-
type: Input
|
|
1659
|
-
}], key: [{
|
|
1660
|
-
type: Input
|
|
1661
|
-
}], disabled: [{
|
|
1662
|
-
type: Input
|
|
1663
|
-
}] } });
|
|
1664
|
-
|
|
1665
|
-
class CellTableItemComponent {
|
|
1666
|
-
constructor(sanitizer) {
|
|
1667
|
-
this.sanitizer = sanitizer;
|
|
1668
|
-
this.valueType = 'string';
|
|
1669
|
-
this.id = '';
|
|
1670
|
-
this.getSignColor = (value) => {
|
|
1671
|
-
if (/[−-]/.test(String(value)))
|
|
1672
|
-
return 'text-danger';
|
|
1673
|
-
else if (/[1-9]/.test(String(value)))
|
|
1674
|
-
return 'text-success';
|
|
1675
|
-
return '';
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
transformHTML(value) {
|
|
1679
|
-
if (value && value.length) {
|
|
1680
|
-
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
1681
|
-
}
|
|
1682
|
-
else {
|
|
1683
|
-
return '';
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
CellTableItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CellTableItemComponent, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1688
|
-
CellTableItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CellTableItemComponent, selector: "[nggCellTableItem]", inputs: { row: "row", valueType: "valueType", id: "id" }, ngImport: i0, template: `
|
|
1689
|
-
<ng-container [ngSwitch]="valueType">
|
|
1690
|
-
<span *ngSwitchCase="'string'">{{ row || '–' }}</span>
|
|
1691
|
-
<span *ngSwitchCase="'number'">{{ (row | number) || '–' }}</span>
|
|
1692
|
-
<span *ngSwitchCase="'datetime'">{{
|
|
1693
|
-
(row | date: 'HH:mm:ss') || '–'
|
|
1694
|
-
}}</span>
|
|
1695
|
-
<span *ngSwitchCase="'date'">{{
|
|
1696
|
-
(row | date: 'YYYY-MM-dd') || '–'
|
|
1697
|
-
}}</span>
|
|
1698
|
-
<span
|
|
1699
|
-
*ngSwitchCase="'custom-html'"
|
|
1700
|
-
[innerHtml]="transformHTML(row) || '–'"
|
|
1701
|
-
></span>
|
|
1702
|
-
<span *ngSwitchCase="'sign'" [ngClass]="getSignColor(row)">{{
|
|
1703
|
-
row || '–'
|
|
1704
|
-
}}</span>
|
|
1705
|
-
<span *ngSwitchCase="'pct'">{{ row || '–' }}</span>
|
|
1706
|
-
<span *ngSwitchCase="'streamSign'" [nggSlidingUnderline]="row">{{
|
|
1707
|
-
row || '–'
|
|
1708
|
-
}}</span>
|
|
1709
|
-
<span *ngSwitchDefault>–</span>
|
|
1710
|
-
</ng-container>
|
|
1711
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: SlidingUnderlineDirective, selector: "[nggSlidingUnderline]", inputs: ["nggSlidingUnderline", "key", "disabled"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
1712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CellTableItemComponent, decorators: [{
|
|
1713
|
-
type: Component,
|
|
1714
|
-
args: [{
|
|
1715
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1716
|
-
selector: '[nggCellTableItem]',
|
|
1717
|
-
template: `
|
|
1718
|
-
<ng-container [ngSwitch]="valueType">
|
|
1719
|
-
<span *ngSwitchCase="'string'">{{ row || '–' }}</span>
|
|
1720
|
-
<span *ngSwitchCase="'number'">{{ (row | number) || '–' }}</span>
|
|
1721
|
-
<span *ngSwitchCase="'datetime'">{{
|
|
1722
|
-
(row | date: 'HH:mm:ss') || '–'
|
|
1723
|
-
}}</span>
|
|
1724
|
-
<span *ngSwitchCase="'date'">{{
|
|
1725
|
-
(row | date: 'YYYY-MM-dd') || '–'
|
|
1726
|
-
}}</span>
|
|
1727
|
-
<span
|
|
1728
|
-
*ngSwitchCase="'custom-html'"
|
|
1729
|
-
[innerHtml]="transformHTML(row) || '–'"
|
|
1730
|
-
></span>
|
|
1731
|
-
<span *ngSwitchCase="'sign'" [ngClass]="getSignColor(row)">{{
|
|
1732
|
-
row || '–'
|
|
1733
|
-
}}</span>
|
|
1734
|
-
<span *ngSwitchCase="'pct'">{{ row || '–' }}</span>
|
|
1735
|
-
<span *ngSwitchCase="'streamSign'" [nggSlidingUnderline]="row">{{
|
|
1736
|
-
row || '–'
|
|
1737
|
-
}}</span>
|
|
1738
|
-
<span *ngSwitchDefault>–</span>
|
|
1739
|
-
</ng-container>
|
|
1740
|
-
`,
|
|
1741
|
-
}]
|
|
1742
|
-
}], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; }, propDecorators: { row: [{
|
|
1743
|
-
type: Input
|
|
1744
|
-
}], valueType: [{
|
|
1745
|
-
type: Input
|
|
1746
|
-
}], id: [{
|
|
1747
|
-
type: Input
|
|
1748
|
-
}] } });
|
|
1749
|
-
|
|
1750
|
-
class NggCellTableComponent {
|
|
1751
|
-
constructor() {
|
|
1752
|
-
this.items = new QueryList();
|
|
1753
|
-
/** Make the most left element wrap */
|
|
1754
|
-
this.overflowReverse = false;
|
|
1755
|
-
/** List of table headers */
|
|
1756
|
-
this.headerList = [];
|
|
1757
|
-
/** List of data */
|
|
1758
|
-
this.rows = [];
|
|
1759
|
-
/** Make rows clickable and add arrow to the right */
|
|
1760
|
-
this.clickableRows = false;
|
|
1761
|
-
/** Label for the chevron of clickable rows */
|
|
1762
|
-
this.clickLabel = 'View details';
|
|
1763
|
-
/** Callback when a row is clicked */
|
|
1764
|
-
this.rowClicked = new EventEmitter();
|
|
1765
|
-
// ------------- EVENTS ------------------
|
|
1766
|
-
/**
|
|
1767
|
-
* handles the logic for when a row is clicked
|
|
1768
|
-
* @param {TableRowClickedEvent} value the TableRowClickedEvent
|
|
1769
|
-
*/
|
|
1770
|
-
this.handleClickRow = (value) => {
|
|
1771
|
-
if (this.clickableRows)
|
|
1772
|
-
this.rowClicked.emit(value);
|
|
1773
|
-
};
|
|
1774
|
-
this.getValueTypeFromMain = () => {
|
|
1775
|
-
const getMain = this.headerList.find((x) => x.main);
|
|
1776
|
-
if (getMain)
|
|
1777
|
-
return getMain.valueType || '';
|
|
1778
|
-
return '';
|
|
1779
|
-
};
|
|
1780
|
-
this.getTableHeaderListValueFromNonMain = (header) => {
|
|
1781
|
-
if (header.valueType)
|
|
1782
|
-
return header.valueType || '';
|
|
1783
|
-
return '';
|
|
1784
|
-
};
|
|
1785
|
-
this.mainHeader = (row) => {
|
|
1786
|
-
const getMain = this.headerList.find((x) => x.main);
|
|
1787
|
-
if (row && getMain) {
|
|
1788
|
-
return {
|
|
1789
|
-
value: row[getMain.tableKeySelector],
|
|
1790
|
-
valueType: getMain.valueType || 'string',
|
|
1791
|
-
tableKeySelector: getMain.tableKeySelector,
|
|
1792
|
-
};
|
|
1793
|
-
}
|
|
1794
|
-
return {
|
|
1795
|
-
value: '-',
|
|
1796
|
-
valueType: 'string',
|
|
1797
|
-
tableKeySelector: '-',
|
|
1798
|
-
};
|
|
1799
|
-
};
|
|
1800
|
-
this.headerNoneMain = (headers) => {
|
|
1801
|
-
if (this.overflowReverse)
|
|
1802
|
-
return headers.filter((x) => !x.main).reverse();
|
|
1803
|
-
return headers.filter((x) => !x.main);
|
|
1804
|
-
};
|
|
1805
|
-
this.getTableKeySelector = (row) => {
|
|
1806
|
-
return this.mainHeader(row).tableKeySelector + row.rowId;
|
|
1807
|
-
};
|
|
1808
|
-
}
|
|
1809
|
-
// ------- TRACKBY FOR STREAM ------------
|
|
1810
|
-
trackByrowId(_, b) {
|
|
1811
|
-
return b.rowId;
|
|
1812
|
-
}
|
|
1813
|
-
KeySelector(_, b) {
|
|
1814
|
-
return b.tableKeySelector;
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
NggCellTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1818
|
-
NggCellTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggCellTableComponent, selector: "ngg-cell-table", inputs: { minWidth: "minWidth", overflowReverse: "overflowReverse", className: "className", headerList: "headerList", rows: "rows", clickableRows: "clickableRows", clickLabel: "clickLabel" }, outputs: { rowClicked: "rowClicked" }, viewQueries: [{ propertyName: "items", predicate: ["items"], descendants: true }], ngImport: i0, template: "<div #targetElement role=\"table\" [ngClass]=\"className\">\n <div class=\"cell-table-table d-flex flex-column\">\n <div\n *ngFor=\"let row of rows; trackBy: trackByrowId\"\n (click)=\"handleClickRow(row)\"\n class=\"cell-table--row-wrapper\"\n role=\"rowgroup\"\n [class.is-clickable]=\"clickableRows\"\n >\n <div>\n <div #items [class.overflow-reverse]=\"overflowReverse\">\n <!-- Main header -->\n <div role=\"row\">\n <div\n nggCellTableItem\n [row]=\"mainHeader(row).value\"\n [valueType]=\"getValueTypeFromMain()\"\n [attr.valueType]=\"getValueTypeFromMain()\"\n [attr.id]=\"getTableKeySelector(row)\"\n role=\"rowheader\"\n aria-rowspan=\"3\"\n aria-colspan=\"3\"\n ></div>\n </div>\n <div role=\"row\">\n <div class=\"d-flex\">\n <!-- Sub Header -->\n <div\n nggCellTableItem\n class=\"sub-header py-0 fw-bold\"\n [row]=\"header.label\"\n [valueType]=\"getTableHeaderListValueFromNonMain(header)\"\n role=\"columnheader\"\n *ngFor=\"\n let header of headerNoneMain(headerList);\n trackBy: KeySelector\n \"\n ></div>\n </div>\n </div>\n\n <div role=\"row\">\n <!-- Sub Values -->\n <div class=\"d-flex\">\n <div\n nggCellTableItem\n class=\"sub-value py-0\"\n [row]=\"row[header.tableKeySelector]\"\n [valueType]=\"getTableHeaderListValueFromNonMain(header)\"\n [attr.valueType]=\"header.valueType\"\n role=\"cell\"\n *ngFor=\"\n let header of headerNoneMain(headerList);\n trackBy: KeySelector\n \"\n ></div>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"clickableRows\"\n role=\"row\"\n class=\"d-grid align-items-center ms-4 me-4 cell-table--arrow-container\"\n >\n <div role=\"cell\">\n <div\n role=\"button\"\n [attr.aria-label]=\"clickLabel\"\n tabindex=\"0\"\n [attr.aria-describedby]=\"getTableKeySelector(row)\"\n (keydown.enter)=\"handleClickRow(row)\"\n >\n <svg\n data-prefix=\"far\"\n data-icon=\"chevron-right\"\n class=\"svg-inline--fa fa-chevron-right fa-w-10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z\"\n ></path>\n </svg>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["[role=rowheader]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:.5rem}[role=cell],[role=columnheader]{flex:1 1 0;margin-bottom:.125rem}.cell-table--row-wrapper{border-top:1px solid var(--gds-ref-pallet-base400);display:flex;padding:1rem}.cell-table--row-wrapper>div:first-child{flex:1 1 0}.cell-table--row-wrapper.is-clickable{cursor:pointer}.cell-table--row-wrapper.is-clickable:hover{background-color:var(--gds-ref-pallet-base100)}.cell-table--arrow-container{flex:0 0 auto;width:10px}.cell-table--arrow-container [tabindex=\"0\"]:focus{outline:2px solid var(--gds-ref-pallet-base800)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CellTableItemComponent, selector: "[nggCellTableItem]", inputs: ["row", "valueType", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableComponent, decorators: [{
|
|
1820
|
-
type: Component,
|
|
1821
|
-
args: [{ selector: 'ngg-cell-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #targetElement role=\"table\" [ngClass]=\"className\">\n <div class=\"cell-table-table d-flex flex-column\">\n <div\n *ngFor=\"let row of rows; trackBy: trackByrowId\"\n (click)=\"handleClickRow(row)\"\n class=\"cell-table--row-wrapper\"\n role=\"rowgroup\"\n [class.is-clickable]=\"clickableRows\"\n >\n <div>\n <div #items [class.overflow-reverse]=\"overflowReverse\">\n <!-- Main header -->\n <div role=\"row\">\n <div\n nggCellTableItem\n [row]=\"mainHeader(row).value\"\n [valueType]=\"getValueTypeFromMain()\"\n [attr.valueType]=\"getValueTypeFromMain()\"\n [attr.id]=\"getTableKeySelector(row)\"\n role=\"rowheader\"\n aria-rowspan=\"3\"\n aria-colspan=\"3\"\n ></div>\n </div>\n <div role=\"row\">\n <div class=\"d-flex\">\n <!-- Sub Header -->\n <div\n nggCellTableItem\n class=\"sub-header py-0 fw-bold\"\n [row]=\"header.label\"\n [valueType]=\"getTableHeaderListValueFromNonMain(header)\"\n role=\"columnheader\"\n *ngFor=\"\n let header of headerNoneMain(headerList);\n trackBy: KeySelector\n \"\n ></div>\n </div>\n </div>\n\n <div role=\"row\">\n <!-- Sub Values -->\n <div class=\"d-flex\">\n <div\n nggCellTableItem\n class=\"sub-value py-0\"\n [row]=\"row[header.tableKeySelector]\"\n [valueType]=\"getTableHeaderListValueFromNonMain(header)\"\n [attr.valueType]=\"header.valueType\"\n role=\"cell\"\n *ngFor=\"\n let header of headerNoneMain(headerList);\n trackBy: KeySelector\n \"\n ></div>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"clickableRows\"\n role=\"row\"\n class=\"d-grid align-items-center ms-4 me-4 cell-table--arrow-container\"\n >\n <div role=\"cell\">\n <div\n role=\"button\"\n [attr.aria-label]=\"clickLabel\"\n tabindex=\"0\"\n [attr.aria-describedby]=\"getTableKeySelector(row)\"\n (keydown.enter)=\"handleClickRow(row)\"\n >\n <svg\n data-prefix=\"far\"\n data-icon=\"chevron-right\"\n class=\"svg-inline--fa fa-chevron-right fa-w-10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n >\n <path\n fill=\"currentColor\"\n d=\"M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z\"\n ></path>\n </svg>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["[role=rowheader]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:.5rem}[role=cell],[role=columnheader]{flex:1 1 0;margin-bottom:.125rem}.cell-table--row-wrapper{border-top:1px solid var(--gds-ref-pallet-base400);display:flex;padding:1rem}.cell-table--row-wrapper>div:first-child{flex:1 1 0}.cell-table--row-wrapper.is-clickable{cursor:pointer}.cell-table--row-wrapper.is-clickable:hover{background-color:var(--gds-ref-pallet-base100)}.cell-table--arrow-container{flex:0 0 auto;width:10px}.cell-table--arrow-container [tabindex=\"0\"]:focus{outline:2px solid var(--gds-ref-pallet-base800)}\n"] }]
|
|
1822
|
-
}], propDecorators: { items: [{
|
|
1823
|
-
type: ViewChildren,
|
|
1824
|
-
args: ['items']
|
|
1825
|
-
}], minWidth: [{
|
|
1826
|
-
type: Input
|
|
1827
|
-
}], overflowReverse: [{
|
|
1828
|
-
type: Input
|
|
1829
|
-
}], className: [{
|
|
1830
|
-
type: Input
|
|
1831
|
-
}], headerList: [{
|
|
1832
|
-
type: Input
|
|
1833
|
-
}], rows: [{
|
|
1834
|
-
type: Input
|
|
1835
|
-
}], clickableRows: [{
|
|
1836
|
-
type: Input
|
|
1837
|
-
}], clickLabel: [{
|
|
1838
|
-
type: Input
|
|
1839
|
-
}], rowClicked: [{
|
|
1840
|
-
type: Output
|
|
1841
|
-
}] } });
|
|
1842
|
-
|
|
1843
|
-
class NggCellTableModule {
|
|
1844
|
-
}
|
|
1845
|
-
NggCellTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1846
|
-
NggCellTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableModule, declarations: [NggCellTableComponent,
|
|
1847
|
-
CellTableItemComponent,
|
|
1848
|
-
SlidingUnderlineDirective], imports: [CommonModule], exports: [NggCellTableComponent] });
|
|
1849
|
-
NggCellTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableModule, imports: [CommonModule] });
|
|
1850
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCellTableModule, decorators: [{
|
|
1851
|
-
type: NgModule,
|
|
1852
|
-
args: [{
|
|
1853
|
-
imports: [CommonModule],
|
|
1854
|
-
exports: [NggCellTableComponent],
|
|
1855
|
-
declarations: [
|
|
1856
|
-
NggCellTableComponent,
|
|
1857
|
-
CellTableItemComponent,
|
|
1858
|
-
SlidingUnderlineDirective,
|
|
1859
|
-
],
|
|
1860
|
-
}]
|
|
1861
|
-
}] });
|
|
1862
|
-
|
|
1863
|
-
class Table {
|
|
1864
|
-
constructor(table) {
|
|
1865
|
-
this.data = table.data;
|
|
1866
|
-
this.header = table.header;
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
class NggModule {
|
|
1871
|
-
}
|
|
1872
|
-
NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1873
|
-
NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggModule, imports: [CommonModule], exports: [NggAccordionModule,
|
|
1874
|
-
NggBadgeModule,
|
|
1875
|
-
NggButtonModule,
|
|
1876
|
-
NggDatepickerModule,
|
|
1877
|
-
NggDropdownModule,
|
|
1878
|
-
NggModalModule,
|
|
1879
|
-
NggProgressCircleModule,
|
|
1880
|
-
NggSegmentedControlModule,
|
|
1881
|
-
NggSliderModule,
|
|
1882
|
-
NggContextMenuModule,
|
|
1883
|
-
NggInPageWizardModule,
|
|
1884
|
-
NggCellTableModule,
|
|
1885
|
-
NggSharedModule,
|
|
1886
|
-
NggSortableListModule] });
|
|
1887
|
-
NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModule, imports: [CommonModule, NggAccordionModule,
|
|
1888
|
-
NggBadgeModule,
|
|
1889
|
-
NggButtonModule,
|
|
1890
|
-
NggDatepickerModule,
|
|
1891
|
-
NggDropdownModule,
|
|
1892
|
-
NggModalModule,
|
|
1893
|
-
NggProgressCircleModule,
|
|
1894
|
-
NggSegmentedControlModule,
|
|
1895
|
-
NggSliderModule,
|
|
1896
|
-
NggContextMenuModule,
|
|
1897
|
-
NggInPageWizardModule,
|
|
1898
|
-
NggCellTableModule,
|
|
1899
|
-
NggSharedModule,
|
|
1900
|
-
NggSortableListModule] });
|
|
1901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggModule, decorators: [{
|
|
1902
|
-
type: NgModule,
|
|
1903
|
-
args: [{
|
|
1904
|
-
declarations: [],
|
|
1905
|
-
imports: [CommonModule],
|
|
1906
|
-
exports: [
|
|
1907
|
-
NggAccordionModule,
|
|
1908
|
-
NggBadgeModule,
|
|
1909
|
-
NggButtonModule,
|
|
1910
|
-
NggDatepickerModule,
|
|
1911
|
-
NggDropdownModule,
|
|
1912
|
-
NggModalModule,
|
|
1913
|
-
NggProgressCircleModule,
|
|
1914
|
-
NggSegmentedControlModule,
|
|
1915
|
-
NggSliderModule,
|
|
1916
|
-
NggContextMenuModule,
|
|
1917
|
-
NggInPageWizardModule,
|
|
1918
|
-
NggCellTableModule,
|
|
1919
|
-
NggSharedModule,
|
|
1920
|
-
NggSortableListModule,
|
|
1921
|
-
],
|
|
1922
|
-
}]
|
|
1923
|
-
}] });
|
|
1924
|
-
|
|
1925
|
-
class NggPaginationComponent {
|
|
1926
|
-
constructor() {
|
|
1927
|
-
/** Internationalization labels */
|
|
1928
|
-
this.i18n = PaginationI18n;
|
|
1929
|
-
/** Rendered size */
|
|
1930
|
-
this.size = 'small';
|
|
1931
|
-
/** Amount of pages to be displayed between the first and last */
|
|
1932
|
-
this.displayPages = 5;
|
|
1933
|
-
/** Total amount of items to be paginated */
|
|
1934
|
-
this.length = 0;
|
|
1935
|
-
/** Displayed items per page */
|
|
1936
|
-
this.pageSize = 10;
|
|
1937
|
-
this._pageIndex = 0;
|
|
1938
|
-
this._pageIndicies = [];
|
|
1939
|
-
/** Event emitted when a new page index is selected */
|
|
1940
|
-
this.page = new EventEmitter();
|
|
1941
|
-
}
|
|
1942
|
-
/** The zero-based page index of the displayed list of pages. Defaulted to 0. */
|
|
1943
|
-
get pageIndex() {
|
|
1944
|
-
return this._pageIndex;
|
|
1945
|
-
}
|
|
1946
|
-
set pageIndex(value) {
|
|
1947
|
-
this._pageIndex = Math.max(value, 0);
|
|
1948
|
-
}
|
|
1949
|
-
/** All centric page indicies to be displayed. */
|
|
1950
|
-
get pageIndicies() {
|
|
1951
|
-
return this._pageIndicies;
|
|
1952
|
-
}
|
|
1953
|
-
get totalPages() {
|
|
1954
|
-
if (!this.pageSize) {
|
|
1955
|
-
return 0;
|
|
1956
|
-
}
|
|
1957
|
-
return Math.ceil(this.length / this.pageSize);
|
|
1958
|
-
}
|
|
1959
|
-
ngOnChanges(changes) {
|
|
1960
|
-
if (changes.displayPages ||
|
|
1961
|
-
changes.pageIndex ||
|
|
1962
|
-
changes.pageSize ||
|
|
1963
|
-
changes.length) {
|
|
1964
|
-
this._pageIndicies = this.getDisplayedPageIndicies();
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
hasPrevious() {
|
|
1968
|
-
return this.pageIndex >= 1;
|
|
1969
|
-
}
|
|
1970
|
-
hasNext() {
|
|
1971
|
-
return this.pageIndex < this.totalPages - 1;
|
|
1972
|
-
}
|
|
1973
|
-
gotoFirst() {
|
|
1974
|
-
if (!this.hasPrevious()) {
|
|
1975
|
-
return;
|
|
1976
|
-
}
|
|
1977
|
-
const previous = this.pageIndex;
|
|
1978
|
-
this.pageIndex = 0;
|
|
1979
|
-
this.emit(previous);
|
|
1980
|
-
}
|
|
1981
|
-
gotoLast() {
|
|
1982
|
-
if (!this.hasNext()) {
|
|
1983
|
-
return;
|
|
1984
|
-
}
|
|
1985
|
-
const previous = this.pageIndex;
|
|
1986
|
-
this.pageIndex = this.totalPages - 1;
|
|
1987
|
-
this.emit(previous);
|
|
1988
|
-
}
|
|
1989
|
-
gotoPrevious() {
|
|
1990
|
-
if (!this.hasPrevious()) {
|
|
1991
|
-
return;
|
|
1992
|
-
}
|
|
1993
|
-
const previous = this.pageIndex;
|
|
1994
|
-
this.pageIndex = previous - 1;
|
|
1995
|
-
this.emit(previous);
|
|
1996
|
-
}
|
|
1997
|
-
gotoNext() {
|
|
1998
|
-
if (!this.hasNext()) {
|
|
1999
|
-
return;
|
|
2000
|
-
}
|
|
2001
|
-
const previous = this.pageIndex;
|
|
2002
|
-
this.pageIndex = previous + 1;
|
|
2003
|
-
this.emit(previous);
|
|
2004
|
-
}
|
|
2005
|
-
goto(index) {
|
|
2006
|
-
if (index === this.pageIndex || index < 0 || index >= this.totalPages) {
|
|
2007
|
-
return;
|
|
2008
|
-
}
|
|
2009
|
-
const previous = this.pageIndex;
|
|
2010
|
-
this.pageIndex = index;
|
|
2011
|
-
this.emit(previous);
|
|
2012
|
-
}
|
|
2013
|
-
emit(previous) {
|
|
2014
|
-
this._pageIndicies = this.getDisplayedPageIndicies();
|
|
2015
|
-
this.page.emit({ pageIndex: this.pageIndex, previousPageIndex: previous });
|
|
2016
|
-
}
|
|
2017
|
-
getDisplayedPageIndicies() {
|
|
2018
|
-
// Do not render
|
|
2019
|
-
if (this.totalPages <= 1) {
|
|
2020
|
-
return [];
|
|
2021
|
-
}
|
|
2022
|
-
// All pages can fit
|
|
2023
|
-
if (this.totalPages <= this.displayPages)
|
|
2024
|
-
return [...Array(this.totalPages - 2).keys()].map((index) => index + 1);
|
|
2025
|
-
// Only first & last
|
|
2026
|
-
if (this.totalPages === 2)
|
|
2027
|
-
return [];
|
|
2028
|
-
return this.getCenteredPageIndicies();
|
|
2029
|
-
}
|
|
2030
|
-
/**
|
|
2031
|
-
* Find X (displayPages) amount of page indicies that are centered from the currently selected page index,
|
|
2032
|
-
* but exclude the first and last indicies if they are within the range.
|
|
2033
|
-
*/
|
|
2034
|
-
getCenteredPageIndicies() {
|
|
2035
|
-
const pages = [];
|
|
2036
|
-
if (this.pageIndex === 0) {
|
|
2037
|
-
pages.push(this.pageIndex + 1);
|
|
2038
|
-
}
|
|
2039
|
-
else if (this.pageIndex === this.totalPages - 1) {
|
|
2040
|
-
pages.push(this.pageIndex - 1);
|
|
2041
|
-
}
|
|
2042
|
-
else {
|
|
2043
|
-
pages.push(this.pageIndex);
|
|
2044
|
-
}
|
|
2045
|
-
const addAfter = () => {
|
|
2046
|
-
const next = pages[pages.length - 1] + 1;
|
|
2047
|
-
if (next < this.totalPages - 1 && counter > 0) {
|
|
2048
|
-
pages.push(next);
|
|
2049
|
-
return true;
|
|
2050
|
-
}
|
|
2051
|
-
return false;
|
|
2052
|
-
};
|
|
2053
|
-
const addBefore = () => {
|
|
2054
|
-
const previous = pages[0] - 1;
|
|
2055
|
-
if (previous > 0 && counter > 0) {
|
|
2056
|
-
pages.unshift(previous);
|
|
2057
|
-
return true;
|
|
2058
|
-
}
|
|
2059
|
-
return false;
|
|
2060
|
-
};
|
|
2061
|
-
let counter = this.displayPages - 1;
|
|
2062
|
-
while (counter > 0) {
|
|
2063
|
-
const addedAfter = addAfter();
|
|
2064
|
-
if (addedAfter)
|
|
2065
|
-
counter--;
|
|
2066
|
-
const addedBefore = addBefore();
|
|
2067
|
-
if (addedBefore)
|
|
2068
|
-
counter--;
|
|
2069
|
-
if (!addedAfter && !addedBefore)
|
|
2070
|
-
break;
|
|
2071
|
-
}
|
|
2072
|
-
return pages;
|
|
2073
|
-
}
|
|
2074
|
-
}
|
|
2075
|
-
NggPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2076
|
-
NggPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NggPaginationComponent, selector: "ngg-pagination", inputs: { i18n: "i18n", size: "size", displayPages: "displayPages", length: "length", pageSize: "pageSize", pageIndex: "pageIndex" }, outputs: { page: "page" }, usesOnChanges: true, ngImport: i0, template: "<nav\n [class]=\"'pagination ' + size\"\n role=\"navigation\"\n [attr.aria-label]=\"i18n.paginationLabel\"\n *ngIf=\"totalPages > 1\"\n>\n <ul class=\"gds-reset\">\n <li *ngIf=\"hasPrevious()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoPrevious()\"\n (keydown.enter)=\"gotoPrevious()\"\n [attr.aria-label]=\"i18n.previousPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"\n />\n </svg>\n </a>\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoFirst()\"\n (keydown.enter)=\"gotoFirst()\"\n [attr.aria-current]=\"pageIndex === 0 ? 'page' : null\"\n [attr.aria-label]=\"i18n.firstPageLabel\"\n role=\"button\"\n >\n 1\n </a>\n </li>\n <li *ngIf=\"pageIndicies[0] > 1\" aria-hidden=\"true\">...</li>\n\n <li *ngFor=\"let index of pageIndicies\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"goto(index)\"\n (keydown.enter)=\"goto(index)\"\n [attr.aria-current]=\"pageIndex === index ? 'page' : null\"\n [attr.aria-label]=\"i18n.getPageLabel(index)\"\n role=\"button\"\n >\n {{ index + 1 }}\n </a>\n </li>\n\n <li\n *ngIf=\"pageIndicies[pageIndicies.length - 1] < totalPages - 2\"\n aria-hidden=\"true\"\n >\n ...\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoLast()\"\n (keydown.enter)=\"gotoLast()\"\n [attr.aria-current]=\"pageIndex === totalPages - 1 ? 'page' : null\"\n [attr.aria-label]=\"i18n.lastPageLabel\"\n role=\"button\"\n >\n {{ totalPages }}\n </a>\n </li>\n <li *ngIf=\"hasNext()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoNext()\"\n (keydown.enter)=\"gotoNext()\"\n [attr.aria-label]=\"i18n.nextPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\n />\n </svg>\n </a>\n </li>\n </ul>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2077
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationComponent, decorators: [{
|
|
2078
|
-
type: Component,
|
|
2079
|
-
args: [{ selector: 'ngg-pagination', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav\n [class]=\"'pagination ' + size\"\n role=\"navigation\"\n [attr.aria-label]=\"i18n.paginationLabel\"\n *ngIf=\"totalPages > 1\"\n>\n <ul class=\"gds-reset\">\n <li *ngIf=\"hasPrevious()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoPrevious()\"\n (keydown.enter)=\"gotoPrevious()\"\n [attr.aria-label]=\"i18n.previousPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\"\n />\n </svg>\n </a>\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoFirst()\"\n (keydown.enter)=\"gotoFirst()\"\n [attr.aria-current]=\"pageIndex === 0 ? 'page' : null\"\n [attr.aria-label]=\"i18n.firstPageLabel\"\n role=\"button\"\n >\n 1\n </a>\n </li>\n <li *ngIf=\"pageIndicies[0] > 1\" aria-hidden=\"true\">...</li>\n\n <li *ngFor=\"let index of pageIndicies\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"goto(index)\"\n (keydown.enter)=\"goto(index)\"\n [attr.aria-current]=\"pageIndex === index ? 'page' : null\"\n [attr.aria-label]=\"i18n.getPageLabel(index)\"\n role=\"button\"\n >\n {{ index + 1 }}\n </a>\n </li>\n\n <li\n *ngIf=\"pageIndicies[pageIndicies.length - 1] < totalPages - 2\"\n aria-hidden=\"true\"\n >\n ...\n </li>\n\n <li>\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoLast()\"\n (keydown.enter)=\"gotoLast()\"\n [attr.aria-current]=\"pageIndex === totalPages - 1 ? 'page' : null\"\n [attr.aria-label]=\"i18n.lastPageLabel\"\n role=\"button\"\n >\n {{ totalPages }}\n </a>\n </li>\n <li *ngIf=\"hasNext()\">\n <a\n class=\"gds-reset\"\n tabindex=\"0\"\n (click)=\"gotoNext()\"\n (keydown.enter)=\"gotoNext()\"\n [attr.aria-label]=\"i18n.nextPageLabel\"\n role=\"button\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\n />\n </svg>\n </a>\n </li>\n </ul>\n</nav>\n" }]
|
|
2080
|
-
}], propDecorators: { i18n: [{
|
|
2081
|
-
type: Input
|
|
2082
|
-
}], size: [{
|
|
2083
|
-
type: Input
|
|
2084
|
-
}], displayPages: [{
|
|
2085
|
-
type: Input
|
|
2086
|
-
}], length: [{
|
|
2087
|
-
type: Input
|
|
2088
|
-
}], pageSize: [{
|
|
2089
|
-
type: Input
|
|
2090
|
-
}], pageIndex: [{
|
|
2091
|
-
type: Input
|
|
2092
|
-
}], page: [{
|
|
2093
|
-
type: Output
|
|
2094
|
-
}] } });
|
|
2095
|
-
|
|
2096
|
-
class NggPaginationModule {
|
|
2097
|
-
}
|
|
2098
|
-
NggPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2099
|
-
NggPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationModule, declarations: [NggPaginationComponent], imports: [CommonModule], exports: [NggPaginationComponent] });
|
|
2100
|
-
NggPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationModule, imports: [CommonModule] });
|
|
2101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggPaginationModule, decorators: [{
|
|
2102
|
-
type: NgModule,
|
|
2103
|
-
args: [{
|
|
2104
|
-
declarations: [NggPaginationComponent],
|
|
2105
|
-
imports: [CommonModule],
|
|
2106
|
-
exports: [NggPaginationComponent],
|
|
2107
|
-
}]
|
|
2108
|
-
}] });
|
|
2109
|
-
|
|
2110
|
-
class NggCoreElementDirective {
|
|
2111
|
-
constructor() {
|
|
2112
|
-
this.viewRef = null;
|
|
2113
|
-
this.document = inject(DOCUMENT);
|
|
2114
|
-
this.renderer = inject(Renderer2);
|
|
2115
|
-
this.vcr = inject(ViewContainerRef);
|
|
2116
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
2117
|
-
this.template = inject((TemplateRef));
|
|
2118
|
-
}
|
|
2119
|
-
ngOnInit() {
|
|
2120
|
-
this.vcr.clear();
|
|
2121
|
-
const originalCreateElement = this.renderer.createElement;
|
|
2122
|
-
this.renderer.createElement = (name, _namespace) => {
|
|
2123
|
-
return this.document.createElement(getScopedTagName(name));
|
|
2124
|
-
};
|
|
2125
|
-
this.viewRef = this.vcr.createEmbeddedView(this.template);
|
|
2126
|
-
this.renderer.createElement = originalCreateElement;
|
|
2127
|
-
this.cdr.markForCheck();
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
NggCoreElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2131
|
-
NggCoreElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NggCoreElementDirective, selector: "[nggCoreElement]", ngImport: i0 });
|
|
2132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreElementDirective, decorators: [{
|
|
2133
|
-
type: Directive,
|
|
2134
|
-
args: [{
|
|
2135
|
-
selector: '[nggCoreElement]',
|
|
2136
|
-
}]
|
|
2137
|
-
}] });
|
|
2138
|
-
|
|
2139
|
-
class NggCoreWrapperModule {
|
|
2140
|
-
}
|
|
2141
|
-
NggCoreWrapperModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2142
|
-
NggCoreWrapperModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, declarations: [NggCoreElementDirective], imports: [CommonModule], exports: [NggCoreElementDirective] });
|
|
2143
|
-
NggCoreWrapperModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, imports: [CommonModule] });
|
|
2144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NggCoreWrapperModule, decorators: [{
|
|
2145
|
-
type: NgModule,
|
|
2146
|
-
args: [{
|
|
2147
|
-
declarations: [NggCoreElementDirective],
|
|
2148
|
-
imports: [CommonModule],
|
|
2149
|
-
exports: [NggCoreElementDirective],
|
|
2150
|
-
}]
|
|
2151
|
-
}] });
|
|
2152
|
-
|
|
2153
|
-
/**
|
|
2154
|
-
* Generated bundle index. Do not edit.
|
|
2155
|
-
*/
|
|
2156
|
-
|
|
2157
|
-
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggCellTableComponent, NggCellTableModule, NggContextMenuComponent, NggContextMenuModule, NggCoreElementDirective, NggCoreWrapperModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownButtonDirective, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggInPageWizardModule, NggInPageWizardStepCardComponent, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalFooterDirective, NggModalHeaderComponent, NggModalHeaderDirective, NggModalModule, NggModule, NggOnScrollDirective, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSharedModule, NggSliderComponent, NggSliderModule, NggSortableListComponent, NggSortableListModule, ON_SCROLL_TOKEN, dateValidator };
|
|
2158
|
-
//# sourceMappingURL=sebgroup-green-angular.mjs.map
|