@abgov/angular-components 2.0.0-alpha.5 → 2.0.0-alpha.7
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 +3 -45
- package/abgov-angular-components.d.ts +1 -0
- package/bundles/abgov-angular-components.umd.js +176 -2565
- package/bundles/abgov-angular-components.umd.js.map +1 -1
- package/esm2015/index.js +3 -27
- package/esm2015/lib/angular-components.module.js +16 -94
- package/esm2015/lib/value-directive.js +133 -0
- package/fesm2015/abgov-angular-components.js +119 -2007
- package/fesm2015/abgov-angular-components.js.map +1 -1
- package/index.d.ts +2 -26
- package/lib/angular-components.module.d.ts +7 -0
- package/lib/value-directive.d.ts +34 -0
- package/package.json +8 -13
- package/abgov-angular-components.metadata.json +0 -1
- package/esm2015/experimental/app-version-header/app-version-header.component.js +0 -30
- package/esm2015/experimental/badge/badge.component.js +0 -24
- package/esm2015/experimental/components.module.js +0 -29
- package/esm2015/experimental/index.js +0 -5
- package/esm2015/experimental/number-input/number-input.component.js +0 -151
- package/esm2015/lib/button/button.component.js +0 -66
- package/esm2015/lib/button-link/button-link.component.js +0 -66
- package/esm2015/lib/callout/callout.component.js +0 -34
- package/esm2015/lib/card/card.component.js +0 -37
- package/esm2015/lib/card/content/card-content.component.js +0 -24
- package/esm2015/lib/card/footer/card-footer.component.js +0 -24
- package/esm2015/lib/card/header/card-header.component.js +0 -24
- package/esm2015/lib/card/thumb/card-thumb.component.js +0 -27
- package/esm2015/lib/card-group/card.group.component.js +0 -23
- package/esm2015/lib/checkbox/checkbox-change.js +0 -3
- package/esm2015/lib/checkbox/checkbox.component.js +0 -136
- package/esm2015/lib/dropdown/dropdown.component.js +0 -326
- package/esm2015/lib/dropdown/option/option.component.js +0 -48
- package/esm2015/lib/dropdown/option-group/option-group.component.js +0 -46
- package/esm2015/lib/element-load-indicator/element-load-indicator.component.js +0 -63
- package/esm2015/lib/header/header.component.js +0 -47
- package/esm2015/lib/hero-banner/content/hero-banner-content.component.js +0 -15
- package/esm2015/lib/hero-banner/hero-banner.component.js +0 -21
- package/esm2015/lib/hero-banner/link/hero-banner-link.component.js +0 -18
- package/esm2015/lib/microsite-logo/microsite-logo.component.js +0 -34
- package/esm2015/lib/notification/notification.component.js +0 -59
- package/esm2015/lib/notification-banner/notification-banner.component.js +0 -32
- package/esm2015/lib/page-load-indicator/page-load-indicator.component.js +0 -117
- package/esm2015/lib/radio/radio-change.js +0 -3
- package/esm2015/lib/radio/radio.component.js +0 -146
- package/esm2015/lib/radio/radio.service.js +0 -20
- package/esm2015/lib/radio-group/radio-group.component.js +0 -282
- package/esm2015/lib/skeleton/skeleton-element.component.js +0 -21
- package/esm2015/lib/skeleton/skeleton-image-content.component.js +0 -19
- package/experimental/app-version-header/app-version-header.component.d.ts +0 -10
- package/experimental/badge/badge.component.d.ts +0 -7
- package/experimental/components.module.d.ts +0 -2
- package/experimental/index.d.ts +0 -4
- package/experimental/number-input/number-input.component.d.ts +0 -66
- package/lib/button/button.component.d.ts +0 -37
- package/lib/button-link/button-link.component.d.ts +0 -38
- package/lib/callout/callout.component.d.ts +0 -20
- package/lib/card/card.component.d.ts +0 -23
- package/lib/card/content/card-content.component.d.ts +0 -14
- package/lib/card/footer/card-footer.component.d.ts +0 -14
- package/lib/card/header/card-header.component.d.ts +0 -14
- package/lib/card/thumb/card-thumb.component.d.ts +0 -22
- package/lib/card-group/card.group.component.d.ts +0 -32
- package/lib/checkbox/checkbox-change.d.ts +0 -7
- package/lib/checkbox/checkbox.component.d.ts +0 -100
- package/lib/dropdown/dropdown.component.d.ts +0 -193
- package/lib/dropdown/option/option.component.d.ts +0 -39
- package/lib/dropdown/option-group/option-group.component.d.ts +0 -38
- package/lib/element-load-indicator/element-load-indicator.component.d.ts +0 -38
- package/lib/header/header.component.d.ts +0 -29
- package/lib/hero-banner/content/hero-banner-content.component.d.ts +0 -5
- package/lib/hero-banner/hero-banner.component.d.ts +0 -9
- package/lib/hero-banner/link/hero-banner-link.component.d.ts +0 -6
- package/lib/microsite-logo/microsite-logo.component.d.ts +0 -20
- package/lib/notification/notification.component.d.ts +0 -43
- package/lib/notification-banner/notification-banner.component.d.ts +0 -22
- package/lib/page-load-indicator/page-load-indicator.component.d.ts +0 -55
- package/lib/radio/radio-change.d.ts +0 -7
- package/lib/radio/radio.component.d.ts +0 -119
- package/lib/radio/radio.service.d.ts +0 -7
- package/lib/radio-group/radio-group.component.d.ts +0 -190
- package/lib/skeleton/skeleton-element.component.d.ts +0 -5
- package/lib/skeleton/skeleton-image-content.component.d.ts +0 -5
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { OnInit, EventEmitter, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import { GoARadioChange } from './radio-change';
|
|
5
|
-
import { GoARadioService } from './radio.service';
|
|
6
|
-
/**
|
|
7
|
-
* Control value accessor to use for the component's provider
|
|
8
|
-
* @ignore
|
|
9
|
-
*/
|
|
10
|
-
export declare const GOA_RADIO_CONTROL_VALUE_ACCESSOR: {
|
|
11
|
-
provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
|
|
12
|
-
useExisting: import("@angular/core").Type<any>;
|
|
13
|
-
multi: boolean;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Radiobutton component with Government of Alberta styling.
|
|
17
|
-
*/
|
|
18
|
-
export declare class GoARadioComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
19
|
-
private _changeDetector;
|
|
20
|
-
private _radioService;
|
|
21
|
-
/**
|
|
22
|
-
* Used to generate unique Id for this component
|
|
23
|
-
* @ignore
|
|
24
|
-
*/
|
|
25
|
-
static idNum: number;
|
|
26
|
-
/**
|
|
27
|
-
* Unique Id for this component
|
|
28
|
-
* @ignore
|
|
29
|
-
*/
|
|
30
|
-
uniqueId: string;
|
|
31
|
-
/**
|
|
32
|
-
* Reference to the subscription to the radio change events so it can be unsubscribed on destroy
|
|
33
|
-
* @ignore
|
|
34
|
-
*/
|
|
35
|
-
radioServiceSubscription: Subscription;
|
|
36
|
-
/**
|
|
37
|
-
* Indicates the "group" or set of radios this radio belongs to.
|
|
38
|
-
*/
|
|
39
|
-
name: string;
|
|
40
|
-
/**
|
|
41
|
-
* Value/unique identifier for the object the radiobutton represents.
|
|
42
|
-
*/
|
|
43
|
-
value: any;
|
|
44
|
-
/**
|
|
45
|
-
* Boolean indicating whether or not the radiobutton is checked/selected.
|
|
46
|
-
*/
|
|
47
|
-
checked: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Boolean indicating whether or not the radiobutton is disabled.
|
|
50
|
-
*/
|
|
51
|
-
disabled: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Boolean indicating whether or not the radiobutton is required.
|
|
54
|
-
*/
|
|
55
|
-
required: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* The position to display the label/text for the radiobutton. Valid values are before and after.
|
|
58
|
-
*/
|
|
59
|
-
labelPosition: 'before' | 'after';
|
|
60
|
-
/**
|
|
61
|
-
* Event emitted containing the source radiobutton, and whether or not it is checked.
|
|
62
|
-
*/
|
|
63
|
-
selectionChange: EventEmitter<GoARadioChange>;
|
|
64
|
-
/**
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
_onTouchedCallback: () => void;
|
|
68
|
-
/**
|
|
69
|
-
* @ignore
|
|
70
|
-
*/
|
|
71
|
-
_propagateChange: (_: any) => void;
|
|
72
|
-
constructor(_changeDetector: ChangeDetectorRef, _radioService: GoARadioService);
|
|
73
|
-
/**
|
|
74
|
-
* Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to know whether or not
|
|
75
|
-
* this radio should be checked or not.
|
|
76
|
-
* @ignore
|
|
77
|
-
*/
|
|
78
|
-
ngOnInit(): void;
|
|
79
|
-
/**
|
|
80
|
-
* Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
|
|
81
|
-
* @ignore
|
|
82
|
-
*/
|
|
83
|
-
ngOnDestroy(): void;
|
|
84
|
-
/**
|
|
85
|
-
* Boolean indicating if the radiobutton is required and not checked
|
|
86
|
-
* @ignore
|
|
87
|
-
*/
|
|
88
|
-
hasError(): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Marks the radio button as needing checking for change detection.
|
|
91
|
-
* This method is exposed because the parent radio group will directly
|
|
92
|
-
* update bound properties of the radio button.
|
|
93
|
-
*/
|
|
94
|
-
markForCheck(): void;
|
|
95
|
-
/**
|
|
96
|
-
* Implemented as part of ControlValueAccessor.
|
|
97
|
-
* @param value The model bound property, i.e. the value of checked
|
|
98
|
-
* @ignore
|
|
99
|
-
*/
|
|
100
|
-
writeValue(value: any): void;
|
|
101
|
-
/**
|
|
102
|
-
* Implemented as part of ControlValueAccessor.
|
|
103
|
-
* @param fn The function to call on change. Provided by ControlValueAccessor
|
|
104
|
-
* @ignore
|
|
105
|
-
*/
|
|
106
|
-
registerOnChange(fn: any): void;
|
|
107
|
-
/**
|
|
108
|
-
* Implemented as part of ControlValueAccessor.
|
|
109
|
-
* @param fn The function to call on touch. Provided by ControlValueAccessor
|
|
110
|
-
* @ignore
|
|
111
|
-
*/
|
|
112
|
-
registerOnTouched(fn: any): void;
|
|
113
|
-
/**
|
|
114
|
-
* User interaction event on click of the radiobutton or its label to indicate toggling of the current checked status.
|
|
115
|
-
* Emits selectionChange to parent components.
|
|
116
|
-
* @ignore
|
|
117
|
-
*/
|
|
118
|
-
onClick(): void;
|
|
119
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { OnInit, EventEmitter, ChangeDetectorRef, QueryList, InjectionToken, AfterContentInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { GoARadioComponent } from '../radio/radio.component';
|
|
4
|
-
import { GoARadioChange } from '../radio/radio-change';
|
|
5
|
-
import { GoARadioService } from '../radio/radio.service';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
/**
|
|
8
|
-
* Control value accessor to use for the component's provider
|
|
9
|
-
* @ignore
|
|
10
|
-
*/
|
|
11
|
-
export declare const GOA_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: {
|
|
12
|
-
provide: InjectionToken<readonly ControlValueAccessor[]>;
|
|
13
|
-
useExisting: import("@angular/core").Type<any>;
|
|
14
|
-
multi: boolean;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Injection token that can be used to inject instances of `GoARadioGroupComponent`. It serves as
|
|
18
|
-
* alternative token to the actual `GoARadioGroupComponent` class which could cause unnecessary
|
|
19
|
-
* retention of the class and its component metadata.
|
|
20
|
-
* @ignore
|
|
21
|
-
*/
|
|
22
|
-
export declare const GOA_RADIO_GROUP: InjectionToken<GoARadioGroupComponent>;
|
|
23
|
-
/**
|
|
24
|
-
* Radiobutton group component with Government of Alberta styling. Used to group a set of related radio buttons.
|
|
25
|
-
*/
|
|
26
|
-
export declare class GoARadioGroupComponent implements ControlValueAccessor, OnInit, AfterContentInit, OnDestroy {
|
|
27
|
-
private _changeDetector;
|
|
28
|
-
private _radioService;
|
|
29
|
-
/**
|
|
30
|
-
* Used to generate unique Id for this component
|
|
31
|
-
* @ignore
|
|
32
|
-
*/
|
|
33
|
-
static idNum: number;
|
|
34
|
-
/**
|
|
35
|
-
* Unique Id for this component
|
|
36
|
-
* @ignore
|
|
37
|
-
*/
|
|
38
|
-
uniqueId: string;
|
|
39
|
-
/**
|
|
40
|
-
* Reference to the subscription to the radio change events so it can be unsubscribed on destroy
|
|
41
|
-
* @ignore
|
|
42
|
-
*/
|
|
43
|
-
radioServiceSubscription: Subscription;
|
|
44
|
-
/**
|
|
45
|
-
* The child radio buttons inside the radio group
|
|
46
|
-
*/
|
|
47
|
-
_radios: QueryList<GoARadioComponent>;
|
|
48
|
-
/**
|
|
49
|
-
* @ignore
|
|
50
|
-
*/
|
|
51
|
-
private _name;
|
|
52
|
-
/**
|
|
53
|
-
* @ignore
|
|
54
|
-
*/
|
|
55
|
-
private _value;
|
|
56
|
-
/**
|
|
57
|
-
* @ignore
|
|
58
|
-
*/
|
|
59
|
-
private _selected;
|
|
60
|
-
/**
|
|
61
|
-
* @ignore
|
|
62
|
-
*/
|
|
63
|
-
private _required;
|
|
64
|
-
/**
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
private _disabled;
|
|
68
|
-
/**
|
|
69
|
-
* @ignore
|
|
70
|
-
*/
|
|
71
|
-
private _labelPosition;
|
|
72
|
-
/**
|
|
73
|
-
* The title for the radio group. Put the question being asked here
|
|
74
|
-
*/
|
|
75
|
-
title: string;
|
|
76
|
-
/**
|
|
77
|
-
* Helper text to provide further context as to what the radio group is for/asking
|
|
78
|
-
*/
|
|
79
|
-
helperText: string;
|
|
80
|
-
/**
|
|
81
|
-
* The error message to display when the radio group selection is required and nothing has been selected
|
|
82
|
-
*/
|
|
83
|
-
requiredErrorMessage: string;
|
|
84
|
-
/**
|
|
85
|
-
* Indicates the "group" or set of radios this radio belongs to.
|
|
86
|
-
*/
|
|
87
|
-
get name(): string;
|
|
88
|
-
set name(value: string);
|
|
89
|
-
/**
|
|
90
|
-
* Value/unique identifier for the object the radiobutton represents.
|
|
91
|
-
*/
|
|
92
|
-
get value(): any;
|
|
93
|
-
set value(newValue: any);
|
|
94
|
-
/**
|
|
95
|
-
* The currently selected radio.
|
|
96
|
-
*/
|
|
97
|
-
get selected(): GoARadioComponent | null;
|
|
98
|
-
set selected(selected: GoARadioComponent | null);
|
|
99
|
-
/**
|
|
100
|
-
* Boolean indicating whether or not the radiobutton is disabled.
|
|
101
|
-
*/
|
|
102
|
-
get disabled(): boolean;
|
|
103
|
-
set disabled(value: boolean);
|
|
104
|
-
/**
|
|
105
|
-
* Boolean indicating whether or not the radiobutton is required.
|
|
106
|
-
*/
|
|
107
|
-
get required(): boolean;
|
|
108
|
-
set required(value: boolean);
|
|
109
|
-
/**
|
|
110
|
-
* The position to display the label/text for the radiobutton. Valid values are before and after.
|
|
111
|
-
*/
|
|
112
|
-
get labelPosition(): 'before' | 'after';
|
|
113
|
-
set labelPosition(position: 'before' | 'after');
|
|
114
|
-
/**
|
|
115
|
-
* Event emitted containing the source radiobutton, and whether or not it is checked.
|
|
116
|
-
*/
|
|
117
|
-
selectionChange: EventEmitter<GoARadioChange>;
|
|
118
|
-
/**
|
|
119
|
-
* @ignore
|
|
120
|
-
*/
|
|
121
|
-
_onTouchedCallback: () => void;
|
|
122
|
-
/**
|
|
123
|
-
* @ignore
|
|
124
|
-
*/
|
|
125
|
-
_propagateChange: (_: any) => void;
|
|
126
|
-
constructor(_changeDetector: ChangeDetectorRef, _radioService: GoARadioService);
|
|
127
|
-
/**
|
|
128
|
-
* Lifecycle hook AfterContentInit. Used to set properties on child radios based on the radio group's properties.
|
|
129
|
-
* @ignore
|
|
130
|
-
*/
|
|
131
|
-
ngAfterContentInit(): void;
|
|
132
|
-
/**
|
|
133
|
-
* Lifecycle hook OnInit. Used to subscribe to radio change messages from the radioService in order to set the 'selected' property
|
|
134
|
-
* of the radio group based on which radio was selected
|
|
135
|
-
* @ignore
|
|
136
|
-
*/
|
|
137
|
-
ngOnInit(): void;
|
|
138
|
-
/**
|
|
139
|
-
* Lifecycle hook OnDestroy. Used to unsubscribe from the radio change messages.
|
|
140
|
-
* @ignore
|
|
141
|
-
*/
|
|
142
|
-
ngOnDestroy(): void;
|
|
143
|
-
/**
|
|
144
|
-
* Updates the `selected` radio button from the internal _value state.
|
|
145
|
-
*/
|
|
146
|
-
private _updateSelectedRadioFromValue;
|
|
147
|
-
/**
|
|
148
|
-
* Sets the selected radio to checked if it is not already checked
|
|
149
|
-
*/
|
|
150
|
-
private _setSelectedRadioToChecked;
|
|
151
|
-
/**
|
|
152
|
-
* Updates the 'name' property of the child radio buttons to match that of the group so they all function together
|
|
153
|
-
*/
|
|
154
|
-
private _updateRadioButtonNames;
|
|
155
|
-
/**
|
|
156
|
-
* Updates the 'disabled' property of the child radio buttons to match the disabled state of the radio group
|
|
157
|
-
*/
|
|
158
|
-
private _updateRadioButtonDisabled;
|
|
159
|
-
/**
|
|
160
|
-
* Updates the 'required' property of the child radio buttons to match the required state of the radio group
|
|
161
|
-
*/
|
|
162
|
-
private _updateRadioButtonRequired;
|
|
163
|
-
/**
|
|
164
|
-
* Updates the 'labelPosition' property of the child radio buttons to match the labelPosition state of the radio group
|
|
165
|
-
*/
|
|
166
|
-
private _updateRadioButtonLabelPosition;
|
|
167
|
-
/**
|
|
168
|
-
* Boolean indicating if the radiobutton is required and not checked
|
|
169
|
-
* @ignore
|
|
170
|
-
*/
|
|
171
|
-
hasError(): boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Implemented as part of ControlValueAccessor.
|
|
174
|
-
* @param value The model bound property, i.e. the value of checked
|
|
175
|
-
* @ignore
|
|
176
|
-
*/
|
|
177
|
-
writeValue(value: any): void;
|
|
178
|
-
/**
|
|
179
|
-
* Implemented as part of ControlValueAccessor.
|
|
180
|
-
* @param fn The function to call on change. Provided by ControlValueAccessor
|
|
181
|
-
* @ignore
|
|
182
|
-
*/
|
|
183
|
-
registerOnChange(fn: any): void;
|
|
184
|
-
/**
|
|
185
|
-
* Implemented as part of ControlValueAccessor.
|
|
186
|
-
* @param fn The function to call on touch. Provided by ControlValueAccessor
|
|
187
|
-
* @ignore
|
|
188
|
-
*/
|
|
189
|
-
registerOnTouched(fn: any): void;
|
|
190
|
-
}
|