@nexterajs/ui 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -34
- package/fesm2022/nexterajs-ui-charts.mjs +1096 -0
- package/fesm2022/nexterajs-ui-charts.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-core.mjs +652 -12
- package/fesm2022/nexterajs-ui-core.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-display.mjs +1142 -0
- package/fesm2022/nexterajs-ui-display.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-dropdowns.mjs +321 -33
- package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-file-uploader.mjs +572 -10
- package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-forms.mjs +2027 -136
- package/fesm2022/nexterajs-ui-forms.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-grid.mjs +1222 -188
- package/fesm2022/nexterajs-ui-grid.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-intl.mjs +103 -11
- package/fesm2022/nexterajs-ui-intl.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-navigation.mjs +1054 -0
- package/fesm2022/nexterajs-ui-navigation.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-notify.mjs +46 -44
- package/fesm2022/nexterajs-ui-notify.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-overlay.mjs +1671 -0
- package/fesm2022/nexterajs-ui-overlay.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-pivot.mjs +51 -26
- package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-shell.mjs +542 -0
- package/fesm2022/nexterajs-ui-shell.mjs.map +1 -0
- package/fesm2022/nexterajs-ui-tree-view.mjs +5 -2
- package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -1
- package/fesm2022/nexterajs-ui-validation.mjs +42 -11
- package/fesm2022/nexterajs-ui-validation.mjs.map +1 -1
- package/fesm2022/nexterajs-ui.mjs +5 -0
- package/fesm2022/nexterajs-ui.mjs.map +1 -1
- package/package.json +33 -2
- package/styles/_dropdown.scss +5 -5
- package/styles/_editor.scss +52 -17
- package/styles/_mixins.scss +1 -1
- package/styles/_scrollbar.scss +5 -5
- package/styles/_status.scss +21 -0
- package/styles/_toast.scss +14 -14
- package/styles/_tokens.scss +420 -3
- package/styles/_widget.scss +14 -3
- package/styles/index.scss +6 -4
- package/types/nexterajs-ui-charts.d.ts +446 -0
- package/types/nexterajs-ui-core.d.ts +387 -22
- package/types/nexterajs-ui-display.d.ts +720 -0
- package/types/nexterajs-ui-dropdowns.d.ts +191 -48
- package/types/nexterajs-ui-file-uploader.d.ts +236 -7
- package/types/nexterajs-ui-forms.d.ts +675 -30
- package/types/nexterajs-ui-grid.d.ts +448 -93
- package/types/nexterajs-ui-intl.d.ts +39 -4
- package/types/nexterajs-ui-navigation.d.ts +531 -0
- package/types/nexterajs-ui-notify.d.ts +4 -2
- package/types/nexterajs-ui-overlay.d.ts +703 -0
- package/types/nexterajs-ui-pivot.d.ts +56 -48
- package/types/nexterajs-ui-shell.d.ts +294 -0
- package/types/nexterajs-ui-tree-view.d.ts +6 -3
- package/types/nexterajs-ui-validation.d.ts +20 -11
- package/types/nexterajs-ui.d.ts +5 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { NxeValidatedEvent, NxeBrokenRule, NxeValidationResult } from '@nexterajs/ui/core';
|
|
2
|
+
import { NxeMessageService, NxeValidatedEvent, NxeBrokenRule, NxeValidationResult } from '@nexterajs/ui/core';
|
|
3
3
|
import { ValidatorFn } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
/** DevExtreme validation rule type (the codebase uses `required`, `compare`, and `range`). */
|
|
6
6
|
type NxeValidationRuleType = 'required' | 'compare' | 'custom' | 'pattern' | 'email' | 'range';
|
|
7
7
|
/**
|
|
8
|
-
* The message shown when a rule fails and the caller gave none.
|
|
8
|
+
* The English message shown when a rule fails and the caller gave none. The components resolve it
|
|
9
|
+
* through `NxeMessageService` (`validation.rule.*`), which starts as these same strings and
|
|
10
|
+
* follows the active language; this table stays for code that reads it directly.
|
|
9
11
|
*
|
|
10
12
|
* These are DevExtreme's own defaults, verbatim from its `validation-*` message keys. Without
|
|
11
13
|
* them a rule with no `message` blocks its group and displays nothing at all, because every
|
|
@@ -37,8 +39,11 @@ interface NxeRuleSpec {
|
|
|
37
39
|
}
|
|
38
40
|
/** DevExtreme RequiredRule semantics: null/undefined/''/false are "not specified". */
|
|
39
41
|
declare function nxeIsEmptyValue(value: unknown): boolean;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The message for a rule with none of its own: the active language's when a message service is
|
|
44
|
+
* given, English otherwise.
|
|
45
|
+
*/
|
|
46
|
+
declare function nxeDefaultMessage(type: NxeValidationRuleType, messages?: NxeMessageService): string;
|
|
42
47
|
/** Whether `value` satisfies `spec`. The single evaluator behind both rule forms. */
|
|
43
48
|
declare function nxeEvaluateRule(spec: NxeRuleSpec, value: unknown, rule?: NxeValidationRuleComponent): boolean;
|
|
44
49
|
/**
|
|
@@ -49,19 +54,20 @@ declare function nxeEvaluateRule(spec: NxeRuleSpec, value: unknown, rule?: NxeVa
|
|
|
49
54
|
* `type` input covers 100% of usage.
|
|
50
55
|
*/
|
|
51
56
|
declare class NxeValidationRuleComponent {
|
|
57
|
+
private readonly messages;
|
|
52
58
|
readonly type: _angular_core.InputSignal<NxeValidationRuleType>;
|
|
53
59
|
readonly message: _angular_core.InputSignal<string>;
|
|
54
60
|
/** `compare` rule: returns the value to compare against. Mirrors `comparisonTarget`. */
|
|
55
|
-
readonly comparisonTarget: _angular_core.InputSignal<() => unknown>;
|
|
61
|
+
readonly comparisonTarget: _angular_core.InputSignal<(() => unknown) | undefined>;
|
|
56
62
|
/** `compare` rule comparison operator (default `==`). */
|
|
57
63
|
readonly comparisonType: _angular_core.InputSignal<"==" | "===" | "!=" | "!==" | ">" | "<" | ">=" | "<=">;
|
|
58
64
|
/** `custom` rule: returns true when valid. Mirrors `validationCallback`. */
|
|
59
|
-
readonly validationCallback: _angular_core.InputSignal<(data: NxeCustomRuleData) => boolean>;
|
|
65
|
+
readonly validationCallback: _angular_core.InputSignal<((data: NxeCustomRuleData) => boolean) | undefined>;
|
|
60
66
|
/** `pattern` rule. */
|
|
61
|
-
readonly pattern: _angular_core.InputSignal<string | RegExp>;
|
|
67
|
+
readonly pattern: _angular_core.InputSignal<string | RegExp | undefined>;
|
|
62
68
|
/** `range` rule bounds (DevExtreme RangeRule: empty values pass, bounds are inclusive). */
|
|
63
|
-
readonly min: _angular_core.InputSignal<number>;
|
|
64
|
-
readonly max: _angular_core.InputSignal<number>;
|
|
69
|
+
readonly min: _angular_core.InputSignal<number | undefined>;
|
|
70
|
+
readonly max: _angular_core.InputSignal<number | undefined>;
|
|
65
71
|
/**
|
|
66
72
|
* The message to show when this rule fails: the caller's, or DevExtreme's default for the
|
|
67
73
|
* rule type. Whitespace counts as absent — a message of spaces is still an empty bubble.
|
|
@@ -90,15 +96,16 @@ declare class NxeValidationRuleComponent {
|
|
|
90
96
|
declare class NxeValidatorComponent {
|
|
91
97
|
private readonly target;
|
|
92
98
|
private readonly registry;
|
|
99
|
+
private readonly messages;
|
|
93
100
|
private readonly groupScope;
|
|
94
101
|
readonly rules: _angular_core.Signal<readonly NxeValidationRuleComponent[]>;
|
|
95
102
|
/**
|
|
96
103
|
* dx `validationRules` — rules as data instead of projected children. Both forms combine;
|
|
97
104
|
* projected children come first, matching declaration order.
|
|
98
105
|
*/
|
|
99
|
-
readonly validationRules: _angular_core.InputSignal<readonly NxeRuleSpec[]>;
|
|
106
|
+
readonly validationRules: _angular_core.InputSignal<readonly NxeRuleSpec[] | undefined>;
|
|
100
107
|
/** Explicit group; otherwise inherited from the wrapped editor's `validationGroup`. */
|
|
101
|
-
readonly validationGroupInput: _angular_core.InputSignal<string>;
|
|
108
|
+
readonly validationGroupInput: _angular_core.InputSignal<string | undefined>;
|
|
102
109
|
/** dx `onValidated`, fired on every validation, valid or not. */
|
|
103
110
|
readonly onValidated: _angular_core.OutputEmitterRef<NxeValidatedEvent>;
|
|
104
111
|
private readonly group;
|
|
@@ -114,6 +121,8 @@ declare class NxeValidatorComponent {
|
|
|
114
121
|
/** Projected children plus `[validationRules]`, as one evaluable list. */
|
|
115
122
|
private readonly allRules;
|
|
116
123
|
constructor();
|
|
124
|
+
/** Re-word the broken rules after a language switch, without validating again or emitting. */
|
|
125
|
+
private refreshMessages;
|
|
117
126
|
/**
|
|
118
127
|
* Run every rule against the editor's current value.
|
|
119
128
|
*
|
package/types/nexterajs-ui.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export * from '@nexterajs/ui/animations';
|
|
2
|
+
export * from '@nexterajs/ui/charts';
|
|
2
3
|
export * from '@nexterajs/ui/core';
|
|
4
|
+
export * from '@nexterajs/ui/display';
|
|
3
5
|
export * from '@nexterajs/ui/dropdowns';
|
|
4
6
|
export * from '@nexterajs/ui/excel';
|
|
5
7
|
export * from '@nexterajs/ui/file-uploader';
|
|
6
8
|
export * from '@nexterajs/ui/forms';
|
|
7
9
|
export * from '@nexterajs/ui/grid';
|
|
8
10
|
export * from '@nexterajs/ui/intl';
|
|
11
|
+
export * from '@nexterajs/ui/navigation';
|
|
9
12
|
export * from '@nexterajs/ui/notify';
|
|
13
|
+
export * from '@nexterajs/ui/overlay';
|
|
10
14
|
export * from '@nexterajs/ui/pivot';
|
|
15
|
+
export * from '@nexterajs/ui/shell';
|
|
11
16
|
export * from '@nexterajs/ui/styling';
|
|
12
17
|
export * from '@nexterajs/ui/tree-view';
|
|
13
18
|
export * from '@nexterajs/ui/validation';
|