admins-components 9.0.22 → 9.0.23

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.
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseDropdownAnchorOptions {
3
+ extraStyle?: (rect: DOMRect) => Record<string, string>;
4
+ isOutsideClick?: (e: MouseEvent, wrapperEl: HTMLElement | null, dropdownEl: HTMLElement | null) => boolean;
5
+ }
6
+ export interface UseDropdownAnchorReturn {
7
+ isOpen: Ref<boolean>;
8
+ dropdownStyle: Ref<Record<string, string>>;
9
+ positionDropdown: () => void;
10
+ }
11
+ export declare function useDropdownAnchor(wrapperRef: Ref<HTMLElement | null>, dropdownRef: Ref<HTMLElement | null>, options?: UseDropdownAnchorOptions): UseDropdownAnchorReturn;
@@ -0,0 +1,6 @@
1
+ export declare function useSelection(getItems: () => Record<string, unknown>[], getAttr: () => string | undefined, emit: (selected: unknown[]) => void): {
2
+ selectedKeys: import('vue').Ref<Set<unknown> & Omit<Set<unknown>, keyof Set<any>>, Set<unknown> | (Set<unknown> & Omit<Set<unknown>, keyof Set<any>>)>;
3
+ allSelected: import('vue').ComputedRef<boolean>;
4
+ toggle: (item: Record<string, unknown>) => void;
5
+ toggleAll: () => void;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { Directive } from 'vue';
2
+ export declare const vTooltip: Directive;
@@ -0,0 +1,46 @@
1
+ export interface SearchPostsPayload {
2
+ title?: string;
3
+ exactMatch?: boolean;
4
+ createdFrom?: string;
5
+ createdTo?: string;
6
+ modifiedFrom?: string;
7
+ modifiedTo?: string;
8
+ order?: string;
9
+ status?: string;
10
+ createdBy?: string;
11
+ modifiedBy?: string;
12
+ author?: string;
13
+ column?: string;
14
+ rank?: number;
15
+ tag?: string;
16
+ pageIndex: 0;
17
+ pageSize: 0;
18
+ releasedFrom?: string;
19
+ releasedTo?: string;
20
+ publishDateFrom?: string;
21
+ publishDateTo?: string;
22
+ }
23
+ export interface SearchPostsResponse {
24
+ posts: Post[];
25
+ }
26
+ export interface Post {
27
+ id: string;
28
+ legacyId: string;
29
+ wpId: number;
30
+ title: string;
31
+ lead: string;
32
+ rank: number;
33
+ modifiedBy: string;
34
+ createdAt: string;
35
+ modifiedAt: string;
36
+ publishDateGmt: string;
37
+ creator: string;
38
+ status: string;
39
+ isPaid: true;
40
+ siteId: string;
41
+ authors: string[];
42
+ columns: string[];
43
+ tags: string[];
44
+ editingByUser: string;
45
+ featuredImage: string;
46
+ }
@@ -0,0 +1,42 @@
1
+ import { SearchPostsPayload, SearchPostsResponse } from '../models/SearchPosts';
2
+ import { HttpRequest } from './services';
3
+ import { ArticleSeriesDetails, AuthorDetails, ColumnDetails, DigitalSupplementDetails, IdsPayload, PartnerDetails, PresenceWidgetConfig, RelationsCountResponse, SearchArticleSeriesResult, SearchAuthorsPayload, SearchAuthorsResult, SearchColumnsPayload, SearchColumnsResult, SearchDigitalSupplementsPayload, SearchDigitalSupplementsResult, SearchEntityPayload, SearchImagesWidgetConfig, SearchPartnersResult, SearchPostWidgetConfig, SearchTagsPayload, SearchTagsResult, Site, TagDetails, UserInfoModel, WidgetDetailsResponse } from './models';
4
+ export declare function useArticleEditorService(url: string): ArticleEditorService;
5
+ export declare class ArticleEditorService {
6
+ articleEditorBackendUrl: string;
7
+ baseUrl: string;
8
+ searchPosts: HttpRequest<SearchPostsPayload, undefined, undefined, SearchPostsResponse>;
9
+ whoAmI: HttpRequest<void, undefined, undefined, UserInfoModel>;
10
+ getPostsConfig: HttpRequest<undefined, {
11
+ name: string;
12
+ }, undefined, WidgetDetailsResponse<SearchPostWidgetConfig>>;
13
+ getImagesConfig: HttpRequest<undefined, {
14
+ name: string;
15
+ }, undefined, WidgetDetailsResponse<SearchImagesWidgetConfig>>;
16
+ getPresenceConfig: HttpRequest<undefined, {
17
+ name: string;
18
+ }, undefined, WidgetDetailsResponse<PresenceWidgetConfig>>;
19
+ sites: HttpRequest<undefined, undefined, undefined, Site[]>;
20
+ authorsSearch: HttpRequest<SearchAuthorsPayload, undefined, undefined, SearchAuthorsResult>;
21
+ authorsDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, AuthorDetails[]>;
22
+ articleSeriesSearch: HttpRequest<SearchEntityPayload, undefined, undefined, SearchArticleSeriesResult>;
23
+ articleSeriesDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, ArticleSeriesDetails[]>;
24
+ columnsSearch: HttpRequest<SearchColumnsPayload, undefined, undefined, SearchColumnsResult>;
25
+ columnsDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, ColumnDetails[]>;
26
+ digitalSupplementsSearch: HttpRequest<SearchDigitalSupplementsPayload, undefined, undefined, SearchDigitalSupplementsResult>;
27
+ digitalSupplementsDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, DigitalSupplementDetails[]>;
28
+ partnersSearch: HttpRequest<SearchEntityPayload, undefined, undefined, SearchPartnersResult>;
29
+ partnersDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, PartnerDetails[]>;
30
+ tagsSearch: HttpRequest<SearchTagsPayload, undefined, undefined, SearchTagsResult>;
31
+ tagsDetailsByIds: HttpRequest<IdsPayload, undefined, undefined, TagDetails[]>;
32
+ getRelationsCount: HttpRequest<undefined, {
33
+ id: string;
34
+ }, {
35
+ entityType: string;
36
+ }, RelationsCountResponse>;
37
+ private errorMap;
38
+ private postRequest;
39
+ private searchRequest;
40
+ private detailsByIdsRequest;
41
+ constructor(articleEditorBackendUrl: string);
42
+ }
@@ -0,0 +1,43 @@
1
+ import { SearchPostsPayload, SearchPostsResponse } from '../models/SearchPosts';
2
+ import { ArticleSeriesDetails, AuthorDetails, ColumnDetails, DigitalSupplementDetails, IdsPayload, PartnerDetails, PresenceWidgetConfig, RelationsCountResponse, SearchArticleSeriesResult, SearchAuthorsPayload, SearchAuthorsResult, SearchColumnsPayload, SearchColumnsResult, SearchDigitalSupplementsPayload, SearchDigitalSupplementsResult, SearchEntityPayload, SearchImagesWidgetConfig, SearchPartnersResult, SearchPostWidgetConfig, SearchTagsPayload, SearchTagsResult, Site, TagDetails, UserInfoModel, WidgetDetailsResponse } from './models';
3
+ type PathParams = {
4
+ name: string;
5
+ };
6
+ type RelationParams = {
7
+ id: string;
8
+ };
9
+ type RelationQuery = {
10
+ entityType: string;
11
+ };
12
+ export declare function useArticleEditorService(url: string): ArticleEditorService;
13
+ export declare class ArticleEditorService {
14
+ baseUrl: string;
15
+ constructor(baseUrl: string);
16
+ private errorMap;
17
+ private request;
18
+ private post;
19
+ private get;
20
+ private search;
21
+ private details;
22
+ private widget;
23
+ searchPosts: import('./services').HttpRequest<SearchPostsPayload, undefined, undefined, SearchPostsResponse>;
24
+ whoAmI: import('./services').HttpRequest<undefined, undefined, undefined, UserInfoModel>;
25
+ getPostsConfig: import('./services').HttpRequest<undefined, PathParams, undefined, WidgetDetailsResponse<SearchPostWidgetConfig>>;
26
+ getImagesConfig: import('./services').HttpRequest<undefined, PathParams, undefined, WidgetDetailsResponse<SearchImagesWidgetConfig>>;
27
+ getPresenceConfig: import('./services').HttpRequest<undefined, PathParams, undefined, WidgetDetailsResponse<PresenceWidgetConfig>>;
28
+ sites: import('./services').HttpRequest<undefined, undefined, undefined, Site[]>;
29
+ authorsSearch: import('./services').HttpRequest<SearchAuthorsPayload, undefined, undefined, SearchAuthorsResult>;
30
+ authorsDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, AuthorDetails[]>;
31
+ articleSeriesSearch: import('./services').HttpRequest<SearchEntityPayload, undefined, undefined, SearchArticleSeriesResult>;
32
+ articleSeriesDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, ArticleSeriesDetails[]>;
33
+ columnsSearch: import('./services').HttpRequest<SearchColumnsPayload, undefined, undefined, SearchColumnsResult>;
34
+ columnsDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, ColumnDetails[]>;
35
+ digitalSupplementsSearch: import('./services').HttpRequest<SearchDigitalSupplementsPayload, undefined, undefined, SearchDigitalSupplementsResult>;
36
+ digitalSupplementsDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, DigitalSupplementDetails[]>;
37
+ partnersSearch: import('./services').HttpRequest<SearchEntityPayload, undefined, undefined, SearchPartnersResult>;
38
+ partnersDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, PartnerDetails[]>;
39
+ tagsSearch: import('./services').HttpRequest<SearchTagsPayload, undefined, undefined, SearchTagsResult>;
40
+ tagsDetailsByIds: import('./services').HttpRequest<IdsPayload, undefined, undefined, TagDetails[]>;
41
+ getRelationsCount: import('./services').HttpRequest<undefined, RelationParams, RelationQuery, RelationsCountResponse>;
42
+ }
43
+ export {};
@@ -0,0 +1,25 @@
1
+ import { HttpRequest, Methods } from './services';
2
+ export type EndpointConfig<Payload = unknown, RouteParams = unknown, QueryParams = unknown, Result = unknown> = {
3
+ url: string;
4
+ method?: Methods;
5
+ entityName?: string;
6
+ operationName?: string;
7
+ payloadType?: Payload;
8
+ routeParamsType?: RouteParams;
9
+ queryParamsType?: QueryParams;
10
+ resultType?: Result;
11
+ };
12
+ export type EndpointsMap = Record<string, EndpointConfig<any, any, any, any>>;
13
+ export type EndpointRequests<E extends EndpointsMap> = {
14
+ [Name in keyof E]: E[Name] extends EndpointConfig<infer P, infer RP, infer QP, infer R> ? HttpRequest<P, RP, QP, R> : never;
15
+ };
16
+ export type BackendServiceConfig<E extends EndpointsMap = EndpointsMap> = {
17
+ backendUrl: string;
18
+ endpoints: E;
19
+ };
20
+ export declare function useBackendService<E extends EndpointsMap>(config: BackendServiceConfig<E>): BackendService<E>;
21
+ export declare class BackendService<E extends EndpointsMap = EndpointsMap> {
22
+ readonly backendUrl: string;
23
+ readonly endpoints: EndpointRequests<E>;
24
+ constructor({ backendUrl, endpoints }: BackendServiceConfig<E>);
25
+ }
@@ -0,0 +1,39 @@
1
+ import { Ref } from 'vue';
2
+ export type NativeUseFetchReturn<T = unknown> = {
3
+ data: Ref<T | null>;
4
+ error: Ref<any>;
5
+ response: Ref<Response | null>;
6
+ statusCode: Ref<number | null>;
7
+ isFetching: Ref<boolean>;
8
+ canAbort: Ref<boolean>;
9
+ get: () => NativeUseFetchReturn<T>;
10
+ post: (payload?: unknown) => NativeUseFetchReturn<T>;
11
+ put: (payload?: unknown) => NativeUseFetchReturn<T>;
12
+ patch: (payload?: unknown) => NativeUseFetchReturn<T>;
13
+ delete: (payload?: unknown) => NativeUseFetchReturn<T>;
14
+ json: <R = T>() => NativeUseFetchReturn<R>;
15
+ text: () => NativeUseFetchReturn<string>;
16
+ execute: () => Promise<NativeUseFetchReturn<T>>;
17
+ abort: () => void;
18
+ };
19
+ export type CreateFetchOptions = {
20
+ baseUrl: string;
21
+ fetchOptions?: RequestInit;
22
+ options?: {
23
+ immediate?: boolean;
24
+ beforeFetch?: (ctx: {
25
+ url: string;
26
+ options: RequestInit;
27
+ }) => any;
28
+ afterFetch?: (ctx: {
29
+ data: unknown;
30
+ response: Response;
31
+ }) => any;
32
+ onFetchError?: (ctx: {
33
+ error: any;
34
+ response: Response | null;
35
+ data: unknown;
36
+ }) => any;
37
+ };
38
+ };
39
+ export declare function createNativeFetch(config: CreateFetchOptions): <T = unknown>(url: string) => NativeUseFetchReturn<T>;
@@ -0,0 +1,19 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+ import { UserInfoModel, Site } from './models';
3
+ export type UserState = 'loading' | 'authenticated' | 'error';
4
+ export interface CurrentUserStore {
5
+ user: Ref<UserInfoModel | null>;
6
+ state: Ref<UserState>;
7
+ error: Ref<string | null>;
8
+ isLoading: ComputedRef<boolean>;
9
+ isAuthenticated: ComputedRef<boolean>;
10
+ displayName: ComputedRef<string>;
11
+ email: ComputedRef<string>;
12
+ roles: ComputedRef<readonly string[]>;
13
+ initialize(backendUrl: string, enableLogging?: boolean): Promise<void>;
14
+ clear(): void;
15
+ hasPermission(siteId: string, entityName: string | 'all', accessLevel: 'reader' | 'admin'): boolean;
16
+ getMixableSitesForResource(entityName: string | 'all', currentSiteId: string | undefined): Site[];
17
+ getMixableSiteIdsForResource(entityName: string | 'all', currentSiteId: string | undefined): string[];
18
+ }
19
+ export declare function useCurrentUser(): CurrentUserStore;
@@ -0,0 +1,139 @@
1
+ import { NameIdPair, ValueLabelPair } from '../types/types';
2
+ export interface SearchEntityPayloadBase {
3
+ siteIds?: string[];
4
+ pageSize: number;
5
+ pageIndex: number;
6
+ }
7
+ export interface SearchEntityPayload extends SearchEntityPayloadBase {
8
+ name?: string;
9
+ }
10
+ export interface ArticleSeriesDetails {
11
+ id: string;
12
+ name: string;
13
+ siteId?: string;
14
+ isActive?: boolean;
15
+ webId?: string;
16
+ logoImageUrl?: string;
17
+ htmlDescription?: string;
18
+ url?: string;
19
+ }
20
+ export interface SearchAuthorsPayload extends SearchEntityPayloadBase {
21
+ authorName?: string;
22
+ archived?: boolean;
23
+ id?: string;
24
+ }
25
+ export interface AuthorDetails {
26
+ id: string;
27
+ fullName: string;
28
+ avatarUrl?: string;
29
+ imageUrl?: string;
30
+ thumbnailImageUrl?: string;
31
+ pageUrl?: string;
32
+ imageId?: string;
33
+ introduction?: string;
34
+ }
35
+ export interface SearchColumnsPayload extends SearchEntityPayload {
36
+ isArchived?: boolean;
37
+ }
38
+ export interface ColumnDetails {
39
+ id: string;
40
+ webId: string;
41
+ columnUrl: string;
42
+ name: string;
43
+ }
44
+ export interface SearchDigitalSupplementsPayload extends SearchEntityPayloadBase {
45
+ title?: string;
46
+ }
47
+ export interface DigitalSupplementDetails {
48
+ siteId?: string;
49
+ id: string;
50
+ title: string;
51
+ lead?: string;
52
+ url?: string;
53
+ releaseDate?: string;
54
+ coverImageUrl?: string;
55
+ pdfLink?: string;
56
+ links?: {
57
+ icon?: string;
58
+ url: string;
59
+ title: string;
60
+ }[];
61
+ }
62
+ export interface PartnerDetails {
63
+ id: string;
64
+ logoUrlThumb: string;
65
+ name: string;
66
+ }
67
+ export interface SearchTagsPayload extends SearchEntityPayloadBase {
68
+ display?: string;
69
+ followable?: boolean;
70
+ }
71
+ export interface TagDetails {
72
+ id: string;
73
+ siteId?: string;
74
+ webId?: string;
75
+ url?: string;
76
+ name: string;
77
+ followable?: boolean;
78
+ }
79
+ export interface UserInfoModel {
80
+ displayName: string;
81
+ roles: string[];
82
+ email: string;
83
+ id: string;
84
+ }
85
+ export interface RelationsCountResponse {
86
+ count: number;
87
+ }
88
+ export type SearchResult<K extends string> = {
89
+ total: number;
90
+ } & Record<K, NameIdPair[]>;
91
+ export type SearchAuthorsResult = SearchResult<'authors'>;
92
+ export type IdsPayload = {
93
+ ids: string[];
94
+ };
95
+ export type SearchDigitalSupplementsResult = SearchResult<'digitalSupplements'>;
96
+ export type SearchArticleSeriesResult = SearchResult<'articleSeries'>;
97
+ export type SearchColumnsResult = SearchResult<'columns'>;
98
+ export type SearchTagsResult = SearchResult<'tags'>;
99
+ export type SearchPartnersResult = SearchResult<'partners'>;
100
+ export type WidgetDetailsResponse<T> = {
101
+ name: string;
102
+ environments: T[];
103
+ };
104
+ export interface PresenceWidgetConfig {
105
+ name: string;
106
+ apiUrl: string;
107
+ }
108
+ export interface SearchPostWidgetConfig {
109
+ name: string;
110
+ apiUrl: string;
111
+ wpUrl: string;
112
+ widgetUrl: string;
113
+ }
114
+ export interface SearchImagesWidgetConfig {
115
+ name: string;
116
+ apiUrl: string;
117
+ imageBaseUrl: string;
118
+ widgetUrl: string;
119
+ viewId: string;
120
+ }
121
+ export interface Site {
122
+ name: string;
123
+ id: string;
124
+ defaultAuthor: string;
125
+ ranks: ValueLabelPair[];
126
+ others: ValueLabelPair[];
127
+ entities: Entity[];
128
+ postTypes: PostType[];
129
+ }
130
+ export interface PostType {
131
+ id: string;
132
+ name: string;
133
+ controls: string[];
134
+ properties: string[];
135
+ }
136
+ export interface Entity {
137
+ type: string;
138
+ allowedSiteIds: string[];
139
+ }
@@ -0,0 +1,38 @@
1
+ import { createNativeFetch, NativeUseFetchReturn } from './createNativeFetch';
2
+ import { Ref } from 'vue';
3
+ export declare class FetchError {
4
+ title?: string;
5
+ message?: string;
6
+ errorCode?: number;
7
+ constructor(title?: string, message?: string, errorCode?: number);
8
+ }
9
+ export interface HttpRequest<TPayload, TRouteParams, TQueryParams, TResponse> {
10
+ data: Ref<TResponse>;
11
+ execute: () => any;
12
+ isFetching: Ref<boolean>;
13
+ fetch: NativeUseFetchReturn;
14
+ successCallback?: (response: TResponse) => void;
15
+ errorCallback?: (error: FetchError) => void;
16
+ finallyCallback?: () => void;
17
+ queryParams: Ref<TQueryParams>;
18
+ routeParams: Ref<TRouteParams>;
19
+ payload: Ref<TPayload>;
20
+ }
21
+ export declare enum Methods {
22
+ GET = 0,
23
+ GET_TEXT = 1,
24
+ POST = 2,
25
+ POST_TEXT = 3,
26
+ PUT = 4,
27
+ PUT_TEXT = 5,
28
+ PATCH = 6,
29
+ DELETE = 7
30
+ }
31
+ export declare class FetchDetails {
32
+ relativeUrl: string;
33
+ method: Methods;
34
+ fetchMethod: ReturnType<typeof createNativeFetch>;
35
+ constructor(baseUrl: string, relativeUrl: string, method: Methods, errorMessages: Map<number, string>, contentType?: string | null, defaultRequestHeaders?: Record<string, string>);
36
+ }
37
+ export declare function initRequest<TPayload, TRouteParams, TQueryParams, TResponse>(fetchDetails: FetchDetails, payload: TPayload, routeParams: TRouteParams, queryParams: TQueryParams): HttpRequest<TPayload, TRouteParams, TQueryParams, TResponse>;
38
+ export declare function serializeQueryParams(queryParams: Record<string, unknown> | null | undefined): string;
@@ -0,0 +1,22 @@
1
+ import { ToastInput, ToastPosition, ToastType } from '../components/ToastNotification.vue';
2
+ export interface ToastExposed {
3
+ addToast: (input: ToastInput) => number;
4
+ dismiss: (id: number) => void;
5
+ }
6
+ export declare function __setToastInstance(value: ToastExposed | null): void;
7
+ export interface ToastShortcutOptions {
8
+ displayDuration?: number;
9
+ position?: ToastPosition;
10
+ title?: string;
11
+ id?: number;
12
+ }
13
+ interface ToastApi {
14
+ show: (input: ToastInput) => number | null;
15
+ success: (title: string, message: string, options?: ToastShortcutOptions) => number | null;
16
+ error: (title: string, message: string, options?: ToastShortcutOptions) => number | null;
17
+ warning: (title: string, message: string, options?: ToastShortcutOptions) => number | null;
18
+ info: (title: string, message: string, options?: ToastShortcutOptions) => number | null;
19
+ dismiss: (id: number) => void;
20
+ }
21
+ export declare const toast: ToastApi;
22
+ export type { ToastInput, ToastPosition, ToastType };
@@ -0,0 +1,83 @@
1
+ import { Ref } from 'vue';
2
+ import { DropdownOption } from '../components/DropdownSelect.vue';
3
+ import { PickedDate, PickedUtcRange } from './types';
4
+ import { ButtonType } from '../components/Button.vue';
5
+ export type FilterValue = string | PickedDate | PickedUtcRange | string[] | null | undefined;
6
+ export interface FilterConfig {
7
+ type: 'text' | 'date' | 'date-range' | 'select' | 'multi-select';
8
+ key: string;
9
+ placeholder?: string;
10
+ options?: DropdownOption[];
11
+ }
12
+ export type LayoutMode = 'table' | 'cards' | 'screen';
13
+ export interface DataTableSettings {
14
+ striped: boolean;
15
+ compact: boolean;
16
+ }
17
+ export interface DataCardsSettings {
18
+ compact: boolean;
19
+ }
20
+ export interface DataListSettings extends DataTableSettings, DataCardsSettings {
21
+ layout: LayoutMode;
22
+ columns: Record<string, boolean>;
23
+ cardHeaderColumns: Record<string, boolean>;
24
+ columnOrder: string[];
25
+ cardHeaderOrder: string[];
26
+ }
27
+ export interface PageSettings {
28
+ page: number;
29
+ pageSize: number;
30
+ }
31
+ export interface PaginatorSettings extends PageSettings {
32
+ total: number;
33
+ }
34
+ export interface DataListConfig {
35
+ selectableAttr?: string | undefined;
36
+ columns: Column[];
37
+ sortEnabled: boolean;
38
+ actions?: Array<Action | ActionGroup> | undefined;
39
+ actionHeader?: string | undefined;
40
+ }
41
+ export type ColumnType = 'normal' | 'uuid' | 'date' | 'datetime';
42
+ export interface Column {
43
+ visible?: boolean | undefined;
44
+ primary?: boolean | undefined;
45
+ label: string;
46
+ property: string;
47
+ sort?: undefined | Sort;
48
+ converter?: undefined | ((v: any, item: any) => any);
49
+ type?: ColumnType;
50
+ class?: string | undefined;
51
+ headerClass?: string | undefined;
52
+ loading?: (() => boolean) | undefined;
53
+ }
54
+ export type SortDirection = 'asc' | 'desc' | null;
55
+ export interface Sort {
56
+ label: string;
57
+ active: Ref<boolean> | undefined;
58
+ direction?: Ref<SortDirection> | undefined;
59
+ callback: (property: string, direction: SortDirection) => any;
60
+ }
61
+ export interface Action {
62
+ icon: string;
63
+ label?: string;
64
+ ariaLabel?: string;
65
+ cardLabel?: string;
66
+ type?: ButtonType;
67
+ config?: Record<string, any> | undefined;
68
+ disabled?: (item: any) => boolean;
69
+ callback: (item: any) => any;
70
+ }
71
+ export interface ActionGroup {
72
+ isGroup: true;
73
+ icon?: string;
74
+ label?: string;
75
+ ariaLabel?: string;
76
+ cardLabel?: string;
77
+ config?: Record<string, any> | undefined;
78
+ items: Action[];
79
+ disabled?: (item: any) => boolean;
80
+ }
81
+ export declare const dataTableSettingsDefaults: DataTableSettings;
82
+ export declare const dataCardsSettingsDefaults: DataCardsSettings;
83
+ export declare const dataListSettingsDefaults: Partial<DataListSettings>;
@@ -0,0 +1,28 @@
1
+ import { ControlSize } from './types';
2
+ export interface CalendarConfig {
3
+ showTime?: boolean;
4
+ format?: string;
5
+ minDate?: Date | null;
6
+ maxDate?: Date | null;
7
+ showWeekNumber?: boolean;
8
+ locale?: string;
9
+ highlightWeekends?: boolean;
10
+ showOkButton?: boolean;
11
+ showClearButton?: boolean;
12
+ }
13
+ export interface DatePickerConfig extends CalendarConfig {
14
+ placeholder?: string;
15
+ size?: ControlSize;
16
+ }
17
+ export interface DateRangePickerConfig extends CalendarConfig {
18
+ placeholderFrom?: string;
19
+ placeholderTo?: string;
20
+ showIcon?: boolean;
21
+ showPresets?: boolean;
22
+ size?: ControlSize;
23
+ lazy?: boolean;
24
+ compact?: boolean;
25
+ }
26
+ export declare const calendarConfigDefaults: CalendarConfig;
27
+ export declare const datePickerConfigDefaults: Partial<DatePickerConfig>;
28
+ export declare const dateRangePickerConfigDefaults: Partial<DateRangePickerConfig>;
@@ -0,0 +1,19 @@
1
+ export interface PickedDate {
2
+ local: Date | null;
3
+ utc: string | null;
4
+ }
5
+ export interface PickedUtcRange {
6
+ fromUtc: string | null;
7
+ toUtc: string | null;
8
+ }
9
+ export type NameIdPair = {
10
+ name: string;
11
+ id: string;
12
+ };
13
+ export type ValueLabelPair = {
14
+ value: string;
15
+ label: string;
16
+ };
17
+ export type ControlSize = 'small' | 'normal' | 'large';
18
+ export type HorizontalAlignment = 'left' | 'center' | 'right';
19
+ export type FilterItemType = 'text' | 'textarea' | 'number' | 'date' | 'datetime' | 'daterange' | 'datetimerange' | 'dropdown' | 'checkbox' | 'separator';
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "admins-components",
3
- "version": "9.0.22",
3
+ "version": "9.0.23",
4
4
  "type": "module",
5
5
  "module": "./dist/admins-components.js",
6
6
  "types": "./dist/index.d.ts",