@n-isi-platform/design-system 1.0.14 → 1.0.15
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.
|
@@ -4052,6 +4052,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
4052
4052
|
}]
|
|
4053
4053
|
}], ctorParameters: () => [{ type: i1$2.TranslateService }] });
|
|
4054
4054
|
|
|
4055
|
+
class DateService {
|
|
4056
|
+
constructor() { }
|
|
4057
|
+
formatDate(inputDate) {
|
|
4058
|
+
const date = new Date(inputDate);
|
|
4059
|
+
const year = date.getFullYear();
|
|
4060
|
+
let month = date.getMonth() + 1;
|
|
4061
|
+
let day = date.getDate();
|
|
4062
|
+
// Ensure month and day are two digits
|
|
4063
|
+
month = month < 10 ? '0' + month : month;
|
|
4064
|
+
day = day < 10 ? '0' + day : day;
|
|
4065
|
+
return `${year}-${month}-${day}`;
|
|
4066
|
+
}
|
|
4067
|
+
formatMonth(inputDate) {
|
|
4068
|
+
const date = new Date(inputDate);
|
|
4069
|
+
const year = date.getFullYear();
|
|
4070
|
+
let month = date.getMonth() + 1;
|
|
4071
|
+
let day = date.getDate();
|
|
4072
|
+
// Ensure month and day are two digits
|
|
4073
|
+
month = month < 10 ? '0' + month : month;
|
|
4074
|
+
return `${year}-${month}`;
|
|
4075
|
+
}
|
|
4076
|
+
dateWithoutTimeZone(date) {
|
|
4077
|
+
const tzoffset = date.getTimezoneOffset() * 60000; //offset in milliseconds
|
|
4078
|
+
const withoutTimezone = new Date(date.valueOf() - tzoffset).toISOString();
|
|
4079
|
+
return withoutTimezone;
|
|
4080
|
+
}
|
|
4081
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4082
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, providedIn: 'root' });
|
|
4083
|
+
}
|
|
4084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateService, decorators: [{
|
|
4085
|
+
type: Injectable,
|
|
4086
|
+
args: [{
|
|
4087
|
+
providedIn: 'root',
|
|
4088
|
+
}]
|
|
4089
|
+
}], ctorParameters: () => [] });
|
|
4090
|
+
|
|
4055
4091
|
// Utility function to check if an object is empty
|
|
4056
4092
|
function isEmptyObject(obj) {
|
|
4057
4093
|
return obj && Object.keys(obj).length === 0 && obj.constructor === Object;
|
|
@@ -4173,5 +4209,5 @@ function emailListValidator() {
|
|
|
4173
4209
|
* Generated bundle index. Do not edit.
|
|
4174
4210
|
*/
|
|
4175
4211
|
|
|
4176
|
-
export { AccordionComponent, AppConfigService, AutocompleteComponent, BreadcrumbsComponent, ButtonColor, ButtonComponent, ButtonIconPosition, ButtonLinkComponent, ButtonSize, CacheService, CaptionColor, CardComponent, CheckboxComponent, ConfirmModalComponent, ConfirmModalService, CustomTableComponent, DateInputComponent, DialogColor, DividerComponent, DropdownComponent, DynamicRouteService, ErrorComponent, ErrorInterceptor, ExpandedTable, ExpandedTableComponent, ExportService, FileUploadComponent, FilterHeaderComponent, FilterHeaderService, FooterComponent, GenericTableComponent, GlobalErrorHandler, IconButtonComponent, InputComponent, InputMaskComponent, InputType, IsNotBlank, IsNotDecimal, JwtInterceptor, LoaderComponent, LocalStorageService, MainMenuComponent, ModalComponent, NavbarComponent, NoDataFoundComponent, NoInternetService, PicklistComponent, PositionKey, ProgressBarComponent, SelectionMode, SharedAuthService, SharedMessageService, TableColumnSelectComponent, TableColumnsService, TagColor, TagComponent, TextareaComponent, TinymceEditorComponent, ToastSeverity, ToggleSwitchComponent, TooltipComponent, TooltipHoverEventEnum, TooltipPosition, TranslateSanitizerService, TranslationService, TreeSelectComponent, atLeastOneFieldPresentValidator, cleanMobilePhoneNumber, coordinateValidator, dateAndTimeMismatchValidator, dateMismatchValidator, emailListValidator, findUnavailableDates, formatDate, formatDateTime, formatDateToLocalISOString, getTomorrowDate, isEmpty, isFormInvalid, isMultipleOfFiveValidator, isOnePhoneNumberValidator, localFormatDate, mobilePhoneAreaCodeValidator, transformDateTime };
|
|
4212
|
+
export { AccordionComponent, AppConfigService, AutocompleteComponent, BreadcrumbsComponent, ButtonColor, ButtonComponent, ButtonIconPosition, ButtonLinkComponent, ButtonSize, CacheService, CaptionColor, CardComponent, CheckboxComponent, ConfirmModalComponent, ConfirmModalService, CustomTableComponent, DateInputComponent, DateService, DialogColor, DividerComponent, DropdownComponent, DynamicRouteService, ErrorComponent, ErrorInterceptor, ExpandedTable, ExpandedTableComponent, ExportService, FileUploadComponent, FilterHeaderComponent, FilterHeaderService, FooterComponent, GenericTableComponent, GlobalErrorHandler, IconButtonComponent, InputComponent, InputMaskComponent, InputType, IsNotBlank, IsNotDecimal, JwtInterceptor, LoaderComponent, LocalStorageService, MainMenuComponent, ModalComponent, NavbarComponent, NoDataFoundComponent, NoInternetService, PicklistComponent, PositionKey, ProgressBarComponent, SelectionMode, SharedAuthService, SharedMessageService, TableColumnSelectComponent, TableColumnsService, TagColor, TagComponent, TextareaComponent, TinymceEditorComponent, ToastSeverity, ToggleSwitchComponent, TooltipComponent, TooltipHoverEventEnum, TooltipPosition, TranslateSanitizerService, TranslationService, TreeSelectComponent, atLeastOneFieldPresentValidator, cleanMobilePhoneNumber, coordinateValidator, dateAndTimeMismatchValidator, dateMismatchValidator, emailListValidator, findUnavailableDates, formatDate, formatDateTime, formatDateToLocalISOString, getTomorrowDate, isEmpty, isFormInvalid, isMultipleOfFiveValidator, isOnePhoneNumberValidator, localFormatDate, mobilePhoneAreaCodeValidator, transformDateTime };
|
|
4177
4213
|
//# sourceMappingURL=n-isi-platform-design-system.mjs.map
|