@icure/form 1.0.3 → 1.0.7
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/{lib/components → components}/iqr-form/fields/datePicker.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/datePicker.js +0 -0
- package/{lib/components → components}/iqr-form/fields/dateTimePicker.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/dateTimePicker.js +0 -0
- package/{lib/components → components}/iqr-form/fields/measureField.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/measureField.js +0 -0
- package/{lib/components → components}/iqr-form/fields/multipleChoice.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/multipleChoice.js +0 -0
- package/{lib/components → components}/iqr-form/fields/numberField.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/numberField.js +0 -0
- package/{lib/components → components}/iqr-form/fields/textfield.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/textfield.js +0 -0
- package/{lib/components → components}/iqr-form/fields/timePicker.d.ts +0 -0
- package/{lib/components → components}/iqr-form/fields/timePicker.js +0 -0
- package/{lib/components → components}/iqr-form/index.d.ts +0 -0
- package/{lib/components → components}/iqr-form/index.js +59 -6
- package/{lib/components → components}/iqr-form/model/index.d.ts +0 -0
- package/{lib → components}/iqr-form/model/index.js +2 -2
- package/{lib/components → components}/iqr-form/renderer/cards.d.ts +0 -0
- package/{lib/components → components}/iqr-form/renderer/cards.js +2 -1
- package/{lib/components → components}/iqr-form/renderer/form.d.ts +0 -0
- package/{lib/components → components}/iqr-form/renderer/form.js +2 -1
- package/{lib/components → components}/iqr-form/renderer/index.d.ts +0 -0
- package/{lib/components → components}/iqr-form/renderer/index.js +0 -0
- package/{lib/components → components}/iqr-text-field/index.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/index.js +751 -7
- package/{lib/components → components}/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/plugin/caret-fix-plugin.js +2 -1
- package/{lib/components → components}/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/plugin/has-content-class-plugin.js +2 -1
- package/{lib/components → components}/iqr-text-field/plugin/mask-plugin.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/plugin/mask-plugin.js +2 -1
- package/{lib/components → components}/iqr-text-field/plugin/regexp-plugin.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/plugin/regexp-plugin.js +2 -1
- package/{lib/components → components}/iqr-text-field/prosemirror-commands.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/prosemirror-commands.js +0 -0
- package/{lib/components → components}/iqr-text-field/prosemirror-utils.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/prosemirror-utils.js +0 -0
- package/{lib/components → components}/iqr-text-field/schema/common-marks.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/common-marks.js +0 -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 +0 -0
- 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 +0 -0
- package/{lib/components → components}/iqr-text-field/schema/index.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/index.js +0 -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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/{lib/components → components}/iqr-text-field/schema/utils.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/schema/utils.js +0 -0
- package/{lib/components → components}/iqr-text-field/selection-companion.d.ts +0 -0
- package/{lib/components → components}/iqr-text-field/selection-companion.js +0 -0
- package/{lib/components → components}/iqr-text-field/suggestion-palette.d.ts +0 -0
- package/{lib → components}/iqr-text-field/suggestion-palette.js +5 -5
- package/{lib/index.d.ts → index.d.ts} +0 -0
- package/{lib/index.js → index.js} +0 -0
- package/package.json +14 -47
- package/lib/components/iqr-form/model/index.js +0 -114
- package/lib/components/iqr-text-field/suggestion-palette.js +0 -139
- package/lib/iqr-form/fields/datePicker.d.ts +0 -8
- package/lib/iqr-form/fields/datePicker.js +0 -42
- package/lib/iqr-form/fields/dateTimePicker.d.ts +0 -8
- package/lib/iqr-form/fields/dateTimePicker.js +0 -42
- package/lib/iqr-form/fields/measureField.d.ts +0 -8
- package/lib/iqr-form/fields/measureField.js +0 -42
- package/lib/iqr-form/fields/multipleChoice.d.ts +0 -8
- package/lib/iqr-form/fields/multipleChoice.js +0 -42
- package/lib/iqr-form/fields/numberField.d.ts +0 -8
- package/lib/iqr-form/fields/numberField.js +0 -42
- package/lib/iqr-form/fields/textfield.d.ts +0 -1
- package/lib/iqr-form/fields/textfield.js +0 -86
- package/lib/iqr-form/fields/timePicker.d.ts +0 -8
- package/lib/iqr-form/fields/timePicker.js +0 -42
- package/lib/iqr-form/index.d.ts +0 -7
- package/lib/iqr-form/index.js +0 -83
- package/lib/iqr-form/model/index.d.ts +0 -78
- package/lib/iqr-form/renderer/cards.d.ts +0 -2
- package/lib/iqr-form/renderer/cards.js +0 -43
- package/lib/iqr-form/renderer/form.d.ts +0 -2
- package/lib/iqr-form/renderer/form.js +0 -44
- package/lib/iqr-form/renderer/index.d.ts +0 -3
- package/lib/iqr-form/renderer/index.js +0 -2
- package/lib/iqr-text-field/index.d.ts +0 -2
- package/lib/iqr-text-field/index.js +0 -335
- package/lib/iqr-text-field/plugin/caret-fix-plugin.d.ts +0 -2
- package/lib/iqr-text-field/plugin/caret-fix-plugin.js +0 -23
- package/lib/iqr-text-field/plugin/has-content-class-plugin.d.ts +0 -2
- package/lib/iqr-text-field/plugin/has-content-class-plugin.js +0 -18
- package/lib/iqr-text-field/plugin/mask-plugin.d.ts +0 -2
- package/lib/iqr-text-field/plugin/mask-plugin.js +0 -143
- package/lib/iqr-text-field/plugin/regexp-plugin.d.ts +0 -2
- package/lib/iqr-text-field/plugin/regexp-plugin.js +0 -46
- package/lib/iqr-text-field/prosemirror-commands.d.ts +0 -4
- package/lib/iqr-text-field/prosemirror-commands.js +0 -52
- package/lib/iqr-text-field/prosemirror-utils.d.ts +0 -5
- package/lib/iqr-text-field/prosemirror-utils.js +0 -15
- package/lib/iqr-text-field/schema/common-marks.d.ts +0 -10
- package/lib/iqr-text-field/schema/common-marks.js +0 -90
- package/lib/iqr-text-field/schema/date-time-schema.d.ts +0 -7
- package/lib/iqr-text-field/schema/date-time-schema.js +0 -88
- package/lib/iqr-text-field/schema/decimal-schema.d.ts +0 -3
- package/lib/iqr-text-field/schema/decimal-schema.js +0 -27
- package/lib/iqr-text-field/schema/index.d.ts +0 -11
- package/lib/iqr-text-field/schema/index.js +0 -18
- package/lib/iqr-text-field/schema/markdown-schema.d.ts +0 -8
- package/lib/iqr-text-field/schema/markdown-schema.js +0 -139
- package/lib/iqr-text-field/schema/measure-schema.d.ts +0 -3
- package/lib/iqr-text-field/schema/measure-schema.js +0 -35
- package/lib/iqr-text-field/schema/token-schema.d.ts +0 -6
- package/lib/iqr-text-field/schema/token-schema.js +0 -36
- package/lib/iqr-text-field/schema/utils.d.ts +0 -11
- package/lib/iqr-text-field/schema/utils.js +0 -11
- package/lib/iqr-text-field/selection-companion.d.ts +0 -11
- package/lib/iqr-text-field/selection-companion.js +0 -52
- package/lib/iqr-text-field/suggestion-palette.d.ts +0 -33
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class MultipleChoice extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MultipleChoice = void 0;
|
|
13
|
-
const lit_element_1 = require("lit-element");
|
|
14
|
-
require("../../iqr-text-field");
|
|
15
|
-
class MultipleChoice extends lit_element_1.LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.label = '';
|
|
19
|
-
this.labelPosition = undefined;
|
|
20
|
-
}
|
|
21
|
-
static get styles() {
|
|
22
|
-
return [lit_element_1.css `
|
|
23
|
-
:host {
|
|
24
|
-
}
|
|
25
|
-
`];
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return lit_element_1.html `
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
__decorate([
|
|
34
|
-
lit_element_1.property(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], MultipleChoice.prototype, "label", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
lit_element_1.property(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], MultipleChoice.prototype, "labelPosition", void 0);
|
|
41
|
-
exports.MultipleChoice = MultipleChoice;
|
|
42
|
-
customElements.define('iqr-form-multiple-choice', MultipleChoice);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class NumberField extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NumberField = void 0;
|
|
13
|
-
const lit_element_1 = require("lit-element");
|
|
14
|
-
require("../../iqr-text-field");
|
|
15
|
-
class NumberField extends lit_element_1.LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.label = '';
|
|
19
|
-
this.labelPosition = undefined;
|
|
20
|
-
}
|
|
21
|
-
static get styles() {
|
|
22
|
-
return [lit_element_1.css `
|
|
23
|
-
:host {
|
|
24
|
-
}
|
|
25
|
-
`];
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return lit_element_1.html `
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="decimal"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
__decorate([
|
|
34
|
-
lit_element_1.property(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], NumberField.prototype, "label", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
lit_element_1.property(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], NumberField.prototype, "labelPosition", void 0);
|
|
41
|
-
exports.NumberField = NumberField;
|
|
42
|
-
customElements.define('iqr-form-number-field', NumberField);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '../../iqr-text-field';
|
|
@@ -1,86 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const lit_element_1 = require("lit-element");
|
|
13
|
-
require("../../iqr-text-field");
|
|
14
|
-
class Textfield extends lit_element_1.LitElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.label = '';
|
|
18
|
-
this.multiline = false;
|
|
19
|
-
this.rows = 1;
|
|
20
|
-
this.grows = false;
|
|
21
|
-
this.labelPosition = undefined;
|
|
22
|
-
this.suggestionStopWords = new Set();
|
|
23
|
-
this.linksProvider = () => Promise.resolve(undefined);
|
|
24
|
-
this.suggestionProvider = () => [];
|
|
25
|
-
this.codeColorProvider = () => 'XI';
|
|
26
|
-
this.linkColorProvider = () => 'cat1';
|
|
27
|
-
this.codeContentProvider = (codes) => codes.map(c => c.code).join(',');
|
|
28
|
-
}
|
|
29
|
-
static get styles() {
|
|
30
|
-
return [lit_element_1.css `
|
|
31
|
-
:host {
|
|
32
|
-
}
|
|
33
|
-
`];
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return lit_element_1.html `
|
|
37
|
-
<iqr-text-field labelPosition=${this.labelPosition} ?multiline="${this.multiline}" label="${this.label}" ?suggestions=${!!this.suggestionProvider} ?links=${!!this.linksProvider}
|
|
38
|
-
.linksProvider=${this.linksProvider} .suggestionProvider=${this.suggestionProvider} .codeColorProvider=${this.codeColorProvider} .linkColorProvider=${this.linkColorProvider} .codeContentProvider=${this.codeContentProvider}></iqr-text-field>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
__decorate([
|
|
43
|
-
lit_element_1.property(),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], Textfield.prototype, "label", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
lit_element_1.property(),
|
|
48
|
-
__metadata("design:type", Boolean)
|
|
49
|
-
], Textfield.prototype, "multiline", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
lit_element_1.property(),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], Textfield.prototype, "rows", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
lit_element_1.property(),
|
|
56
|
-
__metadata("design:type", Boolean)
|
|
57
|
-
], Textfield.prototype, "grows", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
lit_element_1.property(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], Textfield.prototype, "labelPosition", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
lit_element_1.property(),
|
|
64
|
-
__metadata("design:type", Set)
|
|
65
|
-
], Textfield.prototype, "suggestionStopWords", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
lit_element_1.property(),
|
|
68
|
-
__metadata("design:type", Function)
|
|
69
|
-
], Textfield.prototype, "linksProvider", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
lit_element_1.property(),
|
|
72
|
-
__metadata("design:type", Function)
|
|
73
|
-
], Textfield.prototype, "suggestionProvider", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
lit_element_1.property(),
|
|
76
|
-
__metadata("design:type", Function)
|
|
77
|
-
], Textfield.prototype, "codeColorProvider", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
lit_element_1.property(),
|
|
80
|
-
__metadata("design:type", Function)
|
|
81
|
-
], Textfield.prototype, "linkColorProvider", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
lit_element_1.property(),
|
|
84
|
-
__metadata("design:type", Function)
|
|
85
|
-
], Textfield.prototype, "codeContentProvider", void 0);
|
|
86
|
-
customElements.define('iqr-form-textfield', Textfield);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit-element';
|
|
2
|
-
import '../../iqr-text-field';
|
|
3
|
-
export declare class TimePicker extends LitElement {
|
|
4
|
-
label: string;
|
|
5
|
-
labelPosition?: string;
|
|
6
|
-
static get styles(): import("lit-element").CSSResult[];
|
|
7
|
-
render(): import("lit-element").TemplateResult;
|
|
8
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TimePicker = void 0;
|
|
13
|
-
const lit_element_1 = require("lit-element");
|
|
14
|
-
require("../../iqr-text-field");
|
|
15
|
-
class TimePicker extends lit_element_1.LitElement {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.label = '';
|
|
19
|
-
this.labelPosition = undefined;
|
|
20
|
-
}
|
|
21
|
-
static get styles() {
|
|
22
|
-
return [lit_element_1.css `
|
|
23
|
-
:host {
|
|
24
|
-
}
|
|
25
|
-
`];
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return lit_element_1.html `
|
|
29
|
-
<iqr-text-field labelPosition=${this.labelPosition} label="${this.label}" schema="time"></iqr-text-field>
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
__decorate([
|
|
34
|
-
lit_element_1.property(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], TimePicker.prototype, "label", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
lit_element_1.property(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], TimePicker.prototype, "labelPosition", void 0);
|
|
41
|
-
exports.TimePicker = TimePicker;
|
|
42
|
-
customElements.define('iqr-form-time-picker', TimePicker);
|
package/lib/iqr-form/index.d.ts
DELETED
package/lib/iqr-form/index.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
// Import the LitElement base class and html helper function
|
|
16
|
-
const lit_element_1 = require("lit-element");
|
|
17
|
-
const model_1 = require("./model");
|
|
18
|
-
require("./fields/textfield");
|
|
19
|
-
require("./fields/measureField");
|
|
20
|
-
require("./fields/numberField");
|
|
21
|
-
require("./fields/datePicker");
|
|
22
|
-
require("./fields/timePicker");
|
|
23
|
-
require("./fields/dateTimePicker");
|
|
24
|
-
require("./fields/multipleChoice");
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
const style_scss_1 = __importDefault(require("./styles/style.scss"));
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
const kendo_scss_1 = __importDefault(require("./styles/kendo.scss"));
|
|
29
|
-
const cards_1 = require("./renderer/cards");
|
|
30
|
-
const form_1 = require("./renderer/form");
|
|
31
|
-
// Extend the LitElement base class
|
|
32
|
-
class IqrForm extends lit_element_1.LitElement {
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.skin = "material";
|
|
36
|
-
this.theme = "default";
|
|
37
|
-
this.renderer = "form";
|
|
38
|
-
this.labelPosition = undefined;
|
|
39
|
-
this.state = {};
|
|
40
|
-
}
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
super.connectedCallback();
|
|
43
|
-
}
|
|
44
|
-
disconnectedCallback() {
|
|
45
|
-
super.disconnectedCallback();
|
|
46
|
-
}
|
|
47
|
-
static get styles() {
|
|
48
|
-
return [style_scss_1.default, kendo_scss_1.default];
|
|
49
|
-
}
|
|
50
|
-
render() {
|
|
51
|
-
const renderer = this.renderer === 'form' ? form_1.render :
|
|
52
|
-
this.renderer === 'form' ? cards_1.render : undefined;
|
|
53
|
-
return (renderer && this.form ? renderer(this.form, { labelPosition: this.labelPosition }, this.state, (newState) => this.state = newState) : this.form ? lit_element_1.html `<p>unknown renderer</p>` : lit_element_1.html `<p>missing form</p>`);
|
|
54
|
-
}
|
|
55
|
-
firstUpdated() {
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
__decorate([
|
|
59
|
-
lit_element_1.property(),
|
|
60
|
-
__metadata("design:type", model_1.Form)
|
|
61
|
-
], IqrForm.prototype, "form", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
lit_element_1.property(),
|
|
64
|
-
__metadata("design:type", String)
|
|
65
|
-
], IqrForm.prototype, "skin", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
lit_element_1.property(),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], IqrForm.prototype, "theme", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
lit_element_1.property(),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], IqrForm.prototype, "renderer", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
lit_element_1.property(),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], IqrForm.prototype, "labelPosition", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
lit_element_1.property(),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], IqrForm.prototype, "state", void 0);
|
|
82
|
-
// Register the new element with the browser.
|
|
83
|
-
customElements.define('iqr-form', IqrForm);
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { IqrTextFieldSchema } from "../../iqr-text-field";
|
|
2
|
-
declare type FieldType = 'textfield' | 'measure-field' | 'number-field' | 'date-picker' | 'time-picker' | 'date-time-picker' | 'multiple-choice';
|
|
3
|
-
export declare abstract class Field {
|
|
4
|
-
field: string;
|
|
5
|
-
type: FieldType;
|
|
6
|
-
shortLabel?: string;
|
|
7
|
-
rows?: number;
|
|
8
|
-
columns?: number;
|
|
9
|
-
grows?: boolean;
|
|
10
|
-
schema?: IqrTextFieldSchema;
|
|
11
|
-
tags?: string[];
|
|
12
|
-
codifications?: string[];
|
|
13
|
-
options?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
protected constructor(type: FieldType, label: string, shortLabel?: string, rows?: number, columns?: number, grows?: boolean, schema?: IqrTextFieldSchema, tags?: string[], codifications?: string[], options?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
});
|
|
19
|
-
static parse(json: any): TextField | MeasureField | NumberField | DatePicker | TimePicker | DateTimePicker | MultipleChoice;
|
|
20
|
-
}
|
|
21
|
-
export declare class TextField extends Field {
|
|
22
|
-
constructor(label: string, shortLabel?: string, rows?: number, grows?: boolean, schema?: IqrTextFieldSchema, tags?: string[], codifications?: string[], options?: {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
export declare class MeasureField extends Field {
|
|
27
|
-
constructor(label: string, shortLabel?: string, tags?: string[], codifications?: string[], options?: {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export declare class NumberField extends Field {
|
|
32
|
-
constructor(label: string, shortLabel?: string, tags?: string[], codifications?: string[], options?: {
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
export declare class DatePicker extends Field {
|
|
37
|
-
constructor(label: string, shortLabel?: string, tags?: string[], codifications?: string[], options?: {
|
|
38
|
-
[key: string]: any;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export declare class TimePicker extends Field {
|
|
42
|
-
constructor(label: string, shortLabel?: string, tags?: string[], codifications?: string[], options?: {
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export declare class DateTimePicker extends Field {
|
|
47
|
-
constructor(label: string, shortLabel?: string, tags?: string[], codifications?: string[], options?: {
|
|
48
|
-
[key: string]: any;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export declare class MultipleChoice extends Field {
|
|
52
|
-
constructor(label: string, shortLabel?: string, rows?: number, columns?: number, tags?: string[], codifications?: string[], options?: {
|
|
53
|
-
[key: string]: any;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
export declare class Group {
|
|
57
|
-
group: string;
|
|
58
|
-
fields?: Array<Field | Group>;
|
|
59
|
-
constructor(title: string, fields: Array<Field | Group>);
|
|
60
|
-
static parse(json: any): Group;
|
|
61
|
-
}
|
|
62
|
-
export declare class Section {
|
|
63
|
-
section: string;
|
|
64
|
-
fields: Array<Field | Group>;
|
|
65
|
-
description?: string;
|
|
66
|
-
keywords?: String[];
|
|
67
|
-
constructor(title: string, fields: Array<Field | Group>, description?: string, keywords?: String[]);
|
|
68
|
-
static parse(json: any): Section;
|
|
69
|
-
}
|
|
70
|
-
export declare class Form {
|
|
71
|
-
form: string;
|
|
72
|
-
sections: Section[];
|
|
73
|
-
description?: string;
|
|
74
|
-
keywords?: String[];
|
|
75
|
-
constructor(title: string, sections: Section[], description?: string, keywords?: String[]);
|
|
76
|
-
static parse(json: any): Form;
|
|
77
|
-
}
|
|
78
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.render = void 0;
|
|
4
|
-
const lit_element_1 = require("lit-element");
|
|
5
|
-
const model_1 = require("../model");
|
|
6
|
-
exports.render = (form, props, state, setState) => {
|
|
7
|
-
var _a;
|
|
8
|
-
const h = function (level, content) {
|
|
9
|
-
return level === 1 ? lit_element_1.html `<h1>${content}</h1>` :
|
|
10
|
-
level === 2 ? lit_element_1.html `<h2>${content}</h2>` :
|
|
11
|
-
level === 3 ? lit_element_1.html `<h3>${content}</h3>` :
|
|
12
|
-
level === 4 ? lit_element_1.html `<h4>${content}</h4>` :
|
|
13
|
-
level === 5 ? lit_element_1.html `<h5>${content}</h5>` :
|
|
14
|
-
lit_element_1.html `<h6>${content}</h6>`;
|
|
15
|
-
};
|
|
16
|
-
const renderFieldOrGroup = function (fg, level) {
|
|
17
|
-
var _a;
|
|
18
|
-
return fg instanceof model_1.Group ? lit_element_1.html `
|
|
19
|
-
<div class="group">
|
|
20
|
-
${h(level, lit_element_1.html `${fg.group}`)}
|
|
21
|
-
${(_a = fg.fields) === null || _a === void 0 ? void 0 : _a.map(f => renderFieldOrGroup(f, level + 1))}` :
|
|
22
|
-
lit_element_1.html `${fg.type === 'textfield' ? lit_element_1.html `<iqr-form-textfield label="${fg.field}" multiline="${(fg.rows || 0) > 1 || fg.grows}" rows="${fg.rows || 1}" grows="${fg.grows || false}"></iqr-form-textfield>` :
|
|
23
|
-
fg.type === 'measure-field' ? lit_element_1.html `<iqr-form-measure-field label="${fg.field}"></iqr-form-measure-field>` :
|
|
24
|
-
fg.type === 'number-field' ? lit_element_1.html `<iqr-form-number-field label="${fg.field}"></iqr-form-number-field>` :
|
|
25
|
-
fg.type === 'date-picker' ? lit_element_1.html `<iqr-form-date-picker label="${fg.field}"></iqr-form-date-picker>` :
|
|
26
|
-
fg.type === 'time-picker' ? lit_element_1.html `<iqr-form-time-picker label="${fg.field}"></iqr-form-time-picker>` :
|
|
27
|
-
fg.type === 'date-time-picker' ? lit_element_1.html `<iqr-form-date-time-picker label="${fg.field}"></iqr-form-date-time-picker>` :
|
|
28
|
-
fg.type === 'multiple-choice' ? lit_element_1.html `<iqr-form-multiple-choice label="${fg.field}"></iqr-form-multiple-choice>` : ''}
|
|
29
|
-
</div>`;
|
|
30
|
-
};
|
|
31
|
-
return lit_element_1.html `
|
|
32
|
-
<div class="iqr-form">
|
|
33
|
-
${(_a = form === null || form === void 0 ? void 0 : form.sections) === null || _a === void 0 ? void 0 : _a.map(s => {
|
|
34
|
-
var _a;
|
|
35
|
-
return lit_element_1.html `
|
|
36
|
-
<h2>${s.section}</h2>
|
|
37
|
-
${s.description ? lit_element_1.html `<p>${s.description}</p>` : ''}
|
|
38
|
-
${(_a = s.fields) === null || _a === void 0 ? void 0 : _a.map(f => renderFieldOrGroup(f, 3))}
|
|
39
|
-
`;
|
|
40
|
-
})}
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.render = void 0;
|
|
4
|
-
const lit_element_1 = require("lit-element");
|
|
5
|
-
const model_1 = require("../model");
|
|
6
|
-
exports.render = (form, props, state, setState) => {
|
|
7
|
-
var _a;
|
|
8
|
-
const h = function (level, content) {
|
|
9
|
-
return level === 1 ? lit_element_1.html `<h1>${content}</h1>` :
|
|
10
|
-
level === 2 ? lit_element_1.html `<h2>${content}</h2>` :
|
|
11
|
-
level === 3 ? lit_element_1.html `<h3>${content}</h3>` :
|
|
12
|
-
level === 4 ? lit_element_1.html `<h4>${content}</h4>` :
|
|
13
|
-
level === 5 ? lit_element_1.html `<h5>${content}</h5>` :
|
|
14
|
-
lit_element_1.html `<h6>${content}</h6>`;
|
|
15
|
-
};
|
|
16
|
-
const renderFieldOrGroup = function (fg, level) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f;
|
|
18
|
-
return fg instanceof model_1.Group ? lit_element_1.html `
|
|
19
|
-
<div class="group">
|
|
20
|
-
${h(level, lit_element_1.html `${fg.group}`)}
|
|
21
|
-
${(_a = fg.fields) === null || _a === void 0 ? void 0 : _a.map(f => renderFieldOrGroup(f, level + 1))}` :
|
|
22
|
-
lit_element_1.html `${fg.type === 'textfield' ? lit_element_1.html `<iqr-form-textfield labelPosition=${props.labelPosition} label="${fg.field}" multiline="${(fg.rows || 0) > 1 || fg.grows}" rows="${fg.rows || 1}" grows="${fg.grows || false}"
|
|
23
|
-
.linksProvider=${(_b = fg.options) === null || _b === void 0 ? void 0 : _b.linksProvider} .suggestionProvider=${(_c = fg.options) === null || _c === void 0 ? void 0 : _c.suggestionProvider} .codeColorProvider=${(_d = fg.options) === null || _d === void 0 ? void 0 : _d.codeColorProvider} .linkColorProvider=${(_e = fg.options) === null || _e === void 0 ? void 0 : _e.linkColorProvider} .codeContentProvider=${(_f = fg.options) === null || _f === void 0 ? void 0 : _f.codeContentProvider}></iqr-form-textfield>` :
|
|
24
|
-
fg.type === 'measure-field' ? lit_element_1.html `<iqr-form-measure-field labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-measure-field>` :
|
|
25
|
-
fg.type === 'number-field' ? lit_element_1.html `<iqr-form-number-field labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-number-field>` :
|
|
26
|
-
fg.type === 'date-picker' ? lit_element_1.html `<iqr-form-date-picker labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-date-picker>` :
|
|
27
|
-
fg.type === 'time-picker' ? lit_element_1.html `<iqr-form-time-picker labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-time-picker>` :
|
|
28
|
-
fg.type === 'date-time-picker' ? lit_element_1.html `<iqr-form-date-time-picker labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-date-time-picker>` :
|
|
29
|
-
fg.type === 'multiple-choice' ? lit_element_1.html `<iqr-form-multiple-choice labelPosition=${props.labelPosition} label="${fg.field}"></iqr-form-multiple-choice>` : ''}
|
|
30
|
-
</div>`;
|
|
31
|
-
};
|
|
32
|
-
return lit_element_1.html `
|
|
33
|
-
<div class="iqr-form">
|
|
34
|
-
${(_a = form === null || form === void 0 ? void 0 : form.sections) === null || _a === void 0 ? void 0 : _a.map(s => {
|
|
35
|
-
var _a;
|
|
36
|
-
return lit_element_1.html `
|
|
37
|
-
<h2>${s.section}</h2>
|
|
38
|
-
${s.description ? lit_element_1.html `<p>${s.description}</p>` : ''}
|
|
39
|
-
${(_a = s.fields) === null || _a === void 0 ? void 0 : _a.map(f => renderFieldOrGroup(f, 3))}
|
|
40
|
-
`;
|
|
41
|
-
})}
|
|
42
|
-
</div>
|
|
43
|
-
`;
|
|
44
|
-
};
|