@progressive-development/pd-forms 0.1.25 → 0.1.27

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent pd-forms following open-wc recommendations",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.1.25",
6
+ "version": "0.1.27",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -25,6 +25,7 @@ import {
25
25
  INPUT_TYPE_AREA,
26
26
  INPUT_TYPE_SELECT,
27
27
  INPUT_TYPE_TEXT,
28
+ INPUT_TYPE_DATE,
28
29
  } from './PdBaseUiInput.js';
29
30
 
30
31
  import { SharedInputFieldStyles } from './shared-input-field-styles.js';
@@ -89,6 +90,8 @@ export class PdBaseInputElement extends PdBaseUIInput {
89
90
  return 'select';
90
91
  case INPUT_TYPE_TEXT:
91
92
  return 'input';
93
+ case INPUT_TYPE_DATE:
94
+ return 'vaadin-date-picker';
92
95
  default:
93
96
  return '';
94
97
  }
@@ -44,6 +44,7 @@ import { SharedInputStyles } from './shared-input-styles.js';
44
44
  export const INPUT_TYPE_RANGE = 4;
45
45
  export const INPUT_TYPE_AREA = 5;
46
46
  export const INPUT_TYPE_CHECK_GROUP = 6;
47
+ export const INPUT_TYPE_DATE = 7;
47
48
 
48
49
  /**
49
50
  * Specific key codes for input events.
@@ -90,8 +90,9 @@ export class PdFormContainer extends PdBaseUI {
90
90
  <slot></slot>
91
91
  ${this.requiredFieldInfo ? html`
92
92
  <div class="validation-info-container">
93
- <p class="validation-info ${(this._requiredFieldsValid && this.commonError === "") ? 'filled' : 'unfilled'}">
94
- ${this.commonError || msg('* Pflichtfeld',{desc: '#pd.form.required.info#'})}
93
+ <p class="validation-info ${(this._requiredFieldsValid && (!this.commonError || this.commonError === "")) ? 'filled' : 'unfilled'}">
94
+ ${this.commonError || (this._requiredFieldsValid ? msg('* Pflichtfelder ausgefüllt',{desc: '#pd.form.required.valid#'})
95
+ : msg('* Pflichtfeld',{desc: '#pd.form.required.info#'}))}
95
96
  </p>
96
97
  </div>` : ''}
97
98
  </form>
@@ -151,6 +152,7 @@ export class PdFormContainer extends PdBaseUI {
151
152
  msg("Format +49123 123456 verwenden",{desc: '#pd.form.field.invalid.phone#'}));
152
153
  validateByType("vat", PdFormContainer._vatIsValid,
153
154
  msg("Format DE0123456789 verwenden",{desc: '#pd.form.field.invalid.vat#'}));
155
+ // eslint-disable-next-line no-restricted-globals
154
156
  validateByType("number", (val) => !isNaN(val),
155
157
  msg("Nur Zahlen erlaubt",{desc: '#pd.form.field.invalid.number#'}));
156
158