@icure/form 1.0.5 → 1.0.9
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/{lib/components → components}/index.d.ts +0 -0
- package/{lib/components → components}/index.js +0 -0
- package/components/iqr-form/fields/datePicker.d.ts +10 -0
- package/{lib/components → components}/iqr-form/fields/datePicker.js +26 -12
- package/components/iqr-form/fields/dateTimePicker.d.ts +10 -0
- package/{lib/components → components}/iqr-form/fields/dateTimePicker.js +18 -12
- package/components/iqr-form/fields/measureField.d.ts +8 -0
- package/{lib/components → components}/iqr-form/fields/measureField.js +13 -12
- package/components/iqr-form/fields/multipleChoice.d.ts +8 -0
- package/{lib/components → components}/iqr-form/fields/multipleChoice.js +13 -12
- package/components/iqr-form/fields/numberField.d.ts +8 -0
- package/{lib/components → components}/iqr-form/fields/numberField.js +13 -12
- package/{lib/components → components}/iqr-form/fields/textfield.d.ts +0 -0
- package/components/iqr-form/fields/textfield.js +138 -0
- package/components/iqr-form/fields/timePicker.d.ts +10 -0
- package/{lib/components → components}/iqr-form/fields/timePicker.js +18 -12
- package/{lib/components → components}/iqr-form/index.d.ts +0 -0
- package/{lib/components → components}/iqr-form/index.js +30 -25
- package/{lib/components → components}/iqr-form/model/index.d.ts +36 -18
- package/{lib/components → components}/iqr-form/model/index.js +9 -4
- package/{lib/components → components}/iqr-form/renderer/cards.d.ts +1 -1
- package/components/iqr-form/renderer/cards.js +54 -0
- package/{lib/components → components}/iqr-form/renderer/form.d.ts +1 -1
- package/components/iqr-form/renderer/form.js +91 -0
- package/components/iqr-form/renderer/index.d.ts +6 -0
- package/components/iqr-form/renderer/index.js +2 -0
- package/components/iqr-form-loader/fieldsValuesProviders.d.ts +13 -0
- package/components/iqr-form-loader/fieldsValuesProviders.js +46 -0
- package/components/iqr-form-loader/formValuesContainer.d.ts +33 -0
- package/components/iqr-form-loader/formValuesContainer.js +110 -0
- package/components/iqr-form-loader/index.d.ts +3 -0
- package/components/iqr-form-loader/index.js +15 -0
- package/components/iqr-form-loader/models.d.ts +14 -0
- package/{lib/components/iqr-form/renderer/index.js → components/iqr-form-loader/models.js} +0 -0
- package/components/iqr-text-field/index.d.ts +26 -0
- package/{lib/components → components}/iqr-text-field/index.js +316 -171
- package/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +2 -0
- package/{lib/components → components}/iqr-text-field/plugin/caret-fix-plugin.js +10 -6
- package/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +2 -0
- package/{lib/components → components}/iqr-text-field/plugin/has-content-class-plugin.js +7 -5
- package/components/iqr-text-field/plugin/mask-plugin.d.ts +2 -0
- package/{lib/components → components}/iqr-text-field/plugin/mask-plugin.js +19 -12
- package/components/iqr-text-field/plugin/regexp-plugin.d.ts +2 -0
- package/{lib/components → components}/iqr-text-field/plugin/regexp-plugin.js +7 -4
- package/components/iqr-text-field/prosemirror-commands.d.ts +6 -0
- package/{lib/components → components}/iqr-text-field/prosemirror-commands.js +4 -3
- package/{lib/components → components}/iqr-text-field/prosemirror-utils.d.ts +1 -1
- package/{lib/components → components}/iqr-text-field/prosemirror-utils.js +1 -1
- package/{lib/components → components}/iqr-text-field/schema/common-marks.d.ts +1 -1
- package/components/iqr-text-field/schema/common-marks.js +93 -0
- package/{lib/components → components}/iqr-text-field/schema/date-time-schema.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/date-time-schema.js +13 -13
- package/{lib/components → components}/iqr-text-field/schema/decimal-schema.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/decimal-schema.js +4 -4
- package/{lib/components → components}/iqr-text-field/schema/index.d.ts +6 -6
- package/components/iqr-text-field/schema/index.js +25 -0
- package/{lib/components → components}/iqr-text-field/schema/markdown-schema.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/markdown-schema.js +65 -32
- package/{lib/components → components}/iqr-text-field/schema/measure-schema.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/measure-schema.js +5 -5
- package/{lib/components → components}/iqr-text-field/schema/token-schema.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/token-schema.js +10 -7
- package/{lib/components → components}/iqr-text-field/schema/utils.d.ts +1 -1
- package/{lib/components → components}/iqr-text-field/schema/utils.js +2 -2
- package/{lib/components → components}/iqr-text-field/selection-companion.d.ts +2 -2
- package/{lib/components → components}/iqr-text-field/selection-companion.js +13 -12
- package/components/iqr-text-field/styles/paths.d.ts +5 -0
- package/components/iqr-text-field/styles/paths.js +36 -0
- package/{lib/components → components}/iqr-text-field/suggestion-palette.d.ts +11 -15
- package/{lib/components → components}/iqr-text-field/suggestion-palette.js +41 -24
- package/{lib/index.d.ts → index.d.ts} +0 -0
- package/{lib/index.js → index.js} +0 -0
- package/package.json +13 -47
- package/utils/icure-utils.d.ts +19 -0
- package/utils/icure-utils.js +105 -0
- package/utils/languages.d.ts +8 -0
- package/utils/languages.js +14 -0
- package/utils/no-lodash.d.ts +5 -0
- package/utils/no-lodash.js +19 -0
- package/lib/components/iqr-form/fields/datePicker.d.ts +0 -8
- package/lib/components/iqr-form/fields/dateTimePicker.d.ts +0 -8
- package/lib/components/iqr-form/fields/measureField.d.ts +0 -8
- package/lib/components/iqr-form/fields/multipleChoice.d.ts +0 -8
- package/lib/components/iqr-form/fields/numberField.d.ts +0 -8
- package/lib/components/iqr-form/fields/textfield.js +0 -86
- package/lib/components/iqr-form/fields/timePicker.d.ts +0 -8
- package/lib/components/iqr-form/renderer/cards.js +0 -44
- package/lib/components/iqr-form/renderer/form.js +0 -45
- package/lib/components/iqr-form/renderer/index.d.ts +0 -3
- package/lib/components/iqr-text-field/index.d.ts +0 -2
- package/lib/components/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -2
- package/lib/components/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -2
- package/lib/components/iqr-text-field/plugin/mask-plugin.d.ts +0 -2
- package/lib/components/iqr-text-field/plugin/regexp-plugin.d.ts +0 -2
- package/lib/components/iqr-text-field/prosemirror-commands.d.ts +0 -4
- package/lib/components/iqr-text-field/schema/common-marks.js +0 -90
- package/lib/components/iqr-text-field/schema/index.js +0 -18
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
import { VersionedValue } from '../../iqr-text-field';
|
|
4
|
+
export declare class DatePicker extends LitElement {
|
|
5
|
+
label: string;
|
|
6
|
+
labelPosition?: string;
|
|
7
|
+
valueProvider?: () => VersionedValue[];
|
|
8
|
+
static get styles(): CSSResultGroup[];
|
|
9
|
+
render(): TemplateResult;
|
|
10
|
+
}
|
|
@@ -10,33 +10,47 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DatePicker = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class DatePicker extends
|
|
16
|
+
class DatePicker extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
21
|
+
this.valueProvider = undefined;
|
|
20
22
|
}
|
|
21
23
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
return [
|
|
25
|
+
lit_1.css `
|
|
26
|
+
:host {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
];
|
|
27
31
|
}
|
|
28
32
|
render() {
|
|
29
|
-
return
|
|
30
|
-
|
|
33
|
+
return lit_1.html ` <iqr-text-field
|
|
34
|
+
labelPosition=${this.labelPosition}
|
|
35
|
+
label="${this.label}"
|
|
36
|
+
schema="date"
|
|
37
|
+
owner="Antoine Duchâteau"
|
|
38
|
+
style="width: 100%"
|
|
39
|
+
.valueProvider=${this.valueProvider}
|
|
40
|
+
></iqr-text-field>`;
|
|
31
41
|
}
|
|
32
42
|
}
|
|
33
43
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
44
|
+
decorators_1.property(),
|
|
45
|
+
__metadata("design:type", Object)
|
|
36
46
|
], DatePicker.prototype, "label", void 0);
|
|
37
47
|
__decorate([
|
|
38
|
-
|
|
48
|
+
decorators_1.property(),
|
|
39
49
|
__metadata("design:type", String)
|
|
40
50
|
], DatePicker.prototype, "labelPosition", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
decorators_1.property(),
|
|
53
|
+
__metadata("design:type", Function)
|
|
54
|
+
], DatePicker.prototype, "valueProvider", void 0);
|
|
41
55
|
exports.DatePicker = DatePicker;
|
|
42
56
|
customElements.define('iqr-form-date-picker', DatePicker);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
import { VersionedValue } from '../../iqr-text-field';
|
|
4
|
+
export declare class DateTimePicker extends LitElement {
|
|
5
|
+
label: string;
|
|
6
|
+
labelPosition?: string;
|
|
7
|
+
valueProvider?: () => VersionedValue[];
|
|
8
|
+
static get styles(): CSSResultGroup[];
|
|
9
|
+
render(): TemplateResult;
|
|
10
|
+
}
|
|
@@ -10,33 +10,39 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DateTimePicker = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class DateTimePicker extends
|
|
16
|
+
class DateTimePicker extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
21
|
+
this.valueProvider = undefined;
|
|
20
22
|
}
|
|
21
23
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
return [
|
|
25
|
+
lit_1.css `
|
|
26
|
+
:host {
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
];
|
|
26
30
|
}
|
|
27
31
|
render() {
|
|
28
|
-
return
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="date-time"></iqr-text-field>
|
|
30
|
-
`;
|
|
32
|
+
return lit_1.html ` <iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="date-time" .valueProvider=${this.valueProvider}></iqr-text-field> `;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
36
|
+
decorators_1.property(),
|
|
37
|
+
__metadata("design:type", Object)
|
|
36
38
|
], DateTimePicker.prototype, "label", void 0);
|
|
37
39
|
__decorate([
|
|
38
|
-
|
|
40
|
+
decorators_1.property(),
|
|
39
41
|
__metadata("design:type", String)
|
|
40
42
|
], DateTimePicker.prototype, "labelPosition", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
decorators_1.property(),
|
|
45
|
+
__metadata("design:type", Function)
|
|
46
|
+
], DateTimePicker.prototype, "valueProvider", void 0);
|
|
41
47
|
exports.DateTimePicker = DateTimePicker;
|
|
42
48
|
customElements.define('iqr-form-date-time-picker', DateTimePicker);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
export declare class MeasureField extends LitElement {
|
|
4
|
+
label: string;
|
|
5
|
+
labelPosition?: string;
|
|
6
|
+
static get styles(): CSSResultGroup[];
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
@@ -10,32 +10,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MeasureField = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class MeasureField extends
|
|
16
|
+
class MeasureField extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
20
21
|
}
|
|
21
22
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return [
|
|
24
|
+
lit_1.css `
|
|
25
|
+
:host {
|
|
26
|
+
}
|
|
27
|
+
`,
|
|
28
|
+
];
|
|
26
29
|
}
|
|
27
30
|
render() {
|
|
28
|
-
return
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="measure"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
+
return lit_1.html ` <iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="measure"></iqr-text-field> `;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
35
|
+
decorators_1.property(),
|
|
36
|
+
__metadata("design:type", Object)
|
|
36
37
|
], MeasureField.prototype, "label", void 0);
|
|
37
38
|
__decorate([
|
|
38
|
-
|
|
39
|
+
decorators_1.property(),
|
|
39
40
|
__metadata("design:type", String)
|
|
40
41
|
], MeasureField.prototype, "labelPosition", void 0);
|
|
41
42
|
exports.MeasureField = MeasureField;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
export declare class MultipleChoice extends LitElement {
|
|
4
|
+
label: string;
|
|
5
|
+
labelPosition?: string;
|
|
6
|
+
static get styles(): CSSResultGroup[];
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
@@ -10,32 +10,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MultipleChoice = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class MultipleChoice extends
|
|
16
|
+
class MultipleChoice extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
20
21
|
}
|
|
21
22
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return [
|
|
24
|
+
lit_1.css `
|
|
25
|
+
:host {
|
|
26
|
+
}
|
|
27
|
+
`,
|
|
28
|
+
];
|
|
26
29
|
}
|
|
27
30
|
render() {
|
|
28
|
-
return
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
+
return lit_1.html ` <iqr-text-field labelPosition=${this.labelPosition} label="${this.label}"></iqr-text-field> `;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
35
|
+
decorators_1.property(),
|
|
36
|
+
__metadata("design:type", Object)
|
|
36
37
|
], MultipleChoice.prototype, "label", void 0);
|
|
37
38
|
__decorate([
|
|
38
|
-
|
|
39
|
+
decorators_1.property(),
|
|
39
40
|
__metadata("design:type", String)
|
|
40
41
|
], MultipleChoice.prototype, "labelPosition", void 0);
|
|
41
42
|
exports.MultipleChoice = MultipleChoice;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
export declare class NumberField extends LitElement {
|
|
4
|
+
label: string;
|
|
5
|
+
labelPosition?: string;
|
|
6
|
+
static get styles(): CSSResultGroup[];
|
|
7
|
+
render(): TemplateResult;
|
|
8
|
+
}
|
|
@@ -10,32 +10,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.NumberField = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class NumberField extends
|
|
16
|
+
class NumberField extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
20
21
|
}
|
|
21
22
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return [
|
|
24
|
+
lit_1.css `
|
|
25
|
+
:host {
|
|
26
|
+
}
|
|
27
|
+
`,
|
|
28
|
+
];
|
|
26
29
|
}
|
|
27
30
|
render() {
|
|
28
|
-
return
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="decimal"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
+
return lit_1.html `<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="decimal"></iqr-text-field> `;
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
35
|
+
decorators_1.property(),
|
|
36
|
+
__metadata("design:type", Object)
|
|
36
37
|
], NumberField.prototype, "label", void 0);
|
|
37
38
|
__decorate([
|
|
38
|
-
|
|
39
|
+
decorators_1.property(),
|
|
39
40
|
__metadata("design:type", String)
|
|
40
41
|
], NumberField.prototype, "labelPosition", void 0);
|
|
41
42
|
exports.NumberField = NumberField;
|
|
File without changes
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
const lit_1 = require("lit");
|
|
22
|
+
const decorators_1 = require("lit/decorators");
|
|
23
|
+
require("../../iqr-text-field");
|
|
24
|
+
class Textfield extends lit_1.LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.label = '';
|
|
28
|
+
this.multiline = false;
|
|
29
|
+
this.rows = 1;
|
|
30
|
+
this.grows = false;
|
|
31
|
+
this.labelPosition = undefined;
|
|
32
|
+
this.suggestionStopWords = new Set();
|
|
33
|
+
this.linksProvider = () => Promise.resolve(undefined);
|
|
34
|
+
this.suggestionProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
35
|
+
this.ownersProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
36
|
+
this.codeColorProvider = () => 'XI';
|
|
37
|
+
this.linkColorProvider = () => 'cat1';
|
|
38
|
+
this.codeContentProvider = (codes) => codes.map((c) => c.code).join(',');
|
|
39
|
+
this.valueProvider = undefined;
|
|
40
|
+
this.metaProvider = undefined;
|
|
41
|
+
this.handleValueChanged = undefined;
|
|
42
|
+
this.handleMetaChanged = undefined;
|
|
43
|
+
}
|
|
44
|
+
static get styles() {
|
|
45
|
+
return [
|
|
46
|
+
lit_1.css `
|
|
47
|
+
:host {
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return lit_1.html `
|
|
54
|
+
<iqr-text-field
|
|
55
|
+
labelPosition=${this.labelPosition}
|
|
56
|
+
?multiline="${this.multiline}"
|
|
57
|
+
label="${this.label}"
|
|
58
|
+
?suggestions=${!!this.suggestionProvider}
|
|
59
|
+
?links=${!!this.linksProvider}
|
|
60
|
+
.linksProvider=${this.linksProvider}
|
|
61
|
+
.suggestionProvider=${this.suggestionProvider}
|
|
62
|
+
.ownersProvider=${this.ownersProvider}
|
|
63
|
+
.codeColorProvider=${this.codeColorProvider}
|
|
64
|
+
.linkColorProvider=${this.linkColorProvider}
|
|
65
|
+
.codeContentProvider=${this.codeContentProvider}
|
|
66
|
+
.valueProvider=${this.valueProvider}
|
|
67
|
+
.metaProvider=${this.metaProvider}
|
|
68
|
+
.handleValueChanged=${this.handleValueChanged}
|
|
69
|
+
.handleMetaChanged=${this.handleMetaChanged}
|
|
70
|
+
></iqr-text-field>
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
__decorate([
|
|
75
|
+
decorators_1.property(),
|
|
76
|
+
__metadata("design:type", Object)
|
|
77
|
+
], Textfield.prototype, "label", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
decorators_1.property(),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], Textfield.prototype, "multiline", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
decorators_1.property(),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], Textfield.prototype, "rows", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
decorators_1.property(),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], Textfield.prototype, "grows", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
decorators_1.property(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], Textfield.prototype, "labelPosition", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
decorators_1.property(),
|
|
96
|
+
__metadata("design:type", Set)
|
|
97
|
+
], Textfield.prototype, "suggestionStopWords", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
decorators_1.property(),
|
|
100
|
+
__metadata("design:type", Function)
|
|
101
|
+
], Textfield.prototype, "linksProvider", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
decorators_1.property(),
|
|
104
|
+
__metadata("design:type", Function)
|
|
105
|
+
], Textfield.prototype, "suggestionProvider", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
decorators_1.property(),
|
|
108
|
+
__metadata("design:type", Function)
|
|
109
|
+
], Textfield.prototype, "ownersProvider", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
decorators_1.property(),
|
|
112
|
+
__metadata("design:type", Function)
|
|
113
|
+
], Textfield.prototype, "codeColorProvider", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
decorators_1.property(),
|
|
116
|
+
__metadata("design:type", Function)
|
|
117
|
+
], Textfield.prototype, "linkColorProvider", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
decorators_1.property(),
|
|
120
|
+
__metadata("design:type", Function)
|
|
121
|
+
], Textfield.prototype, "codeContentProvider", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
decorators_1.property(),
|
|
124
|
+
__metadata("design:type", Function)
|
|
125
|
+
], Textfield.prototype, "valueProvider", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
decorators_1.property(),
|
|
128
|
+
__metadata("design:type", Function)
|
|
129
|
+
], Textfield.prototype, "metaProvider", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
decorators_1.property(),
|
|
132
|
+
__metadata("design:type", Function)
|
|
133
|
+
], Textfield.prototype, "handleValueChanged", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
decorators_1.property(),
|
|
136
|
+
__metadata("design:type", Function)
|
|
137
|
+
], Textfield.prototype, "handleMetaChanged", void 0);
|
|
138
|
+
customElements.define('iqr-form-textfield', Textfield);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../../iqr-text-field';
|
|
3
|
+
import { VersionedValue } from '../../iqr-text-field';
|
|
4
|
+
export declare class TimePicker extends LitElement {
|
|
5
|
+
label: string;
|
|
6
|
+
labelPosition?: string;
|
|
7
|
+
valueProvider?: () => VersionedValue[];
|
|
8
|
+
static get styles(): CSSResultGroup[];
|
|
9
|
+
render(): TemplateResult;
|
|
10
|
+
}
|
|
@@ -10,33 +10,39 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TimePicker = void 0;
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
require("../../iqr-text-field");
|
|
15
|
-
class TimePicker extends
|
|
16
|
+
class TimePicker extends lit_1.LitElement {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.label = '';
|
|
19
20
|
this.labelPosition = undefined;
|
|
21
|
+
this.valueProvider = undefined;
|
|
20
22
|
}
|
|
21
23
|
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
return [
|
|
25
|
+
lit_1.css `
|
|
26
|
+
:host {
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
];
|
|
26
30
|
}
|
|
27
31
|
render() {
|
|
28
|
-
return
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="time"></iqr-text-field>
|
|
30
|
-
`;
|
|
32
|
+
return lit_1.html ` <iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="time" .valueProvider=${this.valueProvider}></iqr-text-field> `;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
__decorate([
|
|
34
|
-
|
|
35
|
-
__metadata("design:type",
|
|
36
|
+
decorators_1.property(),
|
|
37
|
+
__metadata("design:type", Object)
|
|
36
38
|
], TimePicker.prototype, "label", void 0);
|
|
37
39
|
__decorate([
|
|
38
|
-
|
|
40
|
+
decorators_1.property(),
|
|
39
41
|
__metadata("design:type", String)
|
|
40
42
|
], TimePicker.prototype, "labelPosition", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
decorators_1.property(),
|
|
45
|
+
__metadata("design:type", Function)
|
|
46
|
+
], TimePicker.prototype, "valueProvider", void 0);
|
|
41
47
|
exports.TimePicker = TimePicker;
|
|
42
48
|
customElements.define('iqr-form-time-picker', TimePicker);
|
|
File without changes
|
|
@@ -10,7 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
// Import the LitElement base class and html helper function
|
|
13
|
-
const
|
|
13
|
+
const lit_1 = require("lit");
|
|
14
|
+
const decorators_1 = require("lit/decorators");
|
|
14
15
|
const model_1 = require("./model");
|
|
15
16
|
require("./fields/textfield");
|
|
16
17
|
require("./fields/measureField");
|
|
@@ -20,8 +21,8 @@ require("./fields/timePicker");
|
|
|
20
21
|
require("./fields/dateTimePicker");
|
|
21
22
|
require("./fields/multipleChoice");
|
|
22
23
|
// @ts-ignore
|
|
23
|
-
const
|
|
24
|
-
const baseCss =
|
|
24
|
+
const lit_2 = require("lit");
|
|
25
|
+
const baseCss = lit_2.css `.iqr-form {
|
|
25
26
|
display: flex;
|
|
26
27
|
flex-flow: row wrap;
|
|
27
28
|
align-items: center;
|
|
@@ -37,7 +38,7 @@ const baseCss = lit_element_2.css `.iqr-form {
|
|
|
37
38
|
font-size: 1.2em;
|
|
38
39
|
font-weight: normal;
|
|
39
40
|
color: #282829;
|
|
40
|
-
margin: 0;
|
|
41
|
+
margin: 0 0 1em !important;
|
|
41
42
|
}
|
|
42
43
|
.iqr-form > * {
|
|
43
44
|
margin: 0 24px 0 0;
|
|
@@ -65,9 +66,9 @@ const baseCss = lit_element_2.css `.iqr-form {
|
|
|
65
66
|
}
|
|
66
67
|
.iqr-form .group {
|
|
67
68
|
background: #f6f6f6;
|
|
68
|
-
padding:
|
|
69
|
+
padding: 12px 0 12px 8px;
|
|
69
70
|
border-radius: 12px;
|
|
70
|
-
margin:
|
|
71
|
+
margin: 4px 0;
|
|
71
72
|
width: 100%;
|
|
72
73
|
display: flex;
|
|
73
74
|
flex-flow: row wrap;
|
|
@@ -78,18 +79,18 @@ const baseCss = lit_element_2.css `.iqr-form {
|
|
|
78
79
|
margin: 0 24px 0 0;
|
|
79
80
|
}`;
|
|
80
81
|
// @ts-ignore
|
|
81
|
-
const kendoCss =
|
|
82
|
+
const kendoCss = lit_2.css ``;
|
|
82
83
|
const cards_1 = require("./renderer/cards");
|
|
83
84
|
const form_1 = require("./renderer/form");
|
|
84
85
|
// Extend the LitElement base class
|
|
85
|
-
class IqrForm extends
|
|
86
|
+
class IqrForm extends lit_1.LitElement {
|
|
86
87
|
constructor() {
|
|
87
88
|
super();
|
|
88
|
-
this.skin =
|
|
89
|
-
this.theme =
|
|
90
|
-
this.renderer =
|
|
89
|
+
this.skin = 'material';
|
|
90
|
+
this.theme = 'default';
|
|
91
|
+
this.renderer = 'form';
|
|
91
92
|
this.labelPosition = undefined;
|
|
92
|
-
this.
|
|
93
|
+
this.formValuesContainer = undefined;
|
|
93
94
|
}
|
|
94
95
|
connectedCallback() {
|
|
95
96
|
super.connectedCallback();
|
|
@@ -101,36 +102,40 @@ class IqrForm extends lit_element_1.LitElement {
|
|
|
101
102
|
return [baseCss, kendoCss];
|
|
102
103
|
}
|
|
103
104
|
render() {
|
|
104
|
-
const renderer = this.renderer === 'form' ? form_1.render :
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
const renderer = this.renderer === 'form' ? form_1.render : this.renderer === 'form' ? cards_1.render : undefined;
|
|
106
|
+
return renderer && this.form
|
|
107
|
+
? renderer(this.form, { labelPosition: this.labelPosition }, this.formValuesContainer)
|
|
108
|
+
: this.form
|
|
109
|
+
? lit_1.html `<p>unknown renderer</p>`
|
|
110
|
+
: lit_1.html `<p>missing form</p>`;
|
|
107
111
|
}
|
|
108
112
|
firstUpdated() {
|
|
113
|
+
//Do nothing
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
116
|
__decorate([
|
|
112
|
-
|
|
117
|
+
decorators_1.property(),
|
|
113
118
|
__metadata("design:type", model_1.Form)
|
|
114
119
|
], IqrForm.prototype, "form", void 0);
|
|
115
120
|
__decorate([
|
|
116
|
-
|
|
117
|
-
__metadata("design:type",
|
|
121
|
+
decorators_1.property(),
|
|
122
|
+
__metadata("design:type", Object)
|
|
118
123
|
], IqrForm.prototype, "skin", void 0);
|
|
119
124
|
__decorate([
|
|
120
|
-
|
|
121
|
-
__metadata("design:type",
|
|
125
|
+
decorators_1.property(),
|
|
126
|
+
__metadata("design:type", Object)
|
|
122
127
|
], IqrForm.prototype, "theme", void 0);
|
|
123
128
|
__decorate([
|
|
124
|
-
|
|
125
|
-
__metadata("design:type",
|
|
129
|
+
decorators_1.property(),
|
|
130
|
+
__metadata("design:type", Object)
|
|
126
131
|
], IqrForm.prototype, "renderer", void 0);
|
|
127
132
|
__decorate([
|
|
128
|
-
|
|
133
|
+
decorators_1.property(),
|
|
129
134
|
__metadata("design:type", String)
|
|
130
135
|
], IqrForm.prototype, "labelPosition", void 0);
|
|
131
136
|
__decorate([
|
|
132
|
-
|
|
137
|
+
decorators_1.property(),
|
|
133
138
|
__metadata("design:type", Object)
|
|
134
|
-
], IqrForm.prototype, "
|
|
139
|
+
], IqrForm.prototype, "formValuesContainer", void 0);
|
|
135
140
|
// Register the new element with the browser.
|
|
136
141
|
customElements.define('iqr-form', IqrForm);
|