ng-primitives 0.120.4 → 0.121.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/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +34 -51
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +68 -121
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +91 -115
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +35 -51
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +39 -35
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +85 -151
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +209 -223
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +88 -59
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +720 -620
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +30 -23
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
- package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
- package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
- package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
- package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
- package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
- package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
- package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
- package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
- package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
- package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
- package/types/ng-primitives-select.d.ts +687 -0
- package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
- package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
- package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
- package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
- package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/select/index.d.ts +0 -396
- package/tooltip/index.d.ts +0 -384
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -23,34 +23,23 @@ const meterState = createState(NgpMeterStateToken);
|
|
|
23
23
|
class NgpMeter {
|
|
24
24
|
constructor() {
|
|
25
25
|
/** The value of the meter. */
|
|
26
|
-
this.value = input(0, ...(ngDevMode ?
|
|
27
|
-
|
|
28
|
-
alias: 'ngpMeterValue',
|
|
29
|
-
transform: numberAttribute,
|
|
30
|
-
}]));
|
|
26
|
+
this.value = input(0, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'ngpMeterValue',
|
|
27
|
+
transform: numberAttribute });
|
|
31
28
|
/** The minimum value of the meter. */
|
|
32
|
-
this.min = input(0, ...(ngDevMode ?
|
|
33
|
-
|
|
34
|
-
alias: 'ngpMeterMin',
|
|
35
|
-
transform: numberAttribute,
|
|
36
|
-
}]));
|
|
29
|
+
this.min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), alias: 'ngpMeterMin',
|
|
30
|
+
transform: numberAttribute });
|
|
37
31
|
/** The maximum value of the meter. */
|
|
38
|
-
this.max = input(100, ...(ngDevMode ?
|
|
39
|
-
|
|
40
|
-
alias: 'ngpMeterMax',
|
|
41
|
-
transform: numberAttribute,
|
|
42
|
-
}]));
|
|
32
|
+
this.max = input(100, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), alias: 'ngpMeterMax',
|
|
33
|
+
transform: numberAttribute });
|
|
43
34
|
/**
|
|
44
35
|
* Define a function that returns the meter value label.
|
|
45
36
|
* @param value The current value
|
|
46
37
|
* @param max The maximum value
|
|
47
38
|
* @returns The value label
|
|
48
39
|
*/
|
|
49
|
-
this.valueLabel = input((value, max) => `${Math.round((value / max) * 100)}%`, ...(ngDevMode ?
|
|
50
|
-
alias: 'ngpMeterValueLabel',
|
|
51
|
-
}]));
|
|
40
|
+
this.valueLabel = input((value, max) => `${Math.round((value / max) * 100)}%`, { ...(ngDevMode ? { debugName: "valueLabel" } : /* istanbul ignore next */ {}), alias: 'ngpMeterValueLabel' });
|
|
52
41
|
/** @internal Store the label instance */
|
|
53
|
-
this.label = signal(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
42
|
+
this.label = signal(null, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
54
43
|
/** @internal The percentage of the meter. */
|
|
55
44
|
this.percentage = computed(() => {
|
|
56
45
|
const value = this.state.value();
|
|
@@ -66,14 +55,14 @@ class NgpMeter {
|
|
|
66
55
|
return 100;
|
|
67
56
|
}
|
|
68
57
|
return ((value - min) / (max - min)) * 100;
|
|
69
|
-
}, ...(ngDevMode ? [{ debugName: "percentage" }] : []));
|
|
58
|
+
}, ...(ngDevMode ? [{ debugName: "percentage" }] : /* istanbul ignore next */ []));
|
|
70
59
|
/** The state of the meter. */
|
|
71
60
|
this.state = meterState(this);
|
|
72
61
|
}
|
|
73
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
74
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpMeter, isStandalone: true, selector: "[ngpMeter]", inputs: { value: { classPropertyName: "value", publicName: "ngpMeterValue", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "ngpMeterMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpMeterMax", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "ngpMeterValueLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "meter" }, properties: { "attr.aria-valuenow": "percentage()", "attr.aria-valuemin": "min()", "attr.aria-valuemax": "max()", "attr.aria-valuetext": "valueLabel()(value(), max())", "attr.aria-labelledby": "label()?.id()" } }, providers: [provideMeterState()], exportAs: ["ngpMeter"], ngImport: i0 }); }
|
|
75
64
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeter, decorators: [{
|
|
77
66
|
type: Directive,
|
|
78
67
|
args: [{
|
|
79
68
|
selector: '[ngpMeter]',
|
|
@@ -91,10 +80,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
91
80
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpMeterValue", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpMeterMin", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpMeterMax", required: false }] }], valueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpMeterValueLabel", required: false }] }] } });
|
|
92
81
|
|
|
93
82
|
class NgpMeterTrack {
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
95
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
84
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpMeterTrack, isStandalone: true, selector: "[ngpMeterTrack]", exportAs: ["ngpMeterTrack"], ngImport: i0 }); }
|
|
96
85
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterTrack, decorators: [{
|
|
98
87
|
type: Directive,
|
|
99
88
|
args: [{
|
|
100
89
|
selector: '[ngpMeterTrack]',
|
|
@@ -107,10 +96,10 @@ class NgpMeterIndicator {
|
|
|
107
96
|
/** Access the meter */
|
|
108
97
|
this.meter = injectMeterState();
|
|
109
98
|
}
|
|
110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
100
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpMeterIndicator, isStandalone: true, selector: "[ngpMeterIndicator]", host: { properties: { "style.width.%": "meter().percentage()" } }, exportAs: ["ngpMeterIndicator"], ngImport: i0 }); }
|
|
112
101
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterIndicator, decorators: [{
|
|
114
103
|
type: Directive,
|
|
115
104
|
args: [{
|
|
116
105
|
selector: '[ngpMeterIndicator]',
|
|
@@ -122,10 +111,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
122
111
|
}] });
|
|
123
112
|
|
|
124
113
|
class NgpMeterValue {
|
|
125
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
126
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterValue, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
115
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpMeterValue, isStandalone: true, selector: "[ngpMeterValue]", host: { attributes: { "aria-hidden": "true" } }, exportAs: ["ngpMeterValue"], ngImport: i0 }); }
|
|
127
116
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterValue, decorators: [{
|
|
129
118
|
type: Directive,
|
|
130
119
|
args: [{
|
|
131
120
|
selector: '[ngpMeterValue]',
|
|
@@ -141,14 +130,14 @@ class NgpMeterLabel {
|
|
|
141
130
|
/** Access the meter */
|
|
142
131
|
this.meter = injectMeterState();
|
|
143
132
|
/** The id of the meter label */
|
|
144
|
-
this.id = input(uniqueId('ngp-meter-label'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
133
|
+
this.id = input(uniqueId('ngp-meter-label'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
145
134
|
// Register the label with the meter
|
|
146
135
|
this.meter().label.set(this);
|
|
147
136
|
}
|
|
148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
149
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
138
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpMeterLabel, isStandalone: true, selector: "[ngpMeterLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()" } }, exportAs: ["ngpMeterLabel"], ngImport: i0 }); }
|
|
150
139
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpMeterLabel, decorators: [{
|
|
152
141
|
type: Directive,
|
|
153
142
|
args: [{
|
|
154
143
|
selector: '[ngpMeterLabel]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-meter.mjs","sources":["../../../../packages/ng-primitives/meter/src/meter/meter-state.ts","../../../../packages/ng-primitives/meter/src/meter/meter.ts","../../../../packages/ng-primitives/meter/src/meter-track/meter-track.ts","../../../../packages/ng-primitives/meter/src/meter-indicator/meter-indicator.ts","../../../../packages/ng-primitives/meter/src/meter-value/meter-value.ts","../../../../packages/ng-primitives/meter/src/meter-label/meter-label.ts","../../../../packages/ng-primitives/meter/src/ng-primitives-meter.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpMeter } from './meter';\n\n/**\n * The state token for the Meter primitive.\n */\nexport const NgpMeterStateToken = createStateToken<NgpMeter>('Meter');\n\n/**\n * Provides the Meter state.\n */\nexport const provideMeterState = createStateProvider(NgpMeterStateToken);\n\n/**\n * Injects the Meter state.\n */\nexport const injectMeterState = createStateInjector<NgpMeter>(NgpMeterStateToken);\n\n/**\n * The Meter state registration function.\n */\nexport const meterState = createState(NgpMeterStateToken);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { computed, Directive, input, numberAttribute, signal } from '@angular/core';\nimport type { NgpMeterLabel } from '../meter-label/meter-label';\nimport { meterState, provideMeterState } from './meter-state';\n\n@Directive({\n selector: '[ngpMeter]',\n exportAs: 'ngpMeter',\n providers: [provideMeterState()],\n host: {\n role: 'meter',\n '[attr.aria-valuenow]': 'percentage()',\n '[attr.aria-valuemin]': 'min()',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuetext]': 'valueLabel()(value(), max())',\n '[attr.aria-labelledby]': 'label()?.id()',\n },\n})\nexport class NgpMeter {\n /** The value of the meter. */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpMeterValue',\n transform: numberAttribute,\n });\n\n /** The minimum value of the meter. */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpMeterMin',\n transform: numberAttribute,\n });\n\n /** The maximum value of the meter. */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpMeterMax',\n transform: numberAttribute,\n });\n\n /**\n * Define a function that returns the meter value label.\n * @param value The current value\n * @param max The maximum value\n * @returns The value label\n */\n readonly valueLabel = input<NgpMeterValueTextFn>(\n (value, max) => `${Math.round((value / max) * 100)}%`,\n {\n alias: 'ngpMeterValueLabel',\n },\n );\n\n /** @internal Store the label instance */\n readonly label = signal<NgpMeterLabel | null>(null);\n\n /** @internal The percentage of the meter. */\n readonly percentage = computed(() => {\n const value = this.state.value();\n const min = this.state.min();\n const max = this.state.max();\n\n if (value == null) {\n return 0;\n }\n\n if (value < min) {\n return 0;\n }\n\n if (value > max) {\n return 100;\n }\n\n return ((value - min) / (max - min)) * 100;\n });\n\n /** The state of the meter. */\n private readonly state = meterState<NgpMeter>(this);\n}\n\nexport type NgpMeterValueTextFn = (value: number, max: number) => string;\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngpMeterTrack]',\n exportAs: 'ngpMeterTrack',\n})\nexport class NgpMeterTrack {}\n","import { Directive } from '@angular/core';\nimport { injectMeterState } from '../meter/meter-state';\n\n@Directive({\n selector: '[ngpMeterIndicator]',\n exportAs: 'ngpMeterIndicator',\n host: {\n '[style.width.%]': 'meter().percentage()',\n },\n})\nexport class NgpMeterIndicator {\n /** Access the meter */\n protected readonly meter = injectMeterState();\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngpMeterValue]',\n exportAs: 'ngpMeterValue',\n host: {\n 'aria-hidden': 'true',\n },\n})\nexport class NgpMeterValue {}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectMeterState } from '../meter/meter-state';\n\n@Directive({\n selector: '[ngpMeterLabel]',\n exportAs: 'ngpMeterLabel',\n host: {\n '[attr.id]': 'id()',\n },\n})\nexport class NgpMeterLabel {\n /** Access the meter */\n protected readonly meter = injectMeterState();\n\n /** The id of the meter label */\n readonly id = input(uniqueId('ngp-meter-label'));\n\n constructor() {\n // Register the label with the meter\n this.meter().label.set(this);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;AAEG;AACI,MAAM,kBAAkB,GAAG,gBAAgB,CAAW,OAAO,CAAC;AAErE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAC,kBAAkB;AAEvE;;AAEG;MACU,gBAAgB,GAAG,mBAAmB,CAAW,kBAAkB;AAEhF;;AAEG;AACI,MAAM,UAAU,GAAG,WAAW,CAAC,kBAAkB,CAAC;;MCR5C,QAAQ,CAAA;AAbrB,IAAA,WAAA,GAAA;;AAeW,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAC3C,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,CAFmB;AAC7C,gBAAA,KAAK,EAAE,eAAe;AACtB,gBAAA,SAAS,EAAE,eAAe;AAC3B,aAAA,CAAA,CAAA,CAAC;;AAGO,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAsB,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,KAAA,EACzC,KAAK,EAAE,aAAa;gBACpB,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,CAFiB;AAC3C,gBAAA,KAAK,EAAE,aAAa;AACpB,gBAAA,SAAS,EAAE,eAAe;AAC3B,aAAA,CAAA,CAAA,CAAC;;AAGO,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAsB,GAAG,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,KAAA,EAC3C,KAAK,EAAE,aAAa;gBACpB,SAAS,EAAE,eAAe,EAAA,CAAA,GAAA,CAFmB;AAC7C,gBAAA,KAAK,EAAE,aAAa;AACpB,gBAAA,SAAS,EAAE,eAAe;AAC3B,aAAA,CA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AAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-meter.mjs","sources":["../../../../packages/ng-primitives/meter/src/meter/meter-state.ts","../../../../packages/ng-primitives/meter/src/meter/meter.ts","../../../../packages/ng-primitives/meter/src/meter-track/meter-track.ts","../../../../packages/ng-primitives/meter/src/meter-indicator/meter-indicator.ts","../../../../packages/ng-primitives/meter/src/meter-value/meter-value.ts","../../../../packages/ng-primitives/meter/src/meter-label/meter-label.ts","../../../../packages/ng-primitives/meter/src/ng-primitives-meter.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpMeter } from './meter';\n\n/**\n * The state token for the Meter primitive.\n */\nexport const NgpMeterStateToken = createStateToken<NgpMeter>('Meter');\n\n/**\n * Provides the Meter state.\n */\nexport const provideMeterState = createStateProvider(NgpMeterStateToken);\n\n/**\n * Injects the Meter state.\n */\nexport const injectMeterState = createStateInjector<NgpMeter>(NgpMeterStateToken);\n\n/**\n * The Meter state registration function.\n */\nexport const meterState = createState(NgpMeterStateToken);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { computed, Directive, input, numberAttribute, signal } from '@angular/core';\nimport type { NgpMeterLabel } from '../meter-label/meter-label';\nimport { meterState, provideMeterState } from './meter-state';\n\n@Directive({\n selector: '[ngpMeter]',\n exportAs: 'ngpMeter',\n providers: [provideMeterState()],\n host: {\n role: 'meter',\n '[attr.aria-valuenow]': 'percentage()',\n '[attr.aria-valuemin]': 'min()',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuetext]': 'valueLabel()(value(), max())',\n '[attr.aria-labelledby]': 'label()?.id()',\n },\n})\nexport class NgpMeter {\n /** The value of the meter. */\n readonly value = input<number, NumberInput>(0, {\n alias: 'ngpMeterValue',\n transform: numberAttribute,\n });\n\n /** The minimum value of the meter. */\n readonly min = input<number, NumberInput>(0, {\n alias: 'ngpMeterMin',\n transform: numberAttribute,\n });\n\n /** The maximum value of the meter. */\n readonly max = input<number, NumberInput>(100, {\n alias: 'ngpMeterMax',\n transform: numberAttribute,\n });\n\n /**\n * Define a function that returns the meter value label.\n * @param value The current value\n * @param max The maximum value\n * @returns The value label\n */\n readonly valueLabel = input<NgpMeterValueTextFn>(\n (value, max) => `${Math.round((value / max) * 100)}%`,\n {\n alias: 'ngpMeterValueLabel',\n },\n );\n\n /** @internal Store the label instance */\n readonly label = signal<NgpMeterLabel | null>(null);\n\n /** @internal The percentage of the meter. */\n readonly percentage = computed(() => {\n const value = this.state.value();\n const min = this.state.min();\n const max = this.state.max();\n\n if (value == null) {\n return 0;\n }\n\n if (value < min) {\n return 0;\n }\n\n if (value > max) {\n return 100;\n }\n\n return ((value - min) / (max - min)) * 100;\n });\n\n /** The state of the meter. */\n private readonly state = meterState<NgpMeter>(this);\n}\n\nexport type NgpMeterValueTextFn = (value: number, max: number) => string;\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngpMeterTrack]',\n exportAs: 'ngpMeterTrack',\n})\nexport class NgpMeterTrack {}\n","import { Directive } from '@angular/core';\nimport { injectMeterState } from '../meter/meter-state';\n\n@Directive({\n selector: '[ngpMeterIndicator]',\n exportAs: 'ngpMeterIndicator',\n host: {\n '[style.width.%]': 'meter().percentage()',\n },\n})\nexport class NgpMeterIndicator {\n /** Access the meter */\n protected readonly meter = injectMeterState();\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngpMeterValue]',\n exportAs: 'ngpMeterValue',\n host: {\n 'aria-hidden': 'true',\n },\n})\nexport class NgpMeterValue {}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectMeterState } from '../meter/meter-state';\n\n@Directive({\n selector: '[ngpMeterLabel]',\n exportAs: 'ngpMeterLabel',\n host: {\n '[attr.id]': 'id()',\n },\n})\nexport class NgpMeterLabel {\n /** Access the meter */\n protected readonly meter = injectMeterState();\n\n /** The id of the meter label */\n readonly id = input(uniqueId('ngp-meter-label'));\n\n constructor() {\n // Register the label with the meter\n this.meter().label.set(this);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;AAEG;AACI,MAAM,kBAAkB,GAAG,gBAAgB,CAAW,OAAO,CAAC;AAErE;;AAEG;MACU,iBAAiB,GAAG,mBAAmB,CAAC,kBAAkB;AAEvE;;AAEG;MACU,gBAAgB,GAAG,mBAAmB,CAAW,kBAAkB;AAEhF;;AAEG;AACI,MAAM,UAAU,GAAG,WAAW,CAAC,kBAAkB,CAAC;;MCR5C,QAAQ,CAAA;AAbrB,IAAA,WAAA,GAAA;;AAeW,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EAC3C,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,eAAe,EAAA,CAC1B;;AAGO,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAsB,CAAC,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,KAAA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AAC;IAC9B;+GAVW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACJ,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA;AACF,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, signal, computed, Injector, ViewContainerRef, input, booleanAttribute, Directive, numberAttribute, output } from '@angular/core';
|
|
3
|
+
import { createOverlay, NgpOverlay, provideControlContainerIsolation, coerceOffset, coerceFlip, coerceShift } from 'ng-primitives/portal';
|
|
3
4
|
import { injectRovingFocusGroupState, ngpRovingFocusGroup, provideRovingFocusGroupState, ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';
|
|
4
5
|
import { Directionality } from '@angular/cdk/bidi';
|
|
5
6
|
import { injectElementRef } from 'ng-primitives/internal';
|
|
6
|
-
import { createOverlay, NgpOverlay, coerceOffset, coerceFlip, coerceShift } from 'ng-primitives/portal';
|
|
7
7
|
import { createPrimitive, controlled, dataBinding, attrBinding, listener, onDestroy, styleBinding, onMount } from 'ng-primitives/state';
|
|
8
8
|
import { uniqueId } from 'ng-primitives/utils';
|
|
9
9
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
@@ -86,7 +86,7 @@ const [NgpNavigationMenuItemStateToken, ngpNavigationMenuItem, injectNavigationM
|
|
|
86
86
|
// Controlled properties
|
|
87
87
|
const value = controlled(_value);
|
|
88
88
|
// Computed state
|
|
89
|
-
const active = computed(() => navigationMenuState().activeItem() === value(), ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
89
|
+
const active = computed(() => navigationMenuState().activeItem() === value(), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
90
90
|
// Host bindings
|
|
91
91
|
dataBinding(element, 'data-active', active);
|
|
92
92
|
// Methods
|
|
@@ -129,9 +129,9 @@ const [NgpNavigationMenuTriggerStateToken, ngpNavigationMenuTrigger, injectNavig
|
|
|
129
129
|
const cooldown = controlled(_cooldown);
|
|
130
130
|
// Internal state
|
|
131
131
|
const id = uniqueId('navigation-menu-trigger');
|
|
132
|
-
const contentId = signal(undefined, ...(ngDevMode ? [{ debugName: "contentId" }] : []));
|
|
133
|
-
const overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : []));
|
|
134
|
-
const open = computed(() => navigationMenuItemState().active(), ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
132
|
+
const contentId = signal(undefined, ...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
133
|
+
const overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []));
|
|
134
|
+
const open = computed(() => navigationMenuItemState().active(), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
135
135
|
let showTimeout = null;
|
|
136
136
|
let hideTimeout = null;
|
|
137
137
|
let isPointerOverTrigger = false;
|
|
@@ -424,7 +424,7 @@ const [NgpNavigationMenuContentStateToken, ngpNavigationMenuContent, injectNavig
|
|
|
424
424
|
// Try to get overlay - may not exist if content isn't in a portal
|
|
425
425
|
const overlay = inject(NgpOverlay, { optional: true });
|
|
426
426
|
const id = uniqueId('navigation-menu-content');
|
|
427
|
-
const open = computed(() => navigationMenuItemState?.()?.active() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
427
|
+
const open = computed(() => navigationMenuItemState?.()?.active() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
428
428
|
let isPointerOver = false;
|
|
429
429
|
let isFocusInside = false;
|
|
430
430
|
// Host bindings
|
|
@@ -557,18 +557,13 @@ class NgpNavigationMenuContent {
|
|
|
557
557
|
* Use 'vertical' for list layouts (default), 'horizontal' for grid layouts.
|
|
558
558
|
* @default 'vertical'
|
|
559
559
|
*/
|
|
560
|
-
this.orientation = input('vertical', ...(ngDevMode ?
|
|
561
|
-
alias: 'ngpNavigationMenuContentOrientation',
|
|
562
|
-
}]));
|
|
560
|
+
this.orientation = input('vertical', { ...(ngDevMode ? { debugName: "orientation" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuContentOrientation' });
|
|
563
561
|
/**
|
|
564
562
|
* Whether focus should wrap around when reaching the end of the content.
|
|
565
563
|
* @default true
|
|
566
564
|
*/
|
|
567
|
-
this.wrap = input(this.config.wrap, ...(ngDevMode ?
|
|
568
|
-
|
|
569
|
-
alias: 'ngpNavigationMenuContentWrap',
|
|
570
|
-
transform: booleanAttribute,
|
|
571
|
-
}]));
|
|
565
|
+
this.wrap = input(this.config.wrap, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuContentWrap',
|
|
566
|
+
transform: booleanAttribute });
|
|
572
567
|
this.state = ngpNavigationMenuContent({
|
|
573
568
|
orientation: this.orientation,
|
|
574
569
|
});
|
|
@@ -597,13 +592,14 @@ class NgpNavigationMenuContent {
|
|
|
597
592
|
focusLast() {
|
|
598
593
|
this.state.focusLast();
|
|
599
594
|
}
|
|
600
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
601
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
596
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuContent, isStandalone: true, selector: "[ngpNavigationMenuContent]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpNavigationMenuContentOrientation", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "ngpNavigationMenuContentWrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-overlay": "" } }, providers: [
|
|
602
597
|
provideNavigationMenuContentState(),
|
|
603
598
|
provideRovingFocusGroupState({ inherit: false }),
|
|
599
|
+
provideControlContainerIsolation(),
|
|
604
600
|
], exportAs: ["ngpNavigationMenuContent"], ngImport: i0 }); }
|
|
605
601
|
}
|
|
606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuContent, decorators: [{
|
|
607
603
|
type: Directive,
|
|
608
604
|
args: [{
|
|
609
605
|
selector: '[ngpNavigationMenuContent]',
|
|
@@ -611,6 +607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
611
607
|
providers: [
|
|
612
608
|
provideNavigationMenuContentState(),
|
|
613
609
|
provideRovingFocusGroupState({ inherit: false }),
|
|
610
|
+
provideControlContainerIsolation(),
|
|
614
611
|
],
|
|
615
612
|
host: {
|
|
616
613
|
'data-overlay': '',
|
|
@@ -644,18 +641,15 @@ class NgpNavigationMenuContentItem {
|
|
|
644
641
|
* Whether the item is disabled.
|
|
645
642
|
* @default false
|
|
646
643
|
*/
|
|
647
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
648
|
-
|
|
649
|
-
alias: 'ngpNavigationMenuContentItemDisabled',
|
|
650
|
-
transform: booleanAttribute,
|
|
651
|
-
}]));
|
|
644
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuContentItemDisabled',
|
|
645
|
+
transform: booleanAttribute });
|
|
652
646
|
ngpNavigationMenuContentItem({ disabled: this.disabled });
|
|
653
647
|
ngpRovingFocusItem({ disabled: this.disabled });
|
|
654
648
|
}
|
|
655
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
656
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuContentItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
650
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuContentItem, isStandalone: true, selector: "[ngpNavigationMenuContentItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpNavigationMenuContentItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNavigationMenuContentItemState(), provideRovingFocusItemState()], exportAs: ["ngpNavigationMenuContentItem"], ngImport: i0 }); }
|
|
657
651
|
}
|
|
658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuContentItem, decorators: [{
|
|
659
653
|
type: Directive,
|
|
660
654
|
args: [{
|
|
661
655
|
selector: '[ngpNavigationMenuContentItem]',
|
|
@@ -674,9 +668,7 @@ class NgpNavigationMenuItem {
|
|
|
674
668
|
* A unique value identifying this menu item.
|
|
675
669
|
* Used to track which item is currently active.
|
|
676
670
|
*/
|
|
677
|
-
this.value = input(uniqueId('navigation-menu-item'), ...(ngDevMode ?
|
|
678
|
-
alias: 'ngpNavigationMenuItemValue',
|
|
679
|
-
}]));
|
|
671
|
+
this.value = input(uniqueId('navigation-menu-item'), { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuItemValue' });
|
|
680
672
|
this.state = ngpNavigationMenuItem({
|
|
681
673
|
value: this.value,
|
|
682
674
|
});
|
|
@@ -697,10 +689,10 @@ class NgpNavigationMenuItem {
|
|
|
697
689
|
hide() {
|
|
698
690
|
this.state.hide();
|
|
699
691
|
}
|
|
700
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
701
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
692
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
693
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuItem, isStandalone: true, selector: "[ngpNavigationMenuItem]", inputs: { value: { classPropertyName: "value", publicName: "ngpNavigationMenuItemValue", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNavigationMenuItemState({ inherit: false })], exportAs: ["ngpNavigationMenuItem"], ngImport: i0 }); }
|
|
702
694
|
}
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuItem, decorators: [{
|
|
704
696
|
type: Directive,
|
|
705
697
|
args: [{
|
|
706
698
|
selector: '[ngpNavigationMenuItem]',
|
|
@@ -750,20 +742,14 @@ class NgpNavigationMenuLink {
|
|
|
750
742
|
* Whether the link is disabled.
|
|
751
743
|
* @default false
|
|
752
744
|
*/
|
|
753
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
754
|
-
|
|
755
|
-
alias: 'ngpNavigationMenuLinkDisabled',
|
|
756
|
-
transform: booleanAttribute,
|
|
757
|
-
}]));
|
|
745
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuLinkDisabled',
|
|
746
|
+
transform: booleanAttribute });
|
|
758
747
|
/**
|
|
759
748
|
* Whether the link is active (represents the current page).
|
|
760
749
|
* @default false
|
|
761
750
|
*/
|
|
762
|
-
this.active = input(false, ...(ngDevMode ?
|
|
763
|
-
|
|
764
|
-
alias: 'ngpNavigationMenuLinkActive',
|
|
765
|
-
transform: booleanAttribute,
|
|
766
|
-
}]));
|
|
751
|
+
this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuLinkActive',
|
|
752
|
+
transform: booleanAttribute });
|
|
767
753
|
this.state = ngpNavigationMenuLink({
|
|
768
754
|
disabled: this.disabled,
|
|
769
755
|
active: this.active,
|
|
@@ -772,10 +758,10 @@ class NgpNavigationMenuLink {
|
|
|
772
758
|
disabled: this.disabled,
|
|
773
759
|
});
|
|
774
760
|
}
|
|
775
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
776
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
761
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
762
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuLink, isStandalone: true, selector: "[ngpNavigationMenuLink]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpNavigationMenuLinkDisabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "ngpNavigationMenuLinkActive", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNavigationMenuLinkState(), provideRovingFocusItemState()], exportAs: ["ngpNavigationMenuLink"], ngImport: i0 }); }
|
|
777
763
|
}
|
|
778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuLink, decorators: [{
|
|
779
765
|
type: Directive,
|
|
780
766
|
args: [{
|
|
781
767
|
selector: '[ngpNavigationMenuLink]',
|
|
@@ -812,21 +798,18 @@ class NgpNavigationMenuList {
|
|
|
812
798
|
* Whether focus should wrap around when reaching the end of the list.
|
|
813
799
|
* @default true
|
|
814
800
|
*/
|
|
815
|
-
this.wrap = input(this.config.wrap, ...(ngDevMode ?
|
|
816
|
-
|
|
817
|
-
alias: 'ngpNavigationMenuListWrap',
|
|
818
|
-
transform: booleanAttribute,
|
|
819
|
-
}]));
|
|
801
|
+
this.wrap = input(this.config.wrap, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuListWrap',
|
|
802
|
+
transform: booleanAttribute });
|
|
820
803
|
ngpNavigationMenuList({});
|
|
821
804
|
ngpRovingFocusGroup({
|
|
822
805
|
orientation: this.navigationMenuState().orientation,
|
|
823
806
|
wrap: this.wrap,
|
|
824
807
|
});
|
|
825
808
|
}
|
|
826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
827
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuList, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
810
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuList, isStandalone: true, selector: "[ngpNavigationMenuList]", inputs: { wrap: { classPropertyName: "wrap", publicName: "ngpNavigationMenuListWrap", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideNavigationMenuListState(), provideRovingFocusGroupState({ inherit: false })], exportAs: ["ngpNavigationMenuList"], ngImport: i0 }); }
|
|
828
811
|
}
|
|
829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuList, decorators: [{
|
|
830
813
|
type: Directive,
|
|
831
814
|
args: [{
|
|
832
815
|
selector: '[ngpNavigationMenuList]',
|
|
@@ -848,71 +831,50 @@ class NgpNavigationMenuTrigger {
|
|
|
848
831
|
/**
|
|
849
832
|
* The content template or component to display.
|
|
850
833
|
*/
|
|
851
|
-
this.content = input(undefined, ...(ngDevMode ?
|
|
852
|
-
alias: 'ngpNavigationMenuTrigger',
|
|
853
|
-
}]));
|
|
834
|
+
this.content = input(undefined, { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTrigger' });
|
|
854
835
|
/**
|
|
855
836
|
* Whether the trigger is disabled.
|
|
856
837
|
* @default false
|
|
857
838
|
*/
|
|
858
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
859
|
-
|
|
860
|
-
alias: 'ngpNavigationMenuTriggerDisabled',
|
|
861
|
-
transform: booleanAttribute,
|
|
862
|
-
}]));
|
|
839
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerDisabled',
|
|
840
|
+
transform: booleanAttribute });
|
|
863
841
|
/**
|
|
864
842
|
* The placement of the content relative to the trigger.
|
|
865
843
|
* @default 'bottom-start'
|
|
866
844
|
*/
|
|
867
|
-
this.placement = input(this.config.placement, ...(ngDevMode ?
|
|
868
|
-
alias: 'ngpNavigationMenuTriggerPlacement',
|
|
869
|
-
}]));
|
|
845
|
+
this.placement = input(this.config.placement, { ...(ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerPlacement' });
|
|
870
846
|
/**
|
|
871
847
|
* The offset of the content relative to the trigger.
|
|
872
848
|
* @default 4
|
|
873
849
|
*/
|
|
874
|
-
this.offset = input(this.config.offset, ...(ngDevMode ?
|
|
875
|
-
|
|
876
|
-
alias: 'ngpNavigationMenuTriggerOffset',
|
|
877
|
-
transform: coerceOffset,
|
|
878
|
-
}]));
|
|
850
|
+
this.offset = input(this.config.offset, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerOffset',
|
|
851
|
+
transform: coerceOffset });
|
|
879
852
|
/**
|
|
880
853
|
* Whether the content should flip when there is not enough space.
|
|
881
854
|
* Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
|
|
882
855
|
* @default true
|
|
883
856
|
*/
|
|
884
|
-
this.flip = input(this.config.flip, ...(ngDevMode ?
|
|
885
|
-
|
|
886
|
-
alias: 'ngpNavigationMenuTriggerFlip',
|
|
887
|
-
transform: coerceFlip,
|
|
888
|
-
}]));
|
|
857
|
+
this.flip = input(this.config.flip, { ...(ngDevMode ? { debugName: "flip" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerFlip',
|
|
858
|
+
transform: coerceFlip });
|
|
889
859
|
/**
|
|
890
860
|
* Configure shift behavior to keep the content in view.
|
|
891
861
|
* @default undefined
|
|
892
862
|
*/
|
|
893
|
-
this.shift = input(this.config.shift, ...(ngDevMode ?
|
|
894
|
-
|
|
895
|
-
alias: 'ngpNavigationMenuTriggerShift',
|
|
896
|
-
transform: coerceShift,
|
|
897
|
-
}]));
|
|
863
|
+
this.shift = input(this.config.shift, { ...(ngDevMode ? { debugName: "shift" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerShift',
|
|
864
|
+
transform: coerceShift });
|
|
898
865
|
/**
|
|
899
866
|
* The container for the content.
|
|
900
867
|
* @default 'body'
|
|
901
868
|
*/
|
|
902
|
-
this.container = input(this.config.container, ...(ngDevMode ?
|
|
903
|
-
alias: 'ngpNavigationMenuTriggerContainer',
|
|
904
|
-
}]));
|
|
869
|
+
this.container = input(this.config.container, { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerContainer' });
|
|
905
870
|
/**
|
|
906
871
|
* The cooldown duration in milliseconds.
|
|
907
872
|
* When moving from one navigation menu item to another within this duration,
|
|
908
873
|
* the showDelay is skipped for the new item.
|
|
909
874
|
* @default 300
|
|
910
875
|
*/
|
|
911
|
-
this.cooldown = input(this.config.cooldown, ...(ngDevMode ?
|
|
912
|
-
|
|
913
|
-
alias: 'ngpNavigationMenuTriggerCooldown',
|
|
914
|
-
transform: numberAttribute,
|
|
915
|
-
}]));
|
|
876
|
+
this.cooldown = input(this.config.cooldown, { ...(ngDevMode ? { debugName: "cooldown" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuTriggerCooldown',
|
|
877
|
+
transform: numberAttribute });
|
|
916
878
|
this.state = ngpNavigationMenuTrigger({
|
|
917
879
|
content: this.content,
|
|
918
880
|
disabled: this.disabled,
|
|
@@ -943,10 +905,10 @@ class NgpNavigationMenuTrigger {
|
|
|
943
905
|
hide() {
|
|
944
906
|
this.state.hide();
|
|
945
907
|
}
|
|
946
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
947
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
908
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
909
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenuTrigger, isStandalone: true, selector: "[ngpNavigationMenuTrigger]", inputs: { content: { classPropertyName: "content", publicName: "ngpNavigationMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpNavigationMenuTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpNavigationMenuTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpNavigationMenuTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpNavigationMenuTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, shift: { classPropertyName: "shift", publicName: "ngpNavigationMenuTriggerShift", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpNavigationMenuTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, cooldown: { classPropertyName: "cooldown", publicName: "ngpNavigationMenuTriggerCooldown", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" } }, providers: [provideNavigationMenuTriggerState(), provideRovingFocusItemState()], exportAs: ["ngpNavigationMenuTrigger"], ngImport: i0 }); }
|
|
948
910
|
}
|
|
949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenuTrigger, decorators: [{
|
|
950
912
|
type: Directive,
|
|
951
913
|
args: [{
|
|
952
914
|
selector: '[ngpNavigationMenuTrigger]',
|
|
@@ -972,33 +934,23 @@ class NgpNavigationMenu {
|
|
|
972
934
|
* The orientation of the navigation menu.
|
|
973
935
|
* @default 'horizontal'
|
|
974
936
|
*/
|
|
975
|
-
this.orientation = input(this.config.orientation, ...(ngDevMode ?
|
|
976
|
-
alias: 'ngpNavigationMenuOrientation',
|
|
977
|
-
}]));
|
|
937
|
+
this.orientation = input(this.config.orientation, { ...(ngDevMode ? { debugName: "orientation" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuOrientation' });
|
|
978
938
|
/**
|
|
979
939
|
* The delay in milliseconds before showing content on hover.
|
|
980
940
|
* @default 200
|
|
981
941
|
*/
|
|
982
|
-
this.showDelay = input(this.config.showDelay, ...(ngDevMode ?
|
|
983
|
-
|
|
984
|
-
alias: 'ngpNavigationMenuShowDelay',
|
|
985
|
-
transform: numberAttribute,
|
|
986
|
-
}]));
|
|
942
|
+
this.showDelay = input(this.config.showDelay, { ...(ngDevMode ? { debugName: "showDelay" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuShowDelay',
|
|
943
|
+
transform: numberAttribute });
|
|
987
944
|
/**
|
|
988
945
|
* The delay in milliseconds before hiding content.
|
|
989
946
|
* @default 150
|
|
990
947
|
*/
|
|
991
|
-
this.hideDelay = input(this.config.hideDelay, ...(ngDevMode ?
|
|
992
|
-
|
|
993
|
-
alias: 'ngpNavigationMenuHideDelay',
|
|
994
|
-
transform: numberAttribute,
|
|
995
|
-
}]));
|
|
948
|
+
this.hideDelay = input(this.config.hideDelay, { ...(ngDevMode ? { debugName: "hideDelay" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuHideDelay',
|
|
949
|
+
transform: numberAttribute });
|
|
996
950
|
/**
|
|
997
951
|
* The currently active (open) item value.
|
|
998
952
|
*/
|
|
999
|
-
this.value = input(null, ...(ngDevMode ?
|
|
1000
|
-
alias: 'ngpNavigationMenuValue',
|
|
1001
|
-
}]));
|
|
953
|
+
this.value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'ngpNavigationMenuValue' });
|
|
1002
954
|
/**
|
|
1003
955
|
* Emits when the active item changes.
|
|
1004
956
|
*/
|
|
@@ -1027,10 +979,10 @@ class NgpNavigationMenu {
|
|
|
1027
979
|
setOrientation(orientation) {
|
|
1028
980
|
this.state.setOrientation(orientation);
|
|
1029
981
|
}
|
|
1030
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1031
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
982
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
983
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpNavigationMenu, isStandalone: true, selector: "[ngpNavigationMenu]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpNavigationMenuOrientation", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngpNavigationMenuShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngpNavigationMenuHideDelay", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "ngpNavigationMenuValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpNavigationMenuValueChange" }, host: { attributes: { "role": "navigation" } }, providers: [provideNavigationMenuState({ inherit: false })], exportAs: ["ngpNavigationMenu"], ngImport: i0 }); }
|
|
1032
984
|
}
|
|
1033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpNavigationMenu, decorators: [{
|
|
1034
986
|
type: Directive,
|
|
1035
987
|
args: [{
|
|
1036
988
|
selector: '[ngpNavigationMenu]',
|