@planeasyinc/le-angular 0.0.1

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.
Files changed (52) hide show
  1. package/README.md +6 -0
  2. package/dist/README.md +6 -0
  3. package/dist/fesm2022/planeasyinc-le-angular.mjs +1640 -0
  4. package/dist/fesm2022/planeasyinc-le-angular.mjs.map +1 -0
  5. package/dist/index.d.ts +6 -0
  6. package/dist/lib/components/container/container.component.d.ts +16 -0
  7. package/dist/lib/components/node/node.component.d.ts +7 -0
  8. package/dist/lib/components/sidebar/sidebar.component.d.ts +27 -0
  9. package/dist/lib/components/toast-list/toast-list.component.d.ts +9 -0
  10. package/dist/lib/constants/default-config.d.ts +2 -0
  11. package/dist/lib/directives/le-drawer-container.directive.d.ts +5 -0
  12. package/dist/lib/directives/le-drawer-content.directive.d.ts +5 -0
  13. package/dist/lib/directives/le-drawer.directive.d.ts +9 -0
  14. package/dist/lib/icons/icons-map.d.ts +17 -0
  15. package/dist/lib/icons/le-icon.component.d.ts +23 -0
  16. package/dist/lib/icons/svg/arrow-down.d.ts +5 -0
  17. package/dist/lib/icons/svg/chevron.d.ts +5 -0
  18. package/dist/lib/icons/svg/sort.d.ts +5 -0
  19. package/dist/lib/interceptors/le-auth.interceptor.d.ts +2 -0
  20. package/dist/lib/providers/provideConfig.d.ts +11 -0
  21. package/dist/lib/services/le-api.service.d.ts +17 -0
  22. package/dist/lib/services/le-auth.service.d.ts +16 -0
  23. package/dist/lib/services/le-data.service.d.ts +24 -0
  24. package/dist/lib/services/le-toast.service.d.ts +39 -0
  25. package/dist/lib/templates/index.d.ts +9 -0
  26. package/dist/lib/templates/json.template.d.ts +6 -0
  27. package/dist/lib/templates/reference.template.d.ts +6 -0
  28. package/dist/lib/templates/string.template.d.ts +6 -0
  29. package/dist/lib/tokens/config.token.d.ts +2 -0
  30. package/dist/lib/tokens/http-context.token.d.ts +2 -0
  31. package/dist/lib/types/le-config.d.ts +7 -0
  32. package/dist/lib/views/chart-view/chart-view.component.d.ts +7 -0
  33. package/dist/lib/views/form-view/form-renderer.component.d.ts +15 -0
  34. package/dist/lib/views/form-view/form-view-attachment.service.d.ts +13 -0
  35. package/dist/lib/views/form-view/form-view-attachment.utils.d.ts +24 -0
  36. package/dist/lib/views/form-view/form-view.component.d.ts +33 -0
  37. package/dist/lib/views/form-view/form-view.utils.d.ts +21 -0
  38. package/dist/lib/views/form-view/form.adapter.d.ts +2 -0
  39. package/dist/lib/views/gird-col-view/grid-col-view.component.d.ts +7 -0
  40. package/dist/lib/views/gird-view/grid-view.component.d.ts +7 -0
  41. package/dist/lib/views/loading-view/loading-view.component.d.ts +9 -0
  42. package/dist/lib/views/section-view/section-view.component.d.ts +7 -0
  43. package/dist/lib/views/table-view/table-data-sourse.d.ts +9 -0
  44. package/dist/lib/views/table-view/table-view-actions.component.d.ts +8 -0
  45. package/dist/lib/views/table-view/table-view-cell.directive.d.ts +11 -0
  46. package/dist/lib/views/table-view/table-view-pagination.component.d.ts +30 -0
  47. package/dist/lib/views/table-view/table-view.component.d.ts +58 -0
  48. package/dist/lib/views/table-view/table-view.types.d.ts +24 -0
  49. package/dist/lib/views/table-view/table-view.utils.d.ts +12 -0
  50. package/dist/styles/ant-overrides.scss +168 -0
  51. package/dist/styles/styles.scss +760 -0
  52. package/package.json +45 -0
