@eduboxpro/studio 0.1.32 → 0.1.33
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 +50 -2
- package/fesm2022/eduboxpro-studio.mjs.map +1 -1
- package/index.d.ts +16 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, signal, effect, Injectable, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, input, computed, ChangeDetectionStrategy, Component, output, PLATFORM_ID, ElementRef, contentChild, viewChild, forwardRef, DOCUMENT as DOCUMENT$1, DestroyRef, Injector, model, afterNextRender, HostListener, Renderer2, TemplateRef, ContentChild, Input, Directive, contentChildren } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, signal, effect, Injectable, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, input, computed, ChangeDetectionStrategy, Component, untracked, output, PLATFORM_ID, ElementRef, contentChild, viewChild, forwardRef, DOCUMENT as DOCUMENT$1, DestroyRef, Injector, model, afterNextRender, HostListener, Renderer2, TemplateRef, ContentChild, Input, Directive, contentChildren } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import * as LucideIcons from 'lucide-angular';
|
|
@@ -630,6 +630,54 @@ function withConfigDefault(inputSignal, configSignal, defaultValue) {
|
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
+
class SignalStore {
|
|
634
|
+
state;
|
|
635
|
+
constructor(initialState) {
|
|
636
|
+
this.state = signal(initialState, ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
637
|
+
}
|
|
638
|
+
get$() {
|
|
639
|
+
return this.state.asReadonly();
|
|
640
|
+
}
|
|
641
|
+
snapshot() {
|
|
642
|
+
return this.state();
|
|
643
|
+
}
|
|
644
|
+
setState(newState) {
|
|
645
|
+
this.state.set(newState);
|
|
646
|
+
}
|
|
647
|
+
updateState(updateFn) {
|
|
648
|
+
this.state.update(updateFn);
|
|
649
|
+
}
|
|
650
|
+
patchState(partial) {
|
|
651
|
+
this.state.update(state => ({ ...state, ...partial }));
|
|
652
|
+
}
|
|
653
|
+
resetState(initialState) {
|
|
654
|
+
this.setState(initialState);
|
|
655
|
+
}
|
|
656
|
+
select(selector) {
|
|
657
|
+
return computed(() => selector(this.state()));
|
|
658
|
+
}
|
|
659
|
+
onStateChange(callback) {
|
|
660
|
+
effect(() => callback(this.state()));
|
|
661
|
+
}
|
|
662
|
+
onStateChangeWithPrevious(callback) {
|
|
663
|
+
let previous = untracked(() => this.state());
|
|
664
|
+
effect(() => {
|
|
665
|
+
const current = this.state();
|
|
666
|
+
callback(current, previous);
|
|
667
|
+
previous = current;
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
batchUpdate(updates) {
|
|
671
|
+
this.updateState(state => {
|
|
672
|
+
let newState = { ...state };
|
|
673
|
+
updates.forEach(update => {
|
|
674
|
+
newState = { ...newState, ...update };
|
|
675
|
+
});
|
|
676
|
+
return newState;
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
633
681
|
/**
|
|
634
682
|
* @eduboxpro/studio - Utilities
|
|
635
683
|
*
|
|
@@ -7921,5 +7969,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
7921
7969
|
* Generated bundle index. Do not edit.
|
|
7922
7970
|
*/
|
|
7923
7971
|
|
|
7924
|
-
export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, ConfirmDialogComponent, ConfirmDialogService, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, ToastComponent, ToastService, TooltipComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
|
|
7972
|
+
export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, ConfirmDialogComponent, ConfirmDialogService, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, SignalStore, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, ToastComponent, ToastService, TooltipComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
|
|
7925
7973
|
//# sourceMappingURL=eduboxpro-studio.mjs.map
|