@indigina/ui-kit 1.1.183 → 1.1.185
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/fesm2022/indigina-ui-kit.mjs +222 -68
- package/fesm2022/indigina-ui-kit.mjs.map +1 -1
- package/lib/components/kit-global-search/kit-global-search.component.d.ts +42 -0
- package/lib/components/kit-global-search/kit-global-search.model.d.ts +32 -0
- package/lib/components/kit-global-search/kit-global-search.util.d.ts +7 -0
- package/lib/components/kit-pill/kit-pill.const.d.ts +2 -1
- package/lib/components/kit-route-path/kit-route-path.component.d.ts +12 -0
- package/lib/widgets/kit-top-bar/kit-top-bar.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ElementRef, InputSignal, OnInit, Signal, ViewContainerRef, WritableSignal } from '@angular/core';
|
|
2
|
+
import { KitSvgIcon, KitSvgIconType } from '../kit-svg-icon/kit-svg-icon.const';
|
|
3
|
+
import { KitTextboxSize } from '../kit-textbox/kit-textbox.const';
|
|
4
|
+
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
5
|
+
import { KitPopupComponent } from '../kit-popup/kit-popup.component';
|
|
6
|
+
import { GlobalSearchPrompt, GlobalSearchResult } from './kit-global-search.model';
|
|
7
|
+
import { KitPillTheme } from '../kit-pill/kit-pill.const';
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import { KitButtonKind, KitButtonType } from '../kit-button/kit-button.const';
|
|
10
|
+
import { Router } from '@angular/router';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class KitGlobalSearchComponent implements OnInit {
|
|
13
|
+
private readonly router;
|
|
14
|
+
readonly searchFn: InputSignal<(searchText: string) => Observable<(GlobalSearchResult | null)[]>>;
|
|
15
|
+
readonly displayedLineItemsNumber: InputSignal<number>;
|
|
16
|
+
readonly prompts: InputSignal<GlobalSearchPrompt[]>;
|
|
17
|
+
readonly textbox: Signal<TextBoxComponent>;
|
|
18
|
+
readonly anchor: Signal<ElementRef>;
|
|
19
|
+
readonly popup: Signal<KitPopupComponent | undefined>;
|
|
20
|
+
readonly container: Signal<ViewContainerRef>;
|
|
21
|
+
readonly kitSvgIcon: typeof KitSvgIcon;
|
|
22
|
+
readonly kitTextboxSize: typeof KitTextboxSize;
|
|
23
|
+
readonly kitSvgIconType: typeof KitSvgIconType;
|
|
24
|
+
readonly kitPillTheme: typeof KitPillTheme;
|
|
25
|
+
readonly kitButtonType: typeof KitButtonType;
|
|
26
|
+
readonly kitButtonKind: typeof KitButtonKind;
|
|
27
|
+
readonly dateFormat: string;
|
|
28
|
+
readonly popupClass: string;
|
|
29
|
+
readonly searchResults: WritableSignal<(GlobalSearchResult | null)[]>;
|
|
30
|
+
value: string;
|
|
31
|
+
readonly showPropmts: WritableSignal<boolean>;
|
|
32
|
+
documentClick(event: Event): void;
|
|
33
|
+
constructor(router: Router);
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
get isPopupOpen(): boolean;
|
|
36
|
+
clearSearch(): void;
|
|
37
|
+
openPopup(): void;
|
|
38
|
+
navigate(link: string[] | undefined): void;
|
|
39
|
+
onSelectPrompt(prompt: GlobalSearchPrompt): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGlobalSearchComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitGlobalSearchComponent, "kit-global-search", never, { "searchFn": { "alias": "searchFn"; "required": true; "isSignal": true; }; "displayedLineItemsNumber": { "alias": "displayedLineItemsNumber"; "required": false; "isSignal": true; }; "prompts": { "alias": "prompts"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface GlobalSearchResult {
|
|
3
|
+
name: string;
|
|
4
|
+
items: GlobalSearchLineItem[];
|
|
5
|
+
total: number;
|
|
6
|
+
categoryLink: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface GlobalSearchLineItem {
|
|
9
|
+
title: string | null;
|
|
10
|
+
subtitle: string | null;
|
|
11
|
+
link?: string[];
|
|
12
|
+
dates: {
|
|
13
|
+
firstDate: {
|
|
14
|
+
label: string | null;
|
|
15
|
+
value: string | null;
|
|
16
|
+
};
|
|
17
|
+
secondDate: {
|
|
18
|
+
label: string | null;
|
|
19
|
+
value: string | null;
|
|
20
|
+
};
|
|
21
|
+
} | null;
|
|
22
|
+
routePath: {
|
|
23
|
+
from: string | null;
|
|
24
|
+
to: string | null;
|
|
25
|
+
type: 'Air' | 'Road' | 'Sea' | 'Rail' | null;
|
|
26
|
+
containerMode?: string | null;
|
|
27
|
+
} | null;
|
|
28
|
+
}
|
|
29
|
+
export interface GlobalSearchPrompt {
|
|
30
|
+
label: string;
|
|
31
|
+
searchFn(): Observable<(GlobalSearchResult | null)[]>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { GlobalSearchLineItem, GlobalSearchResult } from './kit-global-search.model';
|
|
3
|
+
import { Store } from '@ngxs/store';
|
|
4
|
+
export declare const mapGlobalSearchResult: <T>(store: Store, requiredPermission: string, dataFetcher: () => Observable<{
|
|
5
|
+
total: number;
|
|
6
|
+
data: T[];
|
|
7
|
+
}>, categoryName: string, categoryLink: string[], itemMapper: (item: T) => GlobalSearchLineItem) => Observable<GlobalSearchResult | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputSignal } from '@angular/core';
|
|
2
|
+
import { KitSvgIcon } from '../kit-svg-icon/kit-svg-icon.const';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class KitRoutePathComponent {
|
|
5
|
+
readonly originPort: InputSignal<string>;
|
|
6
|
+
readonly destinationPort: InputSignal<string>;
|
|
7
|
+
readonly type: InputSignal<string>;
|
|
8
|
+
readonly containerMode: InputSignal<string>;
|
|
9
|
+
readonly kitSvgIcon: typeof KitSvgIcon;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitRoutePathComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitRoutePathComponent, "kit-route-path", never, { "originPort": { "alias": "originPort"; "required": false; "isSignal": true; }; "destinationPort": { "alias": "destinationPort"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "containerMode": { "alias": "containerMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -13,5 +13,5 @@ export declare class KitTopBarComponent {
|
|
|
13
13
|
constructor(kitNavigationMenuService: KitNavigationMenuService);
|
|
14
14
|
toggleSidebar(collapsed: boolean): void;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<KitTopBarComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KitTopBarComponent, "kit-top-bar", never, { "userMenuItems": { "alias": "userMenuItems"; "required": false; "isSignal": true; }; }, {}, never, ["
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitTopBarComponent, "kit-top-bar", never, { "userMenuItems": { "alias": "userMenuItems"; "required": false; "isSignal": true; }; }, {}, never, ["[globalSearch]", "[topBarActions]"], true, never>;
|
|
17
17
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -159,6 +159,9 @@ export { KitDataFieldComponent } from './lib/components/kit-data-field/kit-data-
|
|
|
159
159
|
export { KitDataFieldState } from './lib/components/kit-data-field/kit-data-field.const';
|
|
160
160
|
export { KitSearchBarModule } from './lib/components/kit-search-bar/kit-search-bar.module';
|
|
161
161
|
export { KitSearchBarComponent } from './lib/components/kit-search-bar/kit-search-bar.component';
|
|
162
|
+
export { KitGlobalSearchComponent } from './lib/components/kit-global-search/kit-global-search.component';
|
|
163
|
+
export { GlobalSearchResult, GlobalSearchLineItem, GlobalSearchPrompt } from './lib/components/kit-global-search/kit-global-search.model';
|
|
164
|
+
export { mapGlobalSearchResult } from './lib/components/kit-global-search/kit-global-search.util';
|
|
162
165
|
export { KitEmptySectionComponent } from './lib/components/kit-empty-section/kit-empty-section.component';
|
|
163
166
|
export { KitSortableComponent } from './lib/components/kit-sortable/kit-sortable.component';
|
|
164
167
|
export { kitDataStateToODataString } from './lib/utils/kit-data-query/kit-data-query.util';
|