@colijnit/ioneconnector 256.1.2 → 256.1.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.
- package/build/connector.d.ts +31 -31
- package/build/connector.js +73 -70
- package/build/connector.js.map +1 -1
- package/build/connector.unit.test.d.ts +1 -1
- package/build/connector.unit.test.js +108 -108
- package/build/enum/activate-user-account-status.enum.d.ts +6 -6
- package/build/enum/activate-user-account-status.enum.js +10 -10
- package/build/enum/address-format.enum.d.ts +4 -4
- package/build/enum/address-format.enum.js +8 -8
- package/build/enum/backend-language-code.enum.d.ts +6 -6
- package/build/enum/backend-language-code.enum.js +10 -10
- package/build/enum/backend-service-name.enum.d.ts +7 -7
- package/build/enum/backend-service-name.enum.js +11 -11
- package/build/enum/communication-type.enum.d.ts +8 -8
- package/build/enum/communication-type.enum.js +12 -12
- package/build/enum/datasession-service-method.enum.d.ts +13 -13
- package/build/enum/datasession-service-method.enum.js +17 -17
- package/build/enum/db-boolean-value-type.enum.d.ts +12 -12
- package/build/enum/db-boolean-value-type.enum.js +32 -32
- package/build/enum/end-point.enum.d.ts +4 -4
- package/build/enum/end-point.enum.js +8 -8
- package/build/enum/file-type-internal.enum.d.ts +11 -11
- package/build/enum/file-type-internal.enum.js +15 -15
- package/build/enum/file-type.enum.d.ts +5 -5
- package/build/enum/file-type.enum.js +9 -9
- package/build/enum/filter-type.enum.d.ts +4 -4
- package/build/enum/filter-type.enum.js +8 -8
- package/build/enum/health-service-method.enum.d.ts +3 -3
- package/build/enum/health-service-method.enum.js +7 -7
- package/build/enum/language-code.enum.d.ts +7 -7
- package/build/enum/language-code.enum.js +11 -11
- package/build/enum/login-service-method.enum.d.ts +25 -24
- package/build/enum/login-service-method.enum.js +29 -28
- package/build/enum/login-service-method.enum.js.map +1 -1
- package/build/enum/login-status.enum.d.ts +20 -20
- package/build/enum/login-status.enum.js +24 -24
- package/build/enum/message-type.enum.d.ts +6 -6
- package/build/enum/message-type.enum.js +10 -10
- package/build/enum/object-config-kind.d.ts +9 -9
- package/build/enum/object-config-kind.js +13 -13
- package/build/enum/object-configuration-data-type.enum.d.ts +7 -7
- package/build/enum/object-configuration-data-type.enum.js +11 -11
- package/build/enum/object-configuration-value-type.enum.d.ts +10 -10
- package/build/enum/object-configuration-value-type.enum.js +14 -14
- package/build/enum/object-right-type.enum.d.ts +5 -5
- package/build/enum/object-right-type.enum.js +9 -9
- package/build/enum/one-zero-bool-db-type.enum.d.ts +5 -5
- package/build/enum/one-zero-bool-db-type.enum.js +20 -20
- package/build/enum/public-service-method.enum.d.ts +5 -5
- package/build/enum/public-service-method.enum.js +9 -9
- package/build/enum/reset-password-status.enum.d.ts +5 -5
- package/build/enum/reset-password-status.enum.js +9 -9
- package/build/enum/screen-config-subcategory.enum.d.ts +2 -2
- package/build/enum/screen-config-subcategory.enum.js +2 -2
- package/build/enum/search-data-type.enum.d.ts +4 -4
- package/build/enum/search-data-type.enum.js +8 -8
- package/build/enum/search-property-state.enum.d.ts +5 -5
- package/build/enum/search-property-state.enum.js +9 -9
- package/build/enum/sort-direction.d.ts +5 -5
- package/build/enum/sort-direction.js +12 -12
- package/build/enum/sort-type.enum.d.ts +6 -6
- package/build/enum/sort-type.enum.js +10 -10
- package/build/enum/true-false-db-type.enum.d.ts +5 -5
- package/build/enum/true-false-db-type.enum.js +20 -20
- package/build/enum/user-info-service-method.enum.d.ts +3 -3
- package/build/enum/user-info-service-method.enum.js +7 -7
- package/build/enum/user-right-type.enum.d.ts +7 -7
- package/build/enum/user-right-type.enum.js +11 -11
- package/build/enum/user-role-type.enum.d.ts +17 -17
- package/build/enum/user-role-type.enum.js +21 -21
- package/build/enum/value-comparison-type.enum.d.ts +15 -15
- package/build/enum/value-comparison-type.enum.js +31 -31
- package/build/enum/yes-no-db-type.enum.d.ts +5 -5
- package/build/enum/yes-no-db-type.enum.js +20 -20
- package/build/factory/business-object-serializer.d.ts +11 -11
- package/build/factory/business-object-serializer.js +145 -145
- package/build/factory/decorators/bo-factory-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-factory-step.decorator.js +16 -16
- package/build/factory/decorators/bo-serializer-step.decorator.d.ts +4 -4
- package/build/factory/decorators/bo-serializer-step.decorator.js +16 -16
- package/build/factory/decorators/boolean.decorator.d.ts +12 -12
- package/build/factory/decorators/boolean.decorator.js +73 -73
- package/build/factory/decorators/business-object-data.decorator.d.ts +23 -23
- package/build/factory/decorators/business-object-data.decorator.js +87 -87
- package/build/factory/decorators/co-inject.decorator.d.ts +7 -7
- package/build/factory/decorators/co-inject.decorator.js +54 -54
- package/build/factory/decorators/complex-array.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-array.decorator.js +37 -37
- package/build/factory/decorators/complex-field.decorator.d.ts +6 -6
- package/build/factory/decorators/complex-field.decorator.js +37 -37
- package/build/factory/decorators/date-field.decorator.d.ts +6 -6
- package/build/factory/decorators/date-field.decorator.js +27 -27
- package/build/factory/decorators/db-field-alias.decorator.d.ts +6 -6
- package/build/factory/decorators/db-field-alias.decorator.js +40 -40
- package/build/factory/decorators/db-method-value.decorator.d.ts +5 -5
- package/build/factory/decorators/db-method-value.decorator.js +19 -19
- package/build/factory/decorators/db-number.decorator.d.ts +6 -6
- package/build/factory/decorators/db-number.decorator.js +35 -35
- package/build/factory/decorators/default-send-value.decorator.d.ts +7 -7
- package/build/factory/decorators/default-send-value.decorator.js +53 -53
- package/build/factory/decorators/exclude-when-empty-string.decorator.d.ts +5 -5
- package/build/factory/decorators/exclude-when-empty-string.decorator.js +19 -19
- package/build/factory/decorators/json.decorator.d.ts +6 -6
- package/build/factory/decorators/json.decorator.js +26 -26
- package/build/factory/decorators/map-property.decorator.d.ts +6 -6
- package/build/factory/decorators/map-property.decorator.js +29 -29
- package/build/factory/decorators/no-db-field.decorator.d.ts +5 -5
- package/build/factory/decorators/no-db-field.decorator.js +34 -34
- package/build/factory/decorators/number-string.decorator.d.ts +6 -6
- package/build/factory/decorators/number-string.decorator.js +23 -23
- package/build/factory/decorators/simple-method-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-method-tag.decorator.js +31 -31
- package/build/factory/decorators/simple-property-tag.decorator.d.ts +6 -6
- package/build/factory/decorators/simple-property-tag.decorator.js +38 -38
- package/build/factory/decorators/string-number.decorator.d.ts +7 -7
- package/build/factory/decorators/string-number.decorator.js +30 -30
- package/build/factory/decorators/validate.decorator.d.ts +11 -11
- package/build/factory/decorators/validate.decorator.js +55 -55
- package/build/interface/address-common-shape.interface.d.ts +14 -14
- package/build/interface/address-common-shape.interface.js +2 -2
- package/build/interface/business-object-data-shape.d.ts +19 -19
- package/build/interface/business-object-data-shape.js +2 -2
- package/build/interface/check-precision-and-scale-result.d.ts +4 -4
- package/build/interface/check-precision-and-scale-result.js +2 -2
- package/build/interface/check-within-stepped-bounds-result.d.ts +4 -4
- package/build/interface/check-within-stepped-bounds-result.js +2 -2
- package/build/interface/filter-property.d.ts +9 -9
- package/build/interface/filter-property.js +2 -2
- package/build/interface/login-storage-data.interface.d.ts +11 -10
- package/build/interface/login-storage-data.interface.js +2 -2
- package/build/interface/precision-scale-object.d.ts +4 -4
- package/build/interface/precision-scale-object.js +2 -2
- package/build/interface/search-property.d.ts +11 -11
- package/build/interface/search-property.js +2 -2
- package/build/interface/sort-property.d.ts +11 -11
- package/build/interface/sort-property.js +2 -2
- package/build/interface/text-part.d.ts +4 -4
- package/build/interface/text-part.js +2 -2
- package/build/interface/value-comparison-type-view-wrapper.d.ts +6 -6
- package/build/interface/value-comparison-type-view-wrapper.js +2 -2
- package/build/model/business-object.d.ts +13 -13
- package/build/model/business-object.js +34 -34
- package/build/model/company.bo.d.ts +9 -9
- package/build/model/company.bo.js +13 -13
- package/build/model/constant/java-constants.d.ts +2 -2
- package/build/model/constant/java-constants.js +5 -5
- package/build/model/country.bo.d.ts +11 -11
- package/build/model/country.bo.js +11 -11
- package/build/model/data-service-data.d.ts +15 -15
- package/build/model/data-service-data.js +6 -6
- package/build/model/data-service-response-data.d.ts +19 -19
- package/build/model/data-service-response-data.interface.d.ts +9 -9
- package/build/model/data-service-response-data.interface.js +2 -2
- package/build/model/data-service-response-data.js +57 -57
- package/build/model/data-service-response-exception.d.ts +29 -29
- package/build/model/data-service-response-exception.js +2 -2
- package/build/model/data-service-response-root.d.ts +7 -7
- package/build/model/data-service-response-root.js +2 -2
- package/build/model/default-all-scr-cfg-subcategory.d.ts +2 -2
- package/build/model/default-all-scr-cfg-subcategory.js +4 -4
- package/build/model/default-get-object-configurations-params.d.ts +2 -2
- package/build/model/default-get-object-configurations-params.js +5 -5
- package/build/model/field-validation.d.ts +11 -11
- package/build/model/field-validation.interface.d.ts +6 -6
- package/build/model/field-validation.interface.js +2 -2
- package/build/model/field-validation.js +76 -76
- package/build/model/field-validations-object.d.ts +4 -4
- package/build/model/field-validations-object.interface.d.ts +4 -4
- package/build/model/field-validations-object.interface.js +2 -2
- package/build/model/field-validations-object.js +2 -2
- package/build/model/ione-local-storage-root-object.d.ts +5 -5
- package/build/model/ione-local-storage-root-object.js +9 -9
- package/build/model/keycloak-parameters.bo.d.ts +5 -5
- package/build/model/keycloak-parameters.bo.js +7 -7
- package/build/model/local-storage-root-object.d.ts +4 -4
- package/build/model/local-storage-root-object.js +9 -9
- package/build/model/local-storage-schema-object.d.ts +7 -7
- package/build/model/local-storage-schema-object.js +9 -9
- package/build/model/local-storage-user-object.d.ts +7 -7
- package/build/model/local-storage-user-object.js +6 -6
- package/build/model/login-request.d.ts +16 -15
- package/build/model/login-request.interface.d.ts +12 -12
- package/build/model/login-request.interface.js +2 -2
- package/build/model/login-request.js +6 -6
- package/build/model/login-request.js.map +1 -1
- package/build/model/login-response.d.ts +36 -36
- package/build/model/login-response.interface.d.ts +22 -22
- package/build/model/login-response.interface.js +2 -2
- package/build/model/login-response.js +57 -57
- package/build/model/login-service-request-data.d.ts +17 -17
- package/build/model/login-service-request-data.js +2 -2
- package/build/model/login.d.ts +16 -16
- package/build/model/login.js +35 -35
- package/build/model/menu-content.bo.d.ts +13 -13
- package/build/model/menu-content.bo.js +13 -13
- package/build/model/object-configuration.d.ts +53 -53
- package/build/model/object-configuration.js +200 -200
- package/build/model/options.d.ts +29 -26
- package/build/model/options.js +16 -16
- package/build/model/options.js.map +1 -1
- package/build/model/paging-parameters.d.ts +15 -15
- package/build/model/paging-parameters.interface.d.ts +6 -6
- package/build/model/paging-parameters.interface.js +6 -6
- package/build/model/paging-parameters.js +37 -37
- package/build/model/public-service-request-data.d.ts +5 -5
- package/build/model/public-service-request-data.js +2 -2
- package/build/model/server-response-data.d.ts +5 -5
- package/build/model/server-response-data.js +2 -2
- package/build/model/server-stack-trace-element.d.ts +7 -7
- package/build/model/server-stack-trace-element.js +2 -2
- package/build/model/session-storage-root-object.d.ts +4 -4
- package/build/model/session-storage-root-object.js +9 -9
- package/build/model/session-storage-schema-object.d.ts +7 -7
- package/build/model/session-storage-schema-object.js +9 -9
- package/build/model/session-storage-user-object.d.ts +6 -6
- package/build/model/session-storage-user-object.js +10 -10
- package/build/model/session.d.ts +6 -6
- package/build/model/session.js +6 -6
- package/build/model/token-response.bo.d.ts +5 -5
- package/build/model/token-response.bo.js +7 -7
- package/build/model/user-parameters-values.bo.d.ts +8 -8
- package/build/model/user-parameters-values.bo.js +7 -7
- package/build/model/validation-message.d.ts +13 -13
- package/build/model/validation-message.interface.d.ts +6 -6
- package/build/model/validation-message.interface.js +2 -2
- package/build/model/validation-message.js +48 -48
- package/build/model/validation-result.d.ts +34 -34
- package/build/model/validation-result.interface.d.ts +14 -14
- package/build/model/validation-result.interface.js +2 -2
- package/build/model/validation-result.js +192 -192
- package/build/provider/ajax.service.d.ts +36 -33
- package/build/provider/ajax.service.js +336 -293
- package/build/provider/ajax.service.js.map +1 -1
- package/build/provider/base-backend-connection.service.d.ts +49 -45
- package/build/provider/base-backend-connection.service.js +189 -166
- package/build/provider/base-backend-connection.service.js.map +1 -1
- package/build/service/business-object-factory.d.ts +13 -13
- package/build/service/business-object-factory.js +235 -235
- package/build/service/datasession.service.d.ts +9 -9
- package/build/service/datasession.service.js +26 -26
- package/build/service/encrypt.service.d.ts +6 -6
- package/build/service/encrypt.service.js +30 -30
- package/build/service/encrypt.service.unit.test.d.ts +1 -1
- package/build/service/encrypt.service.unit.test.js +14 -14
- package/build/service/external-jwt-token.service.d.ts +10 -10
- package/build/service/external-jwt-token.service.js +21 -21
- package/build/service/health.service.d.ts +10 -10
- package/build/service/health.service.js +34 -34
- package/build/service/internal-jwt-token.service.d.ts +11 -11
- package/build/service/internal-jwt-token.service.js +40 -40
- package/build/service/jwt-token.service.d.ts +12 -12
- package/build/service/jwt-token.service.js +32 -32
- package/build/service/local-storage.service.d.ts +32 -27
- package/build/service/local-storage.service.js +188 -147
- package/build/service/local-storage.service.js.map +1 -1
- package/build/service/login.service.d.ts +51 -45
- package/build/service/login.service.js +318 -312
- package/build/service/login.service.js.map +1 -1
- package/build/service/public.service.d.ts +12 -12
- package/build/service/public.service.js +36 -36
- package/build/service/session-storage.service.d.ts +23 -18
- package/build/service/session-storage.service.js +162 -120
- package/build/service/session-storage.service.js.map +1 -1
- package/build/service/user-info.service.d.ts +9 -9
- package/build/service/user-info.service.js +33 -33
- package/build/tests/int/connector.int.test.d.ts +1 -1
- package/build/tests/int/connector.int.test.js +12 -12
- package/build/type/business-object-id-type.d.ts +4 -4
- package/build/type/business-object-id-type.js +13 -13
- package/build/type/object-configuration-default-value-type.d.ts +1 -1
- package/build/type/object-configuration-default-value-type.js +2 -2
- package/build/utils/array-utils.d.ts +38 -38
- package/build/utils/array-utils.js +375 -375
- package/build/utils/business-object-utils.d.ts +20 -20
- package/build/utils/business-object-utils.js +198 -198
- package/build/utils/date-utils.d.ts +5 -5
- package/build/utils/date-utils.js +24 -24
- package/build/utils/file-utils.d.ts +6 -6
- package/build/utils/file-utils.js +66 -66
- package/build/utils/function/any-nill.function.d.ts +1 -1
- package/build/utils/function/any-nill.function.js +16 -16
- package/build/utils/function/is-nill.function.d.ts +1 -1
- package/build/utils/function/is-nill.function.js +7 -7
- package/build/utils/function/not-nill.function.d.ts +1 -1
- package/build/utils/function/not-nill.function.js +7 -7
- package/build/utils/function-utils.d.ts +4 -4
- package/build/utils/function-utils.js +31 -31
- package/build/utils/image-utils.d.ts +4 -4
- package/build/utils/image-utils.js +28 -28
- package/build/utils/map-utils.d.ts +4 -4
- package/build/utils/map-utils.js +31 -31
- package/build/utils/number-utils.d.ts +39 -39
- package/build/utils/number-utils.js +268 -268
- package/build/utils/object-utils.d.ts +21 -21
- package/build/utils/object-utils.js +247 -247
- package/build/utils/parameter-value-conversion-utils.d.ts +3 -3
- package/build/utils/parameter-value-conversion-utils.js +19 -19
- package/build/utils/promise-utils.d.ts +6 -6
- package/build/utils/promise-utils.js +22 -22
- package/build/utils/ref-code-utils.d.ts +4 -4
- package/build/utils/ref-code-utils.js +19 -19
- package/build/utils/sort-utils.d.ts +12 -12
- package/build/utils/sort-utils.js +120 -120
- package/build/utils/string-utils.d.ts +25 -25
- package/build/utils/string-utils.js +212 -212
- package/build/utils/url-utils.d.ts +4 -4
- package/build/utils/url-utils.js +33 -33
- package/build/validators/communication-type.validator.d.ts +1 -1
- package/build/validators/communication-type.validator.js +16 -16
- package/build/validators/email.validator.d.ts +2 -2
- package/build/validators/email.validator.js +9 -9
- package/build/validators/empty-address.validator.d.ts +3 -3
- package/build/validators/empty-address.validator.js +12 -12
- package/build/validators/empty-array.validator.d.ts +2 -2
- package/build/validators/empty-array.validator.js +14 -14
- package/build/validators/end-date-equal.validator.d.ts +1 -1
- package/build/validators/end-date-equal.validator.js +17 -17
- package/build/validators/end-date.validator.d.ts +1 -1
- package/build/validators/end-date.validator.js +17 -17
- package/build/validators/equal.validator.d.ts +2 -2
- package/build/validators/equal.validator.js +14 -14
- package/build/validators/max-string-length.validator.d.ts +2 -2
- package/build/validators/max-string-length.validator.js +13 -13
- package/build/validators/nl-post-code.validator.d.ts +3 -3
- package/build/validators/nl-post-code.validator.js +14 -14
- package/build/validators/password.validator.d.ts +3 -3
- package/build/validators/password.validator.js +33 -33
- package/build/validators/postal-code-function.validator.d.ts +2 -2
- package/build/validators/postal-code-function.validator.js +19 -19
- package/build/validators/postal-code.validator.d.ts +1 -1
- package/build/validators/postal-code.validator.js +21 -21
- package/build/validators/precision-scale.validator.d.ts +2 -2
- package/build/validators/precision-scale.validator.js +14 -14
- package/build/validators/required.validator.d.ts +2 -2
- package/build/validators/required.validator.js +8 -8
- package/build/validators/social-security-number.validator.d.ts +2 -2
- package/build/validators/social-security-number.validator.js +28 -28
- package/build/validators/space-trim.validator.d.ts +2 -2
- package/build/validators/space-trim.validator.js +12 -12
- package/build/validators/true.validator.d.ts +2 -2
- package/build/validators/true.validator.js +8 -8
- package/package.json +1 -1
|
@@ -1,213 +1,213 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringUtils = void 0;
|
|
4
|
-
const not_nill_function_1 = require("./function/not-nill.function");
|
|
5
|
-
const array_utils_1 = require("./array-utils");
|
|
6
|
-
const any_nill_function_1 = require("./function/any-nill.function");
|
|
7
|
-
const is_nill_function_1 = require("./function/is-nill.function");
|
|
8
|
-
class StringUtils {
|
|
9
|
-
static ReplaceOccurrencesIn(source, placeholder, ...replacementTexts) {
|
|
10
|
-
if ((0, is_nill_function_1.isNill)(source)) {
|
|
11
|
-
return undefined;
|
|
12
|
-
}
|
|
13
|
-
if (!placeholder || replacementTexts.length === 0) {
|
|
14
|
-
return source;
|
|
15
|
-
}
|
|
16
|
-
let outString = source;
|
|
17
|
-
if (replacementTexts.length === 1) {
|
|
18
|
-
outString = outString.replace(new RegExp(this._escapeRegExp(placeholder), "g"), replacementTexts[0]);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
for (let i = 0, len = replacementTexts.length; i < len; i++) {
|
|
22
|
-
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return outString;
|
|
26
|
-
}
|
|
27
|
-
static ParseString(arg, defaultValue = "") {
|
|
28
|
-
if (!StringUtils.IsString(arg)) {
|
|
29
|
-
if (arg && typeof arg.toString === "function") {
|
|
30
|
-
arg = arg.toString();
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
arg = defaultValue;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return arg;
|
|
37
|
-
}
|
|
38
|
-
static IsString(str) {
|
|
39
|
-
return typeof str === "string";
|
|
40
|
-
}
|
|
41
|
-
static AsLowerCaseIfString(str) {
|
|
42
|
-
if (StringUtils.IsString(str)) {
|
|
43
|
-
return str.toLowerCase();
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return str;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
static IsStringWithLength(str) {
|
|
50
|
-
return (0, not_nill_function_1.notNill)(str) && StringUtils.IsString(str) && str.length > 0;
|
|
51
|
-
}
|
|
52
|
-
static Format(str, format) {
|
|
53
|
-
const args = Array.prototype.slice.call(format);
|
|
54
|
-
return str.replace(/{(\d+)}/g, function (match, number) {
|
|
55
|
-
return typeof args[number] !== "undefined" ? (args[number] !== null ? args[number] : "") : "";
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
static GetFirstCapital(str) {
|
|
59
|
-
if (!str || str.length === 0) {
|
|
60
|
-
return "";
|
|
61
|
-
}
|
|
62
|
-
let char = "";
|
|
63
|
-
for (let i = 0, len = str.length; i < len; i++) {
|
|
64
|
-
char = str.charAt(i);
|
|
65
|
-
if (isNaN(char * 1)) {
|
|
66
|
-
if (char === char.toUpperCase()) {
|
|
67
|
-
return str[i];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return str[0] ? str[0] : "";
|
|
72
|
-
}
|
|
73
|
-
static ToStringOrDefault(arg, defaultReturnVal = "") {
|
|
74
|
-
if ((0, not_nill_function_1.notNill)(arg) && arg.toString) {
|
|
75
|
-
return arg.toString();
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
return defaultReturnVal;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
static CapitalizeFirstLetter(str) {
|
|
82
|
-
if (str) {
|
|
83
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
return "";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
static RemoveLastChars(str, amount) {
|
|
90
|
-
if (str) {
|
|
91
|
-
return str.slice(0, -1 * amount);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
return str;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
static StringArrayToString(strArray) {
|
|
98
|
-
if (!strArray) {
|
|
99
|
-
return "";
|
|
100
|
-
}
|
|
101
|
-
let str = "";
|
|
102
|
-
for (let i = 0, len = strArray.length; i < len; i++) {
|
|
103
|
-
str += strArray[i] + " ";
|
|
104
|
-
}
|
|
105
|
-
str = StringUtils.RemoveLastChars(str, 1);
|
|
106
|
-
return str;
|
|
107
|
-
}
|
|
108
|
-
static ToDictionaryKey(str) {
|
|
109
|
-
str = str.toLocaleUpperCase();
|
|
110
|
-
return str.replace(/-/g, "_");
|
|
111
|
-
}
|
|
112
|
-
static CloneStringArray(strArray) {
|
|
113
|
-
const clone = [];
|
|
114
|
-
if (strArray) {
|
|
115
|
-
for (let i = 0, len = strArray.length; i < len; i++) {
|
|
116
|
-
clone.push(strArray[i]);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return clone;
|
|
120
|
-
}
|
|
121
|
-
static StartsWithAny(strToCheck, prefixes) {
|
|
122
|
-
if (strToCheck && prefixes) {
|
|
123
|
-
for (let i = 0, len = prefixes.length; i < len; i++) {
|
|
124
|
-
if (strToCheck.startsWith(prefixes[i])) {
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return false;
|
|
130
|
-
}
|
|
131
|
-
static LeftString(str, char) {
|
|
132
|
-
if (str) {
|
|
133
|
-
let result;
|
|
134
|
-
let split = str.split(char);
|
|
135
|
-
if (split.length === 1) {
|
|
136
|
-
result = str;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
split = split.slice(0, split.length - 1);
|
|
140
|
-
result = split.join(char);
|
|
141
|
-
}
|
|
142
|
-
return result;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
static RightString(str, char) {
|
|
146
|
-
if (str) {
|
|
147
|
-
let result;
|
|
148
|
-
const split = str.split(char);
|
|
149
|
-
if (split.length > 1) {
|
|
150
|
-
result = split[split.length - 1];
|
|
151
|
-
}
|
|
152
|
-
return result;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
static StringToStringArray(str) {
|
|
156
|
-
if (!str) {
|
|
157
|
-
return [];
|
|
158
|
-
}
|
|
159
|
-
const strArray = str.split(" ");
|
|
160
|
-
array_utils_1.ArrayUtils.RemoveElementsByFilter(strArray, (txt) => {
|
|
161
|
-
return !txt || txt === "";
|
|
162
|
-
});
|
|
163
|
-
return strArray;
|
|
164
|
-
}
|
|
165
|
-
static GetTextParts(text, partsFilter) {
|
|
166
|
-
const textParts = [];
|
|
167
|
-
if ((0, any_nill_function_1.anyNill)(text, partsFilter)) {
|
|
168
|
-
return textParts;
|
|
169
|
-
}
|
|
170
|
-
const textUpperCase = text.toUpperCase();
|
|
171
|
-
const partsFilterUpperCase = partsFilter.toUpperCase();
|
|
172
|
-
let index = textUpperCase.indexOf(partsFilterUpperCase);
|
|
173
|
-
const indices = [];
|
|
174
|
-
const length = partsFilterUpperCase.length;
|
|
175
|
-
while (index >= 0) {
|
|
176
|
-
indices.push(index);
|
|
177
|
-
index = textUpperCase.indexOf(partsFilterUpperCase, index + length);
|
|
178
|
-
}
|
|
179
|
-
indices.forEach((strIndex, i) => {
|
|
180
|
-
if (i === 0 && strIndex !== 0) {
|
|
181
|
-
textParts.push({ text: text.substr(0, strIndex), match: false });
|
|
182
|
-
}
|
|
183
|
-
textParts.push({ text: text.substr(strIndex, length), match: true });
|
|
184
|
-
if (strIndex + length < text.length) {
|
|
185
|
-
let noMatchLength = indices[i + 1] - strIndex - length;
|
|
186
|
-
if (i >= indices.length - 1) {
|
|
187
|
-
noMatchLength = text.length - strIndex - length;
|
|
188
|
-
}
|
|
189
|
-
textParts.push({ text: text.substr(strIndex + length, noMatchLength), match: false });
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
return textParts;
|
|
193
|
-
}
|
|
194
|
-
static IsValidEmail(str) {
|
|
195
|
-
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
196
|
-
return !!emailRegex.test(str);
|
|
197
|
-
}
|
|
198
|
-
static _escapeRegExp(str) {
|
|
199
|
-
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
|
|
200
|
-
}
|
|
201
|
-
static htmlToPlainText(html) {
|
|
202
|
-
return new DOMParser().parseFromString(html, "text/html").documentElement.textContent;
|
|
203
|
-
}
|
|
204
|
-
static CreateUuid() {
|
|
205
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
206
|
-
const r = Math.random() * 16 | 0;
|
|
207
|
-
const v = c === "x" ? r : (r & 0x3 | 0x8);
|
|
208
|
-
return v.toString(16);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
exports.StringUtils = StringUtils;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StringUtils = void 0;
|
|
4
|
+
const not_nill_function_1 = require("./function/not-nill.function");
|
|
5
|
+
const array_utils_1 = require("./array-utils");
|
|
6
|
+
const any_nill_function_1 = require("./function/any-nill.function");
|
|
7
|
+
const is_nill_function_1 = require("./function/is-nill.function");
|
|
8
|
+
class StringUtils {
|
|
9
|
+
static ReplaceOccurrencesIn(source, placeholder, ...replacementTexts) {
|
|
10
|
+
if ((0, is_nill_function_1.isNill)(source)) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
if (!placeholder || replacementTexts.length === 0) {
|
|
14
|
+
return source;
|
|
15
|
+
}
|
|
16
|
+
let outString = source;
|
|
17
|
+
if (replacementTexts.length === 1) {
|
|
18
|
+
outString = outString.replace(new RegExp(this._escapeRegExp(placeholder), "g"), replacementTexts[0]);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
for (let i = 0, len = replacementTexts.length; i < len; i++) {
|
|
22
|
+
outString = outString.replace(placeholder, replacementTexts[i]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return outString;
|
|
26
|
+
}
|
|
27
|
+
static ParseString(arg, defaultValue = "") {
|
|
28
|
+
if (!StringUtils.IsString(arg)) {
|
|
29
|
+
if (arg && typeof arg.toString === "function") {
|
|
30
|
+
arg = arg.toString();
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
arg = defaultValue;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return arg;
|
|
37
|
+
}
|
|
38
|
+
static IsString(str) {
|
|
39
|
+
return typeof str === "string";
|
|
40
|
+
}
|
|
41
|
+
static AsLowerCaseIfString(str) {
|
|
42
|
+
if (StringUtils.IsString(str)) {
|
|
43
|
+
return str.toLowerCase();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return str;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static IsStringWithLength(str) {
|
|
50
|
+
return (0, not_nill_function_1.notNill)(str) && StringUtils.IsString(str) && str.length > 0;
|
|
51
|
+
}
|
|
52
|
+
static Format(str, format) {
|
|
53
|
+
const args = Array.prototype.slice.call(format);
|
|
54
|
+
return str.replace(/{(\d+)}/g, function (match, number) {
|
|
55
|
+
return typeof args[number] !== "undefined" ? (args[number] !== null ? args[number] : "") : "";
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
static GetFirstCapital(str) {
|
|
59
|
+
if (!str || str.length === 0) {
|
|
60
|
+
return "";
|
|
61
|
+
}
|
|
62
|
+
let char = "";
|
|
63
|
+
for (let i = 0, len = str.length; i < len; i++) {
|
|
64
|
+
char = str.charAt(i);
|
|
65
|
+
if (isNaN(char * 1)) {
|
|
66
|
+
if (char === char.toUpperCase()) {
|
|
67
|
+
return str[i];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return str[0] ? str[0] : "";
|
|
72
|
+
}
|
|
73
|
+
static ToStringOrDefault(arg, defaultReturnVal = "") {
|
|
74
|
+
if ((0, not_nill_function_1.notNill)(arg) && arg.toString) {
|
|
75
|
+
return arg.toString();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return defaultReturnVal;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
static CapitalizeFirstLetter(str) {
|
|
82
|
+
if (str) {
|
|
83
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return "";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
static RemoveLastChars(str, amount) {
|
|
90
|
+
if (str) {
|
|
91
|
+
return str.slice(0, -1 * amount);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return str;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static StringArrayToString(strArray) {
|
|
98
|
+
if (!strArray) {
|
|
99
|
+
return "";
|
|
100
|
+
}
|
|
101
|
+
let str = "";
|
|
102
|
+
for (let i = 0, len = strArray.length; i < len; i++) {
|
|
103
|
+
str += strArray[i] + " ";
|
|
104
|
+
}
|
|
105
|
+
str = StringUtils.RemoveLastChars(str, 1);
|
|
106
|
+
return str;
|
|
107
|
+
}
|
|
108
|
+
static ToDictionaryKey(str) {
|
|
109
|
+
str = str.toLocaleUpperCase();
|
|
110
|
+
return str.replace(/-/g, "_");
|
|
111
|
+
}
|
|
112
|
+
static CloneStringArray(strArray) {
|
|
113
|
+
const clone = [];
|
|
114
|
+
if (strArray) {
|
|
115
|
+
for (let i = 0, len = strArray.length; i < len; i++) {
|
|
116
|
+
clone.push(strArray[i]);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return clone;
|
|
120
|
+
}
|
|
121
|
+
static StartsWithAny(strToCheck, prefixes) {
|
|
122
|
+
if (strToCheck && prefixes) {
|
|
123
|
+
for (let i = 0, len = prefixes.length; i < len; i++) {
|
|
124
|
+
if (strToCheck.startsWith(prefixes[i])) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
static LeftString(str, char) {
|
|
132
|
+
if (str) {
|
|
133
|
+
let result;
|
|
134
|
+
let split = str.split(char);
|
|
135
|
+
if (split.length === 1) {
|
|
136
|
+
result = str;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
split = split.slice(0, split.length - 1);
|
|
140
|
+
result = split.join(char);
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
static RightString(str, char) {
|
|
146
|
+
if (str) {
|
|
147
|
+
let result;
|
|
148
|
+
const split = str.split(char);
|
|
149
|
+
if (split.length > 1) {
|
|
150
|
+
result = split[split.length - 1];
|
|
151
|
+
}
|
|
152
|
+
return result;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
static StringToStringArray(str) {
|
|
156
|
+
if (!str) {
|
|
157
|
+
return [];
|
|
158
|
+
}
|
|
159
|
+
const strArray = str.split(" ");
|
|
160
|
+
array_utils_1.ArrayUtils.RemoveElementsByFilter(strArray, (txt) => {
|
|
161
|
+
return !txt || txt === "";
|
|
162
|
+
});
|
|
163
|
+
return strArray;
|
|
164
|
+
}
|
|
165
|
+
static GetTextParts(text, partsFilter) {
|
|
166
|
+
const textParts = [];
|
|
167
|
+
if ((0, any_nill_function_1.anyNill)(text, partsFilter)) {
|
|
168
|
+
return textParts;
|
|
169
|
+
}
|
|
170
|
+
const textUpperCase = text.toUpperCase();
|
|
171
|
+
const partsFilterUpperCase = partsFilter.toUpperCase();
|
|
172
|
+
let index = textUpperCase.indexOf(partsFilterUpperCase);
|
|
173
|
+
const indices = [];
|
|
174
|
+
const length = partsFilterUpperCase.length;
|
|
175
|
+
while (index >= 0) {
|
|
176
|
+
indices.push(index);
|
|
177
|
+
index = textUpperCase.indexOf(partsFilterUpperCase, index + length);
|
|
178
|
+
}
|
|
179
|
+
indices.forEach((strIndex, i) => {
|
|
180
|
+
if (i === 0 && strIndex !== 0) {
|
|
181
|
+
textParts.push({ text: text.substr(0, strIndex), match: false });
|
|
182
|
+
}
|
|
183
|
+
textParts.push({ text: text.substr(strIndex, length), match: true });
|
|
184
|
+
if (strIndex + length < text.length) {
|
|
185
|
+
let noMatchLength = indices[i + 1] - strIndex - length;
|
|
186
|
+
if (i >= indices.length - 1) {
|
|
187
|
+
noMatchLength = text.length - strIndex - length;
|
|
188
|
+
}
|
|
189
|
+
textParts.push({ text: text.substr(strIndex + length, noMatchLength), match: false });
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return textParts;
|
|
193
|
+
}
|
|
194
|
+
static IsValidEmail(str) {
|
|
195
|
+
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
196
|
+
return !!emailRegex.test(str);
|
|
197
|
+
}
|
|
198
|
+
static _escapeRegExp(str) {
|
|
199
|
+
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^$\|]/g, "\\$&");
|
|
200
|
+
}
|
|
201
|
+
static htmlToPlainText(html) {
|
|
202
|
+
return new DOMParser().parseFromString(html, "text/html").documentElement.textContent;
|
|
203
|
+
}
|
|
204
|
+
static CreateUuid() {
|
|
205
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
206
|
+
const r = Math.random() * 16 | 0;
|
|
207
|
+
const v = c === "x" ? r : (r & 0x3 | 0x8);
|
|
208
|
+
return v.toString(16);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.StringUtils = StringUtils;
|
|
213
213
|
//# sourceMappingURL=string-utils.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class UrlUtils {
|
|
2
|
-
static createReadableUrl(method: string, data: any, url: string, endPoint: string): string;
|
|
3
|
-
static addToUrl(url: string, add: string): string;
|
|
4
|
-
}
|
|
1
|
+
export declare class UrlUtils {
|
|
2
|
+
static createReadableUrl(method: string, data: any, url: string, endPoint: string): string;
|
|
3
|
+
static addToUrl(url: string, add: string): string;
|
|
4
|
+
}
|
package/build/utils/url-utils.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UrlUtils = void 0;
|
|
4
|
-
const slash = "/";
|
|
5
|
-
class UrlUtils {
|
|
6
|
-
static createReadableUrl(method, data, url, endPoint) {
|
|
7
|
-
url = url.trim();
|
|
8
|
-
url = url + (url.charAt(url.length - 1) === '/' ? '' : '/') + endPoint + '/' + method;
|
|
9
|
-
if (data) {
|
|
10
|
-
if (data.operationName) {
|
|
11
|
-
url += slash + data.operationName;
|
|
12
|
-
}
|
|
13
|
-
if (data.objectName) {
|
|
14
|
-
url += slash + data.objectName;
|
|
15
|
-
}
|
|
16
|
-
if (data.methodName) {
|
|
17
|
-
url += slash + data.methodName;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return url;
|
|
21
|
-
}
|
|
22
|
-
static addToUrl(url, add) {
|
|
23
|
-
const lastChar = url.slice(-1);
|
|
24
|
-
if (lastChar === slash) {
|
|
25
|
-
url += add;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
url += slash + add;
|
|
29
|
-
}
|
|
30
|
-
return url;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.UrlUtils = UrlUtils;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UrlUtils = void 0;
|
|
4
|
+
const slash = "/";
|
|
5
|
+
class UrlUtils {
|
|
6
|
+
static createReadableUrl(method, data, url, endPoint) {
|
|
7
|
+
url = url.trim();
|
|
8
|
+
url = url + (url.charAt(url.length - 1) === '/' ? '' : '/') + endPoint + '/' + method;
|
|
9
|
+
if (data) {
|
|
10
|
+
if (data.operationName) {
|
|
11
|
+
url += slash + data.operationName;
|
|
12
|
+
}
|
|
13
|
+
if (data.objectName) {
|
|
14
|
+
url += slash + data.objectName;
|
|
15
|
+
}
|
|
16
|
+
if (data.methodName) {
|
|
17
|
+
url += slash + data.methodName;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return url;
|
|
21
|
+
}
|
|
22
|
+
static addToUrl(url, add) {
|
|
23
|
+
const lastChar = url.slice(-1);
|
|
24
|
+
if (lastChar === slash) {
|
|
25
|
+
url += add;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
url += slash + add;
|
|
29
|
+
}
|
|
30
|
+
return url;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.UrlUtils = UrlUtils;
|
|
34
34
|
//# sourceMappingURL=url-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function communicationTypeValidator(): any;
|
|
1
|
+
export declare function communicationTypeValidator(): any;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.communicationTypeValidator = void 0;
|
|
4
|
-
const email_validator_1 = require("./email.validator");
|
|
5
|
-
const communication_type_enum_1 = require("../enum/communication-type.enum");
|
|
6
|
-
function communicationTypeValidator() {
|
|
7
|
-
return function (commType) {
|
|
8
|
-
if (commType === communication_type_enum_1.CommunicationType.Email) {
|
|
9
|
-
return email_validator_1.emailValidator;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.communicationTypeValidator = communicationTypeValidator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.communicationTypeValidator = void 0;
|
|
4
|
+
const email_validator_1 = require("./email.validator");
|
|
5
|
+
const communication_type_enum_1 = require("../enum/communication-type.enum");
|
|
6
|
+
function communicationTypeValidator() {
|
|
7
|
+
return function (commType) {
|
|
8
|
+
if (commType === communication_type_enum_1.CommunicationType.Email) {
|
|
9
|
+
return email_validator_1.emailValidator;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.communicationTypeValidator = communicationTypeValidator;
|
|
17
17
|
//# sourceMappingURL=communication-type.validator.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AbstractControl, ValidationErrors } from "@angular/forms";
|
|
2
|
-
export declare function emailValidator(control: AbstractControl): ValidationErrors | null;
|
|
1
|
+
import { AbstractControl, ValidationErrors } from "@angular/forms";
|
|
2
|
+
export declare function emailValidator(control: AbstractControl): ValidationErrors | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emailValidator = void 0;
|
|
4
|
-
function emailValidator(control) {
|
|
5
|
-
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
6
|
-
const isValid = !!emailRegex.test(control.value);
|
|
7
|
-
return isValid ? null : { "email": "MESSAGE_EMAIL_NOT_CORRECT" };
|
|
8
|
-
}
|
|
9
|
-
exports.emailValidator = emailValidator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emailValidator = void 0;
|
|
4
|
+
function emailValidator(control) {
|
|
5
|
+
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
6
|
+
const isValid = !!emailRegex.test(control.value);
|
|
7
|
+
return isValid ? null : { "email": "MESSAGE_EMAIL_NOT_CORRECT" };
|
|
8
|
+
}
|
|
9
|
+
exports.emailValidator = emailValidator;
|
|
10
10
|
//# sourceMappingURL=email.validator.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ValidatorFn } from "@angular/forms";
|
|
2
|
-
import { AddressCommonShape } from '../interface/address-common-shape.interface';
|
|
3
|
-
export declare function emptyAddressValidator(address: AddressCommonShape, msg: string): ValidatorFn;
|
|
1
|
+
import { ValidatorFn } from "@angular/forms";
|
|
2
|
+
import { AddressCommonShape } from '../interface/address-common-shape.interface';
|
|
3
|
+
export declare function emptyAddressValidator(address: AddressCommonShape, msg: string): ValidatorFn;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyAddressValidator = void 0;
|
|
4
|
-
function emptyAddressValidator(address, msg) {
|
|
5
|
-
return function (control) {
|
|
6
|
-
if (address.isNotEmptyAddress && !address.isNotEmptyAddress()) {
|
|
7
|
-
return { "address": msg };
|
|
8
|
-
}
|
|
9
|
-
return null;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
exports.emptyAddressValidator = emptyAddressValidator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyAddressValidator = void 0;
|
|
4
|
+
function emptyAddressValidator(address, msg) {
|
|
5
|
+
return function (control) {
|
|
6
|
+
if (address.isNotEmptyAddress && !address.isNotEmptyAddress()) {
|
|
7
|
+
return { "address": msg };
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.emptyAddressValidator = emptyAddressValidator;
|
|
13
13
|
//# sourceMappingURL=empty-address.validator.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidatorFn } from "@angular/forms";
|
|
2
|
-
export declare function emptyArrayValidator(array: any[]): ValidatorFn;
|
|
1
|
+
import { ValidatorFn } from "@angular/forms";
|
|
2
|
+
export declare function emptyArrayValidator(array: any[]): ValidatorFn;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyArrayValidator = void 0;
|
|
4
|
-
const array_utils_1 = require("../utils/array-utils");
|
|
5
|
-
function emptyArrayValidator(array) {
|
|
6
|
-
return function (control) {
|
|
7
|
-
let isValid = true;
|
|
8
|
-
if (control) {
|
|
9
|
-
isValid = array_utils_1.ArrayUtils.IsArrayWithElements(array);
|
|
10
|
-
}
|
|
11
|
-
return isValid ? null : { "emptyArray": "MESSAGE_FIELD_REQUIRED" };
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
exports.emptyArrayValidator = emptyArrayValidator;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyArrayValidator = void 0;
|
|
4
|
+
const array_utils_1 = require("../utils/array-utils");
|
|
5
|
+
function emptyArrayValidator(array) {
|
|
6
|
+
return function (control) {
|
|
7
|
+
let isValid = true;
|
|
8
|
+
if (control) {
|
|
9
|
+
isValid = array_utils_1.ArrayUtils.IsArrayWithElements(array);
|
|
10
|
+
}
|
|
11
|
+
return isValid ? null : { "emptyArray": "MESSAGE_FIELD_REQUIRED" };
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.emptyArrayValidator = emptyArrayValidator;
|
|
15
15
|
//# sourceMappingURL=empty-array.validator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function endDateEqualValidator(): any;
|
|
1
|
+
export declare function endDateEqualValidator(): any;
|