@colijnit/corecomponents_v12 300.1.0 → 300.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -532,7 +532,6 @@ declare abstract class BaseInputComponent<T> implements OnInit, OnDestroy, After
532
532
  get canSaveOrCancel(): boolean;
533
533
  objectConfigName: string;
534
534
  validationError: string;
535
- shouldCommit: boolean;
536
535
  protected _markedAsUserTouched: boolean;
537
536
  protected _destroyed: boolean;
538
537
  protected _hasOnPushCdStrategy: boolean;
@@ -558,6 +557,7 @@ declare abstract class BaseInputComponent<T> implements OnInit, OnDestroy, After
558
557
  private _formReadonlyChangeSub;
559
558
  private _clearMarkedAsUserTouchedSub;
560
559
  private _canSaveOrCancel;
560
+ private _committing;
561
561
  private _commitButtonsComponentRef;
562
562
  private _validationComponentRef;
563
563
  constructor(changeDetector: ChangeDetectorRef, overlayService: OverlayService, formUserChangeListener?: FormInputUserModelChangeListenerService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
@@ -598,7 +598,7 @@ declare abstract class BaseInputComponent<T> implements OnInit, OnDestroy, After
598
598
  private _controlExists;
599
599
  private _controlIsValid;
600
600
  private _setNativeDisabled;
601
- private _setNativeMaxLength;
601
+ protected _setNativeMaxLength(maxlength: number): void;
602
602
  protected _setNativeReadOnly(readonly: boolean): void;
603
603
  private _setNativeRequired;
604
604
  private _subscribeToSpeechInput;
@@ -1421,10 +1421,30 @@ declare enum KeyboardCode {
1421
1421
  Tilde = 192
1422
1422
  }
1423
1423
 
1424
+ /**
1425
+ * Resolves the locale-specific decimal separator (e.g. ',' for nl-NL) from the app-wide LOCALE_ID and
1426
+ * converts between a numeric model value and its user-facing display string. Injected app-wide, so no
1427
+ * component has to be given a locale explicitly.
1428
+ *
1429
+ * The model always stays a real number (dot-based / JSON-safe); the separator only affects the display
1430
+ * string shown in the input, never the stored value.
1431
+ */
1432
+ declare class NumberLocaleService {
1433
+ private readonly _decimalSeparator;
1434
+ constructor(localeId: string);
1435
+ get decimalSeparator(): string;
1436
+ parse(text: string | number | null | undefined): number;
1437
+ format(value: number | null | undefined): string;
1438
+ insertDecimalSeparator(input: HTMLInputElement | HTMLTextAreaElement): void;
1439
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberLocaleService, never>;
1440
+ static ɵprov: i0.ɵɵInjectableDeclaration<NumberLocaleService>;
1441
+ }
1442
+
1424
1443
  declare class InputTextComponent extends BaseInputComponent<any> implements AfterViewInit {
1425
1444
  formComponent: FormComponent;
1426
1445
  protected changeDetector: ChangeDetectorRef;
1427
1446
  protected overlayService: OverlayService;
1447
+ private _numberLocale;
1428
1448
  protected formUserChangeListener?: FormInputUserModelChangeListenerService;
1429
1449
  protected ngZoneWrapper?: NgZoneWrapperService;
1430
1450
  elementRef?: ElementRef;
@@ -1467,13 +1487,18 @@ declare class InputTextComponent extends BaseInputComponent<any> implements Afte
1467
1487
  handleDocumentPointerUp(event: PointerEvent): void;
1468
1488
  set model(value: any);
1469
1489
  get model(): any;
1490
+ protected modelSet(): void;
1491
+ handleInputModelChange(value: any): void;
1470
1492
  get pipedModel(): any;
1493
+ get displayValue(): string;
1471
1494
  isFocusedOnDate: boolean;
1472
1495
  weekInputBuffer: string;
1473
1496
  isWeekInputMode: boolean;
1474
1497
  private _isLeftIconMouseDown;
1475
1498
  private _isRightIconMouseDown;
1476
- constructor(formComponent: FormComponent, changeDetector: ChangeDetectorRef, overlayService: OverlayService, formUserChangeListener?: FormInputUserModelChangeListenerService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
1499
+ private _userTyping;
1500
+ private _displayValue;
1501
+ constructor(formComponent: FormComponent, changeDetector: ChangeDetectorRef, overlayService: OverlayService, _numberLocale: NumberLocaleService, formUserChangeListener?: FormInputUserModelChangeListenerService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
1477
1502
  ngAfterViewInit(): void;
1478
1503
  handleLeftIconClick(event: MouseEvent): void;
1479
1504
  handleLeftIconMouseDown(event: MouseEvent): void;
@@ -1486,11 +1511,12 @@ declare class InputTextComponent extends BaseInputComponent<any> implements Afte
1486
1511
  handleInputFocus(event: FocusEvent): void;
1487
1512
  handleBlur(event: FocusEvent): void;
1488
1513
  handleDoFocus(event: MouseEvent): void;
1514
+ protected _setNativeMaxLength(maxlength: number): void;
1489
1515
  clearInput(event: MouseEvent): void;
1490
1516
  handleKeyDownInput(event: KeyboardEvent): void;
1491
1517
  private convertWeekToDate;
1492
1518
  private formatDateLocal;
1493
- static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, [{ optional: true; }, null, null, null, null, null]>;
1519
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, [{ optional: true; }, null, null, null, null, null, null]>;
1494
1520
  static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "co-input-text", never, { "useContent": { "alias": "useContent"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "align": { "alias": "align"; "required": false; }; "type": { "alias": "type"; "required": false; }; "formatPipe": { "alias": "formatPipe"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "digitsOnly": { "alias": "digitsOnly"; "required": false; }; "excludePlusMinus": { "alias": "excludePlusMinus"; "required": false; }; "showClearButton": { "alias": "showClearButton"; "required": false; }; "keyDownWhiteList": { "alias": "keyDownWhiteList"; "required": false; }; "showPlaceholderOnFocus": { "alias": "showPlaceholderOnFocus"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "leftIconData": { "alias": "leftIconData"; "required": false; }; "rightIconData": { "alias": "rightIconData"; "required": false; }; "selectOnFocus": { "alias": "selectOnFocus"; "required": false; }; "emptyPlace": { "alias": "emptyPlace"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "noStyle": { "alias": "noStyle"; "required": false; }; "hideArrowButtons": { "alias": "hideArrowButtons"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "leftIconClick": "leftIconClick"; "leftIconMouseDown": "leftIconMouseDown"; "leftIconMouseUp": "leftIconMouseUp"; "rightIconClick": "rightIconClick"; "rightIconMouseDown": "rightIconMouseDown"; "rightIconMouseUp": "rightIconMouseUp"; "clearIconClick": "clearIconClick"; "isFocused": "isFocused"; }, never, ["*"], false, never>;
1495
1521
  }
1496
1522
 
@@ -1916,10 +1942,12 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1916
1942
  iconCacheService: IconCacheService;
1917
1943
  protected overlayService: OverlayService;
1918
1944
  private _ngZone;
1945
+ private _numberLocale;
1919
1946
  protected ngZoneWrapper?: NgZoneWrapperService;
1920
1947
  elementRef?: ElementRef;
1921
1948
  set model(model: number);
1922
1949
  get model(): number;
1950
+ get displayValue(): string;
1923
1951
  modelChangeOnEnter: boolean;
1924
1952
  showPermanentLabel: boolean;
1925
1953
  leftIconData: SafeHtml | undefined;
@@ -1932,6 +1960,7 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1932
1960
  buttonShowMode: InputNumberPickerButtonShowMode;
1933
1961
  noValidation: boolean;
1934
1962
  set decimals(decimals: number);
1963
+ get decimals(): number;
1935
1964
  readonly modelChange: EventEmitter<number>;
1936
1965
  readonly iconClick: EventEmitter<MouseEvent>;
1937
1966
  get showButtonsOnFocusOnly(): boolean;
@@ -1944,6 +1973,8 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1944
1973
  plusSelected: boolean;
1945
1974
  private _numberInputHasFocus;
1946
1975
  private _changeFromButton;
1976
+ private _userTyping;
1977
+ private _displayValue;
1947
1978
  private _numberLogicValueChangeSub;
1948
1979
  private readonly _delayBeforeStartAutoCountMs;
1949
1980
  private readonly _stepFactors;
@@ -1954,13 +1985,14 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1954
1985
  private _autoCountTimeout;
1955
1986
  private _stepIncrementTimeout;
1956
1987
  private _startAutocountTimeout;
1957
- constructor(formComponent: FormComponent, iconCacheService: IconCacheService, overlayService: OverlayService, _ngZone: NgZone, changeDetector: ChangeDetectorRef, formUserChangeListener: FormInputUserModelChangeListenerService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
1988
+ constructor(formComponent: FormComponent, iconCacheService: IconCacheService, overlayService: OverlayService, _ngZone: NgZone, changeDetector: ChangeDetectorRef, formUserChangeListener: FormInputUserModelChangeListenerService, _numberLocale: NumberLocaleService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
1958
1989
  ngOnInit(): void;
1959
1990
  ngOnDestroy(): void;
1960
1991
  doIncrementAuto(): void;
1961
1992
  handleInputKeyDown(event: KeyboardEvent): boolean;
1993
+ protected _setNativeMaxLength(): void;
1962
1994
  handleBlur(): void;
1963
- handleChangeModel(value: number): void;
1995
+ handleChangeModel(text: string): void;
1964
1996
  doDecrementAuto(): void;
1965
1997
  stopAutoCounting(): void;
1966
1998
  setValue(newValue: number, silent?: boolean): void;
@@ -1971,7 +2003,7 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1971
2003
  private _doIncreaseStepFactor;
1972
2004
  private _getNextStepFactorMouseDown;
1973
2005
  private _updateButtonsShowState;
1974
- static ɵfac: i0.ɵɵFactoryDeclaration<InputNumberPickerComponent, [{ optional: true; }, null, null, null, null, null, null, null]>;
2006
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputNumberPickerComponent, [{ optional: true; }, null, null, null, null, null, null, null, null]>;
1975
2007
  static ɵcmp: i0.ɵɵComponentDeclaration<InputNumberPickerComponent, "co-input-number-picker", never, { "model": { "alias": "model"; "required": false; }; "modelChangeOnEnter": { "alias": "modelChangeOnEnter"; "required": false; }; "showPermanentLabel": { "alias": "showPermanentLabel"; "required": false; }; "leftIconData": { "alias": "leftIconData"; "required": false; }; "min": { "alias": "min"; "required": false; }; "step": { "alias": "step"; "required": false; }; "max": { "alias": "max"; "required": false; }; "ngModelOptions": { "alias": "ngModelOptions"; "required": false; }; "minusIcon": { "alias": "minusIcon"; "required": false; }; "plusIcon": { "alias": "plusIcon"; "required": false; }; "buttonShowMode": { "alias": "buttonShowMode"; "required": false; }; "noValidation": { "alias": "noValidation"; "required": false; }; "decimals": { "alias": "decimals"; "required": false; }; }, { "modelChange": "modelChange"; "iconClick": "iconClick"; }, never, never, false, never>;
1976
2008
  }
1977
2009
 
@@ -23,6 +23,7 @@
23
23
  opacity: 1;
24
24
  cursor: pointer;
25
25
  &.disabled {
26
+ pointer-events: none;
26
27
  cursor: default;
27
28
  opacity: 0.5;
28
29
  }
@@ -9,6 +9,7 @@
9
9
  cursor: pointer;
10
10
 
11
11
  &.disabled {
12
+ pointer-events: none;
12
13
  opacity: 0.6;
13
14
  cursor: default;
14
15
  background: #e3e3e3;
@@ -70,6 +70,14 @@
70
70
  width: 100%;
71
71
  border: none;
72
72
  text-align: $cc-co-input-number-picker-text-align;
73
+ // the component provides its own +/- buttons, so hide the native number spinners
74
+ -moz-appearance: textfield;
75
+ appearance: textfield;
76
+ &::-webkit-outer-spin-button,
77
+ &::-webkit-inner-spin-button {
78
+ -webkit-appearance: none;
79
+ margin: 0;
80
+ }
73
81
  &:focus {
74
82
  outline: none;
75
83
  }
@@ -1,8 +1,8 @@
1
- @include export-module('co-list-of-values-theme') {
2
- .co-list-of-values-popup {
3
- .lov-highlight {
4
- background-color: $cc-co-list-of-values-highlight-background-color;
5
- color: $cc-co-list-of-values-highlight-text-color;
6
- }
7
- }
8
- }
1
+ @include export-module('co-list-of-values-theme') {
2
+ .co-list-of-values-popup {
3
+ .lov-highlight {
4
+ background-color: $cc-co-list-of-values-highlight-background-color;
5
+ color: $cc-co-list-of-values-highlight-text-color;
6
+ }
7
+ }
8
+ }
@@ -194,6 +194,7 @@
194
194
  border-color: $cc-simple-grid-row-border-color;
195
195
 
196
196
  &.disabled {
197
+ pointer-events: none;
197
198
  opacity: $cc-simple-grid-row-disabled-opacity;
198
199
  background: $cc-simple-grid-row-disabled-background-color;
199
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/corecomponents_v12",
3
- "version": "300.1.0",
3
+ "version": "300.1.1",
4
4
  "description": "Colijn IT core components for Angular 12",
5
5
  "private": false,
6
6
  "peerDependencies": {