@bootkit/ng0 0.0.0-alpha.49 → 0.0.0-alpha.50
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.
|
@@ -299,6 +299,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
299
299
|
args: ['paste', ['$event']]
|
|
300
300
|
}] } });
|
|
301
301
|
|
|
302
|
+
/**
|
|
303
|
+
* A ControlValueAccessor for file input elements. It supports both single and multiple file selection.
|
|
304
|
+
* It assigns the selected file(s) to the form control's value and handles disabled state.
|
|
305
|
+
* @see https://angular.dev/api/forms/ControlValueAccessor
|
|
306
|
+
*/
|
|
307
|
+
class FileValueAccessor {
|
|
308
|
+
_renderer = inject(Renderer2);
|
|
309
|
+
_elementRef = inject(ElementRef);
|
|
310
|
+
_changeFn;
|
|
311
|
+
_touchedFn;
|
|
312
|
+
writeValue(value) {
|
|
313
|
+
}
|
|
314
|
+
registerOnChange(fn) {
|
|
315
|
+
this._changeFn = fn;
|
|
316
|
+
}
|
|
317
|
+
registerOnTouched(fn) {
|
|
318
|
+
this._touchedFn = fn;
|
|
319
|
+
}
|
|
320
|
+
setDisabledState(isDisabled) {
|
|
321
|
+
this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
|
|
322
|
+
}
|
|
323
|
+
_onChange(e) {
|
|
324
|
+
const input = e.target;
|
|
325
|
+
let value;
|
|
326
|
+
if (input.files?.length) {
|
|
327
|
+
value = input.multiple ? input.files : input.files[0];
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
value = undefined;
|
|
331
|
+
}
|
|
332
|
+
this._changeFn(value);
|
|
333
|
+
}
|
|
334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
335
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.11", type: FileValueAccessor, isStandalone: true, selector: "input[type=file][ngModel][ng0File]", host: { listeners: { "blur": "_touchedFn()", "change": "_onChange($event)" } }, providers: [{
|
|
336
|
+
provide: NG_VALUE_ACCESSOR,
|
|
337
|
+
useExisting: forwardRef(() => FileValueAccessor),
|
|
338
|
+
multi: true,
|
|
339
|
+
}], ngImport: i0 });
|
|
340
|
+
}
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileValueAccessor, decorators: [{
|
|
342
|
+
type: Directive,
|
|
343
|
+
args: [{
|
|
344
|
+
selector: 'input[type=file][ngModel][ng0File]',
|
|
345
|
+
host: {
|
|
346
|
+
'(blur)': '_touchedFn()',
|
|
347
|
+
'(change)': '_onChange($event)',
|
|
348
|
+
},
|
|
349
|
+
providers: [{
|
|
350
|
+
provide: NG_VALUE_ACCESSOR,
|
|
351
|
+
useExisting: forwardRef(() => FileValueAccessor),
|
|
352
|
+
multi: true,
|
|
353
|
+
}],
|
|
354
|
+
}]
|
|
355
|
+
}] });
|
|
356
|
+
|
|
357
|
+
class CustomValidatorDirective {
|
|
358
|
+
validator = input.required(...(ngDevMode ? [{ debugName: "validator", alias: 'ng0CustomValidator' }] : [{ alias: 'ng0CustomValidator' }]));
|
|
359
|
+
constructor() { }
|
|
360
|
+
validate(control) {
|
|
361
|
+
return this.validator()(control);
|
|
362
|
+
}
|
|
363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
364
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
365
|
+
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
366
|
+
], exportAs: ["ng0CustomValidator"], ngImport: i0 });
|
|
367
|
+
}
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CustomValidatorDirective, decorators: [{
|
|
369
|
+
type: Directive,
|
|
370
|
+
args: [{
|
|
371
|
+
selector: '[ng0CustomValidator]',
|
|
372
|
+
exportAs: 'ng0CustomValidator',
|
|
373
|
+
standalone: true,
|
|
374
|
+
providers: [
|
|
375
|
+
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
376
|
+
]
|
|
377
|
+
}]
|
|
378
|
+
}], ctorParameters: () => [], propDecorators: { validator: [{ type: i0.Input, args: [{ isSignal: true, alias: "ng0CustomValidator", required: true }] }] } });
|
|
379
|
+
|
|
302
380
|
function equalWithValidator(targetValue, inequalityMessage) {
|
|
303
381
|
return (control) => {
|
|
304
382
|
const isValid = control.value === targetValue;
|
|
@@ -342,6 +420,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
342
420
|
type: Input
|
|
343
421
|
}] } });
|
|
344
422
|
|
|
423
|
+
function fileMinSizeValidator(size) {
|
|
424
|
+
if (size == null || size <= 0) {
|
|
425
|
+
throw new Error('Size must be a positive number');
|
|
426
|
+
}
|
|
427
|
+
return (control) => {
|
|
428
|
+
let value = control?.value;
|
|
429
|
+
if (value instanceof File) {
|
|
430
|
+
return value.size < size ? {
|
|
431
|
+
fileMinSize: {
|
|
432
|
+
file: value,
|
|
433
|
+
min: size,
|
|
434
|
+
multiple: false
|
|
435
|
+
}
|
|
436
|
+
} : null;
|
|
437
|
+
}
|
|
438
|
+
else if (value?.length > 0) {
|
|
439
|
+
const fileList = value;
|
|
440
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
441
|
+
if (fileList[i].size < size) {
|
|
442
|
+
return {
|
|
443
|
+
fileMinSize: {
|
|
444
|
+
file: fileList[i],
|
|
445
|
+
fileList: fileList,
|
|
446
|
+
min: size,
|
|
447
|
+
multiple: true
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
class FileMinSizeValidatorDirective {
|
|
461
|
+
/**
|
|
462
|
+
* Minimum file size in bytes.
|
|
463
|
+
*/
|
|
464
|
+
fileMinSize = input.required(...(ngDevMode ? [{ debugName: "fileMinSize", alias: 'ng0FileMinSize', transform: numberAttribute }] : [{ alias: 'ng0FileMinSize', transform: numberAttribute }]));
|
|
465
|
+
validate(control) {
|
|
466
|
+
return fileMinSizeValidator(this.fileMinSize())(control);
|
|
467
|
+
}
|
|
468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileMinSizeValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
469
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: FileMinSizeValidatorDirective, isStandalone: true, selector: "[ngModel][ng0File][ng0FileMinSize]", inputs: { fileMinSize: { classPropertyName: "fileMinSize", publicName: "ng0FileMinSize", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: NG_VALIDATORS, useExisting: FileMinSizeValidatorDirective, multi: true, }], exportAs: ["ng0FileMinSize"], ngImport: i0 });
|
|
470
|
+
}
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileMinSizeValidatorDirective, decorators: [{
|
|
472
|
+
type: Directive,
|
|
473
|
+
args: [{
|
|
474
|
+
selector: '[ngModel][ng0File][ng0FileMinSize]',
|
|
475
|
+
exportAs: 'ng0FileMinSize',
|
|
476
|
+
standalone: true,
|
|
477
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: FileMinSizeValidatorDirective, multi: true, }],
|
|
478
|
+
}]
|
|
479
|
+
}], propDecorators: { fileMinSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "ng0FileMinSize", required: true }] }] } });
|
|
480
|
+
|
|
481
|
+
function fileMaxSizeValidator(size) {
|
|
482
|
+
if (size == null || size <= 0) {
|
|
483
|
+
throw new Error('Size must be a positive number');
|
|
484
|
+
}
|
|
485
|
+
return (control) => {
|
|
486
|
+
let value = control?.value;
|
|
487
|
+
if (value instanceof File) {
|
|
488
|
+
return value.size > size ? {
|
|
489
|
+
fileMinSize: {
|
|
490
|
+
file: value,
|
|
491
|
+
min: size,
|
|
492
|
+
multiple: false
|
|
493
|
+
}
|
|
494
|
+
} : null;
|
|
495
|
+
}
|
|
496
|
+
else if (value?.length > 0) {
|
|
497
|
+
const fileList = value;
|
|
498
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
499
|
+
if (fileList[i].size > size) {
|
|
500
|
+
return {
|
|
501
|
+
fileMinSize: {
|
|
502
|
+
file: fileList[i],
|
|
503
|
+
fileList: fileList,
|
|
504
|
+
min: size,
|
|
505
|
+
multiple: true
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
class FileMaxSizeValidatorDirective {
|
|
519
|
+
/**
|
|
520
|
+
* Maximum file size in bytes.
|
|
521
|
+
*/
|
|
522
|
+
fileMaxSize = input.required(...(ngDevMode ? [{ debugName: "fileMaxSize", alias: 'ng0FileMaxSize', transform: numberAttribute }] : [{ alias: 'ng0FileMaxSize', transform: numberAttribute }]));
|
|
523
|
+
validate(control) {
|
|
524
|
+
return fileMaxSizeValidator(this.fileMaxSize())(control);
|
|
525
|
+
}
|
|
526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileMaxSizeValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
527
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: FileMaxSizeValidatorDirective, isStandalone: true, selector: "[ngModel][ng0File][ng0FileMaxSize]", inputs: { fileMaxSize: { classPropertyName: "fileMaxSize", publicName: "ng0FileMaxSize", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: NG_VALIDATORS, useExisting: FileMaxSizeValidatorDirective, multi: true, }], exportAs: ["ng0FileMaxSize"], ngImport: i0 });
|
|
528
|
+
}
|
|
529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileMaxSizeValidatorDirective, decorators: [{
|
|
530
|
+
type: Directive,
|
|
531
|
+
args: [{
|
|
532
|
+
selector: '[ngModel][ng0File][ng0FileMaxSize]',
|
|
533
|
+
exportAs: 'ng0FileMaxSize',
|
|
534
|
+
standalone: true,
|
|
535
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: FileMaxSizeValidatorDirective, multi: true, }],
|
|
536
|
+
}]
|
|
537
|
+
}], propDecorators: { fileMaxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "ng0FileMaxSize", required: true }] }] } });
|
|
538
|
+
|
|
539
|
+
function fileExtensionValidator(allowedExtensions) {
|
|
540
|
+
return (control) => {
|
|
541
|
+
let file = control?.value;
|
|
542
|
+
// const res = (file instanceof File && file.size > size) ? {
|
|
543
|
+
// fileExtension: {
|
|
544
|
+
// file: file,
|
|
545
|
+
// max: size,
|
|
546
|
+
// }
|
|
547
|
+
// } : null;
|
|
548
|
+
// return res;
|
|
549
|
+
return null;
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
class FileExtensionValidatorDirective {
|
|
554
|
+
/**
|
|
555
|
+
* Allowed file extensions.
|
|
556
|
+
*/
|
|
557
|
+
allowedExtensions = input.required(...(ngDevMode ? [{ debugName: "allowedExtensions", alias: 'ng0FileExtension' }] : [{ alias: 'ng0FileExtension' }]));
|
|
558
|
+
validate(control) {
|
|
559
|
+
return fileExtensionValidator(this.allowedExtensions())(control);
|
|
560
|
+
}
|
|
561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileExtensionValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
562
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: FileExtensionValidatorDirective, isStandalone: true, selector: "[ngModel][ng0File][ng0FileExtension]", inputs: { allowedExtensions: { classPropertyName: "allowedExtensions", publicName: "ng0FileExtension", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: NG_VALIDATORS, useExisting: FileExtensionValidatorDirective, multi: true, }], exportAs: ["ng0MaxFileSize"], ngImport: i0 });
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FileExtensionValidatorDirective, decorators: [{
|
|
565
|
+
type: Directive,
|
|
566
|
+
args: [{
|
|
567
|
+
selector: '[ngModel][ng0File][ng0FileExtension]',
|
|
568
|
+
exportAs: 'ng0MaxFileSize',
|
|
569
|
+
standalone: true,
|
|
570
|
+
providers: [{ provide: NG_VALIDATORS, useExisting: FileExtensionValidatorDirective, multi: true, }],
|
|
571
|
+
}]
|
|
572
|
+
}], propDecorators: { allowedExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "ng0FileExtension", required: true }] }] } });
|
|
573
|
+
|
|
345
574
|
const urlRegEx = new RegExp('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?');
|
|
346
575
|
function urlValidator() {
|
|
347
576
|
return (control) => {
|
|
@@ -380,29 +609,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
380
609
|
type: Input
|
|
381
610
|
}] } });
|
|
382
611
|
|
|
383
|
-
class CustomValidatorDirective {
|
|
384
|
-
validator = input.required(...(ngDevMode ? [{ debugName: "validator", alias: 'ng0CustomValidator' }] : [{ alias: 'ng0CustomValidator' }]));
|
|
385
|
-
constructor() { }
|
|
386
|
-
validate(control) {
|
|
387
|
-
return this.validator()(control);
|
|
388
|
-
}
|
|
389
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
390
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.11", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
391
|
-
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
392
|
-
], exportAs: ["ng0CustomValidator"], ngImport: i0 });
|
|
393
|
-
}
|
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: CustomValidatorDirective, decorators: [{
|
|
395
|
-
type: Directive,
|
|
396
|
-
args: [{
|
|
397
|
-
selector: '[ng0CustomValidator]',
|
|
398
|
-
exportAs: 'ng0CustomValidator',
|
|
399
|
-
standalone: true,
|
|
400
|
-
providers: [
|
|
401
|
-
{ provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
|
|
402
|
-
]
|
|
403
|
-
}]
|
|
404
|
-
}], ctorParameters: () => [], propDecorators: { validator: [{ type: i0.Input, args: [{ isSignal: true, alias: "ng0CustomValidator", required: true }] }] } });
|
|
405
|
-
|
|
406
612
|
/** Min validator */
|
|
407
613
|
class MinValidatorDirective {
|
|
408
614
|
min = input.required(...(ngDevMode ? [{ debugName: "min", transform: numberAttribute }] : [{
|
|
@@ -461,39 +667,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
461
667
|
}]
|
|
462
668
|
}], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }] } });
|
|
463
669
|
|
|
464
|
-
const items = [
|
|
465
|
-
// ErrorDirective,
|
|
466
|
-
// FirstErrorDirective,
|
|
467
|
-
NumberDirective,
|
|
670
|
+
const items$1 = [
|
|
468
671
|
// Validators
|
|
469
672
|
MinValidatorDirective,
|
|
470
673
|
MaxValidatorDirective,
|
|
674
|
+
FileMinSizeValidatorDirective,
|
|
675
|
+
FileMaxSizeValidatorDirective,
|
|
676
|
+
FileExtensionValidatorDirective,
|
|
471
677
|
EqualWithValidatorDirective,
|
|
472
678
|
UrlValidatorDirective,
|
|
473
679
|
CustomValidatorDirective,
|
|
680
|
+
// Directives
|
|
474
681
|
];
|
|
475
|
-
class
|
|
476
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type:
|
|
477
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.11", ngImport: i0, type:
|
|
478
|
-
// ErrorDirective,
|
|
479
|
-
// FirstErrorDirective,
|
|
480
|
-
NumberDirective,
|
|
682
|
+
class ValidationModule {
|
|
683
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
684
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.11", ngImport: i0, type: ValidationModule, imports: [
|
|
481
685
|
// Validators
|
|
482
686
|
MinValidatorDirective,
|
|
483
687
|
MaxValidatorDirective,
|
|
688
|
+
FileMinSizeValidatorDirective,
|
|
689
|
+
FileMaxSizeValidatorDirective,
|
|
690
|
+
FileExtensionValidatorDirective,
|
|
484
691
|
EqualWithValidatorDirective,
|
|
485
692
|
UrlValidatorDirective,
|
|
486
693
|
CustomValidatorDirective], exports: [
|
|
487
|
-
// ErrorDirective,
|
|
488
|
-
// FirstErrorDirective,
|
|
489
|
-
NumberDirective,
|
|
490
694
|
// Validators
|
|
491
695
|
MinValidatorDirective,
|
|
492
696
|
MaxValidatorDirective,
|
|
697
|
+
FileMinSizeValidatorDirective,
|
|
698
|
+
FileMaxSizeValidatorDirective,
|
|
699
|
+
FileExtensionValidatorDirective,
|
|
493
700
|
EqualWithValidatorDirective,
|
|
494
701
|
UrlValidatorDirective,
|
|
495
702
|
CustomValidatorDirective] });
|
|
496
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type:
|
|
703
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ValidationModule });
|
|
704
|
+
}
|
|
705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: ValidationModule, decorators: [{
|
|
706
|
+
type: NgModule,
|
|
707
|
+
args: [{
|
|
708
|
+
imports: items$1,
|
|
709
|
+
exports: items$1,
|
|
710
|
+
}]
|
|
711
|
+
}] });
|
|
712
|
+
|
|
713
|
+
const items = [
|
|
714
|
+
ValidationModule,
|
|
715
|
+
// ErrorDirective,
|
|
716
|
+
// FirstErrorDirective,
|
|
717
|
+
NumberDirective,
|
|
718
|
+
FileValueAccessor,
|
|
719
|
+
];
|
|
720
|
+
/**
|
|
721
|
+
* FormModule
|
|
722
|
+
*
|
|
723
|
+
*/
|
|
724
|
+
class FormModule {
|
|
725
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
726
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.11", ngImport: i0, type: FormModule, imports: [ValidationModule,
|
|
727
|
+
// ErrorDirective,
|
|
728
|
+
// FirstErrorDirective,
|
|
729
|
+
NumberDirective,
|
|
730
|
+
FileValueAccessor], exports: [ValidationModule,
|
|
731
|
+
// ErrorDirective,
|
|
732
|
+
// FirstErrorDirective,
|
|
733
|
+
NumberDirective,
|
|
734
|
+
FileValueAccessor] });
|
|
735
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FormModule, imports: [ValidationModule, ValidationModule] });
|
|
497
736
|
}
|
|
498
737
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: FormModule, decorators: [{
|
|
499
738
|
type: NgModule,
|
|
@@ -510,5 +749,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
510
749
|
* Generated bundle index. Do not edit.
|
|
511
750
|
*/
|
|
512
751
|
|
|
513
|
-
export { CustomValidatorDirective, EqualWithValidatorDirective, FocusDirective, FormModule, MaxValidatorDirective, MinValidatorDirective, NumberDirective, UrlValidatorDirective, equalWithValidator };
|
|
752
|
+
export { CustomValidatorDirective, EqualWithValidatorDirective, FileExtensionValidatorDirective, FileMaxSizeValidatorDirective, FileMinSizeValidatorDirective, FileValueAccessor, FocusDirective, FormModule, MaxValidatorDirective, MinValidatorDirective, NumberDirective, UrlValidatorDirective, ValidationModule, equalWithValidator, fileExtensionValidator, fileMaxSizeValidator, fileMinSizeValidator };
|
|
514
753
|
//# sourceMappingURL=bootkit-ng0-form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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, booleanAttribute, numberAttribute, inject } 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\ninterface InputElementState {\n selectionStart: number;\n selectionEnd: number;\n isCursorInsideIntegerPart: boolean;\n decimalSeparatorPosition: number;\n}\n\n/**\n * Directive to allow only number input in text fields.\n * It supports integer and decimal numbers, negative numbers, min/max values, thousands separator.\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 private _value?: number;\n private _isDisabled?: boolean;\n private _decimalSeparator!: string;\n private _thousandsSeparator: string = ',';\n private _onChangeCallback?: (v: any) => {};\n private _onTouchedCallback?: () => {};\n private _elmRef = inject(ElementRef<HTMLInputElement>);\n private _renderer = inject(Renderer2);\n\n /**\n * The minimum number of digits to display after the decimal point.\n * Applied only when 'numberType' is set to 'decimal'.\n * @default 1\n */\n public minFractionDigits = input(1, { transform: numberAttribute });\n\n /**\n * The maximum number of digits to display after the decimal point.\n * Applied only when 'numberType' is set to 'decimal'.\n * @default 2\n */\n public maxFractionDigits = input(2, { transform: numberAttribute });\n\n /**\n * Whether to use grouping separators, such as thousands separators\n * @default false\n */\n public useGrouping = input(false, { transform: booleanAttribute });\n\n /**\n * Type of numbers to allow\n * 'decimal' - allow decimal numbers\n * 'integer' - allow integer numbers only\n * @default 'integer'\n */\n public numberType = input<'integer' | 'decimal'>('integer');\n\n constructor() { }\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._onChangeCallback = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouchedCallback = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this._isDisabled = isDisabled;\n this._renderer.setProperty(this._elmRef.nativeElement, '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 const key = event.key;\n const state = this._getInputState();\n\n if (this._isKeyAllowed(key)) {\n if (key == Keys.backspace) {\n if (state.selectionStart > 1 && (state.selectionStart === state.selectionEnd)) {\n let value = this._elmRef.nativeElement.value;\n let beforeSelection = value.charAt(state.selectionStart - 1);\n if (beforeSelection === ',') {\n // If the character before the cursor is a comma, we need to skip it\n this._setProperty('selectionStart', state.selectionStart - 2);\n }\n }\n }\n } else {\n event.preventDefault();\n }\n }\n\n @HostListener('input', ['$event.target.value'])\n private _onInput(value: string) {\n if (value === '') {\n this._value = undefined;\n this._onChangeCallback?.(undefined);\n return;\n }\n\n const state = this._getInputState();\n if (state.isCursorInsideIntegerPart && this.useGrouping()) {\n this._formatIntegerPart(value);\n }\n\n var number = Number(removeChar(this._elmRef.nativeElement.value, this._thousandsSeparator));\n this._value = isNaN(number) ? undefined : number;\n this._onChangeCallback?.(this._value);\n }\n\n private _formatIntegerPart(value: string) {\n let state = this._getInputState();\n\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\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, state.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._onTouchedCallback?.();\n }\n\n @HostListener('paste', ['$event'])\n private _onPaste(event: ClipboardEvent) {\n // event.\n // value = value.trim();\n }\n\n private _getInputState(): InputElementState {\n let value = this._elmRef.nativeElement.value;\n let decimalSeparatorPosition = value.indexOf(this._decimalSeparator);\n let selectionStart = this._elmRef.nativeElement.selectionStart || 0;\n let selectionEnd = this._elmRef.nativeElement.selectionEnd || 0;\n\n return {\n selectionStart,\n selectionEnd,\n decimalSeparatorPosition,\n isCursorInsideIntegerPart: decimalSeparatorPosition > -1 ? (selectionStart <= decimalSeparatorPosition) : 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._elmRef.nativeElement;\n const value = input.value;\n const state = this._getInputState();\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 (state.selectionStart == input.value.length);\n }\n\n // Allow numbers only\n if (/^\\d$/.test(key)) {\n if (state.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 input.selectionStart !== input.selectionEnd; // allow a new digit if a substring is selected\n }\n }\n }\n\n return false;\n }\n\n private _setProperty(prop: string, value: any) {\n this._renderer.setProperty(this._elmRef.nativeElement, prop, value);\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,IAAA,CAAA,UAAU,GAAV,UAAU;IAC9B;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,UAAU,CAAC,MAAK;AACd,gBAAA,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE;AACvC,YAAA,CAAC,CAAC;QACJ;IACF;AAEA,IAAA,WAAW,CAAC,OAAsB,EAAA;AAChC,QAAA,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;AACxB,YAAA,IAAI,IAAI,CAA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OAAO,EAAE,KAAK;AACf,iBAAA;;;ACZD;AACA;;ACbA;;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/file-value-accessor.ts","../../../projects/ng0/form/validation/validators/custom/custom-validator.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/file-min-size/file-min-size-validator.ts","../../../projects/ng0/form/validation/validators/file-min-size/file-min-size.directive.ts","../../../projects/ng0/form/validation/validators/file-max-size/file-max-size-validator.ts","../../../projects/ng0/form/validation/validators/file-max-size/file-max-size.directive.ts","../../../projects/ng0/form/validation/validators/file-extension/file-extension-validator.ts","../../../projects/ng0/form/validation/validators/file-extension/file-extension.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/min/min-validator.directive.ts","../../../projects/ng0/form/validation/validators/max/max-validator.directive.ts","../../../projects/ng0/form/validation/validation.module.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, booleanAttribute, numberAttribute, inject } 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\ninterface InputElementState {\n selectionStart: number;\n selectionEnd: number;\n isCursorInsideIntegerPart: boolean;\n decimalSeparatorPosition: number;\n}\n\n/**\n * Directive to allow only number input in text fields.\n * It supports integer and decimal numbers, negative numbers, min/max values, thousands separator.\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 private _value?: number;\n private _isDisabled?: boolean;\n private _decimalSeparator!: string;\n private _thousandsSeparator: string = ',';\n private _onChangeCallback?: (v: any) => {};\n private _onTouchedCallback?: () => {};\n private _elmRef = inject(ElementRef<HTMLInputElement>);\n private _renderer = inject(Renderer2);\n\n /**\n * The minimum number of digits to display after the decimal point.\n * Applied only when 'numberType' is set to 'decimal'.\n * @default 1\n */\n public minFractionDigits = input(1, { transform: numberAttribute });\n\n /**\n * The maximum number of digits to display after the decimal point.\n * Applied only when 'numberType' is set to 'decimal'.\n * @default 2\n */\n public maxFractionDigits = input(2, { transform: numberAttribute });\n\n /**\n * Whether to use grouping separators, such as thousands separators\n * @default false\n */\n public useGrouping = input(false, { transform: booleanAttribute });\n\n /**\n * Type of numbers to allow\n * 'decimal' - allow decimal numbers\n * 'integer' - allow integer numbers only\n * @default 'integer'\n */\n public numberType = input<'integer' | 'decimal'>('integer');\n\n constructor() { }\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._onChangeCallback = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._onTouchedCallback = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this._isDisabled = isDisabled;\n this._renderer.setProperty(this._elmRef.nativeElement, '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 protected _onKeyDown(event: KeyboardEvent) {\n const key = event.key;\n const state = this._getInputState();\n\n if (this._isKeyAllowed(key)) {\n if (key == Keys.backspace) {\n if (state.selectionStart > 1 && (state.selectionStart === state.selectionEnd)) {\n let value = this._elmRef.nativeElement.value;\n let beforeSelection = value.charAt(state.selectionStart - 1);\n if (beforeSelection === ',') {\n // If the character before the cursor is a comma, we need to skip it\n this._setProperty('selectionStart', state.selectionStart - 2);\n }\n }\n }\n } else {\n event.preventDefault();\n }\n }\n\n @HostListener('input', ['$event.target.value'])\n protected _onInput(value: string) {\n if (value === '') {\n this._value = undefined;\n this._onChangeCallback?.(undefined);\n return;\n }\n\n const state = this._getInputState();\n if (state.isCursorInsideIntegerPart && this.useGrouping()) {\n this._formatIntegerPart(value);\n }\n\n var number = Number(removeChar(this._elmRef.nativeElement.value, this._thousandsSeparator));\n this._value = isNaN(number) ? undefined : number;\n this._onChangeCallback?.(this._value);\n }\n\n private _formatIntegerPart(value: string) {\n let state = this._getInputState();\n\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\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, state.selectionStart + cursorJump);\n }\n\n this._setProperty('selectionStart', newSelectionStart);\n this._setProperty('selectionEnd', newSelectionStart);\n\n // return formattedValue;\n }\n\n @HostListener('blur')\n protected _onBlur() {\n if (this._value !== undefined) {\n let formattedValue = this._formatNumber(this._value);\n this._setProperty('value', formattedValue);\n }\n\n this._onTouchedCallback?.();\n }\n\n @HostListener('paste', ['$event'])\n protected _onPaste(event: ClipboardEvent) {\n // event.\n // value = value.trim();\n }\n\n private _getInputState(): InputElementState {\n let value = this._elmRef.nativeElement.value;\n let decimalSeparatorPosition = value.indexOf(this._decimalSeparator);\n let selectionStart = this._elmRef.nativeElement.selectionStart || 0;\n let selectionEnd = this._elmRef.nativeElement.selectionEnd || 0;\n\n return {\n selectionStart,\n selectionEnd,\n decimalSeparatorPosition,\n isCursorInsideIntegerPart: decimalSeparatorPosition > -1 ? (selectionStart <= decimalSeparatorPosition) : 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._elmRef.nativeElement;\n const value = input.value;\n const state = this._getInputState();\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 (state.selectionStart == input.value.length);\n }\n\n // Allow numbers only\n if (/^\\d$/.test(key)) {\n if (state.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 input.selectionStart !== input.selectionEnd; // allow a new digit if a substring is selected\n }\n }\n }\n\n return false;\n }\n\n private _setProperty(prop: string, value: any) {\n this._renderer.setProperty(this._elmRef.nativeElement, prop, value);\n };\n}\n","import { Directive, ElementRef, forwardRef, inject, Provider, Renderer2, } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * A ControlValueAccessor for file input elements. It supports both single and multiple file selection.\n * It assigns the selected file(s) to the form control's value and handles disabled state.\n * @see https://angular.dev/api/forms/ControlValueAccessor\n */\n@Directive({\n selector: 'input[type=file][ngModel][ng0File]',\n host: {\n '(blur)': '_touchedFn()',\n '(change)': '_onChange($event)',\n },\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FileValueAccessor),\n multi: true,\n }],\n})\nexport class FileValueAccessor implements ControlValueAccessor {\n private readonly _renderer = inject(Renderer2);\n private readonly _elementRef = inject(ElementRef);\n protected _changeFn!: (value: any) => {};\n protected _touchedFn!: () => {};\n\n writeValue(value?: any): void {\n }\n\n registerOnChange(fn: any): void {\n this._changeFn = fn;\n }\n\n registerOnTouched(fn: any): void {\n this._touchedFn = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n protected _onChange(e: Event) {\n const input = e.target as HTMLInputElement;\n\n let value;\n if (input.files?.length) {\n value = input.multiple ? input.files : input.files[0]\n } else {\n value = undefined;\n }\n\n this._changeFn(value);\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 { 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';\n\nexport function fileMinSizeValidator(size: number): ValidatorFn {\n if (size == null || size <= 0) {\n throw new Error('Size must be a positive number');\n }\n\n return (control: AbstractControl): { [key: string]: any } | null => {\n let value = control?.value as FileList | File | undefined;\n\n if (value instanceof File) {\n return value.size < size ? {\n fileMinSize: {\n file: value,\n min: size,\n multiple: false\n }\n } : null;\n } else if ((value as FileList)?.length > 0) {\n const fileList = value as FileList;\n\n for (let i = 0; i < fileList.length; i++) {\n if (fileList[i].size < size) {\n return {\n fileMinSize: {\n file: fileList[i],\n fileList: fileList,\n min: size,\n multiple: true\n }\n };\n }\n }\n return null;\n } else {\n return null;\n }\n };\n}\n","import { Directive, input, numberAttribute } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { fileMinSizeValidator } from './file-min-size-validator';\n\n@Directive({\n selector: '[ngModel][ng0File][ng0FileMinSize]',\n exportAs: 'ng0FileMinSize',\n standalone: true,\n providers: [{ provide: NG_VALIDATORS, useExisting: FileMinSizeValidatorDirective, multi: true, }],\n})\nexport class FileMinSizeValidatorDirective implements Validator {\n /**\n * Minimum file size in bytes.\n */\n public readonly fileMinSize = input.required({ alias: 'ng0FileMinSize', transform: numberAttribute });\n\n validate(control: AbstractControl): ValidationErrors | null {\n return fileMinSizeValidator(this.fileMinSize())(control);\n }\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport function fileMaxSizeValidator(size: number): ValidatorFn {\n if (size == null || size <= 0) {\n throw new Error('Size must be a positive number');\n }\n\n return (control: AbstractControl): { [key: string]: any } | null => {\n let value = control?.value as FileList | File | undefined;\n\n if (value instanceof File) {\n return value.size > size ? {\n fileMinSize: {\n file: value,\n min: size,\n multiple: false\n }\n } : null;\n } else if ((value as FileList)?.length > 0) {\n const fileList = value as FileList;\n\n for (let i = 0; i < fileList.length; i++) {\n if (fileList[i].size > size) {\n return {\n fileMinSize: {\n file: fileList[i],\n fileList: fileList,\n min: size,\n multiple: true\n }\n };\n }\n }\n return null;\n } else {\n return null;\n }\n };\n}\n","import { Directive, input, numberAttribute } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { fileMaxSizeValidator } from './file-max-size-validator';\n\n@Directive({\n selector: '[ngModel][ng0File][ng0FileMaxSize]',\n exportAs: 'ng0FileMaxSize',\n standalone: true,\n providers: [{ provide: NG_VALIDATORS, useExisting: FileMaxSizeValidatorDirective, multi: true, }],\n})\nexport class FileMaxSizeValidatorDirective implements Validator {\n /**\n * Maximum file size in bytes.\n */\n public readonly fileMaxSize = input.required({ alias: 'ng0FileMaxSize', transform: numberAttribute });\n\n validate(control: AbstractControl): ValidationErrors | null {\n return fileMaxSizeValidator(this.fileMaxSize())(control);\n }\n}\n","import { AbstractControl, ValidatorFn } from '@angular/forms';\n\nexport function fileExtensionValidator(allowedExtensions: string[]): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n let file = control?.value;\n\n // const res = (file instanceof File && file.size > size) ? {\n // fileExtension: {\n // file: file,\n // max: size,\n // }\n // } : null;\n\n // return res;\n\n return null;\n };\n}\n","import { Directive, input } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms';\nimport { fileExtensionValidator } from './file-extension-validator';\n\n@Directive({\n selector: '[ngModel][ng0File][ng0FileExtension]',\n exportAs: 'ng0MaxFileSize',\n standalone: true,\n providers: [{ provide: NG_VALIDATORS, useExisting: FileExtensionValidatorDirective, multi: true, }],\n})\nexport class FileExtensionValidatorDirective implements Validator {\n /**\n * Allowed file extensions.\n */\n public readonly allowedExtensions = input.required<string[]>({ alias: 'ng0FileExtension' });\n\n validate(control: AbstractControl): ValidationErrors | null {\n return fileExtensionValidator(this.allowedExtensions())(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, 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 './validators/equal-with/equal-with.directive';\nimport { UrlValidatorDirective } from './validators/url/url-validator.directive';\nimport { CustomValidatorDirective } from './validators/custom/custom-validator.directive';\nimport { MinValidatorDirective } from './validators/min/min-validator.directive';\nimport { MaxValidatorDirective } from './validators/max/max-validator.directive';\nimport { FileMaxSizeValidatorDirective } from './validators/file-max-size/file-max-size.directive';\nimport { FileMinSizeValidatorDirective } from './validators/file-min-size/file-min-size.directive';\nimport { FileExtensionValidatorDirective } from './validators/file-extension/file-extension.directive';\n\n\nconst items = [\n // Validators\n MinValidatorDirective,\n MaxValidatorDirective,\n FileMinSizeValidatorDirective,\n FileMaxSizeValidatorDirective,\n FileExtensionValidatorDirective,\n EqualWithValidatorDirective,\n UrlValidatorDirective,\n CustomValidatorDirective,\n\n\n // Directives\n];\n\n@NgModule({\n imports: items,\n exports: items,\n})\nexport class ValidationModule { }\n","import { NgModule } from '@angular/core';\nimport { NumberDirective } from './number.directive';\nimport { FileValueAccessor } from './file-value-accessor';\nimport { ValidationModule } from './validation';\n\nconst items = [\n ValidationModule,\n\n // ErrorDirective,\n // FirstErrorDirective,\n NumberDirective,\n FileValueAccessor,\n];\n\n/**\n * FormModule\n * \n */\n@NgModule({\n imports: items,\n exports: items,\n})\nexport class FormModule { }\n","export * from './focus.directive';\nexport * from './number.directive';\nexport * from './file-value-accessor';\nexport * from './form.module';\n\n// Validation\nexport * from './validation';\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":["items"],"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,IAAA,CAAA,UAAU,GAAV,UAAU;IAC9B;IAEA,QAAQ,GAAA;AACN,QAAA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B;;;YAIhB,eAAe;YACf,iBAAiB,CAAA,EAAA,CAAA;yGAWN,UAAU,EAAA,OAAA,EAAA,CAhBrB,gBAAgB,EAAhB,gBAAgB,CAAA,EAAA,CAAA;;4FAgBL,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA;;;ACdD;AACA;;ACRA;;AAEG;;;;"}
|
|
@@ -66,6 +66,8 @@ const FA_IR_LOCALE = new Locale({
|
|
|
66
66
|
minlength: (e) => `حداقل ${e.requiredLength} کاراکتر`,
|
|
67
67
|
maxlength: (e) => `حداکثر ${e.requiredLength} کاراکتر`,
|
|
68
68
|
email: (e) => `ایمیل نامعتبر است`,
|
|
69
|
+
fileMinSize: (e) => `حداقل ${formatNumber(e.min / 1024 / 1024)} مگابایت ${e.fileList ? `(${e.file.name})` : ''}`,
|
|
70
|
+
fileMaxSize: (e) => `حداکثر ${formatNumber(e.max / 1024 / 1024)} مگابایت ${e.fileList ? `(${e.file.name})` : ''}`,
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
},
|
|
@@ -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 formatters: {\n 'boolean': ['No', 'Yes'],\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 formatters: {\n 'boolean': ['خیر', 'بله'],\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;AAE/C,MAAM,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,CAAA,QAAA,CAAU;AAC3B,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAA,SAAA,EAAYA,cAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA,CAAE;AAC7C,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAA,SAAA,EAAYA,cAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA,CAAE;gBAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAA,gBAAA,EAAmB,CAAC,CAAC,cAAc,CAAA,CAAE;gBACvD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAA,gBAAA,EAAmB,CAAC,CAAC,cAAc,CAAA,CAAE;AACvD,gBAAA,KAAK,EAAE,CAAC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,CAAC,GAAG,CAAC,CAAA,CAAE;AAC3C,gBAAA,GAAG,EAAE,CAAC,CAAC,KAAK,CAAA,QAAA,EAAW,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA,CAAE;gBAC5C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAA,MAAA,EAAS,CAAC,CAAC,cAAc,CAAA,QAAA,CAAU;gBACrD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAA,OAAA,EAAU,CAAC,CAAC,cAAc,CAAA,QAAA,CAAU;AACtD,gBAAA,KAAK,EAAE,CAAC,CAAC,KAAK,CAAA,iBAAA,CAAmB;
|
|
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 formatters: {\n 'boolean': ['No', 'Yes'],\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 fileMinSize: (e) => `حداقل ${formatNumber(e.min / 1024 / 1024)} مگابایت ${e.fileList ? `(${e.file.name})` : ''}`,\n fileMaxSize: (e) => `حداکثر ${formatNumber(e.max / 1024 / 1024)} مگابایت ${e.fileList ? `(${e.file.name})` : ''}`,\n }\n }\n },\n formatters: {\n 'boolean': ['خیر', 'بله'],\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;AAE/C,MAAM,YAAY,GAAG,IAAI,M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AAA,EAAE,EAAE,OAAO;AACX,YAAA,EAAE,EAAE,QAAQ;AACZ,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,EAAE,EAAE,QAAQ;AACZ,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,EAAE,EAAE,OAAO;AAEd;AACJ;AACJ,CAAA;;ACzDD;;AAEG;;;;"}
|
package/form/index.d.ts
CHANGED
|
@@ -60,11 +60,11 @@ declare class NumberDirective implements ControlValueAccessor {
|
|
|
60
60
|
registerOnTouched(fn: any): void;
|
|
61
61
|
setDisabledState?(isDisabled: boolean): void;
|
|
62
62
|
writeValue(value: any): void;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
protected _onKeyDown(event: KeyboardEvent): void;
|
|
64
|
+
protected _onInput(value: string): void;
|
|
65
65
|
private _formatIntegerPart;
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
protected _onBlur(): void;
|
|
67
|
+
protected _onPaste(event: ClipboardEvent): void;
|
|
68
68
|
private _getInputState;
|
|
69
69
|
private _formatNumber;
|
|
70
70
|
private _isKeyAllowed;
|
|
@@ -73,6 +73,25 @@ declare class NumberDirective implements ControlValueAccessor {
|
|
|
73
73
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberDirective, "[ng0Number]", never, { "minFractionDigits": { "alias": "minFractionDigits"; "required": false; "isSignal": true; }; "maxFractionDigits": { "alias": "maxFractionDigits"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "numberType": { "alias": "numberType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* A ControlValueAccessor for file input elements. It supports both single and multiple file selection.
|
|
78
|
+
* It assigns the selected file(s) to the form control's value and handles disabled state.
|
|
79
|
+
* @see https://angular.dev/api/forms/ControlValueAccessor
|
|
80
|
+
*/
|
|
81
|
+
declare class FileValueAccessor implements ControlValueAccessor {
|
|
82
|
+
private readonly _renderer;
|
|
83
|
+
private readonly _elementRef;
|
|
84
|
+
protected _changeFn: (value: any) => {};
|
|
85
|
+
protected _touchedFn: () => {};
|
|
86
|
+
writeValue(value?: any): void;
|
|
87
|
+
registerOnChange(fn: any): void;
|
|
88
|
+
registerOnTouched(fn: any): void;
|
|
89
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
90
|
+
protected _onChange(e: Event): void;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileValueAccessor, never>;
|
|
92
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileValueAccessor, "input[type=file][ngModel][ng0File]", never, {}, {}, never, never, true, never>;
|
|
93
|
+
}
|
|
94
|
+
|
|
76
95
|
/** Min validator */
|
|
77
96
|
declare class MinValidatorDirective implements Validator {
|
|
78
97
|
min: i0.InputSignalWithTransform<number, string | number | null | undefined>;
|
|
@@ -89,6 +108,36 @@ declare class MaxValidatorDirective implements Validator {
|
|
|
89
108
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidatorDirective, "input[type=text][ng0Number][max]", ["ng0Max"], { "max": { "alias": "max"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
90
109
|
}
|
|
91
110
|
|
|
111
|
+
declare class FileMinSizeValidatorDirective implements Validator {
|
|
112
|
+
/**
|
|
113
|
+
* Minimum file size in bytes.
|
|
114
|
+
*/
|
|
115
|
+
readonly fileMinSize: i0.InputSignalWithTransform<number, unknown>;
|
|
116
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileMinSizeValidatorDirective, never>;
|
|
118
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileMinSizeValidatorDirective, "[ngModel][ng0File][ng0FileMinSize]", ["ng0FileMinSize"], { "fileMinSize": { "alias": "ng0FileMinSize"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare class FileMaxSizeValidatorDirective implements Validator {
|
|
122
|
+
/**
|
|
123
|
+
* Maximum file size in bytes.
|
|
124
|
+
*/
|
|
125
|
+
readonly fileMaxSize: i0.InputSignalWithTransform<number, unknown>;
|
|
126
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileMaxSizeValidatorDirective, never>;
|
|
128
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileMaxSizeValidatorDirective, "[ngModel][ng0File][ng0FileMaxSize]", ["ng0FileMaxSize"], { "fileMaxSize": { "alias": "ng0FileMaxSize"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class FileExtensionValidatorDirective implements Validator {
|
|
132
|
+
/**
|
|
133
|
+
* Allowed file extensions.
|
|
134
|
+
*/
|
|
135
|
+
readonly allowedExtensions: i0.InputSignal<string[]>;
|
|
136
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileExtensionValidatorDirective, never>;
|
|
138
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileExtensionValidatorDirective, "[ngModel][ng0File][ng0FileExtension]", ["ng0MaxFileSize"], { "allowedExtensions": { "alias": "ng0FileExtension"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
139
|
+
}
|
|
140
|
+
|
|
92
141
|
declare class EqualWithValidatorDirective implements Validator {
|
|
93
142
|
targetValue?: string;
|
|
94
143
|
inequalityMessage?: string;
|
|
@@ -116,12 +165,28 @@ declare class CustomValidatorDirective implements Validator {
|
|
|
116
165
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CustomValidatorDirective, "[ng0CustomValidator]", ["ng0CustomValidator"], { "validator": { "alias": "ng0CustomValidator"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
117
166
|
}
|
|
118
167
|
|
|
168
|
+
declare class ValidationModule {
|
|
169
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationModule, never>;
|
|
170
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ValidationModule, never, [typeof MinValidatorDirective, typeof MaxValidatorDirective, typeof FileMinSizeValidatorDirective, typeof FileMaxSizeValidatorDirective, typeof FileExtensionValidatorDirective, typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective], [typeof MinValidatorDirective, typeof MaxValidatorDirective, typeof FileMinSizeValidatorDirective, typeof FileMaxSizeValidatorDirective, typeof FileExtensionValidatorDirective, typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective]>;
|
|
171
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ValidationModule>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* FormModule
|
|
176
|
+
*
|
|
177
|
+
*/
|
|
119
178
|
declare class FormModule {
|
|
120
179
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormModule, never>;
|
|
121
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof
|
|
180
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof ValidationModule, typeof NumberDirective, typeof FileValueAccessor], [typeof ValidationModule, typeof NumberDirective, typeof FileValueAccessor]>;
|
|
122
181
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormModule>;
|
|
123
182
|
}
|
|
124
183
|
|
|
125
184
|
declare function equalWithValidator(targetValue?: string, inequalityMessage?: string): ValidatorFn;
|
|
126
185
|
|
|
127
|
-
|
|
186
|
+
declare function fileMinSizeValidator(size: number): ValidatorFn;
|
|
187
|
+
|
|
188
|
+
declare function fileMaxSizeValidator(size: number): ValidatorFn;
|
|
189
|
+
|
|
190
|
+
declare function fileExtensionValidator(allowedExtensions: string[]): ValidatorFn;
|
|
191
|
+
|
|
192
|
+
export { CustomValidatorDirective, EqualWithValidatorDirective, FileExtensionValidatorDirective, FileMaxSizeValidatorDirective, FileMinSizeValidatorDirective, FileValueAccessor, FocusDirective, FormModule, MaxValidatorDirective, MinValidatorDirective, NumberDirective, UrlValidatorDirective, ValidationModule, equalWithValidator, fileExtensionValidator, fileMaxSizeValidator, fileMinSizeValidator };
|