@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.
- package/LICENSE +202 -0
- package/NOTICE +16 -0
- package/README.md +64 -0
- package/fesm2022/nexterajs-ui-animations.mjs +184 -0
- package/fesm2022/nexterajs-ui-animations.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-core.mjs +326 -0
- package/fesm2022/nexterajs-ui-core.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-dropdowns.mjs +953 -0
- package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-excel.mjs +779 -0
- package/fesm2022/nexterajs-ui-excel.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-file-uploader.mjs +125 -0
- package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-forms.mjs +1113 -0
- package/fesm2022/nexterajs-ui-forms.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-grid.mjs +4145 -0
- package/fesm2022/nexterajs-ui-grid.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-intl.mjs +377 -0
- package/fesm2022/nexterajs-ui-intl.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-pivot.mjs +4739 -0
- package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-styling.mjs +59 -0
- package/fesm2022/nexterajs-ui-styling.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-tree-view.mjs +202 -0
- package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-validation.mjs +269 -0
- package/fesm2022/nexterajs-ui-validation.mjs.map +1 -0
- package/fesm2022/nexterajs-ui.mjs +23 -0
- package/fesm2022/nexterajs-ui.mjs.map +1 -0
- package/package.json +100 -0
- package/styles/_button-directives.scss +39 -0
- package/styles/_dropdown.scss +113 -0
- package/styles/_editor.scss +146 -0
- package/styles/_mixins.scss +2 -0
- package/styles/_tokens.scss +77 -0
- package/styles/_widget.scss +58 -0
- package/styles/index.scss +83 -0
- package/types/nexterajs-ui-animations.d.ts +22 -0
- package/types/nexterajs-ui-core.d.ts +328 -0
- package/types/nexterajs-ui-dropdowns.d.ts +334 -0
- package/types/nexterajs-ui-excel.d.ts +159 -0
- package/types/nexterajs-ui-file-uploader.d.ts +47 -0
- package/types/nexterajs-ui-forms.d.ts +296 -0
- package/types/nexterajs-ui-grid.d.ts +1485 -0
- package/types/nexterajs-ui-intl.d.ts +125 -0
- package/types/nexterajs-ui-pivot.d.ts +1470 -0
- package/types/nexterajs-ui-styling.d.ts +40 -0
- package/types/nexterajs-ui-tree-view.d.ts +69 -0
- package/types/nexterajs-ui-validation.d.ts +102 -0
- package/types/nexterajs-ui.d.ts +12 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, NgZone, model, input, booleanAttribute, signal, computed, output, Directive, TemplateRef, Injectable } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Application-wide component defaults.
|
|
6
|
+
*
|
|
7
|
+
* DevExtreme applications configure a great deal through `defaultOptions` and then never write
|
|
8
|
+
* those attributes again — so the templates carry no evidence that the option was ever set.
|
|
9
|
+
* Without an equivalent here, a migrated application silently gets the library's literals: an
|
|
10
|
+
* app that set `columnAutoWidth: true` once at bootstrap would find every grid laying its
|
|
11
|
+
* columns out differently, with nothing in the markup to explain why.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* providers: [
|
|
15
|
+
* {
|
|
16
|
+
* provide: NXE_DEFAULT_OPTIONS,
|
|
17
|
+
* useValue: {
|
|
18
|
+
* dataGrid: { columnAutoWidth: true, hoverStateEnabled: true },
|
|
19
|
+
* treeList: { columnAutoWidth: true, hoverStateEnabled: true },
|
|
20
|
+
* textArea: { height: 80 },
|
|
21
|
+
* } satisfies NxeDefaultOptions,
|
|
22
|
+
* },
|
|
23
|
+
* ]
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
const NXE_DEFAULT_OPTIONS = new InjectionToken('NXE_DEFAULT_OPTIONS', {
|
|
27
|
+
providedIn: 'root',
|
|
28
|
+
factory: () => ({}),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Signal-based `ControlValueAccessor` base for every nxe form editor
|
|
33
|
+
* (`nxe-text-box`, `nxe-number-box`, `nxe-date-box`, `nxe-check-box`, `nxe-text-area`,
|
|
34
|
+
* `nxe-select-box`, `nxe-tag-box`, `nxe-radio`, ...).
|
|
35
|
+
*
|
|
36
|
+
* It supports BOTH template-driven (`[(ngModel)]`) and reactive (`formControlName`) forms
|
|
37
|
+
* transparently, as well as DevExtreme-style `[value]` / `[(value)]` two-way binding, and
|
|
38
|
+
* emits the DevExtreme-shaped {@link NxeValueChangedEvent} from `onValueChanged`.
|
|
39
|
+
*
|
|
40
|
+
* Concrete components MUST register themselves as the value accessor, e.g.:
|
|
41
|
+
* ```ts
|
|
42
|
+
* @Component({
|
|
43
|
+
* selector: 'nxe-text-box',
|
|
44
|
+
* providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextBoxComponent), multi: true }],
|
|
45
|
+
* ...
|
|
46
|
+
* })
|
|
47
|
+
* export class NxeTextBoxComponent extends NxeFormControlBase<string> { ... }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Subclasses call {@link commitValue} on user interaction and {@link markAsTouched} on blur.
|
|
51
|
+
*/
|
|
52
|
+
class NxeFormControlBase {
|
|
53
|
+
elementRef = inject(ElementRef);
|
|
54
|
+
/**
|
|
55
|
+
* The app is zone-based (`provideZoneChangeDetection()`); writing back to Angular forms
|
|
56
|
+
* from a signal context must run inside the zone or reactive forms lag a tick.
|
|
57
|
+
*/
|
|
58
|
+
ngZone = inject(NgZone);
|
|
59
|
+
/** Application-wide defaults; each editor resolves `binding ?? this ?? literal`. */
|
|
60
|
+
nxeDefaults = inject(NXE_DEFAULT_OPTIONS);
|
|
61
|
+
/**
|
|
62
|
+
* The current value — single source of truth. Two-way bindable as `[(value)]` (DevExtreme
|
|
63
|
+
* parity) and also driven by `writeValue` for `ngModel`/`formControlName`.
|
|
64
|
+
*/
|
|
65
|
+
value = model(null, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
67
|
+
/** Disabled via the `[disabled]` input (DevExtreme parity); OR-combined with forms disabled. */
|
|
68
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
|
|
69
|
+
disabledByForm = signal(false, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "disabledByForm" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/** Effective disabled state (input OR reactive-forms `setDisabledState`). */
|
|
72
|
+
disabled = computed(() => this.disabledInput() || this.disabledByForm(), /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/** Read-only state (DevExtreme `[readOnly]`). */
|
|
75
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
76
|
+
/** Validation group this editor belongs to (its nested `nxe-validator` registers here). */
|
|
77
|
+
validationGroupInput = input(undefined, { ...(ngDevMode ? { debugName: "validationGroupInput" } : /* istanbul ignore next */ {}), alias: 'validationGroup' });
|
|
78
|
+
/** The current validation error message (set by a nested `nxe-validator`), or null. */
|
|
79
|
+
validationError = signal(null, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "validationError" }] : /* istanbul ignore next */ []));
|
|
81
|
+
/** Whether the control has been blurred at least once. */
|
|
82
|
+
touched = signal(false, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
84
|
+
/** Whether the value has been changed by the user at least once. */
|
|
85
|
+
dirty = signal(false, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** DevExtreme-compatible value-change event. */
|
|
88
|
+
onValueChanged = output();
|
|
89
|
+
_onChange = () => { };
|
|
90
|
+
_onTouched = () => { };
|
|
91
|
+
/** Host element (the DevExtreme event payload `element`). */
|
|
92
|
+
get element() {
|
|
93
|
+
return this.elementRef.nativeElement;
|
|
94
|
+
}
|
|
95
|
+
// --- NxeValidationTarget (consumed by a nested nxe-validator) ---
|
|
96
|
+
getValue() {
|
|
97
|
+
return this.value();
|
|
98
|
+
}
|
|
99
|
+
validationGroup() {
|
|
100
|
+
return this.validationGroupInput();
|
|
101
|
+
}
|
|
102
|
+
setValidationError(message) {
|
|
103
|
+
this.validationError.set(message);
|
|
104
|
+
}
|
|
105
|
+
// --- ControlValueAccessor: forms -> component (no event emission) ---
|
|
106
|
+
writeValue(value) {
|
|
107
|
+
this.value.set(value);
|
|
108
|
+
}
|
|
109
|
+
registerOnChange(fn) {
|
|
110
|
+
this._onChange = fn;
|
|
111
|
+
}
|
|
112
|
+
registerOnTouched(fn) {
|
|
113
|
+
this._onTouched = fn;
|
|
114
|
+
}
|
|
115
|
+
setDisabledState(isDisabled) {
|
|
116
|
+
this.disabledByForm.set(isDisabled);
|
|
117
|
+
}
|
|
118
|
+
// --- component -> forms (user interaction) ---
|
|
119
|
+
/**
|
|
120
|
+
* Commit a user-initiated value change: update the value, notify Angular forms (inside
|
|
121
|
+
* `NgZone.run` so reactive forms detect it in this zone-based app), and emit the
|
|
122
|
+
* DevExtreme-shaped `onValueChanged`. No-op when the value is unchanged.
|
|
123
|
+
*/
|
|
124
|
+
commitValue(next, event = null) {
|
|
125
|
+
const previousValue = this.value();
|
|
126
|
+
if (Object.is(previousValue, next)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
this.value.set(next);
|
|
130
|
+
this.dirty.set(true);
|
|
131
|
+
this.ngZone.run(() => this._onChange(next));
|
|
132
|
+
this.onValueChanged.emit({
|
|
133
|
+
value: next,
|
|
134
|
+
previousValue,
|
|
135
|
+
event,
|
|
136
|
+
component: this,
|
|
137
|
+
element: this.element,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** Mark the control as touched (e.g. on blur), notifying Angular forms exactly once. */
|
|
141
|
+
markAsTouched() {
|
|
142
|
+
if (this.touched()) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.touched.set(true);
|
|
146
|
+
this.ngZone.run(() => this._onTouched());
|
|
147
|
+
}
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeFormControlBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
149
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NxeFormControlBase, isStandalone: true, inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, validationGroupInput: { classPropertyName: "validationGroupInput", publicName: "validationGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChanged: "onValueChanged" }, host: { properties: { "class.nxe-disabled": "disabled()", "class.nxe-readonly": "readOnly()", "class.dx-state-readonly": "readOnly()" } }, ngImport: i0 });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeFormControlBase, decorators: [{
|
|
152
|
+
type: Directive,
|
|
153
|
+
args: [{
|
|
154
|
+
host: {
|
|
155
|
+
'[class.nxe-disabled]': 'disabled()',
|
|
156
|
+
'[class.nxe-readonly]': 'readOnly()',
|
|
157
|
+
// dx emits `dx-state-readonly` on a read-only editor, and legacy stylesheets lean on it
|
|
158
|
+
// for more than a cursor: the grid's editable-cell tint is keyed off its ABSENCE
|
|
159
|
+
// (`td:has(nxe-select-box):not(:has(.dx-state-readonly))`), so a missing class silently
|
|
160
|
+
// paints every read-only cell as editable. One binding here covers all eight editors.
|
|
161
|
+
'[class.dx-state-readonly]': 'readOnly()',
|
|
162
|
+
},
|
|
163
|
+
}]
|
|
164
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], validationGroupInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationGroup", required: false }] }], onValueChanged: [{ type: i0.Output, args: ["onValueChanged"] }] } });
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Base for no-template nested-option components (see {@link NxeConfigOption}).
|
|
168
|
+
*
|
|
169
|
+
* Concrete options extend this, declare their inputs as signals, implement {@link nxeConfig}
|
|
170
|
+
* (typically returning a `computed()` of those inputs), and register the {@link NXE_OPTION}
|
|
171
|
+
* token so the parent can collect them:
|
|
172
|
+
* ```ts
|
|
173
|
+
* @Component({
|
|
174
|
+
* selector: 'nxe-selection',
|
|
175
|
+
* template: '',
|
|
176
|
+
* providers: [{ provide: NXE_OPTION, useExisting: forwardRef(() => NxeSelectionComponent), multi: true }],
|
|
177
|
+
* })
|
|
178
|
+
* export class NxeSelectionComponent extends NxeConfigOptionBase<SelectionConfig> {
|
|
179
|
+
* readonly nxeRole = 'selection';
|
|
180
|
+
* readonly mode = input<'single' | 'multiple'>('single');
|
|
181
|
+
* nxeConfig() { return { mode: this.mode() }; }
|
|
182
|
+
* }
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
class NxeConfigOptionBase {
|
|
186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeConfigOptionBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
187
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NxeConfigOptionBase, isStandalone: true, ngImport: i0 });
|
|
188
|
+
}
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeConfigOptionBase, decorators: [{
|
|
190
|
+
type: Directive
|
|
191
|
+
}] });
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* DI token every nested-option component provides (`multi: true`) so parents can query all
|
|
195
|
+
* options with `contentChildren(NXE_OPTION)` without importing the concrete option classes.
|
|
196
|
+
*/
|
|
197
|
+
const NXE_OPTION = new InjectionToken('NXE_OPTION');
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* `nxeTemplate` — drop-in replacement for DevExtreme's `*dxTemplate`.
|
|
201
|
+
*
|
|
202
|
+
* Captures a named `ng-template` so a parent container (select-box item template, grid
|
|
203
|
+
* cell/header/edit templates, list item template, ...) can look it up by name and render it
|
|
204
|
+
* with a context object. BOTH authoring forms resolve to the same {@link name}:
|
|
205
|
+
*
|
|
206
|
+
* - attribute form: `<ng-template nxeTemplate="cellContent" let-data>` (psak-web style)
|
|
207
|
+
* - dx microsyntax: `<div *nxeTemplate="let data of 'cellContent'">` — desugars the name into
|
|
208
|
+
* an `nxeTemplateOf` binding (orbit's mechanically-migrated `*dxTemplate` templates)
|
|
209
|
+
*
|
|
210
|
+
* Parents collect these via `contentChildren(NxeTemplateDirective)` and match on {@link name},
|
|
211
|
+
* rendering with `ngTemplateOutlet` + an `ngTemplateOutletContext` of `{ $implicit: data, ... }`.
|
|
212
|
+
*/
|
|
213
|
+
class NxeTemplateDirective {
|
|
214
|
+
/** Attribute-form name (`nxeTemplate="name"`); empty in microsyntax usage. */
|
|
215
|
+
attrName = input('', { ...(ngDevMode ? { debugName: "attrName" } : /* istanbul ignore next */ {}), alias: 'nxeTemplate' });
|
|
216
|
+
/** Microsyntax-form name (`*nxeTemplate="let x of 'name'"` binds `nxeTemplateOf`). */
|
|
217
|
+
ofName = input(undefined, { ...(ngDevMode ? { debugName: "ofName" } : /* istanbul ignore next */ {}), alias: 'nxeTemplateOf' });
|
|
218
|
+
/** The template's lookup name, whichever form supplied it. */
|
|
219
|
+
name = computed(() => this.ofName() ?? this.attrName(), /* @ts-ignore */
|
|
220
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
221
|
+
templateRef = inject(TemplateRef);
|
|
222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
223
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NxeTemplateDirective, isStandalone: true, selector: "[nxeTemplate]", inputs: { attrName: { classPropertyName: "attrName", publicName: "nxeTemplate", isSignal: true, isRequired: false, transformFunction: null }, ofName: { classPropertyName: "ofName", publicName: "nxeTemplateOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
224
|
+
}
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeTemplateDirective, decorators: [{
|
|
226
|
+
type: Directive,
|
|
227
|
+
args: [{
|
|
228
|
+
selector: '[nxeTemplate]',
|
|
229
|
+
}]
|
|
230
|
+
}], propDecorators: { attrName: [{ type: i0.Input, args: [{ isSignal: true, alias: "nxeTemplate", required: false }] }], ofName: [{ type: i0.Input, args: [{ isSignal: true, alias: "nxeTemplateOf", required: false }] }] } });
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Wrap a value in an array if it is not already one (null/undefined -> empty array).
|
|
234
|
+
*
|
|
235
|
+
* Mirrors `@angular/cdk/coercion`'s `coerceArray` so nxe components don't import CDK coercion
|
|
236
|
+
* directly. (For boolean/number coercion use `booleanAttribute` / `numberAttribute` from
|
|
237
|
+
* `@angular/core` directly on `input(...)`.)
|
|
238
|
+
*/
|
|
239
|
+
function coerceArray(value) {
|
|
240
|
+
if (value == null) {
|
|
241
|
+
return [];
|
|
242
|
+
}
|
|
243
|
+
return Array.isArray(value) ? [...value] : [value];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* `booleanAttribute` that preserves "unset".
|
|
248
|
+
*
|
|
249
|
+
* An input resolved as `binding ?? token ?? literal` needs three states, but
|
|
250
|
+
* `booleanAttribute` has two: it maps `undefined` to `false`, which makes "nobody bound this"
|
|
251
|
+
* indistinguishable from "someone bound false" and silently removes the token rung.
|
|
252
|
+
*
|
|
253
|
+
* This keeps the attribute-form coercion (`showClearButton="false"` is `false`, not the truthy
|
|
254
|
+
* string) and passes `undefined` straight through.
|
|
255
|
+
*/
|
|
256
|
+
function nxeOptionalBoolean(value) {
|
|
257
|
+
return value === undefined || value === null ? undefined : booleanAttribute(value);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** DI token the editor provides so its nested `nxe-validator` can adapt it. */
|
|
261
|
+
const NXE_VALIDATION_TARGET = new InjectionToken('NXE_VALIDATION_TARGET');
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Root registry mapping a `validationGroup` string to the `nxe-validator`s in it, mirroring
|
|
265
|
+
* DevExtreme's global ValidationEngine.
|
|
266
|
+
*
|
|
267
|
+
* `nxe-button[validationGroup]` (and any caller) triggers {@link validate} for a group, which
|
|
268
|
+
* runs every member validator and aggregates the result into the DevExtreme-shaped
|
|
269
|
+
* {@link NxeValidationResult}.
|
|
270
|
+
*/
|
|
271
|
+
class NxeValidationGroupRegistry {
|
|
272
|
+
groups = new Map();
|
|
273
|
+
register(group, member) {
|
|
274
|
+
let set = this.groups.get(group);
|
|
275
|
+
if (!set) {
|
|
276
|
+
set = new Set();
|
|
277
|
+
this.groups.set(group, set);
|
|
278
|
+
}
|
|
279
|
+
set.add(member);
|
|
280
|
+
}
|
|
281
|
+
unregister(group, member) {
|
|
282
|
+
const set = this.groups.get(group);
|
|
283
|
+
if (!set) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
set.delete(member);
|
|
287
|
+
if (set.size === 0) {
|
|
288
|
+
this.groups.delete(group);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/** Validate every member of the group; valid (and empty) groups return `isValid: true`. */
|
|
292
|
+
validate(group) {
|
|
293
|
+
const set = this.groups.get(group);
|
|
294
|
+
const brokenRules = [];
|
|
295
|
+
if (set) {
|
|
296
|
+
for (const member of set) {
|
|
297
|
+
const result = member.validate();
|
|
298
|
+
if (!result.isValid) {
|
|
299
|
+
brokenRules.push(...result.brokenRules);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
isValid: brokenRules.length === 0,
|
|
305
|
+
brokenRules,
|
|
306
|
+
status: brokenRules.length === 0 ? 'valid' : 'invalid',
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeValidationGroupRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
310
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeValidationGroupRegistry, providedIn: 'root' });
|
|
311
|
+
}
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NxeValidationGroupRegistry, decorators: [{
|
|
313
|
+
type: Injectable,
|
|
314
|
+
args: [{ providedIn: 'root' }]
|
|
315
|
+
}] });
|
|
316
|
+
|
|
317
|
+
// @nexterajs/ui — core abstractions shared by every component.
|
|
318
|
+
|
|
319
|
+
// @nexterajs/ui/core — public API.
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Generated bundle index. Do not edit.
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
export { NXE_DEFAULT_OPTIONS, NXE_OPTION, NXE_VALIDATION_TARGET, NxeConfigOptionBase, NxeFormControlBase, NxeTemplateDirective, NxeValidationGroupRegistry, coerceArray, nxeOptionalBoolean };
|
|
326
|
+
//# sourceMappingURL=nexterajs-ui-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nexterajs-ui-core.mjs","sources":["../../../projects/nextera-ui/core/src/lib/core/tokens/nxe-default-options.token.ts","../../../projects/nextera-ui/core/src/lib/core/base/nxe-form-control.base.ts","../../../projects/nextera-ui/core/src/lib/core/base/nxe-config-option.base.ts","../../../projects/nextera-ui/core/src/lib/core/tokens/nxe-config-option.token.ts","../../../projects/nextera-ui/core/src/lib/core/directives/nxe-template.directive.ts","../../../projects/nextera-ui/core/src/lib/core/coercion/coerce-array.ts","../../../projects/nextera-ui/core/src/lib/core/coercion/optional-boolean.ts","../../../projects/nextera-ui/core/src/lib/core/validation/nxe-validation.types.ts","../../../projects/nextera-ui/core/src/lib/core/validation/nxe-validation-group-registry.service.ts","../../../projects/nextera-ui/core/src/lib/core/index.ts","../../../projects/nextera-ui/core/src/public-api.ts","../../../projects/nextera-ui/core/src/nexterajs-ui-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Per-widget defaults, mirroring DevExtreme's `Widget.defaultOptions({ options: {...} })`.\r\n *\r\n * Every field is optional and every consumer resolves it as `binding ?? token ?? literal`, so\r\n * an application that provides nothing keeps the behaviour it has today.\r\n *\r\n * Only options that an application genuinely sets once and globally belong here. This is not a\r\n * second way to configure a component — a binding on the element always wins.\r\n */\r\nexport interface NxeGridDefaultOptions {\r\n hoverStateEnabled?: boolean;\r\n columnAutoWidth?: boolean;\r\n rowAlternationEnabled?: boolean;\r\n showColumnLines?: boolean;\r\n showRowLines?: boolean;\r\n showBorders?: boolean;\r\n wordWrapEnabled?: boolean;\r\n noDataText?: string;\r\n}\r\n\r\nexport interface NxePickerDefaultOptions {\r\n displayExpr?: string;\r\n valueExpr?: string;\r\n searchExpr?: string;\r\n searchEnabled?: boolean;\r\n showClearButton?: boolean;\r\n showDropDownButton?: boolean;\r\n placeholder?: string;\r\n}\r\n\r\nexport interface NxeDefaultOptions {\r\n readonly dataGrid?: NxeGridDefaultOptions;\r\n /** `nxe-tree-list` resolves against this slice instead of `dataGrid`, as dx does. */\r\n readonly treeList?: NxeGridDefaultOptions;\r\n readonly selectBox?: NxePickerDefaultOptions;\r\n readonly tagBox?: NxePickerDefaultOptions & { showSelectionControls?: boolean };\r\n /** Narrower than the other pickers: this one has no built-in search or drop-down button. */\r\n readonly dropDownBox?: Pick<\r\n NxePickerDefaultOptions,\r\n 'displayExpr' | 'valueExpr' | 'placeholder' | 'showClearButton'\r\n >;\r\n readonly dateBox?: { displayFormat?: string; placeholder?: string };\r\n readonly textBox?: { placeholder?: string; hoverStateEnabled?: boolean };\r\n readonly textArea?: { placeholder?: string; height?: number | string };\r\n readonly numberBox?: { format?: string };\r\n readonly button?: { focusStateEnabled?: boolean };\r\n}\r\n\r\n/**\r\n * Application-wide component defaults.\r\n *\r\n * DevExtreme applications configure a great deal through `defaultOptions` and then never write\r\n * those attributes again — so the templates carry no evidence that the option was ever set.\r\n * Without an equivalent here, a migrated application silently gets the library's literals: an\r\n * app that set `columnAutoWidth: true` once at bootstrap would find every grid laying its\r\n * columns out differently, with nothing in the markup to explain why.\r\n *\r\n * ```ts\r\n * providers: [\r\n * {\r\n * provide: NXE_DEFAULT_OPTIONS,\r\n * useValue: {\r\n * dataGrid: { columnAutoWidth: true, hoverStateEnabled: true },\r\n * treeList: { columnAutoWidth: true, hoverStateEnabled: true },\r\n * textArea: { height: 80 },\r\n * } satisfies NxeDefaultOptions,\r\n * },\r\n * ]\r\n * ```\r\n */\r\nexport const NXE_DEFAULT_OPTIONS = new InjectionToken<NxeDefaultOptions>('NXE_DEFAULT_OPTIONS', {\r\n providedIn: 'root',\r\n factory: () => ({}),\r\n});\r\n","import {\r\n booleanAttribute,\r\n computed,\r\n Directive,\r\n ElementRef,\r\n inject,\r\n input,\r\n model,\r\n NgZone,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor } from '@angular/forms';\r\nimport { NXE_DEFAULT_OPTIONS } from '../tokens/nxe-default-options.token';\r\nimport { NxeValueChangedEvent } from '../types/nxe-events';\r\nimport { NxeValidationTarget } from '../validation/nxe-validation.types';\r\n\r\n/**\r\n * Signal-based `ControlValueAccessor` base for every nxe form editor\r\n * (`nxe-text-box`, `nxe-number-box`, `nxe-date-box`, `nxe-check-box`, `nxe-text-area`,\r\n * `nxe-select-box`, `nxe-tag-box`, `nxe-radio`, ...).\r\n *\r\n * It supports BOTH template-driven (`[(ngModel)]`) and reactive (`formControlName`) forms\r\n * transparently, as well as DevExtreme-style `[value]` / `[(value)]` two-way binding, and\r\n * emits the DevExtreme-shaped {@link NxeValueChangedEvent} from `onValueChanged`.\r\n *\r\n * Concrete components MUST register themselves as the value accessor, e.g.:\r\n * ```ts\r\n * @Component({\r\n * selector: 'nxe-text-box',\r\n * providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NxeTextBoxComponent), multi: true }],\r\n * ...\r\n * })\r\n * export class NxeTextBoxComponent extends NxeFormControlBase<string> { ... }\r\n * ```\r\n *\r\n * Subclasses call {@link commitValue} on user interaction and {@link markAsTouched} on blur.\r\n */\r\n@Directive({\r\n host: {\r\n '[class.nxe-disabled]': 'disabled()',\r\n '[class.nxe-readonly]': 'readOnly()',\r\n // dx emits `dx-state-readonly` on a read-only editor, and legacy stylesheets lean on it\r\n // for more than a cursor: the grid's editable-cell tint is keyed off its ABSENCE\r\n // (`td:has(nxe-select-box):not(:has(.dx-state-readonly))`), so a missing class silently\r\n // paints every read-only cell as editable. One binding here covers all eight editors.\r\n '[class.dx-state-readonly]': 'readOnly()',\r\n },\r\n})\r\nexport abstract class NxeFormControlBase<T> implements ControlValueAccessor, NxeValidationTarget {\r\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n /**\r\n * The app is zone-based (`provideZoneChangeDetection()`); writing back to Angular forms\r\n * from a signal context must run inside the zone or reactive forms lag a tick.\r\n */\r\n protected readonly ngZone = inject(NgZone);\r\n /** Application-wide defaults; each editor resolves `binding ?? this ?? literal`. */\r\n protected readonly nxeDefaults = inject(NXE_DEFAULT_OPTIONS);\r\n\r\n /**\r\n * The current value — single source of truth. Two-way bindable as `[(value)]` (DevExtreme\r\n * parity) and also driven by `writeValue` for `ngModel`/`formControlName`.\r\n */\r\n readonly value = model<T | null>(null);\r\n\r\n /** Disabled via the `[disabled]` input (DevExtreme parity); OR-combined with forms disabled. */\r\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\r\n private readonly disabledByForm = signal(false);\r\n /** Effective disabled state (input OR reactive-forms `setDisabledState`). */\r\n readonly disabled = computed(() => this.disabledInput() || this.disabledByForm());\r\n\r\n /** Read-only state (DevExtreme `[readOnly]`). */\r\n readonly readOnly = input(false, { transform: booleanAttribute });\r\n\r\n /** Validation group this editor belongs to (its nested `nxe-validator` registers here). */\r\n readonly validationGroupInput = input<string | undefined>(undefined, { alias: 'validationGroup' });\r\n\r\n /** The current validation error message (set by a nested `nxe-validator`), or null. */\r\n readonly validationError = signal<string | null>(null);\r\n\r\n /** Whether the control has been blurred at least once. */\r\n readonly touched = signal(false);\r\n /** Whether the value has been changed by the user at least once. */\r\n readonly dirty = signal(false);\r\n\r\n /** DevExtreme-compatible value-change event. */\r\n readonly onValueChanged = output<NxeValueChangedEvent<T>>();\r\n\r\n private _onChange: (value: T | null) => void = () => {};\r\n private _onTouched: () => void = () => {};\r\n\r\n /** Host element (the DevExtreme event payload `element`). */\r\n get element(): HTMLElement {\r\n return this.elementRef.nativeElement;\r\n }\r\n\r\n // --- NxeValidationTarget (consumed by a nested nxe-validator) ---\r\n\r\n getValue(): unknown {\r\n return this.value();\r\n }\r\n\r\n validationGroup(): string | undefined {\r\n return this.validationGroupInput();\r\n }\r\n\r\n setValidationError(message: string | null): void {\r\n this.validationError.set(message);\r\n }\r\n\r\n // --- ControlValueAccessor: forms -> component (no event emission) ---\r\n\r\n writeValue(value: T | null): void {\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: (value: T | null) => void): void {\r\n this._onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabledByForm.set(isDisabled);\r\n }\r\n\r\n // --- component -> forms (user interaction) ---\r\n\r\n /**\r\n * Commit a user-initiated value change: update the value, notify Angular forms (inside\r\n * `NgZone.run` so reactive forms detect it in this zone-based app), and emit the\r\n * DevExtreme-shaped `onValueChanged`. No-op when the value is unchanged.\r\n */\r\n protected commitValue(next: T | null, event: Event | null = null): void {\r\n const previousValue = this.value();\r\n if (Object.is(previousValue, next)) {\r\n return;\r\n }\r\n this.value.set(next);\r\n this.dirty.set(true);\r\n this.ngZone.run(() => this._onChange(next));\r\n this.onValueChanged.emit({\r\n value: next,\r\n previousValue,\r\n event,\r\n component: this,\r\n element: this.element,\r\n });\r\n }\r\n\r\n /** Mark the control as touched (e.g. on blur), notifying Angular forms exactly once. */\r\n protected markAsTouched(): void {\r\n if (this.touched()) {\r\n return;\r\n }\r\n this.touched.set(true);\r\n this.ngZone.run(() => this._onTouched());\r\n }\r\n}\r\n","import { Directive } from '@angular/core';\r\nimport { NxeConfigOption } from '../tokens/nxe-config-option.token';\r\n\r\n/**\r\n * Base for no-template nested-option components (see {@link NxeConfigOption}).\r\n *\r\n * Concrete options extend this, declare their inputs as signals, implement {@link nxeConfig}\r\n * (typically returning a `computed()` of those inputs), and register the {@link NXE_OPTION}\r\n * token so the parent can collect them:\r\n * ```ts\r\n * @Component({\r\n * selector: 'nxe-selection',\r\n * template: '',\r\n * providers: [{ provide: NXE_OPTION, useExisting: forwardRef(() => NxeSelectionComponent), multi: true }],\r\n * })\r\n * export class NxeSelectionComponent extends NxeConfigOptionBase<SelectionConfig> {\r\n * readonly nxeRole = 'selection';\r\n * readonly mode = input<'single' | 'multiple'>('single');\r\n * nxeConfig() { return { mode: this.mode() }; }\r\n * }\r\n * ```\r\n */\r\n@Directive()\r\nexport abstract class NxeConfigOptionBase<TConfig> implements NxeConfigOption<TConfig> {\r\n abstract readonly nxeRole: string;\r\n abstract nxeConfig(): TConfig;\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * Contract implemented by every flat `nxe-` nested-option component\r\n * (`nxe-column`, `nxe-selection`, `nxe-paging`, `nxe-summary`, `nxe-validation-rule`, ...).\r\n *\r\n * Nested options carry no template; they exist purely to declare configuration. Each one\r\n * exposes its current config as a signal-readable function and a `role` discriminator, so a\r\n * parent (`nxe-data-grid`, `nxe-select-box`, ...) can collect them via `contentChildren` and\r\n * derive a reactive config model — the mechanism that lets\r\n * `<nxe-data-grid><nxe-column/></nxe-data-grid>` mirror `<dx-data-grid><dxi-column/>`.\r\n */\r\nexport interface NxeConfigOption<TConfig = unknown> {\r\n /** Discriminator identifying the option kind, e.g. `'column'`, `'selection'`, `'paging'`. */\r\n readonly nxeRole: string;\r\n /** Returns the option's current configuration (reads signals; recomputes reactively). */\r\n nxeConfig(): TConfig;\r\n}\r\n\r\n/**\r\n * DI token every nested-option component provides (`multi: true`) so parents can query all\r\n * options with `contentChildren(NXE_OPTION)` without importing the concrete option classes.\r\n */\r\nexport const NXE_OPTION = new InjectionToken<NxeConfigOption>('NXE_OPTION');\r\n","import { computed, Directive, inject, input, TemplateRef } from '@angular/core';\r\n\r\n/**\r\n * `nxeTemplate` — drop-in replacement for DevExtreme's `*dxTemplate`.\r\n *\r\n * Captures a named `ng-template` so a parent container (select-box item template, grid\r\n * cell/header/edit templates, list item template, ...) can look it up by name and render it\r\n * with a context object. BOTH authoring forms resolve to the same {@link name}:\r\n *\r\n * - attribute form: `<ng-template nxeTemplate=\"cellContent\" let-data>` (psak-web style)\r\n * - dx microsyntax: `<div *nxeTemplate=\"let data of 'cellContent'\">` — desugars the name into\r\n * an `nxeTemplateOf` binding (orbit's mechanically-migrated `*dxTemplate` templates)\r\n *\r\n * Parents collect these via `contentChildren(NxeTemplateDirective)` and match on {@link name},\r\n * rendering with `ngTemplateOutlet` + an `ngTemplateOutletContext` of `{ $implicit: data, ... }`.\r\n */\r\n@Directive({\r\n selector: '[nxeTemplate]',\r\n})\r\nexport class NxeTemplateDirective {\r\n /** Attribute-form name (`nxeTemplate=\"name\"`); empty in microsyntax usage. */\r\n readonly attrName = input<string>('', { alias: 'nxeTemplate' });\r\n /** Microsyntax-form name (`*nxeTemplate=\"let x of 'name'\"` binds `nxeTemplateOf`). */\r\n readonly ofName = input<string | undefined>(undefined, { alias: 'nxeTemplateOf' });\r\n\r\n /** The template's lookup name, whichever form supplied it. */\r\n readonly name = computed(() => this.ofName() ?? this.attrName());\r\n\r\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\r\n}\r\n","/**\r\n * Wrap a value in an array if it is not already one (null/undefined -> empty array).\r\n *\r\n * Mirrors `@angular/cdk/coercion`'s `coerceArray` so nxe components don't import CDK coercion\r\n * directly. (For boolean/number coercion use `booleanAttribute` / `numberAttribute` from\r\n * `@angular/core` directly on `input(...)`.)\r\n */\r\nexport function coerceArray<T>(value: T | readonly T[] | null | undefined): T[] {\r\n if (value == null) {\r\n return [];\r\n }\r\n return Array.isArray(value) ? [...value] : [value as T];\r\n}\r\n","import { booleanAttribute } from '@angular/core';\r\n\r\n/**\r\n * `booleanAttribute` that preserves \"unset\".\r\n *\r\n * An input resolved as `binding ?? token ?? literal` needs three states, but\r\n * `booleanAttribute` has two: it maps `undefined` to `false`, which makes \"nobody bound this\"\r\n * indistinguishable from \"someone bound false\" and silently removes the token rung.\r\n *\r\n * This keeps the attribute-form coercion (`showClearButton=\"false\"` is `false`, not the truthy\r\n * string) and passes `undefined` straight through.\r\n */\r\nexport function nxeOptionalBoolean(value: unknown): boolean | undefined {\r\n return value === undefined || value === null ? undefined : booleanAttribute(value);\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/** A single failed validation rule. */\r\nexport interface NxeBrokenRule {\r\n type: string;\r\n message: string;\r\n}\r\n\r\n/**\r\n * Result of validating a control or a validation group — shaped to match\r\n * DevExtreme's `ValidationGroup.validate()` / `dxValidator.validate()` return value so existing\r\n * handlers (`const r = event.validationGroup.validate(); if (r.isValid) {...}`) work unchanged.\r\n */\r\nexport interface NxeValidationResult {\r\n isValid: boolean;\r\n brokenRules: NxeBrokenRule[];\r\n status: 'valid' | 'invalid' | 'pending';\r\n}\r\n\r\n/**\r\n * Contract an editor exposes (via {@link NXE_VALIDATION_TARGET}) to the `nxe-validator` nested\r\n * inside it: read the current value, the editor's validation group, and push the invalid\r\n * message back so the editor can render it.\r\n */\r\nexport interface NxeValidationTarget {\r\n getValue(): unknown;\r\n validationGroup(): string | undefined;\r\n setValidationError(message: string | null): void;\r\n}\r\n\r\n/** DI token the editor provides so its nested `nxe-validator` can adapt it. */\r\nexport const NXE_VALIDATION_TARGET = new InjectionToken<NxeValidationTarget>(\r\n 'NXE_VALIDATION_TARGET',\r\n);\r\n\r\n/** A member registered in a validation group (an `nxe-validator`). */\r\nexport interface NxeValidationGroupMember {\r\n validate(): NxeValidationResult;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { NxeBrokenRule, NxeValidationGroupMember, NxeValidationResult } from './nxe-validation.types';\r\n\r\n/**\r\n * Root registry mapping a `validationGroup` string to the `nxe-validator`s in it, mirroring\r\n * DevExtreme's global ValidationEngine.\r\n *\r\n * `nxe-button[validationGroup]` (and any caller) triggers {@link validate} for a group, which\r\n * runs every member validator and aggregates the result into the DevExtreme-shaped\r\n * {@link NxeValidationResult}.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class NxeValidationGroupRegistry {\r\n private readonly groups = new Map<string, Set<NxeValidationGroupMember>>();\r\n\r\n register(group: string, member: NxeValidationGroupMember): void {\r\n let set = this.groups.get(group);\r\n if (!set) {\r\n set = new Set();\r\n this.groups.set(group, set);\r\n }\r\n set.add(member);\r\n }\r\n\r\n unregister(group: string, member: NxeValidationGroupMember): void {\r\n const set = this.groups.get(group);\r\n if (!set) {\r\n return;\r\n }\r\n set.delete(member);\r\n if (set.size === 0) {\r\n this.groups.delete(group);\r\n }\r\n }\r\n\r\n /** Validate every member of the group; valid (and empty) groups return `isValid: true`. */\r\n validate(group: string): NxeValidationResult {\r\n const set = this.groups.get(group);\r\n const brokenRules: NxeBrokenRule[] = [];\r\n if (set) {\r\n for (const member of set) {\r\n const result = member.validate();\r\n if (!result.isValid) {\r\n brokenRules.push(...result.brokenRules);\r\n }\r\n }\r\n }\r\n return {\r\n isValid: brokenRules.length === 0,\r\n brokenRules,\r\n status: brokenRules.length === 0 ? 'valid' : 'invalid',\r\n };\r\n }\r\n}\r\n","// @nexterajs/ui — core abstractions shared by every component.\r\n\r\nexport * from './types/nxe-events';\r\nexport * from './base/nxe-form-control.base';\r\nexport * from './base/nxe-config-option.base';\r\nexport * from './tokens/nxe-config-option.token';\r\nexport * from './tokens/nxe-default-options.token';\r\nexport * from './directives/nxe-template.directive';\r\nexport * from './coercion/coerce-array';\r\nexport * from './coercion/optional-boolean';\r\nexport * from './validation/nxe-validation.types';\r\nexport * from './validation/nxe-validation-group-registry.service';\r\n","// @nexterajs/ui/core — public API.\r\nexport * from './lib/core/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAkDA;;;;;;;;;;;;;;;;;;;;;AAqBG;MACU,mBAAmB,GAAG,IAAI,cAAc,CAAoB,qBAAqB,EAAE;AAC5F,IAAA,UAAU,EAAE,MAAM;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