@@ -0,0 +1,39 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface LeToastButtonControl {
3
+ type: 'button';
4
+ label: string;
5
+ actions: Array<{
6
+ type: string;
7
+ target: string;
8
+ }>;
9
+ }
10
+ export interface LeToastTextControl {
11
+ type: 'text';
12
+ value: string;
13
+ }
14
+ type LeToastType = 'success' | 'error' | 'info' | 'warning';
15
+ export interface LeToast {
16
+ id: string;
17
+ type: LeToastType;
18
+ controls: Array<LeToastTextControl | LeToastButtonControl>;
19
+ }
20
+ export declare class LeToastService {
21
+ private overlayRef?;
22
+ private overlay;
23
+ private _toasts;
24
+ readonly toasts: import("@angular/core").Signal<LeToast[]>;
25
+ constructor();
26
+ notify(toast: LeToast): void;
27
+ warn(...messages: string[]): void;
28
+ info(...messages: string[]): void;
29
+ success(...messages: string[]): void;
30
+ error(...messages: string[]): void;
31
+ remove(id: string): void;
32
+ processAction(action: LeToastButtonControl['actions'][0]): void;
33
+ private show;
34
+ private hide;
35
+ private buildToast;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<LeToastService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<LeToastService>;
38
+ }
39
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Type } from '@angular/core';
2
+ declare const TABLE_SELL_TEMPLATE_NAMES: {
3
+ readonly StringTemplate: "StringTemplate";
4
+ readonly ReferenceTemplate: "ReferenceTemplate";
5
+ readonly JsonTemplate: "JsonTemplate";
6
+ };
7
+ export type TableCellTemplateType = (typeof TABLE_SELL_TEMPLATE_NAMES)[keyof typeof TABLE_SELL_TEMPLATE_NAMES];
8
+ export declare const TABLE_CELL_TEMPLATES: Record<TableCellTemplateType, Type<unknown>>;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class JSONTemplate {
3
+ data: import("@angular/core").InputSignal<string>;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<JSONTemplate, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<JSONTemplate, "ng-component", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ReferenceTemplate {
3
+ data: import("@angular/core").InputSignal<unknown>;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceTemplate, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReferenceTemplate, "ng-component", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class StringTemplate {
3
+ data: import("@angular/core").InputSignal<string>;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<StringTemplate, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<StringTemplate, "ng-component", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const CONFIG_TOKEN: InjectionToken<import("../types/le-config").LeConfig>;
@@ -0,0 +1,2 @@
1
+ import { HttpContextToken } from '@angular/common/http';
2
+ export declare const IS_LIBRARY_REQUEST: HttpContextToken<boolean>;
@@ -0,0 +1,7 @@
1
+ export interface LeConfig {
2
+ apiUrl: string;
3
+ messages: {
4
+ tokenEmpty: string;
5
+ tokenExpired: string;
6
+ };
7
+ }
@@ -0,0 +1,7 @@
1
+ import { LeChartNode } from '@planeasyinc/le-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ChartViewComponent {
4
+ node: import("@angular/core").InputSignal<LeChartNode>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChartViewComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChartViewComponent, "chart-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { FeFormEngine, FeSection, FeControlConfig } from '@planeasyinc/fe-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FormRendererComponent {
4
+ private renderer;
5
+ private ref;
6
+ private destroyRef;
7
+ private styleRef;
8
+ engine: import("@angular/core").InputSignal<FeFormEngine>;
9
+ sections: import("@angular/core").InputSignal<FeSection[]>;
10
+ topLevelControls: import("@angular/core").InputSignal<FeControlConfig[]>;
11
+ customCss: import("@angular/core").InputSignal<string>;
12
+ constructor();
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormRendererComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormRendererComponent, "le-form-renderer", never, { "engine": { "alias": "engine"; "required": true; "isSignal": true; }; "sections": { "alias": "sections"; "required": true; "isSignal": true; }; "topLevelControls": { "alias": "topLevelControls"; "required": false; "isSignal": true; }; "customCss": { "alias": "customCss"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FormViewAttachmentService {
3
+ private apiService;
4
+ private _cache;
5
+ resolve(attachment: any): Promise<string>;
6
+ download(attachment: any): Promise<void>;
7
+ private resolveAttachmentData;
8
+ private fetchAttachmentData;
9
+ private normalizeFileData;
10
+ private downloadWithAnchor;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormViewAttachmentService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormViewAttachmentService>;
13
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Get preview URL for image (with disposition_type=inline)
3
+ */
4
+ export declare const getPreviewUrl: (downloadUrl: string) => string;
5
+ /**
6
+ * Clear file data from 'unsafe:' prefix
7
+ */
8
+ export declare const clearFileData: (data: string) => string;
9
+ /**
10
+ * If attachment is an image
11
+ */
12
+ export declare const isImageAttachment: (attachment: any) => boolean;
13
+ export declare const isDownloadFileString: (str: string) => boolean;
14
+ export declare const isUrlString: (str: string) => boolean;
15
+ export declare const isBase64String: (str: string) => boolean;
16
+ export declare const isDataUrlString: (str: string) => boolean;
17
+ /**
18
+ * Is attachment reference
19
+ */
20
+ export declare const isAttachmentRef: (attachment: any) => boolean;
21
+ /**
22
+ * Get attachment url
23
+ */
24
+ export declare const getAttachmentUrl: (attachment: any) => string;
@@ -0,0 +1,33 @@
1
+ import { LeFormNode } from '@planeasyinc/le-core';
2
+ import { FeControlConfig, FeFormEngine, FeSection } from '@planeasyinc/fe-core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class FormViewComponent {
5
+ private apiService;
6
+ private dataService;
7
+ private attachmentService;
8
+ private viewportScroller;
9
+ private toastService;
10
+ private _isLoading;
11
+ private _form;
12
+ private _sections;
13
+ private _topLevelControls;
14
+ private _engine;
15
+ private _actionHandlers;
16
+ node: import("@angular/core").InputSignal<LeFormNode>;
17
+ readonly isLoading: import("@angular/core").Signal<boolean>;
18
+ readonly data: import("@angular/core").Signal<{
19
+ engine: FeFormEngine;
20
+ sections: FeSection[];
21
+ customCss: string;
22
+ topLevelControls: FeControlConfig[];
23
+ }>;
24
+ constructor();
25
+ private init;
26
+ private processAction;
27
+ private sortSections;
28
+ private getFormData;
29
+ private mapUpdateFormActionToFormNode;
30
+ private processActionList;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormViewComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormViewComponent, "form-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
33
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Handle placeholders in onSuccess callback.
3
+ */
4
+ export declare const isPlaceholder: (value: unknown) => boolean;
5
+ /**
6
+ * @param value "{email_verification_code_field}"
7
+ * @returns "email_verification_code_field"
8
+ */
9
+ export declare const getPlaceholderValue: (value: string) => string;
10
+ /**
11
+ * @param body {"email_verification_code": "{email_verification_code_field}"}
12
+ * @returns ["email_verification_code_field"]
13
+ */
14
+ export declare const mapActionBodyToFieldsArray: (body: Record<string, string>) => string[];
15
+ /**
16
+ * @param body {"email_verification_code": "{email_verification_code_field}"}
17
+ * @param errors {"email_verification_code": "Invalid email verification code"}
18
+ * @returns true if body fields have errors
19
+ */
20
+ export declare const isErrorCorrespondActionBody: (body: Record<string, string>, errors: Record<string, any>) => boolean;
21
+ export declare const mapResponseToRequestBody: (bodyModel?: Record<string, string>, values?: Record<string, any>) => Record<string, any>;
@@ -0,0 +1,2 @@
1
+ import type { FeForm } from '@planeasyinc/fe-core';
2
+ export declare const adaptForm: (raw: unknown) => FeForm;
@@ -0,0 +1,7 @@
1
+ import { LeGridColNode } from '@planeasyinc/le-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GridColViewComponent {
4
+ node: import("@angular/core").InputSignal<LeGridColNode>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<GridColViewComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<GridColViewComponent, "grid-col-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { LeGridNode } from '@planeasyinc/le-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GridComponent {
4
+ node: import("@angular/core").InputSignal<LeGridNode>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "grid-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LoadingViewComponent {
3
+ headerHeight: import("@angular/core").InputSignal<number>;
4
+ rowHeight: import("@angular/core").InputSignal<number>;
5
+ rowCount: import("@angular/core").InputSignal<number>;
6
+ protected rows: import("@angular/core").Signal<number[]>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingViewComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingViewComponent, "app-loading-view", never, { "headerHeight": { "alias": "headerHeight"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "rowCount": { "alias": "rowCount"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { LeSectionNode } from '@planeasyinc/le-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SectionComponent {
4
+ node: import("@angular/core").InputSignal<LeSectionNode>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "section-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { DataSource } from '@angular/cdk/table';
2
+ import { Observable } from 'rxjs';
3
+ export declare class TableDataSource<IData> extends DataSource<IData> {
4
+ private data;
5
+ get count(): number;
6
+ constructor(data?: IData[]);
7
+ connect(): Observable<IData[]>;
8
+ disconnect(): void;
9
+ }
@@ -0,0 +1,8 @@
1
+ import { LeTableAction } from '@planeasyinc/le-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TableViewActions {
4
+ actions: import("@angular/core").InputSignal<LeTableAction[]>;
5
+ actionClicked: import("@angular/core").OutputEmitterRef<LeTableAction>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableViewActions, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableViewActions, "table-view-actions", never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "actionClicked": "actionClicked"; }, never, never, true, never>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TableViewCellDirective {
3
+ private vcr;
4
+ private componentRef?;
5
+ readonly type: import("@angular/core").InputSignal<string>;
6
+ readonly data: import("@angular/core").InputSignal<unknown>;
7
+ constructor();
8
+ private setEffects;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableViewCellDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TableViewCellDirective, "[tableViewCell]", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,30 @@
1
+ import { PageChange } from './table-view.types';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TableViewPaginationComponent {
4
+ pageSize: import("@angular/core").InputSignal<number>;
5
+ pageSizeOptions: import("@angular/core").InputSignal<number[]>;
6
+ entriesCount: import("@angular/core").InputSignal<number>;
7
+ pageChange: import("@angular/core").OutputEmitterRef<PageChange>;
8
+ protected selectedPageSize: import("@angular/core").WritableSignal<number>;
9
+ protected selectedPageIndex: import("@angular/core").WritableSignal<number>;
10
+ entriesRange: import("@angular/core").Signal<{
11
+ start: number;
12
+ end: number;
13
+ }>;
14
+ constructor();
15
+ onPageSizeChange(option: number): void;
16
+ onNavigateClick(param: 'next' | 'prev'): void;
17
+ canNavigatePrev(index?: number): boolean;
18
+ canNavigateNext(index?: number): boolean;
19
+ private setEffects;
20
+ /**
21
+ * @return page index or last available page index for selected page size
22
+ */
23
+ private getPageIndexOnPageSizeChange;
24
+ /**
25
+ * @return last available page index
26
+ */
27
+ private getLastPageIndex;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableViewPaginationComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableViewPaginationComponent, "table-view-pagination", never, { "pageSize": { "alias": "pageSize"; "required": true; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": true; "isSignal": true; }; "entriesCount": { "alias": "entriesCount"; "required": true; "isSignal": true; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
30
+ }
@@ -0,0 +1,58 @@
1
+ import { LeTableAction, LeTableNode } from '@planeasyinc/le-core';
2
+ import { TableDataSource } from './table-data-sourse';
3
+ import { PageChange } from './table-view.types';
4
+ import * as i0 from "@angular/core";
5
+ interface ColumnModel {
6
+ type: string;
7
+ key: string;
8
+ label: string;
9
+ [key: string]: any;
10
+ }
11
+ interface CellModel {
12
+ [key: string]: any;
13
+ }
14
+ export declare class TableViewComponent {
15
+ private apiService;
16
+ private dataService;
17
+ node: import("@angular/core").InputSignal<LeTableNode>;
18
+ private _columns;
19
+ private _data;
20
+ private _total;
21
+ private _isLoading;
22
+ private _pageIndex;
23
+ private _pageSize;
24
+ private _pageSizeOptions;
25
+ private _sortConfig;
26
+ private _sortMap;
27
+ private _sortOrder;
28
+ private _cancelRequest$;
29
+ readonly columns: import("@angular/core").Signal<ColumnModel[]>;
30
+ readonly data: import("@angular/core").Signal<TableDataSource<CellModel>>;
31
+ readonly displayedColumns: import("@angular/core").Signal<string[]>;
32
+ readonly isLoading: import("@angular/core").Signal<boolean>;
33
+ readonly pageIndex: import("@angular/core").Signal<number>;
34
+ readonly pageSize: import("@angular/core").Signal<number>;
35
+ readonly pageSizeOptions: import("@angular/core").Signal<number[]>;
36
+ readonly entriesCount: import("@angular/core").Signal<number>;
37
+ readonly sortMap: import("@angular/core").Signal<Map<string, "asc" | "desc">>;
38
+ readonly sortOrder: import("@angular/core").Signal<Map<string, number>>;
39
+ readonly isSortingEnabled: import("@angular/core").Signal<boolean>;
40
+ readonly sortColumnKeys: import("@angular/core").Signal<Set<string>>;
41
+ readonly hasRowClickAction: import("@angular/core").Signal<boolean>;
42
+ constructor();
43
+ onPageChange(pageChange: PageChange): void;
44
+ onSortClick(event: Event, column: ColumnModel): void;
45
+ onToolbarActionClick({ actions }: LeTableAction): void;
46
+ onRowClick(row: CellModel): void;
47
+ private processTableAction;
48
+ private setPagination;
49
+ private getTableData;
50
+ private buildRequest;
51
+ private handleTableDataSuccessResponse;
52
+ private handleTableDataErrorResponse;
53
+ private interpolateRowValues;
54
+ private setEffects;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableViewComponent, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableViewComponent, "table-view", never, { "node": { "alias": "node"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
57
+ }
58
+ export {};
@@ -0,0 +1,24 @@
1
+ export interface PageChange {
2
+ pageIndex: number;
3
+ pageSize: number;
4
+ }
5
+ type TablePagination = {
6
+ pageIndex: number;
7
+ pageSize: number;
8
+ } | {
9
+ pageIndex?: never;
10
+ pageSize?: never;
11
+ };
12
+ type TableSort = {
13
+ sort: string[];
14
+ } | {
15
+ sort?: never;
16
+ };
17
+ interface TableFilters {
18
+ filters?: Record<string, string>;
19
+ }
20
+ export type TableParams = TableFilters & TableSort & TablePagination;
21
+ export type RequestContext = {
22
+ [Property in keyof TableParams]: TableParams[Property];
23
+ };
24
+ export {};
@@ -0,0 +1,12 @@
1
+ import { RequestContext, TableParams } from './table-view.types';
2
+ export declare const isPlaceholder: (value: string) => boolean;
3
+ export declare const mapSortStringToSort: (sort: string) => [key: string, "asc" | "desc"];
4
+ export declare const mapSortStringListToSortMap: (sortList: string[]) => Map<string, "asc" | "desc">;
5
+ export declare const mapSortMapToSortStringList: (sortMap: Map<string, "asc" | "desc">) => string[];
6
+ export declare const mapFiltersToFilterString: (filters: Record<string, string>) => string;
7
+ export declare const buildRequestContext: (params: TableParams, ctx: {
8
+ isSortable: boolean;
9
+ hasPagination: boolean;
10
+ }) => RequestContext;
11
+ export declare const buildRequestBody: (params: RequestContext) => Record<string, any>;
12
+ export declare const buildQueryString: (params: RequestContext) => string;
@@ -0,0 +1,168 @@
1
+ /* =========================
2
+ ANT STYLE OVERRIDERS
3
+ ========================== */
4
+ .ant-btn-primary {
5
+ background-color: var(--le-color-primary);
6
+ border-color: var(--le-color-primary);
7
+ }
8
+
9
+ .ant-picker-range .ant-picker-active-bar {
10
+ bottom: -1px;
11
+ height: 2px;
12
+ margin-left: 11px;
13
+ background: var(--le-color-primary-400);
14
+ opacity: 0;
15
+ transition: all 0.3s ease-out;
16
+ pointer-events: none;
17
+ }
18
+
19
+ .ant-picker-ranges .ant-picker-preset > .ant-tag-blue {
20
+ color: var(--le-color-primary);
21
+ background: #e6f7ff;
22
+ border-color: var(--le-color-hover-light);
23
+ }
24
+
25
+ .ant-picker-panel-focused {
26
+ border-color: var(--le-color-primary);
27
+ }
28
+
29
+ .ant-picker-header-view button:hover {
30
+ color: var(--le-color-primary);
31
+ }
32
+
33
+ .ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner::before {
34
+ border: 1px solid var(--le-color-primary);
35
+ }
36
+
37
+ .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner,
38
+ .ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner,
39
+ .ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner {
40
+ background: var(--le-color-primary);
41
+ }
42
+
43
+ .ant-picker-today-btn {
44
+ color: var(--le-color-primary);
45
+ }
46
+ .ant-picker-today-btn:hover {
47
+ color: var(--le-color-primary-400);
48
+ }
49
+ .ant-picker-today-btn:active {
50
+ color: var(--le-color-primary);
51
+ }
52
+
53
+ .ant-picker-week-panel-row-selected td,
54
+ .ant-picker-week-panel-row-selected:hover td {
55
+ background: var(--le-color-primary);
56
+ }
57
+
58
+ .ant-input-group-addon .ant-select-open .ant-select-selector,
59
+ .ant-input-group-addon .ant-select-focused .ant-select-selector {
60
+ color: var(--le-color-primary);
61
+ }
62
+
63
+ .ant-tag-checkable:not(.ant-tag-checkable-checked):hover {
64
+ color: var(--le-color-primary);
65
+ }
66
+ .ant-tag-checkable:active,
67
+ .ant-tag-checkable-checked {
68
+ color: var(--le-color-background);
69
+ }
70
+ .ant-tag-checkable-checked {
71
+ background-color: var(--le-color-primary);
72
+ }
73
+ .ant-tag-checkable:active {
74
+ background-color: var(--le-color-primary-900);
75
+ }
76
+
77
+ .ant-tag-blue {
78
+ color: var(--le-color-primary-900);
79
+ background: #e6f7ff;
80
+ border-color: var(--le-color-primary-400);
81
+ }
82
+ .ant-tag-blue-inverse {
83
+ color: var(--le-color-background);
84
+ background: var(--le-color-primary);
85
+ border-color: var(--le-color-primary-400);
86
+ }
87
+ .ant-tag-geekblue {
88
+ color: var(--le-color-primary-900);
89
+ background: var(--le-color-primary-50);
90
+ border-color: var(--le-color-primary-400);
91
+ }
92
+ .ant-tag-geekblue-inverse {
93
+ color: var(--le-color-background);
94
+ background: var(--le-color-primary);
95
+ border-color: var(--le-color-primary);
96
+ }
97
+ .ant-tag-purple {
98
+ color: #531dab;
99
+ background: #f9f0ff;
100
+ border-color: #d3adf7;
101
+ }
102
+ .ant-tag-purple-inverse {
103
+ color: var(--le-color-background);
104
+ background: #722ed1;
105
+ border-color: #722ed1;
106
+ }
107
+ .ant-tag-success {
108
+ color: var(--le-color-success);
109
+ background: var(--le-color-success-bg);
110
+ border-color: #b7eb8f;
111
+ }
112
+ .ant-tag-processing {
113
+ color: var(--le-color-primary);
114
+ background: #e6f7ff;
115
+ border-color: var(--le-color-primary-400);
116
+ }
117
+ .ant-tag-error {
118
+ color: var(--le-color-error);
119
+ background: var(--le-color-error-bg);
120
+ border-color: #ffccc7;
121
+ }
122
+ .ant-tag-warning {
123
+ color: var(--le-color-warning);
124
+ background: var(--le-color-warning-bg);
125
+ border-color: #ffe58f;
126
+ }
127
+ .ant-input:hover,
128
+ .ant-input-focused,
129
+ .ant-input:focus,
130
+ .ant-picker-focused,
131
+ .ant-picker:hover,
132
+ .ant-select:not(.ant-select-disabled):hover .ant-select-selector,
133
+ .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector,
134
+ .ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover,
135
+ .ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover,
136
+ .ant-input-number-affix-wrapper:hover,
137
+ .ant-input-number-affix-wrapper-focused,
138
+ .ant-input-number-affix-wrapper:focus {
139
+ border-color: var(--le-color-primary);
140
+ box-shadow: none;
141
+ }
142
+
143
+ .ant-checkbox-checked .ant-checkbox-inner {
144
+ background-color: var(--le-color-primary);
145
+ border-color: var(--le-color-primary);
146
+ }
147
+ .ant-checkbox-input:focus + .ant-checkbox-inner,
148
+ .ant-checkbox-wrapper:hover .ant-checkbox-inner,
149
+ .ant-checkbox:hover .ant-checkbox-inner,
150
+ .ant-checkbox-checked::after {
151
+ border-color: var(--le-color-primary);
152
+ }
153
+
154
+ .ant-input-focused,
155
+ .ant-picker-focused {
156
+ box-shadow: none;
157
+ }
158
+
159
+ .ant-btn-primary:focus,
160
+ .ant-btn-primary:hover {
161
+ background-color: var(--le-color-primary-hover);
162
+ border-color: var(--le-color-primary-hover);
163
+ }
164
+
165
+ .ant-btn-primary:active {
166
+ border-color: var(--le-color-primary-active);
167
+ background-color: var(--le-color-primary-active);
168
+ }