@icure/form 1.0.17 → 1.1.0

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.
@@ -91,6 +91,7 @@ class IqrForm extends lit_1.LitElement {
91
91
  this.renderer = 'form';
92
92
  this.labelPosition = undefined;
93
93
  this.formValuesContainer = undefined;
94
+ this.formValuesContainerChanged = undefined;
94
95
  }
95
96
  connectedCallback() {
96
97
  super.connectedCallback();
@@ -104,7 +105,7 @@ class IqrForm extends lit_1.LitElement {
104
105
  render() {
105
106
  const renderer = this.renderer === 'form' ? form_1.render : this.renderer === 'form' ? cards_1.render : undefined;
106
107
  return renderer && this.form
107
- ? renderer(this.form, { labelPosition: this.labelPosition }, this.formValuesContainer)
108
+ ? renderer(this.form, { labelPosition: this.labelPosition }, this.formValuesContainer, this.formValuesContainerChanged)
108
109
  : this.form
109
110
  ? (0, lit_1.html) `<p>unknown renderer</p>`
110
111
  : (0, lit_1.html) `<p>missing form</p>`;
@@ -137,6 +138,10 @@ __decorate([
137
138
  (0, decorators_1.property)(),
138
139
  __metadata("design:type", Object)
139
140
  ], IqrForm.prototype, "formValuesContainer", void 0);
141
+ __decorate([
142
+ (0, decorators_1.property)(),
143
+ __metadata("design:type", Function)
144
+ ], IqrForm.prototype, "formValuesContainerChanged", void 0);
140
145
  // Register the new element with the browser.
141
146
  customElements.define('iqr-form', IqrForm);
142
147
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/iqr-form/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAAsC;AACtC,+CAAyC;AAEzC,mCAA8B;AAE9B,8BAA2B;AAC3B,iCAA8B;AAC9B,gCAA6B;AAC7B,+BAA4B;AAC5B,+BAA4B;AAC5B,mCAAgC;AAChC,mCAAgC;AAChC,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;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,YAAI;qCAAA;AACX;IAAX,IAAA,qBAAQ,GAAE;;qCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;sCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;yCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;8CAAmC;AAClC;IAAX,IAAA,qBAAQ,GAAE;;oDAAsD;AAiClE,6CAA6C;AAC7C,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators'\n\nimport { Form } from './model'\n\nimport './fields/textfield'\nimport './fields/measureField'\nimport './fields/numberField'\nimport './fields/datePicker'\nimport './fields/timePicker'\nimport './fields/dateTimePicker'\nimport './fields/multipleChoice'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`.iqr-form {\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n.iqr-form h2 {\n width: 100%;\n font-size: 2em;\n margin-top: 1em;\n}\n.iqr-form h3 {\n width: 100%;\n font-size: 1.2em;\n font-weight: normal;\n color: #282829;\n margin: 0 0 1em !important;\n}\n.iqr-form > * {\n margin: 0 24px 0 0;\n}\n.iqr-form iqr-form-textfield {\n flex: 2 1 50%;\n}\n.iqr-form iqr-form-date-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-number-field {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-measure-field {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-time-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-date-time-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-multiple-choice {\n flex: 2 1 50%;\n}\n.iqr-form .group {\n background: #f6f6f6;\n padding: 12px 0 12px 8px;\n border-radius: 12px;\n margin: 4px 0;\n width: 100%;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n justify-content: flex-start;\n}\n.iqr-form .group > * {\n margin: 0 24px 0 0;\n}` \n// @ts-ignore\nconst kendoCss = css`` \nimport { Renderer } from './renderer'\n\nimport { render as renderAsCard } from './renderer/cards'\nimport { render as renderAsForm } from './renderer/form'\nimport { FormValuesContainer } from '../iqr-form-loader/formValuesContainer'\n\n// Extend the LitElement base class\nclass IqrForm extends LitElement {\n\t@property() form?: Form\n\t@property() skin = 'material'\n\t@property() theme = 'default'\n\t@property() renderer = 'form'\n\t@property() labelPosition?: string = undefined\n\t@property() formValuesContainer?: FormValuesContainer = undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss, kendoCss]\n\t}\n\n\trender() {\n\t\tconst renderer: Renderer | undefined = this.renderer === 'form' ? renderAsForm : this.renderer === 'form' ? renderAsCard : undefined\n\n\t\treturn renderer && this.form\n\t\t\t? renderer(this.form, { labelPosition: this.labelPosition }, this.formValuesContainer)\n\t\t\t: this.form\n\t\t\t? html`<p>unknown renderer</p>`\n\t\t\t: html`<p>missing form</p>`\n\t}\n\n\tfirstUpdated() {\n\t\t//Do nothing\n\t}\n}\n\n// Register the new element with the browser.\ncustomElements.define('iqr-form', IqrForm)\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/iqr-form/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAAsC;AACtC,+CAAyC;AAEzC,mCAA8B;AAE9B,8BAA2B;AAC3B,iCAA8B;AAC9B,gCAA6B;AAC7B,+BAA4B;AAC5B,+BAA4B;AAC5B,mCAAgC;AAChC,mCAAgC;AAChC,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuDjB,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;AACX;IAAX,IAAA,qBAAQ,GAAE;;qCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;sCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;yCAAkB;AACjB;IAAX,IAAA,qBAAQ,GAAE;;8CAAmC;AAClC;IAAX,IAAA,qBAAQ,GAAE;;oDAAsD;AACrD;IAAX,IAAA,qBAAQ,GAAE;;2DAAiF;AAiC7F,6CAA6C;AAC7C,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators'\n\nimport { Form } from './model'\n\nimport './fields/textfield'\nimport './fields/measureField'\nimport './fields/numberField'\nimport './fields/datePicker'\nimport './fields/timePicker'\nimport './fields/dateTimePicker'\nimport './fields/multipleChoice'\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`.iqr-form {\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n font-family: \"Roboto\", Helvetica, sans-serif;\n}\n.iqr-form h2 {\n width: 100%;\n font-size: 2em;\n margin-top: 1em;\n}\n.iqr-form h3 {\n width: 100%;\n font-size: 1.2em;\n font-weight: normal;\n color: #282829;\n margin: 0 0 1em !important;\n}\n.iqr-form > * {\n margin: 0 24px 0 0;\n}\n.iqr-form iqr-form-textfield {\n flex: 2 1 50%;\n}\n.iqr-form iqr-form-date-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-number-field {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-measure-field {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-time-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-date-time-picker {\n flex: 1 1 25%;\n}\n.iqr-form iqr-form-multiple-choice {\n flex: 2 1 50%;\n}\n.iqr-form .group {\n background: #f6f6f6;\n padding: 12px 0 12px 8px;\n border-radius: 12px;\n margin: 4px 0;\n width: 100%;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n justify-content: flex-start;\n}\n.iqr-form .group > * {\n margin: 0 24px 0 0;\n}` \n// @ts-ignore\nconst kendoCss = css`` \nimport { Renderer } from './renderer'\n\nimport { render as renderAsCard } from './renderer/cards'\nimport { render as renderAsForm } from './renderer/form'\nimport { FormValuesContainer } from '../iqr-form-loader/formValuesContainer'\n\n// Extend the LitElement base class\nclass IqrForm extends LitElement {\n\t@property() form?: Form\n\t@property() skin = 'material'\n\t@property() theme = 'default'\n\t@property() renderer = 'form'\n\t@property() labelPosition?: string = undefined\n\t@property() formValuesContainer?: FormValuesContainer = undefined\n\t@property() formValuesContainerChanged?: (newValue: FormValuesContainer) => void = undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss, kendoCss]\n\t}\n\n\trender() {\n\t\tconst renderer: Renderer | undefined = this.renderer === 'form' ? renderAsForm : this.renderer === 'form' ? renderAsCard : undefined\n\n\t\treturn renderer && this.form\n\t\t\t? renderer(this.form, { labelPosition: this.labelPosition }, this.formValuesContainer, this.formValuesContainerChanged)\n\t\t\t: this.form\n\t\t\t? html`<p>unknown renderer</p>`\n\t\t\t: html`<p>missing form</p>`\n\t}\n\n\tfirstUpdated() {\n\t\t//Do nothing\n\t}\n}\n\n// Register the new element with the browser.\ncustomElements.define('iqr-form', IqrForm)\n"]}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.render = void 0;
4
4
  const lit_1 = require("lit");
5
5
  const model_1 = require("../model");
6
- const render = (form, props, formsValueContainer) => {
6
+ const render = (form, props, formsValueContainer, formValuesContainerChanged) => {
7
7
  var _a;
8
8
  const h = function (level, content) {
9
9
  return level === 1
@@ -1 +1 @@
1
- {"version":3,"file":"cards.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/cards.ts"],"names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AAC,CAAC,MAAM,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACtG,CAAA;KAAA,CACF;;EAEF,CAAA;AACF,CAAC,CAAA;AAhDY,QAAA,MAAM,UAgDlB","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Field, Form, Group } from '../model'\nimport { Renderer } from './index'\nimport { FormValuesContainer } from '../../iqr-form-loader/formValuesContainer'\n\nexport const render: Renderer = (form: Form, props: { [key: string]: unknown }, formsValueContainer?: FormValuesContainer) => {\n\tconst h = function (level: number, content: TemplateResult): TemplateResult {\n\t\treturn level === 1\n\t\t\t? html`<h1>${content}</h1>`\n\t\t\t: level === 2\n\t\t\t? html`<h2>${content}</h2>`\n\t\t\t: level === 3\n\t\t\t? html`<h3>${content}</h3>`\n\t\t\t: level === 4\n\t\t\t? html`<h4>${content}</h4>`\n\t\t\t: level === 5\n\t\t\t? html`<h5>${content}</h5>`\n\t\t\t: html`<h6>${content}</h6>`\n\t}\n\tconst renderFieldOrGroup = function (fg: Field | Group, level: number): TemplateResult {\n\t\treturn fg instanceof Group\n\t\t\t? html` <div class=\"group\">${h(level, html`${fg.group}`)} ${fg.fields?.map((f) => renderFieldOrGroup(f, level + 1))}</div>`\n\t\t\t: html`${\n\t\t\t\t\tfg.type === 'textfield'\n\t\t\t\t\t\t? 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>`\n\t\t\t\t\t\t: fg.type === 'measure-field'\n\t\t\t\t\t\t? html`<iqr-form-measure-field label=\"${fg.field}\"></iqr-form-measure-field>`\n\t\t\t\t\t\t: fg.type === 'number-field'\n\t\t\t\t\t\t? html`<iqr-form-number-field label=\"${fg.field}\"></iqr-form-number-field>`\n\t\t\t\t\t\t: fg.type === 'date-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-picker label=\"${fg.field}\"></iqr-form-date-picker>`\n\t\t\t\t\t\t: fg.type === 'time-picker'\n\t\t\t\t\t\t? html`<iqr-form-time-picker label=\"${fg.field}\"></iqr-form-time-picker>`\n\t\t\t\t\t\t: fg.type === 'date-time-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-time-picker label=\"${fg.field}\"></iqr-form-date-time-picker>`\n\t\t\t\t\t\t: fg.type === 'multiple-choice'\n\t\t\t\t\t\t? html`<iqr-form-multiple-choice label=\"${fg.field}\"></iqr-form-multiple-choice>`\n\t\t\t\t\t\t: ''\n\t\t\t }\n\t\t\t\t\t</div>`\n\t}\n\n\treturn html`\n\t\t<div class=\"iqr-form\">\n\t\t\t${form?.sections?.map(\n\t\t\t\t(s) =>\n\t\t\t\t\thtml`\n\t\t\t\t\t\t<h2>${s.section}</h2>\n\t\t\t\t\t\t${s.description ? html`<p>${s.description}</p>` : ''} ${s.fields?.map((f) => renderFieldOrGroup(f, 3))}\n\t\t\t\t\t`,\n\t\t\t)}\n\t\t</div>\n\t`\n}\n"]}
1
+ {"version":3,"file":"cards.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/cards.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAC1C,oCAA6C;AAItC,MAAM,MAAM,GAAa,CAC/B,IAAU,EACV,KAAiC,EACjC,mBAAyC,EACzC,0BAAoE,EACnE,EAAE;;IACH,MAAM,CAAC,GAAG,UAAU,KAAa,EAAE,OAAuB;QACzD,OAAO,KAAK,KAAK,CAAC;YACjB,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;YAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;gBACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;gBAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;oBACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;oBAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;wBACb,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AAK,2BAA2B;4BACzE,CAAC,CAAC,EAAE,CAAC,IAAI,KAAK,aAAa;gCAC3B,CAAC,CAAC,IAAA,UAAI,EAAA,gCAAgC,EAAE,CAAC,KAAK,2BAA2B;gCACzE,CAAC,CAAC,EAAE,CAAC,IAAI,KAAK,kBAAkB;oCAChC,CAAC,CAAC,IAAA,UAAI,EAAA,qCAAqC,EAAE,CAAC,KAAK,gCAAgC;oCACnF,CAAC,CAAC,EAAE,CAAC,IAAI,KAAK,iBAAiB;wCAC/B,CAAC,CAAC,IAAA,UAAI,EAAA,oCAAoC,EAAE,CAAC,KAAK,+BAA+B;wCACjF,CAAC,CAAC,EACH;YACO,CAAA;IACX,CAAC,CAAA;IAED,OAAO,IAAA,UAAI,EAAA;;KAEP,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,0CAAE,GAAG,CACpB,CAAC,CAAC,EAAE,EAAE;;QACL,OAAA,IAAA,UAAI,EAAA;YACG,CAAC,CAAC,OAAO;QACb,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,UAAI,EAAA,MAAM,CAAC,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,MAAA,CAAC,CAAC,MAAM,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACtG,CAAA;KAAA,CACF;;EAEF,CAAA;AACF,CAAC,CAAA;AArDY,QAAA,MAAM,UAqDlB","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Field, Form, Group } from '../model'\nimport { Renderer } from './index'\nimport { FormValuesContainer } from '../../iqr-form-loader/formValuesContainer'\n\nexport const render: Renderer = (\n\tform: Form,\n\tprops: { [key: string]: unknown },\n\tformsValueContainer?: FormValuesContainer,\n\tformValuesContainerChanged?: (newValue: FormValuesContainer) => void,\n) => {\n\tconst h = function (level: number, content: TemplateResult): TemplateResult {\n\t\treturn level === 1\n\t\t\t? html`<h1>${content}</h1>`\n\t\t\t: level === 2\n\t\t\t? html`<h2>${content}</h2>`\n\t\t\t: level === 3\n\t\t\t? html`<h3>${content}</h3>`\n\t\t\t: level === 4\n\t\t\t? html`<h4>${content}</h4>`\n\t\t\t: level === 5\n\t\t\t? html`<h5>${content}</h5>`\n\t\t\t: html`<h6>${content}</h6>`\n\t}\n\tconst renderFieldOrGroup = function (fg: Field | Group, level: number): TemplateResult {\n\t\treturn fg instanceof Group\n\t\t\t? html` <div class=\"group\">${h(level, html`${fg.group}`)} ${fg.fields?.map((f) => renderFieldOrGroup(f, level + 1))}</div>`\n\t\t\t: html`${\n\t\t\t\t\tfg.type === 'textfield'\n\t\t\t\t\t\t? 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>`\n\t\t\t\t\t\t: fg.type === 'measure-field'\n\t\t\t\t\t\t? html`<iqr-form-measure-field label=\"${fg.field}\"></iqr-form-measure-field>`\n\t\t\t\t\t\t: fg.type === 'number-field'\n\t\t\t\t\t\t? html`<iqr-form-number-field label=\"${fg.field}\"></iqr-form-number-field>`\n\t\t\t\t\t\t: fg.type === 'date-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-picker label=\"${fg.field}\"></iqr-form-date-picker>`\n\t\t\t\t\t\t: fg.type === 'time-picker'\n\t\t\t\t\t\t? html`<iqr-form-time-picker label=\"${fg.field}\"></iqr-form-time-picker>`\n\t\t\t\t\t\t: fg.type === 'date-time-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-time-picker label=\"${fg.field}\"></iqr-form-date-time-picker>`\n\t\t\t\t\t\t: fg.type === 'multiple-choice'\n\t\t\t\t\t\t? html`<iqr-form-multiple-choice label=\"${fg.field}\"></iqr-form-multiple-choice>`\n\t\t\t\t\t\t: ''\n\t\t\t }\n\t\t\t\t\t</div>`\n\t}\n\n\treturn html`\n\t\t<div class=\"iqr-form\">\n\t\t\t${form?.sections?.map(\n\t\t\t\t(s) =>\n\t\t\t\t\thtml`\n\t\t\t\t\t\t<h2>${s.section}</h2>\n\t\t\t\t\t\t${s.description ? html`<p>${s.description}</p>` : ''} ${s.fields?.map((f) => renderFieldOrGroup(f, 3))}\n\t\t\t\t\t`,\n\t\t\t)}\n\t\t</div>\n\t`\n}\n"]}
@@ -5,7 +5,7 @@ const lit_1 = require("lit");
5
5
  const iqr_form_loader_1 = require("../../iqr-form-loader");
6
6
  const firstItemValueProvider = (valuesProvider) => () => valuesProvider()[0];
7
7
  //const firstItemMetaProvider = (valuesProvider: () => VersionedMeta[]) => () => valuesProvider()[0]
8
- const render = (form, props, formsValueContainer) => {
8
+ const render = (form, props, formsValueContainer, formValuesContainerChanged) => {
9
9
  var _a;
10
10
  const h = function (level, content) {
11
11
  return level === 1
@@ -39,7 +39,7 @@ const render = (form, props, formsValueContainer) => {
39
39
  .codeContentProvider=${(_g = fg.options) === null || _g === void 0 ? void 0 : _g.codeContentProvider}
40
40
  .valueProvider="${formsValueContainer && (0, iqr_form_loader_1.textFieldValuesProvider)(formsValueContainer, fg)}"
41
41
  .metaProvider=${formsValueContainer && (0, iqr_form_loader_1.metaProvider)(formsValueContainer, fg)}
42
- .handleValueChanged=${formsValueContainer && (0, iqr_form_loader_1.handleTextFieldValueChangedProvider)(formsValueContainer)}
42
+ .handleValueChanged=${formsValueContainer && formValuesContainerChanged && (0, iqr_form_loader_1.handleTextFieldValueChangedProvider)(formsValueContainer, formValuesContainerChanged)}
43
43
  .handleMetaChanged=${formsValueContainer && (0, iqr_form_loader_1.handleMetaChangedProvider)(formsValueContainer)}
44
44
  ></iqr-form-textfield>`
45
45
  : fg.type === 'measure-field'
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/form.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAI1C,2DAU8B;AAG9B,MAAM,sBAAsB,GAAG,CAAC,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AAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACtG,CAAA;KAAA,CACF;;EAEF,CAAA;AACF,CAAC,CAAA;AApFY,QAAA,MAAM,UAoFlB","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Field, Form, Group } from '../model'\nimport { Renderer } from './index'\nimport { FormValuesContainer } from '../../iqr-form-loader'\nimport {\n\tdateFieldValuesProvider,\n\tdateTimeFieldValuesProvider,\n\thandleMetaChangedProvider,\n\thandleTextFieldValueChangedProvider,\n\tmeasureFieldValuesProvider,\n\tmetaProvider,\n\tnumberFieldValuesProvider,\n\ttextFieldValuesProvider,\n\ttimeFieldValuesProvider,\n} from '../../iqr-form-loader'\nimport { /*VersionedMeta,*/ VersionedValue } from '../../iqr-text-field'\n\nconst firstItemValueProvider = (valuesProvider: () => VersionedValue[]) => () => valuesProvider()[0]\n//const firstItemMetaProvider = (valuesProvider: () => VersionedMeta[]) => () => valuesProvider()[0]\n\nexport const render: Renderer = (form: Form, props: { [key: string]: unknown }, formsValueContainer?: FormValuesContainer) => {\n\tconst h = function (level: number, content: TemplateResult): TemplateResult {\n\t\treturn level === 1\n\t\t\t? html`<h1>${content}</h1>`\n\t\t\t: level === 2\n\t\t\t? html`<h2>${content}</h2>`\n\t\t\t: level === 3\n\t\t\t? html`<h3>${content}</h3>`\n\t\t\t: level === 4\n\t\t\t? html`<h4>${content}</h4>`\n\t\t\t: level === 5\n\t\t\t? html`<h5>${content}</h5>`\n\t\t\t: html`<h6>${content}</h6>`\n\t}\n\tconst renderFieldOrGroup = function (fg: Field | Group, level: number): TemplateResult {\n\t\treturn fg.clazz === 'group'\n\t\t\t? html` <div class=\"group\">${h(level, html`${fg.group}`)} ${fg.fields?.map((f) => renderFieldOrGroup(f, level + 1))}</div>`\n\t\t\t: html`${\n\t\t\t\t\tfg.type === 'textfield'\n\t\t\t\t\t\t? html`<iqr-form-textfield\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\tmultiline=\"${(fg.rows || 0) > 1 || fg.grows}\"\n\t\t\t\t\t\t\t\trows=\"${fg.rows || 1}\"\n\t\t\t\t\t\t\t\tgrows=\"${fg.grows || false}\"\n\t\t\t\t\t\t\t\t.linksProvider=${fg.options?.linksProvider}\n\t\t\t\t\t\t\t\t.suggestionProvider=${fg.options?.suggestionProvider}\n\t\t\t\t\t\t\t\t.ownersProvider=${fg.options?.ownersProvider}\n\t\t\t\t\t\t\t\t.codeColorProvider=${fg.options?.codeColorProvider}\n\t\t\t\t\t\t\t\t.linkColorProvider=${fg.options?.linkColorProvider}\n\t\t\t\t\t\t\t\t.codeContentProvider=${fg.options?.codeContentProvider}\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && textFieldValuesProvider(formsValueContainer, fg)}\"\n\t\t\t\t\t\t\t\t.metaProvider=${formsValueContainer && metaProvider(formsValueContainer, fg)}\n\t\t\t\t\t\t\t\t.handleValueChanged=${formsValueContainer && handleTextFieldValueChangedProvider(formsValueContainer)}\n\t\t\t\t\t\t\t\t.handleMetaChanged=${formsValueContainer && handleMetaChangedProvider(formsValueContainer)}\n\t\t\t\t\t\t ></iqr-form-textfield>`\n\t\t\t\t\t\t: fg.type === 'measure-field'\n\t\t\t\t\t\t? html`<iqr-form-measure-field\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(measureFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-measure-field>`\n\t\t\t\t\t\t: fg.type === 'number-field'\n\t\t\t\t\t\t? html`<iqr-form-number-field\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(numberFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-number-field>`\n\t\t\t\t\t\t: fg.type === 'date-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(dateFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-date-picker>`\n\t\t\t\t\t\t: fg.type === 'time-picker'\n\t\t\t\t\t\t? html`<iqr-form-time-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(timeFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-time-picker>`\n\t\t\t\t\t\t: fg.type === 'date-time-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-time-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(dateTimeFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-date-time-picker>`\n\t\t\t\t\t\t: fg.type === 'multiple-choice'\n\t\t\t\t\t\t? html`<iqr-form-multiple-choice labelPosition=${props.labelPosition} label=\"${fg.field}\"></iqr-form-multiple-choice>`\n\t\t\t\t\t\t: ''\n\t\t\t }\n\t\t\t\t\t</div>`\n\t}\n\n\treturn html`\n\t\t<div class=\"iqr-form\">\n\t\t\t${form?.sections?.map(\n\t\t\t\t(s) =>\n\t\t\t\t\thtml`\n\t\t\t\t\t\t<h2>${s.section}</h2>\n\t\t\t\t\t\t${s.description ? html`<p>${s.description}</p>` : ''} ${s.fields?.map((f) => renderFieldOrGroup(f, 3))}\n\t\t\t\t\t`,\n\t\t\t)}\n\t\t</div>\n\t`\n}\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/form.ts"],"names":[],"mappings":";;;AAAA,6BAA0C;AAI1C,2DAU8B;AAG9B,MAAM,sBAAsB,GAAG,CAAC,cAAsC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAA;AACpG,oGAAoG;AAE7F,MAAM,MAAM,GAAa,CAC/B,IAAU,EACV,KAAiC,EACjC,mBAAyC,EACzC,0BAAoE,EACnE,EAAE;;IACH,MAAM,CAAC,GAAG,UAAU,KAAa,EAAE,OAAuB;QACzD,OAAO,KAAK,KAAK,CAAC;YACjB,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;YAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;gBACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;gBAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;oBACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;oBAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;wBACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;wBAC3B,CAAC,CAAC,KAAK,KAAK,CAAC;4BACb,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO;4BAC3B,CAAC,CAAC,IAAA,UAAI,EAAA,OAAO,OAAO,OAAO,CAAA;IAC7B,CAAC,CAAA;IACD,MAAM,kBAAkB,GAAG,UAAU,EAAiB,EAAE,KAAa;;QACpE,OAAO,EAAE,CAAC,KAAK,KAAK,OAAO;YAC1B,CAAC,CAAC,IAAA,UAAI,EAAA,uBAAuB,CAAC,CAAC,KAAK,EAAE,IAAA,UAAI,EAAA,GAAG,EAAE,CAAC,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AI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,0CAAE,GAAG,CACpB,CAAC,CAAC,EAAE,EAAE;;QACL,OAAA,IAAA,UAAI,EAAA;YACG,CAAC,CAAC,OAAO;QACb,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAA,UAAI,EAAA,MAAM,CAAC,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,MAAA,CAAC,CAAC,MAAM,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACtG,CAAA;KAAA,CACF;;EAEF,CAAA;AACF,CAAC,CAAA;AAzFY,QAAA,MAAM,UAyFlB","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { Field, Form, Group } from '../model'\nimport { Renderer } from './index'\nimport { FormValuesContainer } from '../../iqr-form-loader'\nimport {\n\tdateFieldValuesProvider,\n\tdateTimeFieldValuesProvider,\n\thandleMetaChangedProvider,\n\thandleTextFieldValueChangedProvider,\n\tmeasureFieldValuesProvider,\n\tmetaProvider,\n\tnumberFieldValuesProvider,\n\ttextFieldValuesProvider,\n\ttimeFieldValuesProvider,\n} from '../../iqr-form-loader'\nimport { /*VersionedMeta,*/ VersionedValue } from '../../iqr-text-field'\n\nconst firstItemValueProvider = (valuesProvider: () => VersionedValue[]) => () => valuesProvider()[0]\n//const firstItemMetaProvider = (valuesProvider: () => VersionedMeta[]) => () => valuesProvider()[0]\n\nexport const render: Renderer = (\n\tform: Form,\n\tprops: { [key: string]: unknown },\n\tformsValueContainer?: FormValuesContainer,\n\tformValuesContainerChanged?: (newValue: FormValuesContainer) => void,\n) => {\n\tconst h = function (level: number, content: TemplateResult): TemplateResult {\n\t\treturn level === 1\n\t\t\t? html`<h1>${content}</h1>`\n\t\t\t: level === 2\n\t\t\t? html`<h2>${content}</h2>`\n\t\t\t: level === 3\n\t\t\t? html`<h3>${content}</h3>`\n\t\t\t: level === 4\n\t\t\t? html`<h4>${content}</h4>`\n\t\t\t: level === 5\n\t\t\t? html`<h5>${content}</h5>`\n\t\t\t: html`<h6>${content}</h6>`\n\t}\n\tconst renderFieldOrGroup = function (fg: Field | Group, level: number): TemplateResult {\n\t\treturn fg.clazz === 'group'\n\t\t\t? html` <div class=\"group\">${h(level, html`${fg.group}`)} ${fg.fields?.map((f) => renderFieldOrGroup(f, level + 1))}</div>`\n\t\t\t: html`${\n\t\t\t\t\tfg.type === 'textfield'\n\t\t\t\t\t\t? html`<iqr-form-textfield\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\tmultiline=\"${(fg.rows || 0) > 1 || fg.grows}\"\n\t\t\t\t\t\t\t\trows=\"${fg.rows || 1}\"\n\t\t\t\t\t\t\t\tgrows=\"${fg.grows || false}\"\n\t\t\t\t\t\t\t\t.linksProvider=${fg.options?.linksProvider}\n\t\t\t\t\t\t\t\t.suggestionProvider=${fg.options?.suggestionProvider}\n\t\t\t\t\t\t\t\t.ownersProvider=${fg.options?.ownersProvider}\n\t\t\t\t\t\t\t\t.codeColorProvider=${fg.options?.codeColorProvider}\n\t\t\t\t\t\t\t\t.linkColorProvider=${fg.options?.linkColorProvider}\n\t\t\t\t\t\t\t\t.codeContentProvider=${fg.options?.codeContentProvider}\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && textFieldValuesProvider(formsValueContainer, fg)}\"\n\t\t\t\t\t\t\t\t.metaProvider=${formsValueContainer && metaProvider(formsValueContainer, fg)}\n\t\t\t\t\t\t\t\t.handleValueChanged=${formsValueContainer && formValuesContainerChanged && handleTextFieldValueChangedProvider(formsValueContainer, formValuesContainerChanged)}\n\t\t\t\t\t\t\t\t.handleMetaChanged=${formsValueContainer && handleMetaChangedProvider(formsValueContainer)}\n\t\t\t\t\t\t ></iqr-form-textfield>`\n\t\t\t\t\t\t: fg.type === 'measure-field'\n\t\t\t\t\t\t? html`<iqr-form-measure-field\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(measureFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-measure-field>`\n\t\t\t\t\t\t: fg.type === 'number-field'\n\t\t\t\t\t\t? html`<iqr-form-number-field\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(numberFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-number-field>`\n\t\t\t\t\t\t: fg.type === 'date-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(dateFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-date-picker>`\n\t\t\t\t\t\t: fg.type === 'time-picker'\n\t\t\t\t\t\t? html`<iqr-form-time-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(timeFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-time-picker>`\n\t\t\t\t\t\t: fg.type === 'date-time-picker'\n\t\t\t\t\t\t? html`<iqr-form-date-time-picker\n\t\t\t\t\t\t\t\tlabelPosition=${props.labelPosition}\n\t\t\t\t\t\t\t\tlabel=\"${fg.field}\"\n\t\t\t\t\t\t\t\t.valueProvider=\"${formsValueContainer && firstItemValueProvider(dateTimeFieldValuesProvider(formsValueContainer, fg))}\"\n\t\t\t\t\t\t ></iqr-form-date-time-picker>`\n\t\t\t\t\t\t: fg.type === 'multiple-choice'\n\t\t\t\t\t\t? html`<iqr-form-multiple-choice labelPosition=${props.labelPosition} label=\"${fg.field}\"></iqr-form-multiple-choice>`\n\t\t\t\t\t\t: ''\n\t\t\t }\n\t\t\t\t\t</div>`\n\t}\n\n\treturn html`\n\t\t<div class=\"iqr-form\">\n\t\t\t${form?.sections?.map(\n\t\t\t\t(s) =>\n\t\t\t\t\thtml`\n\t\t\t\t\t\t<h2>${s.section}</h2>\n\t\t\t\t\t\t${s.description ? html`<p>${s.description}</p>` : ''} ${s.fields?.map((f) => renderFieldOrGroup(f, 3))}\n\t\t\t\t\t`,\n\t\t\t)}\n\t\t</div>\n\t`\n}\n"]}
@@ -2,5 +2,5 @@ import { Form } from '../model';
2
2
  import { TemplateResult } from 'lit';
3
3
  import { FormValuesContainer } from '../../iqr-form-loader/formValuesContainer';
4
4
  export declare type Renderer = (form: Form, props: {
5
- [key: string]: unknown;
6
- }, formsValueContainer?: FormValuesContainer) => TemplateResult;
5
+ [p: string]: unknown;
6
+ }, formsValueContainer?: FormValuesContainer, formValuesContainerChanged?: (newValue: FormValuesContainer) => void) => TemplateResult;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/index.ts"],"names":[],"mappings":"","sourcesContent":["import { Form } from '../model'\nimport { TemplateResult } from 'lit'\nimport { FormValuesContainer } from '../../iqr-form-loader/formValuesContainer'\n\nexport type Renderer = (form: Form, props: { [key: string]: unknown }, formsValueContainer?: FormValuesContainer) => TemplateResult\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tmp/components/iqr-form/renderer/index.ts"],"names":[],"mappings":"","sourcesContent":["import { Form } from '../model'\nimport { TemplateResult } from 'lit'\nimport { FormValuesContainer } from '../../iqr-form-loader/formValuesContainer'\n\nexport type Renderer = (\n\tform: Form,\n\tprops: { [p: string]: unknown },\n\tformsValueContainer?: FormValuesContainer,\n\tformValuesContainerChanged?: (newValue: FormValuesContainer) => void,\n) => TemplateResult\n"]}
@@ -9,5 +9,5 @@ export declare function dateFieldValuesProvider(formValuesContainer: FormValuesC
9
9
  export declare function dateTimeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[];
10
10
  export declare function timeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[];
11
11
  export declare function metaProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedMeta[];
12
- export declare function handleTextFieldValueChangedProvider(formValuesContainer: FormValuesContainer): (serviceId: string, language: string, content: string, codes: CodeStub[]) => void;
12
+ export declare function handleTextFieldValueChangedProvider(formValuesContainer: FormValuesContainer, formValuesContainerChanged: (newValue: FormValuesContainer) => void): (serviceId: string, language: string, content: string, codes: CodeStub[]) => void;
13
13
  export declare function handleMetaChangedProvider(formValuesContainer: FormValuesContainer): (serviceId: string, meta: Meta) => void;
@@ -31,8 +31,10 @@ function metaProvider(formValuesContainer, field) {
31
31
  return () => (0, icure_utils_1.convertServicesToVersionedMetas)((0, icure_utils_1.getVersions)(formValuesContainer, field));
32
32
  }
33
33
  exports.metaProvider = metaProvider;
34
- function handleTextFieldValueChangedProvider(formValuesContainer) {
35
- return (serviceId, language, content, codes) => formValuesContainer.setValue(serviceId, language, new api_1.Content({ stringValue: content }), codes);
34
+ function handleTextFieldValueChangedProvider(formValuesContainer, formValuesContainerChanged) {
35
+ return (serviceId, language, content, codes) => {
36
+ formValuesContainerChanged(formValuesContainer.setValue(serviceId, language, new api_1.Content({ stringValue: content }), codes));
37
+ };
36
38
  }
37
39
  exports.handleTextFieldValueChangedProvider = handleTextFieldValueChangedProvider;
38
40
  function handleMetaChangedProvider(formValuesContainer) {
@@ -1 +1 @@
1
- {"version":3,"file":"fieldsValuesProviders.js","sourceRoot":"","sources":["../../../tmp/components/iqr-form-loader/fieldsValuesProviders.ts"],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EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;AACjG,CAAC;AAHD,kFAGC;AAED,SAAgB,yBAAyB,CAAC,mBAAwC;IACjF,OAAO,CAAC,SAAiB,EAAE,IAAU,EAAE,EAAE;QACxC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,mBAAmB,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACvH,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;YAAE,mBAAmB,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC9F,CAAC,CAAA;AACF,CAAC;AALD,8DAKC","sourcesContent":["import { Field } from '../iqr-form/model'\nimport { Meta, VersionedMeta, VersionedValue } from '../iqr-text-field'\nimport { convertServicesToVersionedMetas, convertServicesToVersionedValues, getVersions } from '../../utils/icure-utils'\nimport { CodeStub, Content } from '@icure/api'\nimport { FormValuesContainer } from './formValuesContainer'\n\nexport function numberFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) =>\n\t\t\tcontent.numberValue || content.numberValue === 0 ? new Intl.NumberFormat('fr').format(content.numberValue) : '',\n\t\t)\n}\n\nexport function measureFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) =>\n\t\t\tcontent.measureValue?.value || content.measureValue?.value === 0 ? `${new Intl.NumberFormat('fr').format(content.measureValue.value)} ${content.measureValue?.unit}` : '',\n\t\t)\n}\n\nexport function textFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () => convertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => content.stringValue || '')\n}\n\nexport function dateFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => `${content.fuzzyDateValue}`.replace(/(....)(..)(..)/, '$3$2$1') || '')\n}\n\nexport function dateTimeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(\n\t\t\tgetVersions(formValuesContainer, field),\n\t\t\t(content: Content) => `${content.fuzzyDateValue}`.replace(/(....)(..)(..)(......)/, '$3$2$1 $4') || '',\n\t\t)\n}\n\nexport function timeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () => convertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => `${content.fuzzyDateValue}`)\n}\n\nexport function metaProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedMeta[] {\n\treturn () => convertServicesToVersionedMetas(getVersions(formValuesContainer, field))\n}\n\nexport function handleTextFieldValueChangedProvider(formValuesContainer: FormValuesContainer): (serviceId: string, language: string, content: string, codes: CodeStub[]) => void {\n\treturn (serviceId: string, language: string, content: string, codes: CodeStub[]) =>\n\t\tformValuesContainer.setValue(serviceId, language, new Content({ stringValue: content }), codes)\n}\n\nexport function handleMetaChangedProvider(formValuesContainer: FormValuesContainer): (serviceId: string, meta: Meta) => void {\n\treturn (serviceId: string, meta: Meta) => {\n\t\tif (meta.owner !== undefined) formValuesContainer.setResponsible(serviceId, meta.owner === null ? null : meta.owner.id)\n\t\tif (meta.valueDate !== undefined) formValuesContainer.setValueDate(serviceId, meta.valueDate)\n\t}\n}\n"]}
1
+ {"version":3,"file":"fieldsValuesProviders.js","sourceRoot":"","sources":["../../../tmp/components/iqr-form-loader/fieldsValuesProviders.ts"],"names":[],"mappings":";;;AAEA,yDAAwH;AACxH,oCAA8C;AAG9C,S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EAAE,KAAK,CAAC,CAAC,CAAA;IAC5H,CAAC,CAAA;AACF,CAAC;AAPD,kFAOC;AAED,SAAgB,yBAAyB,CAAC,mBAAwC;IACjF,OAAO,CAAC,SAAiB,EAAE,IAAU,EAAE,EAAE;QACxC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,mBAAmB,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QACvH,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;YAAE,mBAAmB,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC9F,CAAC,CAAA;AACF,CAAC;AALD,8DAKC","sourcesContent":["import { Field } from '../iqr-form/model'\nimport { Meta, VersionedMeta, VersionedValue } from '../iqr-text-field'\nimport { convertServicesToVersionedMetas, convertServicesToVersionedValues, getVersions } from '../../utils/icure-utils'\nimport { CodeStub, Content } from '@icure/api'\nimport { FormValuesContainer } from './formValuesContainer'\n\nexport function numberFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) =>\n\t\t\tcontent.numberValue || content.numberValue === 0 ? new Intl.NumberFormat('fr').format(content.numberValue) : '',\n\t\t)\n}\n\nexport function measureFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) =>\n\t\t\tcontent.measureValue?.value || content.measureValue?.value === 0 ? `${new Intl.NumberFormat('fr').format(content.measureValue.value)} ${content.measureValue?.unit}` : '',\n\t\t)\n}\n\nexport function textFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () => convertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => content.stringValue || '')\n}\n\nexport function dateFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => `${content.fuzzyDateValue}`.replace(/(....)(..)(..)/, '$3$2$1') || '')\n}\n\nexport function dateTimeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () =>\n\t\tconvertServicesToVersionedValues(\n\t\t\tgetVersions(formValuesContainer, field),\n\t\t\t(content: Content) => `${content.fuzzyDateValue}`.replace(/(....)(..)(..)(......)/, '$3$2$1 $4') || '',\n\t\t)\n}\n\nexport function timeFieldValuesProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedValue[] {\n\treturn () => convertServicesToVersionedValues(getVersions(formValuesContainer, field), (content: Content) => `${content.fuzzyDateValue}`)\n}\n\nexport function metaProvider(formValuesContainer: FormValuesContainer, field: Field): () => VersionedMeta[] {\n\treturn () => convertServicesToVersionedMetas(getVersions(formValuesContainer, field))\n}\n\nexport function handleTextFieldValueChangedProvider(\n\tformValuesContainer: FormValuesContainer,\n\tformValuesContainerChanged: (newValue: FormValuesContainer) => void,\n): (serviceId: string, language: string, content: string, codes: CodeStub[]) => void {\n\treturn (serviceId: string, language: string, content: string, codes: CodeStub[]) => {\n\t\tformValuesContainerChanged(formValuesContainer.setValue(serviceId, language, new Content({ stringValue: content }), codes))\n\t}\n}\n\nexport function handleMetaChangedProvider(formValuesContainer: FormValuesContainer): (serviceId: string, meta: Meta) => void {\n\treturn (serviceId: string, meta: Meta) => {\n\t\tif (meta.owner !== undefined) formValuesContainer.setResponsible(serviceId, meta.owner === null ? null : meta.owner.id)\n\t\tif (meta.valueDate !== undefined) formValuesContainer.setValueDate(serviceId, meta.valueDate)\n\t}\n}\n"]}
@@ -836,6 +836,7 @@ class IqrTextField extends lit_1.LitElement {
836
836
  this.windowListeners = [];
837
837
  this.mouseCount = 0;
838
838
  this.serviceId = undefined;
839
+ this.trToSave = undefined;
839
840
  }
