@eduboxpro/studio 0.1.9 → 0.1.10
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/eduboxpro-studio.mjs +433 -3
- package/fesm2022/eduboxpro-studio.mjs.map +1 -1
- package/index.d.ts +199 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, EnvironmentProviders, ElementRef, Signal } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders, TemplateRef, ElementRef, WritableSignal, Signal } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
4
4
|
import { icons } from 'lucide-angular';
|
|
5
5
|
|
|
@@ -231,6 +231,31 @@ interface SelectDefaultsConfig {
|
|
|
231
231
|
maxHeight?: string;
|
|
232
232
|
position?: 'auto' | 'top' | 'bottom';
|
|
233
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* Drawer component defaults configuration
|
|
236
|
+
*/
|
|
237
|
+
interface DrawerDefaultsConfig {
|
|
238
|
+
position?: 'left' | 'right' | 'top' | 'bottom';
|
|
239
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
240
|
+
modal?: boolean;
|
|
241
|
+
closeOnEscape?: boolean;
|
|
242
|
+
closeOnBackdropClick?: boolean;
|
|
243
|
+
showHeader?: boolean;
|
|
244
|
+
showCloseButton?: boolean;
|
|
245
|
+
closeButtonPosition?: 'left' | 'right';
|
|
246
|
+
swipeToClose?: boolean;
|
|
247
|
+
swipeThreshold?: number;
|
|
248
|
+
animationDuration?: number;
|
|
249
|
+
animationEasing?: 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
|
|
250
|
+
disableAnimation?: boolean;
|
|
251
|
+
shadow?: boolean;
|
|
252
|
+
shadowSize?: 'sm' | 'md' | 'lg' | 'xl';
|
|
253
|
+
radius?: 'none' | 'sm' | 'md' | 'lg';
|
|
254
|
+
autoFocus?: boolean;
|
|
255
|
+
restoreFocus?: boolean;
|
|
256
|
+
blockScroll?: boolean;
|
|
257
|
+
role?: 'dialog' | 'alertdialog';
|
|
258
|
+
}
|
|
234
259
|
/**
|
|
235
260
|
* Components defaults configuration
|
|
236
261
|
*/
|
|
@@ -244,6 +269,7 @@ interface ComponentsConfig {
|
|
|
244
269
|
buttonGroup?: ButtonGroupDefaultsConfig;
|
|
245
270
|
buttonToggleGroup?: ButtonToggleGroupDefaultsConfig;
|
|
246
271
|
select?: SelectDefaultsConfig;
|
|
272
|
+
drawer?: DrawerDefaultsConfig;
|
|
247
273
|
}
|
|
248
274
|
/**
|
|
249
275
|
* Main Studio configuration interface
|
|
@@ -574,6 +600,176 @@ type CheckboxColor = 'primary' | 'secondary' | 'success' | 'error';
|
|
|
574
600
|
type CheckboxVariant = 'default' | 'outlined' | 'filled';
|
|
575
601
|
type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
576
602
|
|
|
603
|
+
type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
604
|
+
type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
605
|
+
type DrawerRadius = 'none' | 'sm' | 'md' | 'lg';
|
|
606
|
+
type DrawerShadowSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
607
|
+
type DrawerRole = 'dialog' | 'alertdialog';
|
|
608
|
+
type DrawerAnimationEasing = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';
|
|
609
|
+
type DrawerCloseButtonPosition = 'left' | 'right';
|
|
610
|
+
interface DrawerConfig {
|
|
611
|
+
position?: DrawerPosition;
|
|
612
|
+
size?: DrawerSize;
|
|
613
|
+
modal?: boolean;
|
|
614
|
+
closeOnEscape?: boolean;
|
|
615
|
+
closeOnBackdropClick?: boolean;
|
|
616
|
+
showCloseButton?: boolean;
|
|
617
|
+
closeButtonPosition?: DrawerCloseButtonPosition;
|
|
618
|
+
swipeToClose?: boolean;
|
|
619
|
+
swipeThreshold?: number;
|
|
620
|
+
animationDuration?: number;
|
|
621
|
+
animationEasing?: DrawerAnimationEasing;
|
|
622
|
+
disableAnimation?: boolean;
|
|
623
|
+
shadow?: boolean;
|
|
624
|
+
shadowSize?: DrawerShadowSize;
|
|
625
|
+
radius?: DrawerRadius;
|
|
626
|
+
autoFocus?: boolean;
|
|
627
|
+
restoreFocus?: boolean;
|
|
628
|
+
blockScroll?: boolean;
|
|
629
|
+
role?: DrawerRole;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
declare class DrawerComponent {
|
|
633
|
+
private readonly document;
|
|
634
|
+
private readonly destroyRef;
|
|
635
|
+
private readonly configService;
|
|
636
|
+
private readonly drawerService;
|
|
637
|
+
private readonly drawerDefaults;
|
|
638
|
+
protected readonly headerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
639
|
+
protected readonly footerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
640
|
+
protected readonly panelEl: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
641
|
+
id: _angular_core.InputSignal<string>;
|
|
642
|
+
visible: _angular_core.ModelSignal<boolean>;
|
|
643
|
+
positionInput: _angular_core.InputSignal<DrawerPosition | undefined>;
|
|
644
|
+
sizeInput: _angular_core.InputSignal<DrawerSize | undefined>;
|
|
645
|
+
customWidth: _angular_core.InputSignal<string | undefined>;
|
|
646
|
+
customHeight: _angular_core.InputSignal<string | undefined>;
|
|
647
|
+
position: _angular_core.Signal<"left" | "right" | "top" | "bottom">;
|
|
648
|
+
size: _angular_core.Signal<"sm" | "md" | "lg" | "xl" | "full">;
|
|
649
|
+
modalInput: _angular_core.InputSignal<boolean | undefined>;
|
|
650
|
+
closeOnEscapeInput: _angular_core.InputSignal<boolean | undefined>;
|
|
651
|
+
closeOnBackdropClickInput: _angular_core.InputSignal<boolean | undefined>;
|
|
652
|
+
blockScrollInput: _angular_core.InputSignal<boolean | undefined>;
|
|
653
|
+
modal: _angular_core.Signal<boolean>;
|
|
654
|
+
closeOnEscape: _angular_core.Signal<boolean>;
|
|
655
|
+
closeOnBackdropClick: _angular_core.Signal<boolean>;
|
|
656
|
+
blockScroll: _angular_core.Signal<boolean>;
|
|
657
|
+
header: _angular_core.InputSignal<string | undefined>;
|
|
658
|
+
showHeaderInput: _angular_core.InputSignal<boolean | undefined>;
|
|
659
|
+
showCloseButtonInput: _angular_core.InputSignal<boolean | undefined>;
|
|
660
|
+
closeButtonPositionInput: _angular_core.InputSignal<DrawerCloseButtonPosition | undefined>;
|
|
661
|
+
showFooter: _angular_core.InputSignal<boolean>;
|
|
662
|
+
showHeader: _angular_core.Signal<boolean>;
|
|
663
|
+
showCloseButton: _angular_core.Signal<boolean>;
|
|
664
|
+
closeButtonPosition: _angular_core.Signal<"left" | "right">;
|
|
665
|
+
swipeToCloseInput: _angular_core.InputSignal<boolean | undefined>;
|
|
666
|
+
swipeThresholdInput: _angular_core.InputSignal<number | undefined>;
|
|
667
|
+
swipeToClose: _angular_core.Signal<boolean>;
|
|
668
|
+
swipeThreshold: _angular_core.Signal<number>;
|
|
669
|
+
animationDurationInput: _angular_core.InputSignal<number | undefined>;
|
|
670
|
+
animationEasingInput: _angular_core.InputSignal<DrawerAnimationEasing | undefined>;
|
|
671
|
+
disableAnimationInput: _angular_core.InputSignal<boolean | undefined>;
|
|
672
|
+
animationDuration: _angular_core.Signal<number>;
|
|
673
|
+
animationEasing: _angular_core.Signal<"ease" | "ease-in" | "ease-out" | "ease-in-out">;
|
|
674
|
+
disableAnimation: _angular_core.Signal<boolean>;
|
|
675
|
+
radiusInput: _angular_core.InputSignal<DrawerRadius | undefined>;
|
|
676
|
+
shadowInput: _angular_core.InputSignal<boolean | undefined>;
|
|
677
|
+
shadowSizeInput: _angular_core.InputSignal<DrawerShadowSize | undefined>;
|
|
678
|
+
radius: _angular_core.Signal<"sm" | "md" | "lg" | "none">;
|
|
679
|
+
shadow: _angular_core.Signal<boolean>;
|
|
680
|
+
shadowSize: _angular_core.Signal<"sm" | "md" | "lg" | "xl">;
|
|
681
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
682
|
+
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
683
|
+
ariaDescribedBy: _angular_core.InputSignal<string | undefined>;
|
|
684
|
+
autoFocusInput: _angular_core.InputSignal<boolean | undefined>;
|
|
685
|
+
restoreFocusInput: _angular_core.InputSignal<boolean | undefined>;
|
|
686
|
+
roleInput: _angular_core.InputSignal<DrawerRole | undefined>;
|
|
687
|
+
autoFocus: _angular_core.Signal<boolean>;
|
|
688
|
+
restoreFocus: _angular_core.Signal<boolean>;
|
|
689
|
+
role: _angular_core.Signal<"dialog" | "alertdialog">;
|
|
690
|
+
visibleChange: _angular_core.OutputEmitterRef<boolean>;
|
|
691
|
+
opened: _angular_core.OutputEmitterRef<void>;
|
|
692
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
693
|
+
backdropClick: _angular_core.OutputEmitterRef<void>;
|
|
694
|
+
private previousActiveElement?;
|
|
695
|
+
private touchStartX;
|
|
696
|
+
private touchStartY;
|
|
697
|
+
private isDragging;
|
|
698
|
+
private scrollbarWidth;
|
|
699
|
+
protected hostClasses: _angular_core.Signal<string>;
|
|
700
|
+
constructor();
|
|
701
|
+
protected handleOpen(): void;
|
|
702
|
+
protected handleClose(): void;
|
|
703
|
+
open(): void;
|
|
704
|
+
close(): void;
|
|
705
|
+
toggle(): void;
|
|
706
|
+
protected handleBackdropClick(): void;
|
|
707
|
+
protected handleEscapeKey(event: KeyboardEvent): void;
|
|
708
|
+
protected onTouchStart(event: TouchEvent): void;
|
|
709
|
+
protected onTouchMove(event: TouchEvent): void;
|
|
710
|
+
protected onTouchEnd(event: TouchEvent): void;
|
|
711
|
+
private applyDragTransform;
|
|
712
|
+
private resetTransform;
|
|
713
|
+
private lockBodyScroll;
|
|
714
|
+
private unlockBodyScroll;
|
|
715
|
+
private setupFocusTrap;
|
|
716
|
+
private restorePreviousFocus;
|
|
717
|
+
private getFirstFocusableElement;
|
|
718
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
719
|
+
private trapFocus;
|
|
720
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerComponent, never>;
|
|
721
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent, "studio-drawer", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "positionInput": { "alias": "position"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "customWidth": { "alias": "customWidth"; "required": false; "isSignal": true; }; "customHeight": { "alias": "customHeight"; "required": false; "isSignal": true; }; "modalInput": { "alias": "modal"; "required": false; "isSignal": true; }; "closeOnEscapeInput": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnBackdropClickInput": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "blockScrollInput": { "alias": "blockScroll"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "showHeaderInput": { "alias": "showHeader"; "required": false; "isSignal": true; }; "showCloseButtonInput": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeButtonPositionInput": { "alias": "closeButtonPosition"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "swipeToCloseInput": { "alias": "swipeToClose"; "required": false; "isSignal": true; }; "swipeThresholdInput": { "alias": "swipeThreshold"; "required": false; "isSignal": true; }; "animationDurationInput": { "alias": "animationDuration"; "required": false; "isSignal": true; }; "animationEasingInput": { "alias": "animationEasing"; "required": false; "isSignal": true; }; "disableAnimationInput": { "alias": "disableAnimation"; "required": false; "isSignal": true; }; "radiusInput": { "alias": "radius"; "required": false; "isSignal": true; }; "shadowInput": { "alias": "shadow"; "required": false; "isSignal": true; }; "shadowSizeInput": { "alias": "shadowSize"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "autoFocusInput": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "restoreFocusInput": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "roleInput": { "alias": "role"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "visibleChange": "visibleChange"; "opened": "opened"; "closed": "closed"; "backdropClick": "backdropClick"; }, ["headerTemplate", "footerTemplate"], ["[drawerHeader]", "*", "[drawerFooter]"], true, never>;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Service for programmatic control of Drawer components
|
|
726
|
+
*
|
|
727
|
+
* @example
|
|
728
|
+
* ```typescript
|
|
729
|
+
* // In component
|
|
730
|
+
* private drawerService = inject(DrawerService);
|
|
731
|
+
*
|
|
732
|
+
* openSettings() {
|
|
733
|
+
* this.drawerService.open('settings-drawer');
|
|
734
|
+
* }
|
|
735
|
+
* ```
|
|
736
|
+
*/
|
|
737
|
+
declare class DrawerService {
|
|
738
|
+
private drawers;
|
|
739
|
+
/**
|
|
740
|
+
* Register a drawer with the service
|
|
741
|
+
* Called automatically by DrawerComponent
|
|
742
|
+
*/
|
|
743
|
+
register(id: string, signal: WritableSignal<boolean>): void;
|
|
744
|
+
/**
|
|
745
|
+
* Unregister a drawer from the service
|
|
746
|
+
* Called automatically on component destroy
|
|
747
|
+
*/
|
|
748
|
+
unregister(id: string): void;
|
|
749
|
+
/**
|
|
750
|
+
* Open a drawer by ID
|
|
751
|
+
*/
|
|
752
|
+
open(id: string): void;
|
|
753
|
+
/**
|
|
754
|
+
* Close a drawer by ID
|
|
755
|
+
*/
|
|
756
|
+
close(id: string): void;
|
|
757
|
+
/**
|
|
758
|
+
* Toggle a drawer by ID
|
|
759
|
+
*/
|
|
760
|
+
toggle(id: string): void;
|
|
761
|
+
/**
|
|
762
|
+
* Close all registered drawers
|
|
763
|
+
*/
|
|
764
|
+
closeAll(): void;
|
|
765
|
+
/**
|
|
766
|
+
* Check if a drawer is open
|
|
767
|
+
*/
|
|
768
|
+
isOpen(id: string): boolean;
|
|
769
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerService, never>;
|
|
770
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DrawerService>;
|
|
771
|
+
}
|
|
772
|
+
|
|
577
773
|
/**
|
|
578
774
|
* Icon component with Lucide icons support
|
|
579
775
|
*
|
|
@@ -1296,5 +1492,5 @@ declare function loadGoogleFonts(fonts: Array<{
|
|
|
1296
1492
|
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
1297
1493
|
}>): void;
|
|
1298
1494
|
|
|
1299
|
-
export { BadgeComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, CheckboxComponent, IconComponent, InputComponent, MASK_PRESETS, MaskDirective, MaskEngine, STUDIO_CONFIG, SelectComponent, StudioConfigService, SwitchComponent, TextareaComponent, ThemeSwitchComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
|
|
1300
|
-
export type { BadgeDefaultsConfig, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ComponentsConfig, InputDefaultsConfig, InputMode, InputType, MaskConfig, MaskPreset, MaskResult, MaskToken, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode };
|
|
1495
|
+
export { BadgeComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, CheckboxComponent, DrawerComponent, DrawerService, IconComponent, InputComponent, MASK_PRESETS, MaskDirective, MaskEngine, STUDIO_CONFIG, SelectComponent, StudioConfigService, SwitchComponent, TextareaComponent, ThemeSwitchComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
|
|
1496
|
+
export type { BadgeDefaultsConfig, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ComponentsConfig, DrawerAnimationEasing, DrawerCloseButtonPosition, DrawerConfig, DrawerDefaultsConfig, DrawerPosition, DrawerRadius, DrawerRole, DrawerShadowSize, DrawerSize, InputDefaultsConfig, InputMode, InputType, MaskConfig, MaskPreset, MaskResult, MaskToken, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode };
|