@progressive-development/pd-contact 0.5.10 → 0.6.1

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.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The locale code that templates in this source code are written in.
3
+ */
4
+ export declare const sourceLocale = "dev";
5
+ /**
6
+ * The other locale codes that this application is localized into. Sorted
7
+ * lexicographically.
8
+ */
9
+ export declare const targetLocales: readonly ["be", "de", "en"];
10
+ /**
11
+ * All valid project locale codes. Sorted lexicographically.
12
+ */
13
+ export declare const allLocales: readonly ["be", "de", "dev", "en"];
14
+ //# sourceMappingURL=locale-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-codes.d.ts","sourceRoot":"","sources":["../../src/generated/locale-codes.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,aAAa,6BAA8B,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,UAAU,oCAAqC,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const templates: {
2
+ "pd.contact.address.title": string;
3
+ "pd.contact.check.company": string;
4
+ "pd.contact.check.private": string;
5
+ "pd.contact.label.additional": string;
6
+ "pd.contact.label.btw": string;
7
+ "pd.contact.label.city": string;
8
+ "pd.contact.label.company": string;
9
+ "pd.contact.label.email": string;
10
+ "pd.contact.label.firstName": string;
11
+ "pd.contact.label.lastName": string;
12
+ "pd.contact.label.phone": string;
13
+ "pd.contact.label.propertyDate": string;
14
+ "pd.contact.label.street": string;
15
+ "pd.contact.label.streetNr": string;
16
+ "pd.contact.label.summary.propertyDate": import('@lit/localize').StrResult;
17
+ "pd.contact.label.type": string;
18
+ "pd.contact.label.zip": string;
19
+ "pd.contact.property.year.selection": string;
20
+ };
21
+ //# sourceMappingURL=be.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"be.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/be.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBrB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const templates: {
2
+ "pd.contact.property.year.selection": string;
3
+ "pd.contact.address.title": string;
4
+ "pd.contact.label.type": string;
5
+ "pd.contact.check.private": string;
6
+ "pd.contact.check.company": string;
7
+ "pd.contact.label.company": string;
8
+ "pd.contact.label.btw": string;
9
+ "pd.contact.label.firstName": string;
10
+ "pd.contact.label.lastName": string;
11
+ "pd.contact.label.street": string;
12
+ "pd.contact.label.streetNr": string;
13
+ "pd.contact.label.zip": string;
14
+ "pd.contact.label.city": string;
15
+ "pd.contact.label.additional": string;
16
+ "pd.contact.label.propertyDate": string;
17
+ "pd.contact.label.phone": string;
18
+ "pd.contact.label.email": string;
19
+ "pd.contact.label.summary.propertyDate": import('@lit/localize').StrResult;
20
+ };
21
+ //# sourceMappingURL=de.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/de.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBrB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const templates: {
2
+ "pd.contact.address.title": string;
3
+ "pd.contact.check.company": string;
4
+ "pd.contact.check.private": string;
5
+ "pd.contact.label.additional": string;
6
+ "pd.contact.label.btw": string;
7
+ "pd.contact.label.city": string;
8
+ "pd.contact.label.company": string;
9
+ "pd.contact.label.email": string;
10
+ "pd.contact.label.firstName": string;
11
+ "pd.contact.label.lastName": string;
12
+ "pd.contact.label.phone": string;
13
+ "pd.contact.label.propertyDate": string;
14
+ "pd.contact.label.street": string;
15
+ "pd.contact.label.streetNr": string;
16
+ "pd.contact.label.summary.propertyDate": import('@lit/localize').StrResult;
17
+ "pd.contact.label.type": string;
18
+ "pd.contact.label.zip": string;
19
+ "pd.contact.property.year.selection": string;
20
+ };
21
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/generated/locales/en.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { PdContact } from './pd-contact.js';
2
+ export type { PdContactData, PdContactFormOptions, PdContactMatch, } from './types.js';
3
+ export { templates as beTemplates } from './generated/locales/be.js';
4
+ export { templates as deTemplates } from './generated/locales/de.js';
5
+ export { templates as enTemplates } from './generated/locales/en.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,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,4 @@
1
- import { PdContact } from "./src/PdContact.js";
1
+ import { PdContact } from "./pd-contact.js";
2
2
  import { templates } from "./locales/be.js";
3
3
  import { templates as templates2 } from "./locales/de.js";
4
4
  import { templates as templates3 } from "./locales/en.js";
@@ -0,0 +1,2 @@
1
+ export * from '../generated/locales/be'
2
+ export {}
@@ -0,0 +1,2 @@
1
+ export * from '../generated/locales/de'
2
+ export {}
@@ -0,0 +1,2 @@
1
+ export * from '../generated/locales/en'
2
+ export {}
@@ -0,0 +1,75 @@
1
+ import { LitElement, PropertyValues, CSSResultGroup } from 'lit';
2
+ import { PdContactData, PdContactMatch } from './types';
3
+ export declare const C_TYPE = "type";
4
+ export declare const C_COMPANY = "companyName";
5
+ export declare const C_BTWNR = "vatNr";
6
+ export declare const C_FIRSTNAME = "firstName";
7
+ export declare const C_LASTNAME = "lastName";
8
+ export declare const C_STREET = "street";
9
+ export declare const C_CITY = "city";
10
+ export declare const C_ADDITIONAL = "additionalHint";
11
+ export declare const C_PROPERTY_DATE = "propertyDate";
12
+ export declare const C_PHONE1 = "phone1";
13
+ export declare const C_EMAIL = "email";
14
+ export declare class PdContact extends LitElement {
15
+ /**
16
+ * Title shown above address block.
17
+ */
18
+ addressTitle: string;
19
+ /**
20
+ * If true, phone and email are rendered as clickable links with icons.
21
+ */
22
+ phoneMailLink: boolean;
23
+ /**
24
+ * If true, render only summary view instead of full editable form.
25
+ */
26
+ summary: boolean;
27
+ /**
28
+ * Whether the Baujahr / propertyDate should be shown in the form.
29
+ * TODO: Refactor, give selectable property dates from outside, show if set
30
+ */
31
+ withPropertyDate: boolean;
32
+ /**
33
+ * List of required input field keys (optional).
34
+ */
35
+ requiredFields: string[];
36
+ /**
37
+ * List of fields to be rendered (optional).
38
+ */
39
+ inputFields: string[];
40
+ /**
41
+ * Contact object to show or edit.
42
+ */
43
+ contact?: PdContactData;
44
+ /**
45
+ * Optional location match data.
46
+ */
47
+ match?: PdContactMatch;
48
+ /**
49
+ * Business or private contact (internal flag).
50
+ */
51
+ private _business;
52
+ /**
53
+ * Internal validation state.
54
+ */
55
+ private _errorMap;
56
+ static styles: CSSResultGroup;
57
+ connectedCallback(): void;
58
+ disconnectedCallback(): void;
59
+ willUpdate(changedProps: PropertyValues<this>): void;
60
+ firstUpdated(): void;
61
+ render(): import('lit-html').TemplateResult<1>;
62
+ private _renderEditContact;
63
+ private _getRadioValue;
64
+ private _renderViewContact;
65
+ private _switchAddressType;
66
+ private _isRequired;
67
+ private _showInput;
68
+ private _validateForm;
69
+ private _setFormData;
70
+ private _getFullName;
71
+ private _getFullStreet;
72
+ private _getFullLocation;
73
+ private static _getFullVal;
74
+ }
75
+ //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