@colijnit/corecomponents_v12 261.20.17 → 261.20.18

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;
@@ -1451,6 +1471,7 @@ declare class InputTextComponent extends BaseInputComponent<any> implements Afte
1451
1471
  noStyle: boolean;
1452
1472
  hideArrowButtons: boolean;
1453
1473
  get isDate(): boolean;
1474
+ get hasValue(): boolean;
1454
1475
  leftIconClick: EventEmitter<MouseEvent>;
1455
1476
  leftIconMouseDown: EventEmitter<MouseEvent>;
1456
1477
  leftIconMouseUp: EventEmitter<MouseEvent>;
@@ -1466,13 +1487,19 @@ declare class InputTextComponent extends BaseInputComponent<any> implements Afte
1466
1487
  handleDocumentPointerUp(event: PointerEvent): void;
1467
1488
  set model(value: any);
1468
1489
  get model(): any;
1490
+ protected modelSet(): void;
1491
+ handleInputModelChange(value: any): void;
1469
1492
  get pipedModel(): any;
1493
+ get displayValue(): string;
1470
1494
  isFocusedOnDate: boolean;
1471
1495
  weekInputBuffer: string;
1472
1496
  isWeekInputMode: boolean;
1473
1497
  private _isLeftIconMouseDown;
1474
1498
  private _isRightIconMouseDown;
1475
- 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);
1502
+ ngAfterViewInit(): void;
1476
1503
  handleLeftIconClick(event: MouseEvent): void;
1477
1504
  handleLeftIconMouseDown(event: MouseEvent): void;
1478
1505
  handleLeftIconMouseUp(event: MouseEvent): void;
@@ -1484,11 +1511,12 @@ declare class InputTextComponent extends BaseInputComponent<any> implements Afte
1484
1511
  handleInputFocus(event: FocusEvent): void;
1485
1512
  handleBlur(event: FocusEvent): void;
1486
1513
  handleDoFocus(event: MouseEvent): void;
1514
+ protected _setNativeMaxLength(maxlength: number): void;
1487
1515
  clearInput(event: MouseEvent): void;
1488
1516
  handleKeyDownInput(event: KeyboardEvent): void;
1489
1517
  private convertWeekToDate;
1490
1518
  private formatDateLocal;
1491
- 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]>;
1492
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>;
1493
1521
  }
1494
1522
 
@@ -1914,10 +1942,12 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1914
1942
  iconCacheService: IconCacheService;
1915
1943
  protected overlayService: OverlayService;
1916
1944
  private _ngZone;
1945
+ private _numberLocale;
1917
1946
  protected ngZoneWrapper?: NgZoneWrapperService;
1918
1947
  elementRef?: ElementRef;
1919
1948
  set model(model: number);
1920
1949
  get model(): number;
1950
+ get displayValue(): string;
1921
1951
  modelChangeOnEnter: boolean;
1922
1952
  showPermanentLabel: boolean;
1923
1953
  leftIconData: SafeHtml | undefined;
@@ -1930,6 +1960,7 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1930
1960
  buttonShowMode: InputNumberPickerButtonShowMode;
1931
1961
  noValidation: boolean;
1932
1962
  set decimals(decimals: number);
1963
+ get decimals(): number;
1933
1964
  readonly modelChange: EventEmitter<number>;
1934
1965
  readonly iconClick: EventEmitter<MouseEvent>;
1935
1966
  get showButtonsOnFocusOnly(): boolean;
@@ -1942,6 +1973,8 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1942
1973
  plusSelected: boolean;
1943
1974
  private _numberInputHasFocus;
1944
1975
  private _changeFromButton;
1976
+ private _userTyping;
1977
+ private _displayValue;
1945
1978
  private _numberLogicValueChangeSub;
1946
1979
  private readonly _delayBeforeStartAutoCountMs;
1947
1980
  private readonly _stepFactors;
@@ -1952,13 +1985,14 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1952
1985
  private _autoCountTimeout;
1953
1986
  private _stepIncrementTimeout;
1954
1987
  private _startAutocountTimeout;
1955
- 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);
1956
1989
  ngOnInit(): void;
1957
1990
  ngOnDestroy(): void;
1958
1991
  doIncrementAuto(): void;
1959
1992
  handleInputKeyDown(event: KeyboardEvent): boolean;
1993
+ protected _setNativeMaxLength(): void;
1960
1994
  handleBlur(): void;
1961
- handleChangeModel(value: number): void;
1995
+ handleChangeModel(text: string): void;
1962
1996
  doDecrementAuto(): void;
1963
1997
  stopAutoCounting(): void;
1964
1998
  setValue(newValue: number, silent?: boolean): void;
@@ -1969,7 +2003,7 @@ declare class InputNumberPickerComponent extends BaseInputComponent<number> impl
1969
2003
  private _doIncreaseStepFactor;
1970
2004
  private _getNextStepFactorMouseDown;
1971
2005
  private _updateButtonsShowState;
1972
- 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]>;
1973
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>;
1974
2008
  }
1975
2009
 
@@ -2707,6 +2741,17 @@ declare class ViewModeButtonsModule {
2707
2741
  static ɵinj: i0.ɵɵInjectorDeclaration<ViewModeButtonsModule>;
2708
2742
  }
2709
2743
 
