@unipin/angular-applet 21.3.0 → 21.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/fesm2022/unipin-angular-applet-accordion.mjs +12 -12
  2. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +6 -6
  3. package/fesm2022/unipin-angular-applet-alert.mjs +9 -9
  4. package/fesm2022/unipin-angular-applet-approval.mjs +6 -6
  5. package/fesm2022/{unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs → unipin-angular-applet-audit-audit-modal.component-wPoNvU2r.mjs} +4 -4
  6. package/fesm2022/{unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs.map → unipin-angular-applet-audit-audit-modal.component-wPoNvU2r.mjs.map} +1 -1
  7. package/fesm2022/unipin-angular-applet-audit.mjs +7 -7
  8. package/fesm2022/unipin-angular-applet-auth.mjs +21 -21
  9. package/fesm2022/unipin-angular-applet-avatar.mjs +3 -3
  10. package/fesm2022/unipin-angular-applet-badge.mjs +3 -3
  11. package/fesm2022/unipin-angular-applet-buttons.mjs +6 -6
  12. package/fesm2022/unipin-angular-applet-calendar.mjs +12 -12
  13. package/fesm2022/unipin-angular-applet-collapsible.mjs +9 -9
  14. package/fesm2022/unipin-angular-applet-common.mjs +24 -24
  15. package/fesm2022/unipin-angular-applet-containers.mjs +12 -12
  16. package/fesm2022/unipin-angular-applet-dialog.mjs +21 -21
  17. package/fesm2022/unipin-angular-applet-forms.mjs +263 -261
  18. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
  19. package/fesm2022/unipin-angular-applet-froala.mjs +3 -3
  20. package/fesm2022/unipin-angular-applet-grids.mjs +26 -12
  21. package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -1
  22. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +3 -3
  23. package/fesm2022/unipin-angular-applet-json-viewer.mjs +3 -3
  24. package/fesm2022/unipin-angular-applet-kbd.mjs +3 -3
  25. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +6 -6
  26. package/fesm2022/unipin-angular-applet-markdown.mjs +9 -9
  27. package/fesm2022/unipin-angular-applet-popover.mjs +15 -15
  28. package/fesm2022/unipin-angular-applet-progress-bar.mjs +3 -3
  29. package/fesm2022/unipin-angular-applet-skeleton.mjs +3 -3
  30. package/fesm2022/unipin-angular-applet-spinner.mjs +3 -3
  31. package/fesm2022/unipin-angular-applet-stepper.mjs +6 -6
  32. package/fesm2022/unipin-angular-applet-swipeable.mjs +12 -12
  33. package/fesm2022/unipin-angular-applet-tabs.mjs +9 -9
  34. package/fesm2022/unipin-angular-applet-tooltip.mjs +3 -3
  35. package/package.json +2 -1
  36. package/types/unipin-angular-applet-forms.d.ts +60 -57
  37. package/types/unipin-angular-applet-grids.d.ts +1 -1
  38. package/common/assets/sprites/flagGlobal.png +0 -0
@@ -95,10 +95,10 @@ class UpTooltipDirective {
95
95
  this.renderer.setStyle(tooltipEl, 'top', `${Math.round(top)}px`);
96
96
  this.renderer.setStyle(tooltipEl, 'left', `${Math.round(left)}px`);
97
97
  }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTooltipDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
