@nexterajs/ui 0.0.1

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.
Files changed (50) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +16 -0
  3. package/README.md +64 -0
  4. package/fesm2022/nexterajs-ui-animations.mjs +184 -0
  5. package/fesm2022/nexterajs-ui-animations.mjs.map +1 -0
  6. package/fesm2022/nexterajs-ui-core.mjs +326 -0
  7. package/fesm2022/nexterajs-ui-core.mjs.map +1 -0
  8. package/fesm2022/nexterajs-ui-dropdowns.mjs +953 -0
  9. package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -0
  10. package/fesm2022/nexterajs-ui-excel.mjs +779 -0
  11. package/fesm2022/nexterajs-ui-excel.mjs.map +1 -0
  12. package/fesm2022/nexterajs-ui-file-uploader.mjs +125 -0
  13. package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -0
  14. package/fesm2022/nexterajs-ui-forms.mjs +1113 -0
  15. package/fesm2022/nexterajs-ui-forms.mjs.map +1 -0
  16. package/fesm2022/nexterajs-ui-grid.mjs +4145 -0
  17. package/fesm2022/nexterajs-ui-grid.mjs.map +1 -0
  18. package/fesm2022/nexterajs-ui-intl.mjs +377 -0
  19. package/fesm2022/nexterajs-ui-intl.mjs.map +1 -0
  20. package/fesm2022/nexterajs-ui-pivot.mjs +4739 -0
  21. package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -0
  22. package/fesm2022/nexterajs-ui-styling.mjs +59 -0
  23. package/fesm2022/nexterajs-ui-styling.mjs.map +1 -0
  24. package/fesm2022/nexterajs-ui-tree-view.mjs +202 -0
  25. package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -0
  26. package/fesm2022/nexterajs-ui-validation.mjs +269 -0
  27. package/fesm2022/nexterajs-ui-validation.mjs.map +1 -0
  28. package/fesm2022/nexterajs-ui.mjs +23 -0
  29. package/fesm2022/nexterajs-ui.mjs.map +1 -0
  30. package/package.json +100 -0
  31. package/styles/_button-directives.scss +39 -0
  32. package/styles/_dropdown.scss +113 -0
  33. package/styles/_editor.scss +146 -0
  34. package/styles/_mixins.scss +2 -0
  35. package/styles/_tokens.scss +77 -0
  36. package/styles/_widget.scss +58 -0
  37. package/styles/index.scss +83 -0
  38. package/types/nexterajs-ui-animations.d.ts +22 -0
  39. package/types/nexterajs-ui-core.d.ts +328 -0
  40. package/types/nexterajs-ui-dropdowns.d.ts +334 -0
  41. package/types/nexterajs-ui-excel.d.ts +159 -0
  42. package/types/nexterajs-ui-file-uploader.d.ts +47 -0
  43. package/types/nexterajs-ui-forms.d.ts +296 -0
  44. package/types/nexterajs-ui-grid.d.ts +1485 -0
  45. package/types/nexterajs-ui-intl.d.ts +125 -0
  46. package/types/nexterajs-ui-pivot.d.ts +1470 -0
  47. package/types/nexterajs-ui-styling.d.ts +40 -0
  48. package/types/nexterajs-ui-tree-view.d.ts +69 -0
  49. package/types/nexterajs-ui-validation.d.ts +102 -0
  50. package/types/nexterajs-ui.d.ts +12 -0
