@koobiq/components 18.39.3 → 18.39.4
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/checkbox/checkbox.scss +5 -5
- package/code-block/code-block.d.ts +10 -3
- package/code-block/code-block.module.d.ts +1 -1
- package/code-block/code-block.scss +1 -0
- package/code-block/types.d.ts +9 -0
- package/core/pop-up/pop-up-trigger.d.ts +4 -1
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +2 -2
- package/esm2022/checkbox/checkbox.mjs +2 -2
- package/esm2022/code-block/code-block.mjs +23 -6
- package/esm2022/code-block/code-block.module.mjs +8 -5
- package/esm2022/code-block/types.mjs +1 -1
- package/esm2022/core/locales/en-US.mjs +2 -2
- package/esm2022/core/locales/es-LA.mjs +2 -2
- package/esm2022/core/locales/pt-BR.mjs +2 -2
- package/esm2022/core/locales/ru-RU.mjs +2 -2
- package/esm2022/core/locales/tk-TM.mjs +2 -2
- package/esm2022/core/pop-up/pop-up-trigger.mjs +11 -3
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-date.mjs +7 -8
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +8 -9
- package/esm2022/filter-bar/pipes/pipe-text.mjs +3 -3
- package/esm2022/form-field/cleaner.mjs +3 -3
- package/esm2022/form-field/password-toggle.mjs +3 -3
- package/esm2022/form-field/stepper.mjs +3 -1
- package/esm2022/icon/icon-button.component.mjs +2 -2
- package/esm2022/input/input-password.mjs +5 -4
- package/esm2022/input/input.mjs +5 -4
- package/esm2022/navbar/navbar-item.component.mjs +9 -2
- package/esm2022/progress-spinner/progress-spinner.component.mjs +4 -3
- package/esm2022/search-expandable/search-expandable.mjs +3 -3
- package/esm2022/select/select.component.mjs +4 -3
- package/esm2022/tabs/tab-header.component.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar.mjs +3 -3
- package/esm2022/tags/tag-input.mjs +15 -19
- package/esm2022/tags/tag-list.component.mjs +4 -3
- package/esm2022/textarea/textarea.component.mjs +4 -3
- package/esm2022/title/title.directive.mjs +16 -3
- package/esm2022/tooltip/tooltip.component.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +4 -3
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +29 -9
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +15 -7
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +22 -22
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +6 -4
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +6 -4
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +8 -1
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +3 -2
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +2 -2
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +3 -2
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +4 -4
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +15 -18
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +3 -2
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +15 -2
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +3 -2
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/filter-bar/pipes/pipe-date.scss +3 -15
- package/icon/icon-button.scss +4 -0
- package/input/input-password.d.ts +1 -0
- package/input/input.d.ts +1 -0
- package/navbar/navbar-item.component.d.ts +3 -1
- package/package.json +10 -10
- package/progress-spinner/_progress-spinner-theme.scss +14 -4
- package/progress-spinner/progress-spinner-tokens.scss +2 -0
- package/schematics/ng-add/index.js +2 -2
- package/select/select.component.d.ts +1 -0
- package/tabs/_tabs-common.scss +2 -1
- package/tags/tag-input.d.ts +4 -3
- package/tags/tag-list.component.d.ts +1 -0
- package/textarea/textarea.component.d.ts +1 -0
- package/title/title.directive.d.ts +3 -0
- package/tree-select/tree-select.component.d.ts +1 -0
|
@@ -5,7 +5,7 @@ import * as i3 from '@angular/forms';
|
|
|
5
5
|
import { hasModifierKey, isSelectAll, ENTER as ENTER$1, TAB as TAB$1, SPACE as SPACE$1, COMMA, SEMICOLON } from '@koobiq/cdk/keycodes';
|
|
6
6
|
import * as i3$1 from '@koobiq/components/autocomplete';
|
|
7
7
|
import * as i1 from '@koobiq/components/core';
|
|
8
|
-
import { KbqFieldSizingContent, KbqColorDirective, KbqComponentColors, isNull, KBQ_TITLE_TEXT_REF,
|
|
8
|
+
import { KbqFieldSizingContent, KbqColorDirective, KbqComponentColors, isNull, KBQ_TITLE_TEXT_REF, KBQ_VALIDATION } from '@koobiq/components/core';
|
|
9
9
|
import * as i1$1 from '@koobiq/components/form-field';
|
|
10
10
|
import { KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
11
11
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
@@ -828,6 +828,7 @@ class KbqTagList {
|
|
|
828
828
|
this.parentForm = parentForm;
|
|
829
829
|
this.parentFormGroup = parentFormGroup;
|
|
830
830
|
this.ngControl = ngControl;
|
|
831
|
+
this.useLegacyValidation = inject(KBQ_VALIDATION, { optional: true })?.useValidation ?? false;
|
|
831
832
|
this.dropList = inject(CdkDropList, { host: true });
|
|
832
833
|
this.destroyRef = inject(DestroyRef);
|
|
833
834
|
this.focusMonitor = inject(FocusMonitor);
|
|
@@ -1288,7 +1289,7 @@ class KbqTagList {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
/** Revalidate control. */
|
|
1290
1291
|
revalidate() {
|
|
1291
|
-
if (this.ngControl?.control) {
|
|
1292
|
+
if (this.useLegacyValidation && this.ngControl?.control) {
|
|
1292
1293
|
const control = this.ngControl.control;
|
|
1293
1294
|
control.updateValueAndValidity({ emitEvent: false });
|
|
1294
1295
|
control.statusChanges.emit(control.status);
|
|
@@ -1416,7 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1416
1417
|
}]
|
|
1417
1418
|
}] } });
|
|
1418
1419
|
|
|
1419
|
-
const
|
|
1420
|
+
const KBQ_TAG_INPUT_DEFAULT_SEPARATORS = {
|
|
1420
1421
|
[ENTER$1]: { symbol: /\r?\n/, key: 'Enter' },
|
|
1421
1422
|
[TAB$1]: { symbol: /\t/, key: 'Tab' },
|
|
1422
1423
|
[SPACE$1]: { symbol: / /, key: ' ' },
|
|
@@ -1438,6 +1439,7 @@ class KbqTagInput {
|
|
|
1438
1439
|
set separatorKeyCodes(value) {
|
|
1439
1440
|
this._separatorKeyCodes = value || [];
|
|
1440
1441
|
}
|
|
1442
|
+
/** @docs-private */
|
|
1441
1443
|
get separators() {
|
|
1442
1444
|
return this._separatorKeyCodes.reduce((acc, key) => {
|
|
1443
1445
|
const separator = this.getSeparatorByKeyCode(key);
|
|
@@ -1460,15 +1462,6 @@ class KbqTagInput {
|
|
|
1460
1462
|
set addOnBlur(value) {
|
|
1461
1463
|
this._addOnBlur = coerceBooleanProperty(value);
|
|
1462
1464
|
}
|
|
1463
|
-
/**
|
|
1464
|
-
* Whether the tagEnd event will be emitted when the text pasted.
|
|
1465
|
-
*/
|
|
1466
|
-
get addOnPaste() {
|
|
1467
|
-
return this._addOnPaste;
|
|
1468
|
-
}
|
|
1469
|
-
set addOnPaste(value) {
|
|
1470
|
-
this._addOnPaste = coerceBooleanProperty(value);
|
|
1471
|
-
}
|
|
1472
1465
|
/** Whether the input is disabled. */
|
|
1473
1466
|
get disabled() {
|
|
1474
1467
|
return this._disabled || (this._tagList && this._tagList.disabled);
|
|
@@ -1489,6 +1482,7 @@ class KbqTagInput {
|
|
|
1489
1482
|
/** Whether the control is focused. */
|
|
1490
1483
|
this.focused = false;
|
|
1491
1484
|
this._separatorKeyCodes = this.defaultOptions.separatorKeyCodes;
|
|
1485
|
+
this._separators = this.defaultOptions.separators || KBQ_TAG_INPUT_DEFAULT_SEPARATORS;
|
|
1492
1486
|
/** Emitted when a tag is to be added. */
|
|
1493
1487
|
this.tagEnd = new EventEmitter();
|
|
1494
1488
|
/** A value indicating whether allow/prevent tags duplication */
|
|
@@ -1498,6 +1492,11 @@ class KbqTagInput {
|
|
|
1498
1492
|
/** Unique id for the input. */
|
|
1499
1493
|
this.id = `kbq-tag-list-input-${nextUniqueId++}`;
|
|
1500
1494
|
this._addOnBlur = true;
|
|
1495
|
+
/**
|
|
1496
|
+
* Whether the tagEnd event will be emitted when the text pasted.
|
|
1497
|
+
* @default true
|
|
1498
|
+
*/
|
|
1499
|
+
this.addOnPaste = this.defaultOptions.addOnPaste ?? true;
|
|
1501
1500
|
this._disabled = false;
|
|
1502
1501
|
/**
|
|
1503
1502
|
* @docs-private
|
|
@@ -1506,8 +1505,6 @@ class KbqTagInput {
|
|
|
1506
1505
|
*/
|
|
1507
1506
|
this.countOfSymbolsForUpdateWidth = 3;
|
|
1508
1507
|
this.inputElement = this.elementRef.nativeElement;
|
|
1509
|
-
this._separators = this.defaultOptions.separators || KbqTagInputDefaultSeparators;
|
|
1510
|
-
this._addOnPaste = isBoolean(this.defaultOptions.addOnPaste) ? this.defaultOptions.addOnPaste : true;
|
|
1511
1508
|
}
|
|
1512
1509
|
ngOnChanges() {
|
|
1513
1510
|
this._tagList.stateChanges.next();
|
|
@@ -1603,8 +1600,8 @@ class KbqTagInput {
|
|
|
1603
1600
|
}
|
|
1604
1601
|
getSeparatorsForString(value) {
|
|
1605
1602
|
return this.separators
|
|
1606
|
-
.filter((separator) => value.search(separator.
|
|
1607
|
-
.map((separator) => separator.
|
|
1603
|
+
.filter((separator) => value.search(separator.symbol) > -1)
|
|
1604
|
+
.map((separator) => separator.symbol.source);
|
|
1608
1605
|
}
|
|
1609
1606
|
trimValue(value) {
|
|
1610
1607
|
return this.trimDirective ? this.trimDirective.trim(value) : value;
|
|
@@ -1624,7 +1621,7 @@ class KbqTagInput {
|
|
|
1624
1621
|
return this.separators.some((separator) => separator.key === event.key && !event.shiftKey);
|
|
1625
1622
|
}
|
|
1626
1623
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagInput, deps: [{ token: i0.ElementRef }, { token: KBQ_TAGS_DEFAULT_OPTIONS }, { token: i1$1.KbqTrim, optional: true, self: true }, { token: i3.NgControl, optional: true, self: true }, { token: i3$1.KbqAutocompleteTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1627
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1624
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.14", type: KbqTagInput, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: ["kbqTagInputSeparatorKeyCodes", "separatorKeyCodes"], distinct: "distinct", placeholder: "placeholder", id: "id", tagList: ["kbqTagInputFor", "tagList"], addOnBlur: ["kbqTagInputAddOnBlur", "addOnBlur"], addOnPaste: ["kbqTagInputAddOnPaste", "addOnPaste", booleanAttribute], disabled: "disabled" }, outputs: { tagEnd: "kbqTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur($event)", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder || null" }, classAttribute: "kbq-tag-input" }, exportAs: ["kbqTagInput", "kbqTagInputFor"], usesOnChanges: true, hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
1628
1625
|
}
|
|
1629
1626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagInput, decorators: [{
|
|
1630
1627
|
type: Directive,
|
|
@@ -1679,7 +1676,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1679
1676
|
args: ['kbqTagInputAddOnBlur']
|
|
1680
1677
|
}], addOnPaste: [{
|
|
1681
1678
|
type: Input,
|
|
1682
|
-
args: ['kbqTagInputAddOnPaste']
|
|
1679
|
+
args: [{ alias: 'kbqTagInputAddOnPaste', transform: booleanAttribute }]
|
|
1683
1680
|
}], disabled: [{
|
|
1684
1681
|
type: Input
|
|
1685
1682
|
}] } });
|