taxtank-core 0.29.10 → 0.29.12
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/bundles/taxtank-core.umd.js +27 -26
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/phone/phone.form.js +9 -7
- package/esm2015/lib/forms/sole/sole-contact.form.js +2 -4
- package/esm2015/lib/models/property/property-document.js +2 -2
- package/fesm2015/taxtank-core.js +25 -23
- package/fesm2015/taxtank-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -6193,7 +6193,7 @@
|
|
|
6193
6193
|
__extends(PropertyDocument, _super);
|
|
6194
6194
|
function PropertyDocument() {
|
|
6195
6195
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
6196
|
-
_this.type = exports.AssetTypeEnum.
|
|
6196
|
+
_this.type = exports.AssetTypeEnum.PROPERTY;
|
|
6197
6197
|
_this.entityType = exports.AssetEntityTypeEnum.PROPERTIES;
|
|
6198
6198
|
return _this;
|
|
6199
6199
|
}
|
|
@@ -19215,30 +19215,6 @@
|
|
|
19215
19215
|
return SoleBusinessLossForm;
|
|
19216
19216
|
}(AbstractForm));
|
|
19217
19217
|
|
|
19218
|
-
var phonePattern = /^(((\s*)?([- ()]?\d[- ()]?){0,30}(\s*)?)|)$/;
|
|
19219
|
-
/**
|
|
19220
|
-
* Validator for phone number
|
|
19221
|
-
* Allowed special symbols"-", "(", ")"
|
|
19222
|
-
*/
|
|
19223
|
-
function phoneNumberValidator() {
|
|
19224
|
-
return function (control) {
|
|
19225
|
-
return phonePattern.test(control.value) ? null : { phoneInvalid: true };
|
|
19226
|
-
};
|
|
19227
|
-
}
|
|
19228
|
-
|
|
19229
|
-
var PhoneForm = /** @class */ (function (_super) {
|
|
19230
|
-
__extends(PhoneForm, _super);
|
|
19231
|
-
function PhoneForm(phone) {
|
|
19232
|
-
if (phone === void 0) { phone = classTransformer.plainToClass(Phone, {}); }
|
|
19233
|
-
return _super.call(this, {
|
|
19234
|
-
type: new forms.FormControl(phone.type, forms.Validators.required),
|
|
19235
|
-
country: new forms.FormControl(phone.country, forms.Validators.required),
|
|
19236
|
-
number: new forms.FormControl(phone.number, [forms.Validators.required, phoneNumberValidator()])
|
|
19237
|
-
}, phone) || this;
|
|
19238
|
-
}
|
|
19239
|
-
return PhoneForm;
|
|
19240
|
-
}(AbstractForm));
|
|
19241
|
-
|
|
19242
19218
|
var SoleContactForm = /** @class */ (function (_super) {
|
|
19243
19219
|
__extends(SoleContactForm, _super);
|
|
19244
19220
|
function SoleContactForm(contact) {
|
|
@@ -19249,7 +19225,7 @@
|
|
|
19249
19225
|
firstName: new forms.FormControl(contact.firstName, forms.Validators.required),
|
|
19250
19226
|
lastName: new forms.FormControl(contact.lastName, forms.Validators.required),
|
|
19251
19227
|
email: new forms.FormControl(contact.email, [forms.Validators.required, forms.Validators.email]),
|
|
19252
|
-
phone: new
|
|
19228
|
+
phone: new forms.FormControl(contact.phone),
|
|
19253
19229
|
address: new AddressForm(contact.address || classTransformer.plainToClass(Address, {}))
|
|
19254
19230
|
}, contact) || this;
|
|
19255
19231
|
}
|
|
@@ -19803,6 +19779,31 @@
|
|
|
19803
19779
|
return LoginForm;
|
|
19804
19780
|
}(AbstractForm));
|
|
19805
19781
|
|
|
19782
|
+
var phonePattern = /^(((\s*)?([- ()]?\d[- ()]?){0,30}(\s*)?)|)$/;
|
|
19783
|
+
/**
|
|
19784
|
+
* Validator for phone number
|
|
19785
|
+
* Allowed special symbols"-", "(", ")"
|
|
19786
|
+
*/
|
|
19787
|
+
function phoneNumberValidator() {
|
|
19788
|
+
return function (control) {
|
|
19789
|
+
return phonePattern.test(control.value) ? null : { phoneInvalid: true };
|
|
19790
|
+
};
|
|
19791
|
+
}
|
|
19792
|
+
|
|
19793
|
+
var PhoneForm = /** @class */ (function (_super) {
|
|
19794
|
+
__extends(PhoneForm, _super);
|
|
19795
|
+
function PhoneForm(
|
|
19796
|
+
// no default value because this form is always built-in, so phone passed from parent form
|
|
19797
|
+
phone) {
|
|
19798
|
+
return _super.call(this, {
|
|
19799
|
+
type: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.type) || exports.PhoneTypeEnum.MOBILE, forms.Validators.required),
|
|
19800
|
+
country: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.country) || Country.australia, forms.Validators.required),
|
|
19801
|
+
number: new forms.FormControl((phone === null || phone === void 0 ? void 0 : phone.number) || null, [forms.Validators.required, phoneNumberValidator()])
|
|
19802
|
+
}, phone) || this;
|
|
19803
|
+
}
|
|
19804
|
+
return PhoneForm;
|
|
19805
|
+
}(AbstractForm));
|
|
19806
|
+
|
|
19806
19807
|
// @TODO Alex: Create a model and handle request fields via class-transformer
|
|
19807
19808
|
var PasswordForm = /** @class */ (function (_super) {
|
|
19808
19809
|
__extends(PasswordForm, _super);
|