@progressive-development/pd-forms 0.9.2 → 1.0.0
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/LICENSE +21 -2
- package/README.md +56 -62
- package/dist/base/pd-base-input-element.d.ts +10 -10
- package/dist/base/pd-base-input-element.d.ts.map +1 -1
- package/dist/base/pd-base-input-element.js +8 -1
- package/dist/base/pd-base-ui-input.d.ts +41 -16
- package/dist/base/pd-base-ui-input.d.ts.map +1 -1
- package/dist/base/pd-base-ui-input.js +25 -6
- package/dist/base/pd-base-ui.js +0 -18
- package/dist/generated/locales/be.d.ts +3 -0
- package/dist/generated/locales/be.d.ts.map +1 -1
- package/dist/generated/locales/de.d.ts +3 -0
- package/dist/generated/locales/de.d.ts.map +1 -1
- package/dist/generated/locales/en.d.ts +3 -0
- package/dist/generated/locales/en.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/locales/be.js +4 -1
- package/dist/locales/de.js +4 -1
- package/dist/locales/en.js +4 -1
- package/dist/pd-button/PdButton.d.ts +171 -37
- package/dist/pd-button/PdButton.d.ts.map +1 -1
- package/dist/pd-button/PdButton.js +502 -71
- package/dist/pd-button/pd-button.stories.d.ts +82 -10
- package/dist/pd-button/pd-button.stories.d.ts.map +1 -1
- package/dist/pd-button-group/PdButtonGroup.d.ts +25 -0
- package/dist/pd-button-group/PdButtonGroup.d.ts.map +1 -1
- package/dist/pd-button-group/PdButtonGroup.js +52 -27
- package/dist/pd-button-group/pd-button-group.stories.d.ts +42 -17
- package/dist/pd-button-group/pd-button-group.stories.d.ts.map +1 -1
- package/dist/pd-button-select-group/PdButtonSelectGroup.d.ts +17 -3
- package/dist/pd-button-select-group/PdButtonSelectGroup.d.ts.map +1 -1
- package/dist/pd-button-select-group/PdButtonSelectGroup.js +23 -19
- package/dist/pd-button-select-group/pd-button-select-group.stories.d.ts +43 -18
- package/dist/pd-button-select-group/pd-button-select-group.stories.d.ts.map +1 -1
- package/dist/pd-checkbox/PdCheckbox.d.ts +23 -2
- package/dist/pd-checkbox/PdCheckbox.d.ts.map +1 -1
- package/dist/pd-checkbox/PdCheckbox.js +85 -21
- package/dist/pd-checkbox/pd-checkbox.stories.d.ts +43 -27
- package/dist/pd-checkbox/pd-checkbox.stories.d.ts.map +1 -1
- package/dist/pd-form-container/PdFormContainer.d.ts +30 -9
- package/dist/pd-form-container/PdFormContainer.d.ts.map +1 -1
- package/dist/pd-form-container/PdFormContainer.js +59 -8
- package/dist/pd-form-container/pd-form-container.stories.d.ts +49 -0
- package/dist/pd-form-container/pd-form-container.stories.d.ts.map +1 -0
- package/dist/pd-form-field/PdFormField.d.ts +35 -0
- package/dist/pd-form-field/PdFormField.d.ts.map +1 -0
- package/dist/pd-form-field/PdFormField.js +38 -0
- package/dist/pd-form-field/pd-form-field.d.ts +3 -0
- package/dist/pd-form-field/pd-form-field.d.ts.map +1 -0
- package/dist/pd-form-field/pd-form-field.stories.d.ts +40 -0
- package/dist/pd-form-field/pd-form-field.stories.d.ts.map +1 -0
- package/dist/pd-form-field.d.ts +2 -0
- package/dist/pd-form-field.js +8 -0
- package/dist/pd-form-fieldset/PdFormFieldset.d.ts +144 -0
- package/dist/pd-form-fieldset/PdFormFieldset.d.ts.map +1 -0
- package/dist/pd-form-fieldset/PdFormFieldset.js +364 -0
- package/dist/pd-form-fieldset/index.d.ts +2 -0
- package/dist/pd-form-fieldset/index.d.ts.map +1 -0
- package/dist/pd-form-fieldset/pd-form-fieldset.d.ts +3 -0
- package/dist/pd-form-fieldset/pd-form-fieldset.d.ts.map +1 -0
- package/dist/pd-form-fieldset/pd-form-fieldset.js +8 -0
- package/dist/pd-form-fieldset/pd-form-fieldset.stories.d.ts +38 -0
- package/dist/pd-form-fieldset/pd-form-fieldset.stories.d.ts.map +1 -0
- package/dist/pd-form-row/PdFormRow.d.ts +35 -5
- package/dist/pd-form-row/PdFormRow.d.ts.map +1 -1
- package/dist/pd-form-row/PdFormRow.js +135 -69
- package/dist/pd-form-row/pd-form-row.stories.d.ts +41 -25
- package/dist/pd-form-row/pd-form-row.stories.d.ts.map +1 -1
- package/dist/pd-generic-form/PdGenericForm.d.ts +50 -0
- package/dist/pd-generic-form/PdGenericForm.d.ts.map +1 -0
- package/dist/pd-generic-form/PdGenericForm.js +334 -0
- package/dist/pd-generic-form/pd-generic-form.d.ts +3 -0
- package/dist/pd-generic-form/pd-generic-form.d.ts.map +1 -0
- package/dist/pd-generic-form/pd-generic-form.stories.d.ts +35 -0
- package/dist/pd-generic-form/pd-generic-form.stories.d.ts.map +1 -0
- package/dist/pd-generic-form/pd-generic-form.styles.d.ts +2 -0
- package/dist/pd-generic-form/pd-generic-form.styles.d.ts.map +1 -0
- package/dist/pd-generic-form/pd-generic-form.styles.js +110 -0
- package/dist/pd-generic-form/pd-generic-form.test.d.ts +1 -0
- package/dist/pd-generic-form/pd-generic-form.test.d.ts.map +1 -0
- package/dist/pd-generic-form.d.ts +2 -0
- package/dist/pd-generic-form.js +8 -0
- package/dist/pd-hover-box/PdHoverBox.d.ts +61 -11
- package/dist/pd-hover-box/PdHoverBox.d.ts.map +1 -1
- package/dist/pd-hover-box/PdHoverBox.js +130 -28
- package/dist/pd-hover-box/pd-hover-box.stories.d.ts +28 -5
- package/dist/pd-hover-box/pd-hover-box.stories.d.ts.map +1 -1
- package/dist/pd-input/PdComboboxInput.d.ts +20 -0
- package/dist/pd-input/PdComboboxInput.d.ts.map +1 -0
- package/dist/pd-input/PdComboboxInput.js +67 -0
- package/dist/pd-input/PdInput.d.ts +33 -15
- package/dist/pd-input/PdInput.d.ts.map +1 -1
- package/dist/pd-input/PdInput.js +49 -21
- package/dist/pd-input/pd-input.stories.d.ts +71 -35
- package/dist/pd-input/pd-input.stories.d.ts.map +1 -1
- package/dist/pd-input-area/PdInputArea.d.ts +19 -6
- package/dist/pd-input-area/PdInputArea.d.ts.map +1 -1
- package/dist/pd-input-area/PdInputArea.js +17 -15
- package/dist/pd-input-area/pd-input-area.stories.d.ts +65 -52
- package/dist/pd-input-area/pd-input-area.stories.d.ts.map +1 -1
- package/dist/pd-input-file/PdInputFile.d.ts +24 -0
- package/dist/pd-input-file/PdInputFile.d.ts.map +1 -1
- package/dist/pd-input-file/PdInputFile.js +53 -22
- package/dist/pd-input-file/pd-input-file.stories.d.ts +51 -47
- package/dist/pd-input-file/pd-input-file.stories.d.ts.map +1 -1
- package/dist/pd-input-time/PdInputTime.d.ts +21 -0
- package/dist/pd-input-time/PdInputTime.d.ts.map +1 -1
- package/dist/pd-input-time/PdInputTime.js +48 -22
- package/dist/pd-input-time/pd-input-time.stories.d.ts +94 -0
- package/dist/pd-input-time/pd-input-time.stories.d.ts.map +1 -0
- package/dist/pd-panel-button/PdPanelButton.d.ts +50 -34
- package/dist/pd-panel-button/PdPanelButton.d.ts.map +1 -1
- package/dist/pd-panel-button/PdPanelButton.js +149 -262
- package/dist/pd-panel-button/pd-panel-button.stories.d.ts +55 -25
- package/dist/pd-panel-button/pd-panel-button.stories.d.ts.map +1 -1
- package/dist/pd-radio-group/PdRadioGroup.d.ts +14 -0
- package/dist/pd-radio-group/PdRadioGroup.d.ts.map +1 -1
- package/dist/pd-radio-group/PdRadioGroup.js +48 -11
- package/dist/pd-radio-group/pd-radio-group.stories.d.ts +37 -7
- package/dist/pd-radio-group/pd-radio-group.stories.d.ts.map +1 -1
- package/dist/pd-range/PdRange.d.ts +22 -2
- package/dist/pd-range/PdRange.d.ts.map +1 -1
- package/dist/pd-range/PdRange.js +54 -43
- package/dist/pd-range/pd-range.stories.d.ts +49 -7
- package/dist/pd-range/pd-range.stories.d.ts.map +1 -1
- package/dist/pd-select/PdSelect.d.ts +16 -4
- package/dist/pd-select/PdSelect.d.ts.map +1 -1
- package/dist/pd-select/PdSelect.js +23 -21
- package/dist/pd-select/pd-select.stories.d.ts +56 -35
- package/dist/pd-select/pd-select.stories.d.ts.map +1 -1
- package/dist/pd-suggestion-box/PdSuggestionBox.d.ts +74 -0
- package/dist/pd-suggestion-box/PdSuggestionBox.d.ts.map +1 -0
- package/dist/pd-suggestion-box/PdSuggestionBox.js +277 -0
- package/dist/pd-suggestion-box/PdSuggestionPanel.d.ts +42 -0
- package/dist/pd-suggestion-box/PdSuggestionPanel.d.ts.map +1 -0
- package/dist/pd-suggestion-box/PdSuggestionPanel.js +227 -0
- package/dist/pd-suggestion-box/pd-suggestion-box.d.ts +3 -0
- package/dist/pd-suggestion-box/pd-suggestion-box.d.ts.map +1 -0
- package/dist/pd-suggestion-box/pd-suggestion-box.stories.d.ts +79 -0
- package/dist/pd-suggestion-box/pd-suggestion-box.stories.d.ts.map +1 -0
- package/dist/pd-suggestion-box.d.ts +2 -0
- package/dist/pd-suggestion-box.js +8 -0
- package/dist/pd-utils/dist/position-helper.js +35 -0
- package/dist/stories/pd-forms-overview.stories.d.ts +48 -0
- package/dist/stories/pd-forms-overview.stories.d.ts.map +1 -0
- package/dist/stories/story-helpers.d.ts +10 -0
- package/dist/stories/story-helpers.d.ts.map +1 -0
- package/dist/styles/shared-input-field-styles.d.ts.map +1 -1
- package/dist/styles/shared-input-field-styles.js +13 -19
- package/dist/styles/shared-input-styles.d.ts.map +1 -1
- package/dist/styles/shared-input-styles.js +18 -14
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -4
- package/dist/pd-form-container/form-container.stories.d.ts +0 -28
- package/dist/pd-form-container/form-container.stories.d.ts.map +0 -1
- package/dist/pd-form-container/form-container2.stories.d.ts +0 -8
- package/dist/pd-form-container/form-container2.stories.d.ts.map +0 -1
- package/dist/pd-form-container/form-container3.stories.d.ts +0 -11
- package/dist/pd-form-container/form-container3.stories.d.ts.map +0 -1
- package/dist/stories/01_index.stories.d.ts +0 -58
- package/dist/stories/01_index.stories.d.ts.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present PD Progressive Development UG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,76 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @progressive-development/pd-forms
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@progressive-development/pd-forms)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Accessible, themeable form components built with Lit.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Lit 3 & TypeScript** – Modern, type-safe web components
|
|
11
|
+
- **Accessible** – WCAG 2.1 compliant, keyboard navigation, ARIA support
|
|
12
|
+
- **Themeable** – CSS Custom Properties for easy customization
|
|
13
|
+
- **Localized** – Built-in i18n support (EN, DE, BE)
|
|
14
|
+
- **Lightweight** – No heavy dependencies, tree-shakeable
|
|
15
|
+
- **Framework-agnostic** – Works with React, Vue, Angular, or vanilla JS
|
|
16
|
+
- **Complete Form Toolkit** – All form elements covered: inputs, selects, checkboxes, radios, file uploads, ranges, and autocomplete
|
|
17
|
+
- **Flexible Layout System** – Nested containers, rows, fieldsets, and form-fields with 12-column grid alignment
|
|
18
|
+
- **Async Validation** – Promise-based validators for backend checks like email uniqueness
|
|
19
|
+
- **Centralized Form State** – Auto-tracked validity, dirty/pristine, and touched states via `<pd-form-container>`
|
|
20
|
+
- **Consistent Cross-Browser UI** – Custom-styled checkboxes, radios, and selects that look identical everywhere
|
|
21
|
+
- **Rich Helper Text** – Descriptions, hints, error messages, and character counts per field
|
|
4
22
|
|
|
5
23
|
## Installation
|
|
6
24
|
|
|
7
25
|
```bash
|
|
8
|
-
npm
|
|
26
|
+
npm install @progressive-development/pd-forms
|
|
9
27
|
```
|
|
10
28
|
|
|
11
|
-
##
|
|
29
|
+
## Quick Start
|
|
12
30
|
|
|
13
31
|
```html
|
|
14
32
|
<script type="module">
|
|
15
|
-
import '
|
|
33
|
+
import '@progressive-development/pd-forms';
|
|
16
34
|
</script>
|
|
17
35
|
|
|
18
|
-
<pd-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
To scan the project for linting and formatting errors, run
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm run lint
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
To automatically fix linting and formatting errors, run
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm run format
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Testing with Web Test Runner
|
|
36
|
-
|
|
37
|
-
To execute a single test run:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm run test
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
To run the tests in interactive watch mode run:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm run test:watch
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Demoing with Storybook
|
|
50
|
-
|
|
51
|
-
To run a local instance of Storybook for your component, run
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm run storybook
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
To build a production version of Storybook, run
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm run storybook:build
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Tooling configs
|
|
65
|
-
|
|
66
|
-
For most of the tools, the configuration is in the `package.json` to minimize the amount of files in your project.
|
|
67
|
-
|
|
68
|
-
If you customize the configuration a lot, you can consider moving them to individual files.
|
|
69
|
-
|
|
70
|
-
## Local Demo with `web-dev-server`
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm start
|
|
36
|
+
<pd-form-container>
|
|
37
|
+
<pd-input label="Name" required></pd-input>
|
|
38
|
+
<pd-button type="submit">Submit</pd-button>
|
|
39
|
+
</pd-form-container>
|
|
74
40
|
```
|
|
75
41
|
|
|
76
|
-
|
|
42
|
+
## Components
|
|
43
|
+
|
|
44
|
+
| Component | Description |
|
|
45
|
+
|-----------|-------------|
|
|
46
|
+
| `<pd-button>` | Button with variants and states |
|
|
47
|
+
| `<pd-button-group>` | Group multiple buttons |
|
|
48
|
+
| `<pd-button-select-group>` | Toggle button selection group |
|
|
49
|
+
| `<pd-panel-button>` | Large panel-style button |
|
|
50
|
+
| `<pd-checkbox>` | Checkbox with label |
|
|
51
|
+
| `<pd-radio-group>` | Radio button group |
|
|
52
|
+
| `<pd-input>` | Text input with validation |
|
|
53
|
+
| `<pd-input-area>` | Multi-line text input |
|
|
54
|
+
| `<pd-input-file>` | File upload input |
|
|
55
|
+
| `<pd-input-time>` | Time picker input |
|
|
56
|
+
| `<pd-select>` | Dropdown select |
|
|
57
|
+
| `<pd-range>` | Range slider |
|
|
58
|
+
| `<pd-suggestion-box>` | Autocomplete input |
|
|
59
|
+
| `<pd-form-container>` | Form layout container |
|
|
60
|
+
| `<pd-form-field>` | Form field wrapper |
|
|
61
|
+
| `<pd-form-row>` | Form row layout |
|
|
62
|
+
| `<pd-hover-box>` | Hover-triggered content box |
|
|
63
|
+
|
|
64
|
+
## Documentation
|
|
65
|
+
|
|
66
|
+
📖 **Full documentation:** [pd-components.web.app](https://pd-components.web.app/)
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT © [PD Progressive Development UG](https://progressive-development.com)
|
|
@@ -2,24 +2,24 @@ import { CSSResultGroup } from 'lit';
|
|
|
2
2
|
import { PdBaseUIInput } from './pd-base-ui-input.js';
|
|
3
3
|
import { PdAutocomplete } from '../types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Abstract base class for pd-input components (Input, Area, Select).
|
|
6
|
+
*
|
|
7
|
+
* @event pd-form-element-blur - Fired when input loses focus.
|
|
8
|
+
* @event pd-form-element-focus - Fired when input gains focus.
|
|
6
9
|
*/
|
|
7
10
|
export declare abstract class PdBaseInputElement extends PdBaseUIInput {
|
|
8
|
-
/**
|
|
9
|
-
* Placeholder für Eingabefeld.
|
|
10
|
-
*/
|
|
11
|
+
/** Placeholder text for the input field. */
|
|
11
12
|
placeHolder: string;
|
|
12
|
-
/**
|
|
13
|
-
* Interner Name des Eingabefelds (nicht verwendet), Backup für Autocomplete.
|
|
14
|
-
*/
|
|
13
|
+
/** Internal field name for autocomplete fallback. */
|
|
15
14
|
name: string;
|
|
16
|
-
/**
|
|
17
|
-
* Attribut für native Autocomplete-Unterstützung.
|
|
18
|
-
*/
|
|
15
|
+
/** Native autocomplete attribute value. */
|
|
19
16
|
autoCompleteName: PdAutocomplete;
|
|
17
|
+
/** @ignore */
|
|
20
18
|
protected _input: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | PdBaseInputElement;
|
|
19
|
+
/** @ignore */
|
|
21
20
|
private _delayTimerId?;
|
|
22
21
|
static styles: CSSResultGroup;
|
|
22
|
+
disconnectedCallback(): void;
|
|
23
23
|
firstUpdated(): void;
|
|
24
24
|
focus(): void;
|
|
25
25
|
protected _onBlur(event: Event): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pd-base-input-element.d.ts","sourceRoot":"","sources":["../../src/base/pd-base-input-element.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EAOd,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C
|
|
1
|
+
{"version":3,"file":"pd-base-input-element.d.ts","sourceRoot":"","sources":["../../src/base/pd-base-input-element.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,EACL,aAAa,EAOd,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAK7C;;;;;GAKG;AACH,8BAAsB,kBAAmB,SAAQ,aAAa;IAC5D,4CAA4C;IAE5C,WAAW,SAAM;IAEjB,qDAAqD;IAErD,IAAI,SAAM;IAEV,2CAA2C;IAE3C,gBAAgB,EAAE,cAAc,CAAS;IAEzC,cAAc;IACd,SAAS,CAAC,MAAM,EACZ,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,CAAC;IAEvB,cAAc;IACd,OAAO,CAAC,aAAa,CAAC,CAAS;IAE/B,OAAgB,MAAM,EAAE,cAAc,CAGpC;IAEO,oBAAoB,IAAI,IAAI;IAQ5B,YAAY,IAAI,IAAI;IAO7B,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAuBrC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IActC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAWrC,iCAAiC,CAAC,MAAM,EAAE,OAAO;IAO1D,SAAS,CAAC,eAAe,IAAI,MAAM;IAiB1B,eAAe;CAezB"}
|
|
@@ -25,6 +25,13 @@ class PdBaseInputElement extends PdBaseUIInput {
|
|
|
25
25
|
SharedInputFieldStyles
|
|
26
26
|
];
|
|
27
27
|
}
|
|
28
|
+
disconnectedCallback() {
|
|
29
|
+
if (this._delayTimerId) {
|
|
30
|
+
clearTimeout(this._delayTimerId);
|
|
31
|
+
this._delayTimerId = void 0;
|
|
32
|
+
}
|
|
33
|
+
super.disconnectedCallback();
|
|
34
|
+
}
|
|
28
35
|
firstUpdated() {
|
|
29
36
|
this._input = this.shadowRoot?.querySelector(
|
|
30
37
|
this._getElementName()
|
|
@@ -103,7 +110,7 @@ class PdBaseInputElement extends PdBaseUIInput {
|
|
|
103
110
|
return this.fieldType === "number" ? Number(this._value) : this._value;
|
|
104
111
|
}
|
|
105
112
|
} catch (e) {
|
|
106
|
-
|
|
113
|
+
return null;
|
|
107
114
|
}
|
|
108
115
|
return this._value;
|
|
109
116
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultGroup, PropertyValues } from 'lit';
|
|
1
|
+
import { CSSResultGroup, PropertyValues, nothing } from 'lit';
|
|
2
2
|
import { PdBaseUI } from './pd-base-ui';
|
|
3
3
|
import { PdFieldType, PdFormValidatorFn } from '../types';
|
|
4
4
|
/**
|
|
@@ -16,51 +16,76 @@ export declare const INPUT_TYPE_CHECK_GROUP = 6;
|
|
|
16
16
|
export declare const INPUT_TYPE_DATE = 7;
|
|
17
17
|
export declare const INPUT_TYPE_FILE = 8;
|
|
18
18
|
export declare const INPUT_TYPE_TIME = 9;
|
|
19
|
+
/**
|
|
20
|
+
* Abstract base class for pd-input elements.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @event validate-form - Fired when input value changes for form validation.
|
|
24
|
+
* @event enter-pressed - Fired when Enter key pressed during focus.
|
|
25
|
+
* @event pd-form-element-change - Fired when field value changes with state details.
|
|
26
|
+
*/
|
|
19
27
|
export declare abstract class PdBaseUIInput extends PdBaseUI {
|
|
20
|
-
/**
|
|
21
|
-
* Fired when an input element change its values.
|
|
22
|
-
* @event validate-form
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* Fired when enter was pressend during focus on input element.
|
|
26
|
-
* @event enter-pressed
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* Fired when field-value changed.
|
|
30
|
-
* @event pd-form-element-change
|
|
31
|
-
*/
|
|
28
|
+
/** Apply gradient styling. */
|
|
32
29
|
gradient: boolean;
|
|
30
|
+
/** Disable the input. */
|
|
33
31
|
disabled: boolean;
|
|
32
|
+
/** Make the input read-only. */
|
|
34
33
|
readonly: boolean;
|
|
34
|
+
/** Mark the input as required. */
|
|
35
35
|
required: boolean;
|
|
36
|
+
/** Custom error message for required validation. */
|
|
36
37
|
requiredMsg: string;
|
|
38
|
+
/** Helper text shown via hover icon. */
|
|
37
39
|
helperTxt: string;
|
|
40
|
+
/** Field name for form submission. */
|
|
38
41
|
valueName: string;
|
|
42
|
+
/** Character shown after required field labels. */
|
|
39
43
|
defaultRequiredChar: string;
|
|
44
|
+
/** Label text for the input. */
|
|
40
45
|
label: string;
|
|
46
|
+
/** Field type for validation (text, mail, number, phone, vat). */
|
|
41
47
|
fieldType: PdFieldType;
|
|
48
|
+
/** Initial value for the input. */
|
|
42
49
|
initValue: string;
|
|
50
|
+
/** Mark as internal element (used by composite components). */
|
|
43
51
|
internalElement: boolean;
|
|
52
|
+
/** Dispatch change event when initValue changes. */
|
|
44
53
|
handleChangeForInitVal: boolean;
|
|
54
|
+
/** Grid span for width control within pd-form-row. */
|
|
55
|
+
span: string;
|
|
56
|
+
/** @ignore */
|
|
45
57
|
protected _valid: boolean;
|
|
58
|
+
/** @ignore */
|
|
46
59
|
protected _invalid: boolean;
|
|
60
|
+
/** @ignore */
|
|
47
61
|
protected _dirty: boolean;
|
|
62
|
+
/** @ignore */
|
|
48
63
|
protected _pristine: boolean;
|
|
64
|
+
/** @ignore */
|
|
49
65
|
protected _touched: boolean;
|
|
66
|
+
/** @ignore */
|
|
50
67
|
protected _focused: boolean;
|
|
68
|
+
/** @ignore */
|
|
51
69
|
protected _errorMsg: string;
|
|
70
|
+
/** @ignore */
|
|
52
71
|
protected _value: string;
|
|
72
|
+
/** Internal input type identifier (set by subclass constructor). */
|
|
53
73
|
protected _inputType: number;
|
|
74
|
+
/** @ignore */
|
|
54
75
|
protected _validators: PdFormValidatorFn[];
|
|
55
76
|
static styles: CSSResultGroup;
|
|
56
77
|
update(changedProps: PropertyValues<this>): void;
|
|
57
78
|
firstUpdated(): void;
|
|
58
79
|
disconnectedCallback(): void;
|
|
80
|
+
/** Current validation error message. */
|
|
59
81
|
get errorMsg(): string;
|
|
60
82
|
set errorMsg(msg: string);
|
|
83
|
+
/** Current input value. */
|
|
61
84
|
get value(): string;
|
|
62
85
|
set value(val: string);
|
|
86
|
+
/** Set error state manually. */
|
|
63
87
|
set error(val: boolean);
|
|
88
|
+
/** Set valid state manually. */
|
|
64
89
|
set valid(isValid: boolean);
|
|
65
90
|
reset(): void;
|
|
66
91
|
clear(): void;
|
|
@@ -71,13 +96,13 @@ export declare abstract class PdBaseUIInput extends PdBaseUI {
|
|
|
71
96
|
protected _dispatchChange(value: string, eventName?: string): void;
|
|
72
97
|
protected getClassmap(specific?: Record<string, boolean>): {
|
|
73
98
|
error: boolean;
|
|
74
|
-
valid:
|
|
99
|
+
valid: boolean | "";
|
|
75
100
|
focus: boolean;
|
|
76
101
|
prestine: boolean;
|
|
77
102
|
dirty: boolean;
|
|
78
103
|
};
|
|
79
|
-
protected _renderErrorMsg(): import('lit').TemplateResult<1> | "";
|
|
80
|
-
protected _renderLabel(forParam: string, additionalValue?: string): import('lit').TemplateResult<1>;
|
|
104
|
+
protected _renderErrorMsg(errorId?: string): import('lit').TemplateResult<1> | "";
|
|
105
|
+
protected _renderLabel(forParam: string, additionalValue?: string): typeof nothing | import('lit').TemplateResult<1>;
|
|
81
106
|
runValidators(dryRun?: boolean): Promise<boolean>;
|
|
82
107
|
protected _handleStatusForInnerInputElement(status: boolean): void;
|
|
83
108
|
protected _getInitialValue(reset?: boolean): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pd-base-ui-input.d.ts","sourceRoot":"","sources":["../../src/base/pd-base-ui-input.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"pd-base-ui-input.d.ts","sourceRoot":"","sources":["../../src/base/pd-base-ui-input.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { css, html } from 'lit';
|
|
1
|
+
import { css, html, nothing } from 'lit';
|
|
2
2
|
import { property, state } from 'lit/decorators.js';
|
|
3
3
|
import { pdIcons } from '@progressive-development/pd-icon';
|
|
4
4
|
import '@progressive-development/pd-icon/pd-icon';
|
|
5
5
|
import { PdBaseUI } from './pd-base-ui.js';
|
|
6
6
|
import { SharedInputStyles } from '../styles/shared-input-styles.js';
|
|
7
|
+
import { UNDEF } from '../types.js';
|
|
7
8
|
import { requiredValidator, requiredSelectValidator, requiredRangeValidator, requiredCheckedValidator, emailValidator, numberValidator, phoneValidator, vatValidator } from '../validators.js';
|
|
8
9
|
import '../pd-hover-box.js';
|
|
9
10
|
|
|
@@ -41,6 +42,7 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
41
42
|
this.initValue = "";
|
|
42
43
|
this.internalElement = false;
|
|
43
44
|
this.handleChangeForInitVal = false;
|
|
45
|
+
this.span = "full";
|
|
44
46
|
this._valid = false;
|
|
45
47
|
this._invalid = false;
|
|
46
48
|
this._dirty = false;
|
|
@@ -50,6 +52,7 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
50
52
|
this._errorMsg = "";
|
|
51
53
|
this._value = "";
|
|
52
54
|
this._inputType = -1;
|
|
55
|
+
/** @ignore */
|
|
53
56
|
this._validators = [];
|
|
54
57
|
}
|
|
55
58
|
static {
|
|
@@ -61,6 +64,10 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
61
64
|
display: flex;
|
|
62
65
|
align-items: end;
|
|
63
66
|
justify-content: space-between;
|
|
67
|
+
width: var(--pd-input-field-width, 250px);
|
|
68
|
+
max-width: 100%;
|
|
69
|
+
min-width: 150px;
|
|
70
|
+
box-sizing: border-box;
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
.help-icon {
|
|
@@ -71,8 +78,10 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
71
78
|
];
|
|
72
79
|
}
|
|
73
80
|
update(changedProps) {
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
const hasInitValueChange = changedProps.has("initValue");
|
|
82
|
+
const condition = this.initValue || changedProps.get("initValue");
|
|
83
|
+
if (hasInitValueChange && condition) {
|
|
84
|
+
if (this.handleChangeForInitVal && this.initValue && this.initValue !== UNDEF) {
|
|
76
85
|
this._handleChangedValue(this.initValue, void 0, true);
|
|
77
86
|
} else {
|
|
78
87
|
this._value = this.initValue;
|
|
@@ -89,21 +98,25 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
89
98
|
this._unRegisterAtContainer();
|
|
90
99
|
super.disconnectedCallback();
|
|
91
100
|
}
|
|
101
|
+
/** Current validation error message. */
|
|
92
102
|
get errorMsg() {
|
|
93
103
|
return this._errorMsg;
|
|
94
104
|
}
|
|
95
105
|
set errorMsg(msg) {
|
|
96
106
|
this._errorMsg = msg;
|
|
97
107
|
}
|
|
108
|
+
/** Current input value. */
|
|
98
109
|
get value() {
|
|
99
110
|
return this._value;
|
|
100
111
|
}
|
|
101
112
|
set value(val) {
|
|
102
113
|
this._handleChangedValue(val, void 0, true);
|
|
103
114
|
}
|
|
115
|
+
/** Set error state manually. */
|
|
104
116
|
set error(val) {
|
|
105
117
|
this._invalid = val;
|
|
106
118
|
}
|
|
119
|
+
/** Set valid state manually. */
|
|
107
120
|
set valid(isValid) {
|
|
108
121
|
this._valid = isValid;
|
|
109
122
|
}
|
|
@@ -261,20 +274,23 @@ class PdBaseUIInput extends PdBaseUI {
|
|
|
261
274
|
return {
|
|
262
275
|
...specific,
|
|
263
276
|
error: this._invalid,
|
|
264
|
-
valid: this._valid && this._value,
|
|
277
|
+
valid: this._valid && this._value && this._value !== UNDEF,
|
|
265
278
|
focus: this._focused,
|
|
266
279
|
prestine: this._pristine,
|
|
267
280
|
dirty: this._dirty
|
|
268
281
|
};
|
|
269
282
|
}
|
|
270
|
-
_renderErrorMsg() {
|
|
283
|
+
_renderErrorMsg(errorId) {
|
|
271
284
|
return this._errorMsg ? html`
|
|
272
|
-
<div class="error-box error">
|
|
285
|
+
<div id="${errorId || ""}" class="error-box error">
|
|
273
286
|
<p class="error-msg">${this._errorMsg}</p>
|
|
274
287
|
</div>
|
|
275
288
|
` : "";
|
|
276
289
|
}
|
|
277
290
|
_renderLabel(forParam, additionalValue) {
|
|
291
|
+
if (!this.label && !this.helperTxt && !additionalValue) {
|
|
292
|
+
return nothing;
|
|
293
|
+
}
|
|
278
294
|
return html`
|
|
279
295
|
<div class="label-header">
|
|
280
296
|
<label for="${forParam}">
|
|
@@ -402,6 +418,9 @@ __decorateClass([
|
|
|
402
418
|
__decorateClass([
|
|
403
419
|
property({ type: Boolean })
|
|
404
420
|
], PdBaseUIInput.prototype, "handleChangeForInitVal");
|
|
421
|
+
__decorateClass([
|
|
422
|
+
property({ type: String, reflect: true })
|
|
423
|
+
], PdBaseUIInput.prototype, "span");
|
|
405
424
|
__decorateClass([
|
|
406
425
|
state()
|
|
407
426
|
], PdBaseUIInput.prototype, "_valid");
|
package/dist/base/pd-base-ui.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
6
|
-
*
|
|
7
|
-
* Abstract base lit class for all pd-form elements.
|
|
8
|
-
* Import shared-global-style to make common custom properties available to all components.
|
|
9
|
-
*
|
|
10
|
-
* Used from:
|
|
11
|
-
* - pd-base-ui-input
|
|
12
|
-
*
|
|
13
|
-
* Used to:
|
|
14
|
-
* - define css (import shared-global-styles.js)
|
|
15
|
-
* - define common properties (detailieren, aktuell keine)
|
|
16
|
-
* - define updateWhenLocaleChanges for all pd-elements (check, aktuell nur für pd-form-container benötigt)
|
|
17
|
-
*
|
|
18
|
-
* Custom Properties (shared-global-styles):
|
|
19
|
-
* ... TODO
|
|
20
|
-
*/
|
|
21
3
|
class PdBaseUI extends LitElement {
|
|
22
4
|
static {
|
|
23
5
|
this.styles = [];
|
|
@@ -11,5 +11,8 @@ export declare const templates: {
|
|
|
11
11
|
"pd.form.required.valid": string;
|
|
12
12
|
s512f37f2dba563ec: import('@lit/localize').StrResult;
|
|
13
13
|
s8a355eeb33f58c5f: import('@lit/localize').StrResult;
|
|
14
|
+
"pd.suggestion.box.load.data": string;
|
|
15
|
+
"pd.suggestion.box.error.txt": string;
|
|
16
|
+
"pd.suggestion.box.add.new": import('@lit/localize').StrResult;
|
|
14
17
|
};
|
|
15
18
|
//# sourceMappingURL=be.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"be.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/be.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"be.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/be.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -11,5 +11,8 @@ export declare const templates: {
|
|
|
11
11
|
"pd.form.required.missing": string;
|
|
12
12
|
s8a355eeb33f58c5f: import('@lit/localize').StrResult;
|
|
13
13
|
s512f37f2dba563ec: import('@lit/localize').StrResult;
|
|
14
|
+
"pd.suggestion.box.load.data": string;
|
|
15
|
+
"pd.suggestion.box.error.txt": string;
|
|
16
|
+
"pd.suggestion.box.add.new": import('@lit/localize').StrResult;
|
|
14
17
|
};
|
|
15
18
|
//# sourceMappingURL=de.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/de.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/de.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
|
@@ -11,5 +11,8 @@ export declare const templates: {
|
|
|
11
11
|
"pd.form.required.valid": string;
|
|
12
12
|
s512f37f2dba563ec: import('@lit/localize').StrResult;
|
|
13
13
|
s8a355eeb33f58c5f: import('@lit/localize').StrResult;
|
|
14
|
+
"pd.suggestion.box.load.data": string;
|
|
15
|
+
"pd.suggestion.box.error.txt": string;
|
|
16
|
+
"pd.suggestion.box.add.new": import('@lit/localize').StrResult;
|
|
14
17
|
};
|
|
15
18
|
//# sourceMappingURL=en.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/en.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/en.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAgBrB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { PdFormRow } from './pd-form-row/pd-form-row.js';
|
|
2
|
+
export { PdFormField } from './pd-form-field/pd-form-field.js';
|
|
3
|
+
export { PdFormFieldset } from './pd-form-fieldset/pd-form-fieldset.js';
|
|
2
4
|
export { PdButton } from './pd-button/pd-button.js';
|
|
3
5
|
export { PdCheckbox } from './pd-checkbox/pd-checkbox.js';
|
|
4
6
|
export { PdFormContainer } from './pd-form-container/pd-form-container.js';
|
|
@@ -9,7 +11,8 @@ export { PdInputFile } from './pd-input-file/pd-input-file.js';
|
|
|
9
11
|
export { PdInputTime } from './pd-input-time/pd-input-time.js';
|
|
10
12
|
export { PdRadioGroup } from './pd-radio-group/pd-radio-group.js';
|
|
11
13
|
export { PdBaseInputElement } from './base/pd-base-input-element.js';
|
|
12
|
-
export
|
|
14
|
+
export { PdGenericForm } from './pd-generic-form/pd-generic-form.js';
|
|
15
|
+
export type { PdAutocomplete, PdSelectOption, PdFieldType, PdFormElementStatus, PdFormValidatorFn, ButtonData, SuggestedElement, } from './types.js';
|
|
13
16
|
export { UNDEF } from './types.js';
|
|
14
17
|
export * as pdValidator from './validators.js';
|
|
15
18
|
export { templates as beTemplates } from './generated/locales/be.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,YAAY,EACV,cAAc,EACd,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,YAAY,EACV,cAAc,EACd,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,KAAK,WAAW,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import './pd-form-row.js';
|
|
2
|
+
import './pd-form-field.js';
|
|
3
|
+
import './pd-form-fieldset/pd-form-fieldset.js';
|
|
2
4
|
import './pd-button.js';
|
|
3
5
|
import './pd-checkbox.js';
|
|
4
6
|
import './pd-form-container.js';
|
|
@@ -9,6 +11,7 @@ import './pd-input-file.js';
|
|
|
9
11
|
import './pd-input-time.js';
|
|
10
12
|
import './pd-radio-group.js';
|
|
11
13
|
export { PdBaseInputElement } from './base/pd-base-input-element.js';
|
|
14
|
+
import './pd-generic-form.js';
|
|
12
15
|
export { UNDEF } from './types.js';
|
|
13
16
|
import * as validators from './validators.js';
|
|
14
17
|
export { validators as pdValidator };
|
|
@@ -16,6 +19,8 @@ export { templates as beTemplates } from './locales/be.js';
|
|
|
16
19
|
export { templates as deTemplates } from './locales/de.js';
|
|
17
20
|
export { templates as enTemplates } from './locales/en.js';
|
|
18
21
|
export { PdFormRow } from './pd-form-row/PdFormRow.js';
|
|
22
|
+
export { PdFormField } from './pd-form-field/PdFormField.js';
|
|
23
|
+
export { PdFormFieldset } from './pd-form-fieldset/PdFormFieldset.js';
|
|
19
24
|
export { PdButton } from './pd-button/PdButton.js';
|
|
20
25
|
export { PdCheckbox } from './pd-checkbox/PdCheckbox.js';
|
|
21
26
|
export { PdFormContainer } from './pd-form-container/PdFormContainer.js';
|
|
@@ -25,3 +30,4 @@ export { PdInputArea } from './pd-input-area/PdInputArea.js';
|
|
|
25
30
|
export { PdInputFile } from './pd-input-file/PdInputFile.js';
|
|
26
31
|
export { PdInputTime } from './pd-input-time/PdInputTime.js';
|
|
27
32
|
export { PdRadioGroup } from './pd-radio-group/PdRadioGroup.js';
|
|
33
|
+
export { PdGenericForm } from './pd-generic-form/PdGenericForm.js';
|
package/dist/locales/be.js
CHANGED
|
@@ -12,7 +12,10 @@ const templates = {
|
|
|
12
12
|
"pd.form.required.missing": `* Verplicht veld ontbreekt of is onjuist ingevuld`,
|
|
13
13
|
"pd.form.required.valid": `* Verplichte velden ingevuld`,
|
|
14
14
|
s512f37f2dba563ec: str`Maximaal ${0} tekens`,
|
|
15
|
-
s8a355eeb33f58c5f: str`Minimaal ${0} tekens
|
|
15
|
+
s8a355eeb33f58c5f: str`Minimaal ${0} tekens`,
|
|
16
|
+
"pd.suggestion.box.load.data": `Daten werden geladen`,
|
|
17
|
+
"pd.suggestion.box.error.txt": `Technischer Fehler bei der Suche`,
|
|
18
|
+
"pd.suggestion.box.add.new": str`"${0}" neu anlegen`
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
export { templates };
|
package/dist/locales/de.js
CHANGED
|
@@ -12,7 +12,10 @@ const templates = {
|
|
|
12
12
|
"pd.form.required.valid": `* Felder ausgefüllt`,
|
|
13
13
|
"pd.form.required.missing": `* Pflichtfeld fehlt oder fehlerhaft`,
|
|
14
14
|
s8a355eeb33f58c5f: str`Mindestens ${0} Zeichen`,
|
|
15
|
-
s512f37f2dba563ec: str`Maximal ${0} Zeichen
|
|
15
|
+
s512f37f2dba563ec: str`Maximal ${0} Zeichen`,
|
|
16
|
+
"pd.suggestion.box.load.data": `Daten werden geladen`,
|
|
17
|
+
"pd.suggestion.box.error.txt": `Technischer Fehler bei der Suche`,
|
|
18
|
+
"pd.suggestion.box.add.new": str`"${0}" neu anlegen`
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
export { templates };
|
package/dist/locales/en.js
CHANGED
|
@@ -12,7 +12,10 @@ const templates = {
|
|
|
12
12
|
"pd.form.required.missing": `* Required field missing or invalid`,
|
|
13
13
|
"pd.form.required.valid": `* Required fields filled`,
|
|
14
14
|
s512f37f2dba563ec: str`Maximum ${0} characters`,
|
|
15
|
-
s8a355eeb33f58c5f: str`At least ${0} characters
|
|
15
|
+
s8a355eeb33f58c5f: str`At least ${0} characters`,
|
|
16
|
+
"pd.suggestion.box.load.data": `Daten werden geladen`,
|
|
17
|
+
"pd.suggestion.box.error.txt": `Technischer Fehler bei der Suche`,
|
|
18
|
+
"pd.suggestion.box.add.new": str`"${0}" neu anlegen`
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
export { templates };
|