@@ -0,0 +1,334 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, TemplateRef, InjectionToken, OnInit } from '@angular/core';
3
+ import { NxeFormControlBase } from '@nexterajs/ui/core';
4
+ import { Subject } from 'rxjs';
5
+
6
+ /** DevExtreme-shaped selection-changed payload (handlers read `selectedItem`). */
7
+ interface NxeSelectionChangedEvent {
8
+ selectedItem: unknown;
9
+ previousValue: unknown;
10
+ value: unknown;
11
+ }
12
+ /**
13
+ * `nxe-select-box` — drop-in replacement for DevExtreme `dx-select-box`.
14
+ *
15
+ * A signal-CVA single-select dropdown over a plain array (`[dataSource]`). It bakes in the app's
16
+ * global `dxSelectBox.defaultOptions` (`displayExpr='lovName'`, `valueExpr='lovCode'`,
17
+ * `searchEnabled`, `showClearButton`), so the bound control value is the `valueExpr` field
18
+ * (a string code) and the field shows the `displayExpr` field. Dropdown is a CDK overlay with
19
+ * an in-field search filter. Emits `(valueChange)` (the code) and `(onSelectionChanged)`
20
+ * (`{selectedItem}`). Hosts a projected `nxe-validator` via {@link NXE_VALIDATION_TARGET}.
21
+ */
22
+ declare class NxeSelectBoxComponent extends NxeFormControlBase<unknown> implements OnDestroy {
23
+ private readonly overlay;
24
+ private readonly viewContainerRef;
25
+ private readonly dropdownTemplate;
26
+ private readonly inputEl;
27
+ private readonly templates;
28
+ /** The source array (plain JS array of `Lov`-shaped objects, or primitives). */
29
+ readonly dataSource: _angular_core.InputSignal<readonly unknown[]>;
30
+ /** Field shown in the box/list (DevExtreme default `lovName`). Empty => the item itself. */
31
+ readonly displayExprInput: _angular_core.InputSignal<string>;
32
+ readonly displayExpr: _angular_core.Signal<string>;
33
+ /** Field bound as the control value (DevExtreme default `lovCode`). Empty => the whole item. */
34
+ readonly valueExprInput: _angular_core.InputSignal<string>;
35
+ readonly valueExpr: _angular_core.Signal<string>;
36
+ /** Field matched while searching (DevExtreme default `lovName`). */
37
+ readonly searchExprInput: _angular_core.InputSignal<string>;
38
+ readonly searchExpr: _angular_core.Signal<string>;
39
+ readonly searchEnabledInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
40
+ readonly searchEnabled: _angular_core.Signal<boolean>;
41
+ readonly showClearButtonInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
+ readonly showClearButton: _angular_core.Signal<boolean>;
43
+ /** dx parity: dx-select-box shows its drop-down arrow unless showDropDownButton=false. */
44
+ readonly showDropDownButtonInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
45
+ readonly showDropDownButton: _angular_core.Signal<boolean>;
46
+ readonly placeholderInput: _angular_core.InputSignal<string>;
47
+ readonly placeholder: _angular_core.Signal<string>;
48
+ /** Named template ('displayItem') for dropdown rows; `$implicit` = the item. */
49
+ readonly itemTemplate: _angular_core.InputSignal<string>;
50
+ /** Named template ('inputField') for the closed field; `$implicit` = the selected item. */
51
+ readonly fieldTemplate: _angular_core.InputSignal<string>;
52
+ /** DevExtreme parity, cosmetic. */
53
+ readonly hoverStateEnabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
+ readonly onSelectionChanged: _angular_core.OutputEmitterRef<NxeSelectionChangedEvent>;
55
+ readonly focused: _angular_core.WritableSignal<boolean>;
56
+ readonly open: _angular_core.WritableSignal<boolean>;
57
+ /** What the user has typed to filter (null = not actively searching → show display text). */
58
+ readonly searchText: _angular_core.WritableSignal<string>;
59
+ readonly activeIndex: _angular_core.WritableSignal<number>;
60
+ readonly panelWidth: _angular_core.WritableSignal<number>;
61
+ /** DevExtreme `.instance` facade — only `focus()` is used (via the customAutofocus directive). */
62
+ get instance(): this;
63
+ private overlayRef?;
64
+ private closeSub?;
65
+ private flipSub?;
66
+ private readonly items;
67
+ protected display(item: unknown): string;
68
+ private extractValue;
69
+ readonly selectedItem: _angular_core.Signal<unknown>;
70
+ readonly hasValue: _angular_core.Signal<boolean>;
71
+ /** Display text when the field is not being searched. */
72
+ protected readonly displayText: _angular_core.Signal<string>;
73
+ /** Value bound to the input element. */
74
+ protected readonly inputDisplay: _angular_core.Signal<string>;
75
+ protected readonly filteredItems: _angular_core.Signal<readonly unknown[]>;
76
+ protected readonly itemTemplateRef: _angular_core.Signal<TemplateRef<unknown>>;
77
+ protected readonly fieldTemplateRef: _angular_core.Signal<TemplateRef<unknown>>;
78
+ protected isSelected(item: unknown): boolean;
79
+ /** Imperative focus (DevExtreme `.instance.focus()` via customAutofocus). */
80
+ focus(): void;
81
+ protected onFieldMousedown(event: MouseEvent): void;
82
+ protected onSearchInput(event: Event): void;
83
+ protected onBlur(): void;
84
+ protected selectItem(item: unknown, event: Event): void;
85
+ protected onClear(event: Event): void;
86
+ protected onKeydown(event: KeyboardEvent): void;
87
+ private openPanel;
88
+ private close;
89
+ ngOnDestroy(): void;
90
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeSelectBoxComponent, never>;
91
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeSelectBoxComponent, "nxe-select-box", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "displayExprInput": { "alias": "displayExpr"; "required": false; "isSignal": true; }; "valueExprInput": { "alias": "valueExpr"; "required": false; "isSignal": true; }; "searchExprInput": { "alias": "searchExpr"; "required": false; "isSignal": true; }; "searchEnabledInput": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "showClearButtonInput": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showDropDownButtonInput": { "alias": "showDropDownButton"; "required": false; "isSignal": true; }; "placeholderInput": { "alias": "placeholder"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "fieldTemplate": { "alias": "fieldTemplate"; "required": false; "isSignal": true; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; "isSignal": true; }; }, { "onSelectionChanged": "onSelectionChanged"; }, ["templates"], ["*"], true, never>;
92
+ }
93
+
94
+ /**
95
+ * `nxe-tag-box` — drop-in replacement for DevExtreme `dx-tag-box` (multi-select sibling of
96
+ * `nxe-select-box`). The bound value is an **array of `valueExpr` keys** (`lovCode` strings).
97
+ * Bakes in the app's global `dxTagBox.defaultOptions` (display/search `lovName`, value `lovCode`,
98
+ * search + clear + selection-controls on). Selected items render as removable chips; the dropdown
99
+ * shows a checkbox per row. Provides {@link NXE_VALIDATION_TARGET} for a projected `nxe-validator`.
100
+ */
101
+ declare class NxeTagBoxComponent extends NxeFormControlBase<unknown[]> implements OnDestroy {
102
+ private readonly overlay;
103
+ private readonly viewContainerRef;
104
+ private readonly dropdownTemplate;
105
+ private readonly inputEl;
106
+ readonly dataSource: _angular_core.InputSignal<readonly unknown[]>;
107
+ readonly displayExprInput: _angular_core.InputSignal<string>;
108
+ readonly displayExpr: _angular_core.Signal<string>;
109
+ readonly valueExprInput: _angular_core.InputSignal<string>;
110
+ readonly valueExpr: _angular_core.Signal<string>;
111
+ readonly searchExprInput: _angular_core.InputSignal<string>;
112
+ readonly searchExpr: _angular_core.Signal<string>;
113
+ readonly searchEnabledInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
114
+ readonly searchEnabled: _angular_core.Signal<boolean>;
115
+ readonly showClearButtonInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
116
+ readonly showClearButton: _angular_core.Signal<boolean>;
117
+ /** dx parity: dx-tag-box does NOT show a drop-down arrow unless showDropDownButton is set. */
118
+ readonly showDropDownButtonInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
119
+ readonly showDropDownButton: _angular_core.Signal<boolean>;
120
+ readonly placeholderInput: _angular_core.InputSignal<string>;
121
+ readonly placeholder: _angular_core.Signal<string>;
122
+ readonly focused: _angular_core.WritableSignal<boolean>;
123
+ readonly open: _angular_core.WritableSignal<boolean>;
124
+ readonly searchText: _angular_core.WritableSignal<string>;
125
+ readonly panelWidth: _angular_core.WritableSignal<number>;
126
+ private overlayRef?;
127
+ private closeSub?;
128
+ private flipSub?;
129
+ private readonly items;
130
+ /** The selected keys (always an array). */
131
+ private readonly selectedKeys;
132
+ protected display(item: unknown): string;
133
+ private extractValue;
134
+ /** Selected items resolved from the value keys (for chip rendering). */
135
+ protected readonly selectedItems: _angular_core.Signal<unknown[]>;
136
+ protected readonly hasValue: _angular_core.Signal<boolean>;
137
+ protected readonly filteredItems: _angular_core.Signal<readonly unknown[]>;
138
+ protected isSelected(item: unknown): boolean;
139
+ protected onFieldMousedown(event: MouseEvent): void;
140
+ protected onSearchInput(event: Event): void;
141
+ protected onBlur(): void;
142
+ protected toggle(item: unknown, event: Event): void;
143
+ protected removeTag(item: unknown, event: Event): void;
144
+ protected onClear(event: Event): void;
145
+ protected onKeydown(event: KeyboardEvent): void;
146
+ private openPanel;
147
+ private close;
148
+ ngOnDestroy(): void;
149
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeTagBoxComponent, never>;
150
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeTagBoxComponent, "nxe-tag-box", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "displayExprInput": { "alias": "displayExpr"; "required": false; "isSignal": true; }; "valueExprInput": { "alias": "valueExpr"; "required": false; "isSignal": true; }; "searchExprInput": { "alias": "searchExpr"; "required": false; "isSignal": true; }; "searchEnabledInput": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "showClearButtonInput": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showDropDownButtonInput": { "alias": "showDropDownButton"; "required": false; "isSignal": true; }; "placeholderInput": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
151
+ }
152
+
153
+ /**
154
+ * `nxe-drop-down-options` — drop-in for DevExtreme `dxo-drop-down-options`, a no-template config
155
+ * child of `nxe-drop-down-box`. Only `wrapperAttr` (a `{class}` applied to the overlay panel) and
156
+ * `width` are used in this codebase.
157
+ */
158
+ declare class NxeDropDownOptionsComponent {
159
+ readonly wrapperAttr: _angular_core.InputSignal<{
160
+ class?: string;
161
+ id?: string;
162
+ }>;
163
+ readonly width: _angular_core.InputSignal<string | number>;
164
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeDropDownOptionsComponent, never>;
165
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeDropDownOptionsComponent, "nxe-drop-down-options", never, { "wrapperAttr": { "alias": "wrapperAttr"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
166
+ }
167
+
168
+ /**
169
+ * `nxe-drop-down-box` — drop-in replacement for DevExtreme `dx-drop-down-box`.
170
+ *
171
+ * A signal-CVA editor whose dropdown hosts ARBITRARY projected content (a `nxeTemplate="content"`
172
+ * block — usually a data-grid picker) in a CDK overlay. The closed field shows the value's
173
+ * `displayExpr` (looked up in `[dataSource]`), or the raw value when no `displayExpr`. The inner
174
+ * grid sets the bound form value and closes the popup via `#ref.instance.close()` (16 call sites),
175
+ * so this exposes an `.instance` facade + `close()`, and an `(onClosed)` output. Projects
176
+ * `nxe-validator` via {@link NXE_VALIDATION_TARGET}.
177
+ */
178
+ declare class NxeDropDownBoxComponent extends NxeFormControlBase<unknown> implements OnDestroy {
179
+ private readonly overlay;
180
+ private readonly viewContainerRef;
181
+ private readonly panelTemplate;
182
+ private readonly templates;
183
+ private readonly options;
184
+ readonly dataSource: _angular_core.InputSignal<readonly unknown[]>;
185
+ /** Field name shown in the closed box; empty => the raw value string. */
186
+ readonly displayExprInput: _angular_core.InputSignal<string>;
187
+ readonly displayExpr: _angular_core.Signal<string>;
188
+ readonly valueExprInput: _angular_core.InputSignal<string>;
189
+ readonly valueExpr: _angular_core.Signal<string>;
190
+ readonly placeholderInput: _angular_core.InputSignal<string>;
191
+ readonly placeholder: _angular_core.Signal<string>;
192
+ /** DevExtreme `[dropDownOptions]` — accepted for parity (popup-class hook). */
193
+ readonly dropDownOptions: _angular_core.InputSignal<unknown>;
194
+ /**
195
+ * DevExtreme `showClearButton` — a × left of the arrow that sets the value to null, matching
196
+ * {@link NxeSelectBoxComponent}/`nxe-tag-box`.
197
+ *
198
+ * Defaults to **false**, unlike those two: this component's dropdown hosts arbitrary content, and
199
+ * every existing call site picks from a grid where clearing was never offered. Opt in where null
200
+ * is a value the field can legitimately hold.
201
+ */
202
+ readonly showClearButtonInput: _angular_core.InputSignalWithTransform<boolean, unknown>;
203
+ readonly showClearButton: _angular_core.Signal<boolean>;
204
+ /**
205
+ * DevExtreme `[opened]` (orbit addition): programmatic open/close. Reflects the panel state
206
+ * outward and opens/closes the panel when the binding changes.
207
+ */
208
+ readonly opened: _angular_core.ModelSignal<boolean>;
209
+ readonly onClosed: _angular_core.OutputEmitterRef<void>;
210
+ readonly focused: _angular_core.WritableSignal<boolean>;
211
+ readonly open: _angular_core.WritableSignal<boolean>;
212
+ readonly panelWidth: _angular_core.WritableSignal<number>;
213
+ /** DevExtreme `.instance` facade — only `close()` is used (from inner-grid selection handlers). */
214
+ get instance(): this;
215
+ constructor();
216
+ private overlayRef?;
217
+ private closeSub?;
218
+ private flipSub?;
219
+ protected readonly contentTemplateRef: _angular_core.Signal<TemplateRef<unknown>>;
220
+ /**
221
+ * DevExtreme sizes the popup to the editor, and every call site that says anything says
222
+ * `width="100%"` — which means that same thing. So the panel is fixed at the field's width and
223
+ * the content fits inside it (a grid picker lays its columns out to the panel) rather than the
224
+ * panel growing to whatever the content wants. Only an explicit px/em/rem width overrides.
225
+ */
226
+ protected readonly panelStyleWidth: _angular_core.Signal<string>;
227
+ readonly displayText: _angular_core.Signal<string>;
228
+ protected readonly hasValue: _angular_core.Signal<boolean>;
229
+ protected onFieldMousedown(event: MouseEvent): void;
230
+ /** Stops the mousedown reaching the field, which would otherwise toggle the panel open. */
231
+ protected onClear(event: Event): void;
232
+ protected onBlur(): void;
233
+ /** Imperative close (DevExtreme `.instance.close()`). */
234
+ close(): void;
235
+ private openPanel;
236
+ ngOnDestroy(): void;
237
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeDropDownBoxComponent, never>;
238
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeDropDownBoxComponent, "nxe-drop-down-box", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "displayExprInput": { "alias": "displayExpr"; "required": false; "isSignal": true; }; "valueExprInput": { "alias": "valueExpr"; "required": false; "isSignal": true; }; "placeholderInput": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dropDownOptions": { "alias": "dropDownOptions"; "required": false; "isSignal": true; }; "showClearButtonInput": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "onClosed": "onClosed"; }, ["templates", "options"], ["*"], true, never>;
239
+ }
240
+
241
+ /** DevExtreme-shaped `onItemClick` payload (handlers read `itemData`). */
242
+ interface NxeListItemClickEvent {
243
+ itemData: unknown;
244
+ }
245
+ /**
246
+ * `nxe-list` — drop-in replacement for DevExtreme `dx-list` as used in this codebase: an action
247
+ * menu rendered inside `nxe-menu` (100% of usages). Renders each `[dataSource]` item with the
248
+ * named `itemTemplate` (`*nxeTemplate`), emits `(onItemClick)` (`{itemData}`), and closes the
249
+ * parent `nxe-menu` on click. Emits `.nxe-list`/`.nxe-list-item-row`/`.nxe-list-item-content` classes so
250
+ * the app's existing menu/list CSS applies unchanged.
251
+ */
252
+ declare class NxeListComponent {
253
+ private readonly menu;
254
+ private readonly templates;
255
+ readonly dataSource: _angular_core.InputSignal<readonly unknown[]>;
256
+ /** Named template ('listItem'/'actionButton') for each row; `$implicit` = the item. */
257
+ readonly itemTemplate: _angular_core.InputSignal<string>;
258
+ /** DevExtreme `[elementAttr]` — `{ id, class }` applied to the host. */
259
+ readonly elementAttr: _angular_core.InputSignal<{
260
+ id?: string;
261
+ class?: string;
262
+ }>;
263
+ readonly onItemClick: _angular_core.OutputEmitterRef<NxeListItemClickEvent>;
264
+ protected readonly items: _angular_core.Signal<readonly unknown[]>;
265
+ protected readonly itemTemplateRef: _angular_core.Signal<_angular_core.TemplateRef<unknown>>;
266
+ protected text(item: unknown): string;
267
+ /** dx parity: dx-list honors `item.disabled` (grayed, non-interactive). */
268
+ protected isDisabled(item: unknown): boolean;
269
+ protected select(item: unknown): void;
270
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeListComponent, never>;
271
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeListComponent, "nxe-list", never, { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; "elementAttr": { "alias": "elementAttr"; "required": false; "isSignal": true; }; }, { "onItemClick": "onItemClick"; }, ["templates"], never, true, never>;
272
+ }
273
+
274
+ /** What an `nxe-option` needs from its parent autocomplete: a way to request close on select. */
275
+ interface NxeAutocompletePanel {
276
+ closeFromOption(): void;
277
+ }
278
+ /** DI token the autocomplete provides so projected `nxe-option`s can close it on click. */
279
+ declare const NXE_AUTOCOMPLETE: InjectionToken<NxeAutocompletePanel>;
280
+ /**
281
+ * `nxe-autocomplete` — drop-in replacement for Material's `mat-autocomplete` (as used by the global
282
+ * search). Holds the dropdown panel as a `TemplateRef` that the `[nxeAutocomplete]` trigger renders
283
+ * in a CDK overlay; projects `nxe-option`s. Emits the Material panel/option classes so Material's
284
+ * loaded autocomplete CSS + the consumer's classes apply. Exposes `isOpen` (read by the search).
285
+ */
286
+ declare class NxeAutocompleteComponent implements NxeAutocompletePanel, OnInit {
287
+ private readonly elementRef;
288
+ readonly templateRef: _angular_core.Signal<TemplateRef<any>>;
289
+ /** Open state (the `[nxeAutocomplete]` trigger drives this; the search reads `isOpen`). */
290
+ readonly opened: _angular_core.WritableSignal<boolean>;
291
+ /** Fires when a projected `nxe-option` is selected, so the trigger closes the panel. */
292
+ readonly optionSelected: Subject<void>;
293
+ /** Panel classes: Material's + the consumer's class on `<nxe-autocomplete>`. */
294
+ readonly panelClass: _angular_core.WritableSignal<string>;
295
+ get isOpen(): boolean;
296
+ ngOnInit(): void;
297
+ closeFromOption(): void;
298
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeAutocompleteComponent, never>;
299
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeAutocompleteComponent, "nxe-autocomplete", ["nxeAutocomplete"], {}, {}, never, ["*"], true, never>;
300
+ }
301
+
302
+ /**
303
+ * `[nxeAutocomplete]` — drop-in for Material's `matAutocomplete` trigger. Applied to a text input;
304
+ * opens the referenced {@link NxeAutocompleteComponent}'s panel in a CDK overlay (width-matched to
305
+ * the input) on focus/input, closes on blur/Escape/option-select.
306
+ */
307
+ declare class NxeAutocompleteTriggerDirective implements OnDestroy {
308
+ readonly autocomplete: _angular_core.InputSignal<NxeAutocompleteComponent>;
309
+ private readonly overlay;
310
+ private readonly elementRef;
311
+ private readonly viewContainerRef;
312
+ private overlayRef?;
313
+ private sub?;
314
+ protected openPanel(): void;
315
+ protected closePanel(): void;
316
+ ngOnDestroy(): void;
317
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeAutocompleteTriggerDirective, never>;
318
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NxeAutocompleteTriggerDirective, "input[nxeAutocomplete], textarea[nxeAutocomplete]", ["nxeAutocompleteTrigger"], { "autocomplete": { "alias": "nxeAutocomplete"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
319
+ }
320
+
321
+ /**
322
+ * `nxe-option` — drop-in for Material's `mat-option` inside an `nxe-autocomplete`. Emits the MDC
323
+ * option classes (so Material's option CSS applies) and closes the parent autocomplete on click;
324
+ * the consumer's own `(click)` (e.g. navigate) still fires.
325
+ */
326
+ declare class NxeOptionComponent {
327
+ private readonly autocomplete;
328
+ protected select(): void;
329
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeOptionComponent, never>;
330
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeOptionComponent, "nxe-option", ["nxeOption"], {}, {}, never, ["*"], true, never>;
331
+ }
332
+
333
+ export { NXE_AUTOCOMPLETE, NxeAutocompleteComponent, NxeAutocompleteTriggerDirective, NxeDropDownBoxComponent, NxeDropDownOptionsComponent, NxeListComponent, NxeOptionComponent, NxeSelectBoxComponent, NxeTagBoxComponent };
334
+ export type { NxeAutocompletePanel, NxeListItemClickEvent, NxeSelectionChangedEvent };
@@ -0,0 +1,159 @@
1
+ /**
2
+ * Public value types for the in-repo .xlsx writer. These mirror the narrow slice of the exceljs
3
+ * `Cell` shape the app actually uses (verified across every call site), so existing code migrates by
4
+ * import path only — see {@link NxeWorkbook} (aliased as `Workbook`).
5
+ */
6
+ /** A cell's value. `null`/`undefined`/`''` render as blank. */
7
+ type NxeCellValue = string | number | Date | null | undefined;
8
+ /** Font facet. Default font (when unset) is undefined, NOT `{}` — `formatExcel` reads `font?.name`. */
9
+ interface NxeFont {
10
+ name?: string;
11
+ bold?: boolean;
12
+ size?: number;
13
+ }
14
+ /** Solid pattern fill, matching the exceljs `{ type, pattern, fgColor: { argb } }` shape. */
15
+ interface NxeFill {
16
+ type: 'pattern';
17
+ pattern: 'solid';
18
+ fgColor: {
19
+ argb: string;
20
+ };
21
+ }
22
+ /** Cell alignment. `vertical: 'middle'` maps to Excel's `center`. */
23
+ interface NxeAlignment {
24
+ horizontal?: 'left' | 'center' | 'right';
25
+ vertical?: 'top' | 'middle' | 'bottom';
26
+ /** Text indent level. Like exceljs, emitted as-is; Excel only renders it with left/right/distributed horizontal. */
27
+ indent?: number;
28
+ }
29
+ /** Auto-filter range, object form (`{ from: {row, column}, to: {row, column} }`), 1-based. */
30
+ interface NxeAutoFilter {
31
+ from: {
32
+ row: number;
33
+ column: number;
34
+ };
35
+ to: {
36
+ row: number;
37
+ column: number;
38
+ };
39
+ }
40
+
41
+ /**
42
+ * Zero-dependency, in-repo `.xlsx` writer — a drop-in for the narrow exceljs surface this app uses
43
+ * (verified across every call site). Replaces the `exceljs` package: callers migrate by import path
44
+ * only, via the `Workbook` alias below.
45
+ *
46
+ * The object model ({@link NxeWorkbook} / {@link NxeWorksheet} / {@link NxeRow} / {@link NxeCell})
47
+ * mirrors exceljs (`addWorksheet`, `addRow`, `getCell` 1-based + auto-extend, `mergeCells`,
48
+ * `autoFilter`, `eachSheet`/`eachRow`/`eachCell`, `rowCount`, cell `value`/`numFmt`/`font`/`fill`/
49
+ * `alignment`, `xlsx.writeBuffer()`). {@link NxeWorkbook.serialize} emits a flat 6-part OOXML
50
+ * (SpreadsheetML) package using inline strings — no `sharedStrings.xml` — and packs it as a STORE
51
+ * (uncompressed) ZIP via {@link writeZip}.
52
+ *
53
+ * Scope is deliberately exactly what the app needs: string/number/Date/'' cells, custom number
54
+ * formats, fonts (name + bold, per cell or per row), solid fills, alignment (incl. indent), merged
55
+ * cells, auto-filter, column widths. No borders, formulas, images, rich text.
56
+ */
57
+
58
+ /** 1 → A, 27 → AA. */
59
+ declare function colLetter(n: number): string;
60
+ declare class StyleRegistry {
61
+ private numFmts;
62
+ private numFmtIndex;
63
+ private fonts;
64
+ private fontIndex;
65
+ private fills;
66
+ private fillIndex;
67
+ private xfs;
68
+ private xfIndex;
69
+ private numFmtId;
70
+ private fontId;
71
+ private fillId;
72
+ /** Resolve the 0-based cellXfs index for a cell's facets; 0 means "all default" (omit `s`). */
73
+ cellStyle(cell: NxeCell): number;
74
+ toXml(): string;
75
+ }
76
+ declare class NxeCell {
77
+ value: NxeCellValue;
78
+ numFmt?: string;
79
+ /** Default MUST be undefined (never a shared `{}`) — `formatExcel` reads `cell.font?.name`. */
80
+ font?: NxeFont;
81
+ fill?: NxeFill;
82
+ alignment?: NxeAlignment;
83
+ }
84
+ declare class NxeRow {
85
+ /** 1-based column → cell (only accessed columns exist). */
86
+ private cells;
87
+ private _font?;
88
+ /**
89
+ * exceljs parity: setting `row.font` overwrites every existing cell's font and seeds cells
90
+ * created later in this row. Each cell gets its own copy — `formatExcel`-style passes mutate
91
+ * `cell.font` in place, so cells must not alias one object.
92
+ */
93
+ get font(): NxeFont | undefined;
94
+ set font(f: NxeFont | undefined);
95
+ getCell(col: number): NxeCell;
96
+ eachCell(cb: (cell: NxeCell, colNumber: number) => void): void;
97
+ }
98
+ /** Column facet (exceljs `Column` slice) — only `width` (Excel character units) is supported. */
99
+ declare class NxeColumn {
100
+ readonly number: number;
101
+ width?: number;
102
+ constructor(number: number);
103
+ }
104
+ declare class NxeWorksheet {
105
+ name: string;
106
+ autoFilter?: NxeAutoFilter;
107
+ private rows;
108
+ private maxRow;
109
+ private merges;
110
+ /** 1-based column → column facet (only accessed columns exist). */
111
+ private colMap;
112
+ constructor(name: string);
113
+ /** Highest populated row (0 when empty) — `getCell` auto-extends past the `addRow` cursor. */
114
+ get rowCount(): number;
115
+ private rowAt;
116
+ addRow(values: NxeCellValue[]): NxeRow;
117
+ /** 1-based (row, col); auto-extends the sheet (the pivot exporter writes past the cursor). */
118
+ getCell(row: number, col: number): NxeCell;
119
+ /** Lazily-created column facet, 1-based (exceljs `getColumn`); may point past the used range. */
120
+ getColumn(n: number): NxeColumn;
121
+ /** exceljs parity: one entry per column touched so far (via `addRow`/`getCell`/`getColumn`). */
122
+ get columns(): NxeColumn[];
123
+ mergeCells(r1: number, c1: number, r2: number, c2: number): void;
124
+ eachRow(cb: (row: NxeRow, rowNumber: number) => void): void;
125
+ /** @internal Serialize this sheet to its worksheet XML, registering styles as it goes. */
126
+ toXml(styles: StyleRegistry): string;
127
+ }
128
+ declare class NxeWorkbook {
129
+ worksheets: NxeWorksheet[];
130
+ /** Mirrors `workbook.xlsx.writeBuffer()` — resolves to the packed `.xlsx` bytes. */
131
+ readonly xlsx: {
132
+ writeBuffer: () => Promise<Uint8Array<ArrayBuffer>>;
133
+ };
134
+ addWorksheet(name?: string): NxeWorksheet;
135
+ eachSheet(cb: (sheet: NxeWorksheet, id: number) => void): void;
136
+ /** Build the full OOXML package and pack it as a STORE ZIP. */
137
+ serialize(): Uint8Array<ArrayBuffer>;
138
+ }
139
+
140
+ type Worksheet = NxeWorksheet;
141
+
142
+ /** True when the bytes begin with the ZIP local-file-header magic (`PK\x03\x04`) — i.e. an `.xlsx`. */
143
+ declare function isXlsxBytes(buf: Uint8Array): boolean;
144
+ /**
145
+ * Read the FIRST worksheet of an `.xlsx` into a dense, positional array-of-arrays (matching SheetJS
146
+ * `sheet_to_json(ws, { header: 1 })`). Numeric cells are returned as numbers; string cells as
147
+ * strings; missing leading/intermediate cells as `''`.
148
+ */
149
+ declare function readXlsxFirstSheet(input: ArrayBuffer | Uint8Array): Promise<(string | number)[][]>;
150
+
151
+ /**
152
+ * Tiny in-repo replacement for `file-saver-es`'s `saveAs`. Triggers a browser download of a Blob by
153
+ * clicking a synthetic anchor with an object URL, then revoking it. Callers keep building their own
154
+ * Blob (so the MIME type is preserved).
155
+ */
156
+ declare function nxeSaveAs(blob: Blob, fileName: string): void;
157
+
158
+ export { NxeCell, NxeColumn, NxeRow, NxeWorkbook, NxeWorksheet, NxeWorkbook as Workbook, colLetter, isXlsxBytes, nxeSaveAs, readXlsxFirstSheet };
159
+ export type { NxeAlignment, NxeAutoFilter, NxeCellValue, NxeFill, NxeFont, Worksheet };
@@ -0,0 +1,47 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { NxeValidationTarget } from '@nexterajs/ui/core';
3
+
4
+ /**
5
+ * `nxe-file-uploader` — drop-in replacement for DevExtreme `dx-file-uploader`.
6
+ *
7
+ * Both usages run `uploadMode="useForm"` (the widget never POSTs — the picked File is read by the
8
+ * parent and appended to a FormData) and bind the NATIVE `(change)` event, reading
9
+ * `$event.target.files[0]`. So this re-emits the inner `<input type=file>` change event verbatim
10
+ * via a `change` output, preserving `$event.target.files[0]`. Drag-drop assigns the dropped
11
+ * files to the hidden input and dispatches a change, keeping the same contract. Provides
12
+ * {@link NXE_VALIDATION_TARGET} (value = the selected File) so a nested `nxe-validator`'s
13
+ * `required` rule works — invalid while no file is chosen.
14
+ */
15
+ declare class NxeFileUploaderComponent implements NxeValidationTarget {
16
+ readonly allowCanceling: _angular_core.InputSignal<boolean>;
17
+ readonly accept: _angular_core.InputSignal<string>;
18
+ readonly labelText: _angular_core.InputSignal<string>;
19
+ readonly selectButtonText: _angular_core.InputSignal<string>;
20
+ /** Accepted for parity; only `useForm` is used (no server upload by the widget). */
21
+ readonly uploadMode: _angular_core.InputSignal<"instantly" | "useButtons" | "useForm">;
22
+ readonly multiple: _angular_core.InputSignal<boolean>;
23
+ readonly name: _angular_core.InputSignal<string>;
24
+ /** Group for a nested nxe-validator (none used today → bare default group). */
25
+ readonly validationGroupInput: _angular_core.InputSignal<string>;
26
+ /** Re-emits the native `<input type=file>` change so `$event.target.files[0]` keeps working. */
27
+ readonly change: _angular_core.OutputEmitterRef<Event>;
28
+ private readonly fileInput;
29
+ readonly file: _angular_core.WritableSignal<File>;
30
+ readonly dragOver: _angular_core.WritableSignal<boolean>;
31
+ readonly focused: _angular_core.WritableSignal<boolean>;
32
+ readonly validationError: _angular_core.WritableSignal<string>;
33
+ getValue(): unknown;
34
+ validationGroup(): string | undefined;
35
+ setValidationError(message: string | null): void;
36
+ protected browse(): void;
37
+ protected onNativeChange(event: Event): void;
38
+ protected cancel(): void;
39
+ protected onDragOver(event: DragEvent): void;
40
+ protected onDragLeave(): void;
41
+ protected onDrop(event: DragEvent): void;
42
+ protected formatSize(bytes: number): string;
43
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeFileUploaderComponent, never>;
44
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeFileUploaderComponent, "nxe-file-uploader", never, { "allowCanceling": { "alias": "allowCanceling"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "selectButtonText": { "alias": "selectButtonText"; "required": false; "isSignal": true; }; "uploadMode": { "alias": "uploadMode"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "validationGroupInput": { "alias": "validationGroup"; "required": false; "isSignal": true; }; }, { "change": "change"; }, never, ["*"], true, never>;
45
+ }
46
+
47
+ export { NxeFileUploaderComponent };