@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
|
@@ -22,7 +22,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
// Import the LitElement base class and html helper function
|
|
25
|
-
const
|
|
25
|
+
const lit_1 = require("lit");
|
|
26
|
+
const decorators_1 = require("lit/decorators");
|
|
26
27
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
27
28
|
const prosemirror_view_1 = require("prosemirror-view");
|
|
28
29
|
const prosemirror_history_1 = require("prosemirror-history");
|
|
@@ -38,8 +39,8 @@ const suggestion_palette_1 = require("./suggestion-palette");
|
|
|
38
39
|
const caret_fix_plugin_1 = require("./plugin/caret-fix-plugin");
|
|
39
40
|
const prosemirror_utils_1 = require("./prosemirror-utils");
|
|
40
41
|
// @ts-ignore
|
|
41
|
-
const
|
|
42
|
-
const baseCss =
|
|
42
|
+
const lit_2 = require("lit");
|
|
43
|
+
const baseCss = lit_2.css `@charset "UTF-8";
|
|
43
44
|
:host {
|
|
44
45
|
--bg-color-1: #F44336;
|
|
45
46
|
}
|
|
@@ -431,6 +432,10 @@ h3 {
|
|
|
431
432
|
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
|
|
432
433
|
border-radius: 8px;
|
|
433
434
|
padding: 8px;
|
|
435
|
+
width: 220px;
|
|
436
|
+
min-height: 120px;
|
|
437
|
+
max-height: 320px;
|
|
438
|
+
overflow-y: scroll;
|
|
434
439
|
}
|
|
435
440
|
|
|
436
441
|
.menu .input-container {
|
|
@@ -483,6 +488,9 @@ h3 {
|
|
|
483
488
|
justify-content: flex-start;
|
|
484
489
|
box-shadow: none;
|
|
485
490
|
border: none;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
overflow-x: hidden;
|
|
493
|
+
text-overflow: ellipsis;
|
|
486
494
|
}
|
|
487
495
|
|
|
488
496
|
.menu-container .item:hover {
|
|
@@ -520,7 +528,8 @@ span[data-content]:hover::after {
|
|
|
520
528
|
background: #274768;
|
|
521
529
|
color: #FFFFFF;
|
|
522
530
|
font-size: 9px;
|
|
523
|
-
|
|
531
|
+
line-height: 12px;
|
|
532
|
+
top: -12px;
|
|
524
533
|
left: 0px;
|
|
525
534
|
padding: 0px 2px;
|
|
526
535
|
}
|
|
@@ -598,14 +607,12 @@ span[data-content]::before {
|
|
|
598
607
|
border-radius: 4px;
|
|
599
608
|
color: #274768;
|
|
600
609
|
}
|
|
601
|
-
|
|
602
610
|
.suggestion-palette ul li svg {
|
|
603
611
|
height: 12px;
|
|
604
612
|
width: 12px;
|
|
605
613
|
border-radius: 4px;
|
|
606
614
|
transform-origin: center center;
|
|
607
615
|
}
|
|
608
|
-
|
|
609
616
|
.suggestion-palette ul li svg path {
|
|
610
617
|
fill: #809ab4;
|
|
611
618
|
}
|
|
@@ -665,7 +672,7 @@ span.code-count-3::after, span.code-count-3::before {
|
|
|
665
672
|
/* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/
|
|
666
673
|
}`;
|
|
667
674
|
// @ts-ignore
|
|
668
|
-
const kendoCss =
|
|
675
|
+
const kendoCss = lit_2.css `.iqr-text-field {
|
|
669
676
|
position: relative;
|
|
670
677
|
padding-top: 1.4em;
|
|
671
678
|
display: inline-flex;
|
|
@@ -789,27 +796,45 @@ const kendoCss = lit_element_2.css `.iqr-text-field {
|
|
|
789
796
|
const mask_plugin_1 = require("./plugin/mask-plugin");
|
|
790
797
|
const has_content_class_plugin_1 = require("./plugin/has-content-class-plugin");
|
|
791
798
|
const regexp_plugin_1 = require("./plugin/regexp-plugin");
|
|
799
|
+
const no_lodash_1 = require("../../utils/no-lodash");
|
|
800
|
+
const paths_1 = require("./styles/paths");
|
|
801
|
+
const languages_1 = require("../../utils/languages");
|
|
792
802
|
// Extend the LitElement base class
|
|
793
|
-
class IqrTextField extends
|
|
803
|
+
class IqrTextField extends lit_1.LitElement {
|
|
794
804
|
constructor() {
|
|
795
805
|
super();
|
|
796
806
|
this.suggestionStopWords = new Set();
|
|
797
807
|
this.linksProvider = () => Promise.resolve(undefined);
|
|
798
|
-
this.suggestionProvider = () => [];
|
|
808
|
+
this.suggestionProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
809
|
+
this.ownersProvider = () => __awaiter(this, void 0, void 0, function* () { return []; });
|
|
799
810
|
this.codeColorProvider = () => 'XI';
|
|
800
811
|
this.linkColorProvider = () => 'cat1';
|
|
801
|
-
this.codeContentProvider = (codes) => codes.map(c => c.code).join(',');
|
|
812
|
+
this.codeContentProvider = (codes) => codes.map((c) => c.code).join(',');
|
|
802
813
|
this.schema = 'styled-text-with-codes';
|
|
803
814
|
this.label = '';
|
|
804
815
|
this.labelPosition = 'float';
|
|
805
816
|
this.placeholder = '';
|
|
817
|
+
this.textRegex = '';
|
|
806
818
|
this.value = '';
|
|
807
|
-
this.
|
|
819
|
+
this.defaultLanguage = 'en';
|
|
820
|
+
this.valueProvider = undefined;
|
|
821
|
+
this.metaProvider = undefined;
|
|
822
|
+
this.handleValueChanged = undefined;
|
|
823
|
+
this.handleMetaChanged = undefined;
|
|
824
|
+
this.displayOwnersMenu = false;
|
|
825
|
+
this.ownerInputValue = '';
|
|
826
|
+
this.availableOwners = [];
|
|
827
|
+
this.displayLanguagesMenu = false;
|
|
828
|
+
this.languageInputValue = '';
|
|
829
|
+
this.displayVersionsMenu = false;
|
|
808
830
|
this.suggestions = false;
|
|
809
831
|
this.links = false;
|
|
810
|
-
this.
|
|
832
|
+
this.displayedLanguage = this.defaultLanguage;
|
|
833
|
+
this.displayedVersion = '0';
|
|
834
|
+
this.availableLanguages = [this.displayedLanguage];
|
|
811
835
|
this.windowListeners = [];
|
|
812
836
|
this.mouseCount = 0;
|
|
837
|
+
this.serviceId = undefined;
|
|
813
838
|
}
|
|
814
839
|
connectedCallback() {
|
|
815
840
|
super.connectedCallback();
|
|
@@ -821,157 +846,117 @@ class IqrTextField extends lit_element_1.LitElement {
|
|
|
821
846
|
}
|
|
822
847
|
disconnectedCallback() {
|
|
823
848
|
super.disconnectedCallback();
|
|
824
|
-
this.windowListeners.forEach(wl => window.removeEventListener(wl[0], wl[1]));
|
|
849
|
+
this.windowListeners.forEach((wl) => window.removeEventListener(wl[0], wl[1]));
|
|
825
850
|
}
|
|
826
851
|
static get styles() {
|
|
827
852
|
return [baseCss, kendoCss];
|
|
828
853
|
}
|
|
829
854
|
render() {
|
|
830
|
-
|
|
831
|
-
|
|
855
|
+
var _a, _b;
|
|
856
|
+
return lit_1.html `
|
|
857
|
+
<div id="root" class="iqr-text-field" data-placeholder=${this.placeholder}>
|
|
832
858
|
<label class="iqr-label ${this.labelPosition}"><span>${this.label}</span></label>
|
|
833
859
|
<div class="iqr-input">
|
|
834
860
|
<div id="editor"></div>
|
|
835
|
-
<div id="extra" class=${'extra' + (this.
|
|
836
|
-
<div class="info">
|
|
837
|
-
~${this.owner}
|
|
838
|
-
</div>
|
|
861
|
+
<div id="extra" class=${'extra' + (this.displayOwnersMenu ? ' forced' : '')}>
|
|
862
|
+
<div class="info">~${this.owner}</div>
|
|
839
863
|
<div class="buttons-container">
|
|
840
864
|
<div class="menu-container">
|
|
841
|
-
<button data-content="${this.owner}" @click="${this.toggleOwnerMenu}" class="btn menu-trigger author">
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
</svg>
|
|
852
|
-
<input>
|
|
853
|
-
</div>
|
|
854
|
-
<button class="item">
|
|
855
|
-
Jean René
|
|
856
|
-
</button>
|
|
857
|
-
<button class="item">
|
|
858
|
-
Jean José
|
|
859
|
-
</button>
|
|
860
|
-
<button class="item">
|
|
861
|
-
Marie-Josée Perrec
|
|
862
|
-
</button>
|
|
863
|
-
</div>
|
|
864
|
-
` : ''}
|
|
865
|
-
</div>
|
|
865
|
+
<button data-content="${this.owner}" @click="${this.toggleOwnerMenu}" class="btn menu-trigger author">${paths_1.ownerPicto}</button>
|
|
866
|
+
${this.displayOwnersMenu
|
|
867
|
+
? lit_1.html `
|
|
868
|
+
<div id="menu" class="menu">
|
|
869
|
+
<div class="input-container">${paths_1.searchPicto} <input id="ownerSearch" @input="${this.searchOwner}" /></div>
|
|
870
|
+
${(_a = this.availableOwners) === null || _a === void 0 ? void 0 : _a.map((x) => lit_1.html `<button @click="${this.handleOwnerButtonClicked(x.id)}" id="${x.id}" class="item">${x.text} @</button>`)}
|
|
871
|
+
</div>
|
|
872
|
+
`
|
|
873
|
+
: ''}
|
|
874
|
+
</div>
|
|
866
875
|
<div class="menu-container">
|
|
867
|
-
|
|
868
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
869
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895431 0 0 0.89543 0 2V8C0 9.10457 0.89543 10 2 10H8C9.10457 10 10 9.10457 10 8V2C10 0.895431 9.10457 0 8 0H2ZM1 3V8C1 8.55229 1.44772 9 2 9H8C8.55229 9 9 8.55229 9 8V3H1ZM8 8H5V5H8V8Z"/>
|
|
870
|
-
</svg>
|
|
871
|
-
</button>
|
|
876
|
+
<button data-content="01/02/20" class="btn date">${paths_1.datePicto}</button>
|
|
872
877
|
</div>
|
|
873
878
|
<div class="menu-container">
|
|
874
|
-
|
|
875
|
-
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
876
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 10C7.76141 10 10 7.76142 10 5C10 2.23858 7.76141 0 5 0C2.23859 0 0 2.23858 0 5C0 7.76142 2.23859 10 5 10ZM3.5 3.33172C3.03394 3.16698 2.70001 2.72249 2.70001 2.2C2.70001 1.53726 3.23727 1 3.90002 1C4.56274 1 5.10001 1.53726 5.10001 2.2C5.10001 2.72249 4.76608 3.16698 4.30002 3.33172V5.04041C4.73386 4.59767 5.31354 4.29838 5.96133 4.22028C6.12021 3.74364 6.56998 3.4 7.10001 3.4C7.76276 3.4 8.30002 3.93726 8.30002 4.6C8.30002 5.26274 7.76276 5.8 7.10001 5.8C6.58722 5.8 6.14957 5.47836 5.97775 5.02583C5.13132 5.16293 4.46295 5.8313 4.32584 6.67775C4.77838 6.84955 5.10001 7.28722 5.10001 7.8C5.10001 8.46274 4.56274 9 3.90002 9C3.23727 9 2.70001 8.46274 2.70001 7.8C2.70001 7.27751 3.03394 6.83302 3.5 6.66828V3.33172ZM3.5 7.8C3.5 7.58001 3.67758 7.4015 3.89722 7.4H3.9028C4.12241 7.4015 4.29999 7.58001 4.29999 7.8C4.29999 8.0209 4.12091 8.2 3.89999 8.2C3.67908 8.2 3.5 8.0209 3.5 7.8ZM6.70001 4.59555V4.60446C6.70239 4.82333 6.88055 5.00001 7.09998 5.00001C7.32089 5.00001 7.5 4.82092 7.5 4.60001C7.5 4.37909 7.32089 4.2 7.09998 4.2C6.88055 4.2 6.70239 4.37669 6.70001 4.59555ZM3.89999 2.6C4.12091 2.6 4.29999 2.42091 4.29999 2.2C4.29999 1.97909 4.12091 1.8 3.89999 1.8C3.67908 1.8 3.5 1.97909 3.5 2.2C3.5 2.42091 3.67908 2.6 3.89999 2.6Z"/>
|
|
877
|
-
</svg>
|
|
878
|
-
</button>
|
|
879
|
+
<button data-content="1.0" class="btn version">${paths_1.versionPicto}</button>
|
|
879
880
|
</div>
|
|
880
881
|
<div class="menu-container">
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
882
|
+
<button data-content="${this.displayedLanguage}" @click="${this.toggleLanguageMenu}" class="btn menu-trigger language">${paths_1.i18nPicto}</button>
|
|
883
|
+
${this.displayLanguagesMenu
|
|
884
|
+
? lit_1.html `
|
|
885
|
+
<div id="menu" class="menu">
|
|
886
|
+
<div class="input-container">${paths_1.searchPicto} <input /></div>
|
|
887
|
+
${(_b = this.availableLanguages) === null || _b === void 0 ? void 0 : _b.map((x) => lit_1.html `<button id="${x}" class="item">${languages_1.languageName(x)}</button>`)}
|
|
888
|
+
</div>
|
|
889
|
+
`
|
|
890
|
+
: ''}
|
|
886
891
|
</div>
|
|
887
892
|
</div>
|
|
888
893
|
</div>
|
|
889
894
|
</div>
|
|
890
895
|
</div>
|
|
891
|
-
|
|
896
|
+
`;
|
|
892
897
|
}
|
|
893
898
|
toggleOwnerMenu() {
|
|
894
|
-
this.
|
|
899
|
+
this.displayOwnersMenu = !this.displayOwnersMenu;
|
|
900
|
+
}
|
|
901
|
+
searchOwner(e) {
|
|
902
|
+
const text = e.target.value;
|
|
903
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
904
|
+
if (this._ownerSearch.value === text) {
|
|
905
|
+
if (this.ownersProvider) {
|
|
906
|
+
const availableOwners = yield this.ownersProvider(text.split(' '));
|
|
907
|
+
console.log(availableOwners);
|
|
908
|
+
this.availableOwners = availableOwners;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}), 300);
|
|
912
|
+
}
|
|
913
|
+
handleOwnerButtonClicked(id) {
|
|
914
|
+
this.handleMetaChanged && this.serviceId && this.handleMetaChanged(this.serviceId, { revision: this.displayedVersion, owner: { id } });
|
|
915
|
+
}
|
|
916
|
+
toggleLanguageMenu() {
|
|
917
|
+
this.displayLanguagesMenu = !this.displayLanguagesMenu;
|
|
895
918
|
}
|
|
896
919
|
mouseDown() {
|
|
897
920
|
this.mouseCount++;
|
|
898
|
-
console.log(this.mouseCount);
|
|
899
921
|
}
|
|
900
922
|
mouseUp() {
|
|
901
923
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
902
924
|
this.mouseCount = 0;
|
|
903
925
|
if (!((_c = (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.dom) === null || _b === void 0 ? void 0 : _b.classList) === null || _c === void 0 ? void 0 : _c.contains('ProseMirror-focused'))) {
|
|
904
|
-
(_g = (_f = (_e = (_d = this.view) === null || _d === void 0 ? void 0 : _d.dom) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.querySelectorAll('.companion')) === null || _g === void 0 ? void 0 : _g.forEach(x => {
|
|
926
|
+
(_g = (_f = (_e = (_d = this.view) === null || _d === void 0 ? void 0 : _d.dom) === null || _e === void 0 ? void 0 : _e.parentElement) === null || _f === void 0 ? void 0 : _f.querySelectorAll('.companion')) === null || _g === void 0 ? void 0 : _g.forEach((x) => {
|
|
927
|
+
;
|
|
905
928
|
x.style.display = 'none';
|
|
906
929
|
});
|
|
907
930
|
}
|
|
908
931
|
}
|
|
909
932
|
firstUpdated() {
|
|
910
|
-
var _a;
|
|
911
|
-
|
|
912
|
-
const tokenizer = markdown_it_1.default("commonmark", { html: false });
|
|
913
|
-
this.parser = this.schema === 'date' ? {
|
|
914
|
-
parse: (value) => schema.node("paragraph", {}, [
|
|
915
|
-
schema.node("date", {}, value ? [schema.text(value)] : []),
|
|
916
|
-
])
|
|
917
|
-
} : this.schema === 'date-time' ? {
|
|
918
|
-
parse: (value) => {
|
|
919
|
-
const date = value ? value.split(' ')[0] : '';
|
|
920
|
-
const time = value ? value.split(' ')[1] : '';
|
|
921
|
-
return schema.node("paragraph", {}, [
|
|
922
|
-
schema.node("date", {}, date && date.length ? [schema.text(date)] : [schema.text(' ')]),
|
|
923
|
-
schema.node("time", {}, time && time.length ? [schema.text(time)] : [schema.text(' ')]),
|
|
924
|
-
]);
|
|
925
|
-
}
|
|
926
|
-
} : this.schema === 'text-document' ? new prosemirror_markdown_1.MarkdownParser(schema, markdown_it_1.default("commonmark", { html: false }), {
|
|
927
|
-
blockquote: { block: "blockquote" },
|
|
928
|
-
paragraph: { block: "paragraph" },
|
|
929
|
-
list_item: { block: "list_item" },
|
|
930
|
-
bullet_list: { block: "bullet_list" },
|
|
931
|
-
ordered_list: { block: "ordered_list", getAttrs: tok => ({ order: +(tok.attrGet("start") || 1) }) },
|
|
932
|
-
heading: { block: "heading", getAttrs: tok => ({ level: +tok.tag.slice(1) }) },
|
|
933
|
-
hr: { node: "horizontal_rule" },
|
|
934
|
-
image: { node: "image", getAttrs: tok => {
|
|
935
|
-
var _a;
|
|
936
|
-
return ({
|
|
937
|
-
src: tok.attrGet("src"),
|
|
938
|
-
title: tok.attrGet("title") || null,
|
|
939
|
-
alt: ((_a = (tok.children || [])[0]) === null || _a === void 0 ? void 0 : _a.content) || null
|
|
940
|
-
});
|
|
941
|
-
} },
|
|
942
|
-
hardbreak: { node: "hard_break" },
|
|
943
|
-
em: prosemirror_utils_1.hasMark(schema.spec.marks, 'em') ? { mark: "em" } : { ignore: true },
|
|
944
|
-
strong: prosemirror_utils_1.hasMark(schema.spec.marks, 'strong') ? { mark: "strong" } : { ignore: true },
|
|
945
|
-
link: prosemirror_utils_1.hasMark(schema.spec.marks, 'link') ? { mark: "link", getAttrs: tok => ({
|
|
946
|
-
href: tok.attrGet("href"),
|
|
947
|
-
title: tok.attrGet("title") || null
|
|
948
|
-
}) } : { ignore: true }
|
|
949
|
-
}) : new prosemirror_markdown_1.MarkdownParser(schema, { parse: (src, env) => {
|
|
950
|
-
return tokenizer.parse(src, env).filter(t => !t.type.startsWith('paragraph_'));
|
|
951
|
-
} }, {
|
|
952
|
-
em: prosemirror_utils_1.hasMark(schema.spec.marks, 'em') ? { mark: "em" } : { ignore: true },
|
|
953
|
-
strong: prosemirror_utils_1.hasMark(schema.spec.marks, 'strong') ? { mark: "strong" } : { ignore: true },
|
|
954
|
-
link: prosemirror_utils_1.hasMark(schema.spec.marks, 'link') ? { mark: "link", getAttrs: tok => ({
|
|
955
|
-
href: tok.attrGet("href"),
|
|
956
|
-
title: tok.attrGet("title") || null
|
|
957
|
-
}) } : { ignore: true }
|
|
958
|
-
});
|
|
933
|
+
var _a, _b, _c;
|
|
934
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
959
935
|
const cmp = this;
|
|
936
|
+
const pms = (this.proseMirrorSchema = schema_1.createSchema(this.schema, (t, c, isC) => (isC ? this.codeColorProvider(t, c) : this.linkColorProvider(t, c)), this.codeContentProvider));
|
|
937
|
+
this.parser = this.makeParser(pms);
|
|
960
938
|
this.container = ((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('editor')) || undefined;
|
|
961
|
-
let br = schema.nodes.hard_break;
|
|
962
|
-
const hardBreak = prosemirror_commands_1.chainCommands(prosemirror_commands_1.exitCode, (state, dispatch) => {
|
|
963
|
-
dispatch && dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());
|
|
964
|
-
return true;
|
|
965
|
-
});
|
|
966
|
-
const replaceRangeWithSuggestion = (from, to, sug) => __awaiter(this, void 0, void 0, function* () {
|
|
967
|
-
const link = yield this.linksProvider(sug);
|
|
968
|
-
return link && cmp.view.state.tr.replaceWith(from, to, this.proseMirrorSchema.text(sug.text, [this.proseMirrorSchema.mark('link', link)])) || undefined;
|
|
969
|
-
});
|
|
970
939
|
if (this.container) {
|
|
971
|
-
|
|
972
|
-
|
|
940
|
+
const br = pms.nodes.hard_break;
|
|
941
|
+
const hardBreak = prosemirror_commands_1.chainCommands(prosemirror_commands_1.exitCode, (state, dispatch) => {
|
|
942
|
+
dispatch && dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView());
|
|
943
|
+
return true;
|
|
944
|
+
});
|
|
945
|
+
const replaceRangeWithSuggestion = (from, to, sug) => __awaiter(this, void 0, void 0, function* () {
|
|
946
|
+
const link = yield this.linksProvider(sug);
|
|
947
|
+
return (link && cmp.view && cmp.view.state.tr.replaceWith(from, to, pms.text(sug.text, [pms.mark('link', link)]))) || undefined;
|
|
948
|
+
});
|
|
949
|
+
const headingsKeymap = prosemirror_keymap_1.keymap([1, 2, 3, 4, 5, 6].reduce((acc, idx) => {
|
|
950
|
+
return Object.assign(acc, { [`Mod-ctrl-${idx}`]: prosemirror_commands_1.setBlockType(pms.nodes.heading, { level: '' + idx }) });
|
|
973
951
|
}, {}));
|
|
974
|
-
const
|
|
952
|
+
const providedValue = this.valueProvider && this.valueProvider();
|
|
953
|
+
const displayedVersionedValue = (_c = (_b = providedValue === null || providedValue === void 0 ? void 0 : providedValue.versions) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value;
|
|
954
|
+
this.serviceId = providedValue === null || providedValue === void 0 ? void 0 : providedValue.id;
|
|
955
|
+
this.availableLanguages = displayedVersionedValue && Object.keys(displayedVersionedValue).length ? no_lodash_1.sorted(Object.keys(displayedVersionedValue)) : this.availableLanguages;
|
|
956
|
+
if (!this.availableLanguages.includes(this.displayedLanguage)) {
|
|
957
|
+
this.displayedLanguage = this.availableLanguages[0];
|
|
958
|
+
}
|
|
959
|
+
const parsedDoc = this.parser.parse(this.valueProvider ? (displayedVersionedValue === null || displayedVersionedValue === void 0 ? void 0 : displayedVersionedValue[this.displayedLanguage]) || '' : this.value);
|
|
975
960
|
this.view = new prosemirror_view_1.EditorView(this.container, {
|
|
976
961
|
state: prosemirror_state_1.EditorState.create({
|
|
977
962
|
doc: parsedDoc,
|
|
@@ -979,102 +964,262 @@ class IqrTextField extends lit_element_1.LitElement {
|
|
|
979
964
|
plugins: [
|
|
980
965
|
caret_fix_plugin_1.caretFixPlugin(),
|
|
981
966
|
prosemirror_history_1.history(),
|
|
982
|
-
this.links
|
|
983
|
-
new prosemirror_state_1.Plugin({
|
|
984
|
-
view(editorView) {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
967
|
+
this.links
|
|
968
|
+
? new prosemirror_state_1.Plugin({
|
|
969
|
+
view(editorView) {
|
|
970
|
+
return new selection_companion_1.SelectionCompanion(editorView, () => cmp.mouseCount > 0);
|
|
971
|
+
},
|
|
972
|
+
})
|
|
973
|
+
: null,
|
|
974
|
+
this.suggestions
|
|
975
|
+
? new prosemirror_state_1.Plugin({
|
|
976
|
+
view(editorView) {
|
|
977
|
+
return (cmp.suggestionPalette = new suggestion_palette_1.SuggestionPalette(editorView, (terms) => cmp.suggestionProvider(terms), () => cmp.suggestionStopWords));
|
|
978
|
+
},
|
|
979
|
+
})
|
|
980
|
+
: null,
|
|
981
|
+
this.suggestions
|
|
982
|
+
? prosemirror_keymap_1.keymap({
|
|
983
|
+
Tab: () => {
|
|
984
|
+
return (cmp.suggestionPalette && this.view && cmp.suggestionPalette.focusOrInsert(this.view, replaceRangeWithSuggestion)) || false;
|
|
985
|
+
},
|
|
986
|
+
ArrowUp: () => {
|
|
987
|
+
return (cmp.suggestionPalette && cmp.suggestionPalette.arrowUp()) || false;
|
|
988
|
+
},
|
|
989
|
+
ArrowDown: () => {
|
|
990
|
+
return (cmp.suggestionPalette && cmp.suggestionPalette.arrowDown()) || false;
|
|
991
|
+
},
|
|
992
|
+
Enter: () => {
|
|
993
|
+
return (cmp.suggestionPalette && this.view && cmp.suggestionPalette.insert(this.view, replaceRangeWithSuggestion)) || false;
|
|
994
|
+
},
|
|
995
|
+
})
|
|
996
|
+
: null,
|
|
997
|
+
prosemirror_keymap_1.keymap({ 'Mod-z': prosemirror_history_1.undo, 'Mod-Shift-z': prosemirror_history_1.redo }),
|
|
998
|
+
prosemirror_keymap_1.keymap(Object.assign({}, pms.marks.strong ? { 'Mod-b': prosemirror_commands_1.toggleMark(pms.marks.strong) } : {}, pms.marks.em ? { 'Mod-i': prosemirror_commands_1.toggleMark(pms.marks.em) } : {}, pms.nodes.paragraph ? { 'Alt-ArrowUp': prosemirror_commands_1.joinUp } : {}, pms.nodes.paragraph ? { 'Alt-ArrowDown': prosemirror_commands_1.joinDown } : {}, pms.nodes.paragraph ? { 'Alt-Enter': hardBreak } : {}, pms.nodes.paragraph ? { 'Shift-Enter': hardBreak } : {}, pms.nodes.ordered_list ? { 'Shift-ctrl-1': prosemirror_schema_list_1.wrapInList(pms.nodes.ordered_list) } : {}, pms.nodes.bullet_list ? { 'Shift-ctrl-*': prosemirror_schema_list_1.wrapInList(pms.nodes.bullet_list) } : {}, pms.nodes.blockquote ? { 'Shift-ctrl-w': prosemirror_commands_2.wrapInIfNeeded(pms.nodes.blockquote) } : {}, pms.nodes.blockquote ? { 'Shift-ctrl-u': prosemirror_commands_2.unwrapFrom(pms.nodes.blockquote) } : {}, pms.nodes.paragraph ? { 'Mod-ctrl-0': prosemirror_commands_1.setBlockType(pms.nodes.paragraph) } : {}, pms.nodes.paragraph ? { 'Shift-ctrl-0': prosemirror_commands_1.setBlockType(pms.nodes.paragraph) } : {}, pms.nodes.list_item ? { Enter: prosemirror_schema_list_1.splitListItem(pms.nodes.list_item) } : {}, pms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-(': prosemirror_schema_list_1.liftListItem(pms.nodes.list_item) } : {}, pms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-[': prosemirror_schema_list_1.liftListItem(pms.nodes.list_item) } : {}, pms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-)': prosemirror_schema_list_1.sinkListItem(pms.nodes.list_item) } : {}, pms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-]': prosemirror_schema_list_1.sinkListItem(pms.nodes.list_item) } : {})),
|
|
999
|
+
pms.nodes.heading ? headingsKeymap : null,
|
|
1000
1000
|
mask_plugin_1.maskPlugin(),
|
|
1001
1001
|
regexp_plugin_1.regexpPlugin(),
|
|
1002
|
-
has_content_class_plugin_1.hasContentClassPlugin(this.shadowRoot),
|
|
1003
|
-
prosemirror_keymap_1.keymap(prosemirror_commands_1.baseKeymap)
|
|
1004
|
-
]
|
|
1002
|
+
has_content_class_plugin_1.hasContentClassPlugin(this.shadowRoot || undefined),
|
|
1003
|
+
prosemirror_keymap_1.keymap(prosemirror_commands_1.baseKeymap),
|
|
1004
|
+
]
|
|
1005
|
+
.filter((x) => !!x)
|
|
1006
|
+
.map((x) => x),
|
|
1005
1007
|
}),
|
|
1006
1008
|
dispatchTransaction: (tr) => {
|
|
1007
1009
|
this.view && this.view.updateState(this.view.state.apply(tr));
|
|
1008
1010
|
//current state as json in text area
|
|
1009
1011
|
//this.view && console.log(JSON.stringify(this.view.state.doc.toJSON(), null, 2));
|
|
1010
|
-
}
|
|
1012
|
+
},
|
|
1011
1013
|
});
|
|
1012
1014
|
}
|
|
1013
1015
|
}
|
|
1016
|
+
makeParser(pms) {
|
|
1017
|
+
const tokenizer = markdown_it_1.default('commonmark', { html: false });
|
|
1018
|
+
return this.schema === 'date'
|
|
1019
|
+
? {
|
|
1020
|
+
parse: (value) => pms.node('paragraph', {}, [pms.node('date', {}, value ? [pms.text(value)] : [])]),
|
|
1021
|
+
}
|
|
1022
|
+
: this.schema === 'time'
|
|
1023
|
+
? {
|
|
1024
|
+
parse: (value) => pms.node('paragraph', {}, [pms.node('time', {}, value ? [pms.text(value)] : [])]),
|
|
1025
|
+
}
|
|
1026
|
+
: this.schema === 'measure'
|
|
1027
|
+
? {
|
|
1028
|
+
parse: (value) => {
|
|
1029
|
+
const decimal = value ? value.split(' ')[0] : '';
|
|
1030
|
+
const unit = value ? value.split(' ')[1] : '';
|
|
1031
|
+
return pms.node('paragraph', {}, [
|
|
1032
|
+
pms.node('decimal', {}, decimal && decimal.length ? [pms.text(decimal)] : [pms.text(' ')]),
|
|
1033
|
+
pms.node('unit', {}, unit && unit.length ? [pms.text(unit)] : [pms.text(' ')]),
|
|
1034
|
+
]);
|
|
1035
|
+
},
|
|
1036
|
+
}
|
|
1037
|
+
: this.schema === 'date-time'
|
|
1038
|
+
? {
|
|
1039
|
+
parse: (value) => {
|
|
1040
|
+
const date = value ? value.split(' ')[0] : '';
|
|
1041
|
+
const time = value ? value.split(' ')[1] : '';
|
|
1042
|
+
return pms.node('paragraph', {}, [
|
|
1043
|
+
pms.node('date', {}, date && date.length ? [pms.text(date)] : [pms.text(' ')]),
|
|
1044
|
+
pms.node('time', {}, time && time.length ? [pms.text(time)] : [pms.text(' ')]),
|
|
1045
|
+
]);
|
|
1046
|
+
},
|
|
1047
|
+
}
|
|
1048
|
+
: this.schema === 'text-document'
|
|
1049
|
+
? new prosemirror_markdown_1.MarkdownParser(pms, markdown_it_1.default('commonmark', { html: false }), {
|
|
1050
|
+
blockquote: { block: 'blockquote' },
|
|
1051
|
+
paragraph: { block: 'paragraph' },
|
|
1052
|
+
list_item: { block: 'list_item' },
|
|
1053
|
+
bullet_list: { block: 'bullet_list' },
|
|
1054
|
+
ordered_list: { block: 'ordered_list', getAttrs: (tok) => ({ order: +(tok.attrGet('start') || 1) }) },
|
|
1055
|
+
heading: { block: 'heading', getAttrs: (tok) => ({ level: +tok.tag.slice(1) }) },
|
|
1056
|
+
hr: { node: 'horizontal_rule' },
|
|
1057
|
+
image: {
|
|
1058
|
+
node: 'image',
|
|
1059
|
+
getAttrs: (tok) => {
|
|
1060
|
+
var _a;
|
|
1061
|
+
return ({
|
|
1062
|
+
src: tok.attrGet('src'),
|
|
1063
|
+
title: tok.attrGet('title') || null,
|
|
1064
|
+
alt: ((_a = (tok.children || [])[0]) === null || _a === void 0 ? void 0 : _a.content) || null,
|
|
1065
|
+
});
|
|
1066
|
+
},
|
|
1067
|
+
},
|
|
1068
|
+
hardBreak: { node: 'hard_break' },
|
|
1069
|
+
em: prosemirror_utils_1.hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },
|
|
1070
|
+
strong: prosemirror_utils_1.hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },
|
|
1071
|
+
link: prosemirror_utils_1.hasMark(pms.spec.marks, 'link')
|
|
1072
|
+
? {
|
|
1073
|
+
mark: 'link',
|
|
1074
|
+
getAttrs: (tok) => ({
|
|
1075
|
+
href: tok.attrGet('href'),
|
|
1076
|
+
title: tok.attrGet('title') || null,
|
|
1077
|
+
}),
|
|
1078
|
+
}
|
|
1079
|
+
: { ignore: true },
|
|
1080
|
+
})
|
|
1081
|
+
: new prosemirror_markdown_1.MarkdownParser(pms, {
|
|
1082
|
+
parse: (src, env) => {
|
|
1083
|
+
return tokenizer.parse(src, env).filter((t) => !t.type.startsWith('paragraph_'));
|
|
1084
|
+
},
|
|
1085
|
+
}, {
|
|
1086
|
+
em: prosemirror_utils_1.hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },
|
|
1087
|
+
strong: prosemirror_utils_1.hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },
|
|
1088
|
+
link: prosemirror_utils_1.hasMark(pms.spec.marks, 'link')
|
|
1089
|
+
? {
|
|
1090
|
+
mark: 'link',
|
|
1091
|
+
getAttrs: (tok) => ({
|
|
1092
|
+
href: tok.attrGet('href'),
|
|
1093
|
+
title: tok.attrGet('title') || null,
|
|
1094
|
+
}),
|
|
1095
|
+
}
|
|
1096
|
+
: { ignore: true },
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1014
1099
|
}
|
|
1015
1100
|
__decorate([
|
|
1016
|
-
|
|
1101
|
+
decorators_1.property(),
|
|
1017
1102
|
__metadata("design:type", Set)
|
|
1018
1103
|
], IqrTextField.prototype, "suggestionStopWords", void 0);
|
|
1019
1104
|
__decorate([
|
|
1020
|
-
|
|
1105
|
+
decorators_1.property(),
|
|
1021
1106
|
__metadata("design:type", Function)
|
|
1022
1107
|
], IqrTextField.prototype, "linksProvider", void 0);
|
|
1023
1108
|
__decorate([
|
|
1024
|
-
|
|
1109
|
+
decorators_1.property(),
|
|
1025
1110
|
__metadata("design:type", Function)
|
|
1026
1111
|
], IqrTextField.prototype, "suggestionProvider", void 0);
|
|
1027
1112
|
__decorate([
|
|
1028
|
-
|
|
1113
|
+
decorators_1.property(),
|
|
1114
|
+
__metadata("design:type", Function)
|
|
1115
|
+
], IqrTextField.prototype, "ownersProvider", void 0);
|
|
1116
|
+
__decorate([
|
|
1117
|
+
decorators_1.property(),
|
|
1029
1118
|
__metadata("design:type", Function)
|
|
1030
1119
|
], IqrTextField.prototype, "codeColorProvider", void 0);
|
|
1031
1120
|
__decorate([
|
|
1032
|
-
|
|
1121
|
+
decorators_1.property(),
|
|
1033
1122
|
__metadata("design:type", Function)
|
|
1034
1123
|
], IqrTextField.prototype, "linkColorProvider", void 0);
|
|
1035
1124
|
__decorate([
|
|
1036
|
-
|
|
1125
|
+
decorators_1.property(),
|
|
1037
1126
|
__metadata("design:type", Function)
|
|
1038
1127
|
], IqrTextField.prototype, "codeContentProvider", void 0);
|
|
1039
1128
|
__decorate([
|
|
1040
|
-
|
|
1129
|
+
decorators_1.property(),
|
|
1041
1130
|
__metadata("design:type", String)
|
|
1042
1131
|
], IqrTextField.prototype, "schema", void 0);
|
|
1043
1132
|
__decorate([
|
|
1044
|
-
|
|
1045
|
-
__metadata("design:type",
|
|
1133
|
+
decorators_1.property(),
|
|
1134
|
+
__metadata("design:type", Object)
|
|
1046
1135
|
], IqrTextField.prototype, "label", void 0);
|
|
1047
1136
|
__decorate([
|
|
1048
|
-
|
|
1137
|
+
decorators_1.property(),
|
|
1049
1138
|
__metadata("design:type", String)
|
|
1050
1139
|
], IqrTextField.prototype, "labelPosition", void 0);
|
|
1051
1140
|
__decorate([
|
|
1052
|
-
|
|
1053
|
-
__metadata("design:type",
|
|
1141
|
+
decorators_1.property(),
|
|
1142
|
+
__metadata("design:type", Object)
|
|
1054
1143
|
], IqrTextField.prototype, "placeholder", void 0);
|
|
1055
1144
|
__decorate([
|
|
1056
|
-
|
|
1057
|
-
__metadata("design:type",
|
|
1145
|
+
decorators_1.property(),
|
|
1146
|
+
__metadata("design:type", Object)
|
|
1147
|
+
], IqrTextField.prototype, "textRegex", void 0);
|
|
1148
|
+
__decorate([
|
|
1149
|
+
decorators_1.property(),
|
|
1150
|
+
__metadata("design:type", Object)
|
|
1058
1151
|
], IqrTextField.prototype, "value", void 0);
|
|
1059
1152
|
__decorate([
|
|
1060
|
-
|
|
1153
|
+
decorators_1.property(),
|
|
1154
|
+
__metadata("design:type", Object)
|
|
1155
|
+
], IqrTextField.prototype, "defaultLanguage", void 0);
|
|
1156
|
+
__decorate([
|
|
1157
|
+
decorators_1.property(),
|
|
1061
1158
|
__metadata("design:type", String)
|
|
1062
1159
|
], IqrTextField.prototype, "owner", void 0);
|
|
1063
1160
|
__decorate([
|
|
1064
|
-
|
|
1065
|
-
__metadata("design:type",
|
|
1066
|
-
], IqrTextField.prototype, "
|
|
1161
|
+
decorators_1.property(),
|
|
1162
|
+
__metadata("design:type", Function)
|
|
1163
|
+
], IqrTextField.prototype, "valueProvider", void 0);
|
|
1164
|
+
__decorate([
|
|
1165
|
+
decorators_1.property(),
|
|
1166
|
+
__metadata("design:type", Function)
|
|
1167
|
+
], IqrTextField.prototype, "metaProvider", void 0);
|
|
1168
|
+
__decorate([
|
|
1169
|
+
decorators_1.property(),
|
|
1170
|
+
__metadata("design:type", Function)
|
|
1171
|
+
], IqrTextField.prototype, "handleValueChanged", void 0);
|
|
1172
|
+
__decorate([
|
|
1173
|
+
decorators_1.property(),
|
|
1174
|
+
__metadata("design:type", Function)
|
|
1175
|
+
], IqrTextField.prototype, "handleMetaChanged", void 0);
|
|
1067
1176
|
__decorate([
|
|
1068
|
-
|
|
1069
|
-
__metadata("design:type",
|
|
1177
|
+
decorators_1.state(),
|
|
1178
|
+
__metadata("design:type", Object)
|
|
1179
|
+
], IqrTextField.prototype, "displayOwnersMenu", void 0);
|
|
1180
|
+
__decorate([
|
|
1181
|
+
decorators_1.state(),
|
|
1182
|
+
__metadata("design:type", Object)
|
|
1183
|
+
], IqrTextField.prototype, "ownerInputValue", void 0);
|
|
1184
|
+
__decorate([
|
|
1185
|
+
decorators_1.state(),
|
|
1186
|
+
__metadata("design:type", Array)
|
|
1187
|
+
], IqrTextField.prototype, "availableOwners", void 0);
|
|
1188
|
+
__decorate([
|
|
1189
|
+
decorators_1.state(),
|
|
1190
|
+
__metadata("design:type", Object)
|
|
1191
|
+
], IqrTextField.prototype, "displayLanguagesMenu", void 0);
|
|
1192
|
+
__decorate([
|
|
1193
|
+
decorators_1.state(),
|
|
1194
|
+
__metadata("design:type", Object)
|
|
1195
|
+
], IqrTextField.prototype, "languageInputValue", void 0);
|
|
1196
|
+
__decorate([
|
|
1197
|
+
decorators_1.state(),
|
|
1198
|
+
__metadata("design:type", Object)
|
|
1199
|
+
], IqrTextField.prototype, "displayVersionsMenu", void 0);
|
|
1200
|
+
__decorate([
|
|
1201
|
+
decorators_1.state(),
|
|
1202
|
+
__metadata("design:type", Object)
|
|
1070
1203
|
], IqrTextField.prototype, "suggestions", void 0);
|
|
1071
1204
|
__decorate([
|
|
1072
|
-
|
|
1073
|
-
__metadata("design:type",
|
|
1205
|
+
decorators_1.state(),
|
|
1206
|
+
__metadata("design:type", Object)
|
|
1074
1207
|
], IqrTextField.prototype, "links", void 0);
|
|
1075
1208
|
__decorate([
|
|
1076
|
-
|
|
1077
|
-
__metadata("design:type",
|
|
1078
|
-
], IqrTextField.prototype, "
|
|
1209
|
+
decorators_1.state(),
|
|
1210
|
+
__metadata("design:type", Object)
|
|
1211
|
+
], IqrTextField.prototype, "displayedLanguage", void 0);
|
|
1212
|
+
__decorate([
|
|
1213
|
+
decorators_1.state(),
|
|
1214
|
+
__metadata("design:type", Object)
|
|
1215
|
+
], IqrTextField.prototype, "displayedVersion", void 0);
|
|
1216
|
+
__decorate([
|
|
1217
|
+
decorators_1.state(),
|
|
1218
|
+
__metadata("design:type", Object)
|
|
1219
|
+
], IqrTextField.prototype, "availableLanguages", void 0);
|
|
1220
|
+
__decorate([
|
|
1221
|
+
decorators_1.query('#ownerSearch'),
|
|
1222
|
+
__metadata("design:type", HTMLInputElement)
|
|
1223
|
+
], IqrTextField.prototype, "_ownerSearch", void 0);
|
|
1079
1224
|
// Register the new element with the browser.
|
|
1080
1225
|
customElements.define('iqr-text-field', IqrTextField);
|