@vgip/meta-ui 1.2.5 → 1.2.6

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.
@@ -1182,10 +1182,10 @@ const wordToMilliseconds = {
1182
1182
  days: 1000 * 60 * 60 * 24
1183
1183
  };
1184
1184
  const protoTime = (text) => {
1185
- const protoMatch = (text || '').match(/^(-?)(\d+).(\S+)$/);
1185
+ const protoMatch = (text || '').match(/^(-?)((\d+).)?(\S+)$/);
1186
1186
  if (protoMatch) {
1187
1187
  const negative = protoMatch[1] === '-';
1188
- const units = parseInt(protoMatch[2], 10) * (wordToMilliseconds[protoMatch[3]] || 0);
1188
+ const units = parseInt(protoMatch[3], 10) * (wordToMilliseconds[protoMatch[4]] || 0);
1189
1189
  if (negative) {
1190
1190
  return -units;
1191
1191
  }
@@ -4380,7 +4380,7 @@ class MetaResource {
4380
4380
  this.formErrors = parsedError.message || 'There is a problem with one or more fields';
4381
4381
  if (parsedError.errors && parsedError.errors.length) {
4382
4382
  this.formErrors += ` (${parsedError.errors.map(e => e.message).join(', ')})`;
4383
- for (let pe of parsedError.errors) {
4383
+ for (const pe of parsedError.errors) {
4384
4384
  if (resourceForm.controls[pe.field]) {
4385
4385
  resourceForm.controls[pe.field].setErrors({ invalid: true, custom: pe.message });
4386
4386
  }
@@ -5258,3 +5258,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
5258
5258
  */
5259
5259
 
5260
5260
  export { FieldBoolean, FieldComposite, FieldDatetime, FieldInput, FieldList, FieldRadio, FieldReference, FieldRichtext, FieldSelect, FieldText, FieldUnknown, MetaAutofocusDirective, MetaContextService, MetaField, MetaFieldContentDirective, MetaHttpClient, MetaIconsPipe, MetaLayout, MetaModelPipe, MetaModule, MetaMsgService, MetaRefDialog, MetaReferenceService, MetaResource, MetaResourceCard, MetaResourceService, MetaStripHtmlPipe, MetaTrackerService, ResourceDraftsService, metaDark, metaLight, metaNormalizer, relativeTimeBuilder };
5261
+ //# sourceMappingURL=vgip-meta-ui.mjs.map