@smarterplan/ngx-smarterplan-core 0.4.13 → 0.4.16
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/esm2020/lib/validators/no-empty.directive.mjs +8 -3
- package/esm2020/lib/validators/number.directive.mjs +12 -0
- package/esm2020/lib/validators/text.directive.mjs +8 -3
- package/esm2020/public-api.mjs +7 -1
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +27 -5
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +27 -5
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/validators/number.directive.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
|
@@ -6077,8 +6077,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
6077
6077
|
|
|
6078
6078
|
function noEmptyValidator() {
|
|
6079
6079
|
return (control) => {
|
|
6080
|
-
|
|
6081
|
-
|
|
6080
|
+
if (control.value && control.value !== '') {
|
|
6081
|
+
const data = control.value.replace(/ /g, '');
|
|
6082
|
+
return data === '' ? { isEmpty: control.value } : null;
|
|
6083
|
+
}
|
|
6084
|
+
else {
|
|
6085
|
+
return null;
|
|
6086
|
+
}
|
|
6082
6087
|
};
|
|
6083
6088
|
}
|
|
6084
6089
|
|
|
@@ -6091,8 +6096,13 @@ function emailValidator() {
|
|
|
6091
6096
|
|
|
6092
6097
|
function textValidator() {
|
|
6093
6098
|
return (control) => {
|
|
6094
|
-
const regex = /[a-zA-
|
|
6095
|
-
|
|
6099
|
+
const regex = /[a-zA-Z1-9]/;
|
|
6100
|
+
if (control.value && control.value !== '') {
|
|
6101
|
+
return !regex.test(control.value) ? { text: control.value } : null;
|
|
6102
|
+
}
|
|
6103
|
+
else {
|
|
6104
|
+
return null;
|
|
6105
|
+
}
|
|
6096
6106
|
};
|
|
6097
6107
|
}
|
|
6098
6108
|
|
|
@@ -9372,6 +9382,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
9372
9382
|
args: ['currentAPIService']
|
|
9373
9383
|
}] }]; } });
|
|
9374
9384
|
|
|
9385
|
+
function floatValidator() {
|
|
9386
|
+
return (control) => {
|
|
9387
|
+
const regex = /^[+-]?([0-9]*[.])?[0-9]+$/;
|
|
9388
|
+
if (control.value && control.value !== '') {
|
|
9389
|
+
return !regex.test(control.value) ? { number: control.value } : null;
|
|
9390
|
+
}
|
|
9391
|
+
else {
|
|
9392
|
+
return null;
|
|
9393
|
+
}
|
|
9394
|
+
};
|
|
9395
|
+
}
|
|
9396
|
+
|
|
9375
9397
|
/*
|
|
9376
9398
|
* Public API Surface of ngx-smarterplan-core
|
|
9377
9399
|
*/
|
|
@@ -9380,5 +9402,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
|
|
|
9380
9402
|
* Generated bundle index. Do not edit.
|
|
9381
9403
|
*/
|
|
9382
9404
|
|
|
9383
|
-
export { AffectationService, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, BookingService, CaptureService, CaptureViewer, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, HashtagFromIdPipe, HashtagService, InterventionService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MatterportImportService, MatterportService, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, OperationService, OrganisationService, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpaceService, SpaceStatus, StatusEquipment, SupportModalComponent, SupportService, TagAction, TemplateService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, ViewerInteractions, ViewerService, VisitService, ZoneService, arraysContainSameElements, checkElementById, convertTimestampToLocalZone, dateHasExpired, dateTimeToLocalString, deleteFromS3, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, durationToString, enumToArray, filterUniqueArrayByID, getBufferForFileFromS3, getCoefficientsForImage, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getVisitUrl, isEmptyObject, listFilesInFolder, mean, numberToDateString, openDocument, openModalForVisitSwitch, poiTypeToString, removeAllFilesFromFolderS3, removeNullKeysFromObject, showScanPointsOnPlanInDiv, shuffleArray, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, translateDatePeriod, uploadBase64Image, uploadFileToS3, uploadJsonToS3, validEmail, wait, waitUntil };
|
|
9405
|
+
export { AffectationService, BaseLateralTabService, BaseTagService, BaseUserService, BaseVisibilityService, BookingService, CaptureService, CaptureViewer, CommentService, CommentType, Config, ContentService, CsvExportComponent, DomainService, DomainType, DurationToStringPipe, EmailStatus, EquipmentService, EventService, EventStatus, EventType, FeatureService, FeatureType, FilterService, HashtagFromIdPipe, HashtagService, InterventionService, InventoryStatus, LayerService, LevelStatus, LoaderComponent, Locale, LocaleService, MatterportImportService, MatterportService, MattertagData, MeasurementService, MenuBarComponent, MissionService, NavigationService, NavigatorService, NgxSmarterplanCoreModule, NgxSmarterplanCoreService, NodeService, OperationService, OrganisationService, PaymentStatus, PlanService, PoiService, PoiType, ProfileEntity, ProfileService, ProfileStatus, PropertyService, PropertyType, RoleStatus, SafeUrlPipe, SearchBarComponent, SearchObjectType, SearchService, SpaceService, SpaceStatus, StatusEquipment, SupportModalComponent, SupportService, TagAction, TemplateService, TicketPriority, TicketStatus, TicketType, TicketsService, TimeDateToLocalStringPipe, TypeNote, UsernameFromIdPipe, ValidatorsService, ViewerInteractions, ViewerService, VisitService, ZoneService, arraysContainSameElements, checkElementById, convertTimestampToLocalZone, dateHasExpired, dateTimeToLocalString, deleteFromS3, downloadBlob, downloadEquipmentDocument, downloadFile, downloadFileAsObject, durationToString, emailValidator, enumToArray, filterUniqueArrayByID, floatValidator, getBufferForFileFromS3, getCoefficientsForImage, getDistanceBetweenTwoPoints, getHighestLevelForMissions, getHighestRoleForMissions, getLevelsBelow, getLocaleLong, getLocaleShort, getMetaForImage, getRolesBelowForManager, getSignedFile, getSignedImageUrlForEquipment, getSignedImageUrlForProfile, getSignedImageUrlForSpace, getSpaceIDFromUrl, getVisitUrl, isEmptyObject, listFilesInFolder, mean, noEmptyValidator, numberToDateString, openDocument, openModalForVisitSwitch, poiTypeToString, removeAllFilesFromFolderS3, removeNullKeysFromObject, showScanPointsOnPlanInDiv, shuffleArray, sortAlphabeticallyOnName, stringLocaleToEnum, stringToLowercaseNoSpaces, styleButton, textValidator, translateDatePeriod, uploadBase64Image, uploadFileToS3, uploadJsonToS3, validEmail, wait, waitUntil };
|
|
9384
9406
|
//# sourceMappingURL=smarterplan-ngx-smarterplan-core.mjs.map
|