@spw-ds/spw-angular-library 1.5.4-alpha.0 → 1.5.6-alpha.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.
@@ -2508,7 +2508,7 @@ class TextValueAccessor extends ValueAccessor {
2508
2508
  super(el);
2509
2509
  }
2510
2510
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TextValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2511
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TextValueAccessor, isStandalone: true, selector: "spw-text-field[type=text]", host: { listeners: { "valueChanged": "handleChangeEvent($event.target.value)" } }, providers: [
2511
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TextValueAccessor, isStandalone: true, selector: "spw-text-field:not([type=number]), spw-textarea, spw-select, spw-custom-select, spw-search-field", host: { listeners: { "valueChanged": "handleChangeEvent($event.target.value)" } }, providers: [
2512
2512
  {
2513
2513
  provide: NG_VALUE_ACCESSOR,
2514
2514
  useExisting: TextValueAccessor,
@@ -2520,7 +2520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
2520
2520
  type: Directive,
2521
2521
  args: [{
2522
2522
  /* tslint:disable-next-line:directive-selector */
2523
- selector: 'spw-text-field[type=text]',
2523
+ selector: 'spw-text-field:not([type=number]), spw-textarea, spw-select, spw-custom-select, spw-search-field',
2524
2524
  host: {
2525
2525
  '(valueChanged)': 'handleChangeEvent($event.target.value)'
2526
2526
  },
@@ -2669,9 +2669,245 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
2669
2669
  args: ['focusout']
2670
2670
  }] } });
2671
2671
 
