@ngneers/controls 0.0.1-pre1 → 0.0.1-pre2
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/LICENSE +21 -0
- package/fesm2022/ngneers-controls-accordion.mjs +194 -0
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-ng.mjs +668 -0
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api.mjs +256 -227
- package/fesm2022/ngneers-controls-api.mjs.map +1 -1
- package/fesm2022/ngneers-controls-avatar.mjs +70 -0
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-base.mjs +397 -0
- package/fesm2022/ngneers-controls-base.mjs.map +1 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs +74 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button-group.mjs +51 -0
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button.mjs +62 -0
- package/fesm2022/ngneers-controls-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar-time-C7UnIFzU.mjs +63 -0
- package/fesm2022/ngneers-controls-calendar-time-C7UnIFzU.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar.mjs +468 -0
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-checkbox.mjs +58 -0
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
- package/fesm2022/ngneers-controls-chip.mjs +52 -0
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-defer.mjs +43 -0
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-dialog.mjs +329 -33
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -1
- package/fesm2022/ngneers-controls-directives.mjs +443 -0
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
- package/fesm2022/ngneers-controls-drawer.mjs +232 -0
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs +120 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-filter.mjs +516 -0
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs +87 -0
- package/fesm2022/ngneers-controls-i18n-de-CdTPeBiR.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs +87 -0
- package/fesm2022/ngneers-controls-i18n-en-Cfp2pOLY.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n.mjs +57 -0
- package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-calendar-z5xA9wTT.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-calendar-z5xA9wTT.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-check-DdAQ9k-T.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_down-HO-z-xOr.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_left-CC5psi16.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_right-BRxlzx4G.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-chevron_up-cqhPO7g2.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-ellipsis-DXIGA1sk.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-filter-oU7E6Xgr.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-filter_solid-CqIKuR4N.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-magnifying_glass-T4Hzbkig.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-minus-oGDEFO4E.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort-CRD4tafz.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort_down-DiFB1P6R.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-sort_up-Bq_q3hIi.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs +4 -0
- package/fesm2022/ngneers-controls-icon-xmark-BZKZORiu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon.mjs +60 -18
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -1
- package/fesm2022/ngneers-controls-inplace.mjs +107 -0
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-field.mjs +141 -0
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-mask.mjs +282 -0
- package/fesm2022/ngneers-controls-input-mask.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input.mjs +69 -0
- package/fesm2022/ngneers-controls-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-item-view.mjs +441 -0
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
- package/fesm2022/ngneers-controls-list-box.mjs +157 -53
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -1
- package/fesm2022/ngneers-controls-menu.mjs +332 -0
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-message.mjs +29 -0
- package/fesm2022/ngneers-controls-message.mjs.map +1 -0
- package/fesm2022/ngneers-controls-paginator.mjs +111 -0
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
- package/fesm2022/ngneers-controls-popover.mjs +129 -40
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -1
- package/fesm2022/ngneers-controls-progress.mjs +82 -0
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroller.mjs +155 -78
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -1
- package/fesm2022/ngneers-controls-select-button.mjs +55 -0
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select.mjs +313 -103
- package/fesm2022/ngneers-controls-select.mjs.map +1 -1
- package/fesm2022/ngneers-controls-slider.mjs +155 -0
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spinner.mjs +169 -0
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
- package/fesm2022/ngneers-controls-splitter.mjs +717 -0
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-switch.mjs +39 -0
- package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
- package/fesm2022/ngneers-controls-table.mjs +379 -0
- package/fesm2022/ngneers-controls-table.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tabs.mjs +287 -0
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tag.mjs +29 -0
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toast.mjs +184 -0
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs +65 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tooltip.mjs +454 -0
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs +227 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils.mjs +217 -60
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -1
- package/fesm2022/ngneers-controls.mjs.map +1 -1
- package/package.json +167 -32
- package/types/ngneers-controls-accordion.d.ts +114 -0
- package/types/ngneers-controls-api-ng.d.ts +291 -0
- package/types/ngneers-controls-api.d.ts +99 -0
- package/types/ngneers-controls-avatar.d.ts +50 -0
- package/types/ngneers-controls-base.d.ts +166 -0
- package/types/ngneers-controls-breadcrumb.d.ts +86 -0
- package/types/ngneers-controls-button-group.d.ts +30 -0
- package/types/ngneers-controls-button.d.ts +34 -0
- package/types/ngneers-controls-calendar.d.ts +275 -0
- package/types/ngneers-controls-checkbox.d.ts +38 -0
- package/types/ngneers-controls-chip.d.ts +37 -0
- package/types/ngneers-controls-defer.d.ts +22 -0
- package/types/ngneers-controls-dialog.d.ts +218 -0
- package/types/ngneers-controls-directives.d.ts +146 -0
- package/types/ngneers-controls-drawer.d.ts +220 -0
- package/types/ngneers-controls-edit-inplace.d.ts +182 -0
- package/types/ngneers-controls-filter.d.ts +304 -0
- package/types/ngneers-controls-i18n.d.ts +108 -0
- package/types/ngneers-controls-icon.d.ts +74 -0
- package/types/ngneers-controls-inplace.d.ts +95 -0
- package/types/ngneers-controls-input-field.d.ts +159 -0
- package/types/ngneers-controls-input-mask.d.ts +83 -0
- package/types/ngneers-controls-input.d.ts +27 -0
- package/types/ngneers-controls-item-view.d.ts +211 -0
- package/types/ngneers-controls-list-box.d.ts +216 -0
- package/types/ngneers-controls-menu.d.ts +178 -0
- package/types/ngneers-controls-message.d.ts +19 -0
- package/types/ngneers-controls-paginator.d.ts +162 -0
- package/types/ngneers-controls-popover.d.ts +101 -0
- package/types/ngneers-controls-progress.d.ts +44 -0
- package/types/ngneers-controls-scroller.d.ts +137 -0
- package/types/ngneers-controls-select-button.d.ts +37 -0
- package/types/ngneers-controls-select.d.ts +314 -0
- package/types/ngneers-controls-slider.d.ts +53 -0
- package/types/ngneers-controls-spinner.d.ts +105 -0
- package/types/ngneers-controls-splitter.d.ts +391 -0
- package/types/ngneers-controls-switch.d.ts +18 -0
- package/types/ngneers-controls-table.d.ts +157 -0
- package/types/ngneers-controls-tabs.d.ts +106 -0
- package/types/ngneers-controls-tag.d.ts +19 -0
- package/types/ngneers-controls-toast.d.ts +70 -0
- package/types/ngneers-controls-toggle-button.d.ts +46 -0
- package/types/ngneers-controls-tooltip.d.ts +188 -0
- package/types/ngneers-controls-utils-ng.d.ts +57 -0
- package/types/ngneers-controls-utils.d.ts +130 -0
- package/api/index.d.ts +0 -134
- package/custom-types/index.d.ts +0 -7
- package/dialog/index.d.ts +0 -43
- package/fesm2022/ngneers-controls-custom-types.mjs +0 -4
- package/fesm2022/ngneers-controls-custom-types.mjs.map +0 -1
- package/fesm2022/ngneers-controls-form-field.mjs +0 -33
- package/fesm2022/ngneers-controls-form-field.mjs.map +0 -1
- package/fesm2022/ngneers-controls-lazy-cacher.mjs +0 -30
- package/fesm2022/ngneers-controls-lazy-cacher.mjs.map +0 -1
- package/fesm2022/ngneers-controls-text-field.mjs +0 -23
- package/fesm2022/ngneers-controls-text-field.mjs.map +0 -1
- package/form-field/index.d.ts +0 -19
- package/icon/index.d.ts +0 -30
- package/lazy-cacher/index.d.ts +0 -14
- package/list-box/index.d.ts +0 -58
- package/popover/index.d.ts +0 -41
- package/scroller/index.d.ts +0 -95
- package/select/index.d.ts +0 -86
- package/text-field/index.d.ts +0 -10
- package/utils/index.d.ts +0 -36
- /package/{index.d.ts → types/ngneers-controls.d.ts} +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
2
|
+
import { PositioningSizeConstraints, TooltipOptions } from '@ngneers/controls/api/ng';
|
|
3
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
6
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
7
|
+
import { TimeSpan } from '@ngneers/controls/utils';
|
|
8
|
+
import { Placement } from '@floating-ui/dom';
|
|
9
|
+
|
|
10
|
+
type RelativeAnchorElementPositionData = {
|
|
11
|
+
start: number;
|
|
12
|
+
center: number;
|
|
13
|
+
end: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @category control
|
|
18
|
+
*/
|
|
19
|
+
declare class NgnTooltip extends NgnBase<'tooltip'> implements OnDestroy {
|
|
20
|
+
protected readonly theme: null;
|
|
21
|
+
private readonly _viewContainerRef;
|
|
22
|
+
private readonly _config;
|
|
23
|
+
private readonly _tooltip;
|
|
24
|
+
/**
|
|
25
|
+
* The content of the tooltip, can be a string or a TemplateRef.
|
|
26
|
+
* If the value is falsy, the tooltip will not be shown.
|
|
27
|
+
* @alias ngnTooltip
|
|
28
|
+
*/
|
|
29
|
+
readonly content: _angular_core.InputSignal<string | TemplateRef<unknown> | null | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* The CSS class to apply to the tooltip.
|
|
32
|
+
* This can be used to apply custom styles to the tooltip.
|
|
33
|
+
* @alias ngnTooltipStyleClass
|
|
34
|
+
*/
|
|
35
|
+
readonly styleClass: _angular_core.InputSignal<string | null | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* If set to `true`, the tooltip will only be shown if the anchor element is truncated. `""` is equivalent to `true`.
|
|
38
|
+
* @alias ngnTooltipShowOnlyIfTruncated
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
readonly showOnlyIfTruncated: _angular_core.InputSignal<boolean | "">;
|
|
42
|
+
/**
|
|
43
|
+
* The size constraints for the tooltip.
|
|
44
|
+
* This can be used to limit the width and height of the tooltip.
|
|
45
|
+
* If not provided, the tooltip is only constrained by the size of the screen.
|
|
46
|
+
* @alias ngnTooltipSize
|
|
47
|
+
*/
|
|
48
|
+
readonly size: _angular_core.InputSignal<PositioningSizeConstraints | null | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* The options for the tooltip.
|
|
51
|
+
* This is a shorthand for setting multiple options at once.
|
|
52
|
+
* The individual options take precedence over the options set here.
|
|
53
|
+
* @alias ngnTooltipOptions
|
|
54
|
+
*/
|
|
55
|
+
readonly options: _angular_core.InputSignal<Partial<TooltipOptions> | null | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* The placement of the tooltip relative to the anchor element.
|
|
58
|
+
* @alias ngnTooltipPlacement
|
|
59
|
+
* @default 'bottom'
|
|
60
|
+
*/
|
|
61
|
+
readonly placement: _angular_core.InputSignal<Placement | null | undefined>;
|
|
62
|
+
/**
|
|
63
|
+
* The offset in Pixels of the tooltip from the anchor element.
|
|
64
|
+
* @alias ngnTooltipOffset
|
|
65
|
+
* @default 4
|
|
66
|
+
*/
|
|
67
|
+
readonly offset: _angular_core.InputSignal<number | null | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* The delay before the tooltip is shown. If a number is provided, it is interpreted as milliseconds.
|
|
70
|
+
* @alias ngnTooltipShowDelay
|
|
71
|
+
* @default '0.5s'
|
|
72
|
+
*/
|
|
73
|
+
readonly showDelay: _angular_core.InputSignal<TimeSpan | null | undefined>;
|
|
74
|
+
/**
|
|
75
|
+
* The delay before the tooltip is hidden. If a number is provided, it is interpreted as milliseconds.
|
|
76
|
+
* @alias ngnTooltipHideDelay
|
|
77
|
+
* @default '0.1s'
|
|
78
|
+
*/
|
|
79
|
+
readonly hideDelay: _angular_core.InputSignal<TimeSpan | null | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Whether to show an arrow pointing to the anchor element. `""` is equivalent to `true`.
|
|
82
|
+
* @alias ngnTooltipShowArrow
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
readonly showArrow: _angular_core.InputSignal<boolean | "" | null | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* Shows the tooltip on hover.
|
|
88
|
+
* @alias ngnTooltipShowOnHover
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
readonly showOnHover: _angular_core.InputSignal<boolean | "" | null | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* Shows the tooltip on focus.
|
|
94
|
+
* @alias ngnTooltipShowOnFocus
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
readonly showOnFocus: _angular_core.InputSignal<boolean | "" | null | undefined>;
|
|
98
|
+
/**
|
|
99
|
+
* Hides the tooltip (without delay) when the mouse hovers over the tooltip.
|
|
100
|
+
* @alias ngnTooltipHideOnTooltipHover
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
readonly hideOnTooltipHover: _angular_core.InputSignal<boolean | "" | null | undefined>;
|
|
104
|
+
/**
|
|
105
|
+
* Hides the tooltip (without delay) when the user clicks on the tooltip.
|
|
106
|
+
* @alias ngnTooltipHideOnClick
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
readonly hideOnClick: _angular_core.InputSignal<boolean | "" | null | undefined>;
|
|
110
|
+
readonly effectiveOptions: _angular_core.Signal<TooltipOptions>;
|
|
111
|
+
readonly tooltip: _angular_core.Signal<TooltipComponent | undefined>;
|
|
112
|
+
constructor();
|
|
113
|
+
ngOnDestroy(): void;
|
|
114
|
+
show(): void;
|
|
115
|
+
hide(): void;
|
|
116
|
+
protected onMouseEnter(): void;
|
|
117
|
+
protected onMouseLeave(): void;
|
|
118
|
+
protected onFocus(): void;
|
|
119
|
+
protected onBlur(): void;
|
|
120
|
+
private getTooltip;
|
|
121
|
+
private updateContent;
|
|
122
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnTooltip, never>;
|
|
123
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgnTooltip, "[ngnTooltip]", ["ngnTooltip"], { "content": { "alias": "ngnTooltip"; "required": false; "isSignal": true; }; "styleClass": { "alias": "ngnTooltipStyleClass"; "required": false; "isSignal": true; }; "showOnlyIfTruncated": { "alias": "ngnTooltipShowOnlyIfTruncated"; "required": false; "isSignal": true; }; "size": { "alias": "ngnTooltipSize"; "required": false; "isSignal": true; }; "options": { "alias": "ngnTooltipOptions"; "required": false; "isSignal": true; }; "placement": { "alias": "ngnTooltipPlacement"; "required": false; "isSignal": true; }; "offset": { "alias": "ngnTooltipOffset"; "required": false; "isSignal": true; }; "showDelay": { "alias": "ngnTooltipShowDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "ngnTooltipHideDelay"; "required": false; "isSignal": true; }; "showArrow": { "alias": "ngnTooltipShowArrow"; "required": false; "isSignal": true; }; "showOnHover": { "alias": "ngnTooltipShowOnHover"; "required": false; "isSignal": true; }; "showOnFocus": { "alias": "ngnTooltipShowOnFocus"; "required": false; "isSignal": true; }; "hideOnTooltipHover": { "alias": "ngnTooltipHideOnTooltipHover"; "required": false; "isSignal": true; }; "hideOnClick": { "alias": "ngnTooltipHideOnClick"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
124
|
+
}
|
|
125
|
+
declare class TooltipComponent extends NgnBase<'tooltip'> {
|
|
126
|
+
private _showHideTimeout?;
|
|
127
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"tooltip", ["root", "content", "text", "with-arrow", "closing", "top", "bottom", "left", "right", "start", "end"], readonly _ngneers_controls_themes.ControlTemplate<string, string[], readonly any[]>[]>>;
|
|
128
|
+
private readonly _config;
|
|
129
|
+
/**
|
|
130
|
+
* The anchor element to which the tooltip is attached.
|
|
131
|
+
*/
|
|
132
|
+
readonly anchor: _angular_core.InputSignal<HTMLElement>;
|
|
133
|
+
/**
|
|
134
|
+
* The text content of the tooltip.
|
|
135
|
+
*/
|
|
136
|
+
readonly text: _angular_core.InputSignal<string | null | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* The content template of the tooltip.
|
|
139
|
+
*/
|
|
140
|
+
readonly content: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
141
|
+
/**
|
|
142
|
+
* If set to `true`, the tooltip will only be shown if the anchor element is truncated. `""` is equivalent to `true`.
|
|
143
|
+
* @default `false`
|
|
144
|
+
*/
|
|
145
|
+
readonly showOnlyIfTruncated: _angular_core.InputSignal<boolean | "">;
|
|
146
|
+
/**
|
|
147
|
+
* The size constraints for the tooltip.
|
|
148
|
+
* This can be used to limit the width and height of the tooltip.
|
|
149
|
+
* If not provided, the tooltip is only constrained by the size of the screen.
|
|
150
|
+
*/
|
|
151
|
+
readonly size: _angular_core.InputSignal<PositioningSizeConstraints | null | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* The options for the tooltip.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
readonly options: _angular_core.InputSignal<TooltipOptions>;
|
|
157
|
+
protected readonly showDelayMs: _angular_core.Signal<number>;
|
|
158
|
+
protected readonly hideDelayMs: _angular_core.Signal<number>;
|
|
159
|
+
protected readonly position: _angular_core.WritableSignal<{
|
|
160
|
+
x: number;
|
|
161
|
+
y: number;
|
|
162
|
+
}>;
|
|
163
|
+
protected readonly positionClass: _angular_core.WritableSignal<string>;
|
|
164
|
+
protected readonly relativeAnchorElementPosition: _angular_core.WritableSignal<RelativeAnchorElementPositionData | undefined>;
|
|
165
|
+
private readonly _isShown;
|
|
166
|
+
private readonly _isClosing;
|
|
167
|
+
readonly id: string;
|
|
168
|
+
readonly isShown: _angular_core.Signal<boolean>;
|
|
169
|
+
readonly isClosing: _angular_core.Signal<boolean>;
|
|
170
|
+
private readonly _defaultContentTemplate;
|
|
171
|
+
protected readonly contentTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
172
|
+
private readonly _autoPos;
|
|
173
|
+
constructor();
|
|
174
|
+
show(skipDelay?: boolean): void;
|
|
175
|
+
hide(skipDelay?: boolean): void;
|
|
176
|
+
protected onMouseEnter(): void;
|
|
177
|
+
protected onMouseLeave(): void;
|
|
178
|
+
protected onClick(event: PointerEvent): void;
|
|
179
|
+
protected onDocumentKeyDown(event: KeyboardEvent): void;
|
|
180
|
+
protected onShow(): void;
|
|
181
|
+
protected onHide(): void;
|
|
182
|
+
protected onToggle(event: Event): void;
|
|
183
|
+
protected toPixels(value: number | undefined): string | undefined;
|
|
184
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
185
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "ngn-tooltip", never, { "anchor": { "alias": "anchor"; "required": true; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "showOnlyIfTruncated": { "alias": "showOnlyIfTruncated"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export { NgnTooltip, TooltipComponent };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal, ProviderToken, EffectRef, InputSignal, InputSignalWithTransform, Injector } from '@angular/core';
|
|
3
|
+
import { NgnGlobalType } from '@ngneers/controls/utils';
|
|
4
|
+
|
|
5
|
+
declare function classSignal(element: HTMLElement, klass: Signal<string | string[]>): void;
|
|
6
|
+
|
|
7
|
+
declare function generateElementId(): string;
|
|
8
|
+
|
|
9
|
+
declare class NgnGlobal implements NgnGlobalType {
|
|
10
|
+
private readonly _window;
|
|
11
|
+
constructor();
|
|
12
|
+
get nextElementId(): number;
|
|
13
|
+
set nextElementId(value: number);
|
|
14
|
+
get fancyLogging(): boolean;
|
|
15
|
+
set fancyLogging(value: boolean);
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgnGlobal, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgnGlobal>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare function injectOrThrow<T>(token: ProviderToken<T>, moduleName: string, errorMsg: string): T;
|
|
21
|
+
|
|
22
|
+
declare function signalWithPrevious<T>(signal: Signal<T>, previous?: T): Signal<{
|
|
23
|
+
current: T;
|
|
24
|
+
previous: T | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
declare function computedWithPrevious<T>(computeFn: (prev?: T) => T, previous?: T): Signal<T>;
|
|
27
|
+
declare function effectWithPrevious<T>(signal: Signal<T>, effectFn: (current: T, previous: T | undefined) => void): EffectRef;
|
|
28
|
+
declare function explicitEffect<T extends readonly Signal<any>[]>(signals: [...T], effectFn: (values: {
|
|
29
|
+
[K in keyof T]: T[K] extends Signal<infer U> ? U : never;
|
|
30
|
+
}) => void): EffectRef;
|
|
31
|
+
declare function explicitAfterRenderEffect<T extends readonly Signal<any>[]>(signals: [...T], effectFn: (values: {
|
|
32
|
+
[K in keyof T]: T[K] extends Signal<infer U> ? U : never;
|
|
33
|
+
}) => void): EffectRef;
|
|
34
|
+
declare function asyncComputed<T>(computeFn: () => Promise<T>, initial: T): {
|
|
35
|
+
(): T;
|
|
36
|
+
isRunning: Signal<boolean>;
|
|
37
|
+
firstRunCompleted: Signal<boolean>;
|
|
38
|
+
};
|
|
39
|
+
declare function setInputSignalValue<T>(input: InputSignal<T> | InputSignalWithTransform<T, unknown>, value: T): void;
|
|
40
|
+
declare function afterRenderComputed<T>(computeFn: () => T, defaultValue: T): () => T;
|
|
41
|
+
declare function debounceSignal<T>(input: Signal<T>, delayMs: (() => number) | number): Signal<T>;
|
|
42
|
+
|
|
43
|
+
type NgnStateStorage = 'local' | 'session';
|
|
44
|
+
declare function loadState<T>(storage: NgnStateStorage, key: string): T | null;
|
|
45
|
+
declare function saveState<T>(storage: NgnStateStorage, key: string, state: T | null): void;
|
|
46
|
+
type RegisterStateOptions<T> = {
|
|
47
|
+
storage: () => NgnStateStorage;
|
|
48
|
+
key: () => string | null | undefined;
|
|
49
|
+
valueFn: (previousState: T | null) => T | null;
|
|
50
|
+
onLoad: (state: T | null) => T | null;
|
|
51
|
+
debounce?: number;
|
|
52
|
+
injector?: Injector;
|
|
53
|
+
};
|
|
54
|
+
declare function registerState<T>(options: RegisterStateOptions<T>): void;
|
|
55
|
+
|
|
56
|
+
export { NgnGlobal, afterRenderComputed, asyncComputed, classSignal, computedWithPrevious, debounceSignal, effectWithPrevious, explicitAfterRenderEffect, explicitEffect, generateElementId, injectOrThrow, loadState, registerState, saveState, setInputSignalValue, signalWithPrevious };
|
|
57
|
+
export type { NgnStateStorage, RegisterStateOptions };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
declare function toggleClass(element: HTMLElement, className: string | string[], state: boolean): void;
|
|
2
|
+
|
|
3
|
+
declare function areObjectsDeepEqual<T extends object>(a: T, b: T): boolean;
|
|
4
|
+
declare function areArraysDeepEqual<T>(a: readonly T[], b: readonly T[]): boolean;
|
|
5
|
+
|
|
6
|
+
declare function throwExp(moduleName: string, errorMsg: string, ...additionalContext: unknown[]): never;
|
|
7
|
+
declare class NgnError extends Error {
|
|
8
|
+
readonly additionalContext?: unknown[];
|
|
9
|
+
constructor(area: string, errorMsg: string, ...additionalContext: unknown[]);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare function maybeCallback<T>(value: T | (() => T)): T;
|
|
13
|
+
|
|
14
|
+
declare function fuzzyMatch(input: string, search: string): boolean;
|
|
15
|
+
|
|
16
|
+
declare const globalPropertyName = "__ngn-controls-global__";
|
|
17
|
+
interface NgnGlobalType {
|
|
18
|
+
nextElementId: number;
|
|
19
|
+
fancyLogging: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface Window {
|
|
23
|
+
[globalPropertyName]: NgnGlobalType;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
28
|
+
declare const Logger: {
|
|
29
|
+
logLevel: LogLevel;
|
|
30
|
+
debug(...args: unknown[]): void;
|
|
31
|
+
info(...args: unknown[]): void;
|
|
32
|
+
warn(...args: unknown[]): void;
|
|
33
|
+
error(...args: unknown[]): void;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare function notNullish<T>(value: T | null | undefined): value is T;
|
|
37
|
+
|
|
38
|
+
type Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
type SubKey<P, K> = [P] extends [never] ? K : P extends string ? K extends string ? `${P}.${K}` : K : K;
|
|
42
|
+
type DeepPartial<T, Exclude extends string = never, P = never> = T extends object ? SubKey<P, '*'> extends Exclude ? T : Prettify<{
|
|
43
|
+
[K in keyof T as SubKey<P, K> extends Exclude ? never : K]?: DeepPartial<T[K], Exclude, SubKey<P, K>>;
|
|
44
|
+
} & {
|
|
45
|
+
[K in keyof T as SubKey<P, K> extends Exclude ? K : never]: DeepPartial<T[K], Exclude, SubKey<P, K>>;
|
|
46
|
+
}> : T;
|
|
47
|
+
/**
|
|
48
|
+
* Returns all keys of a type T.
|
|
49
|
+
* If T is a union, returns all keys from all union members.
|
|
50
|
+
*/
|
|
51
|
+
type AllKeysOfUnion<T> = T extends any ? keyof T : never;
|
|
52
|
+
/**
|
|
53
|
+
* Angular fills unspecified generic inputs with `any`.
|
|
54
|
+
* This replaces that `any` with a `Default` type, or returns `T` if `T` is not `any`.
|
|
55
|
+
*/
|
|
56
|
+
type InputGeneric<T, Default> = symbol extends T ? Default : T;
|
|
57
|
+
|
|
58
|
+
declare function deepCopy<T>(obj: T): T extends ReadonlyArray<infer U> ? Array<U> : T;
|
|
59
|
+
declare function objectKeys<T extends object>(obj: T): (keyof T)[];
|
|
60
|
+
declare function objectEntries<T extends object>(obj: T): [keyof T, T[keyof T]][];
|
|
61
|
+
declare function isObject(item: unknown): item is Record<string, unknown>;
|
|
62
|
+
declare function deepMerge<T extends Record<string, unknown>, U extends Record<string, unknown>>(target: T, source: U): T & U;
|
|
63
|
+
declare function getPropertyIfExists<T extends object, K extends AllKeysOfUnion<T>>(obj: T, key: K): T[K] | undefined;
|
|
64
|
+
|
|
65
|
+
declare function getScrollTop(elementOffsetTop: number, elementHeight: number, containerHeight: number, currentScrollTop: number, behavior: ScrollLogicalPosition): number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Represents a time span that can be expressed in various formats:
|
|
69
|
+
* - As a number (milliseconds)
|
|
70
|
+
* - As a string in the format "XdXhXmXsXms" where each part is optional (e.g., "1d2h30m45s500ms" or "2h15m")
|
|
71
|
+
* - As an object with properties for days, hours, minutes, seconds, and milliseconds
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* // As a number
|
|
75
|
+
* const duration1: TimeSpan = 5000;
|
|
76
|
+
* // As a string
|
|
77
|
+
* const duration2: TimeSpan = "1d2h30m45s500ms";
|
|
78
|
+
* // As an object
|
|
79
|
+
* const duration3: TimeSpan = { days: 1, hours: 2, minutes: 30, seconds: 45, milliseconds: 500 };
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
type TimeSpan = number | `${`${number}d` | ''}${`${number}h` | ''}${`${number}m` | ''}${`${number}s` | ''}${`${number}ms` | ''}` | {
|
|
83
|
+
/**
|
|
84
|
+
* Number of days in the time span.
|
|
85
|
+
*/
|
|
86
|
+
days?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Number of hours in the time span.
|
|
89
|
+
*/
|
|
90
|
+
hours?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Number of minutes in the time span.
|
|
93
|
+
*/
|
|
94
|
+
minutes?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Number of seconds in the time span.
|
|
97
|
+
*/
|
|
98
|
+
seconds?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Number of milliseconds in the time span.
|
|
101
|
+
*/
|
|
102
|
+
milliseconds?: number;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Checks if the provided value is a valid TimeSpan.
|
|
106
|
+
* @param value The value to check.
|
|
107
|
+
* @returns `true` if the value is a valid TimeSpan, otherwise `false`.
|
|
108
|
+
*/
|
|
109
|
+
declare function isTimeSpan(value: unknown): value is TimeSpan;
|
|
110
|
+
/**
|
|
111
|
+
* Converts a TimeSpan to milliseconds.
|
|
112
|
+
* @param timeSpan The TimeSpan to convert.
|
|
113
|
+
* @returns The equivalent time span in milliseconds.
|
|
114
|
+
*/
|
|
115
|
+
declare function getTimeSpanMilliseconds(timeSpan: TimeSpan): number;
|
|
116
|
+
/**
|
|
117
|
+
* Converts a TimeSpan to a string representation.
|
|
118
|
+
* @param timeSpan The TimeSpan to convert.
|
|
119
|
+
* @returns A string representation of the time span.
|
|
120
|
+
*/
|
|
121
|
+
declare function getTimeSpanString(timeSpan: TimeSpan): string;
|
|
122
|
+
/**
|
|
123
|
+
* Converts a TimeSpan to an object representation.
|
|
124
|
+
* @param timeSpan The TimeSpan to convert.
|
|
125
|
+
* @returns An object representation of the time span with properties for days, hours, minutes, seconds, and milliseconds.
|
|
126
|
+
*/
|
|
127
|
+
declare function getTimeSpan(timeSpan: TimeSpan): TimeSpan & object;
|
|
128
|
+
|
|
129
|
+
export { Logger, NgnError, areArraysDeepEqual, areObjectsDeepEqual, deepCopy, deepMerge, fuzzyMatch, getPropertyIfExists, getScrollTop, getTimeSpan, getTimeSpanMilliseconds, getTimeSpanString, globalPropertyName, isObject, isTimeSpan, maybeCallback, notNullish, objectEntries, objectKeys, throwExp, toggleClass };
|
|
130
|
+
export type { AllKeysOfUnion, DeepPartial, InputGeneric, LogLevel, NgnGlobalType, Prettify, TimeSpan };
|
package/api/index.d.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Signal, ElementRef, Type, Provider, Injector } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { FormFieldBase } from '@ngneers/controls/form-field';
|
|
5
|
-
|
|
6
|
-
declare function elementSizeSignal(element: HTMLElement): Signal<{
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}>;
|
|
10
|
-
|
|
11
|
-
declare class GetElementRef {
|
|
12
|
-
readonly elementRef: ElementRef<any>;
|
|
13
|
-
readonly nativeElement: any;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GetElementRef, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GetElementRef, "[ngnElementRef]", ["ngnElementRef"], {}, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type PredefinedFilterFunctions = 'contains' | 'startsWith' | 'endsWith' | 'equals' | 'fuzzy';
|
|
19
|
-
type FilterConfigInternal<T extends object> = FilterConfig<T> & {
|
|
20
|
-
filterFieldsCallback: (item: T) => string | string[];
|
|
21
|
-
fieldItems?: keyof T;
|
|
22
|
-
};
|
|
23
|
-
type FilterConfig<T extends object> = {
|
|
24
|
-
splitWords?: boolean;
|
|
25
|
-
caseSensitive?: boolean;
|
|
26
|
-
filterFn?: FilterFn<T>;
|
|
27
|
-
};
|
|
28
|
-
type FilterFn<T extends object> = PredefinedFilterFunctions | ((value: string, item: T) => Promise<boolean> | boolean);
|
|
29
|
-
declare function filterOptions<T extends object>(options: T[], filterText: string, filterOptions: FilterConfigInternal<T>): Promise<readonly T[]>;
|
|
30
|
-
|
|
31
|
-
declare function valueControlBaseProvider<T extends Type<ValueControlBase<any>>>(type: T): {
|
|
32
|
-
provide: typeof NG_VALUE_ACCESSOR;
|
|
33
|
-
useExisting: T;
|
|
34
|
-
multi: boolean;
|
|
35
|
-
};
|
|
36
|
-
declare abstract class ValueControlBase<T> implements FormFieldBase, ControlValueAccessor {
|
|
37
|
-
readonly label: i0.InputSignal<string | null>;
|
|
38
|
-
readonly inputId: i0.InputSignal<string>;
|
|
39
|
-
protected readonly value: i0.WritableSignal<T | null>;
|
|
40
|
-
writeValue(value: T | null): void;
|
|
41
|
-
private _onChange;
|
|
42
|
-
registerOnChange(fn: (value: T | null) => void): void;
|
|
43
|
-
private _onTouched;
|
|
44
|
-
registerOnTouched(fn: () => void): void;
|
|
45
|
-
protected onTouched(): void;
|
|
46
|
-
protected onChange(value: T): void;
|
|
47
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValueControlBase<any>, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ValueControlBase<any>, "ng-component", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
declare function provideNgnControls(): Provider[];
|
|
52
|
-
|
|
53
|
-
declare class NgnTemplate<T> {
|
|
54
|
-
readonly ngnTemplate: i0.InputSignal<T>;
|
|
55
|
-
static ngTemplateContextGuard<T>(dir: NgnTemplate<T>, ctx: unknown): ctx is T;
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgnTemplate<any>, never>;
|
|
57
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgnTemplate<any>, "ng-template[ngnTemplate]", never, { "ngnTemplate": { "alias": "ngnTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A noop with return type T.
|
|
61
|
-
* This function is used to define typed properties to use in a template.
|
|
62
|
-
*/
|
|
63
|
-
declare function templateTypesFn<T extends Record<string, Record<string, any>>>(): T;
|
|
64
|
-
/**
|
|
65
|
-
* A noop with return type `{ $implicit: Implicit } & Named`.
|
|
66
|
-
* This function is used to define a typed property to use in a template.
|
|
67
|
-
*/
|
|
68
|
-
declare function templateTypeFn<Implicit, Named extends Record<string, any> = object>(): {
|
|
69
|
-
$implicit: Implicit;
|
|
70
|
-
} & Named;
|
|
71
|
-
|
|
72
|
-
type NgnItem<T = any, K extends keyof T = any> = {
|
|
73
|
-
data?: T;
|
|
74
|
-
label: string;
|
|
75
|
-
value: T[K];
|
|
76
|
-
testId?: string;
|
|
77
|
-
items?: NgnItem<T, K>[];
|
|
78
|
-
};
|
|
79
|
-
type NgnItemFields<T, K extends keyof T> = {
|
|
80
|
-
label: keyof T;
|
|
81
|
-
value: K;
|
|
82
|
-
testId?: keyof T;
|
|
83
|
-
groupItems?: keyof T;
|
|
84
|
-
};
|
|
85
|
-
declare function transformToNgnItem<T extends object, K extends keyof T>(item: T, fields: NgnItemFields<T, K>): NgnItem<T, K>;
|
|
86
|
-
declare function transformToNgnItems<T extends object, K extends keyof T>(items: readonly T[], fields: {
|
|
87
|
-
label: keyof T;
|
|
88
|
-
value: K;
|
|
89
|
-
testId?: keyof T;
|
|
90
|
-
groupItems?: keyof T;
|
|
91
|
-
}): NgnItem<T, K>[];
|
|
92
|
-
declare function mapToItems(items: readonly NgnItem[]): NgnItem[];
|
|
93
|
-
declare function flatItems(items: readonly NgnItem[]): NgnItem[];
|
|
94
|
-
|
|
95
|
-
type PositioningSizeConstraints = {
|
|
96
|
-
/**
|
|
97
|
-
* The width of the floating element. When a number is provided, it is relative to the width of the reference element.
|
|
98
|
-
* When a string is provided, it is used as the CSS width value.
|
|
99
|
-
*/
|
|
100
|
-
width?: number | string;
|
|
101
|
-
/**
|
|
102
|
-
* The maximum width of the floating element. When a number is provided, it is relative to the width of the reference element.
|
|
103
|
-
* When a string is provided, it is used as the CSS max-width value.
|
|
104
|
-
*/
|
|
105
|
-
maxWidth?: number | string;
|
|
106
|
-
/**
|
|
107
|
-
* The height of the floating element. When a string is provided, it is used as the CSS height value.
|
|
108
|
-
*/
|
|
109
|
-
height?: string;
|
|
110
|
-
/**
|
|
111
|
-
* The maximum height of the floating element. When a string is provided, it is used as the CSS max-height value.
|
|
112
|
-
*/
|
|
113
|
-
maxHeight?: string;
|
|
114
|
-
};
|
|
115
|
-
type PositioningOptions = {
|
|
116
|
-
injector?: Injector;
|
|
117
|
-
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
118
|
-
flip?: boolean;
|
|
119
|
-
resize?: boolean;
|
|
120
|
-
shift?: boolean;
|
|
121
|
-
offset?: number;
|
|
122
|
-
stopped?: boolean;
|
|
123
|
-
sizeConstraints?: PositioningSizeConstraints;
|
|
124
|
-
};
|
|
125
|
-
type AutoPositioningHandle = {
|
|
126
|
-
stop: () => void;
|
|
127
|
-
start: () => void;
|
|
128
|
-
isRunning: () => boolean;
|
|
129
|
-
};
|
|
130
|
-
declare function positionElement(referenceEl: HTMLElement, floatingEl: HTMLElement, options?: PositioningOptions): void;
|
|
131
|
-
declare function autoPositionElement(referenceEl: HTMLElement, floatingEl: HTMLElement, options?: PositioningOptions): AutoPositioningHandle;
|
|
132
|
-
|
|
133
|
-
export { GetElementRef, NgnTemplate, ValueControlBase, autoPositionElement, elementSizeSignal, filterOptions, flatItems, mapToItems, positionElement, provideNgnControls, templateTypeFn, templateTypesFn, transformToNgnItem, transformToNgnItems, valueControlBaseProvider };
|
|
134
|
-
export type { AutoPositioningHandle, FilterConfig, FilterConfigInternal, FilterFn, NgnItem, NgnItemFields, PositioningOptions, PositioningSizeConstraints, PredefinedFilterFunctions };
|
package/custom-types/index.d.ts
DELETED
package/dialog/index.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
declare abstract class DialogTemplates {
|
|
5
|
-
private readonly _defaultHeaderTemplate;
|
|
6
|
-
private readonly _userHeaderTemplate;
|
|
7
|
-
readonly templateHeader: _angular_core.InputSignal<TemplateRef<unknown> | null>;
|
|
8
|
-
protected readonly headerTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
9
|
-
private readonly _defaultFooterTemplate;
|
|
10
|
-
private readonly _userFooterTemplate;
|
|
11
|
-
readonly templateFooter: _angular_core.InputSignal<TemplateRef<unknown> | null>;
|
|
12
|
-
protected readonly footerTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
13
|
-
/**
|
|
14
|
-
* Types for the dialog templates.
|
|
15
|
-
*/
|
|
16
|
-
readonly templateTypes: {
|
|
17
|
-
header: {
|
|
18
|
-
headerId: string;
|
|
19
|
-
title: string | null;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogTemplates, never>;
|
|
23
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DialogTemplates, "ng-component", never, { "templateHeader": { "alias": "templateHeader"; "required": false; "isSignal": true; }; "templateFooter": { "alias": "templateFooter"; "required": false; "isSignal": true; }; }, {}, ["_userHeaderTemplate", "_userFooterTemplate"], never, true, never>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare class Dialog extends DialogTemplates {
|
|
27
|
-
protected readonly headerId: string;
|
|
28
|
-
private readonly _dialogElement;
|
|
29
|
-
protected readonly lazyContent: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
30
|
-
readonly open: _angular_core.InputSignal<boolean>;
|
|
31
|
-
readonly cache: _angular_core.InputSignal<boolean>;
|
|
32
|
-
readonly modal: _angular_core.InputSignal<boolean>;
|
|
33
|
-
readonly autofocus: _angular_core.InputSignal<boolean>;
|
|
34
|
-
readonly title: _angular_core.InputSignal<string | null>;
|
|
35
|
-
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
36
|
-
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
37
|
-
constructor();
|
|
38
|
-
protected onCancel(): void;
|
|
39
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Dialog, never>;
|
|
40
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Dialog, "ngn-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "cache": { "alias": "cache"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, ["lazyContent"], ["*"], true, never>;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { Dialog };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngneers-controls-custom-types.mjs","sources":["../../../packages/controls/src/custom-types/ngneers-controls-custom-types.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;AAEG"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, input, forwardRef, Component } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
const FORM_FIELD = new InjectionToken('FormField');
|
|
5
|
-
class FormField {
|
|
6
|
-
_parentFormField = inject(FORM_FIELD, { optional: true, skipSelf: true });
|
|
7
|
-
hasParentFormField = !!this._parentFormField;
|
|
8
|
-
label = input(null);
|
|
9
|
-
inputId = input(null);
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: FormField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.5", type: FormField, isStandalone: true, selector: "ngn-form-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
12
|
-
{
|
|
13
|
-
provide: FORM_FIELD,
|
|
14
|
-
useExisting: forwardRef(() => FormField),
|
|
15
|
-
},
|
|
16
|
-
], ngImport: i0, template: "<div [class.ngn-form-field]=\"!hasParentFormField\">\r\n @if (label(); as label) {\r\n <label [for]=\"inputId()\">{{ label }}</label>\r\n }\r\n <ng-content />\r\n</div>\r\n", styles: [".ngn-form-field{border:2px solid black}\n"] });
|
|
17
|
-
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: FormField, decorators: [{
|
|
19
|
-
type: Component,
|
|
20
|
-
args: [{ selector: 'ngn-form-field', providers: [
|
|
21
|
-
{
|
|
22
|
-
provide: FORM_FIELD,
|
|
23
|
-
useExisting: forwardRef(() => FormField),
|
|
24
|
-
},
|
|
25
|
-
], template: "<div [class.ngn-form-field]=\"!hasParentFormField\">\r\n @if (label(); as label) {\r\n <label [for]=\"inputId()\">{{ label }}</label>\r\n }\r\n <ng-content />\r\n</div>\r\n", styles: [".ngn-form-field{border:2px solid black}\n"] }]
|
|
26
|
-
}] });
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Generated bundle index. Do not edit.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
export { FormField };
|
|
33
|
-
//# sourceMappingURL=ngneers-controls-form-field.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngneers-controls-form-field.mjs","sources":["../../../packages/controls/src/form-field/form-field.ts","../../../packages/controls/src/form-field/form-field.html","../../../packages/controls/src/form-field/ngneers-controls-form-field.ts"],"sourcesContent":["import { Component, forwardRef, inject, InjectionToken, input } from '@angular/core';\r\n\r\nimport { FormFieldBase } from './form-field-base';\r\n\r\nconst FORM_FIELD = new InjectionToken<FormField>('FormField');\r\n\r\n@Component({\r\n selector: 'ngn-form-field',\r\n templateUrl: './form-field.html',\r\n styles: `\r\n .ngn-form-field {\r\n border: 2px solid black;\r\n }\r\n `,\r\n providers: [\r\n {\r\n provide: FORM_FIELD,\r\n useExisting: forwardRef(() => FormField),\r\n },\r\n ],\r\n})\r\nexport class FormField implements FormFieldBase {\r\n private readonly _parentFormField = inject(FORM_FIELD, { optional: true, skipSelf: true });\r\n protected readonly hasParentFormField = !!this._parentFormField;\r\n\r\n public readonly label = input<string | null>(null);\r\n public readonly inputId = input<string | null>(null);\r\n}\r\n","<div [class.ngn-form-field]=\"!hasParentFormField\">\r\n @if (label(); as label) {\r\n <label [for]=\"inputId()\">{{ label }}</label>\r\n }\r\n <ng-content />\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAIA,MAAM,UAAU,GAAG,IAAI,cAAc,CAAY,WAAW,CAAC;MAiBhD,SAAS,CAAA;AACH,IAAA,gBAAgB,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACvE,IAAA,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB;AAE/C,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,CAAC;AAClC,IAAA,OAAO,GAAG,KAAK,CAAgB,IAAI,CAAC;uGALzC,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAPT;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;AACnB,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACzC,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBH,oLAMA,EAAA,MAAA,EAAA,CAAA,2CAAA,CAAA,EAAA,CAAA;;2FDea,SAAS,EAAA,UAAA,EAAA,CAAA;kBAfrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,SAAA,EAOf;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,UAAU;AACnB,4BAAA,WAAW,EAAE,UAAU,CAAC,eAAe,CAAC;AACzC,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,oLAAA,EAAA,MAAA,EAAA,CAAA,2CAAA,CAAA,EAAA;;;AEnBH;;AAEG;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, signal, effect, Component } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
class LazyCacher {
|
|
6
|
-
lazyContent = input(undefined);
|
|
7
|
-
open = input(false);
|
|
8
|
-
cache = input(false);
|
|
9
|
-
hasBeenOpened = signal(false);
|
|
10
|
-
constructor() {
|
|
11
|
-
effect(() => {
|
|
12
|
-
if (this.open()) {
|
|
13
|
-
this.hasBeenOpened.set(true);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: LazyCacher, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.5", type: LazyCacher, isStandalone: true, selector: "ngn-lazy-cacher", inputs: { lazyContent: { classPropertyName: "lazyContent", publicName: "lazyContent", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, cache: { classPropertyName: "cache", publicName: "cache", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (lazyContent()) {\r\n @if (open() || (cache() && hasBeenOpened())) {\r\n <ng-container *ngTemplateOutlet=\"lazyContent()\"></ng-container>\r\n }\r\n} @else {\r\n <ng-content></ng-content>\r\n}\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
19
|
-
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: LazyCacher, decorators: [{
|
|
21
|
-
type: Component,
|
|
22
|
-
args: [{ selector: 'ngn-lazy-cacher', imports: [NgTemplateOutlet], template: "@if (lazyContent()) {\r\n @if (open() || (cache() && hasBeenOpened())) {\r\n <ng-container *ngTemplateOutlet=\"lazyContent()\"></ng-container>\r\n }\r\n} @else {\r\n <ng-content></ng-content>\r\n}\r\n" }]
|
|
23
|
-
}], ctorParameters: () => [] });
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Generated bundle index. Do not edit.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
export { LazyCacher };
|
|
30
|
-
//# sourceMappingURL=ngneers-controls-lazy-cacher.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngneers-controls-lazy-cacher.mjs","sources":["../../../packages/controls/src/lazy-cacher/lazy-cacher.ts","../../../packages/controls/src/lazy-cacher/lazy-cacher.html","../../../packages/controls/src/lazy-cacher/ngneers-controls-lazy-cacher.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport { Component, effect, input, signal, TemplateRef } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ngn-lazy-cacher',\r\n templateUrl: './lazy-cacher.html',\r\n imports: [NgTemplateOutlet],\r\n})\r\nexport class LazyCacher {\r\n public readonly lazyContent = input<TemplateRef<unknown> | undefined | null>(undefined);\r\n public readonly open = input<boolean>(false);\r\n public readonly cache = input<boolean>(false);\r\n\r\n protected readonly hasBeenOpened = signal(false);\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.open()) {\r\n this.hasBeenOpened.set(true);\r\n }\r\n });\r\n }\r\n}\r\n","@if (lazyContent()) {\r\n @if (open() || (cache() && hasBeenOpened())) {\r\n <ng-container *ngTemplateOutlet=\"lazyContent()\"></ng-container>\r\n }\r\n} @else {\r\n <ng-content></ng-content>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,UAAU,CAAA;AACL,IAAA,WAAW,GAAG,KAAK,CAA0C,SAAS,CAAC;AACvE,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,CAAC;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAU,KAAK,CAAC;AAE1B,IAAA,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AAEhD,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;AACf,gBAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;;AAEhC,SAAC,CAAC;;uGAZO,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECRvB,gNAOA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDDY,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAEf,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAElB,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,gNAAA,EAAA;;;AEN7B;;AAEG;;;;"}
|