spiderly 19.5.2 → 19.5.4-preview.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/README.md +6 -1
- package/fesm2022/spiderly.mjs +2603 -2325
- package/fesm2022/spiderly.mjs.map +1 -1
- package/lib/components/auth/partials/auth.component.d.ts +3 -3
- package/lib/components/base-form/base-form copy.d.ts +130 -9
- package/lib/components/layout/topbar/topbar.component.d.ts +3 -3
- package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +1 -1
- package/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.d.ts +1 -1
- package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +2 -2
- package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts +2 -2
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +6 -6
- package/lib/components/spiderly-data-view/spiderly-data-view.component.d.ts +1 -1
- package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +1 -1
- package/lib/components/spiderly-form-control/spiderly-form-control.d.ts +8 -2
- package/lib/controls/spiderly-file/spiderly-file.component.d.ts +16 -4
- package/lib/entities/codebook.d.ts +1 -1
- package/lib/entities/filter-rule.d.ts +1 -1
- package/lib/entities/filter.d.ts +3 -3
- package/lib/entities/image-dimensions-validation-result.d.ts +4 -0
- package/lib/entities/init-company-auth-dialog-details.d.ts +1 -1
- package/lib/entities/init-top-bar-data.d.ts +2 -2
- package/lib/entities/is-authorized-for-save-event.d.ts +1 -1
- package/lib/entities/last-menu-icon-index-clicked.d.ts +1 -1
- package/lib/entities/lazy-load-selected-ids-result.d.ts +1 -1
- package/lib/entities/namebook.d.ts +1 -1
- package/lib/entities/primeng-option.d.ts +1 -1
- package/lib/entities/security-entities.d.ts +12 -12
- package/lib/entities/simple-save-result.d.ts +1 -1
- package/lib/interceptors/http-loading.interceptor.d.ts +1 -1
- package/lib/services/base-form.service.d.ts +2 -4
- package/lib/services/config.service.base.d.ts +1 -1
- package/lib/services/helper-functions.d.ts +13 -9
- package/lib/services/validator-abstract.service.d.ts +8 -3
- package/package.json +1 -1
- package/public-api.d.ts +26 -27
- package/styles/components/info-card/info-card.component.scss +7 -7
- package/styles/components/layout/profile-avatar/profile-avatar.component.scss +5 -5
- package/styles/components/layout/topbar/topbar.component.scss +8 -8
- package/styles/components/spiderly-data-table/spiderly-data-table.component.scss +39 -39
- package/styles/components/spiderly-data-view/spiderly-data-view.component.scss +45 -47
- package/styles/components/spiderly-panels/panel-body/panel-body.component.scss +6 -6
- package/styles/components/spiderly-panels/panel-footer/panel-footer.component.scss +15 -15
- package/styles/components/spiderly-panels/spiderly-panel/spiderly-panel.component.scss +59 -59
- package/styles/controls/base-controls.scss +12 -12
- package/styles/controls/spiderly-checkbox/spiderly-checkbox.component.scss +18 -18
- package/styles/styles/layout/_content.scss +8 -8
- package/styles/styles/layout/_footer.scss +8 -8
- package/styles/styles/layout/_main.scss +18 -18
- package/styles/styles/layout/_menu.scss +116 -109
- package/styles/styles/layout/_mixins.scss +8 -8
- package/styles/styles/layout/_preloading.scss +38 -37
- package/styles/styles/layout/_responsive.scss +78 -78
- package/styles/styles/layout/_spiderly-controls.scss +1 -1
- package/styles/styles/layout/_topbar.scss +211 -206
- package/styles/styles/layout/_typography.scss +35 -30
- package/styles/styles/layout/_utils.scss +15 -15
- package/styles/styles/layout/_variables.scss +796 -705
- package/styles/styles/layout/layout.scss +2 -2
- package/styles/styles/styles.scss +1 -1
- package/lib/entities/mime-type.d.ts +0 -11
- package/lib/services/translate-labels-abstract.service.d.ts +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
2
|
-
import { AuthServiceBase } from
|
|
3
|
-
import { ConfigServiceBase } from
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { AuthServiceBase } from '../../../services/auth.service.base';
|
|
3
|
+
import { ConfigServiceBase } from '../../../services/config.service.base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AuthComponent {
|
|
6
6
|
private config;
|
|
@@ -7,7 +7,7 @@ import { SpiderlyMessageService } from '../../services/spiderly-message.service'
|
|
|
7
7
|
import { SpiderlyFormArray, SpiderlyFormControl, SpiderlyFormGroup } from '../spiderly-form-control/spiderly-form-control';
|
|
8
8
|
import { BaseFormService } from './../../services/base-form.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class BaseFormCopy<
|
|
10
|
+
export declare class BaseFormCopy<TMainUIForm extends BaseEntity = any, TSaveBody extends BaseEntity = any> implements OnInit {
|
|
11
11
|
protected differs: KeyValueDiffers;
|
|
12
12
|
protected http: HttpClient;
|
|
13
13
|
protected messageService: SpiderlyMessageService;
|
|
@@ -16,22 +16,143 @@ export declare class BaseFormCopy<T extends BaseEntity = any> implements OnInit
|
|
|
16
16
|
protected route: ActivatedRoute;
|
|
17
17
|
protected translocoService: TranslocoService;
|
|
18
18
|
protected baseFormService: BaseFormService;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The root form group that holds all form controls, typed to `TSaveBody`.
|
|
21
|
+
* Assign `saveObservableMethod` on it to define the HTTP call used for saving.
|
|
22
|
+
* The form controls are built automatically from the `TSaveBody` schema when you call
|
|
23
|
+
* `baseFormService.initFormGroup(this.parentFormGroup, saveBodyClass, saveBody)`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* this.parentFormGroup.saveObservableMethod = this.apiService.saveProduct;
|
|
28
|
+
*
|
|
29
|
+
* this.baseFormService.initFormGroup(
|
|
30
|
+
* this.parentFormGroup,
|
|
31
|
+
* ProductSaveBody,
|
|
32
|
+
* saveBody,
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
parentFormGroup: SpiderlyFormGroup<TSaveBody>;
|
|
37
|
+
/**
|
|
38
|
+
* The class reference for the main UI form entity (`TMainUIForm`).
|
|
39
|
+
* This represents the shape of the data **returned by the API** after a save.
|
|
40
|
+
* Used internally by `mapMainUIFormToSaveBody` to transform the API response back into `TSaveBody`
|
|
41
|
+
* for form re-initialization.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* this.mainUIFormClass = ProductMainUIForm;
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
mainUIFormClass: SchemaAwareConstructor<TMainUIForm>;
|
|
49
|
+
/**
|
|
50
|
+
* The class reference for the save body entity (`TSaveBody`).
|
|
51
|
+
* This represents the shape of the data **sent to the API** when saving.
|
|
52
|
+
* Used internally to build form controls from the schema via `initFormGroup`,
|
|
53
|
+
* and to locate the main DTO property (marked with `isSaveBodyMainDTO: true`) for extracting the saved entity's ID.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* this.saveBodyClass = ProductSaveBody;
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
saveBodyClass: SchemaAwareConstructor<TSaveBody>;
|
|
61
|
+
/**
|
|
62
|
+
* The toast message displayed after a successful save.
|
|
63
|
+
* Override this to customize the success notification text for a specific entity.
|
|
64
|
+
* If you want to change the message for all entities, update the `SuccessfulSaveToastDescription` key
|
|
65
|
+
* in your translation JSON file instead.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* this.successfulSaveToastDescription = 'Product saved successfully!';
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
23
72
|
successfulSaveToastDescription: string;
|
|
24
73
|
private modelDiffer;
|
|
25
74
|
constructor(differs: KeyValueDiffers, http: HttpClient, messageService: SpiderlyMessageService, changeDetectorRef: ChangeDetectorRef, router: Router, route: ActivatedRoute, translocoService: TranslocoService, baseFormService: BaseFormService);
|
|
26
75
|
ngOnInit(): void;
|
|
27
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Executes the save flow for the form. The execution order is:
|
|
78
|
+
* 1. Builds the save body from the form's raw value.
|
|
79
|
+
* 2. Calls {@link onBeforeSave} — use this to modify the save body before validation.
|
|
80
|
+
* 3. Validates the form. If invalid, shows an error message and stops.
|
|
81
|
+
* 4. Sends the save HTTP request via `saveObservableMethod`.
|
|
82
|
+
* 5. Calls {@link onAfterSaveRequest} — fires immediately after the request is sent, before the response arrives.
|
|
83
|
+
* 6. On successful response: shows a success toast, reroutes, and calls {@link onAfterSave}. The form is re-initialized only when `rerouteToParentSlugAfterSave` is `false`.
|
|
84
|
+
*
|
|
85
|
+
* @param rerouteToParentSlugAfterSave - When `true` (default), navigates to the parent URL after save. When `false`, re-initializes the form and navigates to the saved object's URL.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```html
|
|
89
|
+
* <button (click)="onSave()">Save</button>
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```html
|
|
94
|
+
* <!-- Save and stay on the saved object's page -->
|
|
95
|
+
* <button (click)="onSave(false)">Save and stay</button>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
onSave: (rerouteToParentSlugAfterSave?: boolean) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Handles navigation after a successful save.
|
|
101
|
+
* Override this to customize the post-save navigation behavior.
|
|
102
|
+
* By default, navigates to the parent URL when `rerouteId` is not provided, or to the saved object's URL otherwise.
|
|
103
|
+
*
|
|
104
|
+
* @param rerouteId - The ID of the saved object, used to build the target URL. When not provided, navigates to the parent URL.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* // Override to navigate to a custom route after save
|
|
109
|
+
* rerouteToSavedObject = (rerouteId: number | string): void => {
|
|
110
|
+
* this.router.navigateByUrl(`/products/${rerouteId}/details`);
|
|
111
|
+
* };
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
28
114
|
rerouteToSavedObject: (rerouteId: number | string) => void;
|
|
29
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Hook that runs **before** form validation and the save request.
|
|
117
|
+
* Use this to modify the save body or perform any pre-save logic (e.g., transforming data, setting computed fields).
|
|
118
|
+
*
|
|
119
|
+
* @param saveBody - The current save body built from the form's raw value. Mutate it directly to change what gets sent to the server.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* onBeforeSave = (saveBody?: ProductSaveBody) => {
|
|
124
|
+
* saveBody.productDTO.fullName = saveBody.productDTO.firstName + ' ' + saveBody.productDTO.lastName;
|
|
125
|
+
* };
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
onBeforeSave: (saveBody?: TSaveBody) => void;
|
|
129
|
+
/**
|
|
130
|
+
* Hook that runs **after** a successful save response is received.
|
|
131
|
+
* Use this for post-save side effects (e.g., refreshing related data, showing additional notifications).
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* onAfterSave = () => {
|
|
136
|
+
* this.loadRelatedProducts();
|
|
137
|
+
* };
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
30
140
|
onAfterSave: () => void;
|
|
141
|
+
/**
|
|
142
|
+
* Hook that runs immediately **after** the save HTTP request is sent, but **before** the response arrives.
|
|
143
|
+
* Use this for side effects that should happen as soon as the request is dispatched (e.g., disabling UI elements, starting a loading indicator).
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* onAfterSaveRequest = () => {
|
|
148
|
+
* this.isSaving = true;
|
|
149
|
+
* };
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
31
152
|
onAfterSaveRequest: () => void;
|
|
32
153
|
getFormArrayControlByIndex<T>(formControlName: keyof T & string, formArray: SpiderlyFormArray<T>, index: number, filter?: (formGroups: SpiderlyFormGroup<T>[]) => SpiderlyFormGroup<T>[]): SpiderlyFormControl;
|
|
33
154
|
getFormArrayControls<T>(formControlName: keyof T & string, formArray: SpiderlyFormArray<T>, filter?: (formGroups: SpiderlyFormGroup<T>[]) => SpiderlyFormGroup<T>[]): SpiderlyFormControl[];
|
|
34
155
|
removeFormControlsFromTheFormArray(formArray: SpiderlyFormArray, indexes: number[]): void;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormCopy<any>, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseFormCopy<any>, "base-form", never, {}, {}, never, never, false, never>;
|
|
156
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormCopy<any, any>, never>;
|
|
157
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseFormCopy<any, any>, "base-form", never, {}, {}, never, never, false, never>;
|
|
37
158
|
}
|
|
@@ -9,9 +9,9 @@ export declare class TopBarComponent {
|
|
|
9
9
|
companyName: string;
|
|
10
10
|
logoPath: string;
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
* Determines whether to show background color on hover
|
|
13
|
+
* for root menu items. Defaults to `false`.
|
|
14
|
+
*/
|
|
15
15
|
showHoverBgOnRootItems: boolean;
|
|
16
16
|
private permissionSubscription;
|
|
17
17
|
constructor(authService: AuthServiceBase, config: ConfigServiceBase);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpiderlyButtonBaseComponent } from
|
|
1
|
+
import { SpiderlyButtonBaseComponent } from '../spiderly-button-base/spiderly-button-base';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SpiderlyButtonComponent extends SpiderlyButtonBaseComponent {
|
|
4
4
|
type: 'button' | 'submit' | 'reset';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
2
|
-
import { Router } from
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpiderlyButtonBaseComponent {
|
|
5
5
|
private router;
|
package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MenuItem } from
|
|
2
|
-
import { SpiderlyButtonBaseComponent } from
|
|
1
|
+
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import { SpiderlyButtonBaseComponent } from '../spiderly-button-base/spiderly-button-base';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpiderlySplitButtonComponent extends SpiderlyButtonBaseComponent {
|
|
5
5
|
dropdownItems: MenuItem[];
|
|
@@ -66,10 +66,10 @@ export declare class SpiderlyDataTableComponent implements OnInit {
|
|
|
66
66
|
onRowSelect: EventEmitter<RowClickEvent>;
|
|
67
67
|
onRowUnselect: EventEmitter<RowClickEvent>;
|
|
68
68
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
* if true, clicking a row will navigate to the details page.
|
|
70
|
+
* Set to false to disable row navigation.
|
|
71
|
+
* Default is false.
|
|
72
|
+
*/
|
|
73
73
|
navigateOnRowClick: boolean;
|
|
74
74
|
/**
|
|
75
75
|
* Path to navigate to when clicking a row.
|
|
@@ -158,7 +158,7 @@ export declare class RowClickEvent {
|
|
|
158
158
|
index?: number;
|
|
159
159
|
id?: number;
|
|
160
160
|
additionalIndexes?: any;
|
|
161
|
-
constructor({ index, id, additionalIndexes }?: {
|
|
161
|
+
constructor({ index, id, additionalIndexes, }?: {
|
|
162
162
|
index?: number;
|
|
163
163
|
id?: number;
|
|
164
164
|
additionalIndexes?: any;
|
|
@@ -167,7 +167,7 @@ export declare class RowClickEvent {
|
|
|
167
167
|
export declare class AllClickEvent {
|
|
168
168
|
checked?: boolean;
|
|
169
169
|
additionalIndexes?: any;
|
|
170
|
-
constructor({ checked, additionalIndexes }?: {
|
|
170
|
+
constructor({ checked, additionalIndexes, }?: {
|
|
171
171
|
checked?: boolean;
|
|
172
172
|
additionalIndexes?: any;
|
|
173
173
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicDialogConfig, DynamicDialogRef } from
|
|
1
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SpiderlyDeleteConfirmationComponent {
|
|
4
4
|
ref: DynamicDialogRef;
|
|
@@ -2,14 +2,21 @@ import { FormArray, FormControl, FormControlOptions, FormGroup, ValidatorFn } fr
|
|
|
2
2
|
import { TranslocoService } from '@jsverse/transloco';
|
|
3
3
|
import { MenuItem } from 'primeng/api';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import {
|
|
5
|
+
import { SchemaAwareConstructor } from '../../entities/base-entity';
|
|
6
6
|
import { Namebook } from '../../entities/namebook';
|
|
7
7
|
import { BaseFormService } from '../../services/base-form.service';
|
|
8
|
+
import { BaseEntity } from './../../entities/base-entity';
|
|
8
9
|
export interface SpiderlyValidatorFn extends ValidatorFn {
|
|
9
10
|
hasNotEmptyRule?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare class SpiderlyFormControl<T = any> extends FormControl<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Control name stored in label because it was easier than really accessing the FormControl's name
|
|
15
|
+
*/
|
|
12
16
|
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* Translated label
|
|
19
|
+
*/
|
|
13
20
|
labelForDisplay: string;
|
|
14
21
|
required: boolean;
|
|
15
22
|
parentClassName: string;
|
|
@@ -31,7 +38,6 @@ export declare class SpiderlyFormGroup<TValue = any> extends FormGroup {
|
|
|
31
38
|
trackingId: string;
|
|
32
39
|
name?: string;
|
|
33
40
|
saveObservableMethod?: (saveBody: any) => Observable<any>;
|
|
34
|
-
initSaveBody?: () => BaseEntity;
|
|
35
41
|
controlNamesFromHtml?: string[];
|
|
36
42
|
getControl: <TKey extends Extract<keyof TValue, string>>(formControlName: TKey) => SpiderlyControlsOfType<TValue>[TKey];
|
|
37
43
|
}
|
|
@@ -2,10 +2,14 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
2
2
|
import { TranslocoService } from '@jsverse/transloco';
|
|
3
3
|
import { FileSelectEvent } from 'primeng/fileupload';
|
|
4
4
|
import { BaseEntity } from '../../entities/base-entity';
|
|
5
|
+
import { SpiderlyMessageService } from '../../services/spiderly-message.service';
|
|
6
|
+
import { ValidatorAbstractService } from '../../services/validator-abstract.service';
|
|
5
7
|
import { BaseControl } from '../base-control';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
export declare class SpiderlyFileComponent extends BaseControl implements OnInit {
|
|
8
10
|
protected translocoService: TranslocoService;
|
|
11
|
+
private messageService;
|
|
12
|
+
private validatorService;
|
|
9
13
|
onFileSelected: EventEmitter<SpiderlyFileSelectEvent>;
|
|
10
14
|
onFileRemoved: EventEmitter<null>;
|
|
11
15
|
objectId: number;
|
|
@@ -14,26 +18,34 @@ export declare class SpiderlyFileComponent extends BaseControl implements OnInit
|
|
|
14
18
|
required: boolean;
|
|
15
19
|
multiple: boolean;
|
|
16
20
|
isCloudinaryFileData: boolean;
|
|
21
|
+
imageWidth: number;
|
|
22
|
+
imageHeight: number;
|
|
17
23
|
acceptedFileTypesCommaSeparated: string;
|
|
18
24
|
files: File[];
|
|
19
|
-
constructor(translocoService: TranslocoService);
|
|
25
|
+
constructor(translocoService: TranslocoService, messageService: SpiderlyMessageService, validatorService: ValidatorAbstractService);
|
|
20
26
|
ngOnInit(): void;
|
|
21
27
|
filesSelected(event: FileSelectEvent): void;
|
|
28
|
+
private emitFileSelected;
|
|
29
|
+
private hasImageDimensionConstraints;
|
|
22
30
|
choose(event: any, chooseCallback: any): void;
|
|
23
31
|
fileRemoved(removeFileCallback: any, index: number): void;
|
|
24
32
|
pushFileFromCloudinaryUrl(cloudinaryUrl: string): Promise<File>;
|
|
25
33
|
getFileFromBase64(base64String: string): File;
|
|
26
|
-
|
|
34
|
+
isFileImageType(mimeType: string): boolean;
|
|
27
35
|
isExcelFileType(mimeType: string): boolean;
|
|
28
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyFileComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyFileComponent, "spiderly-file", never, { "objectId": { "alias": "objectId"; "required": false; }; "fileData": { "alias": "fileData"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "isCloudinaryFileData": { "alias": "isCloudinaryFileData"; "required": false; }; "files": { "alias": "files"; "required": false; }; }, { "onFileSelected": "onFileSelected"; "onFileRemoved": "onFileRemoved"; }, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyFileComponent, "spiderly-file", never, { "objectId": { "alias": "objectId"; "required": false; }; "fileData": { "alias": "fileData"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "isCloudinaryFileData": { "alias": "isCloudinaryFileData"; "required": false; }; "imageWidth": { "alias": "imageWidth"; "required": false; }; "imageHeight": { "alias": "imageHeight"; "required": false; }; "files": { "alias": "files"; "required": false; }; }, { "onFileSelected": "onFileSelected"; "onFileRemoved": "onFileRemoved"; }, never, never, true, never>;
|
|
30
38
|
}
|
|
31
39
|
export declare class SpiderlyFileSelectEvent extends BaseEntity {
|
|
32
40
|
file?: File;
|
|
33
41
|
formData?: FormData;
|
|
34
|
-
|
|
42
|
+
width?: number;
|
|
43
|
+
height?: number;
|
|
44
|
+
constructor({ file, formData, width, height, }?: {
|
|
35
45
|
file?: File;
|
|
36
46
|
formData?: FormData;
|
|
47
|
+
width?: number;
|
|
48
|
+
height?: number;
|
|
37
49
|
});
|
|
38
50
|
static readonly typeName: "SpiderlyFileSelectEvent";
|
|
39
51
|
}
|
package/lib/entities/filter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseEntity } from
|
|
2
|
-
import { FilterRule } from
|
|
3
|
-
import { FilterSortMeta } from
|
|
1
|
+
import { BaseEntity } from './base-entity';
|
|
2
|
+
import { FilterRule } from './filter-rule';
|
|
3
|
+
import { FilterSortMeta } from './filter-sort-meta';
|
|
4
4
|
export declare class Filter<T extends BaseEntity = any> extends BaseEntity {
|
|
5
5
|
filters?: {
|
|
6
6
|
[K in keyof T]?: FilterRule[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntity } from
|
|
2
|
-
import { UserBase } from
|
|
1
|
+
import { BaseEntity } from './base-entity';
|
|
2
|
+
import { UserBase } from './security-entities';
|
|
3
3
|
export declare class InitTopBarData extends BaseEntity {
|
|
4
4
|
companyName?: string;
|
|
5
5
|
userProfilePath?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEntity } from
|
|
1
|
+
import { BaseEntity } from './base-entity';
|
|
2
2
|
export declare class UserBase extends BaseEntity {
|
|
3
3
|
static readonly typeName: "UserBase";
|
|
4
4
|
id?: number;
|
|
@@ -22,7 +22,7 @@ export declare class AuthResult extends BaseEntity {
|
|
|
22
22
|
email?: string;
|
|
23
23
|
accessToken?: string;
|
|
24
24
|
refreshToken?: string;
|
|
25
|
-
constructor({ userId, email, accessToken, refreshToken }?: {
|
|
25
|
+
constructor({ userId, email, accessToken, refreshToken, }?: {
|
|
26
26
|
userId?: number;
|
|
27
27
|
email?: string;
|
|
28
28
|
accessToken?: string;
|
|
@@ -48,7 +48,7 @@ export declare class VerificationTokenRequest extends BaseEntity {
|
|
|
48
48
|
verificationCode?: string;
|
|
49
49
|
browserId?: string;
|
|
50
50
|
email?: string;
|
|
51
|
-
constructor({ verificationCode, browserId, email }?: {
|
|
51
|
+
constructor({ verificationCode, browserId, email, }?: {
|
|
52
52
|
verificationCode?: string;
|
|
53
53
|
browserId?: string;
|
|
54
54
|
email?: string;
|
|
@@ -69,7 +69,7 @@ export declare class ExternalProvider extends BaseEntity {
|
|
|
69
69
|
static readonly typeName: "ExternalProvider";
|
|
70
70
|
idToken?: string;
|
|
71
71
|
browserId?: string;
|
|
72
|
-
constructor({ idToken, browserId }?: {
|
|
72
|
+
constructor({ idToken, browserId, }?: {
|
|
73
73
|
idToken?: string;
|
|
74
74
|
browserId?: string;
|
|
75
75
|
});
|
|
@@ -86,7 +86,7 @@ export declare class UserRole extends BaseEntity {
|
|
|
86
86
|
static readonly typeName: "UserRole";
|
|
87
87
|
roleId?: number;
|
|
88
88
|
userId?: number;
|
|
89
|
-
constructor({ roleId, userId }?: {
|
|
89
|
+
constructor({ roleId, userId, }?: {
|
|
90
90
|
roleId?: number;
|
|
91
91
|
userId?: number;
|
|
92
92
|
});
|
|
@@ -104,12 +104,12 @@ export declare class LoginVerificationToken extends BaseEntity {
|
|
|
104
104
|
email?: string;
|
|
105
105
|
userId?: number;
|
|
106
106
|
browserId?: string;
|
|
107
|
-
|
|
108
|
-
constructor({ email, userId, browserId,
|
|
107
|
+
expiresAt?: Date;
|
|
108
|
+
constructor({ email, userId, browserId, expiresAt, }?: {
|
|
109
109
|
email?: string;
|
|
110
110
|
userId?: number;
|
|
111
111
|
browserId?: string;
|
|
112
|
-
|
|
112
|
+
expiresAt?: Date;
|
|
113
113
|
});
|
|
114
114
|
static readonly schema: {
|
|
115
115
|
readonly email: {
|
|
@@ -121,7 +121,7 @@ export declare class LoginVerificationToken extends BaseEntity {
|
|
|
121
121
|
readonly browserId: {
|
|
122
122
|
readonly type: "string";
|
|
123
123
|
};
|
|
124
|
-
readonly
|
|
124
|
+
readonly expiresAt: {
|
|
125
125
|
readonly type: "Date";
|
|
126
126
|
};
|
|
127
127
|
};
|
|
@@ -130,7 +130,7 @@ export declare class Login extends BaseEntity {
|
|
|
130
130
|
static readonly typeName: "Login";
|
|
131
131
|
email?: string;
|
|
132
132
|
browserId?: string;
|
|
133
|
-
constructor({ email, browserId }?: {
|
|
133
|
+
constructor({ email, browserId, }?: {
|
|
134
134
|
email?: string;
|
|
135
135
|
browserId?: string;
|
|
136
136
|
});
|
|
@@ -147,7 +147,7 @@ export declare class RefreshTokenRequest extends BaseEntity {
|
|
|
147
147
|
static readonly typeName: "RefreshTokenRequest";
|
|
148
148
|
refreshToken?: string;
|
|
149
149
|
browserId?: string;
|
|
150
|
-
constructor({ refreshToken, browserId }?: {
|
|
150
|
+
constructor({ refreshToken, browserId, }?: {
|
|
151
151
|
refreshToken?: string;
|
|
152
152
|
browserId?: string;
|
|
153
153
|
});
|
|
@@ -163,7 +163,7 @@ export declare class RefreshTokenRequest extends BaseEntity {
|
|
|
163
163
|
export declare class SendLoginVerificationEmailResult extends BaseEntity {
|
|
164
164
|
static readonly typeName: "SendLoginVerificationEmailResult";
|
|
165
165
|
message?: string;
|
|
166
|
-
constructor({ message }?: {
|
|
166
|
+
constructor({ message, }?: {
|
|
167
167
|
message?: string;
|
|
168
168
|
});
|
|
169
169
|
static readonly schema: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HttpInterceptorFn } from
|
|
1
|
+
import { HttpInterceptorFn } from '@angular/common/http';
|
|
2
2
|
export declare const httpLoadingInterceptor: HttpInterceptorFn;
|
|
@@ -2,15 +2,13 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
2
2
|
import { SpiderlyFormArray, SpiderlyFormControl, SpiderlyFormGroup } from '../components/spiderly-form-control/spiderly-form-control';
|
|
3
3
|
import { BaseEntity, SchemaAwareConstructor } from '../entities/base-entity';
|
|
4
4
|
import { SpiderlyMessageService } from './spiderly-message.service';
|
|
5
|
-
import { TranslateLabelsAbstractService } from './translate-labels-abstract.service';
|
|
6
5
|
import { ValidatorAbstractService } from './validator-abstract.service';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class BaseFormService {
|
|
9
|
-
private translateLabelsService;
|
|
10
8
|
private validatorService;
|
|
11
9
|
private messageService;
|
|
12
10
|
private translocoService;
|
|
13
|
-
constructor(
|
|
11
|
+
constructor(validatorService: ValidatorAbstractService, messageService: SpiderlyMessageService, translocoService: TranslocoService);
|
|
14
12
|
initFormGroup: <T extends BaseEntity>(formGroup: SpiderlyFormGroup<T>, targetClass: SchemaAwareConstructor<T>, initialValues?: T, updateOnChangeControls?: (keyof T)[]) => SpiderlyFormGroup<T>;
|
|
15
13
|
getTranslatedLabel(formControlName: string): string;
|
|
16
14
|
addNewFormGroupToFormArray<T extends BaseEntity>(formArray: SpiderlyFormArray<T>, targetClass: SchemaAwareConstructor<T>, initialValues: T, index: number): SpiderlyFormGroup;
|
|
@@ -19,7 +17,7 @@ export declare class BaseFormService {
|
|
|
19
17
|
showInvalidFieldsMessage: () => void;
|
|
20
18
|
generateNewNegativeId<T extends BaseEntity>(formArray: SpiderlyFormArray<T>): number;
|
|
21
19
|
getSaveBodyMainDTOKey: (saveBodyClass: SchemaAwareConstructor<any>) => string;
|
|
22
|
-
mapMainUIFormToSaveBody: <
|
|
20
|
+
mapMainUIFormToSaveBody: <TMainUIForm extends BaseEntity, TSaveBody extends BaseEntity>(mainUIFormClass: SchemaAwareConstructor<TMainUIForm>, mainUIFormValues: TMainUIForm) => TSaveBody;
|
|
23
21
|
isControlValid(control: SpiderlyFormControl | SpiderlyFormGroup | SpiderlyFormArray, controlNamesFromHtml?: string[]): boolean;
|
|
24
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormService, never>;
|
|
25
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<BaseFormService>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { HttpResponse } from
|
|
1
|
+
import { HttpResponse } from '@angular/common/http';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { Action, Column } from
|
|
5
|
-
import { SpiderlyTab } from
|
|
6
|
-
import { Codebook } from
|
|
7
|
-
import { Filter } from
|
|
8
|
-
import { Namebook } from
|
|
9
|
-
import { PrimengOption } from
|
|
4
|
+
import { Action, Column } from '../components/spiderly-data-table/spiderly-data-table.component';
|
|
5
|
+
import { SpiderlyTab } from '../components/spiderly-panels/panel-header/panel-header.component';
|
|
6
|
+
import { Codebook } from '../entities/codebook';
|
|
7
|
+
import { Filter } from '../entities/filter';
|
|
8
|
+
import { Namebook } from '../entities/namebook';
|
|
9
|
+
import { PrimengOption } from '../entities/primeng-option';
|
|
10
10
|
export declare function validatePrecisionScale(value: any, precision: number, scale: number, ignoreTrailingZeros: boolean): boolean;
|
|
11
11
|
export declare function getMimeTypeForFileName(fileName: string): string;
|
|
12
12
|
export declare function adjustColor(color: string, percent: number): string;
|
|
@@ -23,7 +23,7 @@ export declare function pushAction(cols: Column[], action: Action): void;
|
|
|
23
23
|
export declare function deleteAction(cols: Column[], actionField: string): void;
|
|
24
24
|
export declare function getFileNameFromContentDisposition(resp: HttpResponse<Blob>, defaultName: string): string;
|
|
25
25
|
export declare function toCommaSeparatedString<T>(input: T[]): string;
|
|
26
|
-
export declare function
|
|
26
|
+
export declare function isFileImageType(mimeType: string): boolean;
|
|
27
27
|
export declare function isExcelFileType(mimeType: string): boolean;
|
|
28
28
|
export declare function exportListToExcel(exportListToExcelObservableMethod: (filter: Filter) => Observable<any>, filter: Filter): void;
|
|
29
29
|
export declare function getPrimengDropdownNamebookOptions(getDropdownListObservable: (parentEntityId?: number) => Observable<Namebook[]>, parentEntityId?: number): Observable<PrimengOption[]>;
|
|
@@ -38,10 +38,14 @@ export declare function capitalizeFirstChar(str: string): string;
|
|
|
38
38
|
export declare function kebabToTitleCase(input: string): string;
|
|
39
39
|
/**
|
|
40
40
|
* Custom styling of the google button - https://medium.com/simform-engineering/implement-custom-google-sign-in-using-angular-16-9c93aeff6252
|
|
41
|
-
*/
|
|
41
|
+
*/
|
|
42
42
|
export declare function createFakeGoogleWrapper(): {
|
|
43
43
|
click: () => void;
|
|
44
44
|
};
|
|
45
45
|
export declare const PROPS_KEY: unique symbol;
|
|
46
46
|
export declare function ReflectProp(target: any, propertyKey: string): void;
|
|
47
47
|
export declare const primitiveArrayTypes: string[];
|
|
48
|
+
export declare function getImageDimensions(file: File): Promise<{
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
}>;
|