2672
+ class CheckboxValueAccessor {
2673
+ constructor(el) {
2674
+ this.el = el;
2675
+ this.onChange = () => { };
2676
+ this.onTouched = () => { };
2677
+ this.lastValue = false;
2678
+ }
2679
+ writeValue(value) {
2680
+ this.el.nativeElement.checked = this.lastValue = value ?? false;
2681
+ }
2682
+ handleChange(event) {
2683
+ const value = event.detail;
2684
+ if (value !== this.lastValue) {
2685
+ this.lastValue = value;
2686
+ this.onChange(value);
2687
+ }
2688
+ }
2689
+ handleBlurEvent() {
2690
+ this.onTouched();
2691
+ }
2692
+ registerOnChange(fn) {
2693
+ this.onChange = fn;
2694
+ }
2695
+ registerOnTouched(fn) {
2696
+ this.onTouched = fn;
2697
+ }
2698
+ setDisabledState(isDisabled) {
2699
+ this.el.nativeElement.disabled = isDisabled;
2700
+ }
2701
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CheckboxValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2702
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: CheckboxValueAccessor, isStandalone: true, selector: "spw-checkbox", host: { listeners: { "spwChange": "handleChange($event)", "focusout": "handleBlurEvent()" } }, providers: [
2703
+ {
2704
+ provide: NG_VALUE_ACCESSOR,
2705
+ useExisting: CheckboxValueAccessor,
2706
+ multi: true,
2707
+ },
2708
+ ], ngImport: i0 }); }
2709
+ }
2710
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CheckboxValueAccessor, decorators: [{
2711
+ type: Directive,
2712
+ args: [{
2713
+ selector: 'spw-checkbox',
2714
+ providers: [
2715
+ {
2716
+ provide: NG_VALUE_ACCESSOR,
2717
+ useExisting: CheckboxValueAccessor,
2718
+ multi: true,
2719
+ },
2720
+ ],
2721
+ standalone: true,
2722
+ }]
2723
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleChange: [{
2724
+ type: HostListener,
2725
+ args: ['spwChange', ['$event']]
2726
+ }], handleBlurEvent: [{
2727
+ type: HostListener,
2728
+ args: ['focusout']
2729
+ }] } });
2730
+
2731
+ class RadioValueAccessor {
2732
+ constructor(el) {
2733
+ this.el = el;
2734
+ this.onChange = () => { };
2735
+ this.onTouched = () => { };
2736
+ this.lastValue = false;
2737
+ }
2738
+ writeValue(value) {
2739
+ this.el.nativeElement.checked = this.lastValue = value ?? false;
2740
+ }
2741
+ handleChange(event) {
2742
+ const value = event.detail;
2743
+ if (value !== this.lastValue) {
2744
+ this.lastValue = value;
2745
+ this.onChange(value);
2746
+ }
2747
+ }
2748
+ handleBlurEvent() {
2749
+ this.onTouched();
2750
+ }
2751
+ registerOnChange(fn) {
2752
+ this.onChange = fn;
2753
+ }
2754
+ registerOnTouched(fn) {
2755
+ this.onTouched = fn;
2756
+ }
2757
+ setDisabledState(isDisabled) {
2758
+ this.el.nativeElement.disabled = isDisabled;
2759
+ }
2760
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: RadioValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2761
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: RadioValueAccessor, isStandalone: true, selector: "spw-radio", host: { listeners: { "spwChange": "handleChange($event)", "focusout": "handleBlurEvent()" } }, providers: [
2762
+ {
2763
+ provide: NG_VALUE_ACCESSOR,
2764
+ useExisting: RadioValueAccessor,
2765
+ multi: true,
2766
+ },
2767
+ ], ngImport: i0 }); }
2768
+ }
2769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: RadioValueAccessor, decorators: [{
2770
+ type: Directive,
2771
+ args: [{
2772
+ selector: 'spw-radio',
2773
+ providers: [
2774
+ {
2775
+ provide: NG_VALUE_ACCESSOR,
2776
+ useExisting: RadioValueAccessor,
2777
+ multi: true,
2778
+ },
2779
+ ],
2780
+ standalone: true,
2781
+ }]
2782
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleChange: [{
2783
+ type: HostListener,
2784
+ args: ['spwChange', ['$event']]
2785
+ }], handleBlurEvent: [{
2786
+ type: HostListener,
2787
+ args: ['focusout']
2788
+ }] } });
2789
+
2790
+ class DatePickerValueAccessor {
2791
+ constructor(el) {
2792
+ this.el = el;
2793
+ this.onChange = () => { };
2794
+ this.onTouched = () => { };
2795
+ this.lastValue = '';
2796
+ }
2797
+ writeValue(value) {
2798
+ this.el.nativeElement.value = this.lastValue = value ?? '';
2799
+ }
2800
+ handleChange(event) {
2801
+ const value = event.detail;
2802
+ if (value !== this.lastValue) {
2803
+ this.lastValue = value;
2804
+ this.onChange(value);
2805
+ }
2806
+ }
2807
+ handleBlurEvent() {
2808
+ this.onTouched();
2809
+ }
2810
+ registerOnChange(fn) {
2811
+ this.onChange = fn;
2812
+ }
2813
+ registerOnTouched(fn) {
2814
+ this.onTouched = fn;
2815
+ }
2816
+ setDisabledState(isDisabled) {
2817
+ this.el.nativeElement.disabled = isDisabled;
2818
+ }
2819
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatePickerValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2820
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: DatePickerValueAccessor, isStandalone: true, selector: "spw-date-picker", host: { listeners: { "dateChange": "handleChange($event)", "focusout": "handleBlurEvent()" } }, providers: [
2821
+ {
2822
+ provide: NG_VALUE_ACCESSOR,
2823
+ useExisting: DatePickerValueAccessor,
2824
+ multi: true,
2825
+ },
2826
+ ], ngImport: i0 }); }
2827
+ }
2828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatePickerValueAccessor, decorators: [{
2829
+ type: Directive,
2830
+ args: [{
2831
+ selector: 'spw-date-picker',
2832
+ providers: [
2833
+ {
2834
+ provide: NG_VALUE_ACCESSOR,
2835
+ useExisting: DatePickerValueAccessor,
2836
+ multi: true,
2837
+ },
2838
+ ],
2839
+ standalone: true,
2840
+ }]
2841
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleChange: [{
2842
+ type: HostListener,
2843
+ args: ['dateChange', ['$event']]
2844
+ }], handleBlurEvent: [{
2845
+ type: HostListener,
2846
+ args: ['focusout']
2847
+ }] } });
2848
+
2849
+ class InputSliderValueAccessor {
2850
+ constructor(el) {
2851
+ this.el = el;
2852
+ this.onChange = () => { };
2853
+ this.onTouched = () => { };
2854
+ this.lastValue = 0;
2855
+ }
2856
+ writeValue(value) {
2857
+ this.el.nativeElement.value = this.lastValue = value ?? 0;
2858
+ }
2859
+ handleChange(event) {
2860
+ const value = event.detail;
2861
+ if (JSON.stringify(value) !== JSON.stringify(this.lastValue)) {
2862
+ this.lastValue = value;
2863
+ this.onChange(value);
2864
+ }
2865
+ }
2866
+ handleBlurEvent() {
2867
+ this.onTouched();
2868
+ }
2869
+ registerOnChange(fn) {
2870
+ this.onChange = fn;
2871
+ }
2872
+ registerOnTouched(fn) {
2873
+ this.onTouched = fn;
2874
+ }
2875
+ setDisabledState(isDisabled) {
2876
+ this.el.nativeElement.disabled = isDisabled;
2877
+ }
2878
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: InputSliderValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2879
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: InputSliderValueAccessor, isStandalone: true, selector: "spw-input-slider", host: { listeners: { "valueChange": "handleChange($event)", "focusout": "handleBlurEvent()" } }, providers: [
2880
+ {
2881
+ provide: NG_VALUE_ACCESSOR,
2882
+ useExisting: InputSliderValueAccessor,
2883
+ multi: true,
2884
+ },
2885
+ ], ngImport: i0 }); }
2886
+ }
2887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: InputSliderValueAccessor, decorators: [{
2888
+ type: Directive,
2889
+ args: [{
2890
+ selector: 'spw-input-slider',
2891
+ providers: [
2892
+ {
2893
+ provide: NG_VALUE_ACCESSOR,
2894
+ useExisting: InputSliderValueAccessor,
2895
+ multi: true,
2896
+ },
2897
+ ],
2898
+ standalone: true,
2899
+ }]
2900
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { handleChange: [{
2901
+ type: HostListener,
2902
+ args: ['valueChange', ['$event']]
2903
+ }], handleBlurEvent: [{
2904
+ type: HostListener,
2905
+ args: ['focusout']
2906
+ }] } });
2907
+
2672
2908
  /**
2673
2909
  * Generated bundle index. Do not edit.
2674
2910
  */
