@haiilo/catalyst-angular 0.15.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/karma.conf.js +44 -0
- package/ng-package.json +10 -0
- package/package.json +7 -24
- package/src/index.ts +1 -0
- package/src/lib/catalyst.module.ts +65 -0
- package/src/lib/directives/angular-component-lib/utils.ts +63 -0
- package/src/lib/directives/boolean-value-accessor.ts +27 -0
- package/src/lib/directives/proxies.ts +650 -0
- package/src/lib/directives/radio-value-accessor.ts +24 -0
- package/src/lib/directives/select-value-accessor.ts +24 -0
- package/src/lib/directives/text-value-accessor.ts +24 -0
- package/src/lib/directives/value-accessor.ts +39 -0
- package/{public-api.d.ts → src/public-api.ts} +0 -0
- package/src/test.ts +28 -0
- package/tsconfig.lib.json +20 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/esm2020/haiilo-catalyst-angular.mjs +0 -5
- package/esm2020/lib/catalyst.module.mjs +0 -75
- package/esm2020/lib/directives/angular-component-lib/utils.mjs +0 -53
- package/esm2020/lib/directives/boolean-value-accessor.mjs +0 -38
- package/esm2020/lib/directives/proxies.mjs +0 -621
- package/esm2020/lib/directives/radio-value-accessor.mjs +0 -35
- package/esm2020/lib/directives/select-value-accessor.mjs +0 -35
- package/esm2020/lib/directives/text-value-accessor.mjs +0 -35
- package/esm2020/lib/directives/value-accessor.mjs +0 -40
- package/esm2020/public-api.mjs +0 -8
- package/fesm2015/haiilo-catalyst-angular.mjs +0 -886
- package/fesm2015/haiilo-catalyst-angular.mjs.map +0 -1
- package/fesm2020/haiilo-catalyst-angular.mjs +0 -886
- package/fesm2020/haiilo-catalyst-angular.mjs.map +0 -1
- package/haiilo-catalyst-angular.d.ts +0 -5
- package/lib/catalyst.module.d.ts +0 -16
- package/lib/directives/angular-component-lib/utils.d.ts +0 -9
- package/lib/directives/boolean-value-accessor.d.ts +0 -9
- package/lib/directives/proxies.d.ts +0 -359
- package/lib/directives/radio-value-accessor.d.ts +0 -8
- package/lib/directives/select-value-accessor.d.ts +0 -8
- package/lib/directives/text-value-accessor.d.ts +0 -8
- package/lib/directives/value-accessor.d.ts +0 -18
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* auto-generated angular directive proxies */
|
|
3
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, NgZone } from '@angular/core';
|
|
4
|
+
import { ProxyCmp, proxyOutputs } from './angular-component-lib/utils';
|
|
5
|
+
|
|
6
|
+
import { Components } from '@haiilo/catalyst';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export declare interface CatAlert extends Components.CatAlert {}
|
|
12
|
+
|
|
13
|
+
@ProxyCmp({
|
|
14
|
+
defineCustomElementFn: undefined,
|
|
15
|
+
inputs: ['color', 'icon', 'noIcon']
|
|
16
|
+
})
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'cat-alert',
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
template: '<ng-content></ng-content>',
|
|
21
|
+
inputs: ['color', 'icon', 'noIcon']
|
|
22
|
+
})
|
|
23
|
+
export class CatAlert {
|
|
24
|
+
protected el: HTMLElement;
|
|
25
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
26
|
+
c.detach();
|
|
27
|
+
this.el = r.nativeElement;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export declare interface CatAvatar extends Components.CatAvatar {}
|
|
33
|
+
|
|
34
|
+
@ProxyCmp({
|
|
35
|
+
defineCustomElementFn: undefined,
|
|
36
|
+
inputs: ['icon', 'initials', 'label', 'round', 'size', 'src', 'url', 'urlTarget']
|
|
37
|
+
})
|
|
38
|
+
@Component({
|
|
39
|
+
selector: 'cat-avatar',
|
|
40
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41
|
+
template: '<ng-content></ng-content>',
|
|
42
|
+
inputs: ['icon', 'initials', 'label', 'round', 'size', 'src', 'url', 'urlTarget']
|
|
43
|
+
})
|
|
44
|
+
export class CatAvatar {
|
|
45
|
+
protected el: HTMLElement;
|
|
46
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
47
|
+
c.detach();
|
|
48
|
+
this.el = r.nativeElement;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export declare interface CatBadge extends Components.CatBadge {}
|
|
54
|
+
|
|
55
|
+
@ProxyCmp({
|
|
56
|
+
defineCustomElementFn: undefined,
|
|
57
|
+
inputs: ['color', 'pulse', 'round', 'size', 'variant']
|
|
58
|
+
})
|
|
59
|
+
@Component({
|
|
60
|
+
selector: 'cat-badge',
|
|
61
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
62
|
+
template: '<ng-content></ng-content>',
|
|
63
|
+
inputs: ['color', 'pulse', 'round', 'size', 'variant']
|
|
64
|
+
})
|
|
65
|
+
export class CatBadge {
|
|
66
|
+
protected el: HTMLElement;
|
|
67
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
68
|
+
c.detach();
|
|
69
|
+
this.el = r.nativeElement;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
export declare interface CatButton extends Components.CatButton {
|
|
75
|
+
/**
|
|
76
|
+
* Emitted when the button is clicked.
|
|
77
|
+
*/
|
|
78
|
+
catClick: EventEmitter<CustomEvent<MouseEvent>>;
|
|
79
|
+
/**
|
|
80
|
+
* Emitted when the button received focus.
|
|
81
|
+
*/
|
|
82
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
83
|
+
/**
|
|
84
|
+
* Emitted when the button loses focus.
|
|
85
|
+
*/
|
|
86
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@ProxyCmp({
|
|
91
|
+
defineCustomElementFn: undefined,
|
|
92
|
+
inputs: ['a11yLabel', 'active', 'buttonId', 'color', 'disabled', 'icon', 'iconOnly', 'iconRight', 'loading', 'name', 'noEllipsis', 'round', 'size', 'submit', 'url', 'urlTarget', 'value', 'variant'],
|
|
93
|
+
methods: ['setFocus']
|
|
94
|
+
})
|
|
95
|
+
@Component({
|
|
96
|
+
selector: 'cat-button',
|
|
97
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
98
|
+
template: '<ng-content></ng-content>',
|
|
99
|
+
inputs: ['a11yLabel', 'active', 'buttonId', 'color', 'disabled', 'icon', 'iconOnly', 'iconRight', 'loading', 'name', 'noEllipsis', 'round', 'size', 'submit', 'url', 'urlTarget', 'value', 'variant']
|
|
100
|
+
})
|
|
101
|
+
export class CatButton {
|
|
102
|
+
protected el: HTMLElement;
|
|
103
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
104
|
+
c.detach();
|
|
105
|
+
this.el = r.nativeElement;
|
|
106
|
+
proxyOutputs(this, this.el, ['catClick', 'catFocus', 'catBlur']);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
export declare interface CatCard extends Components.CatCard {}
|
|
112
|
+
|
|
113
|
+
@ProxyCmp({
|
|
114
|
+
defineCustomElementFn: undefined
|
|
115
|
+
})
|
|
116
|
+
@Component({
|
|
117
|
+
selector: 'cat-card',
|
|
118
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
119
|
+
template: '<ng-content></ng-content>'
|
|
120
|
+
})
|
|
121
|
+
export class CatCard {
|
|
122
|
+
protected el: HTMLElement;
|
|
123
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
124
|
+
c.detach();
|
|
125
|
+
this.el = r.nativeElement;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
export declare interface CatCheckbox extends Components.CatCheckbox {
|
|
131
|
+
/**
|
|
132
|
+
* Emitted when the checked status of the checkbox is changed.
|
|
133
|
+
*/
|
|
134
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
135
|
+
/**
|
|
136
|
+
* Emitted when the checkbox received focus.
|
|
137
|
+
*/
|
|
138
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
139
|
+
/**
|
|
140
|
+
* Emitted when the checkbox loses focus.
|
|
141
|
+
*/
|
|
142
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@ProxyCmp({
|
|
147
|
+
defineCustomElementFn: undefined,
|
|
148
|
+
inputs: ['checked', 'disabled', 'hint', 'indeterminate', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value'],
|
|
149
|
+
methods: ['setFocus']
|
|
150
|
+
})
|
|
151
|
+
@Component({
|
|
152
|
+
selector: 'cat-checkbox',
|
|
153
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
154
|
+
template: '<ng-content></ng-content>',
|
|
155
|
+
inputs: ['checked', 'disabled', 'hint', 'indeterminate', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value']
|
|
156
|
+
})
|
|
157
|
+
export class CatCheckbox {
|
|
158
|
+
protected el: HTMLElement;
|
|
159
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
160
|
+
c.detach();
|
|
161
|
+
this.el = r.nativeElement;
|
|
162
|
+
proxyOutputs(this, this.el, ['catChange', 'catFocus', 'catBlur']);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
export declare interface CatIcon extends Components.CatIcon {}
|
|
168
|
+
|
|
169
|
+
@ProxyCmp({
|
|
170
|
+
defineCustomElementFn: undefined,
|
|
171
|
+
inputs: ['a11yLabel', 'icon', 'size']
|
|
172
|
+
})
|
|
173
|
+
@Component({
|
|
174
|
+
selector: 'cat-icon',
|
|
175
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
176
|
+
template: '<ng-content></ng-content>',
|
|
177
|
+
inputs: ['a11yLabel', 'icon', 'size']
|
|
178
|
+
})
|
|
179
|
+
export class CatIcon {
|
|
180
|
+
protected el: HTMLElement;
|
|
181
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
182
|
+
c.detach();
|
|
183
|
+
this.el = r.nativeElement;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
export declare interface CatInput extends Components.CatInput {
|
|
189
|
+
/**
|
|
190
|
+
* Emitted when the value is changed.
|
|
191
|
+
*/
|
|
192
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
193
|
+
/**
|
|
194
|
+
* Emitted when the input received focus.
|
|
195
|
+
*/
|
|
196
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
197
|
+
/**
|
|
198
|
+
* Emitted when the input loses focus.
|
|
199
|
+
*/
|
|
200
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
201
|
+
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@ProxyCmp({
|
|
205
|
+
defineCustomElementFn: undefined,
|
|
206
|
+
inputs: ['autoComplete', 'clearable', 'disabled', 'hint', 'icon', 'iconRight', 'label', 'labelHidden', 'max', 'maxLength', 'min', 'minLength', 'name', 'placeholder', 'readonly', 'required', 'round', 'textPrefix', 'textSuffix', 'type', 'value'],
|
|
207
|
+
methods: ['setFocus', 'clear']
|
|
208
|
+
})
|
|
209
|
+
@Component({
|
|
210
|
+
selector: 'cat-input',
|
|
211
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
212
|
+
template: '<ng-content></ng-content>',
|
|
213
|
+
inputs: ['autoComplete', 'clearable', 'disabled', 'hint', 'icon', 'iconRight', 'label', 'labelHidden', 'max', 'maxLength', 'min', 'minLength', 'name', 'placeholder', 'readonly', 'required', 'round', 'textPrefix', 'textSuffix', 'type', 'value']
|
|
214
|
+
})
|
|
215
|
+
export class CatInput {
|
|
216
|
+
protected el: HTMLElement;
|
|
217
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
218
|
+
c.detach();
|
|
219
|
+
this.el = r.nativeElement;
|
|
220
|
+
proxyOutputs(this, this.el, ['catChange', 'catFocus', 'catBlur']);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
export declare interface CatMenu extends Components.CatMenu {
|
|
226
|
+
/**
|
|
227
|
+
* Emitted when the menu is opened.
|
|
228
|
+
*/
|
|
229
|
+
catOpen: EventEmitter<CustomEvent<FocusEvent>>;
|
|
230
|
+
/**
|
|
231
|
+
* Emitted when the menu is closed.
|
|
232
|
+
*/
|
|
233
|
+
catClose: EventEmitter<CustomEvent<FocusEvent>>;
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@ProxyCmp({
|
|
238
|
+
defineCustomElementFn: undefined,
|
|
239
|
+
inputs: ['placement']
|
|
240
|
+
})
|
|
241
|
+
@Component({
|
|
242
|
+
selector: 'cat-menu',
|
|
243
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
244
|
+
template: '<ng-content></ng-content>',
|
|
245
|
+
inputs: ['placement']
|
|
246
|
+
})
|
|
247
|
+
export class CatMenu {
|
|
248
|
+
protected el: HTMLElement;
|
|
249
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
250
|
+
c.detach();
|
|
251
|
+
this.el = r.nativeElement;
|
|
252
|
+
proxyOutputs(this, this.el, ['catOpen', 'catClose']);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
export declare interface CatModal extends Components.CatModal {}
|
|
258
|
+
|
|
259
|
+
@ProxyCmp({
|
|
260
|
+
defineCustomElementFn: undefined,
|
|
261
|
+
inputs: ['size'],
|
|
262
|
+
methods: ['show']
|
|
263
|
+
})
|
|
264
|
+
@Component({
|
|
265
|
+
selector: 'cat-modal',
|
|
266
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
267
|
+
template: '<ng-content></ng-content>',
|
|
268
|
+
inputs: ['size']
|
|
269
|
+
})
|
|
270
|
+
export class CatModal {
|
|
271
|
+
protected el: HTMLElement;
|
|
272
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
273
|
+
c.detach();
|
|
274
|
+
this.el = r.nativeElement;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
export declare interface CatRadio extends Components.CatRadio {
|
|
280
|
+
/**
|
|
281
|
+
* Emitted when the radio is changed.
|
|
282
|
+
*/
|
|
283
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
284
|
+
/**
|
|
285
|
+
* Emitted when the radio received focus.
|
|
286
|
+
*/
|
|
287
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
288
|
+
/**
|
|
289
|
+
* Emitted when the radio loses focus.
|
|
290
|
+
*/
|
|
291
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
292
|
+
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@ProxyCmp({
|
|
296
|
+
defineCustomElementFn: undefined,
|
|
297
|
+
inputs: ['checked', 'disabled', 'hint', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value'],
|
|
298
|
+
methods: ['setFocus']
|
|
299
|
+
})
|
|
300
|
+
@Component({
|
|
301
|
+
selector: 'cat-radio',
|
|
302
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
303
|
+
template: '<ng-content></ng-content>',
|
|
304
|
+
inputs: ['checked', 'disabled', 'hint', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value']
|
|
305
|
+
})
|
|
306
|
+
export class CatRadio {
|
|
307
|
+
protected el: HTMLElement;
|
|
308
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
309
|
+
c.detach();
|
|
310
|
+
this.el = r.nativeElement;
|
|
311
|
+
proxyOutputs(this, this.el, ['catChange', 'catFocus', 'catBlur']);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
export declare interface CatRadioGroup extends Components.CatRadioGroup {
|
|
317
|
+
/**
|
|
318
|
+
* Emitted when the value is changed.
|
|
319
|
+
*/
|
|
320
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
321
|
+
/**
|
|
322
|
+
* Emitted when the radio group loses focus.
|
|
323
|
+
*/
|
|
324
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
325
|
+
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@ProxyCmp({
|
|
329
|
+
defineCustomElementFn: undefined,
|
|
330
|
+
inputs: ['a11yLabel', 'disabled', 'labelLeft', 'name', 'value']
|
|
331
|
+
})
|
|
332
|
+
@Component({
|
|
333
|
+
selector: 'cat-radio-group',
|
|
334
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
335
|
+
template: '<ng-content></ng-content>',
|
|
336
|
+
inputs: ['a11yLabel', 'disabled', 'labelLeft', 'name', 'value']
|
|
337
|
+
})
|
|
338
|
+
export class CatRadioGroup {
|
|
339
|
+
protected el: HTMLElement;
|
|
340
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
341
|
+
c.detach();
|
|
342
|
+
this.el = r.nativeElement;
|
|
343
|
+
proxyOutputs(this, this.el, ['catChange', 'catBlur']);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
export declare interface CatScrollable extends Components.CatScrollable {
|
|
349
|
+
/**
|
|
350
|
+
* Emitted when the content is fully scrolled to the top.
|
|
351
|
+
*/
|
|
352
|
+
scrolledTop: EventEmitter<CustomEvent<void>>;
|
|
353
|
+
/**
|
|
354
|
+
* Emitted when the content is fully scrolled to the left.
|
|
355
|
+
*/
|
|
356
|
+
scrolledLeft: EventEmitter<CustomEvent<void>>;
|
|
357
|
+
/**
|
|
358
|
+
* Emitted when the content is fully scrolled to the right.
|
|
359
|
+
*/
|
|
360
|
+
scrolledRight: EventEmitter<CustomEvent<void>>;
|
|
361
|
+
/**
|
|
362
|
+
* Emitted when the content is fully scrolled to the bottom.
|
|
363
|
+
*/
|
|
364
|
+
scrolledBottom: EventEmitter<CustomEvent<void>>;
|
|
365
|
+
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@ProxyCmp({
|
|
369
|
+
defineCustomElementFn: undefined,
|
|
370
|
+
inputs: ['noOverflowX', 'noOverflowY', 'noOverscroll', 'noScrolledInit', 'noShadowX', 'noShadowY', 'scrolledBuffer']
|
|
371
|
+
})
|
|
372
|
+
@Component({
|
|
373
|
+
selector: 'cat-scrollable',
|
|
374
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
375
|
+
template: '<ng-content></ng-content>',
|
|
376
|
+
inputs: ['noOverflowX', 'noOverflowY', 'noOverscroll', 'noScrolledInit', 'noShadowX', 'noShadowY', 'scrolledBuffer']
|
|
377
|
+
})
|
|
378
|
+
export class CatScrollable {
|
|
379
|
+
protected el: HTMLElement;
|
|
380
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
381
|
+
c.detach();
|
|
382
|
+
this.el = r.nativeElement;
|
|
383
|
+
proxyOutputs(this, this.el, ['scrolledTop', 'scrolledLeft', 'scrolledRight', 'scrolledBottom']);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
export declare interface CatSelect extends Components.CatSelect {
|
|
389
|
+
/**
|
|
390
|
+
* Emitted when the select dropdown is opened.
|
|
391
|
+
*/
|
|
392
|
+
catOpen: EventEmitter<CustomEvent<FocusEvent>>;
|
|
393
|
+
/**
|
|
394
|
+
* Emitted when the select dropdown is closed.
|
|
395
|
+
*/
|
|
396
|
+
catClose: EventEmitter<CustomEvent<FocusEvent>>;
|
|
397
|
+
/**
|
|
398
|
+
* Emitted when the value is changed.
|
|
399
|
+
*/
|
|
400
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
401
|
+
/**
|
|
402
|
+
* Emitted when the select loses the focus.
|
|
403
|
+
*/
|
|
404
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
405
|
+
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
@ProxyCmp({
|
|
409
|
+
defineCustomElementFn: undefined,
|
|
410
|
+
inputs: ['clearable', 'debounce', 'disabled', 'hint', 'label', 'labelHidden', 'multiple', 'name', 'placeholder', 'placement', 'required', 'value'],
|
|
411
|
+
methods: ['connect']
|
|
412
|
+
})
|
|
413
|
+
@Component({
|
|
414
|
+
selector: 'cat-select',
|
|
415
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
416
|
+
template: '<ng-content></ng-content>',
|
|
417
|
+
inputs: ['clearable', 'debounce', 'disabled', 'hint', 'label', 'labelHidden', 'multiple', 'name', 'placeholder', 'placement', 'required', 'value']
|
|
418
|
+
})
|
|
419
|
+
export class CatSelect {
|
|
420
|
+
protected el: HTMLElement;
|
|
421
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
422
|
+
c.detach();
|
|
423
|
+
this.el = r.nativeElement;
|
|
424
|
+
proxyOutputs(this, this.el, ['catOpen', 'catClose', 'catChange', 'catBlur']);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
export declare interface CatSelectDemo extends Components.CatSelectDemo {}
|
|
430
|
+
|
|
431
|
+
@ProxyCmp({
|
|
432
|
+
defineCustomElementFn: undefined
|
|
433
|
+
})
|
|
434
|
+
@Component({
|
|
435
|
+
selector: 'cat-select-demo',
|
|
436
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
437
|
+
template: '<ng-content></ng-content>'
|
|
438
|
+
})
|
|
439
|
+
export class CatSelectDemo {
|
|
440
|
+
protected el: HTMLElement;
|
|
441
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
442
|
+
c.detach();
|
|
443
|
+
this.el = r.nativeElement;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
export declare interface CatSkeleton extends Components.CatSkeleton {}
|
|
449
|
+
|
|
450
|
+
@ProxyCmp({
|
|
451
|
+
defineCustomElementFn: undefined,
|
|
452
|
+
inputs: ['effect', 'lines', 'size', 'variant']
|
|
453
|
+
})
|
|
454
|
+
@Component({
|
|
455
|
+
selector: 'cat-skeleton',
|
|
456
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
457
|
+
template: '<ng-content></ng-content>',
|
|
458
|
+
inputs: ['effect', 'lines', 'size', 'variant']
|
|
459
|
+
})
|
|
460
|
+
export class CatSkeleton {
|
|
461
|
+
protected el: HTMLElement;
|
|
462
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
463
|
+
c.detach();
|
|
464
|
+
this.el = r.nativeElement;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
export declare interface CatSpinner extends Components.CatSpinner {}
|
|
470
|
+
|
|
471
|
+
@ProxyCmp({
|
|
472
|
+
defineCustomElementFn: undefined,
|
|
473
|
+
inputs: ['a11yLabel', 'size']
|
|
474
|
+
})
|
|
475
|
+
@Component({
|
|
476
|
+
selector: 'cat-spinner',
|
|
477
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
478
|
+
template: '<ng-content></ng-content>',
|
|
479
|
+
inputs: ['a11yLabel', 'size']
|
|
480
|
+
})
|
|
481
|
+
export class CatSpinner {
|
|
482
|
+
protected el: HTMLElement;
|
|
483
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
484
|
+
c.detach();
|
|
485
|
+
this.el = r.nativeElement;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
export declare interface CatTab extends Components.CatTab {
|
|
491
|
+
/**
|
|
492
|
+
* Emitted when tab is clicked.
|
|
493
|
+
*/
|
|
494
|
+
tabClick: EventEmitter<CustomEvent<MouseEvent>>;
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@ProxyCmp({
|
|
499
|
+
defineCustomElementFn: undefined,
|
|
500
|
+
inputs: ['deactivated', 'icon', 'iconOnly', 'iconRight', 'label', 'url', 'urlTarget']
|
|
501
|
+
})
|
|
502
|
+
@Component({
|
|
503
|
+
selector: 'cat-tab',
|
|
504
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
505
|
+
template: '<ng-content></ng-content>',
|
|
506
|
+
inputs: ['deactivated', 'icon', 'iconOnly', 'iconRight', 'label', 'url', 'urlTarget']
|
|
507
|
+
})
|
|
508
|
+
export class CatTab {
|
|
509
|
+
protected el: HTMLElement;
|
|
510
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
511
|
+
c.detach();
|
|
512
|
+
this.el = r.nativeElement;
|
|
513
|
+
proxyOutputs(this, this.el, ['tabClick']);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
export declare interface CatTabs extends Components.CatTabs {}
|
|
519
|
+
|
|
520
|
+
@ProxyCmp({
|
|
521
|
+
defineCustomElementFn: undefined,
|
|
522
|
+
inputs: ['activeTab', 'tabsAlign']
|
|
523
|
+
})
|
|
524
|
+
@Component({
|
|
525
|
+
selector: 'cat-tabs',
|
|
526
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
527
|
+
template: '<ng-content></ng-content>',
|
|
528
|
+
inputs: ['activeTab', 'tabsAlign']
|
|
529
|
+
})
|
|
530
|
+
export class CatTabs {
|
|
531
|
+
protected el: HTMLElement;
|
|
532
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
533
|
+
c.detach();
|
|
534
|
+
this.el = r.nativeElement;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
export declare interface CatTextarea extends Components.CatTextarea {
|
|
540
|
+
/**
|
|
541
|
+
* Emitted when the value is changed.
|
|
542
|
+
*/
|
|
543
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
544
|
+
/**
|
|
545
|
+
* Emitted when the textarea received focus.
|
|
546
|
+
*/
|
|
547
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
548
|
+
/**
|
|
549
|
+
* Emitted when the textarea loses focus.
|
|
550
|
+
*/
|
|
551
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
552
|
+
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@ProxyCmp({
|
|
556
|
+
defineCustomElementFn: undefined,
|
|
557
|
+
inputs: ['disabled', 'hint', 'label', 'labelHidden', 'maxLength', 'minLength', 'name', 'placeholder', 'readonly', 'required', 'rows', 'value'],
|
|
558
|
+
methods: ['setFocus']
|
|
559
|
+
})
|
|
560
|
+
@Component({
|
|
561
|
+
selector: 'cat-textarea',
|
|
562
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
563
|
+
template: '<ng-content></ng-content>',
|
|
564
|
+
inputs: ['disabled', 'hint', 'label', 'labelHidden', 'maxLength', 'minLength', 'name', 'placeholder', 'readonly', 'required', 'rows', 'value']
|
|
565
|
+
})
|
|
566
|
+
export class CatTextarea {
|
|
567
|
+
protected el: HTMLElement;
|
|
568
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
569
|
+
c.detach();
|
|
570
|
+
this.el = r.nativeElement;
|
|
571
|
+
proxyOutputs(this, this.el, ['catChange', 'catFocus', 'catBlur']);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
export declare interface CatToastDemo extends Components.CatToastDemo {}
|
|
577
|
+
|
|
578
|
+
@ProxyCmp({
|
|
579
|
+
defineCustomElementFn: undefined
|
|
580
|
+
})
|
|
581
|
+
@Component({
|
|
582
|
+
selector: 'cat-toast-demo',
|
|
583
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
584
|
+
template: '<ng-content></ng-content>'
|
|
585
|
+
})
|
|
586
|
+
export class CatToastDemo {
|
|
587
|
+
protected el: HTMLElement;
|
|
588
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
589
|
+
c.detach();
|
|
590
|
+
this.el = r.nativeElement;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
export declare interface CatToggle extends Components.CatToggle {
|
|
596
|
+
/**
|
|
597
|
+
* Emitted when the checked status of the toggle is changed.
|
|
598
|
+
*/
|
|
599
|
+
catChange: EventEmitter<CustomEvent<any>>;
|
|
600
|
+
/**
|
|
601
|
+
* Emitted when the toggle received focus.
|
|
602
|
+
*/
|
|
603
|
+
catFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
604
|
+
/**
|
|
605
|
+
* Emitted when the toggle loses focus.
|
|
606
|
+
*/
|
|
607
|
+
catBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
608
|
+
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@ProxyCmp({
|
|
612
|
+
defineCustomElementFn: undefined,
|
|
613
|
+
inputs: ['checked', 'disabled', 'hint', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value'],
|
|
614
|
+
methods: ['setFocus']
|
|
615
|
+
})
|
|
616
|
+
@Component({
|
|
617
|
+
selector: 'cat-toggle',
|
|
618
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
619
|
+
template: '<ng-content></ng-content>',
|
|
620
|
+
inputs: ['checked', 'disabled', 'hint', 'label', 'labelHidden', 'labelLeft', 'name', 'required', 'value']
|
|
621
|
+
})
|
|
622
|
+
export class CatToggle {
|
|
623
|
+
protected el: HTMLElement;
|
|
624
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
625
|
+
c.detach();
|
|
626
|
+
this.el = r.nativeElement;
|
|
627
|
+
proxyOutputs(this, this.el, ['catChange', 'catFocus', 'catBlur']);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
export declare interface CatTooltip extends Components.CatTooltip {}
|
|
633
|
+
|
|
634
|
+
@ProxyCmp({
|
|
635
|
+
defineCustomElementFn: undefined,
|
|
636
|
+
inputs: ['content', 'disabled', 'hideDelay', 'longTouchDuration', 'placement', 'showDelay']
|
|
637
|
+
})
|
|
638
|
+
@Component({
|
|
639
|
+
selector: 'cat-tooltip',
|
|
640
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
641
|
+
template: '<ng-content></ng-content>',
|
|
642
|
+
inputs: ['content', 'disabled', 'hideDelay', 'longTouchDuration', 'placement', 'showDelay']
|
|
643
|
+
})
|
|
644
|
+
export class CatTooltip {
|
|
645
|
+
protected el: HTMLElement;
|
|
646
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
647
|
+
c.detach();
|
|
648
|
+
this.el = r.nativeElement;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Directive, ElementRef } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
import { ValueAccessor } from './value-accessor';
|
|
5
|
+
|
|
6
|
+
@Directive({
|
|
7
|
+
/* tslint:disable-next-line:directive-selector */
|
|
8
|
+
selector: 'cat-radio, cat-radio-group',
|
|
9
|
+
host: {
|
|
10
|
+
'(catChange)': 'handleChangeEvent($event.target.value)'
|
|
11
|
+
},
|
|
12
|
+
providers: [
|
|
13
|
+
{
|
|
14
|
+
provide: NG_VALUE_ACCESSOR,
|
|
15
|
+
useExisting: RadioValueAccessor,
|
|
16
|
+
multi: true
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
export class RadioValueAccessor extends ValueAccessor {
|
|
21
|
+
constructor(el: ElementRef) {
|
|
22
|
+
super(el);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Directive, ElementRef } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
import { ValueAccessor } from './value-accessor';
|
|
5
|
+
|
|
6
|
+
@Directive({
|
|
7
|
+
/* tslint:disable-next-line:directive-selector */
|
|
8
|
+
selector: 'cat-select, cat-select-remote',
|
|
9
|
+
host: {
|
|
10
|
+
'(catChange)': 'handleChangeEvent($event.target.value)'
|
|
11
|
+
},
|
|
12
|
+
providers: [
|
|
13
|
+
{
|
|
14
|
+
provide: NG_VALUE_ACCESSOR,
|
|
15
|
+
useExisting: SelectValueAccessor,
|
|
16
|
+
multi: true
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
export class SelectValueAccessor extends ValueAccessor {
|
|
21
|
+
constructor(el: ElementRef) {
|
|
22
|
+
super(el);
|
|
23
|
+
}
|
|
24
|
+
}
|