@koobiq/components 19.8.0 → 19.8.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.
- package/breadcrumbs/breadcrumbs.d.ts +22 -29
- package/breadcrumbs/breadcrumbs.scss +7 -0
- package/button/_button-base.scss +20 -0
- package/button/_button-theme.scss +3 -11
- package/button/button-slots.d.ts +11 -0
- package/button/button.component.d.ts +28 -13
- package/button/button.module.d.ts +3 -2
- package/button/button.scss +0 -11
- package/button/public-api.d.ts +1 -0
- package/code-block/code-block.d.ts +6 -2
- package/core/locales/en-US.d.ts +1 -0
- package/core/locales/es-LA.d.ts +1 -0
- package/core/locales/locale-service.d.ts +5 -0
- package/core/locales/pt-BR.d.ts +1 -0
- package/core/locales/ru-RU.d.ts +1 -0
- package/core/locales/tk-TM.d.ts +1 -0
- package/core/option/_option-theme.scss +5 -14
- package/core/pop-up/constants.d.ts +2 -2
- package/dropdown/_dropdown-theme.scss +4 -8
- package/dropdown/dropdown-trigger.directive.d.ts +11 -0
- package/dropdown/dropdown.component.d.ts +8 -0
- package/dropdown/dropdown.scss +4 -0
- package/fesm2022/koobiq-components-breadcrumbs.mjs +101 -88
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +176 -68
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +27 -2
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +14 -10
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +46 -10
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +8 -8
- package/fesm2022/koobiq-components-filter-bar.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-navbar.mjs +11 -7
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +155 -18
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +1 -1
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +3 -1
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +31 -10
- package/fesm2022/koobiq-components-tabs.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-top-bar.mjs +7 -2
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +2 -2
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +6 -6
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/filter-bar/_filter-bar-theme.scss +0 -4
- package/icon/icon-item-tokens.scss +1 -1
- package/navbar/navbar-item.scss +9 -0
- package/notification-center/_notification-center-theme.scss +2 -1
- package/notification-center/notification-center.d.ts +29 -1
- package/notification-center/notification-center.scss +28 -3
- package/notification-center/notification-center.service.d.ts +44 -1
- package/notification-center/notification-item.scss +1 -1
- package/package.json +9 -9
- 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 +2 -2
- package/tabs/_tabs-common.scss +31 -1
- package/tabs/_tabs-theme.scss +2 -2
- package/tabs/tab-header.component.d.ts +2 -0
- package/tabs/tab-label.directive.d.ts +3 -1
- package/tabs/tab.component.d.ts +2 -0
- package/tree/_tree-theme.scss +4 -0
- package/tree-select/_tree-select-theme.scss +39 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
--kbq-icon-item-filled-fade-off-contrast-background: var(--kbq-background-contrast);
|
|
11
11
|
--kbq-icon-item-filled-fade-off-error-color: var(--kbq-icon-white);
|
|
12
12
|
--kbq-icon-item-filled-fade-off-error-background: var(--kbq-background-error);
|
|
13
|
-
--kbq-icon-item-filled-fade-off-warning-color: var(--kbq-icon-
|
|
13
|
+
--kbq-icon-item-filled-fade-off-warning-color: var(--kbq-icon-contrast);
|
|
14
14
|
--kbq-icon-item-filled-fade-off-warning-background: var(--kbq-background-warning);
|
|
15
15
|
--kbq-icon-item-filled-fade-off-success-color: var(--kbq-icon-white);
|
|
16
16
|
--kbq-icon-item-filled-fade-off-success-background: var(--kbq-background-success);
|
package/navbar/navbar-item.scss
CHANGED
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
min-height: var(--kbq-size-l);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// Filled fade-contrast only: its background is a semi-transparent tint, so the
|
|
24
|
+
// navbar icon shows through. Composite the tint over an opaque bg-tertiary substrate.
|
|
25
|
+
// The outline variant is intentionally left untouched — it stays a clean transparent outline.
|
|
26
|
+
& .kbq-badge-filled.kbq-badge_fade-contrast {
|
|
27
|
+
background:
|
|
28
|
+
linear-gradient(var(--kbq-background-contrast-fade), var(--kbq-background-contrast-fade)),
|
|
29
|
+
var(--kbq-background-bg-tertiary);
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
& .kbq-button-icon {
|
|
24
33
|
position: absolute;
|
|
25
34
|
padding-left: var(--kbq-size-xs);
|
|
@@ -14,6 +14,7 @@ export declare const KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION: {
|
|
|
14
14
|
noNotifications: string;
|
|
15
15
|
failedToLoadNotifications: string;
|
|
16
16
|
repeat: string;
|
|
17
|
+
loadingMore: string;
|
|
17
18
|
};
|
|
18
19
|
/** Injection Token for providing configuration of notification-center */
|
|
19
20
|
export declare const KBQ_NOTIFICATION_CENTER_CONFIGURATION: InjectionToken<unknown>;
|
|
@@ -46,6 +47,11 @@ export declare class KbqNotificationCenterComponent extends KbqPopUp implements
|
|
|
46
47
|
protected isTopOverflow: boolean;
|
|
47
48
|
/** @docs-private */
|
|
48
49
|
protected isBottomOverflow: boolean;
|
|
50
|
+
/** Distance in pixels from the bottom of the list at which the next page is requested.
|
|
51
|
+
* @docs-private */
|
|
52
|
+
protected scrolledToBottomOffset: number;
|
|
53
|
+
/** Emits on every scroll of the list container; drives the scroll-to-bottom check. */
|
|
54
|
+
private readonly scroll$;
|
|
49
55
|
/** localized data
|
|
50
56
|
* @docs-private */
|
|
51
57
|
get localeData(): any;
|
|
@@ -61,6 +67,25 @@ export declare class KbqNotificationCenterComponent extends KbqPopUp implements
|
|
|
61
67
|
private _popoverHeight;
|
|
62
68
|
constructor();
|
|
63
69
|
ngAfterViewInit(): void;
|
|
70
|
+
/** Handles the list container scroll: updates overflow shadows and feeds the scroll-to-bottom check.
|
|
71
|
+
* @docs-private */
|
|
72
|
+
protected onContainerScroll(): void;
|
|
73
|
+
/** Retries loading the next page from the bottom error row.
|
|
74
|
+
* @docs-private */
|
|
75
|
+
protected retryLoadMore(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Requests the next page (via `service.onNextPage`) once the list is scrolled to within
|
|
78
|
+
* `scrolledToBottomOffset` pixels of the bottom. Two triggers feed it: the user scrolling, and a
|
|
79
|
+
* page finishing loading. The latter keeps paging when a freshly loaded page is too short to
|
|
80
|
+
* overflow the viewport — otherwise no further scroll event would fire and pagination would
|
|
81
|
+
* stall. Suppressed while a load is in flight, errored, or when there is nothing more to load.
|
|
82
|
+
*/
|
|
83
|
+
private subscribeToScrolledToBottom;
|
|
84
|
+
/** Whether the list is scrolled to within `scrolledToBottomOffset` pixels of the bottom. */
|
|
85
|
+
private isScrolledToBottom;
|
|
86
|
+
/** Emits `onNextPage` unless a load is already in flight, errored, or there is nothing more to load. */
|
|
87
|
+
private requestNextPage;
|
|
88
|
+
private focusScrollContainer;
|
|
64
89
|
/** @docs-private */
|
|
65
90
|
updateClassMap(placement: string, customClass: string, size: KbqPopUpSizeValues): void;
|
|
66
91
|
/** @docs-private */
|
|
@@ -102,6 +127,8 @@ export declare class KbqNotificationCenterTrigger extends KbqPopUpTrigger<KbqNot
|
|
|
102
127
|
panelClass: string;
|
|
103
128
|
/** Offset of popUp */
|
|
104
129
|
offset: number | null;
|
|
130
|
+
/** Distance in pixels from the bottom of the list at which the next page is requested via `onNextPage`. */
|
|
131
|
+
scrolledToBottomOffset: number;
|
|
105
132
|
/** Use popover or not */
|
|
106
133
|
get popoverMode(): boolean;
|
|
107
134
|
set popoverMode(value: boolean);
|
|
@@ -149,8 +176,9 @@ export declare class KbqNotificationCenterTrigger extends KbqPopUpTrigger<KbqNot
|
|
|
149
176
|
/** @docs-private */
|
|
150
177
|
closingActions(): import("rxjs").Observable<void | import("@angular/cdk/scrolling-module.d-ud2XrbF8").C | MouseEvent>;
|
|
151
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqNotificationCenterTrigger, never>;
|
|
152
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqNotificationCenterTrigger, "[kbqNotificationCenterTrigger]", ["kbqNotificationCenterTrigger"], { "placement": { "alias": "kbqNotificationCenterPlacement"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "kbqNotificationCenterPanelClass"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "popoverMode": { "alias": "popoverMode"; "required": false; }; "popoverHeight": { "alias": "popoverHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "stickToWindow": { "alias": "stickToWindow"; "required": false; }; "container": { "alias": "container"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
|
|
179
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqNotificationCenterTrigger, "[kbqNotificationCenterTrigger]", ["kbqNotificationCenterTrigger"], { "placement": { "alias": "kbqNotificationCenterPlacement"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "kbqNotificationCenterPanelClass"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "scrolledToBottomOffset": { "alias": "scrolledToBottomOffset"; "required": false; }; "popoverMode": { "alias": "popoverMode"; "required": false; }; "popoverHeight": { "alias": "popoverHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "stickToWindow": { "alias": "stickToWindow"; "required": false; }; "container": { "alias": "container"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
|
|
153
180
|
static ngAcceptInputType_offset: unknown;
|
|
181
|
+
static ngAcceptInputType_scrolledToBottomOffset: unknown;
|
|
154
182
|
static ngAcceptInputType_popoverMode: unknown;
|
|
155
183
|
static ngAcceptInputType_disabled: unknown;
|
|
156
184
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
justify-content: space-between;
|
|
38
38
|
|
|
39
|
-
padding: var(--kbq-size-
|
|
39
|
+
padding: var(--kbq-size-m) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.kbq-notification-center-title {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
display: flex;
|
|
68
68
|
flex-direction: row;
|
|
69
69
|
|
|
70
|
-
padding: var(--kbq-size-s) var(--kbq-size-
|
|
70
|
+
padding: var(--kbq-size-s) var(--kbq-size-xl);
|
|
71
71
|
|
|
72
72
|
& .kbq-notification-center-sub-header__button {
|
|
73
73
|
position: absolute;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
border-radius: inherit;
|
|
94
94
|
|
|
95
|
-
padding-bottom: var(--kbq-size-
|
|
95
|
+
padding-bottom: var(--kbq-size-xl);
|
|
96
96
|
|
|
97
97
|
& .kbq-loader-overlay_parent {
|
|
98
98
|
border-radius: inherit;
|
|
@@ -103,6 +103,31 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
.kbq-notification-center-load-more {
|
|
107
|
+
display: flex;
|
|
108
|
+
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
|
|
112
|
+
padding: 26px 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.kbq-notification-center-load-more-error {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
|
|
122
|
+
padding: var(--kbq-size-xxs) var(--kbq-size-xxl);
|
|
123
|
+
|
|
124
|
+
text-align: center;
|
|
125
|
+
|
|
126
|
+
& .kbq-button {
|
|
127
|
+
margin-top: var(--kbq-size-s);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
106
131
|
.kbq-notification-center-empty-container,
|
|
107
132
|
.kbq-notification-center-error-container {
|
|
108
133
|
display: flex;
|
|
@@ -4,6 +4,8 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface KbqNotificationItem extends Omit<KbqToastData, 'closeButton'> {
|
|
6
6
|
id?: string;
|
|
7
|
+
/** Numeric id of the shown toast, set by `push()` and consumed by `hideToast()`. */
|
|
8
|
+
toastId?: number;
|
|
7
9
|
title?: string | TemplateRef<unknown>;
|
|
8
10
|
style?: string | KbqToastStyle;
|
|
9
11
|
icon?: boolean | TemplateRef<unknown>;
|
|
@@ -19,6 +21,13 @@ type KbqNotificationsGroup = {
|
|
|
19
21
|
title: string;
|
|
20
22
|
items: KbqNotificationItem[];
|
|
21
23
|
};
|
|
24
|
+
/** Payload emitted by `KbqNotificationCenterService.onDelete`. */
|
|
25
|
+
export type KbqNotificationDeleteEvent = {
|
|
26
|
+
/** What was removed: a single item, a whole date group, or all notifications. */
|
|
27
|
+
type: 'item' | 'group' | 'all';
|
|
28
|
+
/** The notification items that were removed. */
|
|
29
|
+
items: KbqNotificationItem[];
|
|
30
|
+
};
|
|
22
31
|
export declare class KbqNotificationCenterService {
|
|
23
32
|
/** @docs-private */
|
|
24
33
|
private readonly adapter;
|
|
@@ -32,12 +41,36 @@ export declare class KbqNotificationCenterService {
|
|
|
32
41
|
readonly loadingMode: BehaviorSubject<boolean>;
|
|
33
42
|
/** @docs-private */
|
|
34
43
|
readonly errorMode: BehaviorSubject<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the bottom "load more" spinner is shown while the next page is being loaded.
|
|
46
|
+
* Note: this is the infinite-scroll indicator and is distinct from `loadingMode`,
|
|
47
|
+
* which renders the full-screen loader instead of the list.
|
|
48
|
+
*/
|
|
49
|
+
readonly loadingMore: BehaviorSubject<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the bottom "load more" error row (with a retry button) is shown.
|
|
52
|
+
* Distinct from `errorMode`, which replaces the whole list with the full-screen error state.
|
|
53
|
+
*/
|
|
54
|
+
readonly loadMoreErrorMode: BehaviorSubject<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Whether there are more notifications to load. While `true`, scrolling to the bottom
|
|
57
|
+
* emits `onNextPage`; set it to `false` to stop further infinite-scroll requests.
|
|
58
|
+
*/
|
|
59
|
+
readonly hasMore: BehaviorSubject<boolean>;
|
|
35
60
|
/** @docs-private */
|
|
36
61
|
readonly onRead: BehaviorSubject<KbqNotificationItem | null>;
|
|
37
62
|
/** Triggers an event when the user presses the reload button. */
|
|
38
63
|
readonly onReload: EventEmitter<void>;
|
|
64
|
+
/** Triggers an event when the list is scrolled to the bottom and the next page should be loaded. */
|
|
65
|
+
readonly onNextPage: EventEmitter<void>;
|
|
66
|
+
/** Triggers an event when an item, a group, or all notifications are removed. */
|
|
67
|
+
readonly onDelete: EventEmitter<KbqNotificationDeleteEvent>;
|
|
39
68
|
private originalItems;
|
|
40
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Grouped notifications, always ordered from newest to oldest: day groups are sorted by date
|
|
71
|
+
* descending, and notifications within each day are sorted by date descending.
|
|
72
|
+
* @docs-private
|
|
73
|
+
*/
|
|
41
74
|
readonly groupedItems: Observable<KbqNotificationsGroup[]>;
|
|
42
75
|
/** Emits an event whenever the changes. */
|
|
43
76
|
readonly changes: Observable<boolean | KbqNotificationItem | KbqNotificationItem[] | null>;
|
|
@@ -55,8 +88,16 @@ export declare class KbqNotificationCenterService {
|
|
|
55
88
|
setLoadingMode(value: boolean): void;
|
|
56
89
|
/** Set error mode */
|
|
57
90
|
setErrorMode(value: boolean): void;
|
|
91
|
+
/** Set the bottom "load more" spinner visibility. */
|
|
92
|
+
setLoadingMore(value: boolean): void;
|
|
93
|
+
/** Set the bottom "load more" error state visibility. */
|
|
94
|
+
setLoadMoreErrorMode(value: boolean): void;
|
|
95
|
+
/** Set whether there are more notifications to load via infinite scroll. */
|
|
96
|
+
setHasMore(value: boolean): void;
|
|
58
97
|
/** Push new notification item in center */
|
|
59
98
|
push(item: KbqNotificationItem): void;
|
|
99
|
+
/** Hides the toast that corresponds to the given notification item. */
|
|
100
|
+
hideToast(item: KbqNotificationItem): void;
|
|
60
101
|
/** Remove notification item */
|
|
61
102
|
remove(removedItem: KbqNotificationItem): void;
|
|
62
103
|
/** Remove group of notification items */
|
|
@@ -64,6 +105,8 @@ export declare class KbqNotificationCenterService {
|
|
|
64
105
|
/** Remove all notification items */
|
|
65
106
|
removeAll(): void;
|
|
66
107
|
private makeGroup;
|
|
108
|
+
/** Compares two notifications by date so the newest comes first. */
|
|
109
|
+
private compareByDateDesc;
|
|
67
110
|
private setIds;
|
|
68
111
|
private setReadState;
|
|
69
112
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqNotificationCenterService, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/components",
|
|
3
|
-
"version": "19.8.
|
|
3
|
+
"version": "19.8.2",
|
|
4
4
|
"description": "koobiq",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/koobiq/angular-components#readme",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@angular/animations": "
|
|
25
|
-
"@angular/cdk": "
|
|
26
|
-
"@angular/core": "
|
|
27
|
-
"@angular/forms": "
|
|
28
|
-
"@koobiq/cdk": "19.8.
|
|
29
|
-
"@koobiq/angular-moment-adapter": "19.8.
|
|
30
|
-
"@koobiq/angular-luxon-adapter": "19.8.
|
|
24
|
+
"@angular/animations": ">=19.0.0",
|
|
25
|
+
"@angular/cdk": ">=19.0.0",
|
|
26
|
+
"@angular/core": ">=19.0.0",
|
|
27
|
+
"@angular/forms": ">=19.0.0",
|
|
28
|
+
"@koobiq/cdk": "19.8.2",
|
|
29
|
+
"@koobiq/angular-moment-adapter": "19.8.2",
|
|
30
|
+
"@koobiq/angular-luxon-adapter": "19.8.2",
|
|
31
31
|
"@koobiq/date-formatter": "^3.2.3",
|
|
32
32
|
"@koobiq/icons": "^11.1.3",
|
|
33
|
-
"@koobiq/design-tokens": "3.14.0"
|
|
33
|
+
"@koobiq/design-tokens": "^3.14.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"tslib": "^2.6.2"
|