@koobiq/components 18.9.0 → 18.10.0
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/autocomplete/autocomplete-trigger.directive.d.ts +5 -3
- package/badge/_badge-theme.scss +1 -1
- package/code-block/code-block-content.d.ts +4 -4
- package/code-block/code-block.component.d.ts +3 -0
- package/core/common-behaviors/common-module.d.ts +2 -2
- package/core/forms/forms-tokens.scss +1 -1
- package/core/services/measure-scrollbar.service.d.ts +2 -2
- package/core/services/theme.service.d.ts +4 -3
- package/datepicker/datepicker.component.d.ts +3 -3
- package/dl/dl.scss +1 -1
- package/dropdown/dropdown-content.directive.d.ts +2 -2
- package/dropdown/dropdown-trigger.directive.d.ts +1 -0
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +13 -17
- package/esm2022/badge/badge.component.mjs +2 -2
- package/esm2022/code-block/code-block-content.mjs +22 -11
- package/esm2022/code-block/code-block.component.mjs +12 -6
- package/esm2022/core/common-behaviors/common-module.mjs +14 -12
- package/esm2022/core/services/measure-scrollbar.service.mjs +7 -12
- package/esm2022/core/services/theme.service.mjs +10 -8
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/datepicker.component.mjs +6 -11
- package/esm2022/dl/dl.component.mjs +2 -2
- package/esm2022/dropdown/dropdown-content.directive.mjs +6 -9
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +8 -5
- package/esm2022/file-upload/multiple-file-upload.component.mjs +3 -3
- package/esm2022/file-upload/single-file-upload.component.mjs +3 -3
- package/esm2022/form-field/cleaner.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +2 -2
- package/esm2022/form-field/password-hint.mjs +3 -3
- package/esm2022/form-field/password-toggle.mjs +3 -3
- package/esm2022/form-field/stepper.mjs +5 -1
- package/esm2022/icon/icon-button.component.mjs +3 -3
- package/esm2022/icon/icon-item.component.mjs +4 -4
- package/esm2022/icon/icon.component.mjs +5 -5
- package/esm2022/markdown/markdown.component.mjs +2 -2
- package/esm2022/modal/modal.component.mjs +8 -11
- package/esm2022/navbar/navbar-item.component.mjs +31 -32
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/select/select.component.mjs +5 -4
- package/esm2022/sidebar/sidebar.component.mjs +8 -7
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +6 -3
- package/esm2022/tags/tag-input.mjs +2 -3
- package/esm2022/textarea/textarea.component.mjs +8 -5
- package/esm2022/timezone/timezone-select.component.mjs +3 -3
- package/esm2022/tree/toggle.mjs +6 -5
- package/esm2022/tree/tree-selection.component.mjs +2 -2
- package/esm2022/tree/tree.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +7 -7
- package/fesm2022/koobiq-components-autocomplete.mjs +12 -16
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -2
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +29 -13
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +26 -29
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +4 -9
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +2 -2
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +10 -10
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +4 -4
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +12 -8
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +9 -9
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +2 -2
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +7 -10
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +30 -32
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +4 -3
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +6 -6
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +5 -2
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -2
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -4
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +6 -6
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +9 -8
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +2 -2
- package/form-field/_form-field-theme.scss +7 -0
- package/form-field/form-field-tokens.scss +3 -1
- package/icon/_icon-item-theme.scss +3 -0
- package/icon/_icon-theme.scss +3 -1
- package/markdown/_markdown-theme.scss +15 -3
- package/markdown/markdown-tokens.scss +1 -2
- package/markdown/markdown.scss +3 -4
- package/modal/modal.component.d.ts +2 -2
- package/navbar/navbar-item.component.d.ts +7 -7
- package/package.json +4 -4
- package/popover/popover.scss +4 -0
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/ng-add/index.js +3 -3
- package/select/select.component.d.ts +1 -0
- package/sidebar/sidebar.component.d.ts +1 -0
- package/sidepanel/sidepanel-config.d.ts +2 -0
- package/sidepanel/sidepanel-container.component.d.ts +1 -0
- package/textarea/textarea.component.d.ts +1 -0
- package/tree/_tree-theme.scss +2 -1
- package/tree-select/tree-select.component.d.ts +1 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { trigger, state, style, transition, animate, group } from '@angular/animations';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, isDevMode, NgModule, Optional, Inject,
|
|
3
|
+
import { InjectionToken, inject, isDevMode, NgModule, Optional, Inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, DestroyRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Input, EventEmitter, ViewChild, Output, Renderer2, ChangeDetectorRef, TemplateRef, ElementRef, NgZone, ViewContainerRef, RendererFactory2, Version } from '@angular/core';
|
|
4
4
|
import { BidiModule, Directionality } from '@angular/cdk/bidi';
|
|
5
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
6
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
6
7
|
import * as i1 from '@koobiq/date-adapter';
|
|
7
8
|
import { DateAdapter as DateAdapter$1 } from '@koobiq/date-adapter';
|
|
8
9
|
import { DateFormatter as DateFormatter$1 } from '@koobiq/date-formatter';
|
|
9
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
10
10
|
import { BehaviorSubject, Subject, Subscription, pairwise } from 'rxjs';
|
|
11
11
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
12
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -139,12 +139,9 @@ function mcSanityChecksFactory() {
|
|
|
139
139
|
class KbqCommonModule {
|
|
140
140
|
constructor(_sanityChecksEnabled) {
|
|
141
141
|
this._sanityChecksEnabled = _sanityChecksEnabled;
|
|
142
|
+
this.document = inject(DOCUMENT);
|
|
142
143
|
// Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype).
|
|
143
144
|
this.hasDoneGlobalChecks = false;
|
|
144
|
-
// Reference to the global `document` object.
|
|
145
|
-
this._document = typeof document === 'object' && document ? document : null;
|
|
146
|
-
// Reference to the global 'window' object.
|
|
147
|
-
this._window = typeof window === 'object' && window ? window : null;
|
|
148
145
|
if (this.areChecksEnabled() && !this.hasDoneGlobalChecks) {
|
|
149
146
|
this.checkDoctypeIsDefined();
|
|
150
147
|
this.checkThemeIsPresent();
|
|
@@ -157,19 +154,20 @@ class KbqCommonModule {
|
|
|
157
154
|
}
|
|
158
155
|
// Whether the code is running in tests.
|
|
159
156
|
isTestEnv() {
|
|
160
|
-
|
|
157
|
+
const window = this.getWindow();
|
|
158
|
+
return !!(window && (window['__karma__'] || window['jasmine'] || window['__jest__']));
|
|
161
159
|
}
|
|
162
160
|
checkDoctypeIsDefined() {
|
|
163
|
-
if (this.
|
|
161
|
+
if (this.document && !this.document.doctype) {
|
|
164
162
|
console.warn('Current document does not have a doctype. This may cause ' +
|
|
165
163
|
'some koobiq components not to behave as expected.');
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
166
|
checkThemeIsPresent() {
|
|
169
|
-
if (this.
|
|
170
|
-
const testElement = this.
|
|
167
|
+
if (this.document && typeof getComputedStyle === 'function') {
|
|
168
|
+
const testElement = this.document.createElement('div');
|
|
171
169
|
testElement.classList.add('kbq-theme-loaded-marker');
|
|
172
|
-
this.
|
|
170
|
+
this.document.body.appendChild(testElement);
|
|
173
171
|
const computedStyle = getComputedStyle(testElement);
|
|
174
172
|
// In some situations, the computed style of the test element can be null. For example in
|
|
175
173
|
// Firefox, the computed style is null if an application is running inside of a hidden iframe.
|
|
@@ -179,9 +177,12 @@ class KbqCommonModule {
|
|
|
179
177
|
'components may not work as expected. For more info refer ' +
|
|
180
178
|
'to the theming guide: https://koobiq.io/main/theming/overview');
|
|
181
179
|
}
|
|
182
|
-
this.
|
|
180
|
+
this.document.body.removeChild(testElement);
|
|
183
181
|
}
|
|
184
182
|
}
|
|
183
|
+
getWindow() {
|
|
184
|
+
return this.document?.defaultView || window;
|
|
185
|
+
}
|
|
185
186
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCommonModule, deps: [{ token: KBQ_SANITY_CHECKS, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
186
187
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.6", ngImport: i0, type: KbqCommonModule, imports: [BidiModule], exports: [BidiModule] }); }
|
|
187
188
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqCommonModule, imports: [BidiModule, BidiModule] }); }
|
|
@@ -3473,8 +3474,8 @@ class KbqMeasureScrollbarService {
|
|
|
3473
3474
|
this.initScrollBarWidth();
|
|
3474
3475
|
return this._scrollBarWidth;
|
|
3475
3476
|
}
|
|
3476
|
-
constructor(
|
|
3477
|
-
this.document =
|
|
3477
|
+
constructor() {
|
|
3478
|
+
this.document = inject(DOCUMENT);
|
|
3478
3479
|
this.scrollbarMeasure = {
|
|
3479
3480
|
position: 'absolute',
|
|
3480
3481
|
top: '-9999px',
|
|
@@ -3496,18 +3497,13 @@ class KbqMeasureScrollbarService {
|
|
|
3496
3497
|
this.document.body.removeChild(scrollDiv);
|
|
3497
3498
|
this._scrollBarWidth = width;
|
|
3498
3499
|
}
|
|
3499
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqMeasureScrollbarService, deps: [
|
|
3500
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqMeasureScrollbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3500
3501
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqMeasureScrollbarService, providedIn: 'root' }); }
|
|
3501
3502
|
}
|
|
3502
3503
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqMeasureScrollbarService, decorators: [{
|
|
3503
3504
|
type: Injectable,
|
|
3504
|
-
args: [{
|
|
3505
|
-
|
|
3506
|
-
}]
|
|
3507
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3508
|
-
type: Inject,
|
|
3509
|
-
args: [DOCUMENT]
|
|
3510
|
-
}] }] });
|
|
3505
|
+
args: [{ providedIn: 'root' }]
|
|
3506
|
+
}], ctorParameters: () => [] });
|
|
3511
3507
|
|
|
3512
3508
|
/**
|
|
3513
3509
|
* Enum representing the available themes for the Koobiq design system.
|
|
@@ -3539,17 +3535,18 @@ const KbqDefaultThemes = [
|
|
|
3539
3535
|
}
|
|
3540
3536
|
];
|
|
3541
3537
|
class ThemeService {
|
|
3542
|
-
constructor(
|
|
3543
|
-
this.
|
|
3538
|
+
constructor() {
|
|
3539
|
+
this.document = inject(DOCUMENT);
|
|
3540
|
+
this.rendererFactory = inject(RendererFactory2);
|
|
3544
3541
|
this.current = new BehaviorSubject(null);
|
|
3545
3542
|
this.themes = KbqDefaultThemes;
|
|
3546
3543
|
this.update = ([prev, current]) => {
|
|
3547
3544
|
if (prev) {
|
|
3548
3545
|
prev.selected = false;
|
|
3549
|
-
this.renderer.removeClass(document.body, prev.className);
|
|
3546
|
+
this.renderer.removeClass(this.document.body, prev.className);
|
|
3550
3547
|
}
|
|
3551
3548
|
if (current) {
|
|
3552
|
-
this.renderer.addClass(document.body, current.className);
|
|
3549
|
+
this.renderer.addClass(this.document.body, current.className);
|
|
3553
3550
|
current.selected = true;
|
|
3554
3551
|
}
|
|
3555
3552
|
};
|
|
@@ -3576,13 +3573,13 @@ class ThemeService {
|
|
|
3576
3573
|
getTheme() {
|
|
3577
3574
|
return this.current.value;
|
|
3578
3575
|
}
|
|
3579
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ThemeService, deps: [
|
|
3576
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3580
3577
|
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
3581
3578
|
}
|
|
3582
3579
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: ThemeService, decorators: [{
|
|
3583
3580
|
type: Injectable,
|
|
3584
3581
|
args: [{ providedIn: 'root' }]
|
|
3585
|
-
}], ctorParameters: () => [
|
|
3582
|
+
}], ctorParameters: () => [] });
|
|
3586
3583
|
|
|
3587
3584
|
var MeasurementSystem;
|
|
3588
3585
|
(function (MeasurementSystem) {
|
|
@@ -3693,7 +3690,7 @@ const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', {
|
|
|
3693
3690
|
factory: () => ({ useValidation: true })
|
|
3694
3691
|
});
|
|
3695
3692
|
|
|
3696
|
-
const VERSION = new Version('18.
|
|
3693
|
+
const VERSION = new Version('18.10.0+sha-d875aa1');
|
|
3697
3694
|
|
|
3698
3695
|
/**
|
|
3699
3696
|
* Generated bundle index. Do not edit.
|