ngx-wapp-components 3.2.24-alpha.2 → 3.2.24-alpha.3
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.
|
@@ -13594,6 +13594,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
13594
13594
|
}]
|
|
13595
13595
|
}], ctorParameters: () => [] });
|
|
13596
13596
|
|
|
13597
|
+
class ColorService {
|
|
13598
|
+
constructor() { }
|
|
13599
|
+
normalizeToHex(value) {
|
|
13600
|
+
if (!value) {
|
|
13601
|
+
return null;
|
|
13602
|
+
}
|
|
13603
|
+
if (/^#([0-9a-fA-F]{6})$/.test(value)) {
|
|
13604
|
+
return value;
|
|
13605
|
+
}
|
|
13606
|
+
const rgbMatch = value.match(/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);
|
|
13607
|
+
if (!rgbMatch) {
|
|
13608
|
+
return null;
|
|
13609
|
+
}
|
|
13610
|
+
const channels = rgbMatch.slice(1).map((channel) => {
|
|
13611
|
+
const parsed = Number(channel);
|
|
13612
|
+
const safe = Number.isNaN(parsed) ? 0 : Math.max(0, Math.min(255, parsed));
|
|
13613
|
+
return safe.toString(16).padStart(2, '0').toUpperCase();
|
|
13614
|
+
});
|
|
13615
|
+
return `#${channels.join('')}`;
|
|
13616
|
+
}
|
|
13617
|
+
normalizeToRgb(value) {
|
|
13618
|
+
if (!value) {
|
|
13619
|
+
return null;
|
|
13620
|
+
}
|
|
13621
|
+
const input = value.trim();
|
|
13622
|
+
const rgbMatch = input.match(/^rgb\(\s*(-?\d{1,3})\s*,\s*(-?\d{1,3})\s*,\s*(-?\d{1,3})\s*\)$/i);
|
|
13623
|
+
if (rgbMatch) {
|
|
13624
|
+
const [r, g, b] = rgbMatch.slice(1).map((channel) => {
|
|
13625
|
+
const n = Number(channel);
|
|
13626
|
+
return Number.isNaN(n) ? 0 : Math.max(0, Math.min(255, n));
|
|
13627
|
+
});
|
|
13628
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
13629
|
+
}
|
|
13630
|
+
const hexMatch = input.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
|
|
13631
|
+
if (!hexMatch) {
|
|
13632
|
+
return null;
|
|
13633
|
+
}
|
|
13634
|
+
let hex = hexMatch[1];
|
|
13635
|
+
if (hex.length === 3) {
|
|
13636
|
+
hex = hex.split('').map((c) => c + c).join('');
|
|
13637
|
+
}
|
|
13638
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
13639
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
13640
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
13641
|
+
return `rgb(${r}, ${g}, ${b})`;
|
|
13642
|
+
}
|
|
13643
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13644
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ColorService, providedIn: 'root' }); }
|
|
13645
|
+
}
|
|
13646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ColorService, decorators: [{
|
|
13647
|
+
type: Injectable,
|
|
13648
|
+
args: [{
|
|
13649
|
+
providedIn: 'root',
|
|
13650
|
+
}]
|
|
13651
|
+
}], ctorParameters: () => [] });
|
|
13652
|
+
|
|
13597
13653
|
/*
|
|
13598
13654
|
* Public API Surface of wapp-components
|
|
13599
13655
|
*/
|
|
@@ -13602,5 +13658,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
13602
13658
|
* Generated bundle index. Do not edit.
|
|
13603
13659
|
*/
|
|
13604
13660
|
|
|
13605
|
-
export { AddressEnum, CONTROL_VALUE_ACCESSOR, CardStatus, CarouselComponent, ClipboardService, ColorTextPipe, CronCharactersType, CronFieldType, CronPeriodicityType, CustomColor, DataTypeEnum, DateConversionService, FileService, FormControlService, MainTitleComponent, ModalService, NotificationsEventEnum, NumberConversionService, OperatorEnum, PeriodSelectEnum, QBDataTypeEnum, QueryArrowIconDirective, QueryBuilderComponent, QueryButtonGroupDirective, QueryEmptyWarningDirective, QueryEntityDirective, QueryFieldDirective, QueryInputDirective, QueryOperatorDirective, QueryRemoveButtonDirective, QueryResultType, QuerySwitchGroupDirective, SendingStatus, SessionStorageService, TableColumnFilterTypes, TableColumnTypes, TreeService, TypeMedia, VALIDATOR, WAddressFieldComponent, WAutocompleteSearchComponent, WBadgeComponent, WBodyComponent, WBodyContainerComponent, WBodyGridComponent, WButtonComponent, WButtonTabviewComponent, WButtonWeekComponent, WButtonsFooterComponent, WCardComponent, WChartBarComponent, WChipComponent, WClipboardComponent, WCodeBlockComponent, WContainerComponent, WCronExpressionsComponent, WCurrencyPipe, WDataviewComponent, WDatePipe, WDatePipeFormatType, WDatePipeReturnType, WEditCalendarComponent, WEditCalendarMonthComponent, WEditCheckboxComponent, WEditInputColorpickerComponent, WEditInputNumberComponent, WEditInputTextComponent, WEditInputTextareaComponent, WEditMultiselectComponent, WEditSelectComponent, WEditToggleComponent, WEditTreeselectComponent, WFileGeneratorComponent, WFileUploaderComponent, WFilterPanelComponent, WFooterComponent, WHeaderPanelComponent, WIconsComponent, WImageCropperComponent, WImageFileUploaderComponent, WInputLabelComponent, WInputSearchComponent, WInputVerticalGapDividerComponent, WLogosComponent, WMapsComponent, WMaterialServiceCardComponent, WMaterialServiceViewComponent, WNavbarComponent, WNotificationsEventFieldComponent, WPanelComponent, WPanelGridComponent, WPanelSectionGapDividerComponent, WPanelSubtitleComponent, WPanelTitleComponent, WParameterSelectorComponent, WPercentagePipe, WPowerbiReportComponent, WPreviewImageComponent, WRadioButtonComponent, WSelectButtonComponent, WSidebarComponent, WSkeletonEditComponent, WSkeletonEditProductComponent, WSkeletonFormComponent, WSkeletonGenericComponent, WSkeletonIframeComponent, WSkeletonInputGenericComponent, WSkeletonListComponent, WSkeletonPowerbiReportComponent, WSkeletonProfileSidebarComponent, WSkeletonQueryBuilderComponent, WSkeletonSidebarComponent, WSkeletonTimelineComponent, WSkeletonTreeComponent, WSkeletonUserProfileInfoSidebarComponent, WStampBookletComponent, WSummaryPipe, WTableComponent, WTableLazyComponent, WTabviewComponent, WTimelineComponent, WToggleButtonComponent, WTreeComponent, WTreeFieldComponent, WTreeTableComponent, WViewBadgeComponent, WViewBooleanComponent, WViewTextComponent, WWizardComponent, WappComponentsComponent, WappComponentsModule, WappComponentsService, WappMaterialServiceCardComponent, WappMaterialServiceViewComponent, WappModalCloseButtonComponent, WappModalTitleComponent, WappServiceDescriptionComponent, WappTableColumnAlignTypes, WappingServiceAppViewType, WappingServiceSubtype, WappingServiceType };
|
|
13661
|
+
export { AddressEnum, CONTROL_VALUE_ACCESSOR, CardStatus, CarouselComponent, ClipboardService, ColorService, ColorTextPipe, CronCharactersType, CronFieldType, CronPeriodicityType, CustomColor, DataTypeEnum, DateConversionService, FileService, FormControlService, MainTitleComponent, ModalService, NotificationsEventEnum, NumberConversionService, OperatorEnum, PeriodSelectEnum, QBDataTypeEnum, QueryArrowIconDirective, QueryBuilderComponent, QueryButtonGroupDirective, QueryEmptyWarningDirective, QueryEntityDirective, QueryFieldDirective, QueryInputDirective, QueryOperatorDirective, QueryRemoveButtonDirective, QueryResultType, QuerySwitchGroupDirective, SendingStatus, SessionStorageService, TableColumnFilterTypes, TableColumnTypes, TreeService, TypeMedia, VALIDATOR, WAddressFieldComponent, WAutocompleteSearchComponent, WBadgeComponent, WBodyComponent, WBodyContainerComponent, WBodyGridComponent, WButtonComponent, WButtonTabviewComponent, WButtonWeekComponent, WButtonsFooterComponent, WCardComponent, WChartBarComponent, WChipComponent, WClipboardComponent, WCodeBlockComponent, WContainerComponent, WCronExpressionsComponent, WCurrencyPipe, WDataviewComponent, WDatePipe, WDatePipeFormatType, WDatePipeReturnType, WEditCalendarComponent, WEditCalendarMonthComponent, WEditCheckboxComponent, WEditInputColorpickerComponent, WEditInputNumberComponent, WEditInputTextComponent, WEditInputTextareaComponent, WEditMultiselectComponent, WEditSelectComponent, WEditToggleComponent, WEditTreeselectComponent, WFileGeneratorComponent, WFileUploaderComponent, WFilterPanelComponent, WFooterComponent, WHeaderPanelComponent, WIconsComponent, WImageCropperComponent, WImageFileUploaderComponent, WInputLabelComponent, WInputSearchComponent, WInputVerticalGapDividerComponent, WLogosComponent, WMapsComponent, WMaterialServiceCardComponent, WMaterialServiceViewComponent, WNavbarComponent, WNotificationsEventFieldComponent, WPanelComponent, WPanelGridComponent, WPanelSectionGapDividerComponent, WPanelSubtitleComponent, WPanelTitleComponent, WParameterSelectorComponent, WPercentagePipe, WPowerbiReportComponent, WPreviewImageComponent, WRadioButtonComponent, WSelectButtonComponent, WSidebarComponent, WSkeletonEditComponent, WSkeletonEditProductComponent, WSkeletonFormComponent, WSkeletonGenericComponent, WSkeletonIframeComponent, WSkeletonInputGenericComponent, WSkeletonListComponent, WSkeletonPowerbiReportComponent, WSkeletonProfileSidebarComponent, WSkeletonQueryBuilderComponent, WSkeletonSidebarComponent, WSkeletonTimelineComponent, WSkeletonTreeComponent, WSkeletonUserProfileInfoSidebarComponent, WStampBookletComponent, WSummaryPipe, WTableComponent, WTableLazyComponent, WTabviewComponent, WTimelineComponent, WToggleButtonComponent, WTreeComponent, WTreeFieldComponent, WTreeTableComponent, WViewBadgeComponent, WViewBooleanComponent, WViewTextComponent, WWizardComponent, WappComponentsComponent, WappComponentsModule, WappComponentsService, WappMaterialServiceCardComponent, WappMaterialServiceViewComponent, WappModalCloseButtonComponent, WappModalTitleComponent, WappServiceDescriptionComponent, WappTableColumnAlignTypes, WappingServiceAppViewType, WappingServiceSubtype, WappingServiceType };
|
|
13606
13662
|
//# sourceMappingURL=ngx-wapp-components.mjs.map
|