840
841
  connectedCallback() {
841
842
  super.connectedCallback();
@@ -1009,13 +1010,13 @@ class IqrTextField extends lit_1.LitElement {
1009
1010
  .map((x) => x),
1010
1011
  }),
1011
1012
  dispatchTransaction: (tr) => {
1012
- var _a, _b;
1013
1013
  this.view && this.view.updateState(this.view.state.apply(tr));
1014
1014
  //current state as json in text area
1015
1015
  //this.view && console.log(JSON.stringify(this.view.state.doc.toJSON(), null, 2));
1016
- this.view &&
1017
- this.handleValueChanged &&
1018
- this.handleValueChanged(this.displayedLanguage, (_b = (_a = this.serializer) === null || _a === void 0 ? void 0 : _a.serialize(this.view.state.doc)) !== null && _b !== void 0 ? _b : this.view.state.doc.textContent);
1016
+ if (this.view && tr.doc != tr.before && this.handleValueChanged) {
1017
+ this.trToSave = tr;
1018
+ setTimeout(() => { var _a, _b, _c; return this.trToSave === tr && ((_a = this.handleValueChanged) === null || _a === void 0 ? void 0 : _a.call(this, this.displayedLanguage, (_c = (_b = this.serializer) === null || _b === void 0 ? void 0 : _b.serialize(tr.doc)) !== null && _c !== void 0 ? _c : tr.doc.textContent)); }, 800);
1019
+ }
1019
1020
  },
