@ecodev/natural 63.9.1 → 64.0.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/ecodev-natural-vanilla.mjs +3 -3
- package/fesm2022/ecodev-natural-vanilla.mjs.map +1 -1
- package/fesm2022/ecodev-natural.mjs +520 -650
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/index.d.ts +4264 -3
- package/package.json +9 -9
- package/src/lib/modules/sidenav/_sidenav.theme.scss +1 -1
- package/vanilla/index.d.ts +418 -3
- package/lib/classes/abstract-detail.d.ts +0 -108
- package/lib/classes/abstract-editable-list.d.ts +0 -70
- package/lib/classes/abstract-list.d.ts +0 -191
- package/lib/classes/abstract-navigable-list.d.ts +0 -54
- package/lib/classes/apollo-utils.d.ts +0 -18
- package/lib/classes/crypto.d.ts +0 -8
- package/lib/classes/cumulative-changes.d.ts +0 -27
- package/lib/classes/data-source.d.ts +0 -32
- package/lib/classes/network-activity.service.d.ts +0 -54
- package/lib/classes/providers.d.ts +0 -5
- package/lib/classes/query-variable-manager-utils.d.ts +0 -2
- package/lib/classes/query-variable-manager.d.ts +0 -91
- package/lib/classes/rxjs.d.ts +0 -42
- package/lib/classes/signing.d.ts +0 -7
- package/lib/classes/tld.d.ts +0 -10
- package/lib/classes/utility.d.ts +0 -85
- package/lib/classes/validators.d.ts +0 -72
- package/lib/directives/http-prefix.directive.d.ts +0 -15
- package/lib/modules/alert/alert.service.d.ts +0 -21
- package/lib/modules/alert/confirm.component.d.ts +0 -12
- package/lib/modules/alert/public-api.d.ts +0 -2
- package/lib/modules/avatar/component/avatar.component.d.ts +0 -37
- package/lib/modules/avatar/public-api.d.ts +0 -2
- package/lib/modules/avatar/service/avatar.service.d.ts +0 -24
- package/lib/modules/avatar/sources/gravatar.d.ts +0 -8
- package/lib/modules/avatar/sources/image.d.ts +0 -8
- package/lib/modules/avatar/sources/initials.d.ts +0 -8
- package/lib/modules/avatar/sources/source.d.ts +0 -23
- package/lib/modules/columns-picker/columns-picker.component.d.ts +0 -45
- package/lib/modules/columns-picker/public-api.d.ts +0 -2
- package/lib/modules/columns-picker/types.d.ts +0 -84
- package/lib/modules/common/directives/background-density.directive.d.ts +0 -37
- package/lib/modules/common/directives/linkable-tab.directive.d.ts +0 -29
- package/lib/modules/common/directives/src-density.directive.d.ts +0 -33
- package/lib/modules/common/pipes/capitalize.pipe.d.ts +0 -10
- package/lib/modules/common/pipes/ellipsis.pipe.d.ts +0 -7
- package/lib/modules/common/pipes/enum.pipe.d.ts +0 -14
- package/lib/modules/common/pipes/time-ago.pipe.d.ts +0 -18
- package/lib/modules/common/public-api.d.ts +0 -11
- package/lib/modules/common/services/memory-storage.d.ts +0 -46
- package/lib/modules/common/services/seo.provider.d.ts +0 -6
- package/lib/modules/common/services/seo.service.d.ts +0 -148
- package/lib/modules/detail-header/detail-header.component.d.ts +0 -43
- package/lib/modules/detail-header/public-api.d.ts +0 -1
- package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +0 -37
- package/lib/modules/dialog-trigger/public-api.d.ts +0 -1
- package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +0 -34
- package/lib/modules/dropdown-components/public-api.d.ts +0 -10
- package/lib/modules/dropdown-components/type-boolean/type-boolean.component.d.ts +0 -12
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +0 -36
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +0 -43
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +0 -31
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +0 -18
- package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +0 -36
- package/lib/modules/dropdown-components/type-options/type-options.component.d.ts +0 -29
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +0 -59
- package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +0 -26
- package/lib/modules/dropdown-components/types.d.ts +0 -13
- package/lib/modules/dropdown-components/utils.d.ts +0 -14
- package/lib/modules/file/abstract-file.d.ts +0 -95
- package/lib/modules/file/component/file.component.d.ts +0 -58
- package/lib/modules/file/file-drop.directive.d.ts +0 -32
- package/lib/modules/file/file-select.directive.d.ts +0 -15
- package/lib/modules/file/file.service.d.ts +0 -19
- package/lib/modules/file/public-api.d.ts +0 -6
- package/lib/modules/file/types.d.ts +0 -7
- package/lib/modules/file/utils.d.ts +0 -8
- package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -11
- package/lib/modules/fixed-button/public-api.d.ts +0 -1
- package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +0 -24
- package/lib/modules/fixed-button-detail/public-api.d.ts +0 -1
- package/lib/modules/hierarchic-selector/classes/flat-node.d.ts +0 -11
- package/lib/modules/hierarchic-selector/classes/hierarchic-configuration.d.ts +0 -56
- package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +0 -7
- package/lib/modules/hierarchic-selector/classes/model-node.d.ts +0 -13
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +0 -161
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.d.ts +0 -76
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +0 -59
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.d.ts +0 -9
- package/lib/modules/hierarchic-selector/public-api.d.ts +0 -6
- package/lib/modules/icon/icon.directive.d.ts +0 -39
- package/lib/modules/icon/icon.module.d.ts +0 -9
- package/lib/modules/icon/public-api.d.ts +0 -2
- package/lib/modules/logger/error-handler.d.ts +0 -52
- package/lib/modules/logger/error.module.d.ts +0 -3
- package/lib/modules/logger/public-api.d.ts +0 -3
- package/lib/modules/matomo/matomo.service.d.ts +0 -42
- package/lib/modules/matomo/public-api.d.ts +0 -1
- package/lib/modules/panels/abstract-panel.d.ts +0 -37
- package/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.d.ts +0 -6
- package/lib/modules/panels/panels.component.d.ts +0 -9
- package/lib/modules/panels/panels.module.d.ts +0 -3
- package/lib/modules/panels/panels.service.d.ts +0 -121
- package/lib/modules/panels/panels.urlmatcher.d.ts +0 -8
- package/lib/modules/panels/public-api.d.ts +0 -7
- package/lib/modules/panels/types.d.ts +0 -61
- package/lib/modules/relations/public-api.d.ts +0 -1
- package/lib/modules/relations/relations.component.d.ts +0 -123
- package/lib/modules/search/classes/graphql-doctrine.d.ts +0 -4
- package/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
- package/lib/modules/search/classes/transformers.d.ts +0 -78
- package/lib/modules/search/classes/url.d.ts +0 -18
- package/lib/modules/search/classes/utils.d.ts +0 -17
- package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +0 -31
- package/lib/modules/search/dropdown-container/dropdown-ref.d.ts +0 -13
- package/lib/modules/search/dropdown-container/dropdown.service.d.ts +0 -24
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +0 -32
- package/lib/modules/search/group/group.component.d.ts +0 -21
- package/lib/modules/search/input/input.component.d.ts +0 -110
- package/lib/modules/search/public-api.d.ts +0 -11
- package/lib/modules/search/search/search.component.d.ts +0 -44
- package/lib/modules/search/types/dropdown-component.d.ts +0 -20
- package/lib/modules/search/types/facet.d.ts +0 -75
- package/lib/modules/search/types/values.d.ts +0 -32
- package/lib/modules/select/abstract-select.component.d.ts +0 -127
- package/lib/modules/select/public-api.d.ts +0 -3
- package/lib/modules/select/select/select.component.d.ts +0 -135
- package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -32
- package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +0 -65
- package/lib/modules/sidenav/public-api.d.ts +0 -5
- package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -5
- package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +0 -45
- package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -5
- package/lib/modules/sidenav/sidenav-stack.service.d.ts +0 -28
- package/lib/modules/sidenav/sidenav.service.d.ts +0 -86
- package/lib/modules/stamp/public-api.d.ts +0 -1
- package/lib/modules/stamp/stamp.component.d.ts +0 -15
- package/lib/modules/table-button/public-api.d.ts +0 -1
- package/lib/modules/table-button/table-button.component.d.ts +0 -32
- package/lib/services/abstract-model.service.d.ts +0 -244
- package/lib/services/debounce.service.d.ts +0 -52
- package/lib/services/enum.service.d.ts +0 -19
- package/lib/services/link-mutation.service.d.ts +0 -51
- package/lib/services/persistence.service.d.ts +0 -50
- package/lib/services/swiss-parsing-date-adapter.service.d.ts +0 -16
- package/lib/types/types.d.ts +0 -100
- package/public-api.d.ts +0 -44
- package/vanilla/public-api.d.ts +0 -11
- package/vanilla/src/lib/classes/crypto.d.ts +0 -8
- package/vanilla/src/lib/classes/data-source.d.ts +0 -32
- package/vanilla/src/lib/classes/query-variable-manager-utils.d.ts +0 -2
- package/vanilla/src/lib/classes/query-variable-manager.d.ts +0 -91
- package/vanilla/src/lib/classes/signing.d.ts +0 -7
- package/vanilla/src/lib/classes/utility.d.ts +0 -85
- package/vanilla/src/lib/modules/search/classes/graphql-doctrine.types.d.ts +0 -83
- package/vanilla/src/lib/modules/search/classes/utils.d.ts +0 -17
- package/vanilla/src/lib/modules/search/types/dropdown-component.d.ts +0 -20
- package/vanilla/src/lib/modules/search/types/facet.d.ts +0 -75
- package/vanilla/src/lib/modules/search/types/values.d.ts +0 -32
- package/vanilla/src/lib/services/abstract-model.service.d.ts +0 -244
- package/vanilla/src/lib/services/debounce.service.d.ts +0 -52
- package/vanilla/src/lib/types/types.d.ts +0 -100
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { AbstractControl, AsyncValidatorFn, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { UntypedModelService } from '../types/types';
|
|
4
|
-
/**
|
|
5
|
-
* Returns an async validator function that checks that the form control value is unique
|
|
6
|
-
*/
|
|
7
|
-
export declare function unique(fieldName: string, excludedId: string | null | undefined, modelService: UntypedModelService): AsyncValidatorFn;
|
|
8
|
-
/**
|
|
9
|
-
* Returns an async validator function that checks that the form control value is available
|
|
10
|
-
*
|
|
11
|
-
* Similar to `unique` validator, but allows to use a custom query for when the client does
|
|
12
|
-
* not have permissions for `modelService.count()`.
|
|
13
|
-
*/
|
|
14
|
-
export declare function available(getAvailableQuery: (value: string, excludedId: string | null) => Observable<boolean>, excludedId?: string | null): AsyncValidatorFn;
|
|
15
|
-
/**
|
|
16
|
-
* Return all errors recursively for the given Form or control
|
|
17
|
-
*/
|
|
18
|
-
export declare function collectErrors(control: AbstractControl<unknown>): ValidationErrors | null;
|
|
19
|
-
/**
|
|
20
|
-
* Force validation of all form controls recursively.
|
|
21
|
-
*
|
|
22
|
-
* Recursively mark descending form tree as dirty and touched in order to show all invalid fields on demand.
|
|
23
|
-
* Typically used when creating a new object and user clicked on create button but several fields were not
|
|
24
|
-
* touched and are invalid.
|
|
25
|
-
*/
|
|
26
|
-
export declare function validateAllFormControls(control: AbstractControl<unknown>): void;
|
|
27
|
-
/**
|
|
28
|
-
* Emits exactly 0 or 1 time:
|
|
29
|
-
*
|
|
30
|
-
* - if the form is VALID, emits immediately
|
|
31
|
-
* - if the form is PENDING emits if it changes from PENDING to VALID
|
|
32
|
-
* - any other cases will **never** emit
|
|
33
|
-
*/
|
|
34
|
-
export declare function ifValid(control: AbstractControl): Observable<'VALID'>;
|
|
35
|
-
/**
|
|
36
|
-
* Validate an email address according to RFC, and also that it is publicly deliverable (not "root@localhost" or "root@127.0.0.1")
|
|
37
|
-
*
|
|
38
|
-
* This is meant to replace **all** usages of Angular too permissive `Validators.email`
|
|
39
|
-
*/
|
|
40
|
-
export declare function deliverableEmail(control: AbstractControl): ValidationErrors | null;
|
|
41
|
-
/**
|
|
42
|
-
* Naive URL validator for "normal" web links, that is a bit too permissive
|
|
43
|
-
*
|
|
44
|
-
* It enforces:
|
|
45
|
-
*
|
|
46
|
-
* - http/https protocol
|
|
47
|
-
* - one domain
|
|
48
|
-
* - one tld
|
|
49
|
-
*
|
|
50
|
-
* It allows:
|
|
51
|
-
*
|
|
52
|
-
* - any number of subdomains
|
|
53
|
-
* - any parameters
|
|
54
|
-
* - any fragments
|
|
55
|
-
* - any characters for any parts (does not conform to rfc1738)
|
|
56
|
-
*/
|
|
57
|
-
export declare const urlValidator: ValidatorFn;
|
|
58
|
-
/**
|
|
59
|
-
* Validates that the value is an integer (non-float)
|
|
60
|
-
*/
|
|
61
|
-
export declare function integer(control: AbstractControl): ValidationErrors | null;
|
|
62
|
-
/**
|
|
63
|
-
* Validate that the value is a decimal number with up to `scale` digits
|
|
64
|
-
*
|
|
65
|
-
* The error contains the expected scale, so that the error message can explain
|
|
66
|
-
* it to the end-user.
|
|
67
|
-
*/
|
|
68
|
-
export declare function decimal(scale: number): ValidatorFn;
|
|
69
|
-
/**
|
|
70
|
-
* Validate that the value is an amount of money, meaning a number with at most 2 decimals
|
|
71
|
-
*/
|
|
72
|
-
export declare function money(control: AbstractControl): ValidationErrors | null;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Need to add http:// prefix if we don't have prefix already AND we don't have part of it
|
|
5
|
-
*/
|
|
6
|
-
export declare function ensureHttpPrefix(value: string | null): string | null;
|
|
7
|
-
/**
|
|
8
|
-
* This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
|
|
9
|
-
*/
|
|
10
|
-
export declare class NaturalHttpPrefixDirective {
|
|
11
|
-
naturalHttpPrefix: AbstractControl | null;
|
|
12
|
-
httpize($event: string): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalHttpPrefixDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalHttpPrefixDirective, "[naturalHttpPrefix]", never, { "naturalHttpPrefix": { "alias": "naturalHttpPrefix"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NaturalAlertService {
|
|
5
|
-
private readonly dialog;
|
|
6
|
-
private readonly snackBar;
|
|
7
|
-
/**
|
|
8
|
-
* Show an informative message in a snack bar
|
|
9
|
-
*/
|
|
10
|
-
info(message: string, duration?: number | null): MatSnackBarRef<SimpleSnackBar>;
|
|
11
|
-
/**
|
|
12
|
-
* Show an error in a snack bar
|
|
13
|
-
*/
|
|
14
|
-
error(message: string, duration?: number | null, action?: string): MatSnackBarRef<SimpleSnackBar>;
|
|
15
|
-
/**
|
|
16
|
-
* Show a simple confirmation dialog and returns true if user confirmed it
|
|
17
|
-
*/
|
|
18
|
-
confirm(title: string, message: string, confirmText: string, cancelText?: string): Observable<boolean | undefined>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAlertService, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NaturalAlertService>;
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export type NaturalConfirmData = {
|
|
3
|
-
title: string;
|
|
4
|
-
message: string;
|
|
5
|
-
confirmText: string;
|
|
6
|
-
cancelText: string;
|
|
7
|
-
};
|
|
8
|
-
export declare class NaturalConfirmComponent {
|
|
9
|
-
readonly data: NaturalConfirmData;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalConfirmComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalConfirmComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
12
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Source } from '../sources/source';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Show an avatar from different sources
|
|
5
|
-
*/
|
|
6
|
-
export declare class NaturalAvatarComponent {
|
|
7
|
-
private readonly avatarService;
|
|
8
|
-
readonly image: import("@angular/core").InputSignal<string | null | undefined>;
|
|
9
|
-
readonly initials: import("@angular/core").InputSignal<string | null | undefined>;
|
|
10
|
-
readonly gravatar: import("@angular/core").InputSignal<string | null | undefined>;
|
|
11
|
-
readonly size: import("@angular/core").InputSignal<number>;
|
|
12
|
-
readonly decorated: import("@angular/core").InputSignal<boolean>;
|
|
13
|
-
readonly textSizeRatio: import("@angular/core").InputSignal<number>;
|
|
14
|
-
readonly bgColor: import("@angular/core").InputSignal<string | undefined>;
|
|
15
|
-
readonly fgColor: import("@angular/core").InputSignal<string>;
|
|
16
|
-
readonly borderRadius: import("@angular/core").InputSignal<string>;
|
|
17
|
-
readonly textMaximumLength: import("@angular/core").InputSignal<number>;
|
|
18
|
-
private readonly sources;
|
|
19
|
-
protected readonly currentSource: import("@angular/core").Signal<Source | undefined>;
|
|
20
|
-
protected readonly imageAvatar: import("@angular/core").Signal<Promise<string> | undefined>;
|
|
21
|
-
protected readonly textAvatar: import("@angular/core").Signal<Promise<string> | undefined>;
|
|
22
|
-
/**
|
|
23
|
-
* Try to use the next available avatar source that has not already failed in the past
|
|
24
|
-
*/
|
|
25
|
-
tryNextSource(): void;
|
|
26
|
-
private findNextNonFailingIndex;
|
|
27
|
-
/**
|
|
28
|
-
* Returns initials style
|
|
29
|
-
*/
|
|
30
|
-
protected readonly textualStyle: import("@angular/core").Signal<Partial<CSSStyleDeclaration>>;
|
|
31
|
-
/**
|
|
32
|
-
* Returns image style
|
|
33
|
-
*/
|
|
34
|
-
protected readonly imageStyle: import("@angular/core").Signal<Partial<CSSStyleDeclaration>>;
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAvatarComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalAvatarComponent, "natural-avatar", never, { "image": { "alias": "image"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "gravatar": { "alias": "gravatar"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "decorated": { "alias": "decorated"; "required": false; "isSignal": true; }; "textSizeRatio": { "alias": "textSizeRatio"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "fgColor": { "alias": "fgColor"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "textMaximumLength": { "alias": "textMaximumLength"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
37
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Source, SourceCreator } from '../sources/source';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
type SourceType = 'gravatar' | 'image' | 'initials';
|
|
4
|
-
/**
|
|
5
|
-
* Provides utilities methods related to Avatar component
|
|
6
|
-
*/
|
|
7
|
-
export declare class AvatarService {
|
|
8
|
-
/**
|
|
9
|
-
* Ordered pairs of possible sources. First in the list is the highest priority.
|
|
10
|
-
* And key must match one the input of AvatarComponent.
|
|
11
|
-
*/
|
|
12
|
-
private readonly sourceCreators;
|
|
13
|
-
private readonly avatarColors;
|
|
14
|
-
private readonly failedSources;
|
|
15
|
-
getRandomColor(avatarText: string): string;
|
|
16
|
-
getCreators(): IterableIterator<[SourceType, SourceCreator]>;
|
|
17
|
-
private getSourceKey;
|
|
18
|
-
sourceHasFailedBefore(source: Source): boolean;
|
|
19
|
-
markSourceAsFailed(source: Source): void;
|
|
20
|
-
private calculateAsciiCode;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarService, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AvatarService>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A creator interface used to instantiate source implementation
|
|
3
|
-
*/
|
|
4
|
-
export type SourceCreator = new (sourceValue: string) => Source;
|
|
5
|
-
/**
|
|
6
|
-
* Contract of all Sources.
|
|
7
|
-
* Every source must implements the fetch method
|
|
8
|
-
* in order to provide the avatar source.
|
|
9
|
-
*/
|
|
10
|
-
export declare abstract class Source {
|
|
11
|
-
private readonly value;
|
|
12
|
-
constructor(value: string);
|
|
13
|
-
getValue(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the avatar that usually is a URL, but,
|
|
16
|
-
* for example it can also be a string of initials from the name.
|
|
17
|
-
*/
|
|
18
|
-
abstract getAvatar(size: number): Promise<string>;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the avatar is purely textual or an URL for an image
|
|
21
|
-
*/
|
|
22
|
-
abstract isTextual(): boolean;
|
|
23
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { AvailableColumn, Button } from './types';
|
|
3
|
-
import { ThemePalette } from '@angular/material/core';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NaturalColumnsPickerComponent implements OnChanges {
|
|
6
|
-
private readonly destroyRef;
|
|
7
|
-
private readonly breakpointObserver;
|
|
8
|
-
private _selections?;
|
|
9
|
-
private _availableColumns;
|
|
10
|
-
buttons: readonly Readonly<Button>[] | null;
|
|
11
|
-
/**
|
|
12
|
-
* Set all the columns that are available.
|
|
13
|
-
*/
|
|
14
|
-
set availableColumns(columns: readonly Readonly<AvailableColumn>[] | undefined);
|
|
15
|
-
/**
|
|
16
|
-
* Set the columns that we would like to select but might be unavailable.
|
|
17
|
-
*
|
|
18
|
-
* If a column is unavailable it will be ignored silently. To know what columns were actually applied
|
|
19
|
-
* you should use `selectionChange`.
|
|
20
|
-
*
|
|
21
|
-
* It is often set once on component initialization, but it can also be set again later in the lifespan of the component.
|
|
22
|
-
*/
|
|
23
|
-
set selections(columns: string[] | undefined);
|
|
24
|
-
/**
|
|
25
|
-
* Emit a list of valid and selected column keys whenever the selection changes
|
|
26
|
-
*/
|
|
27
|
-
readonly selectionChange: import("@angular/core").OutputEmitterRef<string[]>;
|
|
28
|
-
/**
|
|
29
|
-
* Displayed options in the dropdown menu
|
|
30
|
-
*/
|
|
31
|
-
displayedColumns: Required<AvailableColumn>[];
|
|
32
|
-
readonly isMobile: import("rxjs").Observable<boolean>;
|
|
33
|
-
private initColumns;
|
|
34
|
-
updateColumns(): void;
|
|
35
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
36
|
-
defaultTrue(value: boolean | undefined): boolean;
|
|
37
|
-
color(button: Button): ThemePalette | null;
|
|
38
|
-
useCheckbox(button: Button): boolean;
|
|
39
|
-
needMargin(button?: Button | null): string;
|
|
40
|
-
someVisibleButtons(): boolean;
|
|
41
|
-
protected menuItemClicked($event: MouseEvent, column: Required<AvailableColumn>): void;
|
|
42
|
-
protected checkboxClicked($event: MouseEvent, column: Required<AvailableColumn>): void;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalColumnsPickerComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NaturalColumnsPickerComponent, "natural-columns-picker", never, { "buttons": { "alias": "buttons"; "required": false; }; "availableColumns": { "alias": "availableColumns"; "required": false; }; "selections": { "alias": "selections"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
45
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
export type AvailableColumn = {
|
|
2
|
-
/**
|
|
3
|
-
* This must be the column ID as defined in `matColumnDef`
|
|
4
|
-
*
|
|
5
|
-
* Implementation details:
|
|
6
|
-
*
|
|
7
|
-
* Unfortunately, we cannot use a `Record<AvailableColumn>` where keys would implicitly be unique and would replace
|
|
8
|
-
* this ID property, because only ES2020 guarantee the order of object keys, and we must still support ES2015 for
|
|
9
|
-
* iPhone 6. So, instead of `Record<AvailableColumn>`, we use `AvailableColumn[]` for now. But this could be
|
|
10
|
-
* revisited once we drop support of ES2015.
|
|
11
|
-
*
|
|
12
|
-
* @see https://stackoverflow.com/questions/30076219/does-es6-introduce-a-well-defined-order-of-enumeration-for-object-properties
|
|
13
|
-
*/
|
|
14
|
-
id: string;
|
|
15
|
-
/**
|
|
16
|
-
* Localized label of column for human
|
|
17
|
-
*/
|
|
18
|
-
label: string;
|
|
19
|
-
/**
|
|
20
|
-
* Initial checked state, defaults to `true`.
|
|
21
|
-
*/
|
|
22
|
-
checked?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Initial visibility state, defaults to `false`.
|
|
25
|
-
*
|
|
26
|
-
* A column that is hidden will not appear in the list of choice,
|
|
27
|
-
* but it will be included in the result of selected columns.
|
|
28
|
-
*/
|
|
29
|
-
hidden?: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* A button that will be shown as an icon on desktop, or as a menu entry on mobile
|
|
33
|
-
*/
|
|
34
|
-
export type Button = {
|
|
35
|
-
/**
|
|
36
|
-
* On desktop will be shown as tooltip, or as menu entry on mobile
|
|
37
|
-
*/
|
|
38
|
-
label: string;
|
|
39
|
-
/**
|
|
40
|
-
* The icon name to be used on desktop
|
|
41
|
-
*/
|
|
42
|
-
icon: string;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to show the button at all. Defaults to `true`.
|
|
45
|
-
*/
|
|
46
|
-
show?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether the button is disabled. Defaults to `false`.
|
|
49
|
-
*/
|
|
50
|
-
disabled?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* A checked button will have a highlight color as an icon, or a check mark as menu entry. Defaults to `false`.
|
|
53
|
-
*/
|
|
54
|
-
checked?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* The callback to call when button was clicked.
|
|
57
|
-
*/
|
|
58
|
-
click?: (button: Button, event: Event) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Rarely used, only for OKpilot where we want to show proper URL, but click is actually intercepted to show dialog
|
|
61
|
-
*/
|
|
62
|
-
href?: string;
|
|
63
|
-
/**
|
|
64
|
-
* A non-empty list of sub-buttons (only 2 levels is supported).
|
|
65
|
-
*/
|
|
66
|
-
buttons?: SubButton[];
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* A sub-button that will (always) be shown as a sub-menu entry
|
|
70
|
-
*/
|
|
71
|
-
export type SubButton = {
|
|
72
|
-
/**
|
|
73
|
-
* Label for menu entry
|
|
74
|
-
*/
|
|
75
|
-
label: string;
|
|
76
|
-
/**
|
|
77
|
-
* Whether the button is disabled. Defaults to `false`.
|
|
78
|
-
*/
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* The callback to call when button was clicked.
|
|
82
|
-
*/
|
|
83
|
-
click: (subButton: SubButton, event: Event) => void;
|
|
84
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class NaturalBackgroundDensityDirective {
|
|
3
|
-
private readonly elementRef;
|
|
4
|
-
/**
|
|
5
|
-
* Automatically apply background image selection based on screen density.
|
|
6
|
-
*
|
|
7
|
-
* The given URL **MUST** be the normal density URL. And it **MUST** include
|
|
8
|
-
* the size as last path segment. That size will automatically be changed
|
|
9
|
-
* for other screen densities. That means that the server **MUST** be able to
|
|
10
|
-
* serve an image of the given size.
|
|
11
|
-
*
|
|
12
|
-
* If the given URL starts with `url(`, or is not ending with a number, then
|
|
13
|
-
* it will be set as-is, without any processing. This allows using url data,
|
|
14
|
-
* such as `url(data:image/png;base64,aabbcc)`.
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
*
|
|
18
|
-
* ```html
|
|
19
|
-
* <div naturalBackgroundDensity="/api/image/123/200"></div>
|
|
20
|
-
* <div naturalBackgroundDensity="/non-responsive.jpg"></div>
|
|
21
|
-
* <div naturalBackgroundDensity="url(data:image/png;base64,aabbcc)"></div>
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* Will generate something like:
|
|
25
|
-
*
|
|
26
|
-
* ```html
|
|
27
|
-
* <div style="background-image: image-set(url("/api/image/123/200") 1x, url("/api/image/123/300") 1.5x, url("/api/image/123/400") 2x, url("/api/image/123/600") 3x, url("/api/image/123/800") 4x);"></div>
|
|
28
|
-
* <div style="background-image: url("/non-responsive.jpg");"></div>
|
|
29
|
-
* <div style="background-image: url(data:image/png;base64,aabbcc)"></div>
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* See https://developer.mozilla.org/en-US/docs/Web/CSS/image/image-set
|
|
33
|
-
*/
|
|
34
|
-
set naturalBackgroundDensity(src: string);
|
|
35
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalBackgroundDensityDirective, never>;
|
|
36
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalBackgroundDensityDirective, "[naturalBackgroundDensity]", never, { "naturalBackgroundDensity": { "alias": "naturalBackgroundDensity"; "required": true; }; }, {}, never, never, true, never>;
|
|
37
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Usage :
|
|
5
|
-
*
|
|
6
|
-
* ```html
|
|
7
|
-
* <mat-tab-group [naturalLinkableTab]="!isPanel">
|
|
8
|
-
* <mat-tab label="Tab 1">Tab 1</mat-tab> // First tab doesn't need id. This keeps url clean on default one
|
|
9
|
-
* <mat-tab label="Tab 2" id="second-tab">Tab 2</mat-tab>
|
|
10
|
-
* ...
|
|
11
|
-
* </mat-tab-group>
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare class NaturalLinkableTabDirective implements AfterViewInit {
|
|
15
|
-
private readonly destroyRef;
|
|
16
|
-
private readonly component;
|
|
17
|
-
private readonly route;
|
|
18
|
-
private readonly router;
|
|
19
|
-
/**
|
|
20
|
-
* If false, disables the persistent navigation
|
|
21
|
-
*/
|
|
22
|
-
naturalLinkableTab: boolean | '';
|
|
23
|
-
private isLoadingRouteConfig;
|
|
24
|
-
constructor();
|
|
25
|
-
ngAfterViewInit(): void;
|
|
26
|
-
private getTabIndex;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalLinkableTabDirective, never>;
|
|
28
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalLinkableTabDirective, "mat-tab-group[naturalLinkableTab]", never, { "naturalLinkableTab": { "alias": "naturalLinkableTab"; "required": false; }; }, {}, never, never, true, never>;
|
|
29
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare function densities(src: string, forImageSet: boolean): string;
|
|
3
|
-
export declare class NaturalSrcDensityDirective {
|
|
4
|
-
private readonly elementRef;
|
|
5
|
-
/**
|
|
6
|
-
* Automatically apply image selection based on screen density.
|
|
7
|
-
*
|
|
8
|
-
* The given URL **MUST** be the normal density URL. And it **MUST** include
|
|
9
|
-
* the size as last path segment. That size will automatically be changed
|
|
10
|
-
* for other screen densities. That means that the server **MUST** be able to
|
|
11
|
-
* serve an image of the given size.
|
|
12
|
-
*
|
|
13
|
-
* Usage:
|
|
14
|
-
*
|
|
15
|
-
* ```html
|
|
16
|
-
* <img naturalSrcDensity="/api/image/123/200" />
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* Will generate something like:
|
|
20
|
-
*
|
|
21
|
-
* ```html
|
|
22
|
-
* <img
|
|
23
|
-
* src="/api/image/123/200"
|
|
24
|
-
* srcset="/api/image/123/200, /api/image/123/300 1.5x, /api/image/123/400 2x, /api/image/123/600 3x, /api/image/123/800 4x"
|
|
25
|
-
* />
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* See https://web.dev/codelab-density-descriptors/
|
|
29
|
-
*/
|
|
30
|
-
set naturalSrcDensity(src: string);
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalSrcDensityDirective, never>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalSrcDensityDirective, "img[naturalSrcDensity]", never, { "naturalSrcDensity": { "alias": "naturalSrcDensity"; "required": true; }; }, {}, never, never, true, never>;
|
|
33
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Returns the string with the first letter as capital
|
|
5
|
-
*/
|
|
6
|
-
export declare class NaturalCapitalizePipe implements PipeTransform {
|
|
7
|
-
transform(value: string | null): string | null;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalCapitalizePipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NaturalCapitalizePipe, "capitalize", true>;
|
|
10
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NaturalEllipsisPipe implements PipeTransform {
|
|
4
|
-
transform(value: string, limit: number): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalEllipsisPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NaturalEllipsisPipe, "ellipsis", true>;
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* A pipe to output an enum user-friendly name, instead of its value.
|
|
6
|
-
*
|
|
7
|
-
* Usage would be: {{ element.priority | enum: 'Priority' | async }}
|
|
8
|
-
*/
|
|
9
|
-
export declare class NaturalEnumPipe implements PipeTransform {
|
|
10
|
-
private readonly enumService;
|
|
11
|
-
transform(value: any, enumName: string): Observable<string>;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalEnumPipe, never>;
|
|
13
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NaturalEnumPipe, "enum", true>;
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Returns a string to approximately describe the date.
|
|
5
|
-
*
|
|
6
|
-
* Eg:
|
|
7
|
-
*
|
|
8
|
-
* - "il y a quelques minutes"
|
|
9
|
-
* - "dans 3 jours"
|
|
10
|
-
* - "dans 3 ans"
|
|
11
|
-
*/
|
|
12
|
-
export declare class NaturalTimeAgoPipe implements PipeTransform {
|
|
13
|
-
fakedNow: number | null;
|
|
14
|
-
private getNow;
|
|
15
|
-
transform(date: Date | string | null | undefined): string;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalTimeAgoPipe, never>;
|
|
17
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NaturalTimeAgoPipe, "timeAgo", true>;
|
|
18
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './directives/linkable-tab.directive';
|
|
2
|
-
export * from './pipes/capitalize.pipe';
|
|
3
|
-
export * from './pipes/ellipsis.pipe';
|
|
4
|
-
export * from './pipes/enum.pipe';
|
|
5
|
-
export { NaturalTimeAgoPipe } from './pipes/time-ago.pipe';
|
|
6
|
-
export * from './services/memory-storage';
|
|
7
|
-
export { NaturalSrcDensityDirective } from './directives/src-density.directive';
|
|
8
|
-
export { NaturalBackgroundDensityDirective } from './directives/background-density.directive';
|
|
9
|
-
export { NATURAL_SEO_CONFIG, NaturalSeoService } from './services/seo.service';
|
|
10
|
-
export type { NaturalSeoConfig, NaturalSeo, NaturalSeoBasic, NaturalSeoResolve, NaturalSeoCallback, NaturalSeoResolveData, } from './services/seo.service';
|
|
11
|
-
export { provideSeo } from './services/seo.provider';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare const SESSION_STORAGE: InjectionToken<NaturalStorage>;
|
|
4
|
-
export declare const LOCAL_STORAGE: InjectionToken<NaturalStorage>;
|
|
5
|
-
/**
|
|
6
|
-
* Normal `Storage` type, but without array access
|
|
7
|
-
*/
|
|
8
|
-
export type NaturalStorage = Pick<Storage, 'length' | 'clear' | 'getItem' | 'key' | 'removeItem' | 'setItem'>;
|
|
9
|
-
/**
|
|
10
|
-
* Memory storage to keep store volatile things in memory
|
|
11
|
-
*
|
|
12
|
-
* Should be used to shim sessionStorage when running on server or in our tests
|
|
13
|
-
*/
|
|
14
|
-
export declare class NaturalMemoryStorage implements NaturalStorage {
|
|
15
|
-
private readonly data;
|
|
16
|
-
get length(): number;
|
|
17
|
-
clear(): void;
|
|
18
|
-
getItem(key: string): string | null;
|
|
19
|
-
key(index: number): string | null;
|
|
20
|
-
removeItem(key: string): void;
|
|
21
|
-
setItem(key: string, value: string): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalMemoryStorage, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NaturalMemoryStorage>;
|
|
24
|
-
}
|
|
25
|
-
export declare function sessionStorageFactory(): NaturalStorage;
|
|
26
|
-
/**
|
|
27
|
-
* Standard `sessionStorage` provider that is compatible with SSR.
|
|
28
|
-
*
|
|
29
|
-
* In SSR environment, or when `sessionStorage` is not available, will return a `NaturalMemoryStorage`
|
|
30
|
-
*/
|
|
31
|
-
export declare const sessionStorageProvider: Provider;
|
|
32
|
-
/**
|
|
33
|
-
* Provide in-memory session storage to be used only in tests or SSR
|
|
34
|
-
*/
|
|
35
|
-
export declare const memorySessionStorageProvider: Provider;
|
|
36
|
-
export declare function localStorageFactory(): NaturalStorage;
|
|
37
|
-
/**
|
|
38
|
-
* Standard `localStorage` provider that is compatible with SSR.
|
|
39
|
-
*
|
|
40
|
-
* In SSR environment, or when `localStorage` is not available, will return a `NaturalMemoryStorage`
|
|
41
|
-
*/
|
|
42
|
-
export declare const localStorageProvider: Provider;
|
|
43
|
-
/**
|
|
44
|
-
* Provide in-memory local storage to be used only in tests or SSR
|
|
45
|
-
*/
|
|
46
|
-
export declare const memoryLocalStorageProvider: Provider;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, Provider } from '@angular/core';
|
|
2
|
-
import { NaturalSeoConfig } from './seo.service';
|
|
3
|
-
/**
|
|
4
|
-
* Configure and starts `NaturalSeoService`
|
|
5
|
-
*/
|
|
6
|
-
export declare function provideSeo(config: NaturalSeoConfig): (EnvironmentProviders | Provider)[];
|