@abgov/angular-components 1.8.0-beta.7 → 2.0.0-alpha.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/README.md +2 -0
- package/abgov-angular-components.metadata.json +1 -1
- package/bundles/abgov-angular-components.umd.js +262 -49
- package/bundles/abgov-angular-components.umd.js.map +1 -1
- package/esm2015/abgov-angular-components.js +1 -1
- package/esm2015/experimental/app-version-header/app-version-header.component.js +3 -3
- package/esm2015/experimental/badge/badge.component.js +2 -2
- package/esm2015/experimental/components.module.js +11 -3
- package/esm2015/experimental/index.js +2 -1
- package/esm2015/experimental/number-input/number-input.component.js +151 -0
- package/esm2015/index.js +2 -1
- package/esm2015/lib/angular-components.module.js +6 -3
- package/esm2015/lib/button/button.component.js +2 -2
- package/esm2015/lib/button-link/button-link.component.js +2 -2
- package/esm2015/lib/callout/callout.component.js +2 -2
- package/esm2015/lib/card/card.component.js +2 -2
- package/esm2015/lib/card/content/card-content.component.js +1 -1
- package/esm2015/lib/card/footer/card-footer.component.js +1 -1
- package/esm2015/lib/card/header/card-header.component.js +1 -1
- package/esm2015/lib/card/thumb/card-thumb.component.js +2 -2
- package/esm2015/lib/card-group/card.group.component.js +2 -2
- package/esm2015/lib/checkbox/checkbox-change.js +1 -1
- package/esm2015/lib/checkbox/checkbox.component.js +2 -2
- package/esm2015/lib/dropdown/dropdown.component.js +2 -2
- package/esm2015/lib/dropdown/option/option.component.js +1 -1
- package/esm2015/lib/dropdown/option-group/option-group.component.js +2 -2
- package/esm2015/lib/element-load-indicator/element-load-indicator.component.js +2 -2
- package/esm2015/lib/header/header.component.js +2 -2
- package/esm2015/lib/hero-banner/content/hero-banner-content.component.js +2 -2
- package/esm2015/lib/hero-banner/hero-banner.component.js +2 -2
- package/esm2015/lib/hero-banner/link/hero-banner-link.component.js +2 -2
- package/esm2015/lib/microsite-logo/microsite-logo.component.js +2 -2
- package/esm2015/lib/notification/notification.component.js +2 -2
- package/esm2015/lib/notification-banner/notification-banner.component.js +2 -2
- package/esm2015/lib/page-load-indicator/page-load-indicator.component.js +2 -2
- package/esm2015/lib/radio/radio-change.js +1 -1
- package/esm2015/lib/radio/radio.component.js +2 -2
- package/esm2015/lib/radio/radio.service.js +1 -1
- package/esm2015/lib/radio-group/radio-group.component.js +2 -2
- package/esm2015/lib/skeleton/skeleton-element.component.js +2 -2
- package/esm2015/lib/skeleton/skeleton-image-content.component.js +2 -2
- package/experimental/index.d.ts +1 -0
- package/experimental/number-input/number-input.component.d.ts +66 -0
- package/fesm2015/abgov-angular-components.js +190 -30
- package/fesm2015/abgov-angular-components.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +11 -8
- package/LICENSE +0 -21
- package/bundles/abgov-angular-components.umd.min.js +0 -2
- package/bundles/abgov-angular-components.umd.min.js.map +0 -1
- package/esm2015/abgov-angular-components.js.map +0 -1
- package/esm2015/abgov-angular-components.metadata.json +0 -1
- package/esm2015/experimental/app-version-header/app-version-header.component.js.map +0 -1
- package/esm2015/experimental/app-version-header/app-version-header.component.metadata.json +0 -1
- package/esm2015/experimental/badge/badge.component.js.map +0 -1
- package/esm2015/experimental/badge/badge.component.metadata.json +0 -1
- package/esm2015/experimental/components.module.js.map +0 -1
- package/esm2015/experimental/components.module.metadata.json +0 -1
- package/esm2015/experimental/index.js.map +0 -1
- package/esm2015/experimental/index.metadata.json +0 -1
- package/esm2015/index.js.map +0 -1
- package/esm2015/index.metadata.json +0 -1
- package/esm2015/lib/angular-components.module.js.map +0 -1
- package/esm2015/lib/angular-components.module.metadata.json +0 -1
- package/esm2015/lib/button/button.component.js.map +0 -1
- package/esm2015/lib/button/button.component.metadata.json +0 -1
- package/esm2015/lib/button-link/button-link.component.js.map +0 -1
- package/esm2015/lib/button-link/button-link.component.metadata.json +0 -1
- package/esm2015/lib/callout/callout.component.js.map +0 -1
- package/esm2015/lib/callout/callout.component.metadata.json +0 -1
- package/esm2015/lib/card/card.component.js.map +0 -1
- package/esm2015/lib/card/card.component.metadata.json +0 -1
- package/esm2015/lib/card/content/card-content.component.js.map +0 -1
- package/esm2015/lib/card/content/card-content.component.metadata.json +0 -1
- package/esm2015/lib/card/footer/card-footer.component.js.map +0 -1
- package/esm2015/lib/card/footer/card-footer.component.metadata.json +0 -1
- package/esm2015/lib/card/header/card-header.component.js.map +0 -1
- package/esm2015/lib/card/header/card-header.component.metadata.json +0 -1
- package/esm2015/lib/card/thumb/card-thumb.component.js.map +0 -1
- package/esm2015/lib/card/thumb/card-thumb.component.metadata.json +0 -1
- package/esm2015/lib/card-group/card.group.component.js.map +0 -1
- package/esm2015/lib/card-group/card.group.component.metadata.json +0 -1
- package/esm2015/lib/checkbox/checkbox-change.js.map +0 -1
- package/esm2015/lib/checkbox/checkbox-change.metadata.json +0 -1
- package/esm2015/lib/checkbox/checkbox.component.js.map +0 -1
- package/esm2015/lib/checkbox/checkbox.component.metadata.json +0 -1
- package/esm2015/lib/dropdown/dropdown.component.js.map +0 -1
- package/esm2015/lib/dropdown/dropdown.component.metadata.json +0 -1
- package/esm2015/lib/dropdown/option/option.component.js.map +0 -1
- package/esm2015/lib/dropdown/option/option.component.metadata.json +0 -1
- package/esm2015/lib/dropdown/option-group/option-group.component.js.map +0 -1
- package/esm2015/lib/dropdown/option-group/option-group.component.metadata.json +0 -1
- package/esm2015/lib/element-load-indicator/element-load-indicator.component.js.map +0 -1
- package/esm2015/lib/element-load-indicator/element-load-indicator.component.metadata.json +0 -1
- package/esm2015/lib/header/header.component.js.map +0 -1
- package/esm2015/lib/header/header.component.metadata.json +0 -1
- package/esm2015/lib/hero-banner/content/hero-banner-content.component.js.map +0 -1
- package/esm2015/lib/hero-banner/content/hero-banner-content.component.metadata.json +0 -1
- package/esm2015/lib/hero-banner/hero-banner.component.js.map +0 -1
- package/esm2015/lib/hero-banner/hero-banner.component.metadata.json +0 -1
- package/esm2015/lib/hero-banner/link/hero-banner-link.component.js.map +0 -1
- package/esm2015/lib/hero-banner/link/hero-banner-link.component.metadata.json +0 -1
- package/esm2015/lib/microsite-logo/microsite-logo.component.js.map +0 -1
- package/esm2015/lib/microsite-logo/microsite-logo.component.metadata.json +0 -1
- package/esm2015/lib/notification/notification.component.js.map +0 -1
- package/esm2015/lib/notification/notification.component.metadata.json +0 -1
- package/esm2015/lib/notification-banner/notification-banner.component.js.map +0 -1
- package/esm2015/lib/notification-banner/notification-banner.component.metadata.json +0 -1
- package/esm2015/lib/page-load-indicator/page-load-indicator.component.js.map +0 -1
- package/esm2015/lib/page-load-indicator/page-load-indicator.component.metadata.json +0 -1
- package/esm2015/lib/radio/radio-change.js.map +0 -1
- package/esm2015/lib/radio/radio-change.metadata.json +0 -1
- package/esm2015/lib/radio/radio.component.js.map +0 -1
- package/esm2015/lib/radio/radio.component.metadata.json +0 -1
- package/esm2015/lib/radio/radio.service.js.map +0 -1
- package/esm2015/lib/radio/radio.service.metadata.json +0 -1
- package/esm2015/lib/radio-group/radio-group.component.js.map +0 -1
- package/esm2015/lib/radio-group/radio-group.component.metadata.json +0 -1
- package/esm2015/lib/skeleton/skeleton-element.component.js.map +0 -1
- package/esm2015/lib/skeleton/skeleton-element.component.metadata.json +0 -1
- package/esm2015/lib/skeleton/skeleton-image-content.component.js.map +0 -1
- package/esm2015/lib/skeleton/skeleton-image-content.component.metadata.json +0 -1
- package/theme.css +0 -206
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/overlay'), require('@angular/forms'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@abgov/angular-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/overlay', '@angular/forms', 'rxjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abgov = global.abgov || {}, global.abgov[
|
|
5
|
-
}(this, (function (exports, i0, common, overlay, forms, rxjs) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@abgov/web-components'), require('@angular/core'), require('@angular/common'), require('@angular/cdk/overlay'), require('@angular/forms'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@abgov/angular-components', ['exports', '@abgov/web-components', '@angular/core', '@angular/common', '@angular/cdk/overlay', '@angular/forms', 'rxjs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abgov = global.abgov || {}, global.abgov["angular-components"] = {}), null, global.ng.core, global.ng.common, global.ng.cdk.overlay, global.ng.forms, global.rxjs));
|
|
5
|
+
})(this, (function (exports, webComponents, i0, common, overlay, forms, rxjs) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
6
26
|
|
|
7
27
|
/**
|
|
8
28
|
* A Government of Alberta styled button.
|
|
@@ -73,7 +93,7 @@
|
|
|
73
93
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
74
94
|
'button[goa-button], input[type="button"][goa-button], input[type="submit"][goa-button]',
|
|
75
95
|
template: "<ng-content></ng-content>\n",
|
|
76
|
-
styles: ["
|
|
96
|
+
styles: [""]
|
|
77
97
|
},] }
|
|
78
98
|
];
|
|
79
99
|
GoAButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -111,7 +131,7 @@
|
|
|
111
131
|
{ type: i0.Component, args: [{
|
|
112
132
|
selector: 'goa-microsite-logo',
|
|
113
133
|
template: "<a href=\"{{serviceHome}}\" attr.aria-label=\"{{serviceHome}}\" class=\"microsite-link\">\n <span class=\"image-desktop-tablet\"></span>\n <span class=\"image-mobile\"></span>\n <span class=\"name\">\n {{serviceName}}\n </span>\n</a>\n",
|
|
114
|
-
styles: ["
|
|
134
|
+
styles: [""]
|
|
115
135
|
},] }
|
|
116
136
|
];
|
|
117
137
|
GoAMicrositeLogoComponent.ctorParameters = function () { return []; };
|
|
@@ -162,7 +182,7 @@
|
|
|
162
182
|
{ type: i0.Component, args: [{
|
|
163
183
|
selector: 'goa-header',
|
|
164
184
|
template: "<header class=\"goa-header goa-official-site-header\">\n <div>\n <span class=\"service-level\" [ngClass]=\"serviceLevelCssClass()\">\n {{ serviceLevelFormatted() }}\n </span>\n </div>\n <div\n *ngIf=\"serviceLevel === 'live'; else elseNotLive\"\n class=\"site-text\"\n i18n=\"Alberta.ca official site text on header\"\n >\n An official site of the\n <a href=\"https://www.alberta.ca/index.aspx\" class=\"web-link\"\n >Alberta Government</a\n >\n </div>\n <ng-template #elseNotLive>\n <div class=\"site-text\" i18n=\"Alberta.ca site text on header\">\n This is a new\n <a href=\"https://www.alberta.ca/index.aspx\" class=\"web-link\"\n >Alberta Government</a\n >\n service\n </div>\n </ng-template>\n</header>\n<header class=\"goa-header goa-microsite-header\">\n <goa-microsite-logo\n [serviceName]=\"serviceName\"\n [serviceHome]=\"serviceHome\"\n ></goa-microsite-logo>\n <ng-content></ng-content>\n</header>\n",
|
|
165
|
-
styles: ["
|
|
185
|
+
styles: [""]
|
|
166
186
|
},] }
|
|
167
187
|
];
|
|
168
188
|
GoAHeaderComponent.ctorParameters = function () { return []; };
|
|
@@ -241,7 +261,7 @@
|
|
|
241
261
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
242
262
|
selector: 'a[goa-button]',
|
|
243
263
|
template: "<span>\n <ng-content></ng-content>\n</span>",
|
|
244
|
-
styles: ["
|
|
264
|
+
styles: [""]
|
|
245
265
|
},] }
|
|
246
266
|
];
|
|
247
267
|
GoAButtonLinkComponent.ctorParameters = function () { return []; };
|
|
@@ -326,6 +346,8 @@
|
|
|
326
346
|
return extendStatics(d, b);
|
|
327
347
|
};
|
|
328
348
|
function __extends(d, b) {
|
|
349
|
+
if (typeof b !== "function" && b !== null)
|
|
350
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
329
351
|
extendStatics(d, b);
|
|
330
352
|
function __() { this.constructor = d; }
|
|
331
353
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -511,11 +533,13 @@
|
|
|
511
533
|
}
|
|
512
534
|
return ar;
|
|
513
535
|
}
|
|
536
|
+
/** @deprecated */
|
|
514
537
|
function __spread() {
|
|
515
538
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
516
539
|
ar = ar.concat(__read(arguments[i]));
|
|
517
540
|
return ar;
|
|
518
541
|
}
|
|
542
|
+
/** @deprecated */
|
|
519
543
|
function __spreadArrays() {
|
|
520
544
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
521
545
|
s += arguments[i].length;
|
|
@@ -524,7 +548,17 @@
|
|
|
524
548
|
r[k] = a[j];
|
|
525
549
|
return r;
|
|
526
550
|
}
|
|
527
|
-
|
|
551
|
+
function __spreadArray(to, from, pack) {
|
|
552
|
+
if (pack || arguments.length === 2)
|
|
553
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
554
|
+
if (ar || !(i in from)) {
|
|
555
|
+
if (!ar)
|
|
556
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
557
|
+
ar[i] = from[i];
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
561
|
+
}
|
|
528
562
|
function __await(v) {
|
|
529
563
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
530
564
|
}
|
|
@@ -589,18 +623,21 @@
|
|
|
589
623
|
function __importDefault(mod) {
|
|
590
624
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
591
625
|
}
|
|
592
|
-
function __classPrivateFieldGet(receiver,
|
|
593
|
-
if (!
|
|
594
|
-
throw new TypeError("
|
|
595
|
-
|
|
596
|
-
|
|
626
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
627
|
+
if (kind === "a" && !f)
|
|
628
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
629
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
630
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
631
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
597
632
|
}
|
|
598
|
-
function __classPrivateFieldSet(receiver,
|
|
599
|
-
if (
|
|
600
|
-
throw new TypeError("
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
633
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
634
|
+
if (kind === "m")
|
|
635
|
+
throw new TypeError("Private method is not writable");
|
|
636
|
+
if (kind === "a" && !f)
|
|
637
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
638
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
639
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
640
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
604
641
|
}
|
|
605
642
|
|
|
606
643
|
/**
|
|
@@ -625,7 +662,7 @@
|
|
|
625
662
|
* @ignore
|
|
626
663
|
*/
|
|
627
664
|
GoAOptionGroupComponent.prototype.ngAfterViewInit = function () {
|
|
628
|
-
this._filteredOptions =
|
|
665
|
+
this._filteredOptions = __spreadArray([], __read(this.options));
|
|
629
666
|
// The template output cache is populated by child components during render, so tell angular that
|
|
630
667
|
// there have been changes during the render here.
|
|
631
668
|
this.cdr.detectChanges();
|
|
@@ -636,7 +673,7 @@
|
|
|
636
673
|
{ type: i0.Component, args: [{
|
|
637
674
|
selector: 'goa-option-group',
|
|
638
675
|
template: "<!--Grab the <option> template from the GoAOption -->\n<ng-template #optionGroupTemplate>\n <div class=\"goa-option-group\">\n {{label}}\n <div class=\"group-options\">\n <ng-container class=\"goa-option\"> \n <ng-template *ngFor=\"let option of _filteredOptions\" [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>",
|
|
639
|
-
styles: [".goa-option-group{font-weight:
|
|
676
|
+
styles: [".goa-option-group{font-weight:bold}.goa-option-group .group-options{padding-left:1em;font-weight:normal}\n"]
|
|
640
677
|
},] }
|
|
641
678
|
];
|
|
642
679
|
GoAOptionGroupComponent.ctorParameters = function () { return [
|
|
@@ -787,8 +824,8 @@
|
|
|
787
824
|
*/
|
|
788
825
|
GoADropdownComponent.prototype.ngAfterViewInit = function () {
|
|
789
826
|
this._triggerRect = this.textInput.nativeElement.getBoundingClientRect();
|
|
790
|
-
this._filteredOptions =
|
|
791
|
-
this._allFilteredOptions =
|
|
827
|
+
this._filteredOptions = __spreadArray([], __read(this.options));
|
|
828
|
+
this._allFilteredOptions = __spreadArray([], __read(this.allOptions));
|
|
792
829
|
if (this.selectedItems.length > 0) {
|
|
793
830
|
this.setTextInput(this.selectedItems[0].label);
|
|
794
831
|
}
|
|
@@ -913,7 +950,7 @@
|
|
|
913
950
|
if (this.allOptions === undefined) {
|
|
914
951
|
return [];
|
|
915
952
|
}
|
|
916
|
-
return
|
|
953
|
+
return __spreadArray([], __read(this.allOptions.filter(function (option) { return option.selected === true; })));
|
|
917
954
|
},
|
|
918
955
|
enumerable: false,
|
|
919
956
|
configurable: true
|
|
@@ -967,7 +1004,7 @@
|
|
|
967
1004
|
{ type: i0.Component, args: [{
|
|
968
1005
|
selector: 'goa-dropdown',
|
|
969
1006
|
template: "<div class=\"goa-dropdown\" [ngClass]=\"{\n 'single-selection': multiple === false,\n 'has-error': _requiredError === true,\n 'opened': _isOpen,\n 'disabled': disabled === true\n }\"> \n <label class=\"dropdown-label\">{{label}}\n <span *ngIf=\"required\" class=\"required-label\" i18n=\"Required label for dropdown\">(Required)</span>\n <div (click)=\"inputClicked()\" class=\"dropdown-grouping\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\">\n <i class=\"goa-select-icon\"></i>\n <input class=\"dropdown-textbox margin-override\" \n #textInput \n (input)=\"onFilterChange($event.target.value)\"\n type=\"text\" \n [attr.readonly]=\"typeaheadMode === 'none' ? 'readonly' : null\"\n [attr.disabled]=\"disabled === true ? 'true' : null\"\n placeholder=\"{{description}}\"> \n <ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"20\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"_isOpen = false\"\n (overlayKeydown)=\"overlayKeydown($event)\"\n (detach)=\"_isOpen = false\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"_isOpen\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayMinWidth]=\"_triggerRect?.width\"\n [cdkConnectedOverlayHeight]=\"menuHeight\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n >\n <div class=\"dropdown-menu\">\n <div *ngFor=\"let optionGroup of optionGroups\" class=\"option-group\">\n <div *ngIf=\"optionGroup._filteredOptions.length > 0\">\n <div class=\"option-group-label\">\n {{optionGroup.label}}\n </div>\n <!--Grab the <option> template from the GoAOption -->\n <div class=\"option\"\n [ngClass]=\"{\n 'selected': option.selected,\n 'active': option.id === _activeOption.id\n }\"\n *ngFor=\"let option of (optionGroup._filteredOptions)\" \n (click)=\"optionClicked(option)\"\n (mouseover)=\"setActiveOption(option)\">\n <ng-template [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </div>\n </div>\n </div>\n <!--Grab the <option> template from the GoAOption -->\n <div class=\"option\" \n [ngClass]=\"{\n 'selected': option.selected,\n 'active': option.id === _activeOption.id\n }\"\n *ngFor=\"let option of (_filteredOptions)\" \n (click)=\"optionClicked(option)\"\n (mouseover)=\"setActiveOption(option)\"> \n <ng-template [ngTemplateOutlet]=\"option.optionTemplate\"></ng-template>\n </div>\n </div> \n </ng-template> \n </div>\n <span *ngIf=\"!_requiredError\" class=\"helper-text\">{{description}}</span>\n <span *ngIf=\"_requiredError === true\" class=\"error-text\" i18n=\"Required warning for dropdown\">At least one item must be selected.</span> \n </label>\n</div>\n",
|
|
970
|
-
styles: ["
|
|
1007
|
+
styles: [""]
|
|
971
1008
|
},] }
|
|
972
1009
|
];
|
|
973
1010
|
GoADropdownComponent.ctorParameters = function () { return [
|
|
@@ -1112,7 +1149,7 @@
|
|
|
1112
1149
|
//register our custom ControlValueAccessor with angular DI system so angular knows how to get instance of it for ngModel binding
|
|
1113
1150
|
providers: [GOA_CHECKBOX_CONTROL_VALUE_ACCESSOR],
|
|
1114
1151
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1115
|
-
styles: ["
|
|
1152
|
+
styles: [""]
|
|
1116
1153
|
},] }
|
|
1117
1154
|
];
|
|
1118
1155
|
GoACheckboxComponent.ctorParameters = function () { return [
|
|
@@ -1143,7 +1180,7 @@
|
|
|
1143
1180
|
};
|
|
1144
1181
|
return GoARadioService;
|
|
1145
1182
|
}());
|
|
1146
|
-
GoARadioService.ɵprov =
|
|
1183
|
+
GoARadioService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GoARadioService_Factory() { return new GoARadioService(); }, token: GoARadioService, providedIn: "root" });
|
|
1147
1184
|
GoARadioService.decorators = [
|
|
1148
1185
|
{ type: i0.Injectable, args: [{
|
|
1149
1186
|
providedIn: 'root',
|
|
@@ -1279,7 +1316,7 @@
|
|
|
1279
1316
|
//register our custom ControlValueAccessor with angular DI system so angular knows how to get instance of it for ngModel binding
|
|
1280
1317
|
providers: [GOA_RADIO_CONTROL_VALUE_ACCESSOR],
|
|
1281
1318
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1282
|
-
styles: ["
|
|
1319
|
+
styles: [""]
|
|
1283
1320
|
},] }
|
|
1284
1321
|
];
|
|
1285
1322
|
GoARadioComponent.ctorParameters = function () { return [
|
|
@@ -1584,7 +1621,7 @@
|
|
|
1584
1621
|
{ provide: GOA_RADIO_GROUP, useExisting: GoARadioGroupComponent }
|
|
1585
1622
|
],
|
|
1586
1623
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1587
|
-
styles: ["
|
|
1624
|
+
styles: [""]
|
|
1588
1625
|
},] }
|
|
1589
1626
|
];
|
|
1590
1627
|
GoARadioGroupComponent.ctorParameters = function () { return [
|
|
@@ -1630,7 +1667,7 @@
|
|
|
1630
1667
|
{ type: i0.Component, args: [{
|
|
1631
1668
|
selector: 'goa-callout',
|
|
1632
1669
|
template: "<div\n class=\"goa-callout\"\n [ngClass]=\"{\n 'goa--event': type === 'event',\n 'goa--important': type === 'important',\n 'goa--emergency': type === 'emergency',\n 'goa--success': type === 'success'\n }\"\n>\n <div>\n <h3>{{ title }}</h3>\n <div class=\"messages\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n",
|
|
1633
|
-
styles: ["
|
|
1670
|
+
styles: [""]
|
|
1634
1671
|
},] }
|
|
1635
1672
|
];
|
|
1636
1673
|
GoACalloutComponent.ctorParameters = function () { return []; };
|
|
@@ -1684,7 +1721,7 @@
|
|
|
1684
1721
|
{ type: i0.Component, args: [{
|
|
1685
1722
|
selector: 'goa-notification',
|
|
1686
1723
|
template: "\n<div class=\"goa-notification\"\n [ngClass]=\"{\n 'dismissed': _isDismissed === true,\n 'goa--event': type === 'event',\n 'goa--important': type === 'important',\n 'goa--emergency': type === 'emergency'\n }\">\n <div class=\"content\">\n <a *ngIf=\"notificationUrl\" class=\"message\" href={{notificationUrl}}>{{message}}</a>\n <span *ngIf=\"!notificationUrl\" class=\"message\">{{message}}</span>\n <a *ngIf=\"isDismissable === true\" class=\"close\" i18n-title title=\"Dismiss\" (click)=\"dismissClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <path d=\"M 15.99 14.54C 15.99 14.54 14.54 15.99 14.54 15.99 14.54 15.99 8 9.45 8 9.45 8 9.45 1.46 15.99 1.46 15.99 1.46 15.99 0.01 14.54 0.01 14.54 0.01 14.54 6.55 8 6.55 8 6.55 8 0.01 1.46 0.01 1.46 0.01 1.46 1.46 0.01 1.46 0.01 1.46 0.01 8 6.55 8 6.55 8 6.55 14.54 0.01 14.54 0.01 14.54 0.01 15.99 1.46 15.99 1.46 15.99 1.46 9.45 8 9.45 8 9.45 8 15.99 14.54 15.99 14.54Z\"/>\n </svg>\n </a>\n </div>\n</div>\n\n",
|
|
1687
|
-
styles: ["
|
|
1724
|
+
styles: [""]
|
|
1688
1725
|
},] }
|
|
1689
1726
|
];
|
|
1690
1727
|
GoANotificationComponent.ctorParameters = function () { return [
|
|
@@ -1720,7 +1757,7 @@
|
|
|
1720
1757
|
{ type: i0.Component, args: [{
|
|
1721
1758
|
selector: 'goa-notification-banner',
|
|
1722
1759
|
template: "<div class=\"goa-notifications\">\r\n <h2 class=\"title\">{{title}}</h2>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n",
|
|
1723
|
-
styles: ["
|
|
1760
|
+
styles: [""]
|
|
1724
1761
|
},] }
|
|
1725
1762
|
];
|
|
1726
1763
|
GoANotificationBannerComponent.ctorParameters = function () { return []; };
|
|
@@ -1740,7 +1777,7 @@
|
|
|
1740
1777
|
{ type: i0.Component, args: [{
|
|
1741
1778
|
selector: 'goa-skeleton-image-content',
|
|
1742
1779
|
template: "<div class=\"skeleton-image-content\">\n <goa-skeleton-element type=\"thumbnail\"></goa-skeleton-element>\n <div class=\"skeleton-image-content__text\">\n <goa-skeleton-element\n type=\"title\"\n *ngFor=\"let i of arr(rows).fill(1)\"\n ></goa-skeleton-element>\n </div>\n</div>\n",
|
|
1743
|
-
styles: ["
|
|
1780
|
+
styles: [""]
|
|
1744
1781
|
},] }
|
|
1745
1782
|
];
|
|
1746
1783
|
GoASkeletonImageContentComponent.ctorParameters = function () { return []; };
|
|
@@ -1765,7 +1802,7 @@
|
|
|
1765
1802
|
{ type: i0.Component, args: [{
|
|
1766
1803
|
selector: 'goa-skeleton-element',
|
|
1767
1804
|
template: "<div [ngClass]=\"elementClass\"></div>",
|
|
1768
|
-
styles: ["
|
|
1805
|
+
styles: [""]
|
|
1769
1806
|
},] }
|
|
1770
1807
|
];
|
|
1771
1808
|
GoASkeletonElementComponent.ctorParameters = function () { return []; };
|
|
@@ -1842,7 +1879,7 @@
|
|
|
1842
1879
|
{ type: i0.Component, args: [{
|
|
1843
1880
|
selector: 'goa-card-thumb-image',
|
|
1844
1881
|
template: "<ng-container>\n <img src=\"{{url}}\" [attr.alt]=\"alt\">\n</ng-container>",
|
|
1845
|
-
styles: [":host
|
|
1882
|
+
styles: [":host img,:host iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}\n"]
|
|
1846
1883
|
},] }
|
|
1847
1884
|
];
|
|
1848
1885
|
GoACardThumbImageComponent.ctorParameters = function () { return []; };
|
|
@@ -1899,7 +1936,7 @@
|
|
|
1899
1936
|
{ type: i0.Component, args: [{
|
|
1900
1937
|
selector: 'goa-card',
|
|
1901
1938
|
template: "<div\n class=\"goa-card\"\n [ngClass]=\"{\n 'card-auto': cardSize === 'auto'\n }\" [attr.data-skeleton]=\"isSkeleton ? '' : null\"\n>\n <div class=\"goa-poster\">\n <ng-content select=\"goa-card-thumb-image\"></ng-content>\n </div>\n <div class=\"card-content\">\n <a class=\"goa-title\" href=\"{{ titleUrl }}\">\n <ng-content select=\"goa-card-header\"></ng-content>\n </a>\n <div class=\"goa-text\">\n <ng-content select=\"goa-card-content\"></ng-content>\n </div>\n <div class=\"goa-footer\">\n <ng-content select=\"goa-card-footer\"></ng-content>\n </div>\n </div>\n</div>\n",
|
|
1902
|
-
styles: ["
|
|
1939
|
+
styles: [""]
|
|
1903
1940
|
},] }
|
|
1904
1941
|
];
|
|
1905
1942
|
GoACardComponent.ctorParameters = function () { return []; };
|
|
@@ -1923,7 +1960,7 @@
|
|
|
1923
1960
|
{ type: i0.Component, args: [{
|
|
1924
1961
|
selector: 'goa-card-group',
|
|
1925
1962
|
template: "<ng-container>\n <div class=\"goa-card-group\">\n <div class=\"card-group-title\">{{ title }}</div>\n <div\n [ngClass]=\"{\n 'card-group-basic': layout === 'basic',\n 'card-group-column': layout === 'column'\n }\"\n >\n <ng-content></ng-content>\n <div *ngFor=\"let card of cardItems\">\n <goa-card titleUrl=\"{{ card.titleUrl }}\">\n <goa-card-thumb-image\n url=\"{{ card.cardImageUrl }}\"\n alt=\"hero pic\"\n ></goa-card-thumb-image>\n <goa-card-header>{{ card.title }}</goa-card-header>\n <goa-card-content>{{ card.description }}</goa-card-content>\n </goa-card>\n </div>\n </div>\n </div>\n</ng-container>\n",
|
|
1926
|
-
styles: ["
|
|
1963
|
+
styles: [""]
|
|
1927
1964
|
},] }
|
|
1928
1965
|
];
|
|
1929
1966
|
GoACardGroupComponent.ctorParameters = function () { return []; };
|
|
@@ -1944,7 +1981,7 @@
|
|
|
1944
1981
|
{ type: i0.Component, args: [{
|
|
1945
1982
|
selector: 'goa-hero-banner-content',
|
|
1946
1983
|
template: "<ng-container>\n <p class=\"goa-hero-banner-content\" role=\"note\">\n <ng-content></ng-content>\n </p>\n</ng-container>\n",
|
|
1947
|
-
styles: ["
|
|
1984
|
+
styles: [""]
|
|
1948
1985
|
},] }
|
|
1949
1986
|
];
|
|
1950
1987
|
GoAHeroBannerContentComponent.ctorParameters = function () { return []; };
|
|
@@ -1960,7 +1997,7 @@
|
|
|
1960
1997
|
{ type: i0.Component, args: [{
|
|
1961
1998
|
selector: 'goa-hero-banner-link',
|
|
1962
1999
|
template: "<ng-container>\n <a class=\"goa-link-button right-arrow\" [href]=\"url\" role=\"link\">\n <ng-content></ng-content>\n </a>\n</ng-container>\n",
|
|
1963
|
-
styles: ["
|
|
2000
|
+
styles: [""]
|
|
1964
2001
|
},] }
|
|
1965
2002
|
];
|
|
1966
2003
|
GoAHeroBannerLinkComponent.ctorParameters = function () { return []; };
|
|
@@ -1979,7 +2016,7 @@
|
|
|
1979
2016
|
{ type: i0.Component, args: [{
|
|
1980
2017
|
selector: 'goa-hero-banner',
|
|
1981
2018
|
template: "<div class=\"goa-hero\"\n style=\"background-image: linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.40) 40%, rgba(0, 0, 0, 0.6) 100%), url({{backgroundUrl}});\"\n>\n <h1 role=\"heading\">{{ title }}</h1>\n <ng-content select=\"goa-hero-banner-content\"></ng-content>\n <ng-content select=\"goa-hero-banner-link\"></ng-content>\n</div>\n",
|
|
1982
|
-
styles: ["
|
|
2019
|
+
styles: [""]
|
|
1983
2020
|
},] }
|
|
1984
2021
|
];
|
|
1985
2022
|
GoAHeroBannerComponent.ctorParameters = function () { return []; };
|
|
@@ -2090,7 +2127,7 @@
|
|
|
2090
2127
|
{ type: i0.Component, args: [{
|
|
2091
2128
|
selector: 'goa-page-load-indicator',
|
|
2092
2129
|
template: "<div *ngIf=\"visible\" class=\"progress-container--{{ displayType }}\">\n <svg\n [ngClass]=\"{\n 'svg': displayType === 'large',\n 'svg--small': displayType === 'small'\n }\"\n fill=\"none\"\n viewBox=\"0 0 100 100\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <circle class=\"base-circle\" cx=\"50\" cy=\"50\" r=\"45\"/>\n <circle\n [ngClass]=\"{\n 'progress-circle--infinite': type === 'infinite',\n 'progress-circle': type === 'progress'\n }\"\n cx=\"50\"\n cy=\"50\"\n r=\"45\"\n [style.stroke-dashoffset]=\"strokeDashoffset\"/>\n </svg>\n\n <span class=\"progress-message--{{ displayType }}\">\n {{ message }}\n </span>\n</div>\n",
|
|
2093
|
-
styles: ["
|
|
2130
|
+
styles: [""]
|
|
2094
2131
|
},] }
|
|
2095
2132
|
];
|
|
2096
2133
|
GoAPageLoadIndicatorComponent.ctorParameters = function () { return []; };
|
|
@@ -2156,7 +2193,7 @@
|
|
|
2156
2193
|
{ type: i0.Component, args: [{
|
|
2157
2194
|
selector: 'goa-element-load-indicator',
|
|
2158
2195
|
template: "<div *ngIf=\"visible\">\n <svg\n fill=\"none\"\n [attr.viewBox]=\"viewBox\"\n [attr.width]=\"radius\"\n [attr.height]=\"radius\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"base-circle\"\n [attr.cx]=\"radius\"\n [attr.cy]=\"radius\"\n [attr.r]=\"innerRadius\"\n [style.stroke]=\"baseColour\"\n />\n <circle\n class=\"rotating-circle\"\n [attr.cx]=\"radius\"\n [style.stroke-dasharray]=\"dashArray\"\n [style.stroke-dashoffset]=\"dashOffset\"\n [attr.cy]=\"radius\"\n [attr.r]=\"innerRadius\"\n [style.stroke]=\"spinnerColour\"\n />\n </svg>\n</div>\n",
|
|
2159
|
-
styles: ["
|
|
2196
|
+
styles: [""]
|
|
2160
2197
|
},] }
|
|
2161
2198
|
];
|
|
2162
2199
|
GoAElementLoadIndicatorComponent.ctorParameters = function () { return []; };
|
|
@@ -2232,9 +2269,12 @@
|
|
|
2232
2269
|
GoAPageLoadIndicatorComponent,
|
|
2233
2270
|
GoASkeletonImageContentComponent,
|
|
2234
2271
|
GoASkeletonElementComponent,
|
|
2235
|
-
GoAElementLoadIndicatorComponent
|
|
2272
|
+
GoAElementLoadIndicatorComponent,
|
|
2236
2273
|
],
|
|
2237
2274
|
providers: [GoARadioService],
|
|
2275
|
+
schemas: [
|
|
2276
|
+
i0.CUSTOM_ELEMENTS_SCHEMA
|
|
2277
|
+
]
|
|
2238
2278
|
},] }
|
|
2239
2279
|
];
|
|
2240
2280
|
|
|
@@ -2264,7 +2304,7 @@
|
|
|
2264
2304
|
selector: 'goa-badge',
|
|
2265
2305
|
template: "<div class=\"goa-badge\" [ngClass]=\"badgeClass\">\n <ng-content class=\"goa-badge-icon\" select=\"mat-icon,.goa-badge-icon\"></ng-content>\n <div class=\"goa-badge-content\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
2266
2306
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2267
|
-
styles: ["
|
|
2307
|
+
styles: [""]
|
|
2268
2308
|
},] }
|
|
2269
2309
|
];
|
|
2270
2310
|
GoABadgeComponent.ctorParameters = function () { return []; };
|
|
@@ -2289,9 +2329,9 @@
|
|
|
2289
2329
|
GoAAppVersionHeaderComponent.decorators = [
|
|
2290
2330
|
{ type: i0.Component, args: [{
|
|
2291
2331
|
selector: 'goa-app-version-header',
|
|
2292
|
-
template: "<div\n *ngIf=\"!isProdEnvironment && (closed | async) === null\"\n class=\"goa-app-version-header\"\n>\n <span class=\"content-wrapper\">\n <span class=\"environment-and-version\">{{ environment }} {{ version }}</span>\n <span class=\"close\" (click)=\"onCloseClick()\">
|
|
2332
|
+
template: "<div\n *ngIf=\"!isProdEnvironment && (closed | async) === null\"\n class=\"goa-app-version-header\"\n>\n <span class=\"content-wrapper\">\n <span class=\"environment-and-version\">{{ environment }} {{ version }}</span>\n <span class=\"close\" (click)=\"onCloseClick()\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"ionicon\"\n viewBox=\"0 0 512 512\"\n >\n <title>Close</title>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"32\"\n d=\"M368 368L144 144M368 144L144 368\"\n />\n </svg>\n </span>\n </span>\n</div>\n",
|
|
2293
2333
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2294
|
-
styles: ["
|
|
2334
|
+
styles: [""]
|
|
2295
2335
|
},] }
|
|
2296
2336
|
];
|
|
2297
2337
|
GoAAppVersionHeaderComponent.ctorParameters = function () { return []; };
|
|
@@ -2302,6 +2342,172 @@
|
|
|
2302
2342
|
closed: [{ type: i0.Output }]
|
|
2303
2343
|
};
|
|
2304
2344
|
|
|
2345
|
+
var GoANumberInputComponent = /** @class */ (function () {
|
|
2346
|
+
function GoANumberInputComponent() {
|
|
2347
|
+
this._isTouched = false;
|
|
2348
|
+
/**
|
|
2349
|
+
* Sets the step value that is used when incrementing / decrementing
|
|
2350
|
+
*
|
|
2351
|
+
* @memberof GoANumberInputComponent
|
|
2352
|
+
*/
|
|
2353
|
+
this.step = 1;
|
|
2354
|
+
/**
|
|
2355
|
+
* An event that fires whenever the value is changed
|
|
2356
|
+
*
|
|
2357
|
+
* @type {EventEmitter<number | undefined | null>}
|
|
2358
|
+
* @memberof GoANumberInputComponent
|
|
2359
|
+
*/
|
|
2360
|
+
this.valueChanged = new i0.EventEmitter();
|
|
2361
|
+
}
|
|
2362
|
+
Object.defineProperty(GoANumberInputComponent.prototype, "input", {
|
|
2363
|
+
get: function () {
|
|
2364
|
+
var _a;
|
|
2365
|
+
return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
2366
|
+
},
|
|
2367
|
+
enumerable: false,
|
|
2368
|
+
configurable: true
|
|
2369
|
+
});
|
|
2370
|
+
Object.defineProperty(GoANumberInputComponent.prototype, "value", {
|
|
2371
|
+
get: function () {
|
|
2372
|
+
return this._value;
|
|
2373
|
+
},
|
|
2374
|
+
/**
|
|
2375
|
+
* The value of the NumberInput
|
|
2376
|
+
*
|
|
2377
|
+
* @memberof GoANumberInputComponent
|
|
2378
|
+
*/
|
|
2379
|
+
set: function (val) {
|
|
2380
|
+
var _a;
|
|
2381
|
+
var newVal = (val === undefined || val === null || Number.isNaN(val)) ? null : this.clampValue(val);
|
|
2382
|
+
if (this._value !== newVal) {
|
|
2383
|
+
this._value = newVal;
|
|
2384
|
+
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, newVal);
|
|
2385
|
+
this.valueChanged.emit(newVal);
|
|
2386
|
+
}
|
|
2387
|
+
if (this.input && this.input.valueAsNumber !== newVal) {
|
|
2388
|
+
this.input.valueAsNumber = newVal;
|
|
2389
|
+
}
|
|
2390
|
+
},
|
|
2391
|
+
enumerable: false,
|
|
2392
|
+
configurable: true
|
|
2393
|
+
});
|
|
2394
|
+
Object.defineProperty(GoANumberInputComponent.prototype, "min", {
|
|
2395
|
+
get: function () {
|
|
2396
|
+
return this._min;
|
|
2397
|
+
},
|
|
2398
|
+
/**
|
|
2399
|
+
* Sets the minimum value that the number input can take
|
|
2400
|
+
*
|
|
2401
|
+
* @memberof GoANumberInputComponent
|
|
2402
|
+
*/
|
|
2403
|
+
set: function (min) {
|
|
2404
|
+
this._min = min;
|
|
2405
|
+
// force reevaluation / clamping
|
|
2406
|
+
this.value = this._value;
|
|
2407
|
+
},
|
|
2408
|
+
enumerable: false,
|
|
2409
|
+
configurable: true
|
|
2410
|
+
});
|
|
2411
|
+
Object.defineProperty(GoANumberInputComponent.prototype, "max", {
|
|
2412
|
+
get: function () {
|
|
2413
|
+
return this._max;
|
|
2414
|
+
},
|
|
2415
|
+
/**
|
|
2416
|
+
* Sets the maximum value that the number input can take
|
|
2417
|
+
*
|
|
2418
|
+
* @memberof GoANumberInputComponent
|
|
2419
|
+
*/
|
|
2420
|
+
set: function (max) {
|
|
2421
|
+
this._max = max;
|
|
2422
|
+
// force reevaluation / clamping
|
|
2423
|
+
this.value = this._value;
|
|
2424
|
+
},
|
|
2425
|
+
enumerable: false,
|
|
2426
|
+
configurable: true
|
|
2427
|
+
});
|
|
2428
|
+
GoANumberInputComponent.prototype.clampValue = function (val) {
|
|
2429
|
+
if (Number.isFinite(this.max)) {
|
|
2430
|
+
val = Math.min(this.max, val);
|
|
2431
|
+
}
|
|
2432
|
+
if (Number.isFinite(this.min)) {
|
|
2433
|
+
val = Math.max(val, this.min);
|
|
2434
|
+
}
|
|
2435
|
+
return val;
|
|
2436
|
+
};
|
|
2437
|
+
GoANumberInputComponent.prototype.markTouched = function () {
|
|
2438
|
+
var _a;
|
|
2439
|
+
if (this._isTouched === false) {
|
|
2440
|
+
this._isTouched = true;
|
|
2441
|
+
(_a = this.onTouched) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2444
|
+
GoANumberInputComponent.prototype.handleInput = function (event) {
|
|
2445
|
+
var _a;
|
|
2446
|
+
var inputString = (_a = event.data) !== null && _a !== void 0 ? _a : '';
|
|
2447
|
+
// If someone is typing a negative number, let them
|
|
2448
|
+
if (inputString.trim() !== '-') {
|
|
2449
|
+
this.value = event.target.valueAsNumber;
|
|
2450
|
+
}
|
|
2451
|
+
};
|
|
2452
|
+
/**
|
|
2453
|
+
* Increment the number input
|
|
2454
|
+
*
|
|
2455
|
+
* @memberof GoANumberInputComponent
|
|
2456
|
+
*/
|
|
2457
|
+
GoANumberInputComponent.prototype.increment = function () {
|
|
2458
|
+
// use built-in browser increment logic
|
|
2459
|
+
this.input.stepUp();
|
|
2460
|
+
this.value = this.input.valueAsNumber;
|
|
2461
|
+
};
|
|
2462
|
+
/**
|
|
2463
|
+
* Decrement the number input
|
|
2464
|
+
*
|
|
2465
|
+
* @memberof GoANumberInputComponent
|
|
2466
|
+
*/
|
|
2467
|
+
GoANumberInputComponent.prototype.decrement = function () {
|
|
2468
|
+
// use built-in browser decrement logic
|
|
2469
|
+
this.input.stepDown();
|
|
2470
|
+
this.value = this.input.valueAsNumber;
|
|
2471
|
+
};
|
|
2472
|
+
// CONTROL VALUE ACCESSOR INTERFACE
|
|
2473
|
+
GoANumberInputComponent.prototype.writeValue = function (value) {
|
|
2474
|
+
this.value = value;
|
|
2475
|
+
};
|
|
2476
|
+
GoANumberInputComponent.prototype.registerOnChange = function (handler) {
|
|
2477
|
+
this.onChange = handler;
|
|
2478
|
+
};
|
|
2479
|
+
GoANumberInputComponent.prototype.registerOnTouched = function (handler) {
|
|
2480
|
+
this.onTouched = handler;
|
|
2481
|
+
};
|
|
2482
|
+
GoANumberInputComponent.prototype.setDisabledState = function (isDisabled) {
|
|
2483
|
+
this.disabled = isDisabled;
|
|
2484
|
+
};
|
|
2485
|
+
return GoANumberInputComponent;
|
|
2486
|
+
}());
|
|
2487
|
+
GoANumberInputComponent.decorators = [
|
|
2488
|
+
{ type: i0.Component, args: [{
|
|
2489
|
+
selector: 'goa-number-input',
|
|
2490
|
+
template: "<div (focusout)=\"markTouched()\" class=\"number-input-container\">\n <button\n [disabled]=\"disabled || (min !== undefined && value <= min)\"\n goa-button\n buttonType=\"primary\"\n buttonSize=\"small\"\n type=\"button\"\n (click)=\"decrement()\"\n >\n <svg width=\"1em\" height=\"100%\" viewBox=\"0 0 100 100\">\n <line x1=\"25%\" y1=\"50%\" x2=\"75%\" y2=\"50%\" stroke-width=\"15%\" />\n </svg>\n </button>\n\n <input\n #numberInput\n type=\"number\"\n [min]=\"min\"\n [max]=\"max\"\n [value]=\"value\"\n [step]=\"step\"\n [disabled]=\"disabled\"\n (input)=\"handleInput($event)\"\n />\n\n <button\n goa-button\n [disabled]=\"disabled || (max !== undefined && value >= max)\"\n buttonType=\"primary\"\n buttonSize=\"small\"\n type=\"button\"\n (click)=\"increment()\"\n >\n <svg width=\"1em\" height=\"100%\" viewBox=\"0 0 100 100\">\n <line x1=\"25%\" y1=\"50%\" x2=\"75%\" y2=\"50%\" stroke-width=\"15%\" />\n <line x1=\"50%\" y1=\"25%\" x2=\"50%\" y2=\"75%\" stroke-width=\"15%\" />\n </svg>\n </button>\n</div>\n",
|
|
2491
|
+
providers: [
|
|
2492
|
+
{
|
|
2493
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
2494
|
+
useExisting: i0.forwardRef(function () { return GoANumberInputComponent; }),
|
|
2495
|
+
multi: true
|
|
2496
|
+
},
|
|
2497
|
+
],
|
|
2498
|
+
styles: [""]
|
|
2499
|
+
},] }
|
|
2500
|
+
];
|
|
2501
|
+
GoANumberInputComponent.propDecorators = {
|
|
2502
|
+
inputElement: [{ type: i0.ViewChild, args: ['numberInput',] }],
|
|
2503
|
+
disabled: [{ type: i0.Input }],
|
|
2504
|
+
step: [{ type: i0.Input }],
|
|
2505
|
+
valueChanged: [{ type: i0.Output }],
|
|
2506
|
+
value: [{ type: i0.Input }],
|
|
2507
|
+
min: [{ type: i0.Input }],
|
|
2508
|
+
max: [{ type: i0.Input }]
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2305
2511
|
var ExperimentalComponentsModule = /** @class */ (function () {
|
|
2306
2512
|
function ExperimentalComponentsModule() {
|
|
2307
2513
|
}
|
|
@@ -2309,16 +2515,22 @@
|
|
|
2309
2515
|
}());
|
|
2310
2516
|
ExperimentalComponentsModule.decorators = [
|
|
2311
2517
|
{ type: i0.NgModule, args: [{
|
|
2312
|
-
imports: [
|
|
2518
|
+
imports: [
|
|
2519
|
+
common.CommonModule,
|
|
2520
|
+
AngularComponentsModule
|
|
2521
|
+
],
|
|
2313
2522
|
exports: [
|
|
2314
2523
|
GoABadgeComponent,
|
|
2315
2524
|
GoAAppVersionHeaderComponent,
|
|
2525
|
+
GoANumberInputComponent,
|
|
2316
2526
|
],
|
|
2317
2527
|
declarations: [
|
|
2318
2528
|
GoABadgeComponent,
|
|
2319
2529
|
GoAAppVersionHeaderComponent,
|
|
2530
|
+
GoANumberInputComponent,
|
|
2320
2531
|
],
|
|
2321
2532
|
providers: [],
|
|
2533
|
+
schemas: [i0.CUSTOM_ELEMENTS_SCHEMA]
|
|
2322
2534
|
},] }
|
|
2323
2535
|
];
|
|
2324
2536
|
|
|
@@ -2354,6 +2566,7 @@
|
|
|
2354
2566
|
exports.GoAMicrositeLogoComponent = GoAMicrositeLogoComponent;
|
|
2355
2567
|
exports.GoANotificationBannerComponent = GoANotificationBannerComponent;
|
|
2356
2568
|
exports.GoANotificationComponent = GoANotificationComponent;
|
|
2569
|
+
exports.GoANumberInputComponent = GoANumberInputComponent;
|
|
2357
2570
|
exports.GoAOptionComponent = GoAOptionComponent;
|
|
2358
2571
|
exports.GoAOptionGroupComponent = GoAOptionGroupComponent;
|
|
2359
2572
|
exports.GoAPageLoadIndicatorComponent = GoAPageLoadIndicatorComponent;
|
|
@@ -2366,5 +2579,5 @@
|
|
|
2366
2579
|
|
|
2367
2580
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2368
2581
|
|
|
2369
|
-
}))
|
|
2582
|
+
}));
|
|
2370
2583
|
//# sourceMappingURL=abgov-angular-components.umd.js.map
|