@icure/form 1.1.19 → 1.1.20
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/.yarn/install-state.gz +0 -0
- package/components/common/field.d.ts +7 -4
- package/components/common/field.js +8 -7
- package/components/common/field.js.map +1 -1
- package/components/common/metadata-buttons-bar.d.ts +44 -0
- package/components/common/metadata-buttons-bar.js +1329 -0
- package/components/common/metadata-buttons-bar.js.map +1 -0
- package/components/icure-button-group/index.js +21 -22
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.js +22 -23
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.js +21 -22
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.js +1 -0
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/utils/index.d.ts +1 -1
- package/components/icure-form/fields/utils/index.js +1 -1
- package/components/icure-form/fields/utils/index.js.map +1 -1
- package/components/icure-form/index.d.ts +3 -0
- package/components/icure-form/index.js +27 -23
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +3 -2
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +3 -1
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +21 -22
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +1 -14
- package/components/icure-text-field/index.js +42 -160
- package/components/icure-text-field/index.js.map +1 -1
- package/components/model/index.d.ts +1 -0
- package/components/model/index.js.map +1 -1
- package/components/themes/icure-blue/index.js +7 -6
- package/components/themes/icure-blue/index.js.map +1 -1
- package/components/themes/kendo/index.js +5 -3
- package/components/themes/kendo/index.js.map +1 -1
- package/generic/model.d.ts +1 -1
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +2 -2
- package/icure/form-values-container.js +10 -5
- package/icure/form-values-container.js.map +1 -1
- package/package.json +1 -1
- package/utils/dates.js +1 -1
- package/utils/dates.js.map +1 -1
- package/utils/fields-values-provider.d.ts +1 -1
- package/utils/fields-values-provider.js +2 -2
- package/utils/fields-values-provider.js.map +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -27,10 +27,13 @@ export declare class Field extends LitElement {
|
|
|
27
27
|
/**
|
|
28
28
|
* Iso code of the default language
|
|
29
29
|
*/
|
|
30
|
-
defaultLanguage
|
|
30
|
+
defaultLanguage: string;
|
|
31
31
|
/**
|
|
32
|
-
* Iso code of the
|
|
32
|
+
* Iso code and names of the supported languages
|
|
33
33
|
*/
|
|
34
|
+
languages?: {
|
|
35
|
+
[iso: string]: string;
|
|
36
|
+
};
|
|
34
37
|
translationProvider: (language: string, text: string) => string;
|
|
35
38
|
/**
|
|
36
39
|
* Provides the value of the field.
|
|
@@ -39,10 +42,10 @@ export declare class Field extends LitElement {
|
|
|
39
42
|
validationErrorsProvider?: () => string[];
|
|
40
43
|
metadataProvider?: (id: string, revisions: (string | null)[]) => VersionedData<FieldMetadata>;
|
|
41
44
|
handleValueChanged?: (label: string, language: string, value?: FieldValue, id?: string) => string | undefined;
|
|
42
|
-
handleMetadataChanged?: (
|
|
45
|
+
handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined;
|
|
43
46
|
visible: boolean;
|
|
44
47
|
readonly: boolean;
|
|
45
48
|
displayMetadata: boolean;
|
|
46
|
-
|
|
49
|
+
selectedLanguage?: string;
|
|
47
50
|
language(): string;
|
|
48
51
|
}
|
|
@@ -31,9 +31,6 @@ class Field extends lit_1.LitElement {
|
|
|
31
31
|
* Iso code of the default language
|
|
32
32
|
*/
|
|
33
33
|
this.defaultLanguage = 'en';
|
|
34
|
-
/**
|
|
35
|
-
* Iso code of the default language
|
|
36
|
-
*/
|
|
37
34
|
this.translationProvider = (language, text) => text;
|
|
38
35
|
/**
|
|
39
36
|
* Provides the value of the field.
|
|
@@ -46,11 +43,11 @@ class Field extends lit_1.LitElement {
|
|
|
46
43
|
this.visible = true;
|
|
47
44
|
this.readonly = false;
|
|
48
45
|
this.displayMetadata = false;
|
|
49
|
-
this.
|
|
46
|
+
this.selectedLanguage = undefined;
|
|
50
47
|
}
|
|
51
48
|
language() {
|
|
52
49
|
var _a, _b;
|
|
53
|
-
return (_b = (this.translate ? (_a = this.
|
|
50
|
+
return (_b = (this.translate ? (_a = this.selectedLanguage) !== null && _a !== void 0 ? _a : this.defaultLanguage : this.defaultLanguage)) !== null && _b !== void 0 ? _b : 'en';
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
53
|
exports.Field = Field;
|
|
@@ -72,8 +69,12 @@ __decorate([
|
|
|
72
69
|
], Field.prototype, "translate", void 0);
|
|
73
70
|
__decorate([
|
|
74
71
|
(0, decorators_js_1.property)(),
|
|
75
|
-
__metadata("design:type",
|
|
72
|
+
__metadata("design:type", Object)
|
|
76
73
|
], Field.prototype, "defaultLanguage", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, decorators_js_1.property)(),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], Field.prototype, "languages", void 0);
|
|
77
78
|
__decorate([
|
|
78
79
|
(0, decorators_js_1.property)(),
|
|
79
80
|
__metadata("design:type", Function)
|
|
@@ -113,5 +114,5 @@ __decorate([
|
|
|
113
114
|
__decorate([
|
|
114
115
|
(0, decorators_js_1.state)(),
|
|
115
116
|
__metadata("design:type", String)
|
|
116
|
-
], Field.prototype, "
|
|
117
|
+
], Field.prototype, "selectedLanguage", void 0);
|
|
117
118
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sourceRoot":"","sources":["../../../tmp/components/common/field.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AACnD,6BAAgC;AAIhC;;GAEG;AACH,MAAa,KAAM,SAAQ,gBAAU;IAArC;;QAMC;;;WAGG;QACS,oBAAe,GAAW,EAAE,CAAA;QAOxC;;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AE;;wCAAsC;AAErC;IAAX,IAAA,wBAAQ,GAAE;;kDAA2F;AAK1F;IAAX,IAAA,wBAAQ,GAAE;;4CAA4D;AAC3D;IAAX,IAAA,wBAAQ,GAAE;;uDAAsD;AACrD;IAAX,IAAA,wBAAQ,GAAE;;+CAA0G;AACzG;IAAX,IAAA,wBAAQ,GAAE;;iDAA0H;AACzH;IAAX,IAAA,wBAAQ,GAAE;;oDAAiG;AAEzF;IAAlB,IAAA,wBAAQ,GAAE;;sCAAsB;AACrB;IAAX,IAAA,wBAAQ,GAAE;;uCAAiB;AAChB;IAAX,IAAA,wBAAQ,GAAE;;8CAAwB;AAE1B;IAAR,IAAA,qBAAK,GAAE;;+CAAsC","sourcesContent":["import { property, state } from 'lit/decorators.js'\nimport { LitElement } from 'lit'\nimport { FieldMetadata, FieldValue, Labels } from '../model'\nimport { VersionedData } from '../../generic'\n\n/**\n * Base class for all fields.\n */\nexport class Field extends LitElement {\n\t/**\n\t * The label of the field. This is a unique per form property that is used to create data in the formValuesContainer.\n\t */\n\t@property() label: string\n\n\t/**\n\t * The labels of the field. These are the labels that will be displayed in the UI.\n\t * Several labels can be displayed at once\n\t */\n\t@property() displayedLabels: Labels = {}\n\n\t/**\n\t * Extra styles applied to the field.\n\t */\n\t@property() styleOptions: { [key: string]: unknown }\n\n\t/**\n\t * Translate labels and options\n\t */\n\t@property() translate = true\n\t/**\n\t * Iso code of the default language\n\t */\n\t@property() defaultLanguage = 'en'\n\n\t/**\n\t * Iso code and names of the supported languages\n\t */\n\t@property() languages?: { [iso: string]: string }\n\n\t@property() translationProvider: (language: string, text: string) => string = (language, text) => text\n\n\t/**\n\t * Provides the value of the field.\n\t */\n\t@property() valueProvider?: () => VersionedData<FieldValue> = undefined\n\t@property() validationErrorsProvider?: () => string[] = undefined\n\t@property() metadataProvider?: (id: string, revisions: (string | null)[]) => VersionedData<FieldMetadata> = undefined\n\t@property() handleValueChanged?: (label: string, language: string, value?: FieldValue, id?: string) => string | undefined = undefined\n\t@property() handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined = undefined\n\n\t@property() public visible = true\n\t@property() readonly = false\n\t@property() displayMetadata = false\n\n\t@state() selectedLanguage?: string = undefined\n\n\tlanguage(): string {\n\t\treturn (this.translate ? this.selectedLanguage ?? this.defaultLanguage : this.defaultLanguage) ?? 'en'\n\t}\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { FieldMetadata } from '../model';
|
|
3
|
+
import { Suggestion } from '../../generic';
|
|
4
|
+
import { CustomEventDetail } from 'app-datepicker/dist/typings';
|
|
5
|
+
export declare class MetadataButtonBar extends LitElement {
|
|
6
|
+
valueId: string;
|
|
7
|
+
metadata: FieldMetadata;
|
|
8
|
+
revision: string;
|
|
9
|
+
revisionDate: number;
|
|
10
|
+
defaultLanguage: string;
|
|
11
|
+
selectedLanguage?: string;
|
|
12
|
+
languages: {
|
|
13
|
+
[iso: string]: string;
|
|
14
|
+
};
|
|
15
|
+
displayedLabels: {
|
|
16
|
+
[iso: string]: string;
|
|
17
|
+
};
|
|
18
|
+
handleMetadataChanged?: (metadata: FieldMetadata, id?: string) => string | undefined;
|
|
19
|
+
handleLanguageSelected?: (iso?: string) => void;
|
|
20
|
+
ownersProvider: (terms: string[], ids?: string[], specialties?: string[]) => Promise<Suggestion[]>;
|
|
21
|
+
protected displayOwnersMenu: boolean;
|
|
22
|
+
protected ownerInputValue: string;
|
|
23
|
+
protected availableOwners: Suggestion[];
|
|
24
|
+
protected loadedOwners: {
|
|
25
|
+
[id: string]: Suggestion;
|
|
26
|
+
};
|
|
27
|
+
protected displayLanguagesMenu: boolean;
|
|
28
|
+
protected displayValueDateMenu: boolean;
|
|
29
|
+
protected languageInputValue: string;
|
|
30
|
+
protected displayVersionsMenu: boolean;
|
|
31
|
+
static get styles(): import("lit").CSSResult[];
|
|
32
|
+
_handleClickOutside(event: MouseEvent): void;
|
|
33
|
+
connectedCallback(): void;
|
|
34
|
+
disconnectedCallback(): void;
|
|
35
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
36
|
+
toggleOwnerMenu(ownerId?: string): void;
|
|
37
|
+
searchOwner(e: InputEvent): void;
|
|
38
|
+
searchLanguage(e: InputEvent): void;
|
|
39
|
+
handleOwnerButtonClicked(id: string): void;
|
|
40
|
+
handleLanguageButtonClicked(id: string): void;
|
|
41
|
+
toggleValueDateMenu(): void;
|
|
42
|
+
dateUpdated(date: CustomEventDetail['date-updated']): void;
|
|
43
|
+
toggleLanguageMenu(): void;
|
|
44
|
+
}
|