@beshkari/mb-ui 0.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +98 -0
- package/esm2022/beshkari-mb-ui.mjs +5 -0
- package/esm2022/lib/accordion/mb-accordion.component.mjs +37 -0
- package/esm2022/lib/alert/mb-alert.component.mjs +28 -0
- package/esm2022/lib/avatar/mb-avatar.component.mjs +32 -0
- package/esm2022/lib/badge/mb-badge.component.mjs +28 -0
- package/esm2022/lib/breadcrumb/mb-breadcrumb.component.mjs +23 -0
- package/esm2022/lib/button/mb-button.component.mjs +48 -0
- package/esm2022/lib/card/mb-card.component.mjs +28 -0
- package/esm2022/lib/checkbox/mb-checkbox.component.mjs +75 -0
- package/esm2022/lib/chip/mb-chip.component.mjs +33 -0
- package/esm2022/lib/combobox/mb-combobox.component.mjs +235 -0
- package/esm2022/lib/confirm/mb-confirm-dialog.component.mjs +44 -0
- package/esm2022/lib/confirm/mb-confirm.service.mjs +39 -0
- package/esm2022/lib/confirm/mb-confirm.types.mjs +2 -0
- package/esm2022/lib/datepicker/mb-datepicker.component.mjs +382 -0
- package/esm2022/lib/dialog/mb-dialog-container.component.mjs +37 -0
- package/esm2022/lib/dialog/mb-dialog-ref.mjs +17 -0
- package/esm2022/lib/dialog/mb-dialog.component.mjs +87 -0
- package/esm2022/lib/dialog/mb-dialog.service.mjs +61 -0
- package/esm2022/lib/dialog/mb-dialog.tokens.mjs +3 -0
- package/esm2022/lib/divider/mb-divider.component.mjs +18 -0
- package/esm2022/lib/drawer/mb-drawer.component.mjs +34 -0
- package/esm2022/lib/dropdown/mb-dropdown.component.mjs +24 -0
- package/esm2022/lib/empty/mb-empty.component.mjs +27 -0
- package/esm2022/lib/form-field/mb-form-field.component.mjs +24 -0
- package/esm2022/lib/grid/mb-grid-data.mjs +266 -0
- package/esm2022/lib/grid/mb-grid-export.mjs +36 -0
- package/esm2022/lib/grid/mb-grid-messages.mjs +10 -0
- package/esm2022/lib/grid/mb-grid-state-adapter.mjs +97 -0
- package/esm2022/lib/grid/mb-grid-state.service.mjs +47 -0
- package/esm2022/lib/grid/mb-grid-template.directive.mjs +109 -0
- package/esm2022/lib/grid/mb-grid.component.mjs +998 -0
- package/esm2022/lib/grid/mb-grid.types.mjs +2 -0
- package/esm2022/lib/i18n/mb-ui-locale.mjs +18 -0
- package/esm2022/lib/i18n/mb-ui-messages-en.mjs +103 -0
- package/esm2022/lib/i18n/mb-ui-messages-fa.mjs +103 -0
- package/esm2022/lib/i18n/mb-ui-messages.mjs +34 -0
- package/esm2022/lib/i18n/mb-ui-messages.types.mjs +2 -0
- package/esm2022/lib/i18n/provide-mb-ui.mjs +20 -0
- package/esm2022/lib/input/mb-input.component.mjs +86 -0
- package/esm2022/lib/pagination/mb-pagination.component.mjs +47 -0
- package/esm2022/lib/progress/mb-progress.component.mjs +29 -0
- package/esm2022/lib/radio/mb-radio-group.component.mjs +63 -0
- package/esm2022/lib/select/mb-select.component.mjs +73 -0
- package/esm2022/lib/skeleton/mb-skeleton.component.mjs +24 -0
- package/esm2022/lib/spinner/mb-spinner.component.mjs +21 -0
- package/esm2022/lib/switch/mb-switch.component.mjs +59 -0
- package/esm2022/lib/tabs/mb-tabs.component.mjs +31 -0
- package/esm2022/lib/textarea/mb-textarea.component.mjs +83 -0
- package/esm2022/lib/toast/mb-toast-container.component.mjs +21 -0
- package/esm2022/lib/toast/mb-toast.service.mjs +47 -0
- package/esm2022/lib/toast/mb-toast.types.mjs +2 -0
- package/esm2022/lib/tokens/mb-ui-config.token.mjs +11 -0
- package/esm2022/lib/tooltip/mb-tooltip.directive.mjs +48 -0
- package/esm2022/lib/utils/coerce.mjs +10 -0
- package/esm2022/lib/utils/mb-jalali-date.mjs +120 -0
- package/esm2022/public-api.mjs +56 -0
- package/fesm2022/beshkari-mb-ui.mjs +3828 -0
- package/fesm2022/beshkari-mb-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/accordion/mb-accordion.component.d.ts +19 -0
- package/lib/alert/mb-alert.component.d.ts +12 -0
- package/lib/avatar/mb-avatar.component.d.ts +12 -0
- package/lib/badge/mb-badge.component.d.ts +12 -0
- package/lib/breadcrumb/mb-breadcrumb.component.d.ts +15 -0
- package/lib/button/mb-button.component.d.ts +19 -0
- package/lib/card/mb-card.component.d.ts +10 -0
- package/lib/checkbox/mb-checkbox.component.d.ts +25 -0
- package/lib/chip/mb-chip.component.d.ts +12 -0
- package/lib/combobox/mb-combobox.component.d.ts +65 -0
- package/lib/confirm/mb-confirm-dialog.component.d.ts +17 -0
- package/lib/confirm/mb-confirm.service.d.ts +12 -0
- package/lib/confirm/mb-confirm.types.d.ts +10 -0
- package/lib/datepicker/mb-datepicker.component.d.ts +87 -0
- package/lib/dialog/mb-dialog-container.component.d.ts +14 -0
- package/lib/dialog/mb-dialog-ref.d.ts +9 -0
- package/lib/dialog/mb-dialog.component.d.ts +27 -0
- package/lib/dialog/mb-dialog.service.d.ts +14 -0
- package/lib/dialog/mb-dialog.tokens.d.ts +13 -0
- package/lib/divider/mb-divider.component.d.ts +7 -0
- package/lib/drawer/mb-drawer.component.d.ts +14 -0
- package/lib/dropdown/mb-dropdown.component.d.ts +10 -0
- package/lib/empty/mb-empty.component.d.ts +10 -0
- package/lib/form-field/mb-form-field.component.d.ts +9 -0
- package/lib/grid/mb-grid-data.d.ts +20 -0
- package/lib/grid/mb-grid-export.d.ts +9 -0
- package/lib/grid/mb-grid-messages.d.ts +6 -0
- package/lib/grid/mb-grid-state-adapter.d.ts +24 -0
- package/lib/grid/mb-grid-state.service.d.ts +10 -0
- package/lib/grid/mb-grid-template.directive.d.ts +43 -0
- package/lib/grid/mb-grid.component.d.ts +233 -0
- package/lib/grid/mb-grid.types.d.ts +255 -0
- package/lib/i18n/mb-ui-locale.d.ts +2 -0
- package/lib/i18n/mb-ui-messages-en.d.ts +3 -0
- package/lib/i18n/mb-ui-messages-fa.d.ts +3 -0
- package/lib/i18n/mb-ui-messages.d.ts +5 -0
- package/lib/i18n/mb-ui-messages.types.d.ts +90 -0
- package/lib/i18n/provide-mb-ui.d.ts +7 -0
- package/lib/input/mb-input.component.d.ts +30 -0
- package/lib/pagination/mb-pagination.component.d.ts +16 -0
- package/lib/progress/mb-progress.component.d.ts +11 -0
- package/lib/radio/mb-radio-group.component.d.ts +30 -0
- package/lib/select/mb-select.component.d.ts +31 -0
- package/lib/skeleton/mb-skeleton.component.d.ts +9 -0
- package/lib/spinner/mb-spinner.component.d.ts +9 -0
- package/lib/switch/mb-switch.component.d.ts +22 -0
- package/lib/tabs/mb-tabs.component.d.ts +19 -0
- package/lib/textarea/mb-textarea.component.d.ts +29 -0
- package/lib/toast/mb-toast-container.component.d.ts +10 -0
- package/lib/toast/mb-toast.service.d.ts +15 -0
- package/lib/toast/mb-toast.types.d.ts +8 -0
- package/lib/tokens/mb-ui-config.token.d.ts +12 -0
- package/lib/tooltip/mb-tooltip.directive.d.ts +13 -0
- package/lib/utils/coerce.d.ts +3 -0
- package/lib/utils/mb-jalali-date.d.ts +18 -0
- package/package.json +50 -0
- package/public-api.d.ts +55 -0
- package/theme/_components.scss +19 -0
- package/theme/_dark.scss +1 -0
- package/theme/_density.scss +1 -0
- package/theme/_tokens.scss +57 -0
- package/theme/mb-ui.scss +28 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface MbAccordionItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class MbAccordionComponent {
|
|
11
|
+
items: MbAccordionItem[];
|
|
12
|
+
multiple: boolean;
|
|
13
|
+
itemsChange: EventEmitter<MbAccordionItem[]>;
|
|
14
|
+
hostClass: string;
|
|
15
|
+
toggle(item: MbAccordionItem): void;
|
|
16
|
+
trackById(_: number, item: MbAccordionItem): string;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbAccordionComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbAccordionComponent, "mb-accordion", never, { "items": { "alias": "items"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, { "itemsChange": "itemsChange"; }, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type MbAlertVariant = 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
+
export declare class MbAlertComponent {
|
|
5
|
+
variant: MbAlertVariant;
|
|
6
|
+
title: string;
|
|
7
|
+
closable: boolean;
|
|
8
|
+
closed: EventEmitter<void>;
|
|
9
|
+
hostClass: string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbAlertComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbAlertComponent, "mb-alert", never, { "variant": { "alias": "variant"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MbAvatarComponent {
|
|
4
|
+
src?: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
name: string;
|
|
7
|
+
size: MbSize;
|
|
8
|
+
hostClass: string;
|
|
9
|
+
get initials(): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbAvatarComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbAvatarComponent, "mb-avatar", never, { "src": { "alias": "src"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type MbBadgeVariant = 'primary' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
4
|
+
export declare class MbBadgeComponent {
|
|
5
|
+
variant: MbBadgeVariant;
|
|
6
|
+
size: MbSize;
|
|
7
|
+
dot: boolean;
|
|
8
|
+
pill: boolean;
|
|
9
|
+
hostClass: string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbBadgeComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbBadgeComponent, "mb-badge", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "dot": { "alias": "dot"; "required": false; }; "pill": { "alias": "pill"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface MbBreadcrumbItem {
|
|
4
|
+
label: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class MbBreadcrumbComponent {
|
|
9
|
+
items: MbBreadcrumbItem[];
|
|
10
|
+
itemClick: EventEmitter<MbBreadcrumbItem>;
|
|
11
|
+
hostClass: string;
|
|
12
|
+
trackByIndex(index: number): number;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbBreadcrumbComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbBreadcrumbComponent, "mb-breadcrumb", never, { "items": { "alias": "items"; "required": false; }; }, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type MbButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'link';
|
|
5
|
+
export type MbButtonType = 'button' | 'submit' | 'reset';
|
|
6
|
+
export declare class MbButtonComponent {
|
|
7
|
+
variant: MbButtonVariant;
|
|
8
|
+
size: MbSize;
|
|
9
|
+
type: MbButtonType;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
loading: boolean;
|
|
12
|
+
fullWidth: boolean;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
clicked: EventEmitter<MouseEvent>;
|
|
15
|
+
hostClass: string;
|
|
16
|
+
onClick(event: MouseEvent): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbButtonComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbButtonComponent, "mb-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MbCardComponent {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
padding: 'none' | 'sm' | 'md' | 'lg';
|
|
6
|
+
elevated: boolean;
|
|
7
|
+
hostClass: string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbCardComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbCardComponent, "mb-card", never, { "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "elevated": { "alias": "elevated"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class MbCheckboxComponent implements ControlValueAccessor {
|
|
6
|
+
label: string;
|
|
7
|
+
hint: string;
|
|
8
|
+
size: MbSize;
|
|
9
|
+
indeterminate: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
name?: string;
|
|
12
|
+
checkedChange: EventEmitter<boolean>;
|
|
13
|
+
hostClass: string;
|
|
14
|
+
checked: boolean;
|
|
15
|
+
private onChange;
|
|
16
|
+
private onTouched;
|
|
17
|
+
writeValue(value: boolean | null): void;
|
|
18
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
19
|
+
registerOnTouched(fn: () => void): void;
|
|
20
|
+
setDisabledState(isDisabled: boolean): void;
|
|
21
|
+
blur(): void;
|
|
22
|
+
toggle(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbCheckboxComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbCheckboxComponent, "mb-checkbox", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "size": { "alias": "size"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MbChipComponent {
|
|
4
|
+
removable: boolean;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
removed: EventEmitter<void>;
|
|
8
|
+
hostClass: string;
|
|
9
|
+
remove(event: MouseEvent): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbChipComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbChipComponent, "mb-chip", never, { "removable": { "alias": "removable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface MbComboboxOption<T = unknown> {
|
|
6
|
+
label: string;
|
|
7
|
+
value: T;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class MbComboboxComponent<T = unknown> implements ControlValueAccessor, OnChanges {
|
|
11
|
+
private readonly cdr;
|
|
12
|
+
private readonly host;
|
|
13
|
+
readonly messages: import("@beshkari/mb-ui").MbUiMessages;
|
|
14
|
+
data: MbComboboxOption<T>[] | T[];
|
|
15
|
+
textField: string;
|
|
16
|
+
valueField: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
searchPlaceholder?: string;
|
|
19
|
+
size: MbSize;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
invalid: boolean;
|
|
22
|
+
filterable: boolean;
|
|
23
|
+
clearable: boolean;
|
|
24
|
+
defaultItem: T | null;
|
|
25
|
+
defaultItemText?: string;
|
|
26
|
+
/** When true, the model value is the primitive from `valueField` instead of the full data item. */
|
|
27
|
+
valuePrimitive: boolean;
|
|
28
|
+
valueChange: EventEmitter<T>;
|
|
29
|
+
openedChange: EventEmitter<boolean>;
|
|
30
|
+
hostClass: string;
|
|
31
|
+
value: T | null;
|
|
32
|
+
opened: boolean;
|
|
33
|
+
search: string;
|
|
34
|
+
normalizedOptions: MbComboboxOption<T>[];
|
|
35
|
+
get effectivePlaceholder(): string;
|
|
36
|
+
get effectiveSearchPlaceholder(): string;
|
|
37
|
+
get effectiveDefaultItemText(): string;
|
|
38
|
+
get clearAriaLabel(): string;
|
|
39
|
+
private onChange;
|
|
40
|
+
private onTouched;
|
|
41
|
+
constructor(cdr: ChangeDetectorRef, host: ElementRef<HTMLElement>);
|
|
42
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
43
|
+
onDocumentClick(event: MouseEvent): void;
|
|
44
|
+
onDocumentKeydown(event: KeyboardEvent): void;
|
|
45
|
+
writeValue(value: T | null): void;
|
|
46
|
+
registerOnChange(fn: (value: T | null) => void): void;
|
|
47
|
+
registerOnTouched(fn: () => void): void;
|
|
48
|
+
setDisabledState(isDisabled: boolean): void;
|
|
49
|
+
get filteredOptions(): MbComboboxOption<T>[];
|
|
50
|
+
get displayLabel(): string;
|
|
51
|
+
toggle(): void;
|
|
52
|
+
open(): void;
|
|
53
|
+
close(): void;
|
|
54
|
+
selectOption(option: MbComboboxOption<T>): void;
|
|
55
|
+
selectDefault(): void;
|
|
56
|
+
clear(event?: Event): void;
|
|
57
|
+
private commit;
|
|
58
|
+
private normalizeOptions;
|
|
59
|
+
private readFieldLabel;
|
|
60
|
+
private readFieldValue;
|
|
61
|
+
isSelected(option: MbComboboxOption<T>): boolean;
|
|
62
|
+
private compareValues;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbComboboxComponent<any>, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbComboboxComponent<any>, "mb-combobox", never, { "data": { "alias": "data"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "defaultItem": { "alias": "defaultItem"; "required": false; }; "defaultItemText": { "alias": "defaultItemText"; "required": false; }; "valuePrimitive": { "alias": "valuePrimitive"; "required": false; }; }, { "valueChange": "valueChange"; "openedChange": "openedChange"; }, never, never, true, never>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MbDialogRef } from '../dialog/mb-dialog-ref';
|
|
2
|
+
import { MbConfirmOptions } from './mb-confirm.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MbConfirmDialogComponent {
|
|
5
|
+
readonly options: MbConfirmOptions;
|
|
6
|
+
private readonly dialogRef;
|
|
7
|
+
private readonly messages;
|
|
8
|
+
constructor(options: MbConfirmOptions, dialogRef: MbDialogRef<boolean>);
|
|
9
|
+
get tone(): import("./mb-confirm.types").MbConfirmTone;
|
|
10
|
+
get titleText(): string;
|
|
11
|
+
get okText(): string;
|
|
12
|
+
get cancelText(): string;
|
|
13
|
+
cancel(): void;
|
|
14
|
+
accept(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbConfirmDialogComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbConfirmDialogComponent, "mb-confirm-dialog", never, {}, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MbDialogService } from '../dialog/mb-dialog.service';
|
|
2
|
+
import { MbConfirmOptions } from './mb-confirm.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MbConfirmService {
|
|
5
|
+
private readonly dialog;
|
|
6
|
+
private readonly messages;
|
|
7
|
+
constructor(dialog: MbDialogService);
|
|
8
|
+
confirm(options: MbConfirmOptions): Promise<boolean>;
|
|
9
|
+
danger(message: string, title?: string): Promise<boolean>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbConfirmService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MbConfirmService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type MbConfirmTone = 'default' | 'danger' | 'warning' | 'success';
|
|
2
|
+
export interface MbConfirmOptions {
|
|
3
|
+
title?: string;
|
|
4
|
+
message: string;
|
|
5
|
+
okText?: string;
|
|
6
|
+
cancelText?: string;
|
|
7
|
+
tone?: MbConfirmTone;
|
|
8
|
+
width?: string;
|
|
9
|
+
closeOnBackdropClick?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { MbSize } from '../tokens/mb-ui-config.token';
|
|
4
|
+
import { MbJalaliDate } from '../utils/mb-jalali-date';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type MbDatepickerMode = 'date' | 'month';
|
|
7
|
+
export type MbCalendarSystem = 'gregorian' | 'jalali';
|
|
8
|
+
export type MbDateValue = string | Date | null;
|
|
9
|
+
export interface MbCalendarDay {
|
|
10
|
+
date: Date;
|
|
11
|
+
iso: string;
|
|
12
|
+
label: number;
|
|
13
|
+
currentMonth: boolean;
|
|
14
|
+
today: boolean;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
jalali?: MbJalaliDate;
|
|
18
|
+
}
|
|
19
|
+
export declare class MbDatepickerComponent implements ControlValueAccessor {
|
|
20
|
+
private readonly cdr;
|
|
21
|
+
private readonly host;
|
|
22
|
+
readonly messages: import("@beshkari/mb-ui").MbUiMessages;
|
|
23
|
+
private readonly uiConfig;
|
|
24
|
+
mode: MbDatepickerMode;
|
|
25
|
+
calendar: MbCalendarSystem;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
min?: string;
|
|
28
|
+
max?: string;
|
|
29
|
+
size: MbSize;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
invalid: boolean;
|
|
32
|
+
clearable: boolean;
|
|
33
|
+
firstDayOfWeek: 0 | 1 | 6;
|
|
34
|
+
locale?: string;
|
|
35
|
+
monthNames?: string[];
|
|
36
|
+
weekdayNames?: string[];
|
|
37
|
+
disabledDates: (date: Date) => boolean;
|
|
38
|
+
valueChange: EventEmitter<string>;
|
|
39
|
+
openedChange: EventEmitter<boolean>;
|
|
40
|
+
hostClass: string;
|
|
41
|
+
value: string;
|
|
42
|
+
opened: boolean;
|
|
43
|
+
viewDate: Date;
|
|
44
|
+
viewJalali: MbJalaliDate;
|
|
45
|
+
days: MbCalendarDay[];
|
|
46
|
+
readonly years: number[];
|
|
47
|
+
readonly jalaliYears: number[];
|
|
48
|
+
private onChange;
|
|
49
|
+
private onTouched;
|
|
50
|
+
constructor(cdr: ChangeDetectorRef, host: ElementRef<HTMLElement>);
|
|
51
|
+
get effectivePlaceholder(): string;
|
|
52
|
+
get effectiveLocale(): string;
|
|
53
|
+
get effectiveWeekdayNames(): string[];
|
|
54
|
+
get effectiveGregorianMonthNames(): string[];
|
|
55
|
+
get activeMonthNames(): string[];
|
|
56
|
+
get activeYears(): number[];
|
|
57
|
+
onDocumentClick(event: MouseEvent): void;
|
|
58
|
+
writeValue(value: MbDateValue): void;
|
|
59
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
60
|
+
registerOnTouched(fn: () => void): void;
|
|
61
|
+
setDisabledState(isDisabled: boolean): void;
|
|
62
|
+
toggle(): void;
|
|
63
|
+
open(): void;
|
|
64
|
+
close(): void;
|
|
65
|
+
clear(event?: Event): void;
|
|
66
|
+
select(day: MbCalendarDay): void;
|
|
67
|
+
selectToday(): void;
|
|
68
|
+
prevMonth(): void;
|
|
69
|
+
nextMonth(): void;
|
|
70
|
+
setMonth(value: string | number): void;
|
|
71
|
+
setYear(value: string | number): void;
|
|
72
|
+
displayValue(): string;
|
|
73
|
+
currentMonthIndex(): number;
|
|
74
|
+
currentYear(): number;
|
|
75
|
+
private commit;
|
|
76
|
+
private rebuildCalendar;
|
|
77
|
+
private buildGregorianCalendar;
|
|
78
|
+
private buildJalaliCalendar;
|
|
79
|
+
private jalaliToDate;
|
|
80
|
+
private toGregorian;
|
|
81
|
+
private isDisabled;
|
|
82
|
+
private parseIso;
|
|
83
|
+
private toIso;
|
|
84
|
+
private startOfMonth;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDatepickerComponent, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDatepickerComponent, "mb-datepicker", never, { "mode": { "alias": "mode"; "required": false; }; "calendar": { "alias": "calendar"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "monthNames": { "alias": "monthNames"; "required": false; }; "weekdayNames": { "alias": "weekdayNames"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; }, { "valueChange": "valueChange"; "openedChange": "openedChange"; }, never, never, true, never>;
|
|
87
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
2
|
+
import { ComponentRef } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MbDialogContainerComponent {
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
width: string;
|
|
7
|
+
maxWidth: string;
|
|
8
|
+
minWidth: string;
|
|
9
|
+
private portalOutlet;
|
|
10
|
+
hostClass: string;
|
|
11
|
+
attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDialogContainerComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDialogContainerComponent, "mb-dialog-container", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare class MbDialogRef<TResult = unknown> {
|
|
4
|
+
private readonly overlayRef;
|
|
5
|
+
private readonly closedSubject;
|
|
6
|
+
readonly afterClosed$: Observable<TResult | undefined>;
|
|
7
|
+
constructor(overlayRef: OverlayRef);
|
|
8
|
+
close(result?: TResult): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MbDialogComponent {
|
|
4
|
+
private readonly messages;
|
|
5
|
+
open: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
width: string | number;
|
|
8
|
+
height?: string | number;
|
|
9
|
+
minWidth: string | number;
|
|
10
|
+
maxWidth: string | number;
|
|
11
|
+
closable: boolean;
|
|
12
|
+
closeOnBackdrop: boolean;
|
|
13
|
+
closeOnEscape: boolean;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
get effectiveAriaLabel(): string;
|
|
16
|
+
get closeAriaLabel(): string;
|
|
17
|
+
close: EventEmitter<void>;
|
|
18
|
+
onEscape(): void;
|
|
19
|
+
get panelWidth(): string;
|
|
20
|
+
get panelHeight(): string | null;
|
|
21
|
+
get panelMinWidth(): string;
|
|
22
|
+
get panelMaxWidth(): string;
|
|
23
|
+
requestClose(): void;
|
|
24
|
+
onBackdropClick(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDialogComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDialogComponent, "mb-dialog", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "close": "close"; }, never, ["[mbDialogTitlebar],mb-dialog-titlebar", "*", "[mbDialogActions],mb-dialog-actions"], true, never>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Injector, Type } from '@angular/core';
|
|
2
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
3
|
+
import { MbDialogConfig } from './mb-dialog.tokens';
|
|
4
|
+
import { MbDialogRef } from './mb-dialog-ref';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MbDialogService {
|
|
7
|
+
private readonly overlay;
|
|
8
|
+
private readonly injector;
|
|
9
|
+
constructor(overlay: Overlay, injector: Injector);
|
|
10
|
+
open<TComponent, TData = unknown, TResult = unknown>(component: Type<TComponent>, config?: MbDialogConfig<TData>): MbDialogRef<TResult>;
|
|
11
|
+
private createOverlayConfig;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDialogService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MbDialogService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface MbDialogConfig<TData = unknown> {
|
|
3
|
+
data?: TData;
|
|
4
|
+
width?: string;
|
|
5
|
+
maxWidth?: string;
|
|
6
|
+
minWidth?: string;
|
|
7
|
+
panelClass?: string | string[];
|
|
8
|
+
backdropClass?: string | string[];
|
|
9
|
+
closeOnBackdropClick?: boolean;
|
|
10
|
+
closeOnEscape?: boolean;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const MB_DIALOG_DATA: InjectionToken<unknown>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MbDividerComponent {
|
|
3
|
+
orientation: 'horizontal' | 'vertical';
|
|
4
|
+
get hostClass(): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDividerComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDividerComponent, "mb-divider", never, { "orientation": { "alias": "orientation"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MbDrawerComponent {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
position: 'start' | 'end' | 'top' | 'bottom';
|
|
7
|
+
closeOnBackdrop: boolean;
|
|
8
|
+
openChange: EventEmitter<boolean>;
|
|
9
|
+
hostClass: string;
|
|
10
|
+
close(): void;
|
|
11
|
+
backdrop(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDrawerComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDrawerComponent, "mb-drawer", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "position": { "alias": "position"; "required": false; }; "closeOnBackdrop": { "alias": "closeOnBackdrop"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MbDropdownComponent {
|
|
3
|
+
open: boolean;
|
|
4
|
+
align: 'start' | 'end';
|
|
5
|
+
hostClass: string;
|
|
6
|
+
toggle(): void;
|
|
7
|
+
close(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbDropdownComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbDropdownComponent, "mb-dropdown", never, { "open": { "alias": "open"; "required": false; }; "align": { "alias": "align"; "required": false; }; }, {}, never, ["[mbDropdownTrigger]", "*"], true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MbEmptyComponent {
|
|
3
|
+
private readonly messages;
|
|
4
|
+
title?: string;
|
|
5
|
+
description: string;
|
|
6
|
+
hostClass: string;
|
|
7
|
+
get effectiveTitle(): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbEmptyComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbEmptyComponent, "mb-empty", never, { "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MbFormFieldComponent {
|
|
3
|
+
label: string;
|
|
4
|
+
hint: string;
|
|
5
|
+
error: string;
|
|
6
|
+
required: boolean;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbFormFieldComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MbFormFieldComponent, "mb-form-field", never, { "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MbGridColumn, MbGridCompositeFilterDescriptor, MbGridFilterOperator, MbGridProcessedResult, MbGridSortDescriptor, MbGridState } from './mb-grid.types';
|
|
2
|
+
export declare function mbGridDefaultState<T = unknown>(take?: number): MbGridState<T>;
|
|
3
|
+
export declare function mbGridGetValue<T = unknown>(row: T, field: keyof T | string): unknown;
|
|
4
|
+
export declare function mbGridNormalize(value: unknown, ignoreCase?: boolean): string;
|
|
5
|
+
export declare function mbGridApplyFilter<T>(rows: T[], filter?: MbGridCompositeFilterDescriptor<T>, columns?: MbGridColumn<T>[]): T[];
|
|
6
|
+
export declare function mbGridApplySort<T>(rows: T[], sort?: MbGridSortDescriptor<T>[], columns?: MbGridColumn<T>[]): T[];
|
|
7
|
+
export declare function mbGridProcess<T>(rows: T[], state: MbGridState<T>, columns?: MbGridColumn<T>[], expandedGroupKeys?: Set<string>): MbGridProcessedResult<T>;
|
|
8
|
+
export interface MbGridFormatOptions {
|
|
9
|
+
locale?: string;
|
|
10
|
+
yes?: string;
|
|
11
|
+
no?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function mbGridFormatValue<T>(row: T, column: MbGridColumn<T>, rowIndex: number, localeOrOptions?: string | MbGridFormatOptions): string;
|
|
14
|
+
export declare function mbGridBuildFilter<T>(filtersByField: Record<string, {
|
|
15
|
+
operator: MbGridFilterOperator;
|
|
16
|
+
value: unknown;
|
|
17
|
+
}>): MbGridCompositeFilterDescriptor<T> | undefined;
|
|
18
|
+
export declare function mbGridToODataQuery<T>(state: MbGridState<T>): string;
|
|
19
|
+
export declare function mbGridToLaravelQuery<T>(state: MbGridState<T>): Record<string, unknown>;
|
|
20
|
+
export declare function mbGridExportCsv<T>(rows: T[], columns: MbGridColumn<T>[], fileName?: string, localeOrOptions?: string | MbGridFormatOptions): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MbGridColumn } from './mb-grid.types';
|
|
2
|
+
import { MbGridFormatOptions } from './mb-grid-data';
|
|
3
|
+
export declare function mbGridDownloadBlob(blob: Blob, fileName: string): void;
|
|
4
|
+
export declare function mbGridExportJson<T>(rows: T[], columns: MbGridColumn<T>[], fileName?: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* Excel-compatible HTML export. It opens directly in Excel/LibreOffice and keeps Unicode/RTL safely.
|
|
7
|
+
* For true XLSX, wrap this API with SheetJS/xlsx in the host application to avoid forcing a heavy dependency into mb-ui core.
|
|
8
|
+
*/
|
|
9
|
+
export declare function mbGridExportExcelHtml<T>(rows: T[], columns: MbGridColumn<T>[], fileName?: string, localeOrOptions?: string | MbGridFormatOptions, dir?: 'rtl' | 'ltr'): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { MbGridMessages } from '../i18n/mb-ui-messages.types';
|
|
3
|
+
export type { MbGridMessages };
|
|
4
|
+
/** @deprecated Use `MB_UI_MESSAGES` or locale bundles from `i18n/`. */
|
|
5
|
+
export declare const MB_GRID_DEFAULT_MESSAGES_FA: MbGridMessages;
|
|
6
|
+
export declare const MB_GRID_MESSAGES: InjectionToken<MbGridMessages>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MbGridCompositeFilterDescriptor, MbGridState } from './mb-grid.types';
|
|
2
|
+
/**
|
|
3
|
+
* Structural compatibility with common grid state objects.
|
|
4
|
+
*/
|
|
5
|
+
export interface MbLegacyGridState<T = unknown> {
|
|
6
|
+
skip?: number;
|
|
7
|
+
take?: number;
|
|
8
|
+
sort?: Array<{
|
|
9
|
+
field: keyof T | string;
|
|
10
|
+
dir?: 'asc' | 'desc';
|
|
11
|
+
}>;
|
|
12
|
+
filter?: MbGridCompositeFilterDescriptor<T>;
|
|
13
|
+
group?: Array<{
|
|
14
|
+
field: keyof T | string;
|
|
15
|
+
dir?: 'asc' | 'desc';
|
|
16
|
+
aggregates?: unknown[];
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export declare function mbGridStateFromLegacy<T>(state?: MbLegacyGridState<T> | null, defaultTake?: number): MbGridState<T>;
|
|
20
|
+
export declare function mbGridStateToLegacy<T>(state: MbGridState<T>): MbLegacyGridState<T>;
|
|
21
|
+
/**
|
|
22
|
+
* Builds a nested query string for APIs that expect indexed sort, filter, and group parameters.
|
|
23
|
+
*/
|
|
24
|
+
export declare function mbGridStateToNestedQuery<T>(state: MbGridState<T>): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MbGridColumn, MbGridPersistedState, MbGridState } from './mb-grid.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MbGridStateService {
|
|
4
|
+
save<T>(key: string, state: MbGridState<T>, columns: MbGridColumn<T>[], selectedKeys?: Array<string | number>): void;
|
|
5
|
+
load<T>(key: string): MbGridPersistedState<T> | null;
|
|
6
|
+
clear(key: string): void;
|
|
7
|
+
private storageKey;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridStateService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MbGridStateService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { MbGridCellTemplateContext, MbGridDetailTemplateContext, MbGridFooterTemplateContext, MbGridHeaderTemplateContext, MbGridEditTemplateContext, MbGridToolbarTemplateContext } from './mb-grid.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MbGridCellTemplateDirective<T = unknown> {
|
|
5
|
+
readonly templateRef: TemplateRef<MbGridCellTemplateContext<T>>;
|
|
6
|
+
field: string;
|
|
7
|
+
constructor(templateRef: TemplateRef<MbGridCellTemplateContext<T>>);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridCellTemplateDirective<any>, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridCellTemplateDirective<any>, "ng-template[mbGridCell]", never, { "field": { "alias": "mbGridCell"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
export declare class MbGridEditTemplateDirective<T = unknown> {
|
|
12
|
+
readonly templateRef: TemplateRef<MbGridEditTemplateContext<T>>;
|
|
13
|
+
field: string;
|
|
14
|
+
constructor(templateRef: TemplateRef<MbGridEditTemplateContext<T>>);
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridEditTemplateDirective<any>, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridEditTemplateDirective<any>, "ng-template[mbGridEdit]", never, { "field": { "alias": "mbGridEdit"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
export declare class MbGridHeaderTemplateDirective<T = unknown> {
|
|
19
|
+
readonly templateRef: TemplateRef<MbGridHeaderTemplateContext<T>>;
|
|
20
|
+
field: string;
|
|
21
|
+
constructor(templateRef: TemplateRef<MbGridHeaderTemplateContext<T>>);
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridHeaderTemplateDirective<any>, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridHeaderTemplateDirective<any>, "ng-template[mbGridHeader]", never, { "field": { "alias": "mbGridHeader"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
export declare class MbGridFooterTemplateDirective<T = unknown> {
|
|
26
|
+
readonly templateRef: TemplateRef<MbGridFooterTemplateContext<T>>;
|
|
27
|
+
field: string;
|
|
28
|
+
constructor(templateRef: TemplateRef<MbGridFooterTemplateContext<T>>);
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridFooterTemplateDirective<any>, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridFooterTemplateDirective<any>, "ng-template[mbGridFooter]", never, { "field": { "alias": "mbGridFooter"; "required": false; }; }, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
export declare class MbGridToolbarTemplateDirective<T = unknown> {
|
|
33
|
+
readonly templateRef: TemplateRef<MbGridToolbarTemplateContext<T>>;
|
|
34
|
+
constructor(templateRef: TemplateRef<MbGridToolbarTemplateContext<T>>);
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridToolbarTemplateDirective<any>, never>;
|
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridToolbarTemplateDirective<any>, "ng-template[mbGridToolbar]", never, {}, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
export declare class MbGridDetailTemplateDirective<T = unknown> {
|
|
39
|
+
readonly templateRef: TemplateRef<MbGridDetailTemplateContext<T>>;
|
|
40
|
+
constructor(templateRef: TemplateRef<MbGridDetailTemplateContext<T>>);
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MbGridDetailTemplateDirective<any>, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MbGridDetailTemplateDirective<any>, "ng-template[mbGridDetail]", never, {}, {}, never, never, true, never>;
|
|
43
|
+
}
|