spiderly 19.1.0 → 19.2.0
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/spiderly.mjs +146 -89
- package/fesm2022/spiderly.mjs.map +1 -1
- package/lib/components/base-details/role-base-details.component.d.ts +4 -1
- package/lib/components/layout/profile-avatar/profile-avatar.component.d.ts +2 -2
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +7 -7
- package/lib/components/spiderly-data-view/spiderly-data-view.component.d.ts +10 -10
- package/lib/controls/spiderly-colorpicker/spiderly-colorpicker.component.d.ts +12 -0
- package/lib/controls/spiderly-controls.module.d.ts +2 -2
- package/lib/controls/spiderly-dropdown/spiderly-dropdown.component.d.ts +2 -1
- package/lib/entities/filter-rule.d.ts +23 -0
- package/lib/entities/filter-sort-meta.d.ts +4 -0
- package/lib/entities/filter.d.ts +27 -0
- package/lib/entities/init-top-bar-data.d.ts +3 -3
- package/lib/entities/paginated-result.d.ts +4 -0
- package/lib/entities/security-entities.d.ts +1 -1
- package/lib/modules/core.module.d.ts +20 -1
- package/lib/modules/spiderly-transloco.module.d.ts +35 -0
- package/lib/services/api.service.security.d.ts +6 -6
- package/lib/services/auth-base.service.d.ts +4 -4
- package/lib/services/helper-functions.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +5 -5
- package/lib/controls/spiderly-colorpick/spiderly-colorpick.component.d.ts +0 -11
- package/lib/entities/table-filter-context.d.ts +0 -8
- package/lib/entities/table-filter-sort-meta.d.ts +0 -4
- package/lib/entities/table-filter.d.ts +0 -33
- package/lib/entities/table-response.d.ts +0 -4
|
@@ -25,6 +25,9 @@ export declare class RoleBaseDetailsComponent {
|
|
|
25
25
|
formGroup: SpiderlyFormGroup;
|
|
26
26
|
roleFormGroup: SpiderlyFormGroup<Role>;
|
|
27
27
|
additionalButtons: SpiderlyButton[];
|
|
28
|
+
panelTitle: string;
|
|
29
|
+
showBigPanelTitle: boolean;
|
|
30
|
+
panelIcon: string;
|
|
28
31
|
authorizationForSaveSubscription: Subscription;
|
|
29
32
|
authorizedForSaveObservable: () => Observable<boolean>;
|
|
30
33
|
isAuthorizedForSave: boolean;
|
|
@@ -46,5 +49,5 @@ export declare class RoleBaseDetailsComponent {
|
|
|
46
49
|
save(): void;
|
|
47
50
|
ngOnDestroy(): void;
|
|
48
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<RoleBaseDetailsComponent, never>;
|
|
49
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RoleBaseDetailsComponent, "role-base-details", never, { "getCrudMenuForOrderedData": { "alias": "getCrudMenuForOrderedData"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "roleFormGroup": { "alias": "roleFormGroup"; "required": false; }; "additionalButtons": { "alias": "additionalButtons"; "required": false; }; "authorizedForSaveObservable": { "alias": "authorizedForSaveObservable"; "required": false; }; }, { "onSave": "onSave"; "onRoleFormGroupInitFinish": "onRoleFormGroupInitFinish"; "onIsAuthorizedForSaveChange": "onIsAuthorizedForSaveChange"; }, never, never, true, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoleBaseDetailsComponent, "role-base-details", never, { "getCrudMenuForOrderedData": { "alias": "getCrudMenuForOrderedData"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "roleFormGroup": { "alias": "roleFormGroup"; "required": false; }; "additionalButtons": { "alias": "additionalButtons"; "required": false; }; "panelTitle": { "alias": "panelTitle"; "required": false; }; "showBigPanelTitle": { "alias": "showBigPanelTitle"; "required": false; }; "panelIcon": { "alias": "panelIcon"; "required": false; }; "authorizedForSaveObservable": { "alias": "authorizedForSaveObservable"; "required": false; }; }, { "onSave": "onSave"; "onRoleFormGroupInitFinish": "onRoleFormGroupInitFinish"; "onIsAuthorizedForSaveChange": "onIsAuthorizedForSaveChange"; }, never, never, true, never>;
|
|
50
53
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { LayoutBaseService } from '../../../services/app-layout-base.service';
|
|
4
|
-
import {
|
|
4
|
+
import { UserBase } from '../../../entities/security-entities';
|
|
5
5
|
import { AuthBaseService } from '../../../services/auth-base.service';
|
|
6
6
|
import { TranslocoService } from '@jsverse/transloco';
|
|
7
7
|
import { ConfigBaseService } from '../../../services/config-base.service';
|
|
@@ -21,7 +21,7 @@ export declare class ProfileAvatarComponent {
|
|
|
21
21
|
config: ConfigBaseService;
|
|
22
22
|
isSideMenuLayout: boolean;
|
|
23
23
|
private initTopBarSubscription;
|
|
24
|
-
currentUser:
|
|
24
|
+
currentUser: UserBase;
|
|
25
25
|
userProfilePath: string;
|
|
26
26
|
unreadNotificationsCount: number;
|
|
27
27
|
menuItems: ProfileAvatarModalMenuItem[];
|
|
@@ -8,9 +8,9 @@ import { Observable } from 'rxjs';
|
|
|
8
8
|
import { PrimengOption } from '../../entities/primeng-option';
|
|
9
9
|
import { TranslocoService } from '@jsverse/transloco';
|
|
10
10
|
import { SpiderlyFormControl } from '../spiderly-form-control/spiderly-form-control';
|
|
11
|
-
import {
|
|
11
|
+
import { PaginatedResult } from '../../entities/paginated-result';
|
|
12
12
|
import { LazyLoadSelectedIdsResult } from '../../entities/lazy-load-selected-ids-result';
|
|
13
|
-
import {
|
|
13
|
+
import { Filter } from '../../entities/filter';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
export declare class SpiderlyDataTableComponent implements OnInit {
|
|
16
16
|
private router;
|
|
@@ -30,8 +30,8 @@ export declare class SpiderlyDataTableComponent implements OnInit {
|
|
|
30
30
|
readonly: boolean;
|
|
31
31
|
totalRecords: number;
|
|
32
32
|
onTotalRecordsChange: EventEmitter<number>;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
getPaginatedListObservableMethod: (tableFilter: Filter) => Observable<PaginatedResult>;
|
|
34
|
+
exportListToExcelObservableMethod: (tableFilter: Filter) => Observable<any>;
|
|
35
35
|
deleteItemFromTableObservableMethod: (rowId: number) => Observable<any>;
|
|
36
36
|
lastLazyLoadEvent: TableLazyLoadEvent;
|
|
37
37
|
loading: boolean;
|
|
@@ -40,13 +40,13 @@ export declare class SpiderlyDataTableComponent implements OnInit {
|
|
|
40
40
|
currentPageSelectedItemsFromDb: number[];
|
|
41
41
|
unselectedItems: number[];
|
|
42
42
|
selectionMode: 'single' | 'multiple' | undefined | null;
|
|
43
|
-
onLazyLoad: EventEmitter<
|
|
43
|
+
onLazyLoad: EventEmitter<Filter>;
|
|
44
44
|
rowsSelectedNumber: number;
|
|
45
45
|
isAllSelected: boolean;
|
|
46
46
|
fakeIsAllSelected: boolean;
|
|
47
47
|
isFirstTimeLazyLoad: boolean;
|
|
48
48
|
onIsAllSelectedChange: EventEmitter<AllClickEvent>;
|
|
49
|
-
selectedLazyLoadObservableMethod: (tableFilter:
|
|
49
|
+
selectedLazyLoadObservableMethod: (tableFilter: Filter) => Observable<LazyLoadSelectedIdsResult>;
|
|
50
50
|
additionalFilterIdLong: number;
|
|
51
51
|
matchModeDateOptions: SelectItem[];
|
|
52
52
|
matchModeNumberOptions: SelectItem[];
|
|
@@ -95,7 +95,7 @@ export declare class SpiderlyDataTableComponent implements OnInit {
|
|
|
95
95
|
rowUnselect(id: number): void;
|
|
96
96
|
getFormArrayControlByIndex(formControlName: string, index: number): SpiderlyFormControl;
|
|
97
97
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyDataTableComponent, never>;
|
|
98
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataTableComponent, "spiderly-data-table", never, { "tableTitle": { "alias": "tableTitle"; "required": false; }; "tableIcon": { "alias": "tableIcon"; "required": false; }; "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "
|
|
98
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataTableComponent, "spiderly-data-table", never, { "tableTitle": { "alias": "tableTitle"; "required": false; }; "tableIcon": { "alias": "tableIcon"; "required": false; }; "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "getPaginatedListObservableMethod": { "alias": "getPaginatedListObservableMethod"; "required": false; }; "exportListToExcelObservableMethod": { "alias": "exportListToExcelObservableMethod"; "required": false; }; "deleteItemFromTableObservableMethod": { "alias": "deleteItemFromTableObservableMethod"; "required": false; }; "newlySelectedItems": { "alias": "newlySelectedItems"; "required": false; }; "unselectedItems": { "alias": "unselectedItems"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedLazyLoadObservableMethod": { "alias": "selectedLazyLoadObservableMethod"; "required": false; }; "additionalFilterIdLong": { "alias": "additionalFilterIdLong"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showExportToExcelButton": { "alias": "showExportToExcelButton"; "required": false; }; "showReloadTableButton": { "alias": "showReloadTableButton"; "required": false; }; "getFormArrayItems": { "alias": "getFormArrayItems"; "required": false; }; "hasLazyLoad": { "alias": "hasLazyLoad"; "required": false; }; "getAlreadySelectedItemIds": { "alias": "getAlreadySelectedItemIds"; "required": false; }; "getAlreadySelectedItems": { "alias": "getAlreadySelectedItems"; "required": false; }; "getFormControl": { "alias": "getFormControl"; "required": false; }; "additionalIndexes": { "alias": "additionalIndexes"; "required": false; }; }, { "onTotalRecordsChange": "onTotalRecordsChange"; "onLazyLoad": "onLazyLoad"; "onIsAllSelectedChange": "onIsAllSelectedChange"; "onRowSelect": "onRowSelect"; "onRowUnselect": "onRowUnselect"; }, never, never, true, never>;
|
|
99
99
|
}
|
|
100
100
|
export declare class Action {
|
|
101
101
|
name?: string;
|
|
@@ -2,8 +2,8 @@ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { Table, TableFilterEvent, TableLazyLoadEvent } from 'primeng/table';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { TranslocoService } from '@jsverse/transloco';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { PaginatedResult } from '../../entities/paginated-result';
|
|
6
|
+
import { Filter } from '../../entities/filter';
|
|
7
7
|
import { Action } from '../spiderly-data-table/spiderly-data-table.component';
|
|
8
8
|
import { SelectItem } from 'primeng/api';
|
|
9
9
|
import { BaseEntity } from '../../entities/base-entity';
|
|
@@ -19,9 +19,9 @@ export declare class SpiderlyDataViewComponent<T> implements OnInit {
|
|
|
19
19
|
*/
|
|
20
20
|
items: T[];
|
|
21
21
|
rows: number;
|
|
22
|
-
filters:
|
|
22
|
+
filters: DataViewFilter<T>[];
|
|
23
23
|
totalRecords: number;
|
|
24
|
-
onLazyLoad: EventEmitter<
|
|
24
|
+
onLazyLoad: EventEmitter<Filter>;
|
|
25
25
|
showCardWrapper: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Whether to display additional data on the right side of the paginator.
|
|
@@ -31,7 +31,7 @@ export declare class SpiderlyDataViewComponent<T> implements OnInit {
|
|
|
31
31
|
showTotalRecordsNumber: boolean;
|
|
32
32
|
applyFiltersIcon: string;
|
|
33
33
|
clearFiltersIcon: string;
|
|
34
|
-
|
|
34
|
+
getPaginatedListObservableMethod: (filter: Filter) => Observable<PaginatedResult>;
|
|
35
35
|
lastLazyLoadEvent: TableLazyLoadEvent;
|
|
36
36
|
loading: boolean;
|
|
37
37
|
matchModeDateOptions: SelectItem[];
|
|
@@ -49,19 +49,19 @@ export declare class SpiderlyDataViewComponent<T> implements OnInit {
|
|
|
49
49
|
applyFilters: () => void;
|
|
50
50
|
clearFilters(): void;
|
|
51
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyDataViewComponent<any>, never>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataViewComponent<any>, "spiderly-data-view", never, { "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "showPaginatorRightData": { "alias": "showPaginatorRightData"; "required": false; }; "showTotalRecordsNumber": { "alias": "showTotalRecordsNumber"; "required": false; }; "applyFiltersIcon": { "alias": "applyFiltersIcon"; "required": false; }; "clearFiltersIcon": { "alias": "clearFiltersIcon"; "required": false; }; "
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataViewComponent<any>, "spiderly-data-view", never, { "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "showPaginatorRightData": { "alias": "showPaginatorRightData"; "required": false; }; "showTotalRecordsNumber": { "alias": "showTotalRecordsNumber"; "required": false; }; "applyFiltersIcon": { "alias": "applyFiltersIcon"; "required": false; }; "clearFiltersIcon": { "alias": "clearFiltersIcon"; "required": false; }; "getPaginatedListObservableMethod": { "alias": "getPaginatedListObservableMethod"; "required": false; }; }, { "onLazyLoad": "onLazyLoad"; }, ["cardBody"], ["[PAGINATORRIGHT]"], true, never>;
|
|
53
53
|
}
|
|
54
54
|
export interface DataViewCardBody<T> {
|
|
55
55
|
$implicit: T;
|
|
56
56
|
item: T;
|
|
57
57
|
index: number;
|
|
58
58
|
}
|
|
59
|
-
export interface
|
|
60
|
-
|
|
59
|
+
export interface DataViewFilter<T extends BaseEntity> {
|
|
60
|
+
label?: string;
|
|
61
61
|
field?: string & keyof T;
|
|
62
62
|
filterField?: string & keyof T;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
type?: 'text' | 'date' | 'multiselect' | 'boolean' | 'numeric' | 'blob';
|
|
64
|
+
placeholder?: string;
|
|
65
65
|
showMatchModes?: boolean;
|
|
66
66
|
dropdownOrMultiselectValues?: PrimengOption[];
|
|
67
67
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseControl } from '../base-control';
|
|
3
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SpiderlyColorPickerComponent extends BaseControl implements OnInit {
|
|
6
|
+
protected translocoService: TranslocoService;
|
|
7
|
+
showInputTextField: boolean;
|
|
8
|
+
constructor(translocoService: TranslocoService);
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyColorPickerComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyColorPickerComponent, "spiderly-colorpicker", never, { "showInputTextField": { "alias": "showInputTextField"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -13,10 +13,10 @@ import * as i11 from "./spiderly-multiselect/spiderly-multiselect.component";
|
|
|
13
13
|
import * as i12 from "./spiderly-number/spiderly-number.component";
|
|
14
14
|
import * as i13 from "./spiderly-dropdown/spiderly-dropdown.component";
|
|
15
15
|
import * as i14 from "./spiderly-editor/spiderly-editor.component";
|
|
16
|
-
import * as i15 from "./spiderly-
|
|
16
|
+
import * as i15 from "./spiderly-colorpicker/spiderly-colorpicker.component";
|
|
17
17
|
import * as i16 from "./spiderly-file/spiderly-file.component";
|
|
18
18
|
export declare class SpiderlyControlsModule {
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyControlsModule, never>;
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SpiderlyControlsModule, never, [typeof i1.SpiderlyTextboxComponent, typeof i2.SpiderlyTextareaComponent, typeof i3.SpiderlyCheckboxComponent, typeof i4.SpiderlyCalendarComponent, typeof i5.SpiderlyReturnButtonComponent, typeof i6.SpiderlyButtonComponent, typeof i7.SpiderlyPanelsModule, typeof i8.SpiderlyPasswordComponent, typeof i9.SpiderlyAutocompleteComponent, typeof i10.SpiderlyMultiAutocompleteComponent, typeof i11.SpiderlyMultiSelectComponent, typeof i12.SpiderlyNumberComponent, typeof i13.SpiderlyDropdownComponent, typeof i14.SpiderlyEditorComponent, typeof i15.
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SpiderlyControlsModule, never, [typeof i1.SpiderlyTextboxComponent, typeof i2.SpiderlyTextareaComponent, typeof i3.SpiderlyCheckboxComponent, typeof i4.SpiderlyCalendarComponent, typeof i5.SpiderlyReturnButtonComponent, typeof i6.SpiderlyButtonComponent, typeof i7.SpiderlyPanelsModule, typeof i8.SpiderlyPasswordComponent, typeof i9.SpiderlyAutocompleteComponent, typeof i10.SpiderlyMultiAutocompleteComponent, typeof i11.SpiderlyMultiSelectComponent, typeof i12.SpiderlyNumberComponent, typeof i13.SpiderlyDropdownComponent, typeof i14.SpiderlyEditorComponent, typeof i15.SpiderlyColorPickerComponent, typeof i16.SpiderlyFileComponent], [typeof i1.SpiderlyTextboxComponent, typeof i2.SpiderlyTextareaComponent, typeof i3.SpiderlyCheckboxComponent, typeof i4.SpiderlyCalendarComponent, typeof i5.SpiderlyReturnButtonComponent, typeof i6.SpiderlyButtonComponent, typeof i7.SpiderlyPanelsModule, typeof i8.SpiderlyPasswordComponent, typeof i9.SpiderlyAutocompleteComponent, typeof i10.SpiderlyMultiAutocompleteComponent, typeof i11.SpiderlyMultiSelectComponent, typeof i12.SpiderlyNumberComponent, typeof i13.SpiderlyDropdownComponent, typeof i14.SpiderlyEditorComponent, typeof i15.SpiderlyColorPickerComponent, typeof i16.SpiderlyFileComponent]>;
|
|
21
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<SpiderlyControlsModule>;
|
|
22
22
|
}
|
|
@@ -5,10 +5,11 @@ import { DropdownChangeEvent } from 'primeng/dropdown';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SpiderlyDropdownComponent extends BaseDropdownControl implements OnInit {
|
|
7
7
|
protected translocoService: TranslocoService;
|
|
8
|
+
isBooleanPicker: boolean;
|
|
8
9
|
onChange: EventEmitter<DropdownChangeEvent>;
|
|
9
10
|
constructor(translocoService: TranslocoService);
|
|
10
11
|
ngOnInit(): void;
|
|
11
12
|
change(event: DropdownChangeEvent): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyDropdownComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDropdownComponent, "spiderly-dropdown", never, {}, { "onChange": "onChange"; }, never, never, true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDropdownComponent, "spiderly-dropdown", never, { "isBooleanPicker": { "alias": "isBooleanPicker"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
14
15
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MatchModeCodes } from "../enums/match-mode-enum-codes";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a filter rule used for querying or filtering data collections.
|
|
4
|
+
*
|
|
5
|
+
* The `FilterRule` class is a generic structure that defines a single filtering condition,
|
|
6
|
+
* including the match mode (comparison operator), the value to compare, and an optional logical operator.
|
|
7
|
+
*
|
|
8
|
+
* The allowed match modes are determined by the type parameter `T`:
|
|
9
|
+
* - For `string`: supports `Contains`, `StartsWith`, and `Equals`.
|
|
10
|
+
* - For `boolean`: supports `Equals`.
|
|
11
|
+
* - For `Date`: supports `Equals`, `GreaterThan`, and `LessThan`.
|
|
12
|
+
* - For `number`: supports `Equals`, `GreaterThan`, `LessThan`, and `In`.
|
|
13
|
+
* - For other types: allows any value from `MatchModeCodes`.
|
|
14
|
+
*
|
|
15
|
+
* @template T The type of the value to filter by.
|
|
16
|
+
*/
|
|
17
|
+
export declare class FilterRule<T = any> {
|
|
18
|
+
matchMode: AllowedMatchModes<T>;
|
|
19
|
+
value: T;
|
|
20
|
+
operator?: string;
|
|
21
|
+
}
|
|
22
|
+
type AllowedMatchModes<T> = T extends string ? MatchModeCodes.Contains | MatchModeCodes.StartsWith | MatchModeCodes.Equals : T extends boolean ? MatchModeCodes.Equals : T extends Date ? MatchModeCodes.Equals | MatchModeCodes.GreaterThan | MatchModeCodes.LessThan : T extends number ? MatchModeCodes.Equals | MatchModeCodes.GreaterThan | MatchModeCodes.LessThan | MatchModeCodes.In : MatchModeCodes;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseEntity } from "./base-entity";
|
|
2
|
+
import { FilterSortMeta as FilterSortMeta } from "./filter-sort-meta";
|
|
3
|
+
import { FilterRule } from "./filter-rule";
|
|
4
|
+
export declare class Filter<T extends BaseEntity = any> extends BaseEntity {
|
|
5
|
+
filters?: {
|
|
6
|
+
[K in keyof T]?: FilterRule[];
|
|
7
|
+
};
|
|
8
|
+
first?: number;
|
|
9
|
+
rows?: number;
|
|
10
|
+
sortField?: string;
|
|
11
|
+
sortOrder?: number;
|
|
12
|
+
multiSortMeta?: FilterSortMeta[];
|
|
13
|
+
additionalFilterIdInt?: number;
|
|
14
|
+
additionalFilterIdLong?: number;
|
|
15
|
+
constructor({ filters, first, rows, sortField, sortOrder, multiSortMeta, additionalFilterIdInt, additionalFilterIdLong, }?: {
|
|
16
|
+
filters?: {
|
|
17
|
+
[K in keyof T]?: FilterRule[];
|
|
18
|
+
};
|
|
19
|
+
first?: number;
|
|
20
|
+
rows?: number;
|
|
21
|
+
sortField?: string;
|
|
22
|
+
sortOrder?: number;
|
|
23
|
+
multiSortMeta?: FilterSortMeta[];
|
|
24
|
+
additionalFilterIdInt?: number;
|
|
25
|
+
additionalFilterIdLong?: number;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { BaseEntity } from "./base-entity";
|
|
2
|
-
import {
|
|
2
|
+
import { UserBase } from "./security-entities";
|
|
3
3
|
export declare class InitTopBarData extends BaseEntity {
|
|
4
4
|
companyName?: string;
|
|
5
5
|
userProfilePath?: string;
|
|
6
6
|
unreadNotificationsCount?: number;
|
|
7
7
|
showProfileIcon?: boolean;
|
|
8
|
-
currentUser?:
|
|
8
|
+
currentUser?: UserBase;
|
|
9
9
|
constructor({ companyName, userProfilePath, unreadNotificationsCount, showProfileIcon, currentUser, }?: {
|
|
10
10
|
companyName?: string;
|
|
11
11
|
userProfilePath?: string;
|
|
12
12
|
unreadNotificationsCount?: number;
|
|
13
13
|
showProfileIcon?: boolean;
|
|
14
|
-
currentUser?:
|
|
14
|
+
currentUser?: UserBase;
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from "./base-entity";
|
|
2
2
|
import { RegistrationVerificationResultStatusCodes } from "../enums/security-enums";
|
|
3
3
|
import { Namebook } from "./namebook";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class UserBase extends BaseEntity {
|
|
5
5
|
id?: number;
|
|
6
6
|
email?: string;
|
|
7
7
|
constructor({ id, email, }?: {
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
import { EnvironmentProviders } from "@angular/core";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Provides core services and configuration for the Spiderly library.
|
|
4
|
+
*
|
|
5
|
+
* @param spiderlyCoreConfig Optional configuration object for Spiderly core.
|
|
6
|
+
* @returns EnvironmentProviders for Angular's dependency injection system.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* Call this function in your application's providers to set up core services.
|
|
10
|
+
*/
|
|
11
|
+
export declare function provideSpiderlyCore(spiderlyCoreConfig?: SpiderlyCoreConfig): EnvironmentProviders;
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for Spiderly core module.
|
|
14
|
+
*/
|
|
15
|
+
export interface SpiderlyCoreConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Whether to enable authentication features.
|
|
18
|
+
* Defaults to true. Set to false to disable authentication-related providers and initializers.
|
|
19
|
+
*/
|
|
20
|
+
useAuth?: boolean;
|
|
21
|
+
}
|
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
import { EnvironmentProviders, ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@jsverse/transloco";
|
|
4
|
+
/**
|
|
5
|
+
* Provides Transloco with Spiderly-specific configuration.
|
|
6
|
+
* @param config Optional configuration for available, preload, default, and fallback languages.
|
|
7
|
+
* @returns EnvironmentProviders for Angular DI.
|
|
8
|
+
*/
|
|
4
9
|
export declare function provideSpiderlyTransloco(config?: SpiderlyTranslocoConfig): EnvironmentProviders;
|
|
10
|
+
/**
|
|
11
|
+
* Angular module for Spiderly Transloco integration.
|
|
12
|
+
*/
|
|
5
13
|
export declare class SpiderlyTranslocoModule {
|
|
14
|
+
/**
|
|
15
|
+
* Configures the module with custom translation settings.
|
|
16
|
+
* @param config Optional SpiderlyTranslocoConfig object.
|
|
17
|
+
* @returns ModuleWithProviders for Angular module system.
|
|
18
|
+
*/
|
|
6
19
|
static forRoot(config?: SpiderlyTranslocoConfig): ModuleWithProviders<SpiderlyTranslocoModule>;
|
|
7
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyTranslocoModule, never>;
|
|
8
21
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SpiderlyTranslocoModule, never, [typeof i1.TranslocoModule], [typeof i1.TranslocoModule]>;
|
|
9
22
|
static ɵinj: i0.ɵɵInjectorDeclaration<SpiderlyTranslocoModule>;
|
|
10
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration interface for Spiderly Transloco.
|
|
26
|
+
*/
|
|
11
27
|
export interface SpiderlyTranslocoConfig {
|
|
28
|
+
/**
|
|
29
|
+
* List of language codes that are available for translation in your app.
|
|
30
|
+
* Example: ['en', 'en.generated', 'sr-Latn-RS', 'sr-Latn-RS.generated']
|
|
31
|
+
* See the full list of language codes here:
|
|
32
|
+
* https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
|
|
33
|
+
*/
|
|
12
34
|
availableLangs: string[];
|
|
35
|
+
/**
|
|
36
|
+
* List of language codes to preload at app startup.
|
|
37
|
+
* Example: ['en', 'en.generated']
|
|
38
|
+
* Only these languages will be loaded immediately; others load on demand.
|
|
39
|
+
*/
|
|
13
40
|
preloadLangs: string[];
|
|
41
|
+
/**
|
|
42
|
+
* The default language code to use if no language is set.
|
|
43
|
+
* Example: 'en'
|
|
44
|
+
*/
|
|
14
45
|
defaultLang: string;
|
|
46
|
+
/**
|
|
47
|
+
* The fallback language code to use if a translation key is missing.
|
|
48
|
+
* Example: 'en.generated'
|
|
49
|
+
*/
|
|
15
50
|
fallbackLang: string;
|
|
16
51
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Namebook } from '../entities/namebook';
|
|
4
|
-
import {
|
|
5
|
-
import { Login, Registration, RegistrationVerificationResult, RefreshTokenRequest, AuthResult, Role,
|
|
4
|
+
import { Filter } from '../entities/filter';
|
|
5
|
+
import { Login, Registration, RegistrationVerificationResult, RefreshTokenRequest, AuthResult, Role, UserBase, ExternalProvider, VerificationTokenRequest, RoleSaveBody, RoleMainUIForm } from '../entities/security-entities';
|
|
6
6
|
import { ConfigBaseService } from './config-base.service';
|
|
7
|
-
import {
|
|
7
|
+
import { PaginatedResult } from '../entities/paginated-result';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class ApiSecurityService {
|
|
10
10
|
protected http: HttpClient;
|
|
@@ -17,10 +17,10 @@ export declare class ApiSecurityService {
|
|
|
17
17
|
sendLoginVerificationEmail: (loginDTO: Login) => Observable<any>;
|
|
18
18
|
logout: (browserId: string) => Observable<any>;
|
|
19
19
|
refreshToken: (request: RefreshTokenRequest) => Observable<AuthResult>;
|
|
20
|
-
|
|
20
|
+
getCurrentUserBase: () => Observable<UserBase>;
|
|
21
21
|
getCurrentUserPermissionCodes: () => Observable<string[]>;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
getPaginatedRoleList: (dto: Filter) => Observable<PaginatedResult>;
|
|
23
|
+
exportRoleListToExcel: (dto: Filter) => Observable<any>;
|
|
24
24
|
deleteRole: (id: number) => Observable<any>;
|
|
25
25
|
getRoleMainUIFormDTO: (id: number) => Observable<RoleMainUIForm>;
|
|
26
26
|
getRole: (id: number) => Observable<Role>;
|
|
@@ -3,7 +3,7 @@ import { Router } from '@angular/router';
|
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
5
|
import { SocialUser, SocialAuthService } from '@abacritt/angularx-social-login';
|
|
6
|
-
import { ExternalProvider, Login, VerificationTokenRequest, AuthResult, Registration, RegistrationVerificationResult,
|
|
6
|
+
import { ExternalProvider, Login, VerificationTokenRequest, AuthResult, Registration, RegistrationVerificationResult, UserBase } from '../entities/security-entities';
|
|
7
7
|
import { ConfigBaseService } from './config-base.service';
|
|
8
8
|
import { ApiSecurityService } from './api.service.security';
|
|
9
9
|
import { InitCompanyAuthDialogDetails } from '../entities/init-company-auth-dialog-details';
|
|
@@ -18,8 +18,8 @@ export declare class AuthBaseService implements OnDestroy {
|
|
|
18
18
|
private timer?;
|
|
19
19
|
protected _currentUserPermissionCodes: BehaviorSubject<string[]>;
|
|
20
20
|
currentUserPermissionCodes$: Observable<string[]>;
|
|
21
|
-
protected _user: BehaviorSubject<
|
|
22
|
-
user$: Observable<
|
|
21
|
+
protected _user: BehaviorSubject<UserBase>;
|
|
22
|
+
user$: Observable<UserBase>;
|
|
23
23
|
private authChangeSub;
|
|
24
24
|
private extAuthChangeSub;
|
|
25
25
|
authChanged: Observable<boolean>;
|
|
@@ -39,7 +39,7 @@ export declare class AuthBaseService implements OnDestroy {
|
|
|
39
39
|
setLocalStorage(loginResult: AuthResult): void;
|
|
40
40
|
clearLocalStorage(): void;
|
|
41
41
|
getBrowserId(): string;
|
|
42
|
-
isAccessTokenExpired():
|
|
42
|
+
isAccessTokenExpired(): boolean;
|
|
43
43
|
getTokenRemainingTime(): number;
|
|
44
44
|
getAccessToken(): string;
|
|
45
45
|
private startTokenTimer;
|
|
@@ -3,7 +3,7 @@ import { HttpResponse } from "@angular/common/http";
|
|
|
3
3
|
import { BaseEntity } from "../entities/base-entity";
|
|
4
4
|
import { SpiderlyFormGroup } from "../components/spiderly-form-control/spiderly-form-control";
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
-
import {
|
|
6
|
+
import { Filter } from "../entities/filter";
|
|
7
7
|
import { Namebook } from "../entities/namebook";
|
|
8
8
|
import { Codebook } from "../entities/codebook";
|
|
9
9
|
import { PrimengOption } from "../entities/primeng-option";
|
|
@@ -28,7 +28,7 @@ export declare const getControl: <T extends BaseEntity>(formControlName: string
|
|
|
28
28
|
export declare function toCommaSeparatedString<T>(input: T[]): string;
|
|
29
29
|
export declare function isImageFileType(mimeType: string): boolean;
|
|
30
30
|
export declare function isExcelFileType(mimeType: string): boolean;
|
|
31
|
-
export declare function exportListToExcel(
|
|
31
|
+
export declare function exportListToExcel(exportListToExcelObservableMethod: (filter: Filter) => Observable<any>, filter: Filter): void;
|
|
32
32
|
export declare function getPrimengDropdownNamebookOptions(getDropdownListObservable: (parentEntityId?: number) => Observable<Namebook[]>, parentEntityId?: number): Observable<PrimengOption[]>;
|
|
33
33
|
export declare function getPrimengDropdownCodebookOptions(getDropdownListObservable: () => Observable<Codebook[]>): Observable<PrimengOption[]>;
|
|
34
34
|
export declare function getPrimengAutocompleteNamebookOptions(getAutocompleteListObservable: (limit: number, query: string, parentEntityId?: number) => Observable<Namebook[]>, limit: number, query: string, parentEntityId?: number): Observable<PrimengOption[]>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './lib/modules/spiderly-transloco.module';
|
|
|
3
3
|
export * from './lib/controls/spiderly-autocomplete/spiderly-autocomplete.component';
|
|
4
4
|
export * from './lib/controls/spiderly-calendar/spiderly-calendar.component';
|
|
5
5
|
export * from './lib/controls/spiderly-checkbox/spiderly-checkbox.component';
|
|
6
|
-
export * from './lib/controls/spiderly-
|
|
6
|
+
export * from './lib/controls/spiderly-colorpicker/spiderly-colorpicker.component';
|
|
7
7
|
export * from './lib/controls/spiderly-dropdown/spiderly-dropdown.component';
|
|
8
8
|
export * from './lib/controls/spiderly-editor/spiderly-editor.component';
|
|
9
9
|
export * from './lib/controls/spiderly-file/spiderly-file.component';
|
|
@@ -62,10 +62,10 @@ export * from './lib/entities/primeng-option';
|
|
|
62
62
|
export * from './lib/entities/security-entities';
|
|
63
63
|
export * from './lib/entities/simple-save-result';
|
|
64
64
|
export * from './lib/entities/spiderly-button';
|
|
65
|
-
export * from './lib/entities/
|
|
66
|
-
export * from './lib/entities/
|
|
67
|
-
export * from './lib/entities/
|
|
68
|
-
export * from './lib/entities/
|
|
65
|
+
export * from './lib/entities/filter';
|
|
66
|
+
export * from './lib/entities/filter-rule';
|
|
67
|
+
export * from './lib/entities/filter-sort-meta';
|
|
68
|
+
export * from './lib/entities/paginated-result';
|
|
69
69
|
export * from './lib/entities/init-company-auth-dialog-details';
|
|
70
70
|
export * from './lib/entities/init-top-bar-data';
|
|
71
71
|
export * from './lib/entities/is-authorized-for-save-event';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { BaseControl } from '../base-control';
|
|
3
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SpiderlyColorpickComponent extends BaseControl implements OnInit {
|
|
6
|
-
protected translocoService: TranslocoService;
|
|
7
|
-
constructor(translocoService: TranslocoService);
|
|
8
|
-
ngOnInit(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyColorpickComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyColorpickComponent, "spiderly-colorpick", never, {}, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MatchModeCodes } from "../enums/match-mode-enum-codes";
|
|
2
|
-
export declare class TableFilterContext<T = any> {
|
|
3
|
-
matchMode: AllowedMatchModes<T>;
|
|
4
|
-
value: T;
|
|
5
|
-
operator?: string;
|
|
6
|
-
}
|
|
7
|
-
type AllowedMatchModes<T> = T extends string ? MatchModeCodes.Contains | MatchModeCodes.StartsWith | MatchModeCodes.Equals : T extends boolean ? MatchModeCodes.Equals : T extends Date ? MatchModeCodes.Equals | MatchModeCodes.GreaterThan | MatchModeCodes.LessThan : T extends number ? MatchModeCodes.Equals | MatchModeCodes.GreaterThan | MatchModeCodes.LessThan | MatchModeCodes.In : MatchModeCodes;
|
|
8
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from "../entities/base-entity";
|
|
2
|
-
import { TableFilterSortMeta } from "../entities/table-filter-sort-meta";
|
|
3
|
-
import { MatchModeCodes } from "../enums/match-mode-enum-codes";
|
|
4
|
-
export declare class TableFilter<T extends BaseEntity = any> extends BaseEntity {
|
|
5
|
-
filters?: {
|
|
6
|
-
[K in keyof T]?: {
|
|
7
|
-
value: any;
|
|
8
|
-
matchMode: MatchModeCodes;
|
|
9
|
-
}[];
|
|
10
|
-
};
|
|
11
|
-
first?: number;
|
|
12
|
-
rows?: number;
|
|
13
|
-
sortField?: string;
|
|
14
|
-
sortOrder?: number;
|
|
15
|
-
multiSortMeta?: TableFilterSortMeta[];
|
|
16
|
-
additionalFilterIdInt?: number;
|
|
17
|
-
additionalFilterIdLong?: number;
|
|
18
|
-
constructor({ filters, first, rows, sortField, sortOrder, multiSortMeta, additionalFilterIdInt, additionalFilterIdLong, }?: {
|
|
19
|
-
filters?: {
|
|
20
|
-
[K in keyof T]?: {
|
|
21
|
-
value: any;
|
|
22
|
-
matchMode: MatchModeCodes;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
first?: number;
|
|
26
|
-
rows?: number;
|
|
27
|
-
sortField?: string;
|
|
28
|
-
sortOrder?: number;
|
|
29
|
-
multiSortMeta?: TableFilterSortMeta[];
|
|
30
|
-
additionalFilterIdInt?: number;
|
|
31
|
-
additionalFilterIdLong?: number;
|
|
32
|
-
});
|
|
33
|
-
}
|