1020
1021
  });
1021
1022
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/iqr-text-field/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAAsC;AACtC,+CAAuD;AACvD,yDAAuD;AACvD,uDAA6C;AAE7C,6DAAyD;AACzD,2DAA2C;AAC3C,+DAAsH;AACtH,qEAA+F;AAE/F,qCAA2D;AAC3D,8DAAoC;AACpC,+DAAyE;AACzE,iEAAmE;AACnE,+DAA0D;AAC1D,6DAAoE;AACpE,gEAA0D;AAC1D,2DAA6C;AAE7C,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;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;AAC9D;IAAX,IAAA,qBAAQ,GAAE;;iDAAiB;AAChB;IAAX,IAAA,qBAAQ,GAAE;;+CAAe;AAEd;IAAX,IAAA,qBAAQ,GAAE;;2CAAW;AACV;IAAX,IAAA,qBAAQ,GAAE;;qDAAuB;AACtB;IAAX,IAAA,qBAAQ,GAAE;;2CAAe;AAEd;IAAX,IAAA,qBAAQ,GAAE;;mDAA6D;AAC5D;IAAX,IAAA,qBAAQ,GAAE;;kDAA2D;AAC1D;IAAX,IAAA,qBAAQ,GAAE;;wDAA2E;AAC1E;IAAX,IAAA,qBAAQ,GAAE;;uDAAiE;AAEnE;IAAR,IAAA,kBAAK,GAAE;;uDAAoC;AACnC;IAAR,IAAA,kBAAK,GAAE;;qDAA+B;AAC9B;IAAR,IAAA,kBAAK,GAAE;;qDAA6C;AAE5C;IAAR,IAAA,kBAAK,GAAE;;0DAAuC;AACtC;IAAR,IAAA,kBAAK,GAAE;;wDAAkC;AAEjC;IAAR,IAAA,kBAAK,GAAE;;yDAAsC;AAErC;IAAR,IAAA,kBAAK,GAAE;;uDAAmD;AAClD;IAAR,IAAA,kBAAK,GAAE;;sDAAiC;AAEhC;IAAR,IAAA,kBAAK,GAAE;;wDAAwD;AAoCzC;IAAtB,IAAA,kBAAK,EAAC,cAAc,CAAC;8BAAgB,gBAAgB;kDAAA;AAiTvD,6CAA6C;AAC7C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement } from 'lit'\nimport { property, state, query } from 'lit/decorators'\nimport { EditorState, Plugin } from 'prosemirror-state'\nimport { EditorView } from 'prosemirror-view'\nimport { Node as ProsemirrorNode, Schema } from 'prosemirror-model'\nimport { history, redo, undo } from 'prosemirror-history'\nimport { keymap } from 'prosemirror-keymap'\nimport { baseKeymap, chainCommands, exitCode, joinDown, joinUp, setBlockType, toggleMark } from 'prosemirror-commands'\nimport { liftListItem, sinkListItem, splitListItem, wrapInList } from 'prosemirror-schema-list'\n\nimport { createSchema, IqrTextFieldSchema } from './schema'\nimport MarkdownIt from 'markdown-it'\nimport { MarkdownParser, MarkdownSerializer } from 'prosemirror-markdown'\nimport { unwrapFrom, wrapInIfNeeded } from './prosemirror-commands'\nimport { SelectionCompanion } from './selection-companion'\nimport { Suggestion, SuggestionPalette } from './suggestion-palette'\nimport { caretFixPlugin } from './plugin/caret-fix-plugin'\nimport { hasMark } from './prosemirror-utils'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #F44336;\n}\n\n.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0;\n /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror ul, .ProseMirror ol {\n padding-left: 30px;\n}\n\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor, .editor {\n color: black;\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n}\n\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n\n.ProseMirror {\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n\n.ProseMirror p {\n margin-bottom: 1em;\n}\n\n.iqr-input {\n background: #EDF2F7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Inter\", Arial, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809AB4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809AB4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n\n.menu .input-container {\n background: #EDF2F7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px #2897ff;\n}\n\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: block;\n}\n\n.menu-container .item {\n height: 22px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n\n.menu-container .item:hover {\n background: #F5F9FD;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\n\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #FFFFFF;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\n\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: #00c4ff;\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n\n.companion:hover {\n font-weight: 700;\n background: #00a2ff;\n}\n\n*::selection {\n background-color: rgba(0, 196, 255, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: #274768;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: #809ab4;\n}\n\n.suggestion-palette ul li:not(:first-child) svg.tab-icn, .suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n\n.suggestion-palette ul li.focused {\n background-color: #edf2f7;\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after, span.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after, span.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after, span.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}` \n// @ts-ignore\nconst kendoCss = css`.iqr-text-field {\n position: relative;\n padding-top: 1.4em;\n display: inline-flex;\n width: 100%;\n flex-direction: column;\n justify-content: stretch;\n}\n.iqr-text-field > .iqr-label {\n z-index: 1;\n pointer-events: none;\n position: absolute;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc( 1.4em + 5px );\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #656565;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 55%;\n min-width: 0;\n}\n.iqr-text-field > .iqr-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.iqr-text-field > .iqr-input {\n flex: 1 1 auto;\n width: auto;\n}\n.iqr-text-field > .iqr-label {\n transform: translate(0, 0) scale(1);\n}\n.iqr-text-field > .iqr-label.above, .iqr-text-field.has-content > .iqr-label, .iqr-text-field:focus > .iqr-label, .iqr-text-field:focus-within > .iqr-label {\n transform: translate(-8px, -4px) translate(-1px, -1.4em) translate(0%, 0%) scale(1);\n font-weight: 500;\n height: 1.4em;\n max-width: 100%;\n}\n.iqr-text-field .iqr-input, .iqr-text-field .input-container {\n border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: rgba(0, 0, 0, 0.08);\n color: #656565;\n box-sizing: border-box;\n}\n.iqr-text-field .iqr-input:focus, .iqr-text-field .iqr-input:focus-within, .iqr-text-field .input-container:focus, .iqr-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.iqr-text-field .iqr-input:hover, .iqr-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.iqr-text-field .iqr-input:hover:focus, .iqr-text-field .iqr-input:hover:focus-within, .iqr-text-field .input-container:hover:focus, .iqr-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.iqr-text-field .iqr-input .ProseMirror, .iqr-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #656565;\n}\n.iqr-text-field .iqr-input .ProseMirror .date, .iqr-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.iqr-text-field .iqr-input .ProseMirror .time, .iqr-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.iqr-text-field .iqr-input .ProseMirror:focus .focused, .iqr-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.iqr-text-field .iqr-input > svg, .iqr-text-field .input-container > svg {\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input > svg path, .iqr-text-field .input-container > svg path {\n fill: #656565;\n}\n.iqr-text-field .iqr-input .extra, .iqr-text-field .input-container .extra {\n height: 20px;\n}\n.iqr-text-field .iqr-input .extra > .info, .iqr-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .btn svg path, .iqr-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .btn svg path:hover, .iqr-text-field .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .menu-container .btn:hover::after, .iqr-text-field .input-container .extra .buttons-container .menu-container .btn:hover::after {\n background: #656565;\n border-radius: 2px;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .menu-container .btn:hover::before, .iqr-text-field .input-container .extra .buttons-container .menu-container .btn:hover::before {\n border-color: #656565 transparent transparent transparent;\n}` \n\nimport { maskPlugin } from './plugin/mask-plugin'\nimport { hasContentClassPlugin } from './plugin/has-content-class-plugin'\nimport { regexpPlugin } from './plugin/regexp-plugin'\nimport { sorted } from '../../utils/no-lodash'\nimport { datePicto, i18nPicto, ownerPicto, searchPicto, versionPicto } from './styles/paths'\nimport { languageName } from '../../utils/languages'\n\nexport { IqrTextFieldSchema } from './schema'\nexport { Suggestion } from './suggestion-palette'\n\ntype FullSchema = Schema<\n\t'doc' | 'paragraph' | 'list_item' | 'image' | 'blockquote' | 'bullet_list' | 'hard_break' | 'heading' | 'horizontal_rule' | 'ordered_list' | 'text',\n\t'strong' | 'em' | 'link'\n>\ntype DateTimeSchema = Schema<'paragraph' | 'date' | 'time' | 'text'>\n\nexport interface Meta {\n\trevision: string\n\tmodified?: number\n\tvalueDate?: number | null\n\towner?: { id: string; descr?: string } | null\n}\n\nexport interface Version {\n\trevision: string\n\tmodified?: number\n\tvalue: { [language: string]: string }\n}\n\nexport interface VersionedMeta {\n\tid: string\n\tmetas: Meta[]\n}\n\nexport interface VersionedValue {\n\tid: string\n\tversions: Version[]\n}\n\n// Extend the LitElement base class\nclass IqrTextField extends LitElement {\n\t@property() suggestionStopWords: Set<string> = new Set<string>()\n\t@property({ type: Boolean }) displayOwnerMenu = false\n\t@property({ type: Boolean }) suggestions = false\n\t@property({ type: Boolean }) links = false\n\t@property() linksProvider: (sug: { id: string; code: string; text: string; terms: string[] }) => Promise<{ href: string; title: string } | undefined> = () =>\n\t\tPromise.resolve(undefined)\n\t@property() suggestionProvider: (terms: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() ownersProvider: (terms: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() codeColorProvider: (type: string, code: string) => string = () => 'XI'\n\t@property() linkColorProvider: (type: string, code: string) => string = () => 'cat1'\n\t@property() codeContentProvider: (codes: { type: string; code: string }[]) => string = (codes) => codes.map((c) => c.code).join(',')\n\t@property() schema: IqrTextFieldSchema = 'styled-text-with-codes'\n\t@property() label = ''\n\t@property() labelPosition: 'float' | 'side' | 'above' | 'hidden' = 'float'\n\t@property() placeholder = ''\n\t@property() textRegex = ''\n\n\t@property() value = ''\n\t@property() defaultLanguage = 'en'\n\t@property() owner?: string\n\n\t@property() valueProvider?: () => VersionedValue | undefined = undefined\n\t@property() metaProvider?: () => VersionedMeta | undefined = undefined\n\t@property() handleValueChanged?: (language: string, value: string) => void = undefined\n\t@property() handleMetaChanged?: (id: string, meta: Meta) => void = undefined\n\n\t@state() protected displayOwnersMenu = false\n\t@state() protected ownerInputValue = ''\n\t@state() protected availableOwners: Suggestion[] = []\n\n\t@state() protected displayLanguagesMenu = false\n\t@state() protected languageInputValue = ''\n\n\t@state() protected displayVersionsMenu = false\n\n\t@state() protected displayedLanguage = this.defaultLanguage\n\t@state() protected displayedVersion = '0'\n\n\t@state() protected availableLanguages = [this.displayedLanguage]\n\n\tprivate proseMirrorSchema?: Schema\n\tprivate parser?: MarkdownParser<FullSchema> | { parse: (value: string) => ProsemirrorNode<DateTimeSchema> }\n\tprivate serializer?: MarkdownSerializer<FullSchema>\n\n\tprivate view?: EditorView\n\tprivate container?: HTMLElement\n\tprivate readonly windowListeners: [string, () => void][] = []\n\tprivate suggestionPalette?: SuggestionPalette\n\tprivate mouseCount = 0\n\tprivate serviceId?: string = undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tconst cmu = this.mouseUp.bind(this)\n\t\tconst cmd = this.mouseDown.bind(this)\n\n\t\tthis.windowListeners.push(['mouseup', cmu], ['mousedown', cmd])\n\t\twindow.addEventListener('mouseup', cmu)\n\t\twindow.addEventListener('mousedown', cmd)\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.windowListeners.forEach((wl) => window.removeEventListener(wl[0], wl[1]))\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss, kendoCss]\n\t}\n\n\t@query('#ownerSearch') _ownerSearch!: HTMLInputElement\n\trender() {\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"iqr-text-field\" data-placeholder=${this.placeholder}>\n\t\t\t\t<label class=\"iqr-label ${this.labelPosition}\"><span>${this.label}</span></label>\n\t\t\t\t<div class=\"iqr-input\">\n\t\t\t\t\t<div id=\"editor\"></div>\n\t\t\t\t\t<div id=\"extra\" class=${'extra' + (this.displayOwnersMenu ? ' forced' : '')}>\n\t\t\t\t\t\t<div class=\"info\">~${this.owner}</div>\n\t\t\t\t\t\t<div class=\"buttons-container\">\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.getMeta()?.owner}\" @click=\"${this.toggleOwnerMenu}\" class=\"btn menu-trigger author\">${ownerPicto}</button>\n\t\t\t\t\t\t\t\t${this.displayOwnersMenu\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"ownerSearch\" @input=\"${this.searchOwner}\" /></div>\n\t\t\t\t\t\t\t\t\t\t\t\t${this.availableOwners?.map((x) => html`<button @click=\"${this.handleOwnerButtonClicked(x.id)}\" id=\"${x.id}\" class=\"item\">${x.text}</button>`)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.getMeta()?.valueDate}\" class=\"btn date\">${datePicto}</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"1.0\" class=\"btn version\">${versionPicto}</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.displayedLanguage}\" @click=\"${this.toggleLanguageMenu}\" class=\"btn menu-trigger language\">${i18nPicto}</button>\n\t\t\t\t\t\t\t\t${this.displayLanguagesMenu\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input /></div>\n\t\t\t\t\t\t\t\t\t\t\t\t${this.availableLanguages?.map((x) => html`<button id=\"${x}\" class=\"item\">${languageName(x)}</button>`)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n\n\ttoggleOwnerMenu() {\n\t\tthis.displayOwnersMenu = !this.displayOwnersMenu\n\t}\n\n\tsearchOwner(e: InputEvent) {\n\t\tconst text = (e.target as HTMLInputElement).value\n\t\tsetTimeout(async () => {\n\t\t\tif (this._ownerSearch.value === text) {\n\t\t\t\tif (this.ownersProvider) {\n\t\t\t\t\tconst availableOwners = await this.ownersProvider(text.split(' '))\n\t\t\t\t\tconsole.log(availableOwners)\n\t\t\t\t\tthis.availableOwners = availableOwners\n\t\t\t\t}\n\t\t\t}\n\t\t}, 300)\n\t}\n\n\thandleOwnerButtonClicked(id: string) {\n\t\tthis.handleMetaChanged && this.serviceId && this.handleMetaChanged(this.serviceId, { revision: this.displayedVersion, owner: { id } })\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\ttoggleLanguageMenu() {\n\t\tthis.displayLanguagesMenu = !this.displayLanguagesMenu\n\t}\n\n\tmouseDown() {\n\t\tthis.mouseCount++\n\t}\n\n\tmouseUp() {\n\t\tthis.mouseCount = 0\n\t\tif (!this.view?.dom?.classList?.contains('ProseMirror-focused')) {\n\t\t\tthis.view?.dom?.parentElement?.querySelectorAll('.companion')?.forEach((x) => {\n\t\t\t\t;(x as HTMLElement).style.display = 'none'\n\t\t\t})\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias\n\t\tconst cmp = this\n\t\tconst pms: Schema = (this.proseMirrorSchema = createSchema(\n\t\t\tthis.schema,\n\t\t\t(t, c, isC) => (isC ? this.codeColorProvider(t, c) : this.linkColorProvider(t, c)),\n\t\t\tthis.codeContentProvider,\n\t\t))\n\n\t\tthis.parser = this.makeParser(pms)\n\t\tthis.container = this.shadowRoot?.getElementById('editor') || undefined\n\n\t\tif (this.container) {\n\t\t\tconst br = pms.nodes.hard_break\n\t\t\tconst hardBreak = chainCommands(exitCode, (state, dispatch) => {\n\t\t\t\tdispatch && dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView())\n\t\t\t\treturn true\n\t\t\t})\n\n\t\t\tconst replaceRangeWithSuggestion = async (from: number, to: number, sug: { id: string; code: string; text: string; terms: string[] }) => {\n\t\t\t\tconst link = await this.linksProvider(sug)\n\t\t\t\treturn (link && cmp.view && cmp.view.state.tr.replaceWith(from, to, pms.text(sug.text, [pms.mark('link', link)]))) || undefined\n\t\t\t}\n\n\t\t\tconst headingsKeymap = keymap(\n\t\t\t\t[1, 2, 3, 4, 5, 6].reduce((acc, idx) => {\n\t\t\t\t\treturn Object.assign(acc, { [`Mod-ctrl-${idx}`]: setBlockType(pms.nodes.heading, { level: '' + idx }) })\n\t\t\t\t}, {}),\n\t\t\t)\n\n\t\t\tconst providedValue = this.valueProvider && this.valueProvider()\n\t\t\tthis.displayedVersion = providedValue?.versions?.[0]?.revision || '0'\n\t\t\tconst displayedVersionedValue = providedValue?.versions?.[0]?.value\n\t\t\tthis.serviceId = providedValue?.id\n\n\t\t\tthis.availableLanguages = displayedVersionedValue && Object.keys(displayedVersionedValue).length ? sorted(Object.keys(displayedVersionedValue)) : this.availableLanguages\n\t\t\tif (!this.availableLanguages.includes(this.displayedLanguage)) {\n\t\t\t\tthis.displayedLanguage = this.availableLanguages[0]\n\t\t\t}\n\n\t\t\tconst parsedDoc = this.parser.parse(this.valueProvider ? displayedVersionedValue?.[this.displayedLanguage] || '' : this.value)\n\n\t\t\tthis.view = new EditorView(this.container, {\n\t\t\t\tstate: EditorState.create({\n\t\t\t\t\tdoc: parsedDoc,\n\t\t\t\t\tschema: this.proseMirrorSchema,\n\t\t\t\t\tplugins: [\n\t\t\t\t\t\tcaretFixPlugin(),\n\t\t\t\t\t\thistory(),\n\t\t\t\t\t\tthis.links\n\t\t\t\t\t\t\t? new Plugin({\n\t\t\t\t\t\t\t\t\tview(editorView) {\n\t\t\t\t\t\t\t\t\t\treturn new SelectionCompanion(editorView, () => cmp.mouseCount > 0)\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tthis.suggestions\n\t\t\t\t\t\t\t? new Plugin({\n\t\t\t\t\t\t\t\t\tview(editorView) {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette = new SuggestionPalette(\n\t\t\t\t\t\t\t\t\t\t\tpms,\n\t\t\t\t\t\t\t\t\t\t\teditorView,\n\t\t\t\t\t\t\t\t\t\t\t(terms: string[]) => cmp.suggestionProvider(terms),\n\t\t\t\t\t\t\t\t\t\t\t() => cmp.suggestionStopWords,\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tthis.suggestions\n\t\t\t\t\t\t\t? keymap({\n\t\t\t\t\t\t\t\t\tTab: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && this.view && cmp.suggestionPalette.focusOrInsert(this.view, replaceRangeWithSuggestion)) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tArrowUp: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && cmp.suggestionPalette.arrowUp()) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tArrowDown: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && cmp.suggestionPalette.arrowDown()) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tEnter: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && this.view && cmp.suggestionPalette.insert(this.view, replaceRangeWithSuggestion)) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tkeymap({ 'Mod-z': undo, 'Mod-Shift-z': redo }),\n\t\t\t\t\t\tkeymap(\n\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tpms.marks.strong ? { 'Mod-b': toggleMark(pms.marks.strong) } : {},\n\t\t\t\t\t\t\t\tpms.marks.em ? { 'Mod-i': toggleMark(pms.marks.em) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-ArrowUp': joinUp } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-ArrowDown': joinDown } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-Enter': hardBreak } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Shift-Enter': hardBreak } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list ? { 'Shift-ctrl-1': wrapInList(pms.nodes.ordered_list) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.bullet_list ? { 'Shift-ctrl-*': wrapInList(pms.nodes.bullet_list) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.blockquote ? { 'Shift-ctrl-w': wrapInIfNeeded(pms.nodes.blockquote) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.blockquote ? { 'Shift-ctrl-u': unwrapFrom(pms.nodes.blockquote) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Mod-ctrl-0': setBlockType(pms.nodes.paragraph) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Shift-ctrl-0': setBlockType(pms.nodes.paragraph) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.list_item ? { Enter: splitListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-(': liftListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-[': liftListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-)': sinkListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-]': sinkListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpms.nodes.heading ? headingsKeymap : null,\n\t\t\t\t\t\tmaskPlugin(),\n\t\t\t\t\t\tregexpPlugin(),\n\t\t\t\t\t\thasContentClassPlugin(this.shadowRoot || undefined),\n\t\t\t\t\t\tkeymap(baseKeymap),\n\t\t\t\t\t]\n\t\t\t\t\t\t.filter((x) => !!x)\n\t\t\t\t\t\t.map((x) => x as Plugin),\n\t\t\t\t}),\n\t\t\t\tdispatchTransaction: (tr) => {\n\t\t\t\t\tthis.view && this.view.updateState(this.view.state.apply(tr))\n\t\t\t\t\t//current state as json in text area\n\t\t\t\t\t//this.view && console.log(JSON.stringify(this.view.state.doc.toJSON(), null, 2));\n\t\t\t\t\tthis.view &&\n\t\t\t\t\t\tthis.handleValueChanged &&\n\t\t\t\t\t\tthis.handleValueChanged(this.displayedLanguage, this.serializer?.serialize(this.view.state.doc) ?? this.view.state.doc.textContent)\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate makeParser(pms: Schema) {\n\t\tconst tokenizer = MarkdownIt('commonmark', { html: false })\n\t\treturn this.schema === 'date'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => pms.node('paragraph', {}, [pms.node('date', {}, value ? [pms.text(value)] : [])]),\n\t\t\t }\n\t\t\t: this.schema === 'time'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => pms.node('paragraph', {}, [pms.node('time', {}, value ? [pms.text(value)] : [])]),\n\t\t\t }\n\t\t\t: this.schema === 'measure'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => {\n\t\t\t\t\t\tconst decimal = value ? value.split(' ')[0] : ''\n\t\t\t\t\t\tconst unit = value ? value.split(' ')[1] : ''\n\n\t\t\t\t\t\treturn pms.node('paragraph', {}, [\n\t\t\t\t\t\t\tpms.node('decimal', {}, decimal && decimal.length ? [pms.text(decimal)] : [pms.text(' ')]),\n\t\t\t\t\t\t\tpms.node('unit', {}, unit && unit.length ? [pms.text(unit)] : [pms.text(' ')]),\n\t\t\t\t\t\t])\n\t\t\t\t\t},\n\t\t\t }\n\t\t\t: this.schema === 'date-time'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => {\n\t\t\t\t\t\tconst date = value ? value.split(' ')[0] : ''\n\t\t\t\t\t\tconst time = value ? value.split(' ')[1] : ''\n\n\t\t\t\t\t\treturn pms.node('paragraph', {}, [\n\t\t\t\t\t\t\tpms.node('date', {}, date && date.length ? [pms.text(date)] : [pms.text(' ')]),\n\t\t\t\t\t\t\tpms.node('time', {}, time && time.length ? [pms.text(time)] : [pms.text(' ')]),\n\t\t\t\t\t\t])\n\t\t\t\t\t},\n\t\t\t }\n\t\t\t: this.schema === 'text-document'\n\t\t\t? new MarkdownParser(pms, MarkdownIt('commonmark', { html: false }), {\n\t\t\t\t\tblockquote: { block: 'blockquote' },\n\t\t\t\t\tparagraph: { block: 'paragraph' },\n\t\t\t\t\tlist_item: { block: 'list_item' },\n\t\t\t\t\tbullet_list: { block: 'bullet_list' },\n\t\t\t\t\tordered_list: { block: 'ordered_list', getAttrs: (tok) => ({ order: +(tok.attrGet('start') || 1) }) },\n\t\t\t\t\theading: { block: 'heading', getAttrs: (tok) => ({ level: +tok.tag.slice(1) }) },\n\t\t\t\t\thr: { node: 'horizontal_rule' },\n\t\t\t\t\timage: {\n\t\t\t\t\t\tnode: 'image',\n\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\tsrc: tok.attrGet('src'),\n\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\talt: (tok.children || [])[0]?.content || null,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\thardBreak: { node: 'hard_break' },\n\n\t\t\t\t\tem: hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },\n\t\t\t\t\tstrong: hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },\n\t\t\t\t\tlink: hasMark(pms.spec.marks, 'link')\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tmark: 'link',\n\t\t\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\t\t\thref: tok.attrGet('href'),\n\t\t\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: { ignore: true },\n\t\t\t })\n\t\t\t: new MarkdownParser(\n\t\t\t\t\tpms,\n\t\t\t\t\t{\n\t\t\t\t\t\tparse: (src: string, env: unknown): unknown[] => {\n\t\t\t\t\t\t\treturn tokenizer.parse(src, env).filter((t) => !t.type.startsWith('paragraph_'))\n\t\t\t\t\t\t},\n\t\t\t\t\t} as MarkdownIt,\n\t\t\t\t\t{\n\t\t\t\t\t\tem: hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },\n\t\t\t\t\t\tstrong: hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },\n\t\t\t\t\t\tlink: hasMark(pms.spec.marks, 'link')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tmark: 'link',\n\t\t\t\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\t\t\t\thref: tok.attrGet('href'),\n\t\t\t\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ignore: true },\n\t\t\t\t\t},\n\t\t\t )\n\t}\n\n\tprivate getMeta(): Meta | undefined {\n\t\treturn (this.metaProvider && this.metaProvider()?.metas?.find((vm) => vm.revision === this.displayedVersion)) || undefined\n\t}\n}\n\n// Register the new element with the browser.\ncustomElements.define('iqr-text-field', IqrTextField)\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/iqr-text-field/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA4D;AAC5D,6BAAsC;AACtC,+CAAuD;AACvD,yDAAoE;AACpE,uDAA6C;AAE7C,6DAAyD;AACzD,2DAA2C;AAC3C,+DAAsH;AACtH,qEAA+F;AAE/F,qCAA2D;AAC3D,8DAAoC;AACpC,+DAAyE;AACzE,iEAAmE;AACnE,+DAA0D;AAC1D,6DAAoE;AACpE,gEAA0D;AAC1D,2DAA6C;AAE7C,aAAa;AACb,6BAA0B;AAC1B,MAAM,OAAO,GAAG,IAAA,SAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AX,IAAA,qBAAQ,GAAE;;mDAA+D;AAC9D;IAAX,IAAA,qBAAQ,GAAE;;iDAAiB;AAChB;IAAX,IAAA,qBAAQ,GAAE;;+CAAe;AAEd;IAAX,IAAA,qBAAQ,GAAE;;2CAAW;AACV;IAAX,IAAA,qBAAQ,GAAE;;qDAAuB;AACtB;IAAX,IAAA,qBAAQ,GAAE;;2CAAe;AAEd;IAAX,IAAA,qBAAQ,GAAE;;mDAA6D;AAC5D;IAAX,IAAA,qBAAQ,GAAE;;kDAA2D;AAC1D;IAAX,IAAA,qBAAQ,GAAE;;wDAA2E;AAC1E;IAAX,IAAA,qBAAQ,GAAE;;uDAAiE;AAEnE;IAAR,IAAA,kBAAK,GAAE;;uDAAoC;AACnC;IAAR,IAAA,kBAAK,GAAE;;qDAA+B;AAC9B;IAAR,IAAA,kBAAK,GAAE;;qDAA6C;AAE5C;IAAR,IAAA,kBAAK,GAAE;;0DAAuC;AACtC;IAAR,IAAA,kBAAK,GAAE;;wDAAkC;AAEjC;IAAR,IAAA,kBAAK,GAAE;;yDAAsC;AAErC;IAAR,IAAA,kBAAK,GAAE;;uDAAmD;AAClD;IAAR,IAAA,kBAAK,GAAE;;sDAAiC;AAEhC;IAAR,IAAA,kBAAK,GAAE;;wDAAwD;AAqCzC;IAAtB,IAAA,kBAAK,EAAC,cAAc,CAAC;8BAAgB,gBAAgB;kDAAA;AAkTvD,6CAA6C;AAC7C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA","sourcesContent":["// Import the LitElement base class and html helper function\nimport { html, LitElement } from 'lit'\nimport { property, state, query } from 'lit/decorators'\nimport { EditorState, Plugin, Transaction } from 'prosemirror-state'\nimport { EditorView } from 'prosemirror-view'\nimport { Node as ProsemirrorNode, Schema } from 'prosemirror-model'\nimport { history, redo, undo } from 'prosemirror-history'\nimport { keymap } from 'prosemirror-keymap'\nimport { baseKeymap, chainCommands, exitCode, joinDown, joinUp, setBlockType, toggleMark } from 'prosemirror-commands'\nimport { liftListItem, sinkListItem, splitListItem, wrapInList } from 'prosemirror-schema-list'\n\nimport { createSchema, IqrTextFieldSchema } from './schema'\nimport MarkdownIt from 'markdown-it'\nimport { MarkdownParser, MarkdownSerializer } from 'prosemirror-markdown'\nimport { unwrapFrom, wrapInIfNeeded } from './prosemirror-commands'\nimport { SelectionCompanion } from './selection-companion'\nimport { Suggestion, SuggestionPalette } from './suggestion-palette'\nimport { caretFixPlugin } from './plugin/caret-fix-plugin'\nimport { hasMark } from './prosemirror-utils'\n\n// @ts-ignore\nimport { css } from 'lit';\nconst baseCss = css`@charset \"UTF-8\";\n:host {\n --bg-color-1: #F44336;\n}\n\n.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: \"liga\" 0;\n /* the above doesn't seem to work in Edge */\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\n.ProseMirror li {\n position: relative;\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection {\n caret-color: transparent;\n}\n\n.ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n/* Make sure li selections wrap around markers */\nli.ProseMirror-selectednode {\n outline: none;\n}\n\nli.ProseMirror-selectednode:after {\n content: \"\";\n position: absolute;\n left: -32px;\n right: -2px;\n top: -2px;\n bottom: -2px;\n border: 2px solid #8cf;\n pointer-events: none;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: \"\";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n/* Add space around the hr to make clicking it easier */\n.ProseMirror-example-setup-style hr {\n padding: 2px 10px;\n border: none;\n margin: 1em 0;\n}\n\n.ProseMirror-example-setup-style hr:after {\n content: \"\";\n display: block;\n height: 1px;\n background: silver;\n line-height: 2px;\n}\n\n.ProseMirror ul, .ProseMirror ol {\n padding-left: 30px;\n}\n\n.ProseMirror blockquote {\n padding-left: 1em;\n border-left: 3px solid #eee;\n margin-left: 0;\n margin-right: 0;\n}\n\n.ProseMirror-example-setup-style img {\n cursor: default;\n}\n\n.ProseMirror-prompt {\n background: white;\n padding: 5px 10px 5px 15px;\n border: 1px solid silver;\n position: fixed;\n border-radius: 3px;\n z-index: 11;\n box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n\n.ProseMirror-prompt h5 {\n margin: 0;\n font-weight: normal;\n font-size: 100%;\n color: #444;\n}\n\n.ProseMirror-prompt input[type=text],\n.ProseMirror-prompt textarea {\n background: #eee;\n border: none;\n outline: none;\n}\n\n.ProseMirror-prompt input[type=text] {\n padding: 0 4px;\n}\n\n.ProseMirror-prompt-close {\n position: absolute;\n left: 2px;\n top: 1px;\n color: #666;\n border: none;\n background: transparent;\n padding: 0;\n}\n\n.ProseMirror-prompt-close:after {\n content: \"✕\";\n font-size: 12px;\n}\n\n.ProseMirror-invalid {\n background: #ffc;\n border: 1px solid #cc7;\n border-radius: 4px;\n padding: 5px 10px;\n position: absolute;\n min-width: 10em;\n}\n\n.ProseMirror-prompt-buttons {\n margin-top: 5px;\n display: none;\n}\n\n#editor, .editor {\n color: black;\n background-clip: padding-box;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2);\n padding: 5px 0;\n}\n\n.ProseMirror p:last-child,\n.ProseMirror h1:last-child,\n.ProseMirror h2:last-child,\n.ProseMirror h3:last-child,\n.ProseMirror h4:last-child,\n.ProseMirror h5:last-child,\n.ProseMirror h6:last-child {\n margin-bottom: 2px;\n}\n\n.ProseMirror {\n padding: 6px 8px 2px 8px;\n line-height: 1.2;\n color: #274768;\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n\n.ProseMirror p {\n margin-bottom: 1em;\n}\n\n.iqr-input {\n background: #EDF2F7;\n border-radius: 8px;\n border: none;\n min-height: 28px;\n height: auto;\n display: flex;\n flex-flow: row nowrap;\n align-items: flex-start;\n justify-content: space-between;\n}\n\n#editor {\n background: transparent;\n border: none;\n padding: 0;\n flex-grow: 1;\n}\n\n#content {\n position: relative;\n padding: 0;\n}\n\n* {\n font-family: \"Inter\", Arial, sans-serif;\n}\n\np {\n margin-top: 0;\n}\n\nh3 {\n color: #274768;\n margin-top: 0;\n}\n\n.extra {\n flex-shrink: 0;\n height: 28px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: 0 8px;\n transition: all 0.24s cubic-bezier(0.42, 0.01, 1, 0.62);\n}\n\n.extra > .info {\n color: #809AB4;\n font-size: 12px;\n width: 100%;\n height: auto;\n overflow: hidden;\n pointer-events: none;\n text-align: right;\n}\n\n.extra > .info > span {\n font-weight: 700;\n}\n\n.extra .buttons-container {\n display: flex;\n height: 100%;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-end;\n width: 0;\n transition: all 0.24s cubic-bezier(0.14, 0.69, 0.87, 0.54);\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation: slideIn 0.24s ease-in forwards;\n pointer-events: none;\n}\n\n.extra:hover .buttons-container .menu-container .btn {\n animation-delay: 0.24s;\n}\n\n.extra:hover .buttons-container .menu-container:hover .btn {\n animation-delay: 0.04s;\n}\n\n.extra.forced:hover .buttons-container .menu-container .btn {\n animation: none;\n pointer-events: all;\n}\n\n.extra.forced .buttons-container .btn {\n opacity: 1 !important;\n}\n\n.extra.forced .info {\n opacity: 0 !important;\n}\n\n.extra:hover .info {\n opacity: 0 !important;\n z-index: 0 !important;\n}\n\n.extra .buttons-container .btn {\n border: none;\n background: transparent;\n position: relative;\n top: 0;\n opacity: 0;\n cursor: pointer;\n height: 20px;\n width: 10px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 0;\n}\n\n.extra .buttons-container .menu-container:last-child .btn {\n margin-right: 0;\n}\n\n.extra .buttons-container .btn svg path {\n fill: #809AB4;\n}\n\n.extra .buttons-container .btn:hover svg path {\n fill: #274768;\n}\n\n.extra .buttons-container .menu-container .btn:hover::after {\n content: attr(data-content);\n position: absolute;\n top: -22px;\n height: 16px;\n left: 50%;\n transform: translateX(-50%);\n border-radius: 8px;\n background: #274768;\n color: white;\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n text-transform: capitalize;\n white-space: nowrap;\n padding: 0 12px;\n font-size: 12px;\n line-height: 0;\n}\n\n.extra .buttons-container .btn:focus, .extra .buttons-container .btn:focus-within {\n border: none;\n outline: none;\n}\n\n.extra .buttons-container .menu-container .btn:hover::before {\n content: \"\";\n display: block;\n border-color: #274768 transparent transparent transparent;\n border-style: solid;\n border-width: 4px;\n position: absolute;\n top: -6px;\n}\n\n@keyframes slideIn {\n 0% {\n top: 12px;\n pointer-events: none;\n }\n 100% {\n top: 0;\n opacity: 1;\n pointer-events: all;\n }\n}\n.menu-container {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.menu {\n display: block;\n position: absolute;\n top: 20px;\n right: 0;\n z-index: 2;\n background: #fff;\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n border-radius: 8px;\n padding: 8px;\n width: 220px;\n min-height: 120px;\n max-height: 320px;\n overflow-y: scroll;\n}\n\n.menu .input-container {\n background: #EDF2F7;\n border-radius: 4px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n height: 32px;\n margin-bottom: 4px;\n padding: 0 4px;\n}\n\n.menu .input-container:hover {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2);\n}\n\n.menu .input-container:focus-within {\n box-shadow: 0 0 0 3px rgba(40, 151, 255, 0.2), 0 0 0 1px #2897ff;\n}\n\n.menu .input-container input {\n background: transparent;\n border: none;\n flex-grow: 1;\n height: 100%;\n}\n\n.menu .input-container input:focus {\n background: transparent;\n border: none;\n outline: none;\n}\n\n.menu-trigger:focus .menu {\n display: block;\n}\n\n.menu-container .item {\n height: 22px;\n width: 100%;\n background: transparent;\n border-radius: 4px;\n font-size: 14px;\n color: #274768;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n box-shadow: none;\n border: none;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n\n.menu-container .item:hover {\n background: #F5F9FD;\n font-weight: 500;\n border-radius: 4px;\n}\n\nspan {\n position: relative;\n z-index: 1;\n}\n\nspan.date {\n margin-right: 1px;\n}\n\nspan.time {\n margin-left: 1px;\n}\n\nspan.measure {\n display: inline-block;\n margin-right: 1px;\n}\n\nspan.unit {\n margin-left: 1px;\n display: inline-block;\n}\n\nspan[data-content]:hover::after {\n position: absolute;\n content: attr(data-content);\n background: #274768;\n color: #FFFFFF;\n font-size: 9px;\n line-height: 12px;\n top: -12px;\n left: 0px;\n padding: 0px 2px;\n}\n\nspan[data-content]::before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1;\n opacity: 0.3;\n}\n\n.masked {\n display: none;\n}\n\n.companion {\n position: absolute;\n width: 15px;\n background-color: #00c4ff;\n color: white;\n z-index: 20;\n padding: 0;\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 0 2px 2px 0;\n}\n\n.companion:hover {\n font-weight: 700;\n background: #00a2ff;\n}\n\n*::selection {\n background-color: rgba(0, 196, 255, 0.2);\n}\n\n.suggestion-palette {\n position: absolute;\n z-index: 20;\n max-width: 380px;\n font-size: 11px;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 4px;\n border: none;\n border-radius: 8px;\n background: white;\n box-shadow: 0 1.1px 1.1px rgba(0, 0, 0, 0.022), 0 2.7px 2.7px rgba(0, 0, 0, 0.032), 0 5px 5px rgba(0, 0, 0, 0.04), 0 8.9px 8.9px rgba(0, 0, 0, 0.048), 0 16.7px 16.7px rgba(0, 0, 0, 0.058), 0 40px 40px rgba(0, 0, 0, 0.08);\n}\n\n.suggestion-palette ul {\n white-space: nowrap;\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.suggestion-palette ul li {\n padding: 0 8px;\n font-size: 11px;\n height: 20px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 4px;\n color: #274768;\n}\n.suggestion-palette ul li svg {\n height: 12px;\n width: 12px;\n border-radius: 4px;\n transform-origin: center center;\n}\n.suggestion-palette ul li svg path {\n fill: #809ab4;\n}\n\n.suggestion-palette ul li:not(:first-child) svg.tab-icn, .suggestion-palette ul li:not(.focused) svg.return-icn, .suggestion-palette ul.focused li:first-child svg.tab-icn {\n height: 0;\n width: 0;\n transform: scale(0);\n opacity: 0;\n}\n\n.suggestion-palette ul li.focused {\n background-color: #edf2f7;\n}\n\n.suggestion-palette ul li.focused svg.return-icn {\n animation: growIn 0.24s ease-in forwards;\n}\n\n@keyframes growIn {\n 0% {\n transform: scale(0.5);\n }\n 90% {\n transform: scale(1.1);\n }\n 100% {\n transform: scale(1);\n }\n}\nspan.code-count-1::after, span.code-count-1::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n}\n\nspan.code-count-2::after, span.code-count-2::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n /*background: repeating-linear-gradient(*/\n /*\t45deg,*/\n /*\tvar(--bg-code-color-1),*/\n /*\tvar(--bg-code-color-1) 10px,*/\n /*\tvar(--bg-code-color-2) 10px,*/\n /*\tvar(--bg-code-color-2) 20px*/\n /*);*/\n /* PAS STRIPES */\n background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);\n}\n\nspan.code-count-3::after, span.code-count-3::before {\n background: var(--bg-code-color-1);\n color: var(--text-code-color-1);\n /* STRIPES */\n background: repeating-linear-gradient(45deg, var(--bg-code-color-1), var(--bg-code-color-1) 10px, var(--bg-code-color-2) 10px, var(--bg-code-color-2) 20px);\n /* PAS STRIPES */\n /* background: linear-gradient(90deg, var(--bg-code-color-1) 0%, var(--bg-code-color-2) 100%);*/\n}` \n// @ts-ignore\nconst kendoCss = css`.iqr-text-field {\n position: relative;\n padding-top: 1.4em;\n display: inline-flex;\n width: 100%;\n flex-direction: column;\n justify-content: stretch;\n}\n.iqr-text-field > .iqr-label {\n z-index: 1;\n pointer-events: none;\n position: absolute;\n line-height: 1.4em;\n cursor: text;\n font-size: 14px;\n top: calc( 1.4em + 5px );\n left: 9px;\n transition: transform 0.2s ease-out, color 0.2s ease-out;\n color: #656565;\n display: flex;\n align-items: center;\n height: 28px;\n max-width: 55%;\n min-width: 0;\n}\n.iqr-text-field > .iqr-label > span {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-right: 8px;\n}\n.iqr-text-field > .iqr-input {\n flex: 1 1 auto;\n width: auto;\n}\n.iqr-text-field > .iqr-label {\n transform: translate(0, 0) scale(1);\n}\n.iqr-text-field > .iqr-label.above, .iqr-text-field.has-content > .iqr-label, .iqr-text-field:focus > .iqr-label, .iqr-text-field:focus-within > .iqr-label {\n transform: translate(-8px, -4px) translate(-1px, -1.4em) translate(0%, 0%) scale(1);\n font-weight: 500;\n height: 1.4em;\n max-width: 100%;\n}\n.iqr-text-field .iqr-input, .iqr-text-field .input-container {\n border-radius: 2px;\n padding: 4px 8px;\n width: 100%;\n box-sizing: border-box;\n border-width: 1px;\n border-style: solid;\n outline: 0;\n font: inherit;\n font-size: 14px;\n line-height: 1.4em;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n position: relative;\n -webkit-appearance: none;\n background-color: #ffffff;\n border-color: rgba(0, 0, 0, 0.08);\n color: #656565;\n box-sizing: border-box;\n}\n.iqr-text-field .iqr-input:focus, .iqr-text-field .iqr-input:focus-within, .iqr-text-field .input-container:focus, .iqr-text-field .input-container:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.iqr-text-field .iqr-input:hover, .iqr-text-field .input-container:hover {\n border-color: rgba(0, 0, 0, 0.15);\n box-shadow: none;\n}\n.iqr-text-field .iqr-input:hover:focus, .iqr-text-field .iqr-input:hover:focus-within, .iqr-text-field .input-container:hover:focus, .iqr-text-field .input-container:hover:focus-within {\n box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.06);\n}\n.iqr-text-field .iqr-input .ProseMirror, .iqr-text-field .input-container .ProseMirror {\n padding: 0;\n font-size: 14px;\n line-height: 1.4em;\n color: #656565;\n}\n.iqr-text-field .iqr-input .ProseMirror .date, .iqr-text-field .input-container .ProseMirror .date {\n padding: 1px;\n}\n.iqr-text-field .iqr-input .ProseMirror .time, .iqr-text-field .input-container .ProseMirror .time {\n padding: 1px;\n}\n.iqr-text-field .iqr-input .ProseMirror:focus .focused, .iqr-text-field .input-container .ProseMirror:focus .focused {\n background-color: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n border-color: rgba(0, 0, 0, 0.1);\n}\n.iqr-text-field .iqr-input > svg, .iqr-text-field .input-container > svg {\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input > svg path, .iqr-text-field .input-container > svg path {\n fill: #656565;\n}\n.iqr-text-field .iqr-input .extra, .iqr-text-field .input-container .extra {\n height: 20px;\n}\n.iqr-text-field .iqr-input .extra > .info, .iqr-text-field .input-container .extra > .info {\n color: #656565;\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .btn svg path, .iqr-text-field .input-container .extra .buttons-container .btn svg path {\n fill: #656565;\n opacity: 0.5;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .btn svg path:hover, .iqr-text-field .input-container .extra .buttons-container .btn svg path:hover {\n fill: #656565;\n opacity: 1;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .menu-container .btn:hover::after, .iqr-text-field .input-container .extra .buttons-container .menu-container .btn:hover::after {\n background: #656565;\n border-radius: 2px;\n}\n.iqr-text-field .iqr-input .extra .buttons-container .menu-container .btn:hover::before, .iqr-text-field .input-container .extra .buttons-container .menu-container .btn:hover::before {\n border-color: #656565 transparent transparent transparent;\n}` \n\nimport { maskPlugin } from './plugin/mask-plugin'\nimport { hasContentClassPlugin } from './plugin/has-content-class-plugin'\nimport { regexpPlugin } from './plugin/regexp-plugin'\nimport { sorted } from '../../utils/no-lodash'\nimport { datePicto, i18nPicto, ownerPicto, searchPicto, versionPicto } from './styles/paths'\nimport { languageName } from '../../utils/languages'\n\nexport { IqrTextFieldSchema } from './schema'\nexport { Suggestion } from './suggestion-palette'\n\ntype FullSchema = Schema<\n\t'doc' | 'paragraph' | 'list_item' | 'image' | 'blockquote' | 'bullet_list' | 'hard_break' | 'heading' | 'horizontal_rule' | 'ordered_list' | 'text',\n\t'strong' | 'em' | 'link'\n>\ntype DateTimeSchema = Schema<'paragraph' | 'date' | 'time' | 'text'>\n\nexport interface Meta {\n\trevision: string\n\tmodified?: number\n\tvalueDate?: number | null\n\towner?: { id: string; descr?: string } | null\n}\n\nexport interface Version {\n\trevision: string\n\tmodified?: number\n\tvalue: { [language: string]: string }\n}\n\nexport interface VersionedMeta {\n\tid: string\n\tmetas: Meta[]\n}\n\nexport interface VersionedValue {\n\tid: string\n\tversions: Version[]\n}\n\n// Extend the LitElement base class\nclass IqrTextField extends LitElement {\n\t@property() suggestionStopWords: Set<string> = new Set<string>()\n\t@property({ type: Boolean }) displayOwnerMenu = false\n\t@property({ type: Boolean }) suggestions = false\n\t@property({ type: Boolean }) links = false\n\t@property() linksProvider: (sug: { id: string; code: string; text: string; terms: string[] }) => Promise<{ href: string; title: string } | undefined> = () =>\n\t\tPromise.resolve(undefined)\n\t@property() suggestionProvider: (terms: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() ownersProvider: (terms: string[]) => Promise<Suggestion[]> = async () => []\n\t@property() codeColorProvider: (type: string, code: string) => string = () => 'XI'\n\t@property() linkColorProvider: (type: string, code: string) => string = () => 'cat1'\n\t@property() codeContentProvider: (codes: { type: string; code: string }[]) => string = (codes) => codes.map((c) => c.code).join(',')\n\t@property() schema: IqrTextFieldSchema = 'styled-text-with-codes'\n\t@property() label = ''\n\t@property() labelPosition: 'float' | 'side' | 'above' | 'hidden' = 'float'\n\t@property() placeholder = ''\n\t@property() textRegex = ''\n\n\t@property() value = ''\n\t@property() defaultLanguage = 'en'\n\t@property() owner?: string\n\n\t@property() valueProvider?: () => VersionedValue | undefined = undefined\n\t@property() metaProvider?: () => VersionedMeta | undefined = undefined\n\t@property() handleValueChanged?: (language: string, value: string) => void = undefined\n\t@property() handleMetaChanged?: (id: string, meta: Meta) => void = undefined\n\n\t@state() protected displayOwnersMenu = false\n\t@state() protected ownerInputValue = ''\n\t@state() protected availableOwners: Suggestion[] = []\n\n\t@state() protected displayLanguagesMenu = false\n\t@state() protected languageInputValue = ''\n\n\t@state() protected displayVersionsMenu = false\n\n\t@state() protected displayedLanguage = this.defaultLanguage\n\t@state() protected displayedVersion = '0'\n\n\t@state() protected availableLanguages = [this.displayedLanguage]\n\n\tprivate proseMirrorSchema?: Schema\n\tprivate parser?: MarkdownParser<FullSchema> | { parse: (value: string) => ProsemirrorNode<DateTimeSchema> }\n\tprivate serializer?: MarkdownSerializer<FullSchema>\n\n\tprivate view?: EditorView\n\tprivate container?: HTMLElement\n\tprivate readonly windowListeners: [string, () => void][] = []\n\tprivate suggestionPalette?: SuggestionPalette\n\tprivate mouseCount = 0\n\tprivate serviceId?: string = undefined\n\tprivate trToSave?: Transaction = undefined\n\n\tconstructor() {\n\t\tsuper()\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tconst cmu = this.mouseUp.bind(this)\n\t\tconst cmd = this.mouseDown.bind(this)\n\n\t\tthis.windowListeners.push(['mouseup', cmu], ['mousedown', cmd])\n\t\twindow.addEventListener('mouseup', cmu)\n\t\twindow.addEventListener('mousedown', cmd)\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.windowListeners.forEach((wl) => window.removeEventListener(wl[0], wl[1]))\n\t}\n\n\tstatic get styles() {\n\t\treturn [baseCss, kendoCss]\n\t}\n\n\t@query('#ownerSearch') _ownerSearch!: HTMLInputElement\n\trender() {\n\t\treturn html`\n\t\t\t<div id=\"root\" class=\"iqr-text-field\" data-placeholder=${this.placeholder}>\n\t\t\t\t<label class=\"iqr-label ${this.labelPosition}\"><span>${this.label}</span></label>\n\t\t\t\t<div class=\"iqr-input\">\n\t\t\t\t\t<div id=\"editor\"></div>\n\t\t\t\t\t<div id=\"extra\" class=${'extra' + (this.displayOwnersMenu ? ' forced' : '')}>\n\t\t\t\t\t\t<div class=\"info\">~${this.owner}</div>\n\t\t\t\t\t\t<div class=\"buttons-container\">\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.getMeta()?.owner}\" @click=\"${this.toggleOwnerMenu}\" class=\"btn menu-trigger author\">${ownerPicto}</button>\n\t\t\t\t\t\t\t\t${this.displayOwnersMenu\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input id=\"ownerSearch\" @input=\"${this.searchOwner}\" /></div>\n\t\t\t\t\t\t\t\t\t\t\t\t${this.availableOwners?.map((x) => html`<button @click=\"${this.handleOwnerButtonClicked(x.id)}\" id=\"${x.id}\" class=\"item\">${x.text}</button>`)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.getMeta()?.valueDate}\" class=\"btn date\">${datePicto}</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"1.0\" class=\"btn version\">${versionPicto}</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"menu-container\">\n\t\t\t\t\t\t\t\t<button data-content=\"${this.displayedLanguage}\" @click=\"${this.toggleLanguageMenu}\" class=\"btn menu-trigger language\">${i18nPicto}</button>\n\t\t\t\t\t\t\t\t${this.displayLanguagesMenu\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"menu\" class=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"input-container\">${searchPicto} <input /></div>\n\t\t\t\t\t\t\t\t\t\t\t\t${this.availableLanguages?.map((x) => html`<button id=\"${x}\" class=\"item\">${languageName(x)}</button>`)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t `\n\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n\n\ttoggleOwnerMenu() {\n\t\tthis.displayOwnersMenu = !this.displayOwnersMenu\n\t}\n\n\tsearchOwner(e: InputEvent) {\n\t\tconst text = (e.target as HTMLInputElement).value\n\t\tsetTimeout(async () => {\n\t\t\tif (this._ownerSearch.value === text) {\n\t\t\t\tif (this.ownersProvider) {\n\t\t\t\t\tconst availableOwners = await this.ownersProvider(text.split(' '))\n\t\t\t\t\tconsole.log(availableOwners)\n\t\t\t\t\tthis.availableOwners = availableOwners\n\t\t\t\t}\n\t\t\t}\n\t\t}, 300)\n\t}\n\n\thandleOwnerButtonClicked(id: string) {\n\t\tthis.handleMetaChanged && this.serviceId && this.handleMetaChanged(this.serviceId, { revision: this.displayedVersion, owner: { id } })\n\t\tthis.displayOwnersMenu = false\n\t}\n\n\ttoggleLanguageMenu() {\n\t\tthis.displayLanguagesMenu = !this.displayLanguagesMenu\n\t}\n\n\tmouseDown() {\n\t\tthis.mouseCount++\n\t}\n\n\tmouseUp() {\n\t\tthis.mouseCount = 0\n\t\tif (!this.view?.dom?.classList?.contains('ProseMirror-focused')) {\n\t\t\tthis.view?.dom?.parentElement?.querySelectorAll('.companion')?.forEach((x) => {\n\t\t\t\t;(x as HTMLElement).style.display = 'none'\n\t\t\t})\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\t// eslint-disable-next-line @typescript-eslint/no-this-alias\n\t\tconst cmp = this\n\t\tconst pms: Schema = (this.proseMirrorSchema = createSchema(\n\t\t\tthis.schema,\n\t\t\t(t, c, isC) => (isC ? this.codeColorProvider(t, c) : this.linkColorProvider(t, c)),\n\t\t\tthis.codeContentProvider,\n\t\t))\n\n\t\tthis.parser = this.makeParser(pms)\n\t\tthis.container = this.shadowRoot?.getElementById('editor') || undefined\n\n\t\tif (this.container) {\n\t\t\tconst br = pms.nodes.hard_break\n\t\t\tconst hardBreak = chainCommands(exitCode, (state, dispatch) => {\n\t\t\t\tdispatch && dispatch(state.tr.replaceSelectionWith(br.create()).scrollIntoView())\n\t\t\t\treturn true\n\t\t\t})\n\n\t\t\tconst replaceRangeWithSuggestion = async (from: number, to: number, sug: { id: string; code: string; text: string; terms: string[] }) => {\n\t\t\t\tconst link = await this.linksProvider(sug)\n\t\t\t\treturn (link && cmp.view && cmp.view.state.tr.replaceWith(from, to, pms.text(sug.text, [pms.mark('link', link)]))) || undefined\n\t\t\t}\n\n\t\t\tconst headingsKeymap = keymap(\n\t\t\t\t[1, 2, 3, 4, 5, 6].reduce((acc, idx) => {\n\t\t\t\t\treturn Object.assign(acc, { [`Mod-ctrl-${idx}`]: setBlockType(pms.nodes.heading, { level: '' + idx }) })\n\t\t\t\t}, {}),\n\t\t\t)\n\n\t\t\tconst providedValue = this.valueProvider && this.valueProvider()\n\t\t\tthis.displayedVersion = providedValue?.versions?.[0]?.revision || '0'\n\t\t\tconst displayedVersionedValue = providedValue?.versions?.[0]?.value\n\t\t\tthis.serviceId = providedValue?.id\n\n\t\t\tthis.availableLanguages = displayedVersionedValue && Object.keys(displayedVersionedValue).length ? sorted(Object.keys(displayedVersionedValue)) : this.availableLanguages\n\t\t\tif (!this.availableLanguages.includes(this.displayedLanguage)) {\n\t\t\t\tthis.displayedLanguage = this.availableLanguages[0]\n\t\t\t}\n\n\t\t\tconst parsedDoc = this.parser.parse(this.valueProvider ? displayedVersionedValue?.[this.displayedLanguage] || '' : this.value)\n\n\t\t\tthis.view = new EditorView(this.container, {\n\t\t\t\tstate: EditorState.create({\n\t\t\t\t\tdoc: parsedDoc,\n\t\t\t\t\tschema: this.proseMirrorSchema,\n\t\t\t\t\tplugins: [\n\t\t\t\t\t\tcaretFixPlugin(),\n\t\t\t\t\t\thistory(),\n\t\t\t\t\t\tthis.links\n\t\t\t\t\t\t\t? new Plugin({\n\t\t\t\t\t\t\t\t\tview(editorView) {\n\t\t\t\t\t\t\t\t\t\treturn new SelectionCompanion(editorView, () => cmp.mouseCount > 0)\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tthis.suggestions\n\t\t\t\t\t\t\t? new Plugin({\n\t\t\t\t\t\t\t\t\tview(editorView) {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette = new SuggestionPalette(\n\t\t\t\t\t\t\t\t\t\t\tpms,\n\t\t\t\t\t\t\t\t\t\t\teditorView,\n\t\t\t\t\t\t\t\t\t\t\t(terms: string[]) => cmp.suggestionProvider(terms),\n\t\t\t\t\t\t\t\t\t\t\t() => cmp.suggestionStopWords,\n\t\t\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tthis.suggestions\n\t\t\t\t\t\t\t? keymap({\n\t\t\t\t\t\t\t\t\tTab: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && this.view && cmp.suggestionPalette.focusOrInsert(this.view, replaceRangeWithSuggestion)) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tArrowUp: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && cmp.suggestionPalette.arrowUp()) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tArrowDown: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && cmp.suggestionPalette.arrowDown()) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tEnter: () => {\n\t\t\t\t\t\t\t\t\t\treturn (cmp.suggestionPalette && this.view && cmp.suggestionPalette.insert(this.view, replaceRangeWithSuggestion)) || false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\tkeymap({ 'Mod-z': undo, 'Mod-Shift-z': redo }),\n\t\t\t\t\t\tkeymap(\n\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tpms.marks.strong ? { 'Mod-b': toggleMark(pms.marks.strong) } : {},\n\t\t\t\t\t\t\t\tpms.marks.em ? { 'Mod-i': toggleMark(pms.marks.em) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-ArrowUp': joinUp } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-ArrowDown': joinDown } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Alt-Enter': hardBreak } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Shift-Enter': hardBreak } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list ? { 'Shift-ctrl-1': wrapInList(pms.nodes.ordered_list) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.bullet_list ? { 'Shift-ctrl-*': wrapInList(pms.nodes.bullet_list) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.blockquote ? { 'Shift-ctrl-w': wrapInIfNeeded(pms.nodes.blockquote) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.blockquote ? { 'Shift-ctrl-u': unwrapFrom(pms.nodes.blockquote) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Mod-ctrl-0': setBlockType(pms.nodes.paragraph) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.paragraph ? { 'Shift-ctrl-0': setBlockType(pms.nodes.paragraph) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.list_item ? { Enter: splitListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-(': liftListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-[': liftListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-)': sinkListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t\tpms.nodes.ordered_list || pms.nodes.bullet_list ? { 'Mod-]': sinkListItem(pms.nodes.list_item) } : {},\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpms.nodes.heading ? headingsKeymap : null,\n\t\t\t\t\t\tmaskPlugin(),\n\t\t\t\t\t\tregexpPlugin(),\n\t\t\t\t\t\thasContentClassPlugin(this.shadowRoot || undefined),\n\t\t\t\t\t\tkeymap(baseKeymap),\n\t\t\t\t\t]\n\t\t\t\t\t\t.filter((x) => !!x)\n\t\t\t\t\t\t.map((x) => x as Plugin),\n\t\t\t\t}),\n\t\t\t\tdispatchTransaction: (tr) => {\n\t\t\t\t\tthis.view && this.view.updateState(this.view.state.apply(tr))\n\t\t\t\t\t//current state as json in text area\n\t\t\t\t\t//this.view && console.log(JSON.stringify(this.view.state.doc.toJSON(), null, 2));\n\t\t\t\t\tif (this.view && tr.doc != tr.before && this.handleValueChanged) {\n\t\t\t\t\t\tthis.trToSave = tr\n\t\t\t\t\t\tsetTimeout(() => this.trToSave === tr && this.handleValueChanged?.(this.displayedLanguage, this.serializer?.serialize(tr.doc) ?? tr.doc.textContent), 800)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate makeParser(pms: Schema) {\n\t\tconst tokenizer = MarkdownIt('commonmark', { html: false })\n\t\treturn this.schema === 'date'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => pms.node('paragraph', {}, [pms.node('date', {}, value ? [pms.text(value)] : [])]),\n\t\t\t }\n\t\t\t: this.schema === 'time'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => pms.node('paragraph', {}, [pms.node('time', {}, value ? [pms.text(value)] : [])]),\n\t\t\t }\n\t\t\t: this.schema === 'measure'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => {\n\t\t\t\t\t\tconst decimal = value ? value.split(' ')[0] : ''\n\t\t\t\t\t\tconst unit = value ? value.split(' ')[1] : ''\n\n\t\t\t\t\t\treturn pms.node('paragraph', {}, [\n\t\t\t\t\t\t\tpms.node('decimal', {}, decimal && decimal.length ? [pms.text(decimal)] : [pms.text(' ')]),\n\t\t\t\t\t\t\tpms.node('unit', {}, unit && unit.length ? [pms.text(unit)] : [pms.text(' ')]),\n\t\t\t\t\t\t])\n\t\t\t\t\t},\n\t\t\t }\n\t\t\t: this.schema === 'date-time'\n\t\t\t? {\n\t\t\t\t\tparse: (value: string) => {\n\t\t\t\t\t\tconst date = value ? value.split(' ')[0] : ''\n\t\t\t\t\t\tconst time = value ? value.split(' ')[1] : ''\n\n\t\t\t\t\t\treturn pms.node('paragraph', {}, [\n\t\t\t\t\t\t\tpms.node('date', {}, date && date.length ? [pms.text(date)] : [pms.text(' ')]),\n\t\t\t\t\t\t\tpms.node('time', {}, time && time.length ? [pms.text(time)] : [pms.text(' ')]),\n\t\t\t\t\t\t])\n\t\t\t\t\t},\n\t\t\t }\n\t\t\t: this.schema === 'text-document'\n\t\t\t? new MarkdownParser(pms, MarkdownIt('commonmark', { html: false }), {\n\t\t\t\t\tblockquote: { block: 'blockquote' },\n\t\t\t\t\tparagraph: { block: 'paragraph' },\n\t\t\t\t\tlist_item: { block: 'list_item' },\n\t\t\t\t\tbullet_list: { block: 'bullet_list' },\n\t\t\t\t\tordered_list: { block: 'ordered_list', getAttrs: (tok) => ({ order: +(tok.attrGet('start') || 1) }) },\n\t\t\t\t\theading: { block: 'heading', getAttrs: (tok) => ({ level: +tok.tag.slice(1) }) },\n\t\t\t\t\thr: { node: 'horizontal_rule' },\n\t\t\t\t\timage: {\n\t\t\t\t\t\tnode: 'image',\n\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\tsrc: tok.attrGet('src'),\n\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\talt: (tok.children || [])[0]?.content || null,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\thardBreak: { node: 'hard_break' },\n\n\t\t\t\t\tem: hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },\n\t\t\t\t\tstrong: hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },\n\t\t\t\t\tlink: hasMark(pms.spec.marks, 'link')\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tmark: 'link',\n\t\t\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\t\t\thref: tok.attrGet('href'),\n\t\t\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: { ignore: true },\n\t\t\t })\n\t\t\t: new MarkdownParser(\n\t\t\t\t\tpms,\n\t\t\t\t\t{\n\t\t\t\t\t\tparse: (src: string, env: unknown): unknown[] => {\n\t\t\t\t\t\t\treturn tokenizer.parse(src, env).filter((t) => !t.type.startsWith('paragraph_'))\n\t\t\t\t\t\t},\n\t\t\t\t\t} as MarkdownIt,\n\t\t\t\t\t{\n\t\t\t\t\t\tem: hasMark(pms.spec.marks, 'em') ? { mark: 'em' } : { ignore: true },\n\t\t\t\t\t\tstrong: hasMark(pms.spec.marks, 'strong') ? { mark: 'strong' } : { ignore: true },\n\t\t\t\t\t\tlink: hasMark(pms.spec.marks, 'link')\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tmark: 'link',\n\t\t\t\t\t\t\t\t\tgetAttrs: (tok) => ({\n\t\t\t\t\t\t\t\t\t\thref: tok.attrGet('href'),\n\t\t\t\t\t\t\t\t\t\ttitle: tok.attrGet('title') || null,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: { ignore: true },\n\t\t\t\t\t},\n\t\t\t )\n\t}\n\n\tprivate getMeta(): Meta | undefined {\n\t\treturn (this.metaProvider && this.metaProvider()?.metas?.find((vm) => vm.revision === this.displayedVersion)) || undefined\n\t}\n}\n\n// Register the new element with the browser.\ncustomElements.define('iqr-text-field', IqrTextField)\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/form",
3
- "version": "1.0.17",
3
+ "version": "1.1.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": null,