@sebgroup/green-angular 1.7.0 → 1.7.2
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/index.mjs +2 -1
- package/esm2020/lib/context-menu/context-menu.component.mjs +38 -8
- package/esm2020/lib/context-menu/context-menu.module.mjs +2 -2
- package/esm2020/lib/green-angular.module.mjs +10 -6
- package/esm2020/lib/shared/index.mjs +3 -0
- package/esm2020/lib/shared/on-scroll.directive.mjs +47 -0
- package/esm2020/lib/shared/shared.module.mjs +18 -0
- package/fesm2015/sebgroup-green-angular.mjs +276 -181
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular.mjs +269 -179
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/context-menu/context-menu.component.d.ts +14 -5
- package/lib/green-angular.module.d.ts +2 -1
- package/lib/shared/index.d.ts +2 -0
- package/lib/shared/on-scroll.directive.d.ts +14 -0
- package/lib/shared/shared.module.d.ts +8 -0
- package/package.json +4 -4
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, ContentChildren, NgModule, ChangeDetectionStrategy, HostBinding, Directive, Injector, Inject, ViewChild, ContentChild, HostListener } from '@angular/core';
|
|
3
1
|
import * as i1 from '@angular/common';
|
|
4
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EventEmitter, Component, Input, Output, ContentChildren, NgModule, ChangeDetectionStrategy, HostBinding, InjectionToken, Directive, Optional, Inject, ViewChild, HostListener, Injector, ContentChild } from '@angular/core';
|
|
5
5
|
import { randomId, dropdownValues, createDropdown, months, years, createDatepicker, calculateDegrees, sliderColors, getSliderTrackBackground, PaginationI18n } from '@sebgroup/extract';
|
|
6
|
-
import * as i2 from '
|
|
6
|
+
import * as i2 from 'rxjs';
|
|
7
|
+
import { Subject, fromEvent, interval } from 'rxjs';
|
|
8
|
+
import { takeUntil, throttle } from 'rxjs/operators';
|
|
9
|
+
import * as i2$1 from '@angular/forms';
|
|
7
10
|
import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
8
11
|
import { startOfDay, endOfDay } from 'date-fns';
|
|
9
12
|
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
|
@@ -269,6 +272,194 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
269
272
|
}]
|
|
270
273
|
}] });
|
|
271
274
|
|
|
275
|
+
const ON_SCROLL_TOKEN = new InjectionToken('ON_SCROLL_TOKEN');
|
|
276
|
+
class NggOnScrollDirective {
|
|
277
|
+
constructor(elementRef) {
|
|
278
|
+
this.elementRef = elementRef;
|
|
279
|
+
this.onScroll$ = new Subject();
|
|
280
|
+
this.destroy$ = new Subject();
|
|
281
|
+
}
|
|
282
|
+
ngAfterViewInit() {
|
|
283
|
+
var _a;
|
|
284
|
+
if (this.elementRef) {
|
|
285
|
+
fromEvent((_a = this.elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement, 'scroll')
|
|
286
|
+
.pipe(takeUntil(this.destroy$), throttle(() => interval(30)))
|
|
287
|
+
.subscribe(() => {
|
|
288
|
+
this.onScroll$.next();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
ngOnDestroy() {
|
|
293
|
+
this.destroy$.next(null);
|
|
294
|
+
this.destroy$.complete();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
NggOnScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggOnScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
298
|
+
NggOnScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NggOnScrollDirective, selector: "[nggOnScroll]", providers: [
|
|
299
|
+
{
|
|
300
|
+
provide: ON_SCROLL_TOKEN,
|
|
301
|
+
useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
|
|
302
|
+
deps: [NggOnScrollDirective],
|
|
303
|
+
},
|
|
304
|
+
], ngImport: i0 });
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggOnScrollDirective, decorators: [{
|
|
306
|
+
type: Directive,
|
|
307
|
+
args: [{
|
|
308
|
+
selector: '[nggOnScroll]',
|
|
309
|
+
providers: [
|
|
310
|
+
{
|
|
311
|
+
provide: ON_SCROLL_TOKEN,
|
|
312
|
+
useFactory: (component) => component === null || component === void 0 ? void 0 : component.onScroll$,
|
|
313
|
+
deps: [NggOnScrollDirective],
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
}]
|
|
317
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
318
|
+
|
|
319
|
+
class NggContextMenuComponent {
|
|
320
|
+
constructor(changeDetectorRef, elementRef, closeContextMenu) {
|
|
321
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
322
|
+
this.elementRef = elementRef;
|
|
323
|
+
this.closeContextMenu = closeContextMenu;
|
|
324
|
+
this.direction = 'ltr';
|
|
325
|
+
this.menuItems = [];
|
|
326
|
+
this.menuItemTemplate = null;
|
|
327
|
+
this.menuAnchorTemplate = null;
|
|
328
|
+
this.closeOnScroll = false;
|
|
329
|
+
this.contextMenuItemClicked = new EventEmitter();
|
|
330
|
+
this.isActive = false;
|
|
331
|
+
this.top = '0px';
|
|
332
|
+
this.left = '0px';
|
|
333
|
+
}
|
|
334
|
+
onDocumentClick(target) {
|
|
335
|
+
if (!this.isActive) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const contextMenuElement = this.elementRef.nativeElement;
|
|
339
|
+
if (!contextMenuElement.contains(target)) {
|
|
340
|
+
this.close();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
ngOnInit() {
|
|
344
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
345
|
+
this.close();
|
|
346
|
+
});
|
|
347
|
+
this.resizeObserver.observe(document.body);
|
|
348
|
+
}
|
|
349
|
+
ngAfterViewInit() {
|
|
350
|
+
var _a;
|
|
351
|
+
if (this.closeOnScroll) {
|
|
352
|
+
this.menuCloseSubscription = (_a = this.closeContextMenu) === null || _a === void 0 ? void 0 : _a.subscribe(() => this.close());
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
ngOnDestroy() {
|
|
356
|
+
var _a, _b;
|
|
357
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.unobserve(document.body);
|
|
358
|
+
(_b = this.menuCloseSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
359
|
+
}
|
|
360
|
+
open() {
|
|
361
|
+
var _a;
|
|
362
|
+
if (this.isActive) {
|
|
363
|
+
this.close();
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
const anchor = (_a = this.anchor) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
367
|
+
const buttonRect = anchor.getBoundingClientRect();
|
|
368
|
+
const left = this.calculateLeft(this.direction, buttonRect);
|
|
369
|
+
const top = this.calculateTop(buttonRect.bottom);
|
|
370
|
+
const gapBetweenButtonAndPopover = 3;
|
|
371
|
+
this.left = `${left}px`;
|
|
372
|
+
this.top = `${top + gapBetweenButtonAndPopover}px`;
|
|
373
|
+
this.isActive = true;
|
|
374
|
+
}
|
|
375
|
+
close() {
|
|
376
|
+
this.isActive = false;
|
|
377
|
+
this.changeDetectorRef.markForCheck();
|
|
378
|
+
}
|
|
379
|
+
onItemClick(item) {
|
|
380
|
+
this.contextMenuItemClicked.emit(item);
|
|
381
|
+
this.close();
|
|
382
|
+
}
|
|
383
|
+
onMenuItemKeyDown(event, menuItem) {
|
|
384
|
+
switch (event.key) {
|
|
385
|
+
case 'Enter':
|
|
386
|
+
case ' ':
|
|
387
|
+
event.preventDefault();
|
|
388
|
+
this.onItemClick(menuItem);
|
|
389
|
+
break;
|
|
390
|
+
default:
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
calculateTop(buttonRectBottom) {
|
|
395
|
+
return buttonRectBottom + window.pageYOffset;
|
|
396
|
+
}
|
|
397
|
+
calculateLeft(direction, buttonRect) {
|
|
398
|
+
var _a;
|
|
399
|
+
const popover = (_a = this.popover) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
400
|
+
const popoverWidth = (popover === null || popover === void 0 ? void 0 : popover.offsetWidth) || 0;
|
|
401
|
+
switch (direction) {
|
|
402
|
+
case 'rtl':
|
|
403
|
+
return popoverWidth <= buttonRect.left
|
|
404
|
+
? buttonRect.right - popoverWidth
|
|
405
|
+
: buttonRect.left;
|
|
406
|
+
case 'ltr':
|
|
407
|
+
default:
|
|
408
|
+
return buttonRect.right + popoverWidth <= window.innerWidth
|
|
409
|
+
? buttonRect.left
|
|
410
|
+
: buttonRect.right - popoverWidth;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
NggContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: ON_SCROLL_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
415
|
+
NggContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NggContextMenuComponent, selector: "ngg-context-menu", inputs: { direction: "direction", menuItems: "menuItems", menuItemTemplate: "menuItemTemplate", menuAnchorTemplate: "menuAnchorTemplate", closeOnScroll: "closeOnScroll" }, outputs: { contextMenuItemClicked: "contextMenuItemClicked" }, host: { listeners: { "document:click": "onDocumentClick($event.target)" } }, viewQueries: [{ propertyName: "popover", first: true, predicate: ["contextMenuPopover"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["contextMenuAnchor"], descendants: true }], ngImport: i0, template: "<button\n #contextMenuAnchor\n class=\"ghost small px-3\"\n [class.active]=\"isActive\"\n (click)=\"open()\"\n>\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n</button>\n\n<div\n class=\"popover popover-context-menu\"\n [class.active]=\"isActive\"\n [style.top]=\"top\"\n [style.left]=\"left\"\n #contextMenuPopover\n>\n <ul role=\"listbox\">\n <li\n *ngFor=\"let menuItem of menuItems\"\n (click)=\"onItemClick(menuItem)\"\n tabindex=\"0\"\n (keydown)=\"onMenuItemKeyDown($event, menuItem)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </li>\n </ul>\n</div>\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"] }] });
|
|
416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuComponent, decorators: [{
|
|
417
|
+
type: Component,
|
|
418
|
+
args: [{ selector: 'ngg-context-menu', template: "<button\n #contextMenuAnchor\n class=\"ghost small px-3\"\n [class.active]=\"isActive\"\n (click)=\"open()\"\n>\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n</button>\n\n<div\n class=\"popover popover-context-menu\"\n [class.active]=\"isActive\"\n [style.top]=\"top\"\n [style.left]=\"left\"\n #contextMenuPopover\n>\n <ul role=\"listbox\">\n <li\n *ngFor=\"let menuItem of menuItems\"\n (click)=\"onItemClick(menuItem)\"\n tabindex=\"0\"\n (keydown)=\"onMenuItemKeyDown($event, menuItem)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </li>\n </ul>\n</div>\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" }]
|
|
419
|
+
}], ctorParameters: function () {
|
|
420
|
+
return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i2.Subject, decorators: [{
|
|
421
|
+
type: Optional
|
|
422
|
+
}, {
|
|
423
|
+
type: Inject,
|
|
424
|
+
args: [ON_SCROLL_TOKEN]
|
|
425
|
+
}] }];
|
|
426
|
+
}, propDecorators: { direction: [{
|
|
427
|
+
type: Input
|
|
428
|
+
}], menuItems: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}], menuItemTemplate: [{
|
|
431
|
+
type: Input
|
|
432
|
+
}], menuAnchorTemplate: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], closeOnScroll: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}], contextMenuItemClicked: [{
|
|
437
|
+
type: Output
|
|
438
|
+
}], popover: [{
|
|
439
|
+
type: ViewChild,
|
|
440
|
+
args: ['contextMenuPopover']
|
|
441
|
+
}], anchor: [{
|
|
442
|
+
type: ViewChild,
|
|
443
|
+
args: ['contextMenuAnchor']
|
|
444
|
+
}], onDocumentClick: [{
|
|
445
|
+
type: HostListener,
|
|
446
|
+
args: ['document:click', ['$event.target']]
|
|
447
|
+
}] } });
|
|
448
|
+
|
|
449
|
+
class NggContextMenuModule {
|
|
450
|
+
}
|
|
451
|
+
NggContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
452
|
+
NggContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, declarations: [NggContextMenuComponent], imports: [CommonModule], exports: [NggContextMenuComponent] });
|
|
453
|
+
NggContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, imports: [CommonModule] });
|
|
454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, decorators: [{
|
|
455
|
+
type: NgModule,
|
|
456
|
+
args: [{
|
|
457
|
+
declarations: [NggContextMenuComponent],
|
|
458
|
+
imports: [CommonModule],
|
|
459
|
+
exports: [NggContextMenuComponent],
|
|
460
|
+
}]
|
|
461
|
+
}] });
|
|
462
|
+
|
|
272
463
|
class NggDropdownOptionDirective {
|
|
273
464
|
constructor(templateRef) {
|
|
274
465
|
this.templateRef = templateRef;
|
|
@@ -715,6 +906,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
715
906
|
}]
|
|
716
907
|
}] });
|
|
717
908
|
|
|
909
|
+
class NggInPageWizardStepCardComponent {
|
|
910
|
+
constructor() {
|
|
911
|
+
this.handleNextClick = new EventEmitter();
|
|
912
|
+
this.handleEditClick = new EventEmitter();
|
|
913
|
+
this.stepText = '';
|
|
914
|
+
this.title = '';
|
|
915
|
+
this.editBtnText = '';
|
|
916
|
+
this.nextBtnText = '';
|
|
917
|
+
this.isCompleted = false;
|
|
918
|
+
this.disableNext = false;
|
|
919
|
+
this.isActive = false;
|
|
920
|
+
}
|
|
921
|
+
handleOnEditBtnClick(event) {
|
|
922
|
+
this.isActive = !this.isActive;
|
|
923
|
+
this.handleEditClick.emit(event);
|
|
924
|
+
}
|
|
925
|
+
handleOnNextBtnClick(event) {
|
|
926
|
+
this.isActive = false;
|
|
927
|
+
this.isCompleted = true;
|
|
928
|
+
this.handleNextClick.emit(event);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
NggInPageWizardStepCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardStepCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
932
|
+
NggInPageWizardStepCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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"] }] });
|
|
933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardStepCardComponent, decorators: [{
|
|
934
|
+
type: Component,
|
|
935
|
+
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" }]
|
|
936
|
+
}], propDecorators: { handleNextClick: [{
|
|
937
|
+
type: Output
|
|
938
|
+
}], handleEditClick: [{
|
|
939
|
+
type: Output
|
|
940
|
+
}], stepText: [{
|
|
941
|
+
type: Input
|
|
942
|
+
}], title: [{
|
|
943
|
+
type: Input
|
|
944
|
+
}], editBtnText: [{
|
|
945
|
+
type: Input
|
|
946
|
+
}], nextBtnText: [{
|
|
947
|
+
type: Input
|
|
948
|
+
}], isCompleted: [{
|
|
949
|
+
type: Input
|
|
950
|
+
}], disableNext: [{
|
|
951
|
+
type: Input
|
|
952
|
+
}], isActive: [{
|
|
953
|
+
type: Input
|
|
954
|
+
}] } });
|
|
955
|
+
|
|
956
|
+
class NggInPageWizardModule {
|
|
957
|
+
}
|
|
958
|
+
NggInPageWizardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
959
|
+
NggInPageWizardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, declarations: [NggInPageWizardStepCardComponent], imports: [CommonModule], exports: [NggInPageWizardStepCardComponent] });
|
|
960
|
+
NggInPageWizardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, imports: [CommonModule] });
|
|
961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, decorators: [{
|
|
962
|
+
type: NgModule,
|
|
963
|
+
args: [{
|
|
964
|
+
declarations: [NggInPageWizardStepCardComponent],
|
|
965
|
+
imports: [CommonModule],
|
|
966
|
+
exports: [NggInPageWizardStepCardComponent],
|
|
967
|
+
}]
|
|
968
|
+
}] });
|
|
969
|
+
|
|
718
970
|
class NggModalComponent {
|
|
719
971
|
constructor(ref, configurableFocusTrapFactory) {
|
|
720
972
|
this.ref = ref;
|
|
@@ -1029,6 +1281,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1029
1281
|
}]
|
|
1030
1282
|
}] });
|
|
1031
1283
|
|
|
1284
|
+
class NggSharedModule {
|
|
1285
|
+
}
|
|
1286
|
+
NggSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1287
|
+
NggSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NggSharedModule, declarations: [NggOnScrollDirective], imports: [CommonModule], exports: [NggOnScrollDirective] });
|
|
1288
|
+
NggSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggSharedModule, imports: [CommonModule] });
|
|
1289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggSharedModule, decorators: [{
|
|
1290
|
+
type: NgModule,
|
|
1291
|
+
args: [{
|
|
1292
|
+
declarations: [NggOnScrollDirective],
|
|
1293
|
+
imports: [CommonModule],
|
|
1294
|
+
exports: [NggOnScrollDirective],
|
|
1295
|
+
}]
|
|
1296
|
+
}] });
|
|
1297
|
+
|
|
1032
1298
|
class NggSliderComponent {
|
|
1033
1299
|
constructor() {
|
|
1034
1300
|
this.name = `${randomId()}-slider`;
|
|
@@ -1095,7 +1361,7 @@ NggSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
|
1095
1361
|
useExisting: NggSliderComponent,
|
|
1096
1362
|
multi: true,
|
|
1097
1363
|
},
|
|
1098
|
-
], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\">{{ 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\">\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=\"number\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\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.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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1364
|
+
], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!!label\" class=\"gds-slider-label-container\">\n <div>\n <label [attr.for]=\"name\">{{ 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\">\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=\"number\"\n [(ngModel)]=\"value\"\n [class.is-invalid]=\"!!errorMessage\"\n [attr.name]=\"name\"\n [attr.id]=\"name + '-textbox'\"\n [attr.placeholder]=\"placeholder\"\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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1099
1365
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggSliderComponent, decorators: [{
|
|
1100
1366
|
type: Component,
|
|
1101
1367
|
args: [{ selector: 'ngg-slider', providers: [
|
|
@@ -1149,180 +1415,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1149
1415
|
}]
|
|
1150
1416
|
}] });
|
|
1151
1417
|
|
|
1152
|
-
class NggContextMenuComponent {
|
|
1153
|
-
constructor(elementRef) {
|
|
1154
|
-
this.elementRef = elementRef;
|
|
1155
|
-
this.direction = 'ltr';
|
|
1156
|
-
this.menuItems = [];
|
|
1157
|
-
this.menuItemTemplate = null;
|
|
1158
|
-
this.menuAnchorTemplate = null;
|
|
1159
|
-
this.contextMenuItemClicked = new EventEmitter();
|
|
1160
|
-
this.isActive = false;
|
|
1161
|
-
this.top = '0px';
|
|
1162
|
-
this.left = '0px';
|
|
1163
|
-
}
|
|
1164
|
-
onDocumentClick(target) {
|
|
1165
|
-
if (!this.isActive) {
|
|
1166
|
-
return;
|
|
1167
|
-
}
|
|
1168
|
-
const contextMenuElement = this.elementRef.nativeElement;
|
|
1169
|
-
if (!contextMenuElement.contains(target)) {
|
|
1170
|
-
this.close();
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
open() {
|
|
1174
|
-
var _a;
|
|
1175
|
-
if (this.isActive) {
|
|
1176
|
-
this.close();
|
|
1177
|
-
return;
|
|
1178
|
-
}
|
|
1179
|
-
const anchor = (_a = this.anchor) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
1180
|
-
const buttonRect = anchor.getBoundingClientRect();
|
|
1181
|
-
const left = this.calculateLeft(this.direction, buttonRect);
|
|
1182
|
-
const top = this.calculateTop(buttonRect.bottom);
|
|
1183
|
-
this.left = `${left}px`;
|
|
1184
|
-
this.top = `${top}px`;
|
|
1185
|
-
this.isActive = true;
|
|
1186
|
-
}
|
|
1187
|
-
close() {
|
|
1188
|
-
this.isActive = false;
|
|
1189
|
-
}
|
|
1190
|
-
onItemClick(item) {
|
|
1191
|
-
this.contextMenuItemClicked.emit(item);
|
|
1192
|
-
this.close();
|
|
1193
|
-
}
|
|
1194
|
-
onMenuItemKeyDown(event, menuItem) {
|
|
1195
|
-
switch (event.key) {
|
|
1196
|
-
case 'Enter':
|
|
1197
|
-
case ' ':
|
|
1198
|
-
event.preventDefault();
|
|
1199
|
-
this.onItemClick(menuItem);
|
|
1200
|
-
break;
|
|
1201
|
-
default:
|
|
1202
|
-
break;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
calculateTop(buttonRectBottom) {
|
|
1206
|
-
return buttonRectBottom + window.pageYOffset;
|
|
1207
|
-
}
|
|
1208
|
-
calculateLeft(direction, buttonRect) {
|
|
1209
|
-
var _a;
|
|
1210
|
-
const popover = (_a = this.popover) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
1211
|
-
const popoverWidth = (popover === null || popover === void 0 ? void 0 : popover.offsetWidth) || 0;
|
|
1212
|
-
switch (direction) {
|
|
1213
|
-
case 'rtl':
|
|
1214
|
-
return popoverWidth <= buttonRect.left
|
|
1215
|
-
? buttonRect.right - popoverWidth
|
|
1216
|
-
: buttonRect.left;
|
|
1217
|
-
case 'ltr':
|
|
1218
|
-
default:
|
|
1219
|
-
return buttonRect.right + popoverWidth <= window.innerWidth
|
|
1220
|
-
? buttonRect.left
|
|
1221
|
-
: buttonRect.right - popoverWidth;
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
NggContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1226
|
-
NggContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NggContextMenuComponent, selector: "ngg-context-menu", inputs: { direction: "direction", menuItems: "menuItems", menuItemTemplate: "menuItemTemplate", menuAnchorTemplate: "menuAnchorTemplate" }, outputs: { contextMenuItemClicked: "contextMenuItemClicked" }, host: { listeners: { "document:click": "onDocumentClick($event.target)" } }, viewQueries: [{ propertyName: "popover", first: true, predicate: ["contextMenuPopover"], descendants: true }, { propertyName: "anchor", first: true, predicate: ["contextMenuAnchor"], descendants: true }], ngImport: i0, template: "<button #contextMenuAnchor class=\"ghost small\" (click)=\"open()\">\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n</button>\n\n<div\n class=\"popover popover-context-menu\"\n [class.active]=\"isActive\"\n [style.top]=\"top\"\n [style.left]=\"left\"\n #contextMenuPopover\n>\n <ul role=\"listbox\">\n <li\n *ngFor=\"let menuItem of menuItems\"\n (click)=\"onItemClick(menuItem)\"\n tabindex=\"0\"\n (keydown)=\"onMenuItemKeyDown($event, menuItem)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </li>\n </ul>\n</div>\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"] }] });
|
|
1227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuComponent, decorators: [{
|
|
1228
|
-
type: Component,
|
|
1229
|
-
args: [{ selector: 'ngg-context-menu', template: "<button #contextMenuAnchor class=\"ghost small\" (click)=\"open()\">\n <ng-container\n [ngTemplateOutlet]=\"menuAnchorTemplate ?? defaultButtonTemplate\"\n >\n </ng-container>\n</button>\n\n<div\n class=\"popover popover-context-menu\"\n [class.active]=\"isActive\"\n [style.top]=\"top\"\n [style.left]=\"left\"\n #contextMenuPopover\n>\n <ul role=\"listbox\">\n <li\n *ngFor=\"let menuItem of menuItems\"\n (click)=\"onItemClick(menuItem)\"\n tabindex=\"0\"\n (keydown)=\"onMenuItemKeyDown($event, menuItem)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"menuItemTemplate ?? defaultMenuItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"\n >\n </ng-container>\n </li>\n </ul>\n</div>\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" }]
|
|
1230
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { direction: [{
|
|
1231
|
-
type: Input
|
|
1232
|
-
}], menuItems: [{
|
|
1233
|
-
type: Input
|
|
1234
|
-
}], menuItemTemplate: [{
|
|
1235
|
-
type: Input
|
|
1236
|
-
}], menuAnchorTemplate: [{
|
|
1237
|
-
type: Input
|
|
1238
|
-
}], contextMenuItemClicked: [{
|
|
1239
|
-
type: Output
|
|
1240
|
-
}], popover: [{
|
|
1241
|
-
type: ViewChild,
|
|
1242
|
-
args: ['contextMenuPopover']
|
|
1243
|
-
}], anchor: [{
|
|
1244
|
-
type: ViewChild,
|
|
1245
|
-
args: ['contextMenuAnchor']
|
|
1246
|
-
}], onDocumentClick: [{
|
|
1247
|
-
type: HostListener,
|
|
1248
|
-
args: ['document:click', ['$event.target']]
|
|
1249
|
-
}] } });
|
|
1250
|
-
|
|
1251
|
-
class NggContextMenuModule {
|
|
1252
|
-
}
|
|
1253
|
-
NggContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1254
|
-
NggContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, declarations: [NggContextMenuComponent], imports: [CommonModule], exports: [NggContextMenuComponent] });
|
|
1255
|
-
NggContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, imports: [CommonModule] });
|
|
1256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggContextMenuModule, decorators: [{
|
|
1257
|
-
type: NgModule,
|
|
1258
|
-
args: [{
|
|
1259
|
-
declarations: [NggContextMenuComponent],
|
|
1260
|
-
imports: [CommonModule],
|
|
1261
|
-
exports: [NggContextMenuComponent],
|
|
1262
|
-
}]
|
|
1263
|
-
}] });
|
|
1264
|
-
|
|
1265
|
-
class NggInPageWizardStepCardComponent {
|
|
1266
|
-
constructor() {
|
|
1267
|
-
this.handleNextClick = new EventEmitter();
|
|
1268
|
-
this.handleEditClick = new EventEmitter();
|
|
1269
|
-
this.stepText = '';
|
|
1270
|
-
this.title = '';
|
|
1271
|
-
this.editBtnText = '';
|
|
1272
|
-
this.nextBtnText = '';
|
|
1273
|
-
this.isCompleted = false;
|
|
1274
|
-
this.disableNext = false;
|
|
1275
|
-
this.isActive = false;
|
|
1276
|
-
}
|
|
1277
|
-
handleOnEditBtnClick(event) {
|
|
1278
|
-
this.isActive = !this.isActive;
|
|
1279
|
-
this.handleEditClick.emit(event);
|
|
1280
|
-
}
|
|
1281
|
-
handleOnNextBtnClick(event) {
|
|
1282
|
-
this.isActive = false;
|
|
1283
|
-
this.isCompleted = true;
|
|
1284
|
-
this.handleNextClick.emit(event);
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
NggInPageWizardStepCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardStepCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1288
|
-
NggInPageWizardStepCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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"] }] });
|
|
1289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardStepCardComponent, decorators: [{
|
|
1290
|
-
type: Component,
|
|
1291
|
-
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" }]
|
|
1292
|
-
}], propDecorators: { handleNextClick: [{
|
|
1293
|
-
type: Output
|
|
1294
|
-
}], handleEditClick: [{
|
|
1295
|
-
type: Output
|
|
1296
|
-
}], stepText: [{
|
|
1297
|
-
type: Input
|
|
1298
|
-
}], title: [{
|
|
1299
|
-
type: Input
|
|
1300
|
-
}], editBtnText: [{
|
|
1301
|
-
type: Input
|
|
1302
|
-
}], nextBtnText: [{
|
|
1303
|
-
type: Input
|
|
1304
|
-
}], isCompleted: [{
|
|
1305
|
-
type: Input
|
|
1306
|
-
}], disableNext: [{
|
|
1307
|
-
type: Input
|
|
1308
|
-
}], isActive: [{
|
|
1309
|
-
type: Input
|
|
1310
|
-
}] } });
|
|
1311
|
-
|
|
1312
|
-
class NggInPageWizardModule {
|
|
1313
|
-
}
|
|
1314
|
-
NggInPageWizardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1315
|
-
NggInPageWizardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, declarations: [NggInPageWizardStepCardComponent], imports: [CommonModule], exports: [NggInPageWizardStepCardComponent] });
|
|
1316
|
-
NggInPageWizardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, imports: [CommonModule] });
|
|
1317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggInPageWizardModule, decorators: [{
|
|
1318
|
-
type: NgModule,
|
|
1319
|
-
args: [{
|
|
1320
|
-
declarations: [NggInPageWizardStepCardComponent],
|
|
1321
|
-
imports: [CommonModule],
|
|
1322
|
-
exports: [NggInPageWizardStepCardComponent],
|
|
1323
|
-
}]
|
|
1324
|
-
}] });
|
|
1325
|
-
|
|
1326
1418
|
class NggModule {
|
|
1327
1419
|
}
|
|
1328
1420
|
NggModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1336,7 +1428,8 @@ NggModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
1336
1428
|
NggSegmentedControlModule,
|
|
1337
1429
|
NggSliderModule,
|
|
1338
1430
|
NggContextMenuModule,
|
|
1339
|
-
NggInPageWizardModule
|
|
1431
|
+
NggInPageWizardModule,
|
|
1432
|
+
NggSharedModule] });
|
|
1340
1433
|
NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggModule, imports: [CommonModule, NggAccordionModule,
|
|
1341
1434
|
NggBadgeModule,
|
|
1342
1435
|
NggButtonModule,
|
|
@@ -1347,7 +1440,8 @@ NggModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
|
1347
1440
|
NggSegmentedControlModule,
|
|
1348
1441
|
NggSliderModule,
|
|
1349
1442
|
NggContextMenuModule,
|
|
1350
|
-
NggInPageWizardModule
|
|
1443
|
+
NggInPageWizardModule,
|
|
1444
|
+
NggSharedModule] });
|
|
1351
1445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NggModule, decorators: [{
|
|
1352
1446
|
type: NgModule,
|
|
1353
1447
|
args: [{
|
|
@@ -1365,6 +1459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1365
1459
|
NggSliderModule,
|
|
1366
1460
|
NggContextMenuModule,
|
|
1367
1461
|
NggInPageWizardModule,
|
|
1462
|
+
NggSharedModule,
|
|
1368
1463
|
],
|
|
1369
1464
|
}]
|
|
1370
1465
|
}] });
|
|
@@ -1558,5 +1653,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1558
1653
|
* Generated bundle index. Do not edit.
|
|
1559
1654
|
*/
|
|
1560
1655
|
|
|
1561
|
-
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggContextMenuComponent, NggContextMenuModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownButtonDirective, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggInPageWizardModule, NggInPageWizardStepCardComponent, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSliderComponent, NggSliderModule, dateValidator };
|
|
1656
|
+
export { NggAccordionComponent, NggAccordionListItemComponent, NggAccordionModule, NggBadgeComponent, NggBadgeModule, NggButtonComponent, NggButtonModule, NggContextMenuComponent, NggContextMenuModule, NggDatepickerComponent, NggDatepickerModule, NggDropdownButtonDirective, NggDropdownComponent, NggDropdownModule, NggDropdownOptionDirective, NggInPageWizardModule, NggInPageWizardStepCardComponent, NggModalBodyComponent, NggModalComponent, NggModalFooterComponent, NggModalHeaderComponent, NggModalModule, NggModule, NggOnScrollDirective, NggPaginationComponent, NggPaginationModule, NggProgressCircleComponent, NggProgressCircleModule, NggSegmentedControlComponent, NggSegmentedControlModule, NggSharedModule, NggSliderComponent, NggSliderModule, ON_SCROLL_TOKEN, dateValidator };
|
|
1562
1657
|
//# sourceMappingURL=sebgroup-green-angular.mjs.map
|