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
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, inject, input, booleanAttribute, Directive, output, computed, Injector, ViewContainerRef, signal } from '@angular/core';
|
|
3
3
|
import { provideFocusTrapState } from 'ng-primitives/focus-trap';
|
|
4
4
|
import { ngpMenu, provideMenuState, ngpMenuItem, provideMenuItemState, ngpMenuItemCheckbox, provideMenuItemCheckboxState, injectMenuItemCheckboxState, injectMenuItemRadioState, ngpMenuItemRadio, provideMenuItemRadioState, ngpMenuItemRadioGroup, provideMenuItemRadioGroupState, ngpSubmenuTrigger, provideSubmenuTriggerState, NgpSubmenuTriggerStateToken, NgpMenuTriggerStateToken, NgpSubmenuTrigger, provideMenuTriggerState } from 'ng-primitives/menu';
|
|
5
|
+
import { provideControlContainerIsolation, coerceOffset, coerceFlip, createOverlay, coerceShift } from 'ng-primitives/portal';
|
|
5
6
|
import { ngpRovingFocusGroup, provideRovingFocusGroupState, ngpRovingFocusItem, provideRovingFocusItemState } from 'ng-primitives/roving-focus';
|
|
6
7
|
import { injectElementRef } from 'ng-primitives/internal';
|
|
7
8
|
import { dataBinding, createPrimitive, controlled, styleBinding, listener, onDestroy } from 'ng-primitives/state';
|
|
8
|
-
import { coerceOffset, coerceFlip, createOverlay, coerceShift } from 'ng-primitives/portal';
|
|
9
9
|
|
|
10
10
|
const defaultContextMenuConfig = {
|
|
11
11
|
offset: 2,
|
|
@@ -45,11 +45,8 @@ class NgpContextMenu {
|
|
|
45
45
|
* Whether focus should wrap around when reaching the end of the menu.
|
|
46
46
|
* @default true
|
|
47
47
|
*/
|
|
48
|
-
this.wrap = input(true, ...(ngDevMode ?
|
|
49
|
-
|
|
50
|
-
alias: 'ngpContextMenuWrap',
|
|
51
|
-
transform: booleanAttribute,
|
|
52
|
-
}]));
|
|
48
|
+
this.wrap = input(true, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuWrap',
|
|
49
|
+
transform: booleanAttribute });
|
|
53
50
|
this.state = ngpMenu({ wrap: this.wrap });
|
|
54
51
|
ngpRovingFocusGroup({ inherit: false, wrap: this.wrap });
|
|
55
52
|
}
|
|
@@ -57,14 +54,15 @@ class NgpContextMenu {
|
|
|
57
54
|
closeAllMenus(origin) {
|
|
58
55
|
this.state.closeAllMenus(origin);
|
|
59
56
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
58
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenu, isStandalone: true, selector: "[ngpContextMenu]", inputs: { wrap: { classPropertyName: "wrap", publicName: "ngpContextMenuWrap", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
62
59
|
provideRovingFocusGroupState({ inherit: false }),
|
|
63
60
|
provideMenuState({ inherit: false }),
|
|
64
61
|
provideFocusTrapState(),
|
|
62
|
+
provideControlContainerIsolation(),
|
|
65
63
|
], exportAs: ["ngpContextMenu"], ngImport: i0 }); }
|
|
66
64
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenu, decorators: [{
|
|
68
66
|
type: Directive,
|
|
69
67
|
args: [{
|
|
70
68
|
selector: '[ngpContextMenu]',
|
|
@@ -73,6 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
73
71
|
provideRovingFocusGroupState({ inherit: false }),
|
|
74
72
|
provideMenuState({ inherit: false }),
|
|
75
73
|
provideFocusTrapState(),
|
|
74
|
+
provideControlContainerIsolation(),
|
|
76
75
|
],
|
|
77
76
|
}]
|
|
78
77
|
}], ctorParameters: () => [], propDecorators: { wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpContextMenuWrap", required: false }] }] } });
|
|
@@ -83,24 +82,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
83
82
|
class NgpContextMenuItem {
|
|
84
83
|
constructor() {
|
|
85
84
|
/** Whether the menu item is disabled */
|
|
86
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
87
|
-
|
|
88
|
-
alias: 'ngpContextMenuItemDisabled',
|
|
89
|
-
transform: booleanAttribute,
|
|
90
|
-
}]));
|
|
85
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemDisabled',
|
|
86
|
+
transform: booleanAttribute });
|
|
91
87
|
/** Whether the menu should close when this item is selected */
|
|
92
|
-
this.closeOnSelect = input(true, ...(ngDevMode ?
|
|
93
|
-
|
|
94
|
-
alias: 'ngpContextMenuItemCloseOnSelect',
|
|
95
|
-
transform: booleanAttribute,
|
|
96
|
-
}]));
|
|
88
|
+
this.closeOnSelect = input(true, { ...(ngDevMode ? { debugName: "closeOnSelect" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemCloseOnSelect',
|
|
89
|
+
transform: booleanAttribute });
|
|
97
90
|
ngpMenuItem({ disabled: this.disabled, closeOnSelect: this.closeOnSelect });
|
|
98
91
|
ngpRovingFocusItem({ disabled: this.disabled });
|
|
99
92
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
94
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuItem, isStandalone: true, selector: "[ngpContextMenuItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpContextMenuItemDisabled", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "ngpContextMenuItemCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideMenuItemState(), provideRovingFocusItemState()], exportAs: ["ngpContextMenuItem"], ngImport: i0 }); }
|
|
102
95
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItem, decorators: [{
|
|
104
97
|
type: Directive,
|
|
105
98
|
args: [{
|
|
106
99
|
selector: '[ngpContextMenuItem]',
|
|
@@ -115,21 +108,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
115
108
|
class NgpContextMenuItemCheckbox {
|
|
116
109
|
constructor() {
|
|
117
110
|
/** Whether the checkbox is checked */
|
|
118
|
-
this.checked = input(false, ...(ngDevMode ?
|
|
119
|
-
|
|
120
|
-
alias: 'ngpContextMenuItemCheckboxChecked',
|
|
121
|
-
transform: booleanAttribute,
|
|
122
|
-
}]));
|
|
111
|
+
this.checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemCheckboxChecked',
|
|
112
|
+
transform: booleanAttribute });
|
|
123
113
|
/** Event emitted when the checked state changes */
|
|
124
114
|
this.checkedChange = output({
|
|
125
115
|
alias: 'ngpContextMenuItemCheckboxCheckedChange',
|
|
126
116
|
});
|
|
127
117
|
/** Whether the menu item checkbox is disabled */
|
|
128
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
129
|
-
|
|
130
|
-
alias: 'ngpContextMenuItemCheckboxDisabled',
|
|
131
|
-
transform: booleanAttribute,
|
|
132
|
-
}]));
|
|
118
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemCheckboxDisabled',
|
|
119
|
+
transform: booleanAttribute });
|
|
133
120
|
ngpMenuItemCheckbox({
|
|
134
121
|
checked: this.checked,
|
|
135
122
|
disabled: this.disabled,
|
|
@@ -137,10 +124,10 @@ class NgpContextMenuItemCheckbox {
|
|
|
137
124
|
});
|
|
138
125
|
ngpRovingFocusItem({ disabled: this.disabled });
|
|
139
126
|
}
|
|
140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
141
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
128
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuItemCheckbox, isStandalone: true, selector: "[ngpContextMenuItemCheckbox]", inputs: { checked: { classPropertyName: "checked", publicName: "ngpContextMenuItemCheckboxChecked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpContextMenuItemCheckboxDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "ngpContextMenuItemCheckboxCheckedChange" }, providers: [provideMenuItemCheckboxState(), provideRovingFocusItemState()], exportAs: ["ngpContextMenuItemCheckbox"], ngImport: i0 }); }
|
|
142
129
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemCheckbox, decorators: [{
|
|
144
131
|
type: Directive,
|
|
145
132
|
args: [{
|
|
146
133
|
selector: '[ngpContextMenuItemCheckbox]',
|
|
@@ -158,13 +145,13 @@ class NgpContextMenuItemIndicator {
|
|
|
158
145
|
const element = injectElementRef();
|
|
159
146
|
const checkboxState = injectMenuItemCheckboxState({ optional: true });
|
|
160
147
|
const radioState = injectMenuItemRadioState({ optional: true });
|
|
161
|
-
const checked = computed(() => checkboxState()?.checked() ?? radioState()?.checked() ?? false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
148
|
+
const checked = computed(() => checkboxState()?.checked() ?? radioState()?.checked() ?? false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
162
149
|
dataBinding(element, 'data-checked', checked);
|
|
163
150
|
}
|
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
165
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
152
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpContextMenuItemIndicator, isStandalone: true, selector: "[ngpContextMenuItemIndicator]", exportAs: ["ngpContextMenuItemIndicator"], ngImport: i0 }); }
|
|
166
153
|
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemIndicator, decorators: [{
|
|
168
155
|
type: Directive,
|
|
169
156
|
args: [{
|
|
170
157
|
selector: '[ngpContextMenuItemIndicator]',
|
|
@@ -178,22 +165,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
178
165
|
class NgpContextMenuItemRadio {
|
|
179
166
|
constructor() {
|
|
180
167
|
/** The value this radio item represents */
|
|
181
|
-
this.value = input.required(...(ngDevMode ?
|
|
182
|
-
alias: 'ngpContextMenuItemRadioValue',
|
|
183
|
-
}]));
|
|
168
|
+
this.value = input.required({ ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemRadioValue' });
|
|
184
169
|
/** Whether the radio item is disabled */
|
|
185
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
186
|
-
|
|
187
|
-
alias: 'ngpContextMenuItemRadioDisabled',
|
|
188
|
-
transform: booleanAttribute,
|
|
189
|
-
}]));
|
|
170
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemRadioDisabled',
|
|
171
|
+
transform: booleanAttribute });
|
|
190
172
|
ngpMenuItemRadio({ value: this.value, disabled: this.disabled });
|
|
191
173
|
ngpRovingFocusItem({ disabled: this.disabled });
|
|
192
174
|
}
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemRadio, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
176
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuItemRadio, isStandalone: true, selector: "[ngpContextMenuItemRadio]", inputs: { value: { classPropertyName: "value", publicName: "ngpContextMenuItemRadioValue", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpContextMenuItemRadioDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideMenuItemRadioState(), provideRovingFocusItemState()], exportAs: ["ngpContextMenuItemRadio"], ngImport: i0 }); }
|
|
195
177
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemRadio, decorators: [{
|
|
197
179
|
type: Directive,
|
|
198
180
|
args: [{
|
|
199
181
|
selector: '[ngpContextMenuItemRadio]',
|
|
@@ -208,9 +190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
|
|
|
208
190
|
class NgpContextMenuItemRadioGroup {
|
|
209
191
|
constructor() {
|
|
210
192
|
/** The current value of the radio group */
|
|
211
|
-
this.value = input(null, ...(ngDevMode ?
|
|
212
|
-
alias: 'ngpContextMenuItemRadioGroupValue',
|
|
213
|
-
}]));
|
|
193
|
+
this.value = input(null, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuItemRadioGroupValue' });
|
|
214
194
|
/** Event emitted when the value changes */
|
|
215
195
|
this.valueChange = output({
|
|
216
196
|
alias: 'ngpContextMenuItemRadioGroupValueChange',
|
|
@@ -220,10 +200,10 @@ class NgpContextMenuItemRadioGroup {
|
|
|
220
200
|
onValueChange: value => this.valueChange.emit(value),
|
|
221
201
|
});
|
|
222
202
|
}
|
|
223
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
224
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
204
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuItemRadioGroup, isStandalone: true, selector: "[ngpContextMenuItemRadioGroup]", inputs: { value: { classPropertyName: "value", publicName: "ngpContextMenuItemRadioGroupValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpContextMenuItemRadioGroupValueChange" }, providers: [provideMenuItemRadioGroupState()], exportAs: ["ngpContextMenuItemRadioGroup"], ngImport: i0 }); }
|
|
225
205
|
}
|
|
226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuItemRadioGroup, decorators: [{
|
|
227
207
|
type: Directive,
|
|
228
208
|
args: [{
|
|
229
209
|
selector: '[ngpContextMenuItemRadioGroup]',
|
|
@@ -240,43 +220,30 @@ class NgpContextMenuSubmenuTrigger {
|
|
|
240
220
|
/**
|
|
241
221
|
* Access the submenu template ref.
|
|
242
222
|
*/
|
|
243
|
-
this.menu = input(undefined, ...(ngDevMode ?
|
|
244
|
-
alias: 'ngpContextMenuSubmenuTrigger',
|
|
245
|
-
}]));
|
|
223
|
+
this.menu = input(undefined, { ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuSubmenuTrigger' });
|
|
246
224
|
/**
|
|
247
225
|
* Define if the trigger should be disabled.
|
|
248
226
|
* @default false
|
|
249
227
|
*/
|
|
250
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
251
|
-
|
|
252
|
-
alias: 'ngpContextMenuSubmenuTriggerDisabled',
|
|
253
|
-
transform: booleanAttribute,
|
|
254
|
-
}]));
|
|
228
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuSubmenuTriggerDisabled',
|
|
229
|
+
transform: booleanAttribute });
|
|
255
230
|
/**
|
|
256
231
|
* Define the placement of the submenu relative to the trigger.
|
|
257
232
|
* @default 'right-start'
|
|
258
233
|
*/
|
|
259
|
-
this.placement = input('right-start', ...(ngDevMode ?
|
|
260
|
-
alias: 'ngpContextMenuSubmenuTriggerPlacement',
|
|
261
|
-
}]));
|
|
234
|
+
this.placement = input('right-start', { ...(ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuSubmenuTriggerPlacement' });
|
|
262
235
|
/**
|
|
263
236
|
* Define the offset of the submenu relative to the trigger.
|
|
264
237
|
* @default 0
|
|
265
238
|
*/
|
|
266
|
-
this.offset = input(0, ...(ngDevMode ?
|
|
267
|
-
|
|
268
|
-
alias: 'ngpContextMenuSubmenuTriggerOffset',
|
|
269
|
-
transform: coerceOffset,
|
|
270
|
-
}]));
|
|
239
|
+
this.offset = input(0, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuSubmenuTriggerOffset',
|
|
240
|
+
transform: coerceOffset });
|
|
271
241
|
/**
|
|
272
242
|
* Define whether the submenu should flip when there is not enough space.
|
|
273
243
|
* @default true
|
|
274
244
|
*/
|
|
275
|
-
this.flip = input(true, ...(ngDevMode ?
|
|
276
|
-
|
|
277
|
-
alias: 'ngpContextMenuSubmenuTriggerFlip',
|
|
278
|
-
transform: coerceFlip,
|
|
279
|
-
}]));
|
|
245
|
+
this.flip = input(true, { ...(ngDevMode ? { debugName: "flip" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuSubmenuTriggerFlip',
|
|
246
|
+
transform: coerceFlip });
|
|
280
247
|
this.state = ngpSubmenuTrigger({
|
|
281
248
|
disabled: this.disabled,
|
|
282
249
|
menu: this.menu,
|
|
@@ -297,15 +264,15 @@ class NgpContextMenuSubmenuTrigger {
|
|
|
297
264
|
focus(origin = 'program') {
|
|
298
265
|
this.state.focus(origin);
|
|
299
266
|
}
|
|
300
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
301
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuSubmenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
268
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuSubmenuTrigger, isStandalone: true, selector: "[ngpContextMenuSubmenuTrigger]", inputs: { menu: { classPropertyName: "menu", publicName: "ngpContextMenuSubmenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpContextMenuSubmenuTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpContextMenuSubmenuTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpContextMenuSubmenuTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpContextMenuSubmenuTriggerFlip", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
302
269
|
provideSubmenuTriggerState(),
|
|
303
270
|
{ provide: NgpMenuTriggerStateToken, useExisting: NgpSubmenuTriggerStateToken },
|
|
304
271
|
// Provide as NgpSubmenuTrigger so ngpMenuItem can detect this is a submenu trigger
|
|
305
272
|
{ provide: NgpSubmenuTrigger, useExisting: NgpContextMenuSubmenuTrigger },
|
|
306
273
|
], exportAs: ["ngpContextMenuSubmenuTrigger"], ngImport: i0 }); }
|
|
307
274
|
}
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuSubmenuTrigger, decorators: [{
|
|
309
276
|
type: Directive,
|
|
310
277
|
args: [{
|
|
311
278
|
selector: '[ngpContextMenuSubmenuTrigger]',
|
|
@@ -336,10 +303,10 @@ const [NgpContextMenuTriggerStateToken, ngpContextMenuTrigger, _injectContextMen
|
|
|
336
303
|
const offset = controlled(_offset);
|
|
337
304
|
const context = controlled(_context);
|
|
338
305
|
// Internal state
|
|
339
|
-
const overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : []));
|
|
340
|
-
const open = computed(() => overlay()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
341
|
-
const openOrigin = signal('program', ...(ngDevMode ? [{ debugName: "openOrigin" }] : []));
|
|
342
|
-
const cursorPosition = signal(null, ...(ngDevMode ? [{ debugName: "cursorPosition" }] : []));
|
|
306
|
+
const overlay = signal(null, ...(ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []));
|
|
307
|
+
const open = computed(() => overlay()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
308
|
+
const openOrigin = signal('program', ...(ngDevMode ? [{ debugName: "openOrigin" }] : /* istanbul ignore next */ []));
|
|
309
|
+
const cursorPosition = signal(null, ...(ngDevMode ? [{ debugName: "cursorPosition" }] : /* istanbul ignore next */ []));
|
|
343
310
|
// Host bindings
|
|
344
311
|
dataBinding(element, 'data-open', open);
|
|
345
312
|
// Prevent iOS text selection and callout on long-press.
|
|
@@ -502,8 +469,8 @@ const [NgpContextMenuTriggerStateToken, ngpContextMenuTrigger, _injectContextMen
|
|
|
502
469
|
setPointerOverContent,
|
|
503
470
|
};
|
|
504
471
|
});
|
|
505
|
-
function injectContextMenuTriggerState() {
|
|
506
|
-
return _injectContextMenuTriggerState();
|
|
472
|
+
function injectContextMenuTriggerState(options) {
|
|
473
|
+
return _injectContextMenuTriggerState(options);
|
|
507
474
|
}
|
|
508
475
|
|
|
509
476
|
/**
|
|
@@ -519,65 +486,45 @@ class NgpContextMenuTrigger {
|
|
|
519
486
|
/**
|
|
520
487
|
* The menu template ref or ComponentType to display.
|
|
521
488
|
*/
|
|
522
|
-
this.menu = input(undefined, ...(ngDevMode ?
|
|
523
|
-
alias: 'ngpContextMenuTrigger',
|
|
524
|
-
}]));
|
|
489
|
+
this.menu = input(undefined, { ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTrigger' });
|
|
525
490
|
/**
|
|
526
491
|
* Define if the trigger should be disabled.
|
|
527
492
|
* @default false
|
|
528
493
|
*/
|
|
529
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
530
|
-
|
|
531
|
-
alias: 'ngpContextMenuTriggerDisabled',
|
|
532
|
-
transform: booleanAttribute,
|
|
533
|
-
}]));
|
|
494
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerDisabled',
|
|
495
|
+
transform: booleanAttribute });
|
|
534
496
|
/**
|
|
535
497
|
* Define the offset of the context menu relative to the cursor position.
|
|
536
498
|
* @default 2
|
|
537
499
|
*/
|
|
538
|
-
this.offset = input(this.config.offset, ...(ngDevMode ?
|
|
539
|
-
|
|
540
|
-
alias: 'ngpContextMenuTriggerOffset',
|
|
541
|
-
transform: coerceOffset,
|
|
542
|
-
}]));
|
|
500
|
+
this.offset = input(this.config.offset, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerOffset',
|
|
501
|
+
transform: coerceOffset });
|
|
543
502
|
/**
|
|
544
503
|
* Define whether the context menu should flip when there is not enough space.
|
|
545
504
|
* @default true
|
|
546
505
|
*/
|
|
547
|
-
this.flip = input(this.config.flip, ...(ngDevMode ?
|
|
548
|
-
|
|
549
|
-
alias: 'ngpContextMenuTriggerFlip',
|
|
550
|
-
transform: coerceFlip,
|
|
551
|
-
}]));
|
|
506
|
+
this.flip = input(this.config.flip, { ...(ngDevMode ? { debugName: "flip" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerFlip',
|
|
507
|
+
transform: coerceFlip });
|
|
552
508
|
/**
|
|
553
509
|
* Configure shift behavior to keep the context menu in view.
|
|
554
510
|
* @default undefined
|
|
555
511
|
*/
|
|
556
|
-
this.shift = input(this.config.shift, ...(ngDevMode ?
|
|
557
|
-
|
|
558
|
-
alias: 'ngpContextMenuTriggerShift',
|
|
559
|
-
transform: coerceShift,
|
|
560
|
-
}]));
|
|
512
|
+
this.shift = input(this.config.shift, { ...(ngDevMode ? { debugName: "shift" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerShift',
|
|
513
|
+
transform: coerceShift });
|
|
561
514
|
/**
|
|
562
515
|
* Define the container in which the context menu should be attached.
|
|
563
516
|
* @default document.body
|
|
564
517
|
*/
|
|
565
|
-
this.container = input(this.config.container, ...(ngDevMode ?
|
|
566
|
-
alias: 'ngpContextMenuTriggerContainer',
|
|
567
|
-
}]));
|
|
518
|
+
this.container = input(this.config.container, { ...(ngDevMode ? { debugName: "container" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerContainer' });
|
|
568
519
|
/**
|
|
569
520
|
* Defines how the context menu behaves when the window is scrolled.
|
|
570
521
|
* @default 'close'
|
|
571
522
|
*/
|
|
572
|
-
this.scrollBehavior = input(this.config.scrollBehavior, ...(ngDevMode ?
|
|
573
|
-
alias: 'ngpContextMenuTriggerScrollBehavior',
|
|
574
|
-
}]));
|
|
523
|
+
this.scrollBehavior = input(this.config.scrollBehavior, { ...(ngDevMode ? { debugName: "scrollBehavior" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerScrollBehavior' });
|
|
575
524
|
/**
|
|
576
525
|
* Provide context to the menu. This can be used to pass data to the menu content.
|
|
577
526
|
*/
|
|
578
|
-
this.context = input(undefined, ...(ngDevMode ?
|
|
579
|
-
alias: 'ngpContextMenuTriggerContext',
|
|
580
|
-
}]));
|
|
527
|
+
this.context = input(undefined, { ...(ngDevMode ? { debugName: "context" } : /* istanbul ignore next */ {}), alias: 'ngpContextMenuTriggerContext' });
|
|
581
528
|
/**
|
|
582
529
|
* The context menu trigger state.
|
|
583
530
|
*/
|
|
@@ -592,10 +539,10 @@ class NgpContextMenuTrigger {
|
|
|
592
539
|
context: this.context,
|
|
593
540
|
});
|
|
594
541
|
}
|
|
595
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
596
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
543
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpContextMenuTrigger, isStandalone: true, selector: "[ngpContextMenuTrigger]", inputs: { menu: { classPropertyName: "menu", publicName: "ngpContextMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpContextMenuTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpContextMenuTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpContextMenuTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, shift: { classPropertyName: "shift", publicName: "ngpContextMenuTriggerShift", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpContextMenuTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "ngpContextMenuTriggerScrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "ngpContextMenuTriggerContext", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideContextMenuTriggerState(), provideMenuTriggerState()], exportAs: ["ngpContextMenuTrigger"], ngImport: i0 }); }
|
|
597
544
|
}
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpContextMenuTrigger, decorators: [{
|
|
599
546
|
type: Directive,
|
|
600
547
|
args: [{
|
|
601
548
|
selector: '[ngpContextMenuTrigger]',
|