asksuite-citrus 2.1.0-beta.1 → 2.6.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/esm2022/lib/asksuite-citrus.module.mjs +17 -6
- package/esm2022/lib/classes/richtext-wrapper.mjs +76 -3
- package/esm2022/lib/components/accordion/accordion.component.mjs +8 -5
- package/esm2022/lib/components/accordion/extendable-panel/extendable-panel.component.mjs +21 -4
- package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +6 -4
- package/esm2022/lib/components/avatar/avatar.component.mjs +2 -2
- package/esm2022/lib/components/box/box.component.mjs +2 -2
- package/esm2022/lib/components/button/button.component.mjs +2 -2
- package/esm2022/lib/components/character-counter/character-counter.component.mjs +2 -2
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +2 -2
- package/esm2022/lib/components/chips/chips.component.mjs +2 -2
- package/esm2022/lib/components/date-picker/date-picker-calendar/date-picker-calendar.component.mjs +2 -2
- package/esm2022/lib/components/date-picker/date-picker.component.mjs +2 -2
- package/esm2022/lib/components/dropdown-container/dropdown-container.component.mjs +4 -7
- package/esm2022/lib/components/input/input.component.mjs +2 -2
- package/esm2022/lib/components/modal/confirmation-modal/confirmation-modal.component.mjs +13 -9
- package/esm2022/lib/components/modal/modal.component.mjs +6 -3
- package/esm2022/lib/components/pagination/pagination.component.mjs +2 -2
- package/esm2022/lib/components/phone-ddi/phone-ddi.component.mjs +9 -5
- package/esm2022/lib/components/richtext-toolbox/richtext-toolbox.component.mjs +3 -3
- package/esm2022/lib/components/richtext-url-prompt/richtext-url-prompt.component.mjs +3 -3
- package/esm2022/lib/components/select/select.component.mjs +2 -2
- package/esm2022/lib/components/table/table.component.mjs +7 -4
- package/esm2022/lib/components/toast/toast.component.mjs +2 -2
- package/esm2022/lib/directives/ask-dropdown.directive.mjs +14 -3
- package/esm2022/lib/directives/button/ask-base-button.directive.mjs +17 -4
- package/esm2022/lib/directives/index.mjs +3 -1
- package/esm2022/lib/directives/input/input.directive.mjs +19 -0
- package/esm2022/lib/directives/list-item/list-item.directive.mjs +19 -0
- package/esm2022/lib/directives/richtext-toolbox/richtext-toolbox.directive.mjs +23 -2
- package/esm2022/lib/helpers/html-panel-quill-blot.helper.mjs +21 -0
- package/esm2022/lib/services/modal/modal.config.mjs +2 -2
- package/esm2022/lib/services/modal/modal.service.mjs +20 -14
- package/fesm2022/asksuite-citrus.mjs +292 -74
- package/fesm2022/asksuite-citrus.mjs.map +1 -1
- package/lib/asksuite-citrus.module.d.ts +11 -9
- package/lib/classes/richtext-wrapper.d.ts +12 -2
- package/lib/components/accordion/accordion.component.d.ts +2 -1
- package/lib/components/accordion/extendable-panel/extendable-panel.component.d.ts +7 -2
- package/lib/components/dropdown-container/dropdown-container.component.d.ts +2 -4
- package/lib/components/modal/confirmation-modal/confirmation-modal.component.d.ts +11 -1
- package/lib/components/modal/modal.component.d.ts +2 -1
- package/lib/components/table/table.component.d.ts +2 -1
- package/lib/directives/ask-dropdown.directive.d.ts +3 -1
- package/lib/directives/button/ask-base-button.directive.d.ts +9 -3
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/input/input.directive.d.ts +6 -0
- package/lib/directives/list-item/list-item.directive.d.ts +6 -0
- package/lib/directives/richtext-toolbox/richtext-toolbox.directive.d.ts +11 -1
- package/lib/helpers/html-panel-quill-blot.helper.d.ts +9 -0
- package/lib/services/modal/modal.config.d.ts +3 -1
- package/lib/services/modal/modal.service.d.ts +5 -5
- package/package.json +4 -1
- package/styles/badge.scss +64 -0
- package/styles/button.scss +65 -16
- package/styles/input.scss +5 -0
- package/styles/list-item.scss +8 -0
- package/styles/modal.scss +0 -1
- package/styles/styles.scss +3 -63
@@ -40,19 +40,21 @@ import * as i37 from "./pipes/force-break-line/force-break-line.pipe";
|
|
40
40
|
import * as i38 from "./components/modal/confirmation-modal/confirmation-modal.component";
|
41
41
|
import * as i39 from "./components/loading-bar/loading-bar.component";
|
42
42
|
import * as i40 from "./directives/button/ask-stroked-button.directive";
|
43
|
-
import * as i41 from "
|
44
|
-
import * as i42 from "
|
45
|
-
import * as i43 from "@angular/
|
46
|
-
import * as i44 from "@
|
47
|
-
import * as i45 from "
|
48
|
-
import * as i46 from "@
|
49
|
-
import * as i47 from "ngx-
|
50
|
-
import * as i48 from "@angular/material/
|
43
|
+
import * as i41 from "./directives/input/input.directive";
|
44
|
+
import * as i42 from "./directives/list-item/list-item.directive";
|
45
|
+
import * as i43 from "@angular/common";
|
46
|
+
import * as i44 from "@angular/forms";
|
47
|
+
import * as i45 from "@angular/cdk/overlay";
|
48
|
+
import * as i46 from "@ngx-translate/core";
|
49
|
+
import * as i47 from "ngx-skeleton-loader";
|
50
|
+
import * as i48 from "@angular/material/tooltip";
|
51
|
+
import * as i49 from "ngx-mask";
|
52
|
+
import * as i50 from "@angular/material/progress-bar";
|
51
53
|
export declare class AsksuiteCitrusModule {
|
52
54
|
static forRoot(params?: {
|
53
55
|
flagUrl?: string;
|
54
56
|
}): ModuleWithProviders<AsksuiteCitrusModule>;
|
55
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<AsksuiteCitrusModule, never>;
|
56
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.PhoneDdiComponent, typeof i10.ChipsComponent, typeof i11.CheckboxComponent, typeof i12.DatePickerComponent, typeof i13.DatePickerCalendarComponent, typeof i14.SkeletonComponent, typeof i15.SpinnerComponent, typeof i16.SpinnerDirective, typeof i17.BadgeDirective, typeof i18.AutofocusDirective, typeof i19.ScrollDirective, typeof i20.AskTooltipDirective, typeof i21.ToastComponent, typeof i22.AskButtonDirective, typeof i23.ModalComponent, typeof i24.ModalBodyDirective, typeof i25.ModalHeaderDirective, typeof i26.ModalFooterDirective, typeof i27.CharacterCounterComponent, typeof i28.AccordionComponent, typeof i29.ExtendablePanelComponent, typeof i30.TableComponent, typeof i31.PaginationComponent, typeof i32.PaginatePipe, typeof i33.RichtextToolboxDirective, typeof i34.RichtextUrlPromptComponent, typeof i35.RichtextToolboxComponent, typeof i36.AskTextButtonDirective, typeof i37.ForceBreakLinePipe, typeof i38.ConfirmationModalComponent, typeof i39.LoadingBarComponent, typeof i40.AskStrokedButtonDirective], [typeof
|
58
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.PhoneDdiComponent, typeof i10.ChipsComponent, typeof i11.CheckboxComponent, typeof i12.DatePickerComponent, typeof i13.DatePickerCalendarComponent, typeof i14.SkeletonComponent, typeof i15.SpinnerComponent, typeof i16.SpinnerDirective, typeof i17.BadgeDirective, typeof i18.AutofocusDirective, typeof i19.ScrollDirective, typeof i20.AskTooltipDirective, typeof i21.ToastComponent, typeof i22.AskButtonDirective, typeof i23.ModalComponent, typeof i24.ModalBodyDirective, typeof i25.ModalHeaderDirective, typeof i26.ModalFooterDirective, typeof i27.CharacterCounterComponent, typeof i28.AccordionComponent, typeof i29.ExtendablePanelComponent, typeof i30.TableComponent, typeof i31.PaginationComponent, typeof i32.PaginatePipe, typeof i33.RichtextToolboxDirective, typeof i34.RichtextUrlPromptComponent, typeof i35.RichtextToolboxComponent, typeof i36.AskTextButtonDirective, typeof i37.ForceBreakLinePipe, typeof i38.ConfirmationModalComponent, typeof i39.LoadingBarComponent, typeof i40.AskStrokedButtonDirective, typeof i41.InputDirective, typeof i42.ListItemDirective], [typeof i43.CommonModule, typeof i44.FormsModule, typeof i44.ReactiveFormsModule, typeof i45.CdkOverlayOrigin, typeof i45.CdkConnectedOverlay, typeof i45.OverlayModule, typeof i46.TranslateModule, typeof i47.NgxSkeletonLoaderModule, typeof i48.MatTooltipModule, typeof i49.NgxMaskDirective, typeof i49.NgxMaskPipe, typeof i50.MatProgressBarModule], [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.PhoneDdiComponent, typeof i10.ChipsComponent, typeof i11.CheckboxComponent, typeof i12.DatePickerComponent, typeof i13.DatePickerCalendarComponent, typeof i14.SkeletonComponent, typeof i16.SpinnerDirective, typeof i17.BadgeDirective, typeof i18.AutofocusDirective, typeof i19.ScrollDirective, typeof i20.AskTooltipDirective, typeof i22.AskButtonDirective, typeof i36.AskTextButtonDirective, typeof i24.ModalBodyDirective, typeof i25.ModalHeaderDirective, typeof i26.ModalFooterDirective, typeof i27.CharacterCounterComponent, typeof i28.AccordionComponent, typeof i29.ExtendablePanelComponent, typeof i30.TableComponent, typeof i31.PaginationComponent, typeof i32.PaginatePipe, typeof i33.RichtextToolboxDirective, typeof i37.ForceBreakLinePipe, typeof i39.LoadingBarComponent, typeof i40.AskStrokedButtonDirective, typeof i41.InputDirective, typeof i42.ListItemDirective]>;
|
57
59
|
static ɵinj: i0.ɵɵInjectorDeclaration<AsksuiteCitrusModule>;
|
58
60
|
}
|
@@ -1,20 +1,23 @@
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, NgZone } from '@angular/core';
|
2
|
-
import Quill from 'quill';
|
2
|
+
import Quill, { RangeStatic } from 'quill';
|
3
3
|
import { RichTextFunctions, ToolKeys, ToolsState } from '../interfaces/richtext-toolbox.interface';
|
4
4
|
export declare class RichtextWrapper implements RichTextFunctions {
|
5
5
|
private ngZone;
|
6
6
|
private cd;
|
7
7
|
private elementRef;
|
8
8
|
private quill;
|
9
|
+
private maxLengthSubscription?;
|
10
|
+
private templateReplacerSubscription?;
|
9
11
|
private stateSub;
|
10
12
|
private esc$;
|
11
13
|
private enter$;
|
12
14
|
private maxLength;
|
13
15
|
private breakOnEnter;
|
16
|
+
private allowImages;
|
17
|
+
private quillFormats;
|
14
18
|
private textChangeHandler;
|
15
19
|
private selectionChangeHandler;
|
16
20
|
private bindings;
|
17
|
-
private maxLengthSubscription?;
|
18
21
|
get state(): ToolsState;
|
19
22
|
state$: import("rxjs").Observable<ToolsState>;
|
20
23
|
get listenTextChanges$(): import("rxjs").Observable<string>;
|
@@ -35,6 +38,9 @@ export declare class RichtextWrapper implements RichTextFunctions {
|
|
35
38
|
setRemove(): void;
|
36
39
|
setPlaceholder(placeholder: string): void;
|
37
40
|
setText(text: string): void;
|
41
|
+
getTextWithoutHtmlTags(): string;
|
42
|
+
insertText(index: number, text: string, emitEvent: boolean): void;
|
43
|
+
setShortcutTemplate(key: string, template: string): void;
|
38
44
|
setMaxLength(length: number): void;
|
39
45
|
setDisabledTools(tools: ToolKeys): void;
|
40
46
|
setEditorClass(className: string): void;
|
@@ -44,9 +50,13 @@ export declare class RichtextWrapper implements RichTextFunctions {
|
|
44
50
|
enable(): void;
|
45
51
|
focus(): void;
|
46
52
|
setBreakOnEnter(breakOnEnter: boolean): void;
|
53
|
+
setAllowImages(allowImages: boolean): void;
|
54
|
+
getCurrentCursorPosition(): RangeStatic | null;
|
47
55
|
destroy(): void;
|
48
56
|
private isToolDisabled;
|
49
57
|
private urlMatcher;
|
58
|
+
private imageMatcher;
|
59
|
+
private htmlPanelMatcher;
|
50
60
|
private listenEditorChanges;
|
51
61
|
private update;
|
52
62
|
}
|
@@ -2,7 +2,8 @@ import { ExtendablePanelComponent } from "./extendable-panel/extendable-panel.co
|
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class AccordionComponent {
|
4
4
|
private subscriptions;
|
5
|
+
multiple: boolean;
|
5
6
|
set panels(elements: ExtendablePanelComponent[]);
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "ask-accordion", never, {}, {}, ["panels"], ["ask-extendable-panel"], false, never>;
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "ask-accordion", never, { "multiple": { "alias": "multiple"; "required": false; }; }, {}, ["panels"], ["ask-extendable-panel"], false, never>;
|
8
9
|
}
|
@@ -1,15 +1,20 @@
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
1
|
+
import { ChangeDetectorRef, EventEmitter, TemplateRef } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class ExtendablePanelComponent {
|
4
4
|
private changeRef;
|
5
5
|
isOpen: boolean;
|
6
6
|
id?: number;
|
7
7
|
highlight: boolean;
|
8
|
+
arrowPosition: 'left' | 'right';
|
9
|
+
headerTemplate: TemplateRef<any> | null;
|
10
|
+
panelClass: string;
|
11
|
+
contentGray: boolean;
|
12
|
+
isReply: boolean;
|
8
13
|
closed: EventEmitter<void>;
|
9
14
|
opened: EventEmitter<void>;
|
10
15
|
constructor(changeRef: ChangeDetectorRef);
|
11
16
|
open(): void;
|
12
17
|
close(): void;
|
13
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExtendablePanelComponent, never>;
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ExtendablePanelComponent, "ask-extendable-panel", never, { "highlight": { "alias": "highlight"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; }, never, ["[title]", "[description]", "[content]"], false, never>;
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExtendablePanelComponent, "ask-extendable-panel", never, { "isOpen": { "alias": "isOpen"; "required": false; }; "highlight": { "alias": "highlight"; "required": false; }; "arrowPosition": { "alias": "arrowPosition"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "contentGray": { "alias": "contentGray"; "required": false; }; "isReply": { "alias": "isReply"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; }, never, ["[title]", "[description]", "[content]", "[footer]"], false, never>;
|
15
20
|
}
|
@@ -1,9 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { TemplateRef } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
-
export declare class DropdownContainerComponent
|
3
|
+
export declare class DropdownContainerComponent {
|
4
4
|
content: TemplateRef<any>;
|
5
|
-
constructor();
|
6
|
-
ngOnInit(): void;
|
7
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownContainerComponent, never>;
|
8
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownContainerComponent, "ask-dropdown-container", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, false, never>;
|
9
7
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { ButtonAppearance, ButtonColor } from '../../../directives/button/ask-base-button.directive';
|
2
|
+
import { ModalRef } from '../../../services/modal';
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
export declare class ConfirmationModalComponent {
|
4
5
|
protected modalRef: ModalRef;
|
@@ -6,6 +7,7 @@ export declare class ConfirmationModalComponent {
|
|
6
7
|
protected text: string;
|
7
8
|
protected confirmButtonText: string | undefined;
|
8
9
|
protected cancelButtonText: string | undefined;
|
10
|
+
protected buttons: ButtonConfig[];
|
9
11
|
constructor(modalRef: ModalRef, data: AskModalConfirmData);
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationModalComponent, never>;
|
11
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationModalComponent, "lib-confirmation-modal", never, {}, {}, never, never, false, never>;
|
@@ -13,6 +15,14 @@ export declare class ConfirmationModalComponent {
|
|
13
15
|
export interface AskModalConfirmData {
|
14
16
|
title: string;
|
15
17
|
text: string;
|
18
|
+
buttons?: ButtonConfig[];
|
16
19
|
confirmButtonText?: string;
|
17
20
|
cancelButtonText?: string;
|
18
21
|
}
|
22
|
+
type ButtonConfig = {
|
23
|
+
text: string;
|
24
|
+
appearance?: ButtonAppearance;
|
25
|
+
color: ButtonColor;
|
26
|
+
value: string;
|
27
|
+
};
|
28
|
+
export {};
|
@@ -5,6 +5,7 @@ export interface ComponentType<T> {
|
|
5
5
|
export declare class ModalComponent<T extends ComponentType<T>> {
|
6
6
|
content: T;
|
7
7
|
fullscreen: boolean;
|
8
|
+
scroll: boolean;
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent<any>, never>;
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent<any>, "ask-modal", never, { "content": { "alias": "content"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; }, {}, never, never, false, never>;
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent<any>, "ask-modal", never, { "content": { "alias": "content"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; "scroll": { "alias": "scroll"; "required": false; }; }, {}, never, never, false, never>;
|
10
11
|
}
|
@@ -10,7 +10,7 @@ export type ColumnConfig = {
|
|
10
10
|
width?: string;
|
11
11
|
export?: {
|
12
12
|
hidden?: boolean;
|
13
|
-
type?: 'PERCENTAGE' | 'DATE' | 'STRING' | 'NUMBER';
|
13
|
+
type?: 'PERCENTAGE' | 'DATE' | 'STRING' | 'NUMBER' | 'I18N';
|
14
14
|
};
|
15
15
|
icon?: ColumnConfigIcon;
|
16
16
|
};
|
@@ -31,6 +31,7 @@ export type TableConfig = {
|
|
31
31
|
paginationConfig?: PaginationConfig;
|
32
32
|
hasTotalizer?: boolean;
|
33
33
|
maxHeight?: number;
|
34
|
+
hoverLine?: boolean;
|
34
35
|
};
|
35
36
|
export declare class TableComponent {
|
36
37
|
private _tableConfig;
|
@@ -12,6 +12,7 @@ export declare class AskDropdownDirective implements OnInit {
|
|
12
12
|
dropdownDisabled: boolean;
|
13
13
|
dropdownOpenOnHover: boolean;
|
14
14
|
mouseThreshold: number;
|
15
|
+
openStrategy: 'click' | 'hover';
|
15
16
|
askDropdownOnClose: EventEmitter<any>;
|
16
17
|
private mouseLocation;
|
17
18
|
private _isRendered;
|
@@ -28,6 +29,7 @@ export declare class AskDropdownDirective implements OnInit {
|
|
28
29
|
private getOverlayPosition;
|
29
30
|
private listenOutsideClicks;
|
30
31
|
showOnHoverIn(): void;
|
32
|
+
hideOnHoverOut(): void;
|
31
33
|
show(): void;
|
32
34
|
onMouseMove(event: any): {
|
33
35
|
mouseX: number;
|
@@ -36,5 +38,5 @@ export declare class AskDropdownDirective implements OnInit {
|
|
36
38
|
close(): void;
|
37
39
|
get isRendered(): boolean;
|
38
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<AskDropdownDirective, never>;
|
39
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AskDropdownDirective, "[askDropdown]", never, { "askDropdown": { "alias": "askDropdown"; "required": false; }; "dropdownName": { "alias": "dropdownName"; "required": false; }; "positions": { "alias": "positions"; "required": false; }; "dropdownDisabled": { "alias": "dropdownDisabled"; "required": false; }; "dropdownOpenOnHover": { "alias": "dropdownOpenOnHover"; "required": false; }; "mouseThreshold": { "alias": "mouseThreshold"; "required": false; }; }, { "askDropdownOnClose": "askDropdownOnClose"; }, never, never, false, never>;
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AskDropdownDirective, "[askDropdown]", never, { "askDropdown": { "alias": "askDropdown"; "required": false; }; "dropdownName": { "alias": "dropdownName"; "required": false; }; "positions": { "alias": "positions"; "required": false; }; "dropdownDisabled": { "alias": "dropdownDisabled"; "required": false; }; "dropdownOpenOnHover": { "alias": "dropdownOpenOnHover"; "required": false; }; "mouseThreshold": { "alias": "mouseThreshold"; "required": false; }; "openStrategy": { "alias": "openStrategy"; "required": false; }; }, { "askDropdownOnClose": "askDropdownOnClose"; }, never, never, false, never>;
|
40
42
|
}
|
@@ -1,11 +1,17 @@
|
|
1
|
-
import { ElementRef, OnChanges, SimpleChanges } from
|
1
|
+
import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare abstract class AskBaseButtonDirective implements OnChanges {
|
4
4
|
private el;
|
5
|
-
color:
|
5
|
+
color: ButtonColor;
|
6
|
+
size: ButtonSize;
|
6
7
|
protected constructor(el: ElementRef, className: string);
|
7
8
|
ngOnChanges(changes: SimpleChanges): void;
|
8
9
|
private updateColor;
|
10
|
+
private updateSize;
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AskBaseButtonDirective, never>;
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AskBaseButtonDirective, never, never, { "color": { "alias": "color"; "required": false; }; }, {}, never, never, false, never>;
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AskBaseButtonDirective, never, never, { "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, false, never>;
|
11
13
|
}
|
14
|
+
type ButtonSize = 'x-large' | 'large' | 'default' | 'medium' | 'small' | 'mini';
|
15
|
+
export type ButtonAppearance = 'outline' | 'text' | 'default';
|
16
|
+
export type ButtonColor = 'primary' | 'secondary' | 'danger';
|
17
|
+
export {};
|
@@ -6,3 +6,5 @@ export * from './spinner/spinner.directive';
|
|
6
6
|
export * from './ask-dropdown.directive';
|
7
7
|
export * from './autofocus/autofocus.directive';
|
8
8
|
export * from './richtext-toolbox/richtext-toolbox.directive';
|
9
|
+
export * from './input/input.directive';
|
10
|
+
export * from './list-item/list-item.directive';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class InputDirective {
|
3
|
+
defaultButton: boolean;
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputDirective, never>;
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InputDirective, "input[askInput]", never, {}, {}, never, never, false, never>;
|
6
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class ListItemDirective {
|
3
|
+
listItem: boolean;
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListItemDirective, never>;
|
5
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ListItemDirective, "[askListItem]", never, {}, {}, never, never, false, never>;
|
6
|
+
}
|
@@ -2,6 +2,10 @@ import { EventEmitter, Injector, OnChanges, SimpleChanges } from '@angular/core'
|
|
2
2
|
import { ToolKeys, ToolLayout, ToolsState } from '../../interfaces/richtext-toolbox.interface';
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
type ShortcutTemplate = {
|
6
|
+
key: string;
|
7
|
+
template: string;
|
8
|
+
};
|
5
9
|
export declare class RichtextToolboxDirective implements OnChanges, ControlValueAccessor {
|
6
10
|
private injector;
|
7
11
|
private toolbox?;
|
@@ -17,6 +21,8 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
17
21
|
rtToolbarClass: string;
|
18
22
|
rtEditorClass: string;
|
19
23
|
rtBreakOnEnter: boolean;
|
24
|
+
rtAllowImages: boolean;
|
25
|
+
rtShortcutTemplate?: ShortcutTemplate;
|
20
26
|
inputChange: EventEmitter<string>;
|
21
27
|
inputEnter: EventEmitter<any>;
|
22
28
|
inputEscape: EventEmitter<any>;
|
@@ -31,6 +37,9 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
31
37
|
registerOnChange(fn: any): void;
|
32
38
|
registerOnTouched(fn: any): void;
|
33
39
|
setDisabledState(isDisabled: boolean): void;
|
40
|
+
getCurrentCursorPosition(): import("quill").RangeStatic | null | undefined;
|
41
|
+
getTextWithoutHtmlTags(): string;
|
42
|
+
insertText(index: number, text: string, emitEvent?: boolean): void;
|
34
43
|
private prepareToolbar;
|
35
44
|
private prepareListeners;
|
36
45
|
private update;
|
@@ -38,5 +47,6 @@ export declare class RichtextToolboxDirective implements OnChanges, ControlValue
|
|
38
47
|
private generateToolboxLayout;
|
39
48
|
private getToolbox;
|
40
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<RichtextToolboxDirective, never>;
|
41
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RichtextToolboxDirective, "[askRichtextToolbox]", never, { "rtPlaceholder": { "alias": "rtPlaceholder"; "required": false; }; "rtTools": { "alias": "rtTools"; "required": false; }; "rtDisabledTools": { "alias": "rtDisabledTools"; "required": false; }; "rtType": { "alias": "rtType"; "required": false; }; "rtToolbarOnly": { "alias": "rtToolbarOnly"; "required": false; }; "rtMaxlength": { "alias": "rtMaxlength"; "required": false; }; "rtToolbarClass": { "alias": "rtToolbarClass"; "required": false; }; "rtEditorClass": { "alias": "rtEditorClass"; "required": false; }; "rtBreakOnEnter": { "alias": "rtBreakOnEnter"; "required": false; }; }, { "inputChange": "inputChange"; "inputEnter": "inputEnter"; "inputEscape": "inputEscape"; "inputFocus": "inputFocus"; "toolChange": "toolChange"; }, never, never, false, never>;
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RichtextToolboxDirective, "[askRichtextToolbox]", never, { "rtPlaceholder": { "alias": "rtPlaceholder"; "required": false; }; "rtTools": { "alias": "rtTools"; "required": false; }; "rtDisabledTools": { "alias": "rtDisabledTools"; "required": false; }; "rtType": { "alias": "rtType"; "required": false; }; "rtToolbarOnly": { "alias": "rtToolbarOnly"; "required": false; }; "rtMaxlength": { "alias": "rtMaxlength"; "required": false; }; "rtToolbarClass": { "alias": "rtToolbarClass"; "required": false; }; "rtEditorClass": { "alias": "rtEditorClass"; "required": false; }; "rtBreakOnEnter": { "alias": "rtBreakOnEnter"; "required": false; }; "rtAllowImages": { "alias": "rtAllowImages"; "required": false; }; "rtShortcutTemplate": { "alias": "rtShortcutTemplate"; "required": false; }; }, { "inputChange": "inputChange"; "inputEnter": "inputEnter"; "inputEscape": "inputEscape"; "inputFocus": "inputFocus"; "toolChange": "toolChange"; }, never, never, false, never>;
|
42
51
|
}
|
52
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare let BlockEmbed: any;
|
2
|
+
export declare class HTMLPanelQuillBlot extends BlockEmbed {
|
3
|
+
static blotName: string;
|
4
|
+
static tagName: string;
|
5
|
+
static className: string;
|
6
|
+
static create(html: string): HTMLElement;
|
7
|
+
static value(domNode: HTMLElement): string;
|
8
|
+
}
|
9
|
+
export {};
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { InjectionToken } from
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
2
|
export type ModalConfig = {
|
3
3
|
hasBackdrop?: boolean;
|
4
4
|
onScroll?: 'close' | 'keep';
|
5
5
|
data?: any;
|
6
6
|
fullscreen?: boolean;
|
7
|
+
maxWidth?: number;
|
8
|
+
scroll?: boolean;
|
7
9
|
};
|
8
10
|
export declare const ASK_MODAL_CONFIG: InjectionToken<ModalConfig>;
|
9
11
|
export declare const ASK_MODAL_DATA: InjectionToken<any>;
|
@@ -1,9 +1,9 @@
|
|
1
|
+
import { Overlay } from '@angular/cdk/overlay';
|
1
2
|
import { Injector } from '@angular/core';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import { AskModalConfirmData } from "../../components/modal/confirmation-modal/confirmation-modal.component";
|
3
|
+
import { AskModalConfirmData } from '../../components/modal/confirmation-modal/confirmation-modal.component';
|
4
|
+
import { ComponentType } from '../../components/modal/modal.component';
|
5
|
+
import { ModalRef } from './modal-ref';
|
6
|
+
import { ModalConfig } from './modal.config';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
export declare class ModalService {
|
9
9
|
private overlay;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "asksuite-citrus",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.6.0",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": "^17.3.7",
|
6
6
|
"@angular/core": "^17.3.7",
|
@@ -16,6 +16,9 @@
|
|
16
16
|
"dependencies": {
|
17
17
|
"tslib": "^2.3.0"
|
18
18
|
},
|
19
|
+
"engines": {
|
20
|
+
"node": ">=18"
|
21
|
+
},
|
19
22
|
"module": "fesm2022/asksuite-citrus.mjs",
|
20
23
|
"typings": "index.d.ts",
|
21
24
|
"exports": {
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
Badge
|
4
|
+
*/
|
5
|
+
/* TODO: Remove not used styles or mode to another class */
|
6
|
+
.ask-badge {
|
7
|
+
position: relative;
|
8
|
+
|
9
|
+
> .badge {
|
10
|
+
position: absolute;
|
11
|
+
display: flex;
|
12
|
+
justify-content: center;
|
13
|
+
align-items: center;
|
14
|
+
background-color: var(--bg-color);
|
15
|
+
color: #fff;
|
16
|
+
font-size: 12px;
|
17
|
+
text-overflow: ellipsis;
|
18
|
+
white-space: nowrap;
|
19
|
+
overflow: hidden;
|
20
|
+
border-radius: 50%;
|
21
|
+
box-shadow: 0 2px 6px -1px rgb(0 0 0 / 50%);
|
22
|
+
}
|
23
|
+
|
24
|
+
> .badge.-primary {
|
25
|
+
--bg-color: var(--asksuite-orange);
|
26
|
+
}
|
27
|
+
|
28
|
+
> .badge.-secondary {
|
29
|
+
--bg-color: var(--grey-800);
|
30
|
+
}
|
31
|
+
|
32
|
+
> .badge.-top {
|
33
|
+
top: -10px;
|
34
|
+
}
|
35
|
+
> .badge.-bottom {
|
36
|
+
bottom: -10px;
|
37
|
+
}
|
38
|
+
|
39
|
+
> .badge.-left {
|
40
|
+
left: -10px;
|
41
|
+
}
|
42
|
+
|
43
|
+
> .badge.-right {
|
44
|
+
right: -10px;
|
45
|
+
}
|
46
|
+
|
47
|
+
> .badge.-small {
|
48
|
+
width: 18px;
|
49
|
+
height: 18px;
|
50
|
+
font-size: 10px;
|
51
|
+
}
|
52
|
+
> .badge.-regular {
|
53
|
+
width: 22px;
|
54
|
+
height: 22px;
|
55
|
+
font-size: 11px;
|
56
|
+
}
|
57
|
+
|
58
|
+
> .badge.-large {
|
59
|
+
width: 28px;
|
60
|
+
height: 28px;
|
61
|
+
font-size: 12px;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
package/styles/button.scss
CHANGED
@@ -1,23 +1,47 @@
|
|
1
1
|
@import "./tokens";
|
2
2
|
|
3
3
|
@mixin baseButton {
|
4
|
-
|
4
|
+
display: flex;
|
5
|
+
flex-direction: row;
|
6
|
+
align-items: center;
|
7
|
+
justify-content: center;
|
8
|
+
gap: 4px;
|
9
|
+
padding: 16px 24px;
|
5
10
|
border-radius: $radii-sm;
|
6
11
|
border: none;
|
7
12
|
outline: none;
|
8
|
-
height: 48px;
|
9
13
|
font-size: $font-md;
|
10
14
|
transition: background-color .1s, box-shadow .1s;
|
11
15
|
cursor: pointer;
|
12
16
|
font-weight: $font-weight-medium;
|
13
17
|
color: var(--grey-500);
|
18
|
+
|
19
|
+
&.-x-large {
|
20
|
+
padding: 24px 32px;
|
21
|
+
}
|
22
|
+
|
23
|
+
&.-large {
|
24
|
+
padding: 20px 28px;
|
25
|
+
}
|
26
|
+
|
27
|
+
&.-medium {
|
28
|
+
padding: 12px 20px;
|
29
|
+
}
|
30
|
+
|
31
|
+
&.-small {
|
32
|
+
padding: 8px 16px;
|
33
|
+
}
|
34
|
+
|
35
|
+
&.-mini {
|
36
|
+
padding: 4px 8px;
|
37
|
+
}
|
14
38
|
}
|
15
39
|
|
16
40
|
.ask-button {
|
17
41
|
@include baseButton;
|
18
42
|
background: white;
|
19
43
|
|
20
|
-
&:not(.-primary, .-secondary) {
|
44
|
+
&:not(.-primary, .-secondary, .-danger) {
|
21
45
|
box-shadow: 0 1px 2px 0 rgba(42, 48, 66, 0.16);
|
22
46
|
}
|
23
47
|
|
@@ -36,16 +60,24 @@
|
|
36
60
|
background-color: rgba(#fff,.8);
|
37
61
|
}
|
38
62
|
|
39
|
-
|
40
|
-
|
41
|
-
|
63
|
+
&.-danger:active:not(:disabled) {
|
64
|
+
background-color: rgba($error-red,.8);
|
65
|
+
}
|
66
|
+
|
67
|
+
&.-danger {
|
68
|
+
background: $error-red;
|
69
|
+
color: white;
|
42
70
|
}
|
43
71
|
|
44
|
-
// types
|
45
72
|
&.-primary {
|
46
73
|
background: $asksuite-orange;
|
47
74
|
color: white;
|
48
75
|
}
|
76
|
+
|
77
|
+
&:disabled {
|
78
|
+
cursor: not-allowed;
|
79
|
+
background-color: $grey-300;
|
80
|
+
}
|
49
81
|
}
|
50
82
|
|
51
83
|
.ask-text-button {
|
@@ -57,18 +89,27 @@
|
|
57
89
|
text-decoration: none;
|
58
90
|
background: $grey-50;
|
59
91
|
}
|
60
|
-
&:disabled {
|
61
|
-
cursor: not-allowed;
|
62
|
-
color: $grey-300;
|
63
|
-
}
|
64
92
|
|
65
93
|
&.-primary {
|
66
|
-
|
94
|
+
color: var(--asksuite-orange);
|
67
95
|
}
|
68
96
|
|
69
97
|
&.-secondary {
|
70
98
|
color: $grey-500;
|
71
99
|
}
|
100
|
+
|
101
|
+
&.-danger {
|
102
|
+
color: $error-red;
|
103
|
+
}
|
104
|
+
|
105
|
+
&.-danger:active:not(:disabled) {
|
106
|
+
background-color: rgba($error-red, .1);
|
107
|
+
}
|
108
|
+
|
109
|
+
&:disabled {
|
110
|
+
cursor: not-allowed;
|
111
|
+
color: $grey-300;
|
112
|
+
}
|
72
113
|
}
|
73
114
|
|
74
115
|
.ask-stroked-button {
|
@@ -86,18 +127,26 @@
|
|
86
127
|
color: $grey-500;
|
87
128
|
}
|
88
129
|
|
89
|
-
|
90
|
-
|
91
|
-
border-color: $
|
92
|
-
color: $grey-300;
|
130
|
+
&.-danger {
|
131
|
+
color: $error-red;
|
132
|
+
border-color: $error-red;
|
93
133
|
}
|
94
134
|
|
95
135
|
&.-primary:active:not(:disabled) {
|
96
136
|
background-color: rgba($asksuite-orange, .1);
|
97
137
|
}
|
98
138
|
|
139
|
+
&.-danger:active:not(:disabled) {
|
140
|
+
background-color: rgba($error-red, .1);
|
141
|
+
}
|
142
|
+
|
99
143
|
&.-secondary:active:not(:disabled) {
|
100
144
|
background-color: rgba($grey-300, .8);
|
101
145
|
}
|
102
146
|
|
147
|
+
&:disabled {
|
148
|
+
cursor: not-allowed;
|
149
|
+
border-color: $grey-300;
|
150
|
+
color: $grey-300;
|
151
|
+
}
|
103
152
|
}
|