99
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpTooltipDirective, isStandalone: true, selector: "[upTooltip]", inputs: { toolTipText: { classPropertyName: "toolTipText", publicName: "toolTipText", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["upTooltip"], ngImport: i0 }); }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: UpTooltipDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
99
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: UpTooltipDirective, isStandalone: true, selector: "[upTooltip]", inputs: { toolTipText: { classPropertyName: "toolTipText", publicName: "toolTipText", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["upTooltip"], ngImport: i0 }); }
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTooltipDirective, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: UpTooltipDirective, decorators: [{
102
102
  type: Directive,
103
103
  args: [{
104
104
  standalone: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unipin/angular-applet",
3
- "version": "21.3.0",
3
+ "version": "21.3.2",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "21.x.x",
6
6
  "@angular/common": "21.x.x",
@@ -8,6 +8,7 @@
8
8
  "@angular/elements": "21.x.x",
9
9
  "@unipin/angular-gql": "1.x.x",
10
10
  "@ng-icons/core": "33.x.x",
11
+ "@ng-icons/flag-icons": "^33.x.x",
11
12
  "@ng-icons/material-icons": "33.x.x",
12
13
  "@ng-select/ng-select": "21.x.x",
13
14
  "angular-froala-wysiwyg": "4.x.x",
@@ -1,12 +1,66 @@
1
+ import { FormGroup, ValidatorFn, NgControl, AbstractControl, NgForm, FormGroupDirective, ControlValueAccessor } from '@angular/forms';
1
2
  import * as _angular_core from '@angular/core';
2
3
  import { Signal, DoCheck, Injector, Renderer2, ElementRef, WritableSignal, InputSignal, ModelSignal, OutputEmitterRef, OnInit, OnDestroy } from '@angular/core';
3
4
  import { ClassValue } from 'clsx';
4
- import { NgControl, AbstractControl, NgForm, FormGroupDirective, ControlValueAccessor, FormGroup, ValidatorFn } from '@angular/forms';
5
5
  import { Subscription, Observable, Subject } from 'rxjs';
6
6
  import { Country, Currency } from '@unipin/graphql-schema';
7
7
  import { CountryService, CurrencyService, RateGroupCodeService } from '@unipin/angular-applet/common';
8
8
  import { SingleDate, RangeDate } from '@unipin/angular-applet/calendar';
9
9
 
10
+ type TimeValue = {
11
+ hour: number;
12
+ minute: number;
13
+ };
14
+
15
+ declare function setValidator(form: FormGroup, keys: string[], validators: ValidatorFn | ValidatorFn[]): void;
16
+
17
+ declare function toggleFormControls(form: FormGroup, keys: string[], mode: 'enable' | 'disable'): void;
18
+
19
+ /**
20
+ * Range validator for number and date values.
21
+ * @param {string} fromKey - The "from" control name
22
+ * @param {string} toKey - The "to" control name
23
+ * @returns {ValidatorFn} Throw error message when fromKey is greater than toKey
24
+ *
25
+ * Usage:
26
+ * this.form = new FormGroup({
27
+ * agingFrom: new FormControl(),
28
+ * agingTo: new FormControl(),
29
+ * }, { validators: rangeValidator('agingFrom', 'agingTo') });
30
+ */
31
+ declare function validRangeValidator(fromKey: string, toKey: string): ValidatorFn;
32
+
33
+ /**
34
+ * Validator that requires all specified form controls to have the same value.
35
+ *
36
+ * @param {string[]} controlNames - The names of the controls that must match
37
+ * @param {string} [message] - Optional custom error message
38
+ * @returns {ValidatorFn} A validator function producing an `isEqual` error if values do not match
39
+ *
40
+ * @example
41
+ * this.form = new FormGroup({
42
+ * password: new FormControl(''),
43
+ * confirmPassword: new FormControl(''),
44
+ * }, { validators: isEqualValidator(['password', 'confirmPassword']) });
45
+ */
46
+ declare function isEqualValidator(controlNames: string[], message?: string): ValidatorFn;
47
+
48
+ /**
49
+ * Validator that requires all specified form controls to have different values.
50
+ *
51
+ * @param {string[]} controlNames - The names of the controls that must all be unique
52
+ * @param {string} [message] - Optional custom error message
53
+ * @returns {ValidatorFn} A validator function producing an `isNotEqual` error if duplicate values exist
54
+ *
55
+ * @example
56
+ * this.form = new FormGroup({
57
+ * primaryEmail: new FormControl(''),
58
+ * secondaryEmail: new FormControl(''),
59
+ * backupEmail: new FormControl(''),
60
+ * }, { validators: isNotEqualValidator(['primaryEmail', 'secondaryEmail', 'backupEmail']) });
61
+ */
62
+ declare function isNotEqualValidator(controlNames: string[], message?: string): ValidatorFn;
63
+
10
64
  declare abstract class UpFieldControl {
11
65
  abstract readonly error: Signal<string>;
12
66
  abstract readonly ngControl: NgControl | AbstractControl | null;
@@ -254,6 +308,7 @@ declare class UpCountrySelectComponent extends UpFieldControlComponent implement
254
308
  readonly placeholder: _angular_core.InputSignal<string>;
255
309
  readonly inlineClass: _angular_core.InputSignal<ClassValue>;
256
310
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
311
+ readonly appendTo: _angular_core.InputSignal<(string & {}) | "body" | ".cdk-overlay-pane">;
257
312
  readonly value: _angular_core.ModelSignal<string | null>;
258
313
  readonly changed: OutputEmitterRef<Country>;
259
314
  readonly countries: _angular_core.WritableSignal<Country[]>;
@@ -273,7 +328,7 @@ declare class UpCountrySelectComponent extends UpFieldControlComponent implement
273
328
  onTouched(): void;
274
329
  change(value: any): void;
275
330
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpCountrySelectComponent, never>;
276
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpCountrySelectComponent, "up-country-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "changed": "changed"; }, never, never, true, never>;
331
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpCountrySelectComponent, "up-country-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "changed": "changed"; }, never, never, true, never>;
277
332
  }
278
333
 
279
334
  declare class UpCurrencySelectComponent extends UpFieldControlComponent implements OnInit, OnDestroy, ControlValueAccessor {
@@ -283,6 +338,7 @@ declare class UpCurrencySelectComponent extends UpFieldControlComponent implemen
283
338
  readonly placeholder: _angular_core.InputSignal<string>;
284
339
  readonly inlineClass: _angular_core.InputSignal<ClassValue>;
285
340
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
341
+ readonly appendTo: _angular_core.InputSignal<(string & {}) | "body" | ".cdk-overlay-pane">;
286
342
  readonly value: _angular_core.ModelSignal<string | null>;
287
343
  readonly changed: OutputEmitterRef<Currency>;
288
344
  readonly isLoading: _angular_core.WritableSignal<boolean>;
@@ -304,7 +360,7 @@ declare class UpCurrencySelectComponent extends UpFieldControlComponent implemen
304
360
  onTouched(): void;
305
361
  change(value: any): void;
306
362
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpCurrencySelectComponent, never>;
307
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpCurrencySelectComponent, "up-currency-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "changed": "changed"; }, never, never, true, never>;
363
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpCurrencySelectComponent, "up-currency-select", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "changed": "changed"; }, never, never, true, never>;
308
364
  }
309
365
 
310
366
  declare class UpSearchableSelectComponent extends UpFieldControlComponent implements ControlValueAccessor {
@@ -435,11 +491,6 @@ declare class UpDateRangePickerComponent extends UpFieldControlComponent impleme
435
491
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpDateRangePickerComponent, "up-date-range-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "format"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
436
492
  }
437
493
 
438
- type TimeValue = {
439
- hour: number;
440
- minute: number;
441
- };
442
-
443
494
  declare class UpTimeComponent {
444
495
  readonly hoursScroll: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
445
496
  readonly minutesScroll: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
@@ -551,53 +602,5 @@ declare class UpImagePickerComponent extends UpFieldControlComponent implements
551
602
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpImagePickerComponent, "up-image-picker", never, { "ratio": { "alias": "ratio"; "required": false; "isSignal": true; }; "imgSrc": { "alias": "src"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "imgSrc": "srcChange"; "changed": "changed"; }, never, never, true, never>;
552
603
  }
553
604
 
554
- declare function setValidator(form: FormGroup, keys: string[], validators: ValidatorFn | ValidatorFn[]): void;
555
-
556
- declare function toggleFormControls(form: FormGroup, keys: string[], mode: 'enable' | 'disable'): void;
557
-
558
- /**
559
- * Range validator for number and date values.
560
- * @param {string} fromKey - The "from" control name
561
- * @param {string} toKey - The "to" control name
562
- * @returns {ValidatorFn} Throw error message when fromKey is greater than toKey
563
- *
564
- * Usage:
565
- * this.form = new FormGroup({
566
- * agingFrom: new FormControl(),
567
- * agingTo: new FormControl(),
568
- * }, { validators: rangeValidator('agingFrom', 'agingTo') });
569
- */
570
- declare function validRangeValidator(fromKey: string, toKey: string): ValidatorFn;
571
-
572
- /**
573
- * Validator that requires all specified form controls to have the same value.
574
- *
575
- * @param {string[]} controlNames - The names of the controls that must match
576
- * @param {string} [message] - Optional custom error message
577
- * @returns {ValidatorFn} A validator function producing an `isEqual` error if values do not match
578
- *
579
- * @example
580
- * this.form = new FormGroup({
581
- * password: new FormControl(''),
582
- * confirmPassword: new FormControl(''),
583
- * }, { validators: isEqualValidator(['password', 'confirmPassword']) });
584
- */
585
- declare function isEqualValidator(controlNames: string[], message?: string): ValidatorFn;
586
-
587
- /**
588
- * Validator that requires all specified form controls to have different values.
589
- *
590
- * @param {string[]} controlNames - The names of the controls that must all be unique
591
- * @param {string} [message] - Optional custom error message
592
- * @returns {ValidatorFn} A validator function producing an `isNotEqual` error if duplicate values exist
593
- *
594
- * @example
595
- * this.form = new FormGroup({
596
- * primaryEmail: new FormControl(''),
597
- * secondaryEmail: new FormControl(''),
598
- * backupEmail: new FormControl(''),
599
- * }, { validators: isNotEqualValidator(['primaryEmail', 'secondaryEmail', 'backupEmail']) });
600
- */
601
- declare function isNotEqualValidator(controlNames: string[], message?: string): ValidatorFn;
602
-
603
605
  export { UpCheckboxDirective, UpCountrySelectComponent, UpCurrencySelectComponent, UpDateRangePickerComponent, UpDatepickerComponent, UpFieldControl, UpFieldControlComponent, UpFormFieldComponent, UpImagePickerComponent, UpInputDirective, UpNumberDirective, UpOptionComponent, UpPasswordComponent, UpRadioDirective, UpRateGroupCodeSelectComponent, UpSearchableSelectComponent, UpSelectComponent, UpSwitchComponent, UpTimeComponent, UpTimepickerComponent, isEqualValidator, isNotEqualValidator, setValidator, toggleFormControls, validRangeValidator };
606
+ export type { TimeValue };
@@ -16,7 +16,7 @@ declare const rowNumberColumn: {
16
16
  };
17
17
  };
18
18
 
19
- declare function renderFlag(value: string | string[]): string;
19
+ declare function renderFlag(countryCode: string | string[]): string;
20
20
 
21
21
  type RenderGridBadgeOptions = {
22
22
  additionalClass?: string;