2675
2911
 
2676
- export { NumericValueAccessor, SpwAccordion, SpwAccordionContent, SpwAccordionItem, SpwAccordionTitle, SpwBreadcrumb, SpwBreadcrumbItem, SpwButton, SpwCard, SpwCardContent, SpwCardExcerpt, SpwCardImage, SpwCardSubtagItem, SpwCardSubtags, SpwCardTitle, SpwCheckbox, SpwCookies, SpwCustomSelect, SpwDatePicker, SpwDesignSystemDirectivesModule, SpwDesignSystemModule, SpwDropdown, SpwDropdownContainer, SpwDropdownItem, SpwFieldLabel, SpwFieldMessage, SpwFileUpload, SpwFooter, SpwFooterBottom, SpwFooterContent, SpwFooterContentCol, SpwFooterLink, SpwGrid, SpwGridItem, SpwGroup, SpwHeader, SpwHeaderLang, SpwHeaderNavigation, SpwHeaderNavigationDropdown, SpwHeaderNavigationItem, SpwHeaderPersona, SpwHeaderPersonaItem, SpwHero, SpwIcon, SpwIllustration, SpwInputSlider, SpwLink, SpwList, SpwListDescription, SpwListItem, SpwListTitle, SpwLoading, SpwMessage, SpwModal, SpwMosaic, SpwMosaicItem, SpwPagination, SpwRadio, SpwSearchField, SpwSelect, SpwSeparator, SpwSidebar, SpwSidebarNavigationDropdown, SpwSidebarNavigationItem, SpwSidebarNavigationSeparator, SpwSkeleton, SpwSlider, SpwSliderItem, SpwSocials, SpwTable, SpwTableBody, SpwTableCell, SpwTableContainer, SpwTableFooter, SpwTableHead, SpwTableHeader, SpwTableRow, SpwTableSidebar, SpwTabs, SpwTabsContent, SpwTabsNavigation, SpwTabsNavigationItem, SpwTag, SpwTextField, SpwTextarea, SpwThemeProvider, SpwTile, SpwTileDescription, SpwTileTitle, SpwTimeline, SpwTimelineItem, SpwToc, SpwTocContainer, SpwTocNavigation, SpwTooltip, SpwTopbar, SpwWizard, SpwWizardItem, TabsValueAccessor, TextValueAccessor, ValueAccessor };
2912
+ export { CheckboxValueAccessor, DatePickerValueAccessor, InputSliderValueAccessor, NumericValueAccessor, RadioValueAccessor, SpwAccordion, SpwAccordionContent, SpwAccordionItem, SpwAccordionTitle, SpwBreadcrumb, SpwBreadcrumbItem, SpwButton, SpwCard, SpwCardContent, SpwCardExcerpt, SpwCardImage, SpwCardSubtagItem, SpwCardSubtags, SpwCardTitle, SpwCheckbox, SpwCookies, SpwCustomSelect, SpwDatePicker, SpwDesignSystemDirectivesModule, SpwDesignSystemModule, SpwDropdown, SpwDropdownContainer, SpwDropdownItem, SpwFieldLabel, SpwFieldMessage, SpwFileUpload, SpwFooter, SpwFooterBottom, SpwFooterContent, SpwFooterContentCol, SpwFooterLink, SpwGrid, SpwGridItem, SpwGroup, SpwHeader, SpwHeaderLang, SpwHeaderNavigation, SpwHeaderNavigationDropdown, SpwHeaderNavigationItem, SpwHeaderPersona, SpwHeaderPersonaItem, SpwHero, SpwIcon, SpwIllustration, SpwInputSlider, SpwLink, SpwList, SpwListDescription, SpwListItem, SpwListTitle, SpwLoading, SpwMessage, SpwModal, SpwMosaic, SpwMosaicItem, SpwPagination, SpwRadio, SpwSearchField, SpwSelect, SpwSeparator, SpwSidebar, SpwSidebarNavigationDropdown, SpwSidebarNavigationItem, SpwSidebarNavigationSeparator, SpwSkeleton, SpwSlider, SpwSliderItem, SpwSocials, SpwTable, SpwTableBody, SpwTableCell, SpwTableContainer, SpwTableFooter, SpwTableHead, SpwTableHeader, SpwTableRow, SpwTableSidebar, SpwTabs, SpwTabsContent, SpwTabsNavigation, SpwTabsNavigationItem, SpwTag, SpwTextField, SpwTextarea, SpwThemeProvider, SpwTile, SpwTileDescription, SpwTileTitle, SpwTimeline, SpwTimelineItem, SpwToc, SpwTocContainer, SpwTocNavigation, SpwTooltip, SpwTopbar, SpwWizard, SpwWizardItem, TabsValueAccessor, TextValueAccessor, ValueAccessor };
2677
2913
  //# sourceMappingURL=spw-ds-spw-angular-library.mjs.map