2744
+ interface LovHighlightPart {
2745
+ text: string;
2746
+ match: boolean;
2747
+ }
2748
+
2749
+ declare class LovUtils {
2750
+ static getDisplayValue(model: any, displayField: string): string;
2751
+ static getHighlightParts(value: string, term: string): LovHighlightPart[];
2752
+ private static _escapeRegExp;
2753
+ }
2754
+
2710
2755
  declare class ListOfValuesComponent extends BaseInputComponent<any> implements OnInit {
2711
2756
  formComponent: FormComponent;
2712
2757
  iconCacheService: IconCacheService;
@@ -2716,6 +2761,7 @@ declare class ListOfValuesComponent extends BaseInputComponent<any> implements O
2716
2761
  protected ngZoneWrapper?: NgZoneWrapperService;
2717
2762
  elementRef?: ElementRef;
2718
2763
  readonly icons: typeof CoreComponentsIcon;
2764
+ readonly lovUtils: typeof LovUtils;
2719
2765
  set model(value: any);
2720
2766
  get model(): any;
2721
2767
  parentForOverlay: ElementRef;
@@ -2742,12 +2788,15 @@ declare class ListOfValuesComponent extends BaseInputComponent<any> implements O
2742
2788
  isLoading: boolean;
2743
2789
  private _collection;
2744
2790
  private debounceTimeout;
2791
+ private _filterRequestId;
2745
2792
  private _lovPopupComponentRef;
2746
2793
  constructor(formComponent: FormComponent, iconCacheService: IconCacheService, changeDetector: ChangeDetectorRef, overlayService: OverlayService, formUserChangeListener?: FormInputUserModelChangeListenerService, ngZoneWrapper?: NgZoneWrapperService, elementRef?: ElementRef);
2747
2794
  ngOnInit(): void;
2795
+ get inputModel(): any;
2796
+ handleModelChange(model: string): void;
2748
2797
  handleInputModelChange(model: string): void;
2749
2798
  onModelChange(model: string): void;
2750
- applyFilter(text: string): Promise<[]>;
2799
+ applyFilter(text: string, requestId?: number): Promise<void>;
2751
2800
  handleInputKeyDown(event: KeyboardEvent): boolean;
2752
2801
  clearModel(event: MouseEvent): void;
2753
2802
  toggleSelect(): void;
@@ -2764,6 +2813,7 @@ declare class ListOfValuesComponent extends BaseInputComponent<any> implements O
2764
2813
  interface lovViewModel {
2765
2814
  checked: boolean;
2766
2815
  model: any;
2816
+ highlightParts?: LovHighlightPart[];
2767
2817
  }
2768
2818
  declare class ListOfValuesPopupComponent implements OnInit {
2769
2819
  iconCacheService: IconCacheService;
@@ -3138,7 +3188,7 @@ declare class PrependPipeModule {
3138
3188
 
3139
3189
  declare class FilterItemModule {
3140
3190
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterItemModule, never>;
3141
- static ɵmod: i0.ɵɵNgModuleDeclaration<FilterItemModule, [typeof FilterItemComponent], [typeof i2.CommonModule, typeof CollapsibleModule, typeof InputTextModule, typeof InputCheckboxModule, typeof IconModule, typeof i7.ScrollingModule, typeof AppendPipeModule, typeof PrependPipeModule, typeof InputTextModule, typeof InputRadioButtonModule, typeof InputTextModule, typeof CoreComponentsTranslationModule, typeof InputDatePickerModule, typeof InputDateRangePickerModule], [typeof FilterItemComponent]>;
3191
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FilterItemModule, [typeof FilterItemComponent], [typeof i2.CommonModule, typeof CollapsibleModule, typeof InputTextModule, typeof InputCheckboxModule, typeof IconModule, typeof i7.ScrollingModule, typeof AppendPipeModule, typeof PrependPipeModule, typeof InputRadioButtonModule, typeof CoreComponentsTranslationModule, typeof InputDatePickerModule, typeof InputDateRangePickerModule], [typeof FilterItemComponent]>;
3142
3192
  static ɵinj: i0.ɵɵInjectorDeclaration<FilterItemModule>;
3143
3193
  }
3144
3194
 
@@ -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
  }
@@ -172,6 +172,10 @@
172
172
  border-bottom: none;
173
173
  }
174
174
 
175
+ .lov-highlight {
176
+ font-weight: $cc-co-list-of-values-highlight-font-weight;
177
+ }
178
+
175
179
  .lov-options li:hover {
176
180
  //color: $cc-co-list-of-values-lov-options-li-hover-text-color;
177
181
  background-color: $cc-co-list-of-values-lov-options-li-hover;
@@ -23,6 +23,10 @@ $cc-co-list-of-values-lov-options-li-hover-text-color: $cc-color-input-lov !defa
23
23
  $cc-co-list-of-values-lov-options-li-selected: $cc-color-grey !default;
24
24
  $cc-co-list-of-values-lov-options-li-selected-text-color: $cc-color-input-lov !default;
25
25
 
26
+ $cc-co-list-of-values-highlight-font-weight: 700 !default;
27
+ $cc-co-list-of-values-highlight-background-color: transparent !default;
28
+ $cc-co-list-of-values-highlight-text-color: $cc-color-font !default;
29
+
26
30
  $cc-co-list-of-values-multiselect-chips-padding: 0 10px 10px 10px !default;
27
31
  $cc-co-list-of-values-multiselect-chips-column-gap: 5px !default;
28
32
  $cc-co-list-of-values-multiselect-chips-row-gap: 2px !default;
@@ -0,0 +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
+ }
@@ -196,6 +196,7 @@
196
196
  border-color: $cc-simple-grid-row-border-color;
197
197
 
198
198
  &.disabled {
199
+ pointer-events: none;
199
200
  opacity: $cc-simple-grid-row-disabled-opacity;
200
201
  background: $cc-simple-grid-row-disabled-background-color;
201
202
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/corecomponents_v12",
3
- "version": "261.20.17",
3
+ "version": "261.20.18",
4
4
  "description": "Colijn IT core components for Angular 12",
5
5
  "private": false,
6
6
  "peerDependencies": {