@bootkit/ng0 0.0.0-alpha.15 → 0.0.0-alpha.17
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/common/index.d.ts +2 -2
- package/components/table/index.d.ts +23 -17
- package/data/index.d.ts +5 -44
- package/fesm2022/bootkit-ng0-components-form-field.mjs +2 -2
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +63 -36
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-data.mjs +71 -101
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-form.mjs +210 -140
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization-locales.mjs +13 -0
- package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/form/index.d.ts +53 -37
- package/localization/index.d.ts +5 -0
- package/package.json +15 -15
|
@@ -1,145 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Directive, input,
|
|
3
|
-
import { NG_VALIDATORS,
|
|
2
|
+
import { Input, Directive, input, forwardRef, HostListener, numberAttribute, NgModule } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
4
4
|
import { formatNumber } from '@angular/common';
|
|
5
5
|
|
|
6
|
-
function equalWithValidator(targetValue, inequalityMessage) {
|
|
7
|
-
return (control) => {
|
|
8
|
-
const isValid = control.value === targetValue;
|
|
9
|
-
return isValid ? null :
|
|
10
|
-
{
|
|
11
|
-
equalWith: {
|
|
12
|
-
value: control.value,
|
|
13
|
-
message: inequalityMessage
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
class EqualWithValidatorDirective {
|
|
20
|
-
targetValue;
|
|
21
|
-
inequalityMessage;
|
|
22
|
-
constructor() {
|
|
23
|
-
}
|
|
24
|
-
validate(control) {
|
|
25
|
-
return equalWithValidator(this.targetValue, this.inequalityMessage)(control);
|
|
26
|
-
}
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
28
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: EqualWithValidatorDirective, isStandalone: true, selector: "[ng0EqualWith]", inputs: { targetValue: ["ng0EqualWith", "targetValue"], inequalityMessage: "inequalityMessage" }, providers: [
|
|
29
|
-
{ provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }
|
|
30
|
-
], exportAs: ["ng0EqualWith"], ngImport: i0 });
|
|
31
|
-
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, decorators: [{
|
|
33
|
-
type: Directive,
|
|
34
|
-
args: [{
|
|
35
|
-
selector: '[ng0EqualWith]',
|
|
36
|
-
exportAs: 'ng0EqualWith',
|
|
37
|
-
standalone: true,
|
|
38
|
-
providers: [
|
|
39
|
-
{ provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }
|
|
40
|
-
]
|
|
41
|
-
}]
|
|
42
|
-
}], ctorParameters: () => [], propDecorators: { targetValue: [{
|
|
43
|
-
type: Input,
|
|
44
|
-
args: ['ng0EqualWith']
|
|
45
|
-
}], inequalityMessage: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}] } });
|
|
48
|
-
|
|
49
|
-
const urlRegEx = new RegExp('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?');
|
|
50
|
-
function urlValidator() {
|
|
51
|
-
return (control) => {
|
|
52
|
-
const value = control.value;
|
|
53
|
-
if (!value || urlRegEx.test(value)) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return {
|
|
58
|
-
'url': {
|
|
59
|
-
value
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
class UrlValidatorDirective {
|
|
67
|
-
/** Directive is enabled or disabled */
|
|
68
|
-
iscUrl = true;
|
|
69
|
-
validate(control) {
|
|
70
|
-
return urlValidator()(control);
|
|
71
|
-
}
|
|
72
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
73
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: UrlValidatorDirective, isStandalone: true, selector: "input[ng0Url]", inputs: { iscUrl: "iscUrl" }, providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }], exportAs: ["ng0Url"], ngImport: i0 });
|
|
74
|
-
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, decorators: [{
|
|
76
|
-
type: Directive,
|
|
77
|
-
args: [{
|
|
78
|
-
selector: 'input[ng0Url]',
|
|
79
|
-
exportAs: 'ng0Url',
|
|
80
|
-
standalone: true,
|
|
81
|
-
providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }]
|
|
82
|
-
}]
|
|
83
|
-
}], propDecorators: { iscUrl: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}] } });
|
|
86
|
-
|
|
87
|
-
class CustomValidatorDirective {
|
|
88
|
-
validator = input.required({ alias: 'ng0CustomValidator' });
|
|
89
|
-
constructor() { }
|
|
90
|
-
validate(control) {
|
|
91
|
-
return this.validator()(control);
|
|
92
|
-
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
94
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
95
|
-
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
96
|
-
], exportAs: ["ng0CustomValidator"], ngImport: i0 });
|
|
97
|
-
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, decorators: [{
|
|
99
|
-
type: Directive,
|
|
100
|
-
args: [{
|
|
101
|
-
selector: '[ng0CustomValidator]',
|
|
102
|
-
exportAs: 'ng0CustomValidator',
|
|
103
|
-
standalone: true,
|
|
104
|
-
providers: [
|
|
105
|
-
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
106
|
-
]
|
|
107
|
-
}]
|
|
108
|
-
}], ctorParameters: () => [] });
|
|
109
|
-
|
|
110
|
-
const items = [
|
|
111
|
-
// ErrorDirective,
|
|
112
|
-
// FirstErrorDirective,
|
|
113
|
-
// Validators
|
|
114
|
-
EqualWithValidatorDirective,
|
|
115
|
-
UrlValidatorDirective,
|
|
116
|
-
CustomValidatorDirective,
|
|
117
|
-
];
|
|
118
|
-
class ValidationModule {
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
120
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: ValidationModule, imports: [
|
|
121
|
-
// ErrorDirective,
|
|
122
|
-
// FirstErrorDirective,
|
|
123
|
-
// Validators
|
|
124
|
-
EqualWithValidatorDirective,
|
|
125
|
-
UrlValidatorDirective,
|
|
126
|
-
CustomValidatorDirective], exports: [
|
|
127
|
-
// ErrorDirective,
|
|
128
|
-
// FirstErrorDirective,
|
|
129
|
-
// Validators
|
|
130
|
-
EqualWithValidatorDirective,
|
|
131
|
-
UrlValidatorDirective,
|
|
132
|
-
CustomValidatorDirective] });
|
|
133
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ValidationModule });
|
|
134
|
-
}
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ValidationModule, decorators: [{
|
|
136
|
-
type: NgModule,
|
|
137
|
-
args: [{
|
|
138
|
-
imports: items,
|
|
139
|
-
exports: items,
|
|
140
|
-
}]
|
|
141
|
-
}] });
|
|
142
|
-
|
|
143
6
|
class FocusDirective {
|
|
144
7
|
elementRef;
|
|
145
8
|
/**
|
|
@@ -412,9 +275,216 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
412
275
|
args: ['paste', ['$event']]
|
|
413
276
|
}] } });
|
|
414
277
|
|
|
278
|
+
function equalWithValidator(targetValue, inequalityMessage) {
|
|
279
|
+
return (control) => {
|
|
280
|
+
const isValid = control.value === targetValue;
|
|
281
|
+
return isValid ? null :
|
|
282
|
+
{
|
|
283
|
+
equalWith: {
|
|
284
|
+
value: control.value,
|
|
285
|
+
message: inequalityMessage
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
class EqualWithValidatorDirective {
|
|
292
|
+
targetValue;
|
|
293
|
+
inequalityMessage;
|
|
294
|
+
constructor() {
|
|
295
|
+
}
|
|
296
|
+
validate(control) {
|
|
297
|
+
return equalWithValidator(this.targetValue, this.inequalityMessage)(control);
|
|
298
|
+
}
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
300
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: EqualWithValidatorDirective, isStandalone: true, selector: "[ng0EqualWith]", inputs: { targetValue: ["ng0EqualWith", "targetValue"], inequalityMessage: "inequalityMessage" }, providers: [
|
|
301
|
+
{ provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }
|
|
302
|
+
], exportAs: ["ng0EqualWith"], ngImport: i0 });
|
|
303
|
+
}
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, decorators: [{
|
|
305
|
+
type: Directive,
|
|
306
|
+
args: [{
|
|
307
|
+
selector: '[ng0EqualWith]',
|
|
308
|
+
exportAs: 'ng0EqualWith',
|
|
309
|
+
standalone: true,
|
|
310
|
+
providers: [
|
|
311
|
+
{ provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }
|
|
312
|
+
]
|
|
313
|
+
}]
|
|
314
|
+
}], ctorParameters: () => [], propDecorators: { targetValue: [{
|
|
315
|
+
type: Input,
|
|
316
|
+
args: ['ng0EqualWith']
|
|
317
|
+
}], inequalityMessage: [{
|
|
318
|
+
type: Input
|
|
319
|
+
}] } });
|
|
320
|
+
|
|
321
|
+
const urlRegEx = new RegExp('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?');
|
|
322
|
+
function urlValidator() {
|
|
323
|
+
return (control) => {
|
|
324
|
+
const value = control.value;
|
|
325
|
+
if (!value || urlRegEx.test(value)) {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
return {
|
|
330
|
+
'url': {
|
|
331
|
+
value
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
class UrlValidatorDirective {
|
|
339
|
+
/** Directive is enabled or disabled */
|
|
340
|
+
iscUrl = true;
|
|
341
|
+
validate(control) {
|
|
342
|
+
return urlValidator()(control);
|
|
343
|
+
}
|
|
344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
345
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: UrlValidatorDirective, isStandalone: true, selector: "input[ng0Url]", inputs: { iscUrl: "iscUrl" }, providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }], exportAs: ["ng0Url"], ngImport: i0 });
|
|
346
|
+
}
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, decorators: [{
|
|
348
|
+
type: Directive,
|
|
349
|
+
args: [{
|
|
350
|
+
selector: 'input[ng0Url]',
|
|
351
|
+
exportAs: 'ng0Url',
|
|
352
|
+
standalone: true,
|
|
353
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }]
|
|
354
|
+
}]
|
|
355
|
+
}], propDecorators: { iscUrl: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}] } });
|
|
358
|
+
|
|
359
|
+
class CustomValidatorDirective {
|
|
360
|
+
validator = input.required({ alias: 'ng0CustomValidator' });
|
|
361
|
+
constructor() { }
|
|
362
|
+
validate(control) {
|
|
363
|
+
return this.validator()(control);
|
|
364
|
+
}
|
|
365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
366
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
367
|
+
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
368
|
+
], exportAs: ["ng0CustomValidator"], ngImport: i0 });
|
|
369
|
+
}
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, decorators: [{
|
|
371
|
+
type: Directive,
|
|
372
|
+
args: [{
|
|
373
|
+
selector: '[ng0CustomValidator]',
|
|
374
|
+
exportAs: 'ng0CustomValidator',
|
|
375
|
+
standalone: true,
|
|
376
|
+
providers: [
|
|
377
|
+
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
378
|
+
]
|
|
379
|
+
}]
|
|
380
|
+
}], ctorParameters: () => [] });
|
|
381
|
+
|
|
382
|
+
/** Min validator */
|
|
383
|
+
class MinValidatorDirective {
|
|
384
|
+
min = input.required({
|
|
385
|
+
transform: numberAttribute,
|
|
386
|
+
});
|
|
387
|
+
validate(control) {
|
|
388
|
+
return Validators.min(this.min())(control);
|
|
389
|
+
}
|
|
390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MinValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
391
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: MinValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][min]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
|
|
392
|
+
provide: NG_VALIDATORS,
|
|
393
|
+
useExisting: MinValidatorDirective,
|
|
394
|
+
multi: true
|
|
395
|
+
}], exportAs: ["ng0Min"], ngImport: i0 });
|
|
396
|
+
}
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MinValidatorDirective, decorators: [{
|
|
398
|
+
type: Directive,
|
|
399
|
+
args: [{
|
|
400
|
+
selector: 'input[type=text][ng0Number][min]',
|
|
401
|
+
exportAs: 'ng0Min',
|
|
402
|
+
standalone: true,
|
|
403
|
+
providers: [{
|
|
404
|
+
provide: NG_VALIDATORS,
|
|
405
|
+
useExisting: MinValidatorDirective,
|
|
406
|
+
multi: true
|
|
407
|
+
}]
|
|
408
|
+
}]
|
|
409
|
+
}] });
|
|
410
|
+
|
|
411
|
+
/** Max validator */
|
|
412
|
+
class MaxValidatorDirective {
|
|
413
|
+
max = input.required({
|
|
414
|
+
transform: numberAttribute,
|
|
415
|
+
});
|
|
416
|
+
validate(control) {
|
|
417
|
+
return Validators.max(this.max())(control);
|
|
418
|
+
}
|
|
419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MaxValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
420
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: MaxValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][max]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
|
|
421
|
+
provide: NG_VALIDATORS,
|
|
422
|
+
useExisting: MaxValidatorDirective,
|
|
423
|
+
multi: true
|
|
424
|
+
}], exportAs: ["ng0Max"], ngImport: i0 });
|
|
425
|
+
}
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MaxValidatorDirective, decorators: [{
|
|
427
|
+
type: Directive,
|
|
428
|
+
args: [{
|
|
429
|
+
selector: 'input[type=text][ng0Number][max]',
|
|
430
|
+
exportAs: 'ng0Max',
|
|
431
|
+
standalone: true,
|
|
432
|
+
providers: [{
|
|
433
|
+
provide: NG_VALIDATORS,
|
|
434
|
+
useExisting: MaxValidatorDirective,
|
|
435
|
+
multi: true
|
|
436
|
+
}]
|
|
437
|
+
}]
|
|
438
|
+
}] });
|
|
439
|
+
|
|
440
|
+
const items = [
|
|
441
|
+
// ErrorDirective,
|
|
442
|
+
// FirstErrorDirective,
|
|
443
|
+
NumberDirective,
|
|
444
|
+
// Validators
|
|
445
|
+
MinValidatorDirective,
|
|
446
|
+
MaxValidatorDirective,
|
|
447
|
+
EqualWithValidatorDirective,
|
|
448
|
+
UrlValidatorDirective,
|
|
449
|
+
CustomValidatorDirective,
|
|
450
|
+
];
|
|
451
|
+
class FormModule {
|
|
452
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
453
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: FormModule, imports: [
|
|
454
|
+
// ErrorDirective,
|
|
455
|
+
// FirstErrorDirective,
|
|
456
|
+
NumberDirective,
|
|
457
|
+
// Validators
|
|
458
|
+
MinValidatorDirective,
|
|
459
|
+
MaxValidatorDirective,
|
|
460
|
+
EqualWithValidatorDirective,
|
|
461
|
+
UrlValidatorDirective,
|
|
462
|
+
CustomValidatorDirective], exports: [
|
|
463
|
+
// ErrorDirective,
|
|
464
|
+
// FirstErrorDirective,
|
|
465
|
+
NumberDirective,
|
|
466
|
+
// Validators
|
|
467
|
+
MinValidatorDirective,
|
|
468
|
+
MaxValidatorDirective,
|
|
469
|
+
EqualWithValidatorDirective,
|
|
470
|
+
UrlValidatorDirective,
|
|
471
|
+
CustomValidatorDirective] });
|
|
472
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule });
|
|
473
|
+
}
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule, decorators: [{
|
|
475
|
+
type: NgModule,
|
|
476
|
+
args: [{
|
|
477
|
+
imports: items,
|
|
478
|
+
exports: items,
|
|
479
|
+
}]
|
|
480
|
+
}] });
|
|
481
|
+
|
|
482
|
+
// export * from './validation/error.directive';
|
|
483
|
+
// export * from './validation/first-error.directive';
|
|
484
|
+
|
|
415
485
|
/**
|
|
416
486
|
* Generated bundle index. Do not edit.
|
|
417
487
|
*/
|
|
418
488
|
|
|
419
|
-
export { CustomValidatorDirective, EqualWithValidatorDirective, FocusDirective, NumberDirective, UrlValidatorDirective,
|
|
489
|
+
export { CustomValidatorDirective, EqualWithValidatorDirective, FocusDirective, FormModule, MaxValidatorDirective, MinValidatorDirective, NumberDirective, UrlValidatorDirective, equalWithValidator };
|
|
420
490
|
//# sourceMappingURL=bootkit-ng0-form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-form.mjs","sources":["../../../projects/ng0/form/validation/validators/equal-with/equal-with-validator.ts","../../../projects/ng0/form/validation/validators/equal-with/equal-with.directive.ts","../../../projects/ng0/form/validation/validators/url/url-validator.ts","../../../projects/ng0/form/validation/validators/url/url-validator.directive.ts","../../../projects/ng0/form/validation/validators/custom/custom-validator.directive.ts","../../../projects/ng0/form/validation/validation.module.ts","../../../projects/ng0/form/focus.directive.ts","../../../projects/ng0/form/number.directive.ts","../../../projects/ng0/form/bootkit-ng0-form.ts"],"sourcesContent":["import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport function equalWithValidator(targetValue?: string, inequalityMessage?: string): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const isValid = control.value === targetValue;\n\n return isValid ? null :\n {\n equalWith: {\n value: control.value,\n message: inequalityMessage\n }\n };\n };\n}\n","import { Directive, Input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\nimport { equalWithValidator } from './equal-with-validator';\n\n@Directive({\n selector: '[ng0EqualWith]',\n exportAs: 'ng0EqualWith',\n standalone: true,\n providers: [\n { provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }\n ]\n})\nexport class EqualWithValidatorDirective implements Validator {\n @Input('ng0EqualWith') targetValue?: string;\n @Input() inequalityMessage?: string;\n\n constructor() {\n }\n\n validate(control: AbstractControl): { [key: string]: any } | null {\n return equalWithValidator(this.targetValue, this.inequalityMessage)(control);\n }\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\nconst urlRegEx = new RegExp('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?');\n\nexport function urlValidator(): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const value = (control.value as string);\n if (!value || urlRegEx.test(value)) {\n return null;\n } else {\n return {\n 'url': {\n value\n }\n };\n }\n };\n}","import { Directive, Input } from '@angular/core';\nimport { FormControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { urlValidator } from './url-validator';\n\n@Directive({\n selector: 'input[ng0Url]',\n exportAs: 'ng0Url',\n standalone: true,\n providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }]\n})\nexport class UrlValidatorDirective implements Validator {\n /** Directive is enabled or disabled */\n @Input() iscUrl?: boolean | string = true;\n\n validate(control: FormControl): ValidationErrors | null {\n return urlValidator()(control);\n }\n}\n","import { Directive, input, Input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\n\n@Directive({\n selector: '[ng0CustomValidator]',\n exportAs: 'ng0CustomValidator',\n standalone: true,\n providers: [\n { provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }\n ]\n})\nexport class CustomValidatorDirective implements Validator {\n validator = input.required<(value: any) => ValidationErrors | null>({alias: 'ng0CustomValidator'});\n\n constructor() { }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.validator()(control);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EqualWithValidatorDirective } from './validators/equal-with/equal-with.directive';\nimport { UrlValidatorDirective } from './validators/url/url-validator.directive';\nimport { CustomValidatorDirective } from './validators/custom/custom-validator.directive';\n\nconst items = [\n // ErrorDirective,\n // FirstErrorDirective,\n\n // Validators\n EqualWithValidatorDirective,\n UrlValidatorDirective,\n CustomValidatorDirective,\n];\n\n@NgModule({\n imports: items,\n exports: items,\n})\nexport class ValidationModule { }\n","import { Directive, ElementRef, Input, OnChanges, SimpleChanges, OnInit } from '@angular/core';\n\n@Directive({\n selector: '[ng0Focus]',\n exportAs: 'ng0Focus',\n standalone: true\n})\nexport class FocusDirective implements OnInit, OnChanges {\n /** \n * \n */\n @Input() focusOnLoad = true;\n @Input() focusWhen?: boolean;\n private focused = false;\n\n constructor(private elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n if (this.focusOnLoad) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['focusWhen']) {\n if (this.focusWhen) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n }\n}\n","import { Directive, HostListener, forwardRef, ElementRef, Renderer2, input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { formatNumber } from '@angular/common';\n\nconst addThousandsSeparator = (str: string) => str.replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\nconst isValidNumber = (str: string) => str.trim() !== '' && !isNaN(Number(str));\nconst removeChar = (str: string, charToRemove: string) => str.split(charToRemove).join('');\n\nconst Keys = {\n backspace: 'Backspace',\n tab: 'Tab',\n arrowLeft: 'ArrowLeft',\n arrowRight: 'ArrowRight',\n delete: 'Delete',\n home: 'Home',\n end: 'End'\n}\n\n@Directive({\n selector: '[ng0Number]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberDirective),\n multi: true\n }\n ]\n})\nexport class NumberDirective implements ControlValueAccessor {\n /** */\n minFractionDigits = input<number | undefined>(3);\n maxFractionDigits = input<number| undefined>(10);\n useGrouping = input<boolean>(false);\n numberType = input<'decimal' | 'integer'>('integer');\n private onChange = (_: any) => { };\n private onTouched = () => { };\n private decimalSeparator!: string;\n private thousandsSeparator: string = ',';\n private selectionStart: number = 0;\n private selectionEnd: number = 0;\n private isCursorInsideIntegerPart: boolean = false;\n private decimalSeparatorPosition = -1;\n private value?: number;\n private setProperty = (prop: string, value: any) => this.renderer.setProperty(this.el.nativeElement, prop, value);\n\n constructor(\n private el: ElementRef<HTMLInputElement>,\n private renderer: Renderer2,\n // private locale: Locale,\n ) { }\n\n ngOnInit() {\n // Use Intl.NumberFormat to find decimal separator for locale\n const formatted = formatNumber(1.1, 'en', '1.1-1');\n this.decimalSeparator = formatted.replace(/\\d/g, '') || '.';\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n\n writeValue(value: any): void {\n var inputValue: string;\n\n if (value === undefined || value === null) {\n inputValue = '';\n this.value = undefined;\n } else if (typeof value === 'number') {\n inputValue = this.formatNumber(value);\n this.value = value;\n }\n else if (typeof value === 'string') {\n const parsedValue = this.value = Number.parseFloat(value);\n inputValue = this.formatNumber(parsedValue);\n } else {\n console.error('NumberDirective: Unsupported value type', value);\n inputValue = 'Invalid';\n }\n\n this.setProperty('value', inputValue);\n }\n\n @HostListener('keydown', ['$event'])\n private onKeyDown(event: KeyboardEvent) {\n this.updateCursorInfo();\n\n if (!this.isKeyAllowed(event.key)) {\n event.preventDefault();\n return;\n }\n\n const key = event.key;\n\n if (key == Keys.backspace) {\n if (this.selectionStart > 1 && (this.selectionStart === this.selectionEnd)) {\n let value = this.el.nativeElement.value;\n let beforeSelection = value.charAt(this.selectionStart - 1);\n if (beforeSelection === ',') {\n // If the character before the cursor is a comma, we need to skip it\n this.setProperty('selectionStart', this.selectionStart - 2);\n }\n }\n }\n }\n\n @HostListener('input', ['$event.target.value'])\n private onInput(s: string) {\n if (s === '') {\n this.value = undefined;\n this.onChange(undefined);\n return;\n }\n\n this.updateCursorInfo();\n\n if (this.isCursorInsideIntegerPart) {\n this.formatIntegerPart(s);\n }\n\n var number = Number(removeChar(this.el.nativeElement.value, this.thousandsSeparator));\n this.value = isNaN(number) ? undefined : number;\n this.onChange(this.value);\n }\n\n private formatIntegerPart(value: string) {\n // Format the input value\n const integerPart = value.split(this.decimalSeparator)[0];\n const decimalPart = value.split(this.decimalSeparator)[1];\n\n if (integerPart.length <= 3) {\n return;\n }\n\n let normalizedIntegerPart = removeChar(integerPart, this.thousandsSeparator); // Remove commas\n\n let formattedValue = addThousandsSeparator(normalizedIntegerPart);\n if (decimalPart !== undefined) {\n formattedValue += this.decimalSeparator + decimalPart;\n }\n\n this.setProperty('value', formattedValue);\n let newSelectionStart: number;\n\n // fix the cursor position after formatting\n if (value.length == 1) {\n newSelectionStart = 1;\n } else {\n const newValueLength = formattedValue.length;\n const cursorJump = newValueLength - value.length;\n newSelectionStart = Math.max(0, this.selectionStart + cursorJump);\n }\n\n this.setProperty('selectionStart', newSelectionStart);\n this.setProperty('selectionEnd', newSelectionStart);\n\n // return formattedValue;\n }\n\n @HostListener('blur')\n private onBlur() {\n if (this.value !== undefined) {\n let formattedValue = this.formatNumber(this.value);\n this.setProperty('value', formattedValue);\n }\n\n this.onTouched();\n }\n\n @HostListener('paste', ['$event'])\n private onPaste(event: ClipboardEvent) {\n // event.\n // value = value.trim();\n }\n\n private updateCursorInfo() {\n let value = this.el.nativeElement.value;\n this.selectionStart = this.el.nativeElement.selectionStart || 0;\n this.selectionEnd = this.el.nativeElement.selectionEnd || 0;\n\n this.decimalSeparatorPosition = value.indexOf(this.decimalSeparator);\n if (this.decimalSeparatorPosition > -1) {\n this.isCursorInsideIntegerPart = (this.selectionStart <= this.decimalSeparatorPosition);\n } else {\n this.isCursorInsideIntegerPart = true;\n }\n }\n\n private formatNumber(n: number): string {\n var isInteger = this.numberType() == 'integer';\n return new Intl.NumberFormat('en-US', {\n useGrouping: this.useGrouping(),\n minimumFractionDigits: isInteger ? 0 : this.minFractionDigits(),\n maximumFractionDigits: isInteger ? 0 : this.maxFractionDigits(),\n style: 'decimal',\n }).format(n);\n }\n\n private isKeyAllowed(key: string) {\n const allowedKeys = [Keys.backspace, Keys.tab, Keys.arrowLeft, Keys.arrowRight, Keys.delete, Keys.home, Keys.end];\n const input = this.el.nativeElement;\n const value = input.value;\n\n if (allowedKeys.includes(key)) {\n return true; // allow control/navigation keys\n }\n\n // Allow one leading minus\n if (key === '-') {\n return (input.selectionStart === 0 || input.selectionEnd === 0) && value.charAt(0) !== '-';\n }\n\n // Allow one dot for decimal\n if (key === this.decimalSeparator) {\n return (this.numberType() == 'decimal') &&\n (!value.includes(this.decimalSeparator)) &&\n (this.selectionStart == input.value.length);\n }\n\n // Allow numbers only\n if (/^\\d$/.test(key)) {\n if (this.isCursorInsideIntegerPart) {\n return true;\n } else {\n var decimalPart = value.split(this.decimalSeparator)[1];\n var maxFractionDigits = this.maxFractionDigits();\n if (maxFractionDigits != undefined && decimalPart.length < maxFractionDigits) {\n return true;\n } else {\n return this.selectionStart !== this.selectionEnd; // allow a new digit if a substring is selected\n }\n }\n }\n\n return false;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEgB,SAAA,kBAAkB,CAAC,WAAoB,EAAE,iBAA0B,EAAA;IAC7E,OAAO,CAAC,OAAwB,KAAmC;AAC7D,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,WAAW;AAE7C,QAAA,OAAO,OAAO,GAAG,IAAI;AACf,YAAA;AACM,gBAAA,SAAS,EAAE;oBACL,KAAK,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;gBAwB3B,OAAO,EAAA,CAAA;sBADd,YAAY;uBAAC,OAAO,EAAE,CAAC,qBAAqB,CAAC;gBAsDtC,MAAM,EAAA,CAAA;sBADb,YAAY;uBAAC,MAAM;gBAWZ,OAAO,EAAA,CAAA;sBADd,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;AChLnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-form.mjs","sources":["../../../projects/ng0/form/focus.directive.ts","../../../projects/ng0/form/number.directive.ts","../../../projects/ng0/form/validation/validators/equal-with/equal-with-validator.ts","../../../projects/ng0/form/validation/validators/equal-with/equal-with.directive.ts","../../../projects/ng0/form/validation/validators/url/url-validator.ts","../../../projects/ng0/form/validation/validators/url/url-validator.directive.ts","../../../projects/ng0/form/validation/validators/custom/custom-validator.directive.ts","../../../projects/ng0/form/validation/validators/min/min-validator.directive.ts","../../../projects/ng0/form/validation/validators/max/max-validator.directive.ts","../../../projects/ng0/form/form.module.ts","../../../projects/ng0/form/public-api.ts","../../../projects/ng0/form/bootkit-ng0-form.ts"],"sourcesContent":["import { Directive, ElementRef, Input, OnChanges, SimpleChanges, OnInit } from '@angular/core';\n\n@Directive({\n selector: '[ng0Focus]',\n exportAs: 'ng0Focus',\n standalone: true\n})\nexport class FocusDirective implements OnInit, OnChanges {\n /** \n * \n */\n @Input() focusOnLoad = true;\n @Input() focusWhen?: boolean;\n private focused = false;\n\n constructor(private elementRef: ElementRef) {\n }\n\n ngOnInit(): void {\n if (this.focusOnLoad) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['focusWhen']) {\n if (this.focusWhen) {\n setTimeout(() => {\n this.elementRef.nativeElement.focus();\n });\n }\n }\n }\n}\n","import { Directive, HostListener, forwardRef, ElementRef, Renderer2, input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { formatNumber } from '@angular/common';\n\nconst addThousandsSeparator = (str: string) => str.replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\nconst isValidNumber = (str: string) => str.trim() !== '' && !isNaN(Number(str));\nconst removeChar = (str: string, charToRemove: string) => str.split(charToRemove).join('');\n\nconst Keys = {\n backspace: 'Backspace',\n tab: 'Tab',\n arrowLeft: 'ArrowLeft',\n arrowRight: 'ArrowRight',\n delete: 'Delete',\n home: 'Home',\n end: 'End'\n}\n\n@Directive({\n selector: '[ng0Number]',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberDirective),\n multi: true\n }\n ]\n})\nexport class NumberDirective implements ControlValueAccessor {\n /** */\n minFractionDigits = input<number | undefined>(3);\n maxFractionDigits = input<number| undefined>(10);\n useGrouping = input<boolean>(false);\n numberType = input<'decimal' | 'integer'>('integer');\n private onChange = (_: any) => { };\n private onTouched = () => { };\n private decimalSeparator!: string;\n private thousandsSeparator: string = ',';\n private selectionStart: number = 0;\n private selectionEnd: number = 0;\n private isCursorInsideIntegerPart: boolean = false;\n private decimalSeparatorPosition = -1;\n private value?: number;\n private setProperty = (prop: string, value: any) => this.renderer.setProperty(this.el.nativeElement, prop, value);\n\n constructor(\n private el: ElementRef<HTMLInputElement>,\n private renderer: Renderer2,\n // private locale: Locale,\n ) { }\n\n ngOnInit() {\n // Use Intl.NumberFormat to find decimal separator for locale\n const formatted = formatNumber(1.1, 'en', '1.1-1');\n this.decimalSeparator = formatted.replace(/\\d/g, '') || '.';\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.setProperty('disabled', isDisabled);\n }\n\n writeValue(value: any): void {\n var inputValue: string;\n\n if (value === undefined || value === null) {\n inputValue = '';\n this.value = undefined;\n } else if (typeof value === 'number') {\n inputValue = this.formatNumber(value);\n this.value = value;\n }\n else if (typeof value === 'string') {\n const parsedValue = this.value = Number.parseFloat(value);\n inputValue = this.formatNumber(parsedValue);\n } else {\n console.error('NumberDirective: Unsupported value type', value);\n inputValue = 'Invalid';\n }\n\n this.setProperty('value', inputValue);\n }\n\n @HostListener('keydown', ['$event'])\n private onKeyDown(event: KeyboardEvent) {\n this.updateCursorInfo();\n\n if (!this.isKeyAllowed(event.key)) {\n event.preventDefault();\n return;\n }\n\n const key = event.key;\n\n if (key == Keys.backspace) {\n if (this.selectionStart > 1 && (this.selectionStart === this.selectionEnd)) {\n let value = this.el.nativeElement.value;\n let beforeSelection = value.charAt(this.selectionStart - 1);\n if (beforeSelection === ',') {\n // If the character before the cursor is a comma, we need to skip it\n this.setProperty('selectionStart', this.selectionStart - 2);\n }\n }\n }\n }\n\n @HostListener('input', ['$event.target.value'])\n private onInput(s: string) {\n if (s === '') {\n this.value = undefined;\n this.onChange(undefined);\n return;\n }\n\n this.updateCursorInfo();\n\n if (this.isCursorInsideIntegerPart) {\n this.formatIntegerPart(s);\n }\n\n var number = Number(removeChar(this.el.nativeElement.value, this.thousandsSeparator));\n this.value = isNaN(number) ? undefined : number;\n this.onChange(this.value);\n }\n\n private formatIntegerPart(value: string) {\n // Format the input value\n const integerPart = value.split(this.decimalSeparator)[0];\n const decimalPart = value.split(this.decimalSeparator)[1];\n\n if (integerPart.length <= 3) {\n return;\n }\n\n let normalizedIntegerPart = removeChar(integerPart, this.thousandsSeparator); // Remove commas\n\n let formattedValue = addThousandsSeparator(normalizedIntegerPart);\n if (decimalPart !== undefined) {\n formattedValue += this.decimalSeparator + decimalPart;\n }\n\n this.setProperty('value', formattedValue);\n let newSelectionStart: number;\n\n // fix the cursor position after formatting\n if (value.length == 1) {\n newSelectionStart = 1;\n } else {\n const newValueLength = formattedValue.length;\n const cursorJump = newValueLength - value.length;\n newSelectionStart = Math.max(0, this.selectionStart + cursorJump);\n }\n\n this.setProperty('selectionStart', newSelectionStart);\n this.setProperty('selectionEnd', newSelectionStart);\n\n // return formattedValue;\n }\n\n @HostListener('blur')\n private onBlur() {\n if (this.value !== undefined) {\n let formattedValue = this.formatNumber(this.value);\n this.setProperty('value', formattedValue);\n }\n\n this.onTouched();\n }\n\n @HostListener('paste', ['$event'])\n private onPaste(event: ClipboardEvent) {\n // event.\n // value = value.trim();\n }\n\n private updateCursorInfo() {\n let value = this.el.nativeElement.value;\n this.selectionStart = this.el.nativeElement.selectionStart || 0;\n this.selectionEnd = this.el.nativeElement.selectionEnd || 0;\n\n this.decimalSeparatorPosition = value.indexOf(this.decimalSeparator);\n if (this.decimalSeparatorPosition > -1) {\n this.isCursorInsideIntegerPart = (this.selectionStart <= this.decimalSeparatorPosition);\n } else {\n this.isCursorInsideIntegerPart = true;\n }\n }\n\n private formatNumber(n: number): string {\n var isInteger = this.numberType() == 'integer';\n return new Intl.NumberFormat('en-US', {\n useGrouping: this.useGrouping(),\n minimumFractionDigits: isInteger ? 0 : this.minFractionDigits(),\n maximumFractionDigits: isInteger ? 0 : this.maxFractionDigits(),\n style: 'decimal',\n }).format(n);\n }\n\n private isKeyAllowed(key: string) {\n const allowedKeys = [Keys.backspace, Keys.tab, Keys.arrowLeft, Keys.arrowRight, Keys.delete, Keys.home, Keys.end];\n const input = this.el.nativeElement;\n const value = input.value;\n\n if (allowedKeys.includes(key)) {\n return true; // allow control/navigation keys\n }\n\n // Allow one leading minus\n if (key === '-') {\n return (input.selectionStart === 0 || input.selectionEnd === 0) && value.charAt(0) !== '-';\n }\n\n // Allow one dot for decimal\n if (key === this.decimalSeparator) {\n return (this.numberType() == 'decimal') &&\n (!value.includes(this.decimalSeparator)) &&\n (this.selectionStart == input.value.length);\n }\n\n // Allow numbers only\n if (/^\\d$/.test(key)) {\n if (this.isCursorInsideIntegerPart) {\n return true;\n } else {\n var decimalPart = value.split(this.decimalSeparator)[1];\n var maxFractionDigits = this.maxFractionDigits();\n if (maxFractionDigits != undefined && decimalPart.length < maxFractionDigits) {\n return true;\n } else {\n return this.selectionStart !== this.selectionEnd; // allow a new digit if a substring is selected\n }\n }\n }\n\n return false;\n }\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport function equalWithValidator(targetValue?: string, inequalityMessage?: string): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const isValid = control.value === targetValue;\n\n return isValid ? null :\n {\n equalWith: {\n value: control.value,\n message: inequalityMessage\n }\n };\n };\n}\n","import { Directive, Input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\nimport { equalWithValidator } from './equal-with-validator';\n\n@Directive({\n selector: '[ng0EqualWith]',\n exportAs: 'ng0EqualWith',\n standalone: true,\n providers: [\n { provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }\n ]\n})\nexport class EqualWithValidatorDirective implements Validator {\n @Input('ng0EqualWith') targetValue?: string;\n @Input() inequalityMessage?: string;\n\n constructor() {\n }\n\n validate(control: AbstractControl): { [key: string]: any } | null {\n return equalWithValidator(this.targetValue, this.inequalityMessage)(control);\n }\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\nconst urlRegEx = new RegExp('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?');\n\nexport function urlValidator(): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n const value = (control.value as string);\n if (!value || urlRegEx.test(value)) {\n return null;\n } else {\n return {\n 'url': {\n value\n }\n };\n }\n };\n}","import { Directive, Input } from '@angular/core';\nimport { FormControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { urlValidator } from './url-validator';\n\n@Directive({\n selector: 'input[ng0Url]',\n exportAs: 'ng0Url',\n standalone: true,\n providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }]\n})\nexport class UrlValidatorDirective implements Validator {\n /** Directive is enabled or disabled */\n @Input() iscUrl?: boolean | string = true;\n\n validate(control: FormControl): ValidationErrors | null {\n return urlValidator()(control);\n }\n}\n","import { Directive, input, Input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\n\n@Directive({\n selector: '[ng0CustomValidator]',\n exportAs: 'ng0CustomValidator',\n standalone: true,\n providers: [\n { provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }\n ]\n})\nexport class CustomValidatorDirective implements Validator {\n validator = input.required<(value: any) => ValidationErrors | null>({alias: 'ng0CustomValidator'});\n\n constructor() { }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.validator()(control);\n }\n}\n","import { Directive, input, numberAttribute } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, Validators } from '@angular/forms';\n\n/** Min validator */\n@Directive({\n selector: 'input[type=text][ng0Number][min]',\n exportAs: 'ng0Min',\n standalone: true,\n providers: [{\n provide: NG_VALIDATORS,\n useExisting: MinValidatorDirective,\n multi: true\n }]\n})\nexport class MinValidatorDirective implements Validator {\n min = input.required<number, number | string | undefined | null>({\n transform: numberAttribute,\n });\n\n validate(control: AbstractControl): ValidationErrors | null {\n return Validators.min(this.min())(control);\n }\n}\n","import { Directive, input, numberAttribute } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, Validators } from '@angular/forms';\n\n/** Max validator */\n@Directive({\n selector: 'input[type=text][ng0Number][max]',\n exportAs: 'ng0Max',\n standalone: true,\n providers: [{\n provide: NG_VALIDATORS,\n useExisting: MaxValidatorDirective,\n multi: true\n }]\n})\nexport class MaxValidatorDirective implements Validator {\n max = input.required<number, number | string | undefined | null>({\n transform: numberAttribute,\n });\n\n validate(control: AbstractControl): ValidationErrors | null {\n return Validators.max(this.max())(control);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { EqualWithValidatorDirective } from './validation/validators/equal-with/equal-with.directive';\nimport { UrlValidatorDirective } from './validation/validators/url/url-validator.directive';\nimport { CustomValidatorDirective } from './validation/validators/custom/custom-validator.directive';\nimport { MinValidatorDirective } from './validation/validators/min/min-validator.directive';\nimport { MaxValidatorDirective } from './validation/validators/max/max-validator.directive';\nimport { NumberDirective } from './number.directive';\n\nconst items = [\n // ErrorDirective,\n // FirstErrorDirective,\n NumberDirective,\n\n // Validators\n MinValidatorDirective,\n MaxValidatorDirective,\n EqualWithValidatorDirective,\n UrlValidatorDirective,\n CustomValidatorDirective,\n];\n\n@NgModule({\n imports: items,\n exports: items,\n})\nexport class FormModule { }\n","\nexport * from './focus.directive';\nexport * from './number.directive';\nexport * from './form.module';\n\n// Validation\nexport * from './validation/validators/custom/custom-validator.directive';\nexport * from './validation/validators/equal-with/equal-with-validator';\nexport * from './validation/validators/equal-with/equal-with.directive';\nexport * from './validation/validators/url/url-validator.directive';\nexport * from './validation/validators/min/min-validator.directive';\nexport * from './validation/validators/max/max-validator.directive';\n// export * from './validation/error.directive';\n// export * from './validation/first-error.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,cAAc,CAAA;AAQL,IAAA,UAAA;AAPpB;;AAEG;IACM,WAAW,GAAG,IAAI;AAClB,IAAA,SAAS;IACV,OAAO,GAAG,KAAK;AAEvB,IAAA,WAAA,CAAoB,UAAsB,EAAA;QAAtB,IAAU,CAAA,UAAA,GAAV,UAAU;;IAG9B,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,UAAU,CAAC,MAAK;AACd,gBAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE;AACvC,aAAC,CAAC;;;AAIN,IAAA,WAAW,CAAC,OAAsB,EAAA;AAChC,QAAA,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;AACxB,YAAA,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,UAAU,CAAC,MAAK;AACd,oBAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE;AACvC,iBAAC,CAAC;;;;uGAxBG,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA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K,GAAG;;;IAGZ,eAAe;;IAGf,qBAAqB;IACrB,qBAAqB;IACrB,2BAA2B;IAC3B,qBAAqB;IACrB,wBAAwB;CACzB;MAMY,UAAU,CAAA;uGAAV,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAV,UAAU,EAAA,OAAA,EAAA;;;YAdrB,eAAe;;YAGf,qBAAqB;YACrB,qBAAqB;YACrB,2BAA2B;YAC3B,qBAAqB;YACrB,wBAAwB,CAAA,EAAA,OAAA,EAAA;;;YAPxB,eAAe;;YAGf,qBAAqB;YACrB,qBAAqB;YACrB,2BAA2B;YAC3B,qBAAqB;YACrB,wBAAwB,CAAA,EAAA,CAAA;wGAOb,UAAU,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA;;;ACZD;AACA;;ACbA;;AAEG;;;;"}
|
|
@@ -71,6 +71,19 @@ const FA_IR_LOCALE = new Locale({
|
|
|
71
71
|
noRecords: 'رکوردی وجود ندارد',
|
|
72
72
|
pagingInfo: (info) => `نمایش ${formatNumber(info.firstRecord)}-${formatNumber(info.lastRecord)} از ${formatNumber(info.totalRecords)} رکورد`
|
|
73
73
|
}
|
|
74
|
+
},
|
|
75
|
+
data: {
|
|
76
|
+
logicalOperators: {
|
|
77
|
+
contains: 'شامل',
|
|
78
|
+
startsWith: 'شروع',
|
|
79
|
+
endsWith: 'پایان',
|
|
80
|
+
eq: 'مساوی',
|
|
81
|
+
gt: 'بزرگتر',
|
|
82
|
+
gte: 'بزرگتر یا مساوی',
|
|
83
|
+
lt: 'کوچکتر',
|
|
84
|
+
lte: 'کوچکتر یا مساوی',
|
|
85
|
+
ne: 'مخالف',
|
|
86
|
+
}
|
|
74
87
|
}
|
|
75
88
|
});
|
|
76
89
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-localization-locales.mjs","sources":["../../../projects/ng0/localization/locales/en-us.ts","../../../projects/ng0/localization/locales/fa-ir.ts","../../../projects/ng0/localization/locales/bootkit-ng0-localization-locales.ts"],"sourcesContent":["import { Locale } from '@bootkit/ng0/localization';\n\nconst formatNumber = (n: number) => n.toLocaleString();\n\nexport const EN_US_LOCALE = new Locale({\n name: 'en-US',\n rtl: false,\n dictionary: {\n ok: 'Ok',\n cancel: 'Cancel',\n warning: 'Warning',\n areYouSure: 'Are you sure?',\n noRecords: 'No records.',\n first: 'First',\n last: 'Last',\n next: 'Next',\n previous: 'Previous',\n pageXofY: 'Page {0} of {1}',\n },\n form: {\n validation: {\n errors: {\n '*': (e) => 'Invalid',\n required: (e) => `Required`,\n min: (e) => `Minimum: ${formatNumber(e.min)}`,\n max: (e) => `Maximum: ${formatNumber(e.max)}`,\n minlength: (e) => `Minimum length: ${e.requiredLength}`,\n maxlength: (e) => `Maximum length: ${e.requiredLength}`,\n email: (e) => `Invalid email`,\n }\n }\n },\n components: {\n table: {\n noRecords: 'No records found.',\n pagingInfo: (info) => `Showingsdsd ${formatNumber(info.firstRecord)}-${formatNumber(info.lastRecord)} of ${formatNumber(info.totalRecords!)} records`\n }\n }\n});\n","import { Locale } from '@bootkit/ng0/localization';\n\nconst formatNumber = (n: number) => n.toLocaleString();\n\nexport const FA_IR_LOCALE = new Locale({\n name: 'fa-IR',\n rtl: true,\n dictionary: {\n ok: 'تایید',\n cancel: 'لغو',\n warning: 'هشدار',\n areYouSure: 'آیا مطمئن هستید?',\n noRecords: 'بدون رکورد',\n first: 'اولین',\n last: 'آخرین',\n next: 'بعدی',\n previous: 'قبلی',\n pageXofY: 'صفحه {0} از {1}',\n },\n form: {\n validation: {\n errors: {\n '*': (e) => 'نامعتبر',\n required: (e) => `الزامی`,\n min: (e) => `حداقل: ${formatNumber(e.min)}`,\n max: (e) => `حداکثر: ${formatNumber(e.max)}`,\n minlength: (e) => `حداقل ${e.requiredLength} کاراکتر`,\n maxlength: (e) => `حداکثر ${e.requiredLength} کاراکتر`,\n email: (e) => `ایمیل نامعتبر است`,\n }\n }\n },\n components: {\n table: {\n noRecords: 'رکوردی وجود ندارد',\n pagingInfo: (info) => `نمایش ${formatNumber(info.firstRecord)}-${formatNumber(info.lastRecord)} از ${formatNumber(info.totalRecords!)} رکورد`\n }\n }\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["formatNumber"],"mappings":";;AAEA,MAAMA,cAAY,GAAG,CAAC,CAAS,KAAK,CAAC,CAAC,cAAc,EAAE;AAEzC,MAAA,YAAY,GAAG,IAAI,MAAM,CAAC;AACnC,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,UAAU,EAAE;AACR,QAAA,EAAE,EAAE,IAAI;AACR,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,UAAU,EAAE,eAAe;AAC3B,QAAA,SAAS,EAAE,aAAa;AACxB,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,QAAQ,EAAE,iBAAiB;AAC9B,KAAA;AACD,IAAA,IAAI,EAAE;AACF,QAAA,UAAU,EAAE;AACR,YAAA,MAAM,EAAE;AACJ,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,SAAS;AACrB,gBAAA,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAU,QAAA,CAAA;AAC3B,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAY,SAAA,EAAAA,cAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;AAC7C,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAY,SAAA,EAAAA,cAAY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,CAAC,KAAK,SAAS;AACrB,gBAAA,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAQ,MAAA,CAAA;AACzB,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAU,OAAA,EAAA,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;AAC3C,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAW,QAAA,EAAA,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;gBAC5C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAS,MAAA,EAAA,CAAC,CAAC,cAAc,CAAU,QAAA,CAAA;gBACrD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAU,OAAA,EAAA,CAAC,CAAC,cAAc,CAAU,QAAA,CAAA;AACtD,gBAAA,KAAK,EAAE,CAAC,CAAC,KAAK,CAAmB,iBAAA,CAAA;AACpC;AACJ;AACJ,KAAA;AACD,IAAA,UAAU,EAAE;AACR,QAAA,KAAK,EAAE;AACH,YAAA,SAAS,EAAE,mBAAmB;YAC9B,UAAU,EAAE,CAAC,IAAI,KAAK,CAAA,MAAA,EAAS,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAI,CAAA,EAAA,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA,IAAA,EAAO,YAAY,CAAC,IAAI,CAAC,YAAa,CAAC,CAAQ,MAAA;AAChJ;AACJ;AACJ,CAAA;;
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-localization-locales.mjs","sources":["../../../projects/ng0/localization/locales/en-us.ts","../../../projects/ng0/localization/locales/fa-ir.ts","../../../projects/ng0/localization/locales/bootkit-ng0-localization-locales.ts"],"sourcesContent":["import { Locale } from '@bootkit/ng0/localization';\n\nconst formatNumber = (n: number) => n.toLocaleString();\n\nexport const EN_US_LOCALE = new Locale({\n name: 'en-US',\n rtl: false,\n dictionary: {\n ok: 'Ok',\n cancel: 'Cancel',\n warning: 'Warning',\n areYouSure: 'Are you sure?',\n noRecords: 'No records.',\n first: 'First',\n last: 'Last',\n next: 'Next',\n previous: 'Previous',\n pageXofY: 'Page {0} of {1}',\n },\n form: {\n validation: {\n errors: {\n '*': (e) => 'Invalid',\n required: (e) => `Required`,\n min: (e) => `Minimum: ${formatNumber(e.min)}`,\n max: (e) => `Maximum: ${formatNumber(e.max)}`,\n minlength: (e) => `Minimum length: ${e.requiredLength}`,\n maxlength: (e) => `Maximum length: ${e.requiredLength}`,\n email: (e) => `Invalid email`,\n }\n }\n },\n components: {\n table: {\n noRecords: 'No records found.',\n pagingInfo: (info) => `Showingsdsd ${formatNumber(info.firstRecord)}-${formatNumber(info.lastRecord)} of ${formatNumber(info.totalRecords!)} records`\n }\n }\n});\n","import { Locale } from '@bootkit/ng0/localization';\n\nconst formatNumber = (n: number) => n.toLocaleString();\n\nexport const FA_IR_LOCALE = new Locale({\n name: 'fa-IR',\n rtl: true,\n dictionary: {\n ok: 'تایید',\n cancel: 'لغو',\n warning: 'هشدار',\n areYouSure: 'آیا مطمئن هستید?',\n noRecords: 'بدون رکورد',\n first: 'اولین',\n last: 'آخرین',\n next: 'بعدی',\n previous: 'قبلی',\n pageXofY: 'صفحه {0} از {1}',\n },\n form: {\n validation: {\n errors: {\n '*': (e) => 'نامعتبر',\n required: (e) => `الزامی`,\n min: (e) => `حداقل: ${formatNumber(e.min)}`,\n max: (e) => `حداکثر: ${formatNumber(e.max)}`,\n minlength: (e) => `حداقل ${e.requiredLength} کاراکتر`,\n maxlength: (e) => `حداکثر ${e.requiredLength} کاراکتر`,\n email: (e) => `ایمیل نامعتبر است`,\n }\n }\n },\n components: {\n table: {\n noRecords: 'رکوردی وجود ندارد',\n pagingInfo: (info) => `نمایش ${formatNumber(info.firstRecord)}-${formatNumber(info.lastRecord)} از ${formatNumber(info.totalRecords!)} رکورد`\n }\n },\n data: {\n logicalOperators: {\n contains: 'شامل',\n startsWith: 'شروع',\n endsWith: 'پایان',\n eq: 'مساوی',\n gt: 'بزرگتر',\n gte: 'بزرگتر یا مساوی',\n lt: 'کوچکتر',\n lte: 'کوچکتر یا مساوی',\n ne: 'مخالف',\n \n }\n }\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["formatNumber"],"mappings":";;AAEA,MAAMA,cAAY,GAAG,CAAC,CAAS,KAAK,CAAC,CAAC,cAAc,EAAE;AAEzC,MAAA,YAAY,GAAG,IAAI,MAAM,CAAC;AACnC,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,UAAU,EAAE;AACR,QAAA,EAAE,EAAE,IAAI;AACR,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,UAAU,EAAE,eAAe;AAC3B,QAAA,SAAS,EAAE,aAAa;AACxB,QAAA,KAAK,EAAE,OAAO;AACd,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,QAAQ,EAAE,UAAU;AACpB,QAAA,QAAQ,EAAE,iBAAiB;AAC9B,KAAA;AACD,IAAA,IAAI,EAAE;AACF,QAAA,UAAU,EAAE;AACR,YAAA,MAAM,EAAE;AACJ,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,SAAS;AACrB,gBAAA,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAU,QAAA,CAAA;AAC3B,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAY,SAAA,EAAAA,cAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;AAC7C,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAY,SAAA,EAAAA,cAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAE,CAAA;gBAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAmB,gBAAA,EAAA,CAAC,CAAC,cAAc,CAAE,CAAA;gBACvD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAmB,gBAAA,EAAA,CAAC,CAAC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