@qite/tide-components 1.0.14-preview.1 → 1.0.14-preview.3
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/build/build-cjs/index.js +957 -23
- package/build/build-cjs/src/content/agent-entries/agent-entries-services.d.ts +18 -0
- package/build/build-cjs/src/content/agent-entries/index.d.ts +4 -0
- package/build/build-cjs/src/content/agent-entries/types.d.ts +27 -0
- package/build/build-cjs/src/content/navbar/types.d.ts +1 -0
- package/build/build-cjs/src/index.d.ts +3 -1
- package/build/build-cjs/src/search-results/components/traject/traject-card-row.d.ts +7 -0
- package/build/build-esm/index.js +957 -24
- package/build/build-esm/src/content/agent-entries/agent-entries-services.d.ts +18 -0
- package/build/build-esm/src/content/agent-entries/index.d.ts +4 -0
- package/build/build-esm/src/content/agent-entries/types.d.ts +27 -0
- package/build/build-esm/src/content/navbar/types.d.ts +1 -0
- package/build/build-esm/src/index.d.ts +3 -1
- package/build/build-esm/src/search-results/components/traject/traject-card-row.d.ts +7 -0
- package/package.json +1 -1
- package/styles/components/_agent-entries.scss +336 -0
- package/styles/content-blocks.scss +1 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AgentPrintAction, CustomEntryStatusItem, DossierViewResult, FilterItem, NumberStringPair, PageResult, TideClientConfig } from '@qite/tide-client';
|
|
2
|
+
import { AgentEntriesColumn, AgentEntriesSort } from './types';
|
|
3
|
+
/** Agent endpoints need the member token, fall back to the one the Login component stored. */
|
|
4
|
+
export declare const withAgentToken: (config: TideClientConfig) => TideClientConfig;
|
|
5
|
+
/** False when the token is not a JWT or has expired. */
|
|
6
|
+
export declare const isAgentTokenValid: (token?: string) => boolean;
|
|
7
|
+
export declare const isUnauthorizedError: (error: unknown, token?: string) => boolean;
|
|
8
|
+
export interface AgentEntriesLookups {
|
|
9
|
+
entryStatuses: NumberStringPair[];
|
|
10
|
+
customEntryStatuses: CustomEntryStatusItem[];
|
|
11
|
+
printActions: AgentPrintAction[];
|
|
12
|
+
}
|
|
13
|
+
export declare const fetchLookups: (config: TideClientConfig, languageCode: string, signal: AbortSignal) => Promise<AgentEntriesLookups>;
|
|
14
|
+
/** Converts the raw filter inputs to the OData column filters understood by tide-client's createParams. */
|
|
15
|
+
export declare const buildFilterItem: (columns: AgentEntriesColumn[], filterValues: Record<string, string>, sort: AgentEntriesSort, page: number, take: number) => FilterItem;
|
|
16
|
+
export declare const fetchEntries: (config: TideClientConfig, filter: FilterItem, signal: AbortSignal) => Promise<PageResult<DossierViewResult>>;
|
|
17
|
+
/** Prints the entry and returns an object url to the resulting pdf. */
|
|
18
|
+
export declare const printEntry: (config: TideClientConfig, printActionId: number, entryId: number) => Promise<string>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TideClientConfig } from '@qite/tide-client';
|
|
2
|
+
export interface AgentEntriesProps {
|
|
3
|
+
/** Tide connection. When no `token` is set, the agent token saved by the Login component (session/localStorage 'token') is used. */
|
|
4
|
+
tideClientConfig: TideClientConfig;
|
|
5
|
+
languageCode: string;
|
|
6
|
+
/** Title above the table, defaults to the translated "Bookings". */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Initial number of rows per page, defaults to 20. */
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
/** Partial translation overrides, deep-merged over the built-in AGENT_ENTRIES translations. */
|
|
11
|
+
customTranslations?: any;
|
|
12
|
+
/** When set, a login button is shown when no agent is logged in or the session expired. */
|
|
13
|
+
onLogin?: () => void;
|
|
14
|
+
/** Called when the API rejects the agent token (e.g. expired). */
|
|
15
|
+
onUnauthorized?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export type AgentEntriesColumnKind = 'text' | 'date' | 'number' | 'status' | 'customStatus';
|
|
18
|
+
export interface AgentEntriesColumn {
|
|
19
|
+
/** OData field name on the entry list (DossierViewResult). */
|
|
20
|
+
id: string;
|
|
21
|
+
kind: AgentEntriesColumnKind;
|
|
22
|
+
label: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AgentEntriesSort {
|
|
25
|
+
name: string;
|
|
26
|
+
asc: boolean;
|
|
27
|
+
}
|
|
@@ -8,6 +8,7 @@ import TideForm from './form';
|
|
|
8
8
|
import SearchResults from './search-results';
|
|
9
9
|
import ImageCardGrid from './content/image-card-grid';
|
|
10
10
|
import Login from './content/login';
|
|
11
|
+
import AgentEntries from './content/agent-entries';
|
|
11
12
|
import ImageWithTextSection from './content/image-with-text-section';
|
|
12
13
|
import Slider from './content/components/slider';
|
|
13
14
|
import PhotoGallery from './content/components/gallery';
|
|
@@ -21,9 +22,10 @@ export * from './content/header/types';
|
|
|
21
22
|
export * from './content/footer/types';
|
|
22
23
|
export * from './content/image-card-grid/types';
|
|
23
24
|
export * from './content/login/types';
|
|
25
|
+
export * from './content/agent-entries/types';
|
|
24
26
|
export * from './content/image-with-text-section/types';
|
|
25
27
|
export * from './search-results/types';
|
|
26
28
|
export * from './qsm/types';
|
|
27
29
|
export * from './shared/types';
|
|
28
30
|
export * from './content/featured-trips/types';
|
|
29
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection, Slider, PhotoGallery, Breadcrumbs, FAQ, FeaturedTrips, Spinner, ItineraryMapView, TideForm };
|
|
31
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, AgentEntries, ImageWithTextSection, Slider, PhotoGallery, Breadcrumbs, FAQ, FeaturedTrips, Spinner, ItineraryMapView, TideForm };
|