spiderly 19.8.1 → 19.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/spiderly.mjs +832 -657
- package/fesm2022/spiderly.mjs.map +1 -1
- package/lib/components/auth/auth-card/auth-card.component.d.ts +14 -0
- package/lib/components/auth/external-login/external-login.component.d.ts +20 -0
- package/lib/components/auth/external-provider-icons.d.ts +7 -0
- package/lib/components/auth/login/login.component.d.ts +7 -8
- package/lib/components/index-card/index-card.component.d.ts +2 -0
- package/lib/components/info-card/info-card.component.d.ts +1 -0
- package/lib/components/layout/profile-avatar/profile-avatar.component.d.ts +1 -0
- package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +3 -1
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +6 -1
- package/lib/components/spiderly-data-view/spiderly-data-view.component.d.ts +2 -0
- package/lib/components/spiderly-panels/panel-header/panel-header.component.d.ts +2 -0
- package/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.d.ts +3 -0
- package/lib/controls/base-control.d.ts +3 -0
- package/lib/controls/base-dropdown-control.d.ts +1 -0
- package/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.d.ts +1 -0
- package/lib/controls/spiderly-calendar/spiderly-calendar.component.d.ts +1 -0
- package/lib/controls/spiderly-colorpicker/spiderly-colorpicker.component.d.ts +1 -0
- package/lib/controls/spiderly-controls.module.d.ts +4 -3
- package/lib/controls/spiderly-markdown/spiderly-markdown.component.d.ts +37 -0
- package/lib/controls/spiderly-number/spiderly-number.component.d.ts +1 -0
- package/lib/controls/spiderly-password/spiderly-password.component.d.ts +1 -0
- package/lib/controls/spiderly-textbox/spiderly-textbox.component.d.ts +1 -0
- package/lib/entities/security-entities.d.ts +33 -1
- package/lib/errors/api-error-codes.d.ts +2 -0
- package/lib/interceptors/unauthorized.interceptor.d.ts +6 -0
- package/lib/services/api.service.security.d.ts +2 -3
- package/lib/services/app-layout.service.base.d.ts +0 -8
- package/lib/services/auth.service.base.d.ts +15 -18
- package/lib/services/config.service.base.d.ts +0 -2
- package/lib/services/helper-functions.d.ts +1 -6
- package/package.json +3 -2
- package/public-api.d.ts +4 -1
- package/lib/components/auth/partials/auth.component.d.ts +0 -19
- package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { AuthServiceBase } from '../../../services/auth.service.base';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AuthCardComponent implements OnInit, OnDestroy {
|
|
5
|
+
private authService;
|
|
6
|
+
private companyDetailsSubscription;
|
|
7
|
+
companyName: string;
|
|
8
|
+
image: string;
|
|
9
|
+
constructor(authService: AuthServiceBase);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthCardComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthCardComponent, "spiderly-auth-card", never, {}, {}, never, ["[auth-logo]", "*", "[auth-footer]"], true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ApiSecurityService } from '../../../services/api.service.security';
|
|
3
|
+
import { AuthServiceBase } from '../../../services/auth.service.base';
|
|
4
|
+
import { ConfigServiceBase } from '../../../services/config.service.base';
|
|
5
|
+
import { ExternalProviderPublic } from '../../../entities/security-entities';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ExternalLoginComponent implements OnInit {
|
|
8
|
+
private config;
|
|
9
|
+
private authService;
|
|
10
|
+
private apiService;
|
|
11
|
+
/** Per-code icon overrides; unset codes fall back to DEFAULT_EXTERNAL_PROVIDER_ICONS. */
|
|
12
|
+
providerIcons: Record<string, string>;
|
|
13
|
+
externalProviders: ExternalProviderPublic[];
|
|
14
|
+
constructor(config: ConfigServiceBase, authService: AuthServiceBase, apiService: ApiSecurityService);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
iconFor(code: string): string | undefined;
|
|
17
|
+
loginWithExternalProvider(code: string): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExternalLoginComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExternalLoginComponent, "spiderly-external-login", never, { "providerIcons": { "alias": "providerIcons"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in default icons for external auth providers, keyed by provider code.
|
|
3
|
+
* Values are inline data URIs — no network request, CSP entry, or asset wiring,
|
|
4
|
+
* and they render offline. Consumers override per code via the `providerIcons`
|
|
5
|
+
* input on ExternalLoginComponent / SpiderlyLoginComponent.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_EXTERNAL_PROVIDER_ICONS: Record<string, string>;
|
|
@@ -5,12 +5,11 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
5
5
|
import { Login } from '../../../entities/security-entities';
|
|
6
6
|
import { AuthServiceBase } from '../../../services/auth.service.base';
|
|
7
7
|
import { BaseFormService } from '../../../services/base-form.service';
|
|
8
|
-
import { ConfigServiceBase } from '../../../services/config.service.base';
|
|
9
8
|
import { SpiderlyMessageService } from '../../../services/spiderly-message.service';
|
|
10
9
|
import { BaseFormComponent } from '../../base-form/base-form.component';
|
|
11
10
|
import { SpiderlyFormGroup } from '../../spiderly-form-control/spiderly-form-control';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
|
-
export declare class
|
|
12
|
+
export declare class SpiderlyLoginComponent extends BaseFormComponent implements OnInit {
|
|
14
13
|
protected differs: KeyValueDiffers;
|
|
15
14
|
protected http: HttpClient;
|
|
16
15
|
protected messageService: SpiderlyMessageService;
|
|
@@ -20,15 +19,15 @@ export declare class LoginComponent extends BaseFormComponent implements OnInit
|
|
|
20
19
|
protected translocoService: TranslocoService;
|
|
21
20
|
protected baseFormService: BaseFormService;
|
|
22
21
|
private authService;
|
|
23
|
-
private config;
|
|
24
22
|
loginFormGroup: SpiderlyFormGroup<Login>;
|
|
25
|
-
companyName: string;
|
|
26
23
|
showEmailSentDialog: boolean;
|
|
27
|
-
|
|
24
|
+
/** Per-code provider icon overrides, forwarded to <spiderly-external-login>. */
|
|
25
|
+
providerIcons: Record<string, string>;
|
|
26
|
+
constructor(differs: KeyValueDiffers, http: HttpClient, messageService: SpiderlyMessageService, changeDetectorRef: ChangeDetectorRef, router: Router, route: ActivatedRoute, translocoService: TranslocoService, baseFormService: BaseFormService, authService: AuthServiceBase);
|
|
28
27
|
ngOnInit(): void;
|
|
28
|
+
private showExternalAuthErrorIfPresent;
|
|
29
29
|
initLoginFormGroup(model: Login): void;
|
|
30
|
-
companyNameChange(companyName: string): void;
|
|
31
30
|
sendLoginVerificationEmail(): void;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyLoginComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyLoginComponent, "spiderly-login", never, { "providerIcons": { "alias": "providerIcons"; "required": false; }; }, {}, never, never, true, never>;
|
|
34
33
|
}
|
|
@@ -8,7 +8,9 @@ export declare class IndexCardComponent {
|
|
|
8
8
|
index: number;
|
|
9
9
|
header: string;
|
|
10
10
|
description: string;
|
|
11
|
+
/** Whether a remove/delete icon is shown. */
|
|
11
12
|
showRemoveIcon: boolean;
|
|
13
|
+
/** Whether the CRUD context-menu icon is shown. Defaults to `true`. */
|
|
12
14
|
showCrudMenu: boolean;
|
|
13
15
|
crudMenu: MenuItem[];
|
|
14
16
|
onMenuIconClick: EventEmitter<number>;
|
|
@@ -14,6 +14,7 @@ export declare class ProfileAvatarComponent {
|
|
|
14
14
|
config: ConfigServiceBase;
|
|
15
15
|
isSideMenuLayout: boolean;
|
|
16
16
|
routeOnLargeProfileAvatarClick: boolean;
|
|
17
|
+
/** Whether the login button is shown when no user is signed in. Defaults to `true`. */
|
|
17
18
|
showLoginButton: boolean;
|
|
18
19
|
routeToLoginPage: boolean;
|
|
19
20
|
loginButtonOutlined: boolean;
|
|
@@ -4,6 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class SpiderlyButtonBaseComponent {
|
|
5
5
|
private router;
|
|
6
6
|
icon: string;
|
|
7
|
+
/** Optional image icon (URL) rendered before the label — for brand logos (e.g. Google) that aren't PrimeNG font icons. */
|
|
8
|
+
iconUrl: string;
|
|
7
9
|
label: string;
|
|
8
10
|
outlined: boolean;
|
|
9
11
|
rounded: boolean;
|
|
@@ -24,5 +26,5 @@ export declare class SpiderlyButtonBaseComponent {
|
|
|
24
26
|
handleClick: (event: Event) => void;
|
|
25
27
|
ngOnDestroy(): void;
|
|
26
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyButtonBaseComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyButtonBaseComponent, "spiderly-button-base", never, { "icon": { "alias": "icon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "outlined": { "alias": "outlined"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; "style": { "alias": "style"; "required": false; }; "class": { "alias": "class"; "required": false; }; "severity": { "alias": "severity"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyButtonBaseComponent, "spiderly-button-base", never, { "icon": { "alias": "icon"; "required": false; }; "iconUrl": { "alias": "iconUrl"; "required": false; }; "label": { "alias": "label"; "required": false; }; "outlined": { "alias": "outlined"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; "style": { "alias": "style"; "required": false; }; "class": { "alias": "class"; "required": false; }; "severity": { "alias": "severity"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
28
30
|
}
|
|
@@ -28,7 +28,9 @@ export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit
|
|
|
28
28
|
items: any[];
|
|
29
29
|
rows: number;
|
|
30
30
|
cols: Column[];
|
|
31
|
+
/** Whether the paginator is shown. Pass only when `hasLazyLoad === false`. Defaults to `true`. */
|
|
31
32
|
showPaginator: boolean;
|
|
33
|
+
/** Whether the table is wrapped in a card container. Defaults to `false`. */
|
|
32
34
|
showCardWrapper: boolean;
|
|
33
35
|
readonly: boolean;
|
|
34
36
|
idField: string;
|
|
@@ -55,8 +57,11 @@ export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit
|
|
|
55
57
|
additionalFilterIdLong: number;
|
|
56
58
|
matchModeDateOptions: SelectItem[];
|
|
57
59
|
matchModeNumberOptions: SelectItem[];
|
|
60
|
+
/** Whether the "Add" button is shown. Defaults to `true`. */
|
|
58
61
|
showAddButton: boolean;
|
|
62
|
+
/** Whether the "Export to Excel" button is shown. Defaults to `true`. */
|
|
59
63
|
showExportToExcelButton: boolean;
|
|
64
|
+
/** Whether the reload-table button is shown. Defaults to `false`. */
|
|
60
65
|
showReloadTableButton: boolean;
|
|
61
66
|
deleteRef: DynamicDialogRef;
|
|
62
67
|
getFormArrayItems: (additionalIndexes?: any) => any[];
|
|
@@ -144,7 +149,7 @@ export declare class Action {
|
|
|
144
149
|
icon?: string;
|
|
145
150
|
style?: string;
|
|
146
151
|
styleClass?: string;
|
|
147
|
-
onClick?: () => void;
|
|
152
|
+
onClick?: (id: number) => void;
|
|
148
153
|
});
|
|
149
154
|
}
|
|
150
155
|
export declare class Column<T = any> {
|
|
@@ -22,12 +22,14 @@ export declare class SpiderlyDataViewComponent<T> implements OnInit {
|
|
|
22
22
|
filters: DataViewFilter<T>[];
|
|
23
23
|
totalRecords: number;
|
|
24
24
|
onLazyLoad: EventEmitter<Filter>;
|
|
25
|
+
/** Whether the data view is wrapped in a card container. Defaults to `true`. */
|
|
25
26
|
showCardWrapper: boolean;
|
|
26
27
|
/**
|
|
27
28
|
* Whether to display additional data on the right side of the paginator.
|
|
28
29
|
* Defaults to `false`.
|
|
29
30
|
*/
|
|
30
31
|
showPaginatorRightData: boolean;
|
|
32
|
+
/** Whether the total records count is shown. Defaults to `false`. */
|
|
31
33
|
showTotalRecordsNumber: boolean;
|
|
32
34
|
applyFiltersIcon: string;
|
|
33
35
|
clearFiltersIcon: string;
|
|
@@ -4,7 +4,9 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class PanelHeaderComponent implements OnInit {
|
|
5
5
|
private translocoService;
|
|
6
6
|
title: string;
|
|
7
|
+
/** Whether the title is rendered in the large style. */
|
|
7
8
|
showBigTitle: boolean;
|
|
9
|
+
/** Whether the header icon is shown. Defaults to `true`. */
|
|
8
10
|
showIcon: boolean;
|
|
9
11
|
icon: string;
|
|
10
12
|
index: number;
|
|
@@ -10,9 +10,12 @@ export declare class SpiderlyPanelComponent implements OnInit {
|
|
|
10
10
|
toggler: 'header' | 'icon' | null;
|
|
11
11
|
collapsed: boolean;
|
|
12
12
|
crudMenu: MenuItem[];
|
|
13
|
+
/** Whether the CRUD context-menu icon is shown. Defaults to `true`. */
|
|
13
14
|
showCrudMenu: boolean;
|
|
15
|
+
/** Whether a remove/delete icon is shown. Defaults to `false`. */
|
|
14
16
|
showRemoveIcon: boolean;
|
|
15
17
|
index: number;
|
|
18
|
+
/** Whether the panel header is rendered. Defaults to `true`. */
|
|
16
19
|
showPanelHeader: boolean;
|
|
17
20
|
onMenuIconClick: EventEmitter<number>;
|
|
18
21
|
onRemoveIconClick: EventEmitter<null>;
|
|
@@ -5,11 +5,14 @@ export declare class BaseControl {
|
|
|
5
5
|
protected translocoService: TranslocoService;
|
|
6
6
|
control: SpiderlyFormControl<any>;
|
|
7
7
|
disabled: boolean;
|
|
8
|
+
/** Whether the field's label is rendered. Defaults to `true`. */
|
|
8
9
|
showLabel: boolean;
|
|
10
|
+
/** Whether the required (*) indicator is shown next to the label. Defaults to `true`. */
|
|
9
11
|
showRequired: boolean;
|
|
10
12
|
label: string;
|
|
11
13
|
controlValid: boolean;
|
|
12
14
|
placeholder: string;
|
|
15
|
+
/** Whether the info tooltip icon is shown next to the label. Defaults to `false`. */
|
|
13
16
|
showTooltip: boolean;
|
|
14
17
|
tooltipText: string;
|
|
15
18
|
tooltipIcon: string;
|
|
@@ -6,6 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class BaseDropdownControl extends BaseControl {
|
|
7
7
|
protected translocoService: TranslocoService;
|
|
8
8
|
options: Namebook[];
|
|
9
|
+
/** Whether an addon button is shown next to the dropdown. Defaults to `false`. */
|
|
9
10
|
showAddon: boolean;
|
|
10
11
|
addonIcon: string;
|
|
11
12
|
placeholder: string;
|
|
@@ -10,6 +10,7 @@ export declare class SpiderlyAutocompleteComponent extends BaseAutocompleteContr
|
|
|
10
10
|
protected translocoService: TranslocoService;
|
|
11
11
|
private validatorService;
|
|
12
12
|
appendTo: any;
|
|
13
|
+
/** Whether a clear button is shown. Defaults to `true`. */
|
|
13
14
|
showClear: boolean;
|
|
14
15
|
emptyMessage: string;
|
|
15
16
|
displayName: string;
|
|
@@ -5,6 +5,7 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class SpiderlyCalendarComponent extends BaseControl implements OnInit, OnDestroy {
|
|
7
7
|
protected translocoService: TranslocoService;
|
|
8
|
+
/** Whether the time picker is shown in addition to the date. Defaults to `false`. */
|
|
8
9
|
showTime: boolean;
|
|
9
10
|
dateOnly: boolean;
|
|
10
11
|
timeOnly: boolean;
|
|
@@ -4,6 +4,7 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SpiderlyColorPickerComponent extends BaseControl implements OnInit {
|
|
6
6
|
protected translocoService: TranslocoService;
|
|
7
|
+
/** Whether a hex text input is shown alongside the color swatch. Defaults to `true`. */
|
|
7
8
|
showInputTextField: boolean;
|
|
8
9
|
constructor(translocoService: TranslocoService);
|
|
9
10
|
ngOnInit(): void;
|
|
@@ -12,10 +12,11 @@ import * as i10 from "./spiderly-multiselect/spiderly-multiselect.component";
|
|
|
12
12
|
import * as i11 from "./spiderly-number/spiderly-number.component";
|
|
13
13
|
import * as i12 from "./spiderly-dropdown/spiderly-dropdown.component";
|
|
14
14
|
import * as i13 from "./spiderly-editor/spiderly-editor.component";
|
|
15
|
-
import * as i14 from "./spiderly-
|
|
16
|
-
import * as i15 from "./spiderly-
|
|
15
|
+
import * as i14 from "./spiderly-markdown/spiderly-markdown.component";
|
|
16
|
+
import * as i15 from "./spiderly-colorpicker/spiderly-colorpicker.component";
|
|
17
|
+
import * as i16 from "./spiderly-file/spiderly-file.component";
|
|
17
18
|
export declare class SpiderlyControlsModule {
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyControlsModule, never>;
|
|
19
|
-
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.SpiderlyPasswordComponent, typeof i8.SpiderlyAutocompleteComponent, typeof i9.SpiderlyMultiAutocompleteComponent, typeof i10.SpiderlyMultiSelectComponent, typeof i11.SpiderlyNumberComponent, typeof i12.SpiderlyDropdownComponent, typeof i13.SpiderlyEditorComponent, typeof i14.
|
|
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.SpiderlyPasswordComponent, typeof i8.SpiderlyAutocompleteComponent, typeof i9.SpiderlyMultiAutocompleteComponent, typeof i10.SpiderlyMultiSelectComponent, typeof i11.SpiderlyNumberComponent, typeof i12.SpiderlyDropdownComponent, typeof i13.SpiderlyEditorComponent, typeof i14.SpiderlyMarkdownComponent, 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.SpiderlyPasswordComponent, typeof i8.SpiderlyAutocompleteComponent, typeof i9.SpiderlyMultiAutocompleteComponent, typeof i10.SpiderlyMultiSelectComponent, typeof i11.SpiderlyNumberComponent, typeof i12.SpiderlyDropdownComponent, typeof i13.SpiderlyEditorComponent, typeof i14.SpiderlyMarkdownComponent, typeof i15.SpiderlyColorPickerComponent, typeof i16.SpiderlyFileComponent]>;
|
|
20
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<SpiderlyControlsModule>;
|
|
21
22
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import { BaseControl } from '../base-control';
|
|
3
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { EditorImageUploadResult } from '../../entities/editor-image-upload-result';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Markdown form control: a plain textarea (Write) with a rendered live preview (Preview),
|
|
9
|
+
* arranged as tabs. The stored value is raw Markdown text.
|
|
10
|
+
*
|
|
11
|
+
* The preview is rendered with ngx-markdown (marked) and is intentionally APPROXIMATE — a
|
|
12
|
+
* consuming storefront may render the same Markdown with a different engine/flavor.
|
|
13
|
+
*
|
|
14
|
+
* The <textarea> DOM is the source of truth for the text (the form control mirrors it, like
|
|
15
|
+
* spiderly-editor mirrors Quill). We never splice control.value, because SpiderlyFormControl
|
|
16
|
+
* defaults to updateOn:'blur' and would be stale relative to the focused textarea.
|
|
17
|
+
*
|
|
18
|
+
* When {@link uploadImageMethod} is provided (wired by the generator for properties with an
|
|
19
|
+
* S3 public-storage attribute), pasting an image uploads it and, on success, inserts a
|
|
20
|
+
* standard `` link at the caret via execCommand (which preserves the native undo
|
|
21
|
+
* stack). Upload progress is shown out-of-band, not as a token in the text.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SpiderlyMarkdownComponent extends BaseControl implements OnInit {
|
|
24
|
+
protected translocoService: TranslocoService;
|
|
25
|
+
textareaRef: ElementRef<HTMLTextAreaElement>;
|
|
26
|
+
uploadImageMethod: (formData: FormData) => Observable<EditorImageUploadResult>;
|
|
27
|
+
objectId: number;
|
|
28
|
+
pendingImageUploads: number;
|
|
29
|
+
imageUploadFailed: boolean;
|
|
30
|
+
constructor(translocoService: TranslocoService);
|
|
31
|
+
ngOnInit(): void;
|
|
32
|
+
onPaste(event: ClipboardEvent): void;
|
|
33
|
+
private getPastedImage;
|
|
34
|
+
private insertImageMarkdown;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyMarkdownComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyMarkdownComponent, "spiderly-markdown", never, { "uploadImageMethod": { "alias": "uploadImageMethod"; "required": false; }; "objectId": { "alias": "objectId"; "required": false; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class SpiderlyNumberComponent extends BaseControl implements OnInit {
|
|
6
6
|
protected translocoService: TranslocoService;
|
|
7
7
|
prefix: string;
|
|
8
|
+
/** Whether increment/decrement spinner buttons are shown. Defaults to `true`. */
|
|
8
9
|
showButtons: boolean;
|
|
9
10
|
decimal: boolean;
|
|
10
11
|
maxFractionDigits: number;
|
|
@@ -4,6 +4,7 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SpiderlyPasswordComponent extends BaseControl implements OnInit {
|
|
6
6
|
protected translocoService: TranslocoService;
|
|
7
|
+
/** Whether a password-strength meter is shown below the field. Defaults to `false`. */
|
|
7
8
|
showPasswordStrength: boolean;
|
|
8
9
|
constructor(translocoService: TranslocoService);
|
|
9
10
|
ngOnInit(): void;
|
|
@@ -4,6 +4,7 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SpiderlyTextboxComponent extends BaseControl implements OnInit {
|
|
6
6
|
protected translocoService: TranslocoService;
|
|
7
|
+
/** Whether an icon button is appended to the input. Defaults to `false`. */
|
|
7
8
|
showButton: boolean;
|
|
8
9
|
buttonIcon: string;
|
|
9
10
|
onButtonClick: EventEmitter<any>;
|
|
@@ -67,13 +67,18 @@ export declare class VerificationTokenRequest extends BaseEntity {
|
|
|
67
67
|
}
|
|
68
68
|
export declare class ExternalProvider extends BaseEntity {
|
|
69
69
|
static readonly typeName: "ExternalProvider";
|
|
70
|
+
provider?: string;
|
|
70
71
|
idToken?: string;
|
|
71
72
|
browserId?: string;
|
|
72
|
-
constructor({ idToken, browserId, }?: {
|
|
73
|
+
constructor({ provider, idToken, browserId, }?: {
|
|
74
|
+
provider?: string;
|
|
73
75
|
idToken?: string;
|
|
74
76
|
browserId?: string;
|
|
75
77
|
});
|
|
76
78
|
static readonly schema: {
|
|
79
|
+
readonly provider: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
};
|
|
77
82
|
readonly idToken: {
|
|
78
83
|
readonly type: "string";
|
|
79
84
|
};
|
|
@@ -82,6 +87,33 @@ export declare class ExternalProvider extends BaseEntity {
|
|
|
82
87
|
};
|
|
83
88
|
};
|
|
84
89
|
}
|
|
90
|
+
export declare class ExternalProviderPublic extends BaseEntity {
|
|
91
|
+
static readonly typeName: "ExternalProviderPublic";
|
|
92
|
+
code?: string;
|
|
93
|
+
authority?: string;
|
|
94
|
+
clientId?: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
constructor({ code, authority, clientId, label, }?: {
|
|
97
|
+
code?: string;
|
|
98
|
+
authority?: string;
|
|
99
|
+
clientId?: string;
|
|
100
|
+
label?: string;
|
|
101
|
+
});
|
|
102
|
+
static readonly schema: {
|
|
103
|
+
readonly code: {
|
|
104
|
+
readonly type: "string";
|
|
105
|
+
};
|
|
106
|
+
readonly authority: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
};
|
|
109
|
+
readonly clientId: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
};
|
|
112
|
+
readonly label: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}
|
|
85
117
|
export declare class UserRole extends BaseEntity {
|
|
86
118
|
static readonly typeName: "UserRole";
|
|
87
119
|
roleId?: number;
|
|
@@ -8,5 +8,7 @@ export declare const ApiErrorCodes: {
|
|
|
8
8
|
readonly UniqueViolation: "unique_violation";
|
|
9
9
|
readonly ForeignKeyViolation: "foreign_key_violation";
|
|
10
10
|
readonly ConcurrencyConflict: "concurrency_conflict";
|
|
11
|
+
readonly EmailNotVerified: "email_not_verified";
|
|
12
|
+
readonly ExternalProviderNotConfigured: "external_provider_not_configured";
|
|
11
13
|
};
|
|
12
14
|
export type ApiErrorCode = (typeof ApiErrorCodes)[keyof typeof ApiErrorCodes];
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { HttpInterceptorFn } from '@angular/common/http';
|
|
2
|
+
/**
|
|
3
|
+
* Owns cross-cutting HTTP-error UX: shows the right message and, on an expired session, clears auth — then
|
|
4
|
+
* RETHROWS. Errors stay errors: callers run only their success path, and an unhandled HttpErrorResponse that
|
|
5
|
+
* reaches the global ErrorHandler is intentionally ignored there (HTTP-error UX lives here). This interceptor
|
|
6
|
+
* must never convert an error into a value — doing so makes callers treat failures as data.
|
|
7
|
+
*/
|
|
2
8
|
export declare const unauthorizedInterceptor: HttpInterceptorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { AuthResult, AuthResultWithCookies,
|
|
3
|
+
import { AuthResult, AuthResultWithCookies, ExternalProviderPublic, Login, RefreshTokenRequest, SendLoginVerificationEmailResult, UserBase, VerificationTokenRequest } from '../entities/security-entities';
|
|
4
4
|
import { ConfigServiceBase } from './config.service.base';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class ApiSecurityService {
|
|
@@ -8,10 +8,9 @@ export declare class ApiSecurityService {
|
|
|
8
8
|
protected config: ConfigServiceBase;
|
|
9
9
|
constructor(http: HttpClient, config: ConfigServiceBase);
|
|
10
10
|
login: (request: VerificationTokenRequest) => Observable<AuthResult>;
|
|
11
|
-
loginExternal: (externalProviderDTO: ExternalProvider) => Observable<AuthResult>;
|
|
12
11
|
sendLoginVerificationEmail: (loginDTO: Login) => Observable<SendLoginVerificationEmailResult>;
|
|
13
12
|
loginWithCookies: (request: VerificationTokenRequest) => Observable<AuthResultWithCookies>;
|
|
14
|
-
|
|
13
|
+
getExternalProviders: () => Observable<ExternalProviderPublic[]>;
|
|
15
14
|
logout: (browserId: string) => Observable<any>;
|
|
16
15
|
logoutWithCookies: (browserId: string) => Observable<any>;
|
|
17
16
|
refreshTokenWithHeaders: (request: RefreshTokenRequest) => Observable<AuthResult>;
|
|
@@ -10,18 +10,14 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export interface AppConfig {
|
|
11
11
|
inputStyle: string;
|
|
12
12
|
colorScheme: string;
|
|
13
|
-
theme: string;
|
|
14
13
|
ripple: boolean;
|
|
15
14
|
menuMode: string;
|
|
16
|
-
scale: number;
|
|
17
|
-
color: string;
|
|
18
15
|
}
|
|
19
16
|
interface LayoutState {
|
|
20
17
|
staticMenuDesktopInactive: boolean;
|
|
21
18
|
overlayMenuActive: boolean;
|
|
22
19
|
profileSidebarVisible: boolean;
|
|
23
20
|
profileDropdownSidebarVisible: boolean;
|
|
24
|
-
configSidebarVisible: boolean;
|
|
25
21
|
staticMenuMobileActive: boolean;
|
|
26
22
|
menuHoverActive: boolean;
|
|
27
23
|
}
|
|
@@ -32,19 +28,15 @@ export declare class LayoutServiceBase implements OnDestroy {
|
|
|
32
28
|
userSubscription: Subscription;
|
|
33
29
|
layoutConfig: AppConfig;
|
|
34
30
|
state: LayoutState;
|
|
35
|
-
private configUpdate;
|
|
36
31
|
private overlayOpen;
|
|
37
|
-
configUpdate$: Observable<AppConfig>;
|
|
38
32
|
overlayOpen$: Observable<any>;
|
|
39
33
|
constructor(apiService: ApiSecurityService, config: ConfigServiceBase, authService: AuthServiceBase);
|
|
40
34
|
onMenuToggle(): void;
|
|
41
35
|
showProfileSidebar(): void;
|
|
42
36
|
showProfileDropdownSidebar(): void;
|
|
43
|
-
showConfigSidebar(): void;
|
|
44
37
|
isOverlay(): boolean;
|
|
45
38
|
isDesktop(): boolean;
|
|
46
39
|
isMobile(): boolean;
|
|
47
|
-
onConfigUpdate(): void;
|
|
48
40
|
initTopBarData: () => Observable<InitTopBarData>;
|
|
49
41
|
searchPartners: (event: AutoCompleteCompleteEvent) => Observable<Namebook[]>;
|
|
50
42
|
partnersAutocompleteButtonClick: (selectedPartner: Namebook) => void;
|
|
@@ -2,46 +2,43 @@ import { OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
|
-
import {
|
|
6
|
-
import { ExternalProvider, Login, VerificationTokenRequest, AuthResult, UserBase } from '../entities/security-entities';
|
|
5
|
+
import { AuthResultWithCookies, Login, VerificationTokenRequest, UserBase } from '../entities/security-entities';
|
|
7
6
|
import { ConfigServiceBase } from './config.service.base';
|
|
8
7
|
import { ApiSecurityService } from './api.service.security';
|
|
9
8
|
import { InitCompanyAuthDialogDetails } from '../entities/init-company-auth-dialog-details';
|
|
10
9
|
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* Cookie-based session auth. The access/refresh JWTs live in HttpOnly cookies set by the backend
|
|
12
|
+
* (so JS never holds them — XSS can't exfiltrate them); requests are authenticated via
|
|
13
|
+
* `withCredentials` (see jwtInterceptor). The readable result only carries userId/email/expiry.
|
|
14
|
+
*/
|
|
11
15
|
export declare class AuthServiceBase implements OnDestroy {
|
|
12
16
|
protected router: Router;
|
|
13
17
|
protected http: HttpClient;
|
|
14
|
-
protected externalAuthService: SocialAuthService;
|
|
15
18
|
protected apiService: ApiSecurityService;
|
|
16
19
|
protected config: ConfigServiceBase;
|
|
17
20
|
protected platformId: Object;
|
|
18
21
|
private readonly apiUrl;
|
|
19
22
|
private timer?;
|
|
23
|
+
private accessTokenExpiresAt?;
|
|
24
|
+
externalAuthErrorCode: string | null;
|
|
20
25
|
protected _currentUserPermissionCodes: BehaviorSubject<string[]>;
|
|
21
26
|
currentUserPermissionCodes$: Observable<string[]>;
|
|
22
27
|
protected _user: BehaviorSubject<UserBase>;
|
|
23
28
|
user$: Observable<UserBase>;
|
|
24
|
-
|
|
25
|
-
private extAuthChangeSub;
|
|
26
|
-
authChanged: Observable<boolean>;
|
|
27
|
-
extAuthChanged: Observable<SocialUser>;
|
|
28
|
-
constructor(router: Router, http: HttpClient, externalAuthService: SocialAuthService, apiService: ApiSecurityService, config: ConfigServiceBase, platformId: Object);
|
|
29
|
+
constructor(router: Router, http: HttpClient, apiService: ApiSecurityService, config: ConfigServiceBase, platformId: Object);
|
|
29
30
|
private storageEventListener;
|
|
30
31
|
sendLoginVerificationEmail(body: Login): Observable<any>;
|
|
31
|
-
login(body: VerificationTokenRequest): Observable<
|
|
32
|
-
|
|
33
|
-
onAfterLoginExternal: () => void;
|
|
34
|
-
handleLoginResult(loginResultObservable: Observable<AuthResult>): Observable<Promise<AuthResult>>;
|
|
32
|
+
login(body: VerificationTokenRequest): Observable<AuthResultWithCookies>;
|
|
33
|
+
handleAuthResult(result: AuthResultWithCookies): void;
|
|
35
34
|
logout(): void;
|
|
36
35
|
onAfterLogout: () => void;
|
|
37
|
-
|
|
36
|
+
clearSession(): void;
|
|
37
|
+
refreshToken(): Observable<AuthResultWithCookies | null>;
|
|
38
38
|
onAfterRefreshToken: () => void;
|
|
39
|
-
|
|
40
|
-
clearLocalStorage(): void;
|
|
39
|
+
captureExternalAuthError(): void;
|
|
41
40
|
getBrowserId(): string;
|
|
42
|
-
|
|
43
|
-
getTokenRemainingTime(): number;
|
|
44
|
-
getAccessToken(): string;
|
|
41
|
+
private getTokenRemainingTime;
|
|
45
42
|
private startTokenTimer;
|
|
46
43
|
private stopTokenTimer;
|
|
47
44
|
navigateToDashboard(): void;
|
|
@@ -27,6 +27,7 @@ export declare function toCommaSeparatedString<T>(input: T[]): string;
|
|
|
27
27
|
export declare function isFileImageType(mimeType: string): boolean;
|
|
28
28
|
export declare function isExcelFileType(mimeType: string): boolean;
|
|
29
29
|
export declare function exportListToExcel(exportListToExcelObservableMethod: (filter: Filter) => Observable<any>, filter: Filter): void;
|
|
30
|
+
export declare function getPrimengNamebookOptions(namebookList: Namebook[]): PrimengOption[];
|
|
30
31
|
export declare function getPrimengDropdownNamebookOptions(getDropdownListObservable: (parentEntityId?: number) => Observable<Namebook[]>, parentEntityId?: number): Observable<PrimengOption[]>;
|
|
31
32
|
export declare function getPrimengDropdownCodebookOptions(getDropdownListObservable: () => Observable<Codebook[]>): Observable<PrimengOption[]>;
|
|
32
33
|
export declare function getPrimengAutocompleteNamebookOptions(getAutocompleteListObservable: (limit: number, query: string, parentEntityId?: number) => Observable<Namebook[]>, limit: number, query: string, parentEntityId?: number): Observable<PrimengOption[]>;
|
|
@@ -37,12 +38,6 @@ export declare function firstCharToUpper(input: string): string;
|
|
|
37
38
|
export declare function splitPascalCase(input: string): string;
|
|
38
39
|
export declare function capitalizeFirstChar(str: string): string;
|
|
39
40
|
export declare function kebabToTitleCase(input: string): string;
|
|
40
|
-
/**
|
|
41
|
-
* Custom styling of the google button - https://medium.com/simform-engineering/implement-custom-google-sign-in-using-angular-16-9c93aeff6252
|
|
42
|
-
*/
|
|
43
|
-
export declare function createFakeGoogleWrapper(): {
|
|
44
|
-
click: () => void;
|
|
45
|
-
};
|
|
46
41
|
export declare const PROPS_KEY: unique symbol;
|
|
47
42
|
export declare function ReflectProp(target: any, propertyKey: string): void;
|
|
48
43
|
export declare const primitiveArrayTypes: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spiderly",
|
|
3
|
-
"version": "19.8.
|
|
3
|
+
"version": "19.8.3",
|
|
4
4
|
"author": "Filip Trivan",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Spiderly Angular Library to use in combination with Spiderly.",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
],
|
|
28
28
|
"private": false,
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@abacritt/angularx-social-login": "^2.2.0",
|
|
31
30
|
"@angular/animations": "^19.2.0",
|
|
32
31
|
"@angular/common": "^19.2.0",
|
|
33
32
|
"@angular/compiler": "^19.2.0",
|
|
@@ -38,6 +37,8 @@
|
|
|
38
37
|
"@angular/router": "^19.2.0",
|
|
39
38
|
"@jsverse/transloco": "7.5.0",
|
|
40
39
|
"file-saver": "2.0.5",
|
|
40
|
+
"marked": "^15.0.0",
|
|
41
|
+
"ngx-markdown": "^19.1.1",
|
|
41
42
|
"ngx-spinner": "19.0.0",
|
|
42
43
|
"primeicons": "7.0.0",
|
|
43
44
|
"primeng": "19.1.3",
|
package/public-api.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './lib/controls/spiderly-colorpicker/spiderly-colorpicker.componen
|
|
|
9
9
|
export * from './lib/controls/spiderly-controls.module';
|
|
10
10
|
export * from './lib/controls/spiderly-dropdown/spiderly-dropdown.component';
|
|
11
11
|
export * from './lib/controls/spiderly-editor/spiderly-editor.component';
|
|
12
|
+
export * from './lib/controls/spiderly-markdown/spiderly-markdown.component';
|
|
12
13
|
export * from './lib/controls/spiderly-file/spiderly-file.component';
|
|
13
14
|
export * from './lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component';
|
|
14
15
|
export * from './lib/controls/spiderly-multiselect/spiderly-multiselect.component';
|
|
@@ -16,6 +17,9 @@ export * from './lib/controls/spiderly-number/spiderly-number.component';
|
|
|
16
17
|
export * from './lib/controls/spiderly-password/spiderly-password.component';
|
|
17
18
|
export * from './lib/controls/spiderly-textarea/spiderly-textarea.component';
|
|
18
19
|
export * from './lib/controls/spiderly-textbox/spiderly-textbox.component';
|
|
20
|
+
export * from './lib/components/auth/auth-card/auth-card.component';
|
|
21
|
+
export * from './lib/components/auth/external-provider-icons';
|
|
22
|
+
export * from './lib/components/auth/external-login/external-login.component';
|
|
19
23
|
export * from './lib/components/auth/login/login.component';
|
|
20
24
|
export * from './lib/components/auth/partials/login-verification.component';
|
|
21
25
|
export * from './lib/components/auth/partials/verification-wrapper.component';
|
|
@@ -33,7 +37,6 @@ export * from './lib/components/layout/sidemenu-topbar/sidemenu-topbar.component
|
|
|
33
37
|
export * from './lib/components/layout/topbar/topbar.component';
|
|
34
38
|
export * from './lib/components/not-found/not-found.component';
|
|
35
39
|
export * from './lib/components/required/required.component';
|
|
36
|
-
export * from './lib/components/spiderly-buttons/google-button/google-button.component';
|
|
37
40
|
export * from './lib/components/spiderly-buttons/return-button/return-button.component';
|
|
38
41
|
export * from './lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base';
|
|
39
42
|
export * from './lib/components/spiderly-buttons/spiderly-button/spiderly-button.component';
|