@icure/form 1.0.5 → 1.0.6
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 +3 -3
- package/{lib/components → components}/iqr-form/model/index.d.ts +0 -0
- package/{lib/components → 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 +0 -0
- package/{lib/components → components}/iqr-form/renderer/form.d.ts +0 -0
- package/{lib/components → components}/iqr-form/renderer/form.js +0 -0
- 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 +3 -4
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- 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 → 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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -37,7 +37,7 @@ const baseCss = lit_element_2.css `.iqr-form {
|
|
|
37
37
|
font-size: 1.2em;
|
|
38
38
|
font-weight: normal;
|
|
39
39
|
color: #282829;
|
|
40
|
-
margin: 0;
|
|
40
|
+
margin: 0 0 1em !important;
|
|
41
41
|
}
|
|
42
42
|
.iqr-form > * {
|
|
43
43
|
margin: 0 24px 0 0;
|
|
@@ -65,9 +65,9 @@ const baseCss = lit_element_2.css `.iqr-form {
|
|
|
65
65
|
}
|
|
66
66
|
.iqr-form .group {
|
|
67
67
|
background: #f6f6f6;
|
|
68
|
-
padding:
|
|
68
|
+
padding: 12px 0 12px 8px;
|
|
69
69
|
border-radius: 12px;
|
|
70
|
-
margin:
|
|
70
|
+
margin: 4px 0;
|
|
71
71
|
width: 100%;
|
|
72
72
|
display: flex;
|
|
73
73
|
flex-flow: row wrap;
|
|
File without changes
|
|
@@ -96,7 +96,7 @@ class Section {
|
|
|
96
96
|
this.keywords = keywords;
|
|
97
97
|
}
|
|
98
98
|
static parse(json) {
|
|
99
|
-
return new Section(json.section, json.fields.map((s) => s.group ? Group.parse(s) : Field.parse(s)), json.description, json.keywords);
|
|
99
|
+
return new Section(json.section, (json.fields || json.groups || json.sections || []).map((s) => s.group ? Group.parse(s) : Field.parse(s)), json.description, json.keywords);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
exports.Section = Section;
|
|
@@ -108,7 +108,7 @@ class Form {
|
|
|
108
108
|
this.sections = sections;
|
|
109
109
|
}
|
|
110
110
|
static parse(json) {
|
|
111
|
-
return new Form(json.form, json.sections.map((s) => Section.parse(s)), json.description, json.keywords);
|
|
111
|
+
return new Form(json.form, (json.sections || []).map((s) => Section.parse(s)), json.description, json.keywords);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
exports.Form = Form;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -895,7 +895,6 @@ class IqrTextField extends lit_element_1.LitElement {
|
|
|
895
895
|
}
|
|
896
896
|
mouseDown() {
|
|
897
897
|
this.mouseCount++;
|
|
898
|
-
console.log(this.mouseCount);
|
|
899
898
|
}
|
|
900
899
|
mouseUp() {
|
|
901
900
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -1061,15 +1060,15 @@ __decorate([
|
|
|
1061
1060
|
__metadata("design:type", String)
|
|
1062
1061
|
], IqrTextField.prototype, "owner", void 0);
|
|
1063
1062
|
__decorate([
|
|
1064
|
-
lit_element_1.property(),
|
|
1063
|
+
lit_element_1.property({ type: Boolean }),
|
|
1065
1064
|
__metadata("design:type", Boolean)
|
|
1066
1065
|
], IqrTextField.prototype, "displayOwnerMenu", void 0);
|
|
1067
1066
|
__decorate([
|
|
1068
|
-
lit_element_1.property(),
|
|
1067
|
+
lit_element_1.property({ type: Boolean }),
|
|
1069
1068
|
__metadata("design:type", Boolean)
|
|
1070
1069
|
], IqrTextField.prototype, "suggestions", void 0);
|
|
1071
1070
|
__decorate([
|
|
1072
|
-
lit_element_1.property(),
|
|
1071
|
+
lit_element_1.property({ type: Boolean }),
|
|
1073
1072
|
__metadata("design:type", Boolean)
|
|
1074
1073
|
], IqrTextField.prototype, "links", void 0);
|
|
1075
1074
|
__decorate([
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -92,7 +92,7 @@ class SuggestionPalette {
|
|
|
92
92
|
this.palette.style.display = "none";
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
const text = state.doc.textBetween($pos.pos ? $pos.before() + 1 : 0, $pos.pos);
|
|
95
|
+
const text = state.doc.textBetween($pos.pos && $pos.depth ? $pos.before() + 1 : 0, $pos.pos);
|
|
96
96
|
const words = text.split(/\s+/);
|
|
97
97
|
const terms = words.filter(x => x.length > 2 && !this.suggestionStopWordsProvider().has(x));
|
|
98
98
|
const lastTerms = terms.length > 3 ? terms.slice(length - 3) : terms;
|
|
@@ -109,7 +109,8 @@ class SuggestionPalette {
|
|
|
109
109
|
this.palette.innerHTML = `<ul>${res.map(x => `<li id="${x.id}" data-code="${x.code}">${x.text}<div class="icn-container"><svg class="tab-icn" viewBox="0 0 24 24"><path d="M12.29 8.12L15.17 11H2c-.55 0-1 .45-1 1s.45 1 1 1h13.17l-2.88 2.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L13.7 6.7c-.39-.39-1.02-.39-1.41 0-.38.39-.39 1.03 0 1.42zM20 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg><svg class="return-icn" viewBox="0 0 24 24"><path d="M19 8v3H5.83l2.88-2.88c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L2.71 11.3c-.39.39-.39 1.02 0 1.41L7.3 17.3c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L5.83 13H20c.55 0 1-.45 1-1V8c0-.55-.45-1-1-1s-1 .45-1 1z"/></svg></div></li>`).join('\n')}</ul>`;
|
|
110
110
|
// These are in screen coordinates
|
|
111
111
|
const end = view.coordsAtPos(to);
|
|
112
|
-
|
|
112
|
+
const start = view.coordsAtPos(Math.max(0, to - terms[terms.length - 1].length));
|
|
113
|
+
this.display((start.left > end.left) ? end : start, (this.lastTime = +new Date()));
|
|
113
114
|
}
|
|
114
115
|
else {
|
|
115
116
|
this.palette.style.display = "none";
|
|
@@ -129,9 +130,8 @@ class SuggestionPalette {
|
|
|
129
130
|
const box = (_a = this.palette.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
130
131
|
const palBox = this.palette.getBoundingClientRect();
|
|
131
132
|
if (box) {
|
|
132
|
-
|
|
133
|
-
this.palette.style.
|
|
134
|
-
this.palette.style.top = (pos.top + box.top) + "px";
|
|
133
|
+
this.palette.style.left = Math.max(0, Math.min(pos.left - box.left - 12, box.width - palBox.width)) + 'px';
|
|
134
|
+
this.palette.style.top = (pos.bottom - box.top + 2) + "px";
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
destroy() { this.palette.remove(); }
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,60 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icure/form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
-
"
|
|
7
|
-
"start": "webpack-dev-server --env.mode development",
|
|
8
|
-
"build": "node lit-inject-scss.js src tmp && tsc",
|
|
9
|
-
"dist": "webpack --env.mode production",
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [],
|
|
13
|
-
"author": "",
|
|
14
|
-
"license": "ISC",
|
|
6
|
+
"types": null,
|
|
15
7
|
"dependencies": {
|
|
16
|
-
"@icure/api": "^4.0.
|
|
17
|
-
"@webcomponents/webcomponentsjs": "^2.
|
|
8
|
+
"@icure/api": "^4.0.36",
|
|
9
|
+
"@webcomponents/webcomponentsjs": "^2.5.0",
|
|
18
10
|
"fast-deep-equal": "^3.1.3",
|
|
19
|
-
"lit-element": "^2.
|
|
20
|
-
"prosemirror-commands": "^1.1.
|
|
11
|
+
"lit-element": "^2.5.0",
|
|
12
|
+
"prosemirror-commands": "^1.1.7",
|
|
21
13
|
"prosemirror-history": "^1.1.3",
|
|
22
14
|
"prosemirror-keymap": "^1.1.4",
|
|
23
|
-
"prosemirror-markdown": "^1.5.
|
|
24
|
-
"prosemirror-model": "^1.
|
|
15
|
+
"prosemirror-markdown": "^1.5.1",
|
|
16
|
+
"prosemirror-model": "^1.14.1",
|
|
25
17
|
"prosemirror-schema-basic": "^1.1.2",
|
|
26
18
|
"prosemirror-schema-list": "^1.1.4",
|
|
27
19
|
"prosemirror-state": "^1.3.4",
|
|
28
|
-
"prosemirror-view": "^1.
|
|
29
|
-
"yaml": "^1.10.
|
|
20
|
+
"prosemirror-view": "^1.18.4",
|
|
21
|
+
"yaml": "^1.10.2"
|
|
30
22
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"@types/prosemirror-keymap": "^1.0.3",
|
|
36
|
-
"@types/prosemirror-markdown": "^1.0.3",
|
|
37
|
-
"@types/prosemirror-schema-basic": "^1.0.1",
|
|
38
|
-
"@types/prosemirror-schema-list": "^1.0.1",
|
|
39
|
-
"@types/prosemirror-state": "^1.2.6",
|
|
40
|
-
"@types/prosemirror-view": "^1.15.1",
|
|
41
|
-
"assert": "^2.0.0",
|
|
42
|
-
"babel": "^6.23.0",
|
|
43
|
-
"babel-preset-es2017": "^6.24.1",
|
|
44
|
-
"copy-webpack-plugin": "^6.2.0",
|
|
45
|
-
"css-loader": "^5.0.1",
|
|
46
|
-
"extract-loader": "^5.1.0",
|
|
47
|
-
"html-webpack-plugin": "^4.5.0",
|
|
48
|
-
"lit-scss-loader": "^1.0.1",
|
|
49
|
-
"minisearch": "^3.0.2",
|
|
50
|
-
"mocha": "^8.2.1",
|
|
51
|
-
"sass": "^1.32.2",
|
|
52
|
-
"sass-loader": "^10.1.1",
|
|
53
|
-
"ts-loader": "^8.0.4",
|
|
54
|
-
"ts-node": "^9.1.1",
|
|
55
|
-
"typescript": "^4.0.3",
|
|
56
|
-
"webpack": "^4.44.2",
|
|
57
|
-
"webpack-cli": "^3.3.12",
|
|
58
|
-
"webpack-dev-server": "^3.11.0"
|
|
59
|
-
}
|
|
23
|
+
"author": "",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"bugs": null,
|
|
26
|
+
"homepage": null
|
|
60
27
|
}
|