@limetech/lime-elements 37.61.4 → 37.61.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +8 -2
  3. package/dist/cjs/limel-progress-flow-item.cjs.entry.js.map +1 -1
  4. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +33 -6
  5. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-text-editor.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-text-editor.cjs.entry.js.map +1 -1
  8. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +14 -16
  9. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js +7 -1
  10. package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js.map +1 -1
  11. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +31 -7
  12. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
  13. package/dist/collection/components/text-editor/text-editor.js +1 -1
  14. package/dist/collection/components/text-editor/text-editor.js.map +1 -1
  15. package/dist/collection/test-assets/icons/lock.svg +6 -0
  16. package/dist/esm/limel-progress-flow-item.entry.js +8 -2
  17. package/dist/esm/limel-progress-flow-item.entry.js.map +1 -1
  18. package/dist/esm/limel-prosemirror-adapter.entry.js +33 -6
  19. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  20. package/dist/esm/limel-text-editor.entry.js +1 -1
  21. package/dist/esm/limel-text-editor.entry.js.map +1 -1
  22. package/dist/lime-elements/lime-elements.esm.js +1 -1
  23. package/dist/lime-elements/{p-81c918c4.entry.js → p-595fdf97.entry.js} +2 -2
  24. package/dist/lime-elements/{p-81c918c4.entry.js.map → p-595fdf97.entry.js.map} +1 -1
  25. package/dist/lime-elements/p-97571329.entry.js +2 -0
  26. package/dist/lime-elements/p-97571329.entry.js.map +1 -0
  27. package/dist/lime-elements/p-ccc605fe.entry.js +2 -0
  28. package/dist/lime-elements/p-ccc605fe.entry.js.map +1 -0
  29. package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +4 -0
  30. package/package.json +2 -2
  31. package/dist/lime-elements/p-bc63c12e.entry.js +0 -2
  32. package/dist/lime-elements/p-bc63c12e.entry.js.map +0 -1
  33. package/dist/lime-elements/p-df684b38.entry.js +0 -2
  34. package/dist/lime-elements/p-df684b38.entry.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [37.61.6](https://github.com/Lundalogik/lime-elements/compare/v37.61.5...v37.61.6) (2024-09-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **progress-flow:** increase lock icon visibility ([7d4d08b](https://github.com/Lundalogik/lime-elements/commit/7d4d08bdaefb12f9373b4d88143798147eacb5f6))
8
+
9
+ ## [37.61.5](https://github.com/Lundalogik/lime-elements/compare/v37.61.4...v37.61.5) (2024-09-20)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+
15
+ * **text-editor:** correct change handler function signature ([62595d6](https://github.com/Lundalogik/lime-elements/commit/62595d6beba6e970de94df33d589f7196ad29cb6))
16
+ * **text-editor:** do not emit change events unless the value has actually changed ([4d0efc5](https://github.com/Lundalogik/lime-elements/commit/4d0efc5d728824c0b1aff53a15482ff4291985b3))
17
+ * **text-editor:** handle change better to keep value in sync ([6649350](https://github.com/Lundalogik/lime-elements/commit/66493508b357a0d3e10676c94d9c19b6a798e722)), closes [Lundalogik/crm-feature#4312](https://github.com/Lundalogik/crm-feature/issues/4312)
18
+
1
19
  ## [37.61.4](https://github.com/Lundalogik/lime-elements/compare/v37.61.3...v37.61.4) (2024-09-20)
2
20
 
3
21
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-d1052409.js');
6
6
  const getIconProps = require('./get-icon-props-50be7440.js');
7
7
 
8
- const progressFlowItemCss = "@charset \"UTF-8\";.flow-item{--step-background:var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );--step-background--selected:var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );--step-background--passed:var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );--step-text:var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );--step-text--selected:var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );--step-text--passed:var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );--step-divider-color:var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );position:relative;width:100%;display:flex;flex-direction:column;align-items:stretch}.flow-item:not(.off-progress-item,.last) .divider:after{content:\"\"}.flow-item.off-progress-item{padding-left:0.5rem}.flow-item.first-off-progress-item{padding-left:1rem}.step{transition:background-color 0.2s ease, box-shadow 0.2s ease;display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:var(--step-height);border:none;font-size:0.875rem}.step.disabled{cursor:not-allowed}.step.disabled.readonly{opacity:1;cursor:default}.step:focus{outline:none}.step:focus-visible{box-shadow:var(--shadow-depth-8-focused)}.flow-item:not(.off-progress-item,.first) .step{padding-left:calc(var(--step-height) / 2)}.flow-item:not(.selected) .step:not(.disabled){cursor:pointer}.flow-item:not(.selected) .step:not(.disabled):hover{box-shadow:var(--button-shadow-normal)}.flow-item:not(.selected) .step:not(.disabled):active{box-shadow:var(--button-shadow-pressed)}.off-progress-item .step{border-radius:0.25rem;padding:0 0.75rem}.off-progress-item .step .icon{margin-left:0}.flow-item.first .step{border-top-left-radius:var(--step-height);border-bottom-left-radius:var(--step-height);padding-left:1.25rem}.flow-item.last .step{border-top-right-radius:var(--step-height);border-bottom-right-radius:var(--step-height);padding-right:1.25rem}.divider{display:flex;align-items:center;justify-content:center;width:var(--step-height);height:var(--step-height);position:absolute;z-index:1;right:calc(var(--step-height) / 2 * -1);overflow:hidden}.divider:after{position:absolute;display:block;box-sizing:border-box;transition:background-color 0.2s ease;width:100%;height:100%;right:calc(var(--step-height) / 5);transform:rotate(45deg);border-style:solid;border-width:0.125rem 0.125rem 0 0;border-radius:0 0.5rem 0 0;border-color:var(--step-divider-color)}.flow-item.last .divider{width:0}.text,.secondary-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:var(--max-text-width);z-index:2}.secondary-text{font-size:0.75rem;margin:auto;padding-left:calc(var(--step-height) / 2)}.icon{margin:0 0.5rem 0 0.25rem;z-index:2}.step:before,.step:after{pointer-events:none;box-sizing:border-box;z-index:2;position:absolute;right:var(--selected-indicator-right);border-radius:50%}.last .step:before,.last .step:after{right:0.5rem}.flow-item:not(.off-progress-item) .step.selected:before,.flow-item:not(.off-progress-item) .step.selected:after{content:\"\";width:0.375rem;height:0.375rem}.flow-item:not(.off-progress-item) .step.selected:before{background-color:var(--step-divider-color);opacity:0.7}.flow-item:not(.off-progress-item) .step.disabled:before,.flow-item:not(.off-progress-item) .step.disabled:after{width:0.75rem;height:0.75rem}.flow-item:not(.off-progress-item) .step.disabled:after{content:\"\";background-image:url(\"data:image/svg+xml;charset=utf-8, <svg viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg' xml:space='preserve' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2'><path fill='rgb(127,127,127)' d='M32.18 13.711c0-2.207-1.793-4-4.002-4H11.821c-2.208 0-4 1.793-4 4V28.29a4 4 0 0 0 4 4h16.357a4.002 4.002 0 0 0 4.001-4V13.711Z'/><path fill='rgb(127,127,127)' d='M11.211 9.758V7.673A7.489 7.489 0 0 1 18.696.188h2.608a7.489 7.489 0 0 1 7.485 7.485v2.085h-3V7.673a4.488 4.488 0 0 0-4.485-4.485h-2.608a4.488 4.488 0 0 0-4.485 4.485v2.085h-3Z'/></svg>\");background-size:90%;background-repeat:no-repeat;background-position:center;mix-blend-mode:multiply}.step{color:var(--step-text);background-color:var(--step-background)}.step .icon{color:var(--progress-flow-icon-color--inactive, var(--step-text))}.flow-item.selected .step{color:var(--step-text--selected);background-color:var(--step-background--selected)}.flow-item.selected .step .divider:after{background-color:var(--step-background--selected)}.flow-item.selected .step .icon{color:var(--step-text--selected)}.flow-item.passed .step{color:var(--step-text--passed);background-color:var(--step-background--passed)}.flow-item.passed .step .divider:after{background-color:var(--step-background--passed)}.flow-item.passed .step .icon{color:var(--step-text--passed)}.divider:after{border-color:var(--step-divider-color);background-color:var(--step-background)}";
8
+ const progressFlowItemCss = "@charset \"UTF-8\";.flow-item{--step-background:var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );--step-background--selected:var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );--step-background--passed:var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );--step-text:var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );--step-text--selected:var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );--step-text--passed:var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );--step-divider-color:var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );position:relative;width:100%;display:flex;flex-direction:column;align-items:stretch}.flow-item:not(.off-progress-item,.last) .divider:after{content:\"\"}.flow-item.off-progress-item{padding-left:0.5rem}.flow-item.first-off-progress-item{padding-left:1rem}.step{transition:background-color 0.2s ease, box-shadow 0.2s ease;display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:var(--step-height);border:none;font-size:0.875rem}.step.disabled{cursor:not-allowed}.step.disabled.readonly{opacity:1;cursor:default}.step:focus{outline:none}.step:focus-visible{box-shadow:var(--shadow-depth-8-focused)}.flow-item:not(.off-progress-item,.first) .step{padding-left:calc(var(--step-height) / 2)}.flow-item:not(.selected) .step:not(.disabled){cursor:pointer}.flow-item:not(.selected) .step:not(.disabled):hover{box-shadow:var(--button-shadow-normal)}.flow-item:not(.selected) .step:not(.disabled):active{box-shadow:var(--button-shadow-pressed)}.off-progress-item .step{border-radius:0.25rem;padding:0 0.75rem}.off-progress-item .step .icon{margin-left:0}.flow-item.first .step{border-top-left-radius:var(--step-height);border-bottom-left-radius:var(--step-height);padding-left:1.25rem}.flow-item.last .step{border-top-right-radius:var(--step-height);border-bottom-right-radius:var(--step-height);padding-right:1.25rem}.divider{display:flex;align-items:center;justify-content:center;width:var(--step-height);height:var(--step-height);position:absolute;z-index:1;right:calc(var(--step-height) / 2 * -1);overflow:hidden}.divider:after{position:absolute;display:block;box-sizing:border-box;transition:background-color 0.2s ease;width:100%;height:100%;right:calc(var(--step-height) / 5);transform:rotate(45deg);border-style:solid;border-width:0.125rem 0.125rem 0 0;border-radius:0 0.5rem 0 0;border-color:var(--step-divider-color)}.flow-item.last .divider{width:0}.text,.secondary-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:var(--max-text-width);z-index:2}.secondary-text{font-size:0.75rem;margin:auto;padding-left:calc(var(--step-height) / 2)}.icon{margin:0 0.5rem 0 0.25rem;z-index:2}.step:before,.step .lock-icon{pointer-events:none;box-sizing:border-box;z-index:2}.step::before{position:absolute;right:var(--selected-indicator-right);border-radius:50%}.last .step:before,.last .step .lock-icon{right:0.5rem}.flow-item:not(.off-progress-item) .step.selected:before{content:\"\";width:0.375rem;height:0.375rem;background-color:rgb(var(--contrast-700));opacity:0.7}.lock-icon{margin-left:0.25rem;margin-right:-0.5rem;width:0.75rem;color:currentColor;scale:0.8}.step{color:var(--step-text);background-color:var(--step-background)}.step .icon{color:var(--progress-flow-icon-color--inactive, var(--step-text))}.flow-item.selected .step{color:var(--step-text--selected);background-color:var(--step-background--selected)}.flow-item.selected .step .divider:after{background-color:var(--step-background--selected)}.flow-item.selected .step .icon{color:var(--step-text--selected)}.flow-item.passed .step{color:var(--step-text--passed);background-color:var(--step-background--passed)}.flow-item.passed .step .divider:after{background-color:var(--step-background--passed)}.flow-item.passed .step .icon{color:var(--step-text--passed)}.divider:after{border-color:var(--step-divider-color);background-color:var(--step-background)}";
9
9
 
10
10
  const ProgressFlowItem = class {
11
11
  constructor(hostRef) {
@@ -30,7 +30,7 @@ const ProgressFlowItem = class {
30
30
  selected: (_a = this.item) === null || _a === void 0 ? void 0 : _a.selected,
31
31
  disabled: this.isDisabled(),
32
32
  readonly: this.readonly,
33
- }, onClick: this.handleClick, disabled: this.isDisabled(), "aria-current": this.currentStep ? 'step' : null }, this.renderIcon(), index.h("span", { class: "text" }, this.item.text), this.renderDivider()),
33
+ }, onClick: this.handleClick, disabled: this.isDisabled(), "aria-current": this.currentStep ? 'step' : null }, this.renderIcon(), index.h("span", { class: "text" }, this.item.text), this.renderDivider(), this.renderLockIcon()),
34
34
  this.renderSecondaryText(),
35
35
  ];
36
36
  }
@@ -64,6 +64,12 @@ const ProgressFlowItem = class {
64
64
  }
65
65
  return index.h("div", { class: "divider" });
66
66
  }
67
+ renderLockIcon() {
68
+ if (!this.isDisabled()) {
69
+ return;
70
+ }
71
+ return index.h("limel-icon", { name: "lock", class: "lock-icon" });
72
+ }
67
73
  get element() { return index.getElement(this); }
68
74
  };
69
75
  ProgressFlowItem.style = progressFlowItemCss;
@@ -1 +1 @@
1
- {"file":"limel-progress-flow-item.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,i/JAAi/J;;MCmBhgK,gBAAgB;;;;IA0EjB,gBAAW,GAAG;MAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACxB,CAAC;gBApEsB,IAAI;oBAMV,KAAK;oBAML,KAAK;uBAMO,KAAK;;EAQ5B,MAAM;;IACT,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACZ,OAAO;KACV;IAED,OAAO;MACHA,oBACI,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,EAC5B,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;UACH,IAAI,EAAE,IAAI;UACV,QAAQ,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ;UAC7B,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;UAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,kBACb,IAAI,CAAC,WAAW,GAAG,MAAM,GAAG,IAAI,IAE7C,IAAI,CAAC,UAAU,EAAE,EAClBA,kBAAM,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAQ,EACzC,IAAI,CAAC,aAAa,EAAE,CAChB;MACT,IAAI,CAAC,mBAAmB,EAAE;KAC7B,CAAC;GACL;EAEO,UAAU;;IACd,OAAO,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,KAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;GAChE;EAEO,cAAc;IAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;MAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;KACzB;IAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAChE;EAMO,mBAAmB;;IACvB,IAAI,EAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,aAAa,CAAA,EAAE;MAC3B,OAAO;KACV;IAED,OAAOA,iBAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAO,CAAC;GACtE;EAEO,UAAU;IACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACjB,OAAO;KACV;IAED,MAAM,IAAI,GAAGC,wBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAOD,wBAAY,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,MAAM,GAAG,CAAC;GAC/D;EAEO,aAAa;IACjB,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;MACzB,OAAO;KACV;IAED,OAAOA,iBAAK,KAAK,EAAC,SAAS,GAAG,CAAC;GAClC;;;;;;;","names":["h","getIconName"],"sources":["./src/components/progress-flow/progress-flow-item/progress-flow-item.scss?tag=limel-progress-flow-item","./src/components/progress-flow/progress-flow-item/progress-flow-item.tsx"],"sourcesContent":["@use '../../../style/mixins';\n@use '../../../style/functions';\n@use '../../../style/internal/variables';\n\n$limel-progress-flow-step-content: 2;\n$limel-progress-flow-divider: 1;\n\n.flow-item {\n --step-background: var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );\n --step-background--selected: var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );\n --step-background--passed: var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );\n\n --step-text: var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );\n --step-text--selected: var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );\n --step-text--passed: var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );\n\n --step-divider-color: var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );\n\n position: relative;\n width: 100%;\n\n display: flex;\n flex-direction: column;\n align-items: stretch;\n\n &:not(.off-progress-item, .last) {\n .divider {\n &:after {\n content: '';\n }\n }\n }\n\n &.off-progress-item {\n padding-left: functions.pxToRem(8);\n }\n\n &.first-off-progress-item {\n padding-left: functions.pxToRem(16);\n }\n}\n\n.step {\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: var(--step-height);\n border: none;\n font-size: functions.pxToRem(14);\n\n &.disabled {\n cursor: not-allowed;\n\n &.readonly {\n opacity: 1;\n cursor: default;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n box-shadow: var(--shadow-depth-8-focused);\n }\n\n .flow-item:not(.off-progress-item, .first) & {\n padding-left: calc(var(--step-height) / 2);\n }\n\n .flow-item:not(.selected) & {\n &:not(.disabled) {\n cursor: pointer;\n &:hover {\n box-shadow: var(--button-shadow-normal);\n }\n &:active {\n box-shadow: var(--button-shadow-pressed);\n }\n }\n }\n\n .off-progress-item & {\n border-radius: functions.pxToRem(4);\n padding: 0 functions.pxToRem(12);\n\n .icon {\n margin-left: 0;\n }\n }\n .flow-item.first & {\n border-top-left-radius: var(--step-height);\n border-bottom-left-radius: var(--step-height);\n padding-left: functions.pxToRem(20);\n }\n .flow-item.last & {\n border-top-right-radius: var(--step-height);\n border-bottom-right-radius: var(--step-height);\n padding-right: functions.pxToRem(20);\n }\n}\n\n.divider {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--step-height);\n height: var(--step-height);\n\n position: absolute;\n z-index: $limel-progress-flow-divider;\n right: calc(var(--step-height) / 2 * -1);\n overflow: hidden;\n\n &:after {\n position: absolute;\n display: block;\n\n box-sizing: border-box;\n transition: background-color 0.2s ease;\n\n width: 100%;\n height: 100%;\n right: calc(var(--step-height) / 5);\n transform: rotate(45deg);\n border: {\n style: solid;\n width: functions.pxToRem(2) functions.pxToRem(2) 0 0;\n radius: 0 functions.pxToRem(8) 0 0;\n color: var(--step-divider-color);\n }\n }\n .flow-item.last & {\n width: 0;\n }\n}\n\n.text,\n.secondary-text {\n @include mixins.truncate-text();\n max-width: var(--max-text-width);\n z-index: $limel-progress-flow-step-content;\n}\n\n.secondary-text {\n font-size: functions.pxToRem(12);\n margin: auto;\n padding-left: calc(var(--step-height) / 2);\n}\n\n.icon {\n margin: 0 functions.pxToRem(8) 0 functions.pxToRem(4);\n z-index: $limel-progress-flow-step-content;\n}\n\n@import './partial-styles/_selected-indicator';\n@import './partial-styles/_colors';\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { FlowItem } from '../progress-flow.types';\nimport { getIconName } from '../../icon/get-icon-props';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-progress-flow-item',\n shadow: false,\n styleUrl: 'progress-flow-item.scss',\n})\nexport class ProgressFlowItem {\n @Element()\n public element: HTMLLimelProgressFlowItemElement;\n\n /**\n * The flow item that should be rendered\n */\n @Prop()\n public item: FlowItem = null;\n\n /**\n * True if the flow item should be disabled\n */\n @Prop()\n public disabled = false;\n\n /**\n * True if the flow item should be readonly\n */\n @Prop()\n public readonly = false;\n\n /**\n * True for current step\n */\n @Prop()\n public currentStep: boolean = false;\n\n /**\n * Fired when clicking on the flow item\n */\n @Event()\n public interact: EventEmitter<void>;\n\n public render() {\n if (!this.item) {\n return;\n }\n\n return [\n <button\n tabindex=\"0\"\n title={this.getToolTipText()}\n type=\"button\"\n class={{\n step: true,\n selected: this.item?.selected,\n disabled: this.isDisabled(),\n readonly: this.readonly,\n }}\n onClick={this.handleClick}\n disabled={this.isDisabled()}\n aria-current={this.currentStep ? 'step' : null}\n >\n {this.renderIcon()}\n <span class=\"text\">{this.item.text}</span>\n {this.renderDivider()}\n </button>,\n this.renderSecondaryText(),\n ];\n }\n\n private isDisabled() {\n return this.item?.disabled || this.readonly || this.disabled;\n }\n\n private getToolTipText() {\n if (!this.item.secondaryText) {\n return this.item.text;\n }\n\n return [this.item.text, this.item.secondaryText].join(' · ');\n }\n\n private handleClick = () => {\n this.interact.emit();\n };\n\n private renderSecondaryText() {\n if (!this.item?.secondaryText) {\n return;\n }\n\n return <div class=\"secondary-text\">{this.item.secondaryText}</div>;\n }\n\n private renderIcon() {\n if (!this.item.icon) {\n return;\n }\n\n const name = getIconName(this.item.icon);\n\n return <limel-icon name={name} size=\"small\" class=\"icon\" />;\n }\n\n private renderDivider() {\n if (this.item.isOffProgress) {\n return;\n }\n\n return <div class=\"divider\" />;\n }\n}\n"],"version":3}
1
+ {"file":"limel-progress-flow-item.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,mBAAmB,GAAG,gmIAAgmI;;MCmB/mI,gBAAgB;;;;IA2EjB,gBAAW,GAAG;MAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;KACxB,CAAC;gBArEsB,IAAI;oBAMV,KAAK;oBAML,KAAK;uBAMO,KAAK;;EAQ5B,MAAM;;IACT,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACZ,OAAO;KACV;IAED,OAAO;MACHA,oBACI,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,EAC5B,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;UACH,IAAI,EAAE,IAAI;UACV,QAAQ,EAAE,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ;UAC7B,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;UAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,EACD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE,kBACb,IAAI,CAAC,WAAW,GAAG,MAAM,GAAG,IAAI,IAE7C,IAAI,CAAC,UAAU,EAAE,EAClBA,kBAAM,KAAK,EAAC,MAAM,IAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAQ,EACzC,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,cAAc,EAAE,CACjB;MACT,IAAI,CAAC,mBAAmB,EAAE;KAC7B,CAAC;GACL;EAEO,UAAU;;IACd,OAAO,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,KAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;GAChE;EAEO,cAAc;IAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;MAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;KACzB;IAED,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;GAChE;EAMO,mBAAmB;;IACvB,IAAI,EAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,aAAa,CAAA,EAAE;MAC3B,OAAO;KACV;IAED,OAAOA,iBAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAO,CAAC;GACtE;EAEO,UAAU;IACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACjB,OAAO;KACV;IAED,MAAM,IAAI,GAAGC,wBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,OAAOD,wBAAY,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,MAAM,GAAG,CAAC;GAC/D;EAEO,aAAa;IACjB,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;MACzB,OAAO;KACV;IAED,OAAOA,iBAAK,KAAK,EAAC,SAAS,GAAG,CAAC;GAClC;EAEO,cAAc;IAClB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;MACpB,OAAO;KACV;IAED,OAAOA,wBAAY,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,WAAW,GAAG,CAAC;GACvD;;;;;;;","names":["h","getIconName"],"sources":["./src/components/progress-flow/progress-flow-item/progress-flow-item.scss?tag=limel-progress-flow-item","./src/components/progress-flow/progress-flow-item/progress-flow-item.tsx"],"sourcesContent":["@use '../../../style/mixins';\n@use '../../../style/functions';\n@use '../../../style/internal/variables';\n\n$limel-progress-flow-step-content: 2;\n$limel-progress-flow-divider: 1;\n\n.flow-item {\n --step-background: var(\n --progress-flow-step-background-color,\n rgb(var(--contrast-600))\n );\n --step-background--selected: var(\n --progress-flow-step-background-color--selected,\n var(--mdc-theme-primary)\n );\n --step-background--passed: var(\n --progress-flow-step-background-color--passed,\n var(--step-background--selected)\n );\n\n --step-text: var(\n --progress-flow-step-text-color,\n rgb(var(--contrast-1200))\n );\n --step-text--selected: var(\n --progress-flow-step-text-color--selected,\n var(--mdc-theme-on-primary)\n );\n --step-text--passed: var(\n --progress-flow-step-text-color--passed,\n var(--step-text--selected)\n );\n\n --step-divider-color: var(\n --progress-flow-step-divider-color,\n rgb(var(--contrast-100))\n );\n\n position: relative;\n width: 100%;\n\n display: flex;\n flex-direction: column;\n align-items: stretch;\n\n &:not(.off-progress-item, .last) {\n .divider {\n &:after {\n content: '';\n }\n }\n }\n\n &.off-progress-item {\n padding-left: functions.pxToRem(8);\n }\n\n &.first-off-progress-item {\n padding-left: functions.pxToRem(16);\n }\n}\n\n.step {\n transition:\n background-color 0.2s ease,\n box-shadow 0.2s ease;\n\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n width: 100%;\n height: var(--step-height);\n border: none;\n font-size: functions.pxToRem(14);\n\n &.disabled {\n cursor: not-allowed;\n\n &.readonly {\n opacity: 1;\n cursor: default;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n box-shadow: var(--shadow-depth-8-focused);\n }\n\n .flow-item:not(.off-progress-item, .first) & {\n padding-left: calc(var(--step-height) / 2);\n }\n\n .flow-item:not(.selected) & {\n &:not(.disabled) {\n cursor: pointer;\n &:hover {\n box-shadow: var(--button-shadow-normal);\n }\n &:active {\n box-shadow: var(--button-shadow-pressed);\n }\n }\n }\n\n .off-progress-item & {\n border-radius: functions.pxToRem(4);\n padding: 0 functions.pxToRem(12);\n\n .icon {\n margin-left: 0;\n }\n }\n .flow-item.first & {\n border-top-left-radius: var(--step-height);\n border-bottom-left-radius: var(--step-height);\n padding-left: functions.pxToRem(20);\n }\n .flow-item.last & {\n border-top-right-radius: var(--step-height);\n border-bottom-right-radius: var(--step-height);\n padding-right: functions.pxToRem(20);\n }\n}\n\n.divider {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--step-height);\n height: var(--step-height);\n\n position: absolute;\n z-index: $limel-progress-flow-divider;\n right: calc(var(--step-height) / 2 * -1);\n overflow: hidden;\n\n &:after {\n position: absolute;\n display: block;\n\n box-sizing: border-box;\n transition: background-color 0.2s ease;\n\n width: 100%;\n height: 100%;\n right: calc(var(--step-height) / 5);\n transform: rotate(45deg);\n border: {\n style: solid;\n width: functions.pxToRem(2) functions.pxToRem(2) 0 0;\n radius: 0 functions.pxToRem(8) 0 0;\n color: var(--step-divider-color);\n }\n }\n .flow-item.last & {\n width: 0;\n }\n}\n\n.text,\n.secondary-text {\n @include mixins.truncate-text();\n max-width: var(--max-text-width);\n z-index: $limel-progress-flow-step-content;\n}\n\n.secondary-text {\n font-size: functions.pxToRem(12);\n margin: auto;\n padding-left: calc(var(--step-height) / 2);\n}\n\n.icon {\n margin: 0 functions.pxToRem(8) 0 functions.pxToRem(4);\n z-index: $limel-progress-flow-step-content;\n}\n\n@import './partial-styles/_selected-indicator';\n@import './partial-styles/_colors';\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { FlowItem } from '../progress-flow.types';\nimport { getIconName } from '../../icon/get-icon-props';\n\n/**\n * @private\n */\n@Component({\n tag: 'limel-progress-flow-item',\n shadow: false,\n styleUrl: 'progress-flow-item.scss',\n})\nexport class ProgressFlowItem {\n @Element()\n public element: HTMLLimelProgressFlowItemElement;\n\n /**\n * The flow item that should be rendered\n */\n @Prop()\n public item: FlowItem = null;\n\n /**\n * True if the flow item should be disabled\n */\n @Prop()\n public disabled = false;\n\n /**\n * True if the flow item should be readonly\n */\n @Prop()\n public readonly = false;\n\n /**\n * True for current step\n */\n @Prop()\n public currentStep: boolean = false;\n\n /**\n * Fired when clicking on the flow item\n */\n @Event()\n public interact: EventEmitter<void>;\n\n public render() {\n if (!this.item) {\n return;\n }\n\n return [\n <button\n tabindex=\"0\"\n title={this.getToolTipText()}\n type=\"button\"\n class={{\n step: true,\n selected: this.item?.selected,\n disabled: this.isDisabled(),\n readonly: this.readonly,\n }}\n onClick={this.handleClick}\n disabled={this.isDisabled()}\n aria-current={this.currentStep ? 'step' : null}\n >\n {this.renderIcon()}\n <span class=\"text\">{this.item.text}</span>\n {this.renderDivider()}\n {this.renderLockIcon()}\n </button>,\n this.renderSecondaryText(),\n ];\n }\n\n private isDisabled() {\n return this.item?.disabled || this.readonly || this.disabled;\n }\n\n private getToolTipText() {\n if (!this.item.secondaryText) {\n return this.item.text;\n }\n\n return [this.item.text, this.item.secondaryText].join(' · ');\n }\n\n private handleClick = () => {\n this.interact.emit();\n };\n\n private renderSecondaryText() {\n if (!this.item?.secondaryText) {\n return;\n }\n\n return <div class=\"secondary-text\">{this.item.secondaryText}</div>;\n }\n\n private renderIcon() {\n if (!this.item.icon) {\n return;\n }\n\n const name = getIconName(this.item.icon);\n\n return <limel-icon name={name} size=\"small\" class=\"icon\" />;\n }\n\n private renderDivider() {\n if (this.item.isOffProgress) {\n return;\n }\n\n return <div class=\"divider\" />;\n }\n\n private renderLockIcon() {\n if (!this.isDisabled()) {\n return;\n }\n\n return <limel-icon name=\"lock\" class=\"lock-icon\" />;\n }\n}\n"],"version":3}
@@ -14,11 +14,14 @@ const translations = require('./translations-e12a6869.js');
14
14
  const randomString = require('./random-string-c8445652.js');
15
15
  const isItem = require('./isItem-3f8ad629.js');
16
16
  const isEqual = require('./isEqual-b136e579.js');
17
+ const debounce = require('./debounce-2e5f4b7e.js');
17
18
  require('./eq-9a943b00.js');
18
19
  require('./_getNative-60328036.js');
19
20
  require('./isArrayLike-ac53bdac.js');
20
21
  require('./_defineProperty-8f56146d.js');
21
22
  require('./_commonjsHelpers-0c557e26.js');
23
+ require('./toNumber-062ea29c.js');
24
+ require('./isSymbol-d22b2798.js');
22
25
 
23
26
  /** Built-in value references. */
24
27
  var objectCreate = Object.create;
@@ -26076,10 +26079,12 @@ const createActionBarInteractionPlugin = (menuCommandFactory) => {
26076
26079
 
26077
26080
  const prosemirrorAdapterCss = "@charset \"UTF-8\";:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}:host(limel-prosemirror-adapter){display:flex;flex-direction:column}:host(limel-prosemirror-adapter) .toolbar{order:1}:host(limel-prosemirror-adapter) div#editor{order:2;height:100%;flex-grow:1}:host(limel-prosemirror-adapter) div[contenteditable=true]{height:100%}*{box-sizing:border-box}:host(limel-prosemirror-adapter:hover) .toolbar,:host(limel-prosemirror-adapter:focus-within) .toolbar{will-change:grid-template-rows}:host(limel-prosemirror-adapter:hover) limel-action-bar,:host(limel-prosemirror-adapter:focus-within) limel-action-bar{will-change:opacity, padding}:host(limel-prosemirror-adapter:hover) .ProseMirror,:host(limel-prosemirror-adapter:focus-within) .ProseMirror{will-change:padding}.ProseMirror-menubar-wrapper{display:grid;grid-template-rows:auto 1fr}.ProseMirror-textblock-dropdown{min-width:3em}.ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:fit-content;white-space:pre}.toolbar{--action-bar-border-radius:0.25rem;border-radius:var(--action-bar-border-radius);flex-shrink:0;position:sticky;z-index:1;top:0;width:100%;display:grid;grid-template-rows:var(--limel-prosemirror-adapter-toolbar-grid-template-rows);transition-property:grid-template-rows;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);background-color:rgba(var(--contrast-200), 0.5);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-action-bar{min-width:0;transition-property:padding, opacity;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);opacity:var(--limel-prosemirror-adapter-toolbar-opacity);padding:var(--limel-prosemirror-adapter-action-bar-padding-top-bottom, 0.125rem) 0.25rem;background-color:transparent;overflow:hidden}.ProseMirror{transition-duration:padding;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:\"liga\" 0;padding:var(--limel-text-editor-padding)}.ProseMirror [draggable][contenteditable=false]{user-select:text}.ProseMirror:focus-visible{outline:none}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-selectednode{outline:0.125rem solid rgb(var(--color-sky-light))}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:\"\";position:absolute;left:-2rem;right:-0.125rem;top:-0.125rem;bottom:-0.125rem;border:0.125rem solid rgb(var(--color-sky-light));pointer-events:none}img.ProseMirror-separator{display:inline !important;border:none !important;margin:0 !important}limel-portal{width:25rem}blockquote{position:relative;font-weight:100;font-size:0.875rem;max-width:100%;line-height:1.4;margin:0;padding:0.5rem 1.25rem;border-radius:0.05rem 0.75rem;background-color:rgb(var(--contrast-300))}blockquote:before,blockquote:after{position:absolute;font-size:2.75rem;opacity:0.4}blockquote:before{content:\"“\";left:0;top:-0.75rem}blockquote:after{content:\"”\";right:0;bottom:-2rem}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:0.875rem;word-break:break-word;hyphens:auto;-webkit-hyphens:auto}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:0.875rem;margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:0.875rem}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}ul{list-style:none}ul li{position:relative;margin-left:0.75rem}ul li:before{content:\"\";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{margin-bottom:0.25rem}code{font-family:ui-monospace, \"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace;font-size:0.8125rem;letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;display:inline-block;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem;overflow:auto;white-space:pre-wrap}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0;border:1px solid rgb(var(--contrast-400))}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:0.875rem}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}";
26078
26081
 
26082
+ const DEBOUNCE_TIMEOUT = 300;
26079
26083
  const ProsemirrorAdapter = class {
26080
26084
  constructor(hostRef) {
26081
26085
  index.registerInstance(this, hostRef);
26082
26086
  this.change = index.createEvent(this, "change", 7);
26087
+ this.changeWaiting = false;
26083
26088
  /**
26084
26089
  * Used to stop change event emitting as result of getting updated value from consumer
26085
26090
  */
@@ -26109,13 +26114,16 @@ const ProsemirrorAdapter = class {
26109
26114
  this.handleTransaction = (transaction) => {
26110
26115
  const newState = this.view.state.apply(transaction);
26111
26116
  this.view.updateState(newState);
26112
- if (this.suppressChangeEvent) {
26117
+ if (this.suppressChangeEvent || transaction.getMeta('pointer')) {
26113
26118
  return;
26114
26119
  }
26115
- if (transaction.getMeta('pointer')) {
26120
+ const content = this.contentConverter.serialize(this.view, this.schema);
26121
+ if (content === this.lastEmittedValue) {
26116
26122
  return;
26117
26123
  }
26118
- this.change.emit(this.contentConverter.serialize(this.view, this.schema));
26124
+ this.lastEmittedValue = content;
26125
+ this.changeWaiting = true;
26126
+ this.changeEmitter(content);
26119
26127
  };
26120
26128
  this.handleActionBarItem = (event) => {
26121
26129
  event.preventDefault();
@@ -26160,6 +26168,13 @@ const ProsemirrorAdapter = class {
26160
26168
  this.link = { href: href, text: text };
26161
26169
  this.isLinkMenuOpen = true;
26162
26170
  };
26171
+ this.changeEmitter = debounce.debounce((value) => {
26172
+ this.change.emit(value);
26173
+ this.changeWaiting = false;
26174
+ }, DEBOUNCE_TIMEOUT);
26175
+ this.handleBlur = () => {
26176
+ this.changeEmitter.flush();
26177
+ };
26163
26178
  this.contentType = 'markdown';
26164
26179
  this.value = undefined;
26165
26180
  this.language = undefined;
@@ -26170,10 +26185,19 @@ const ProsemirrorAdapter = class {
26170
26185
  this.portalId = randomString.createRandomString();
26171
26186
  }
26172
26187
  watchValue(newValue) {
26173
- if (!this.view ||
26174
- newValue === this.contentConverter.serialize(this.view, this.schema)) {
26188
+ if (!this.view) {
26189
+ return;
26190
+ }
26191
+ if (this.changeWaiting) {
26192
+ // A change is pending; do not update the editor's content
26193
+ return;
26194
+ }
26195
+ const currentContent = this.contentConverter.serialize(this.view, this.schema);
26196
+ // If the new value is the same as the current content, do nothing
26197
+ if (newValue === currentContent) {
26175
26198
  return;
26176
26199
  }
26200
+ // Update the editor's content with the new value
26177
26201
  this.updateView(newValue);
26178
26202
  }
26179
26203
  componentWillLoad() {
@@ -26195,8 +26219,10 @@ const ProsemirrorAdapter = class {
26195
26219
  this.host.addEventListener('open-editor-link-menu', this.handleOpenLinkMenu);
26196
26220
  }
26197
26221
  disconnectedCallback() {
26222
+ var _a, _b, _c;
26198
26223
  this.host.removeEventListener('open-editor-link-menu', this.handleOpenLinkMenu);
26199
- this.view.destroy();
26224
+ (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.dom) === null || _b === void 0 ? void 0 : _b.removeEventListener('blur', this.handleBlur);
26225
+ (_c = this.view) === null || _c === void 0 ? void 0 : _c.destroy();
26200
26226
  }
26201
26227
  render() {
26202
26228
  return [
@@ -26230,6 +26256,7 @@ const ProsemirrorAdapter = class {
26230
26256
  state: this.createEditorState(initialDoc),
26231
26257
  dispatchTransaction: this.handleTransaction,
26232
26258
  });
26259
+ this.view.dom.addEventListener('blur', this.handleBlur);
26233
26260
  if (this.value) {
26234
26261
  this.updateView(this.value);
26235
26262
  }