@kupola/kupola 1.5.2 → 1.5.4

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.
@@ -697,6 +697,141 @@ declare function createModal(options?: Record<string, unknown>): Modal;
697
697
  declare function confirmModal(options: Record<string, unknown> | string): Modal;
698
698
  declare function alertModal(options: Record<string, unknown> | string): Modal;
699
699
 
700
+ // ============================================================
701
+ // Configuration API
702
+ // ============================================================
703
+
704
+ interface KupolaPathsConfig {
705
+ icons: string;
706
+ base: string;
707
+ }
708
+
709
+ interface KupolaThemeConfig {
710
+ default: ThemeType;
711
+ brand: BrandColor;
712
+ }
713
+
714
+ interface KupolaI18nConfig {
715
+ locale: string;
716
+ fallbackLocale: string;
717
+ }
718
+
719
+ interface KupolaHttpConfig {
720
+ baseURL: string;
721
+ timeout: number;
722
+ headers: Record<string, string>;
723
+ withCredentials: boolean;
724
+ }
725
+
726
+ interface KupolaUiModalConfig {
727
+ backdropClick: boolean;
728
+ }
729
+
730
+ interface KupolaUiDropdownConfig {
731
+ closeOnClick: boolean;
732
+ }
733
+
734
+ interface KupolaUiDatepickerConfig {
735
+ weekStart: number;
736
+ }
737
+
738
+ interface KupolaUiTooltipConfig {
739
+ delay: number;
740
+ }
741
+
742
+ interface KupolaUiConfig {
743
+ defaultSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
744
+ modal: KupolaUiModalConfig;
745
+ dropdown: KupolaUiDropdownConfig;
746
+ datepicker: KupolaUiDatepickerConfig;
747
+ tooltip: KupolaUiTooltipConfig;
748
+ }
749
+
750
+ interface KupolaPerformanceConfig {
751
+ lazyLoad: boolean;
752
+ debounceDelay: number;
753
+ throttleDelay: number;
754
+ animationEnabled: boolean;
755
+ }
756
+
757
+ interface KupolaSecuritySanitizeConfig {
758
+ enabled: boolean;
759
+ allowedTags: string[];
760
+ allowedAttributes: Record<string, string[]>;
761
+ }
762
+
763
+ interface KupolaSecurityMaskPattern {
764
+ regex: string;
765
+ replace: string;
766
+ }
767
+
768
+ interface KupolaSecurityMaskConfig {
769
+ enabled: boolean;
770
+ patterns: Record<string, KupolaSecurityMaskPattern>;
771
+ }
772
+
773
+ interface KupolaSecuritySecureIdConfig {
774
+ length: number;
775
+ charset: string;
776
+ }
777
+
778
+ interface KupolaSecurityConfig {
779
+ xssProtection: boolean;
780
+ sanitizeHtml: KupolaSecuritySanitizeConfig;
781
+ maskData: KupolaSecurityMaskConfig;
782
+ secureId: KupolaSecuritySecureIdConfig;
783
+ }
784
+
785
+ interface KupolaMessageConfig {
786
+ duration: number;
787
+ position: 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
788
+ maxCount: number;
789
+ }
790
+
791
+ interface KupolaNotificationConfig {
792
+ duration: number;
793
+ position: 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
794
+ }
795
+
796
+ interface KupolaValidationConfig {
797
+ defaultRules: string[];
798
+ showErrors: boolean;
799
+ trigger: 'blur' | 'input' | 'both';
800
+ }
801
+
802
+ interface KupolaComponentsConfig {
803
+ autoInit: boolean;
804
+ silentErrors: boolean;
805
+ }
806
+
807
+ interface KupolaConfig {
808
+ paths: KupolaPathsConfig;
809
+ theme: KupolaThemeConfig;
810
+ i18n: KupolaI18nConfig;
811
+ http: KupolaHttpConfig;
812
+ ui: KupolaUiConfig;
813
+ performance: KupolaPerformanceConfig;
814
+ security: KupolaSecurityConfig;
815
+ message: KupolaMessageConfig;
816
+ notification: KupolaNotificationConfig;
817
+ validation: KupolaValidationConfig;
818
+ components: KupolaComponentsConfig;
819
+ }
820
+
821
+ declare function setConfig(options: Partial<KupolaConfig>): void;
822
+ declare function getConfig(key?: string): KupolaConfig | unknown;
823
+ declare function getIconsPath(): string;
824
+ declare function getBasePath(): string;
825
+ declare function getDefaultTheme(): ThemeType;
826
+ declare function getDefaultBrand(): BrandColor;
827
+ declare function getHttpConfig(): KupolaHttpConfig;
828
+ declare function getUiConfig(): KupolaUiConfig;
829
+ declare function getSecurityConfig(): KupolaSecurityConfig;
830
+ declare function getPerformanceConfig(): KupolaPerformanceConfig;
831
+ declare function getMessageConfig(): KupolaMessageConfig;
832
+ declare function getNotificationConfig(): KupolaNotificationConfig;
833
+ declare function getValidationConfig(): KupolaValidationConfig;
834
+
700
835
  declare function cleanupAllDropdowns(): void;
701
836
  declare function cleanupAllSlideCaptchas(): void;
702
837