@mgdis/mg-components 6.12.0 → 6.13.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.
Files changed (102) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_37.cjs.entry.js +211 -45
  3. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  4. package/dist/cjs/mg-components.cjs.js +1 -1
  5. package/dist/cjs/mg-input-combobox.cjs.entry.js +38 -16
  6. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
  8. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +33 -15
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-input-rich-text-editor.entry.cjs.js.map +1 -1
  11. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +2 -1
  12. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
  13. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +42 -5
  14. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
  15. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +38 -16
  16. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +39 -5
  18. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +41 -6
  20. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
  21. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +39 -4
  22. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
  23. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +40 -4
  24. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +51 -16
  26. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js.map +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +39 -4
  28. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +19 -7
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +39 -4
  32. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
  33. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +40 -6
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
  35. package/dist/collection/components/molecules/mg-form/mg-form.js +23 -1
  36. package/dist/collection/components/molecules/mg-form/mg-form.js.map +1 -1
  37. package/dist/components/mg-form.js +9 -1
  38. package/dist/components/mg-form.js.map +1 -1
  39. package/dist/components/mg-input-checkbox-paginated2.js +2 -1
  40. package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
  41. package/dist/components/mg-input-checkbox.js +26 -5
  42. package/dist/components/mg-input-checkbox.js.map +1 -1
  43. package/dist/components/mg-input-combobox.js +38 -16
  44. package/dist/components/mg-input-combobox.js.map +1 -1
  45. package/dist/components/mg-input-date.js +23 -5
  46. package/dist/components/mg-input-date.js.map +1 -1
  47. package/dist/components/mg-input-numeric.js +23 -4
  48. package/dist/components/mg-input-numeric.js.map +1 -1
  49. package/dist/components/mg-input-password.js +23 -4
  50. package/dist/components/mg-input-password.js.map +1 -1
  51. package/dist/components/mg-input-radio.js +24 -4
  52. package/dist/components/mg-input-radio.js.map +1 -1
  53. package/dist/components/mg-input-rich-text-editor.js +34 -15
  54. package/dist/components/mg-input-rich-text-editor.js.map +1 -1
  55. package/dist/components/mg-input-select2.js +23 -4
  56. package/dist/components/mg-input-select2.js.map +1 -1
  57. package/dist/components/mg-input-text2.js +18 -6
  58. package/dist/components/mg-input-text2.js.map +1 -1
  59. package/dist/components/mg-input-textarea.js +23 -4
  60. package/dist/components/mg-input-textarea.js.map +1 -1
  61. package/dist/components/mg-input-toggle.js +24 -6
  62. package/dist/components/mg-input-toggle.js.map +1 -1
  63. package/dist/components/mg-table.js +1 -1
  64. package/dist/components/mg-table.js.map +1 -1
  65. package/dist/esm/loader.js +1 -1
  66. package/dist/esm/mg-action-more_37.entry.js +211 -45
  67. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  68. package/dist/esm/mg-components.js +1 -1
  69. package/dist/esm/mg-input-combobox.entry.js +38 -16
  70. package/dist/esm/mg-input-combobox.entry.js.map +1 -1
  71. package/dist/esm/mg-input-rich-text-editor.entry.js +33 -15
  72. package/dist/esm/mg-input-rich-text-editor.entry.js.map +1 -1
  73. package/dist/mg-components/mg-components.esm.js +1 -1
  74. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
  75. package/dist/mg-components/mg-input-rich-text-editor.entry.esm.js.map +1 -1
  76. package/dist/mg-components/p-3e92299a.entry.js +2 -0
  77. package/dist/mg-components/p-3e92299a.entry.js.map +1 -0
  78. package/dist/mg-components/p-c907ddac.entry.js +2 -0
  79. package/dist/mg-components/p-c907ddac.entry.js.map +1 -0
  80. package/dist/mg-components/{p-3853afb5.entry.js → p-e7a7c651.entry.js} +2 -2
  81. package/dist/mg-components/p-e7a7c651.entry.js.map +1 -0
  82. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -0
  83. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +1 -1
  84. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -0
  85. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +6 -2
  86. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -0
  87. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -0
  88. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -0
  89. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -0
  90. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +1 -1
  91. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -0
  92. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +9 -4
  93. package/dist/types/components/molecules/mg-form/mg-form.d.ts +4 -0
  94. package/dist/types/components.d.ts +47 -6
  95. package/ide/intellij/web-types.json +21 -17
  96. package/ide/vscode/html-custom-data.json +14 -14
  97. package/package.json +20 -20
  98. package/dist/mg-components/p-3853afb5.entry.js.map +0 -1
  99. package/dist/mg-components/p-5a05b1da.entry.js +0 -2
  100. package/dist/mg-components/p-5a05b1da.entry.js.map +0 -1
  101. package/dist/mg-components/p-74b5112a.entry.js +0 -2
  102. package/dist/mg-components/p-74b5112a.entry.js.map +0 -1
@@ -31300,6 +31300,13 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31300
31300
  throw new Error(`<mg-input-rich-text-editor> props "pattern" and "patternErrorMessage" must be non-empty string and paired. Passed value: "pattern='${toString$1(this.pattern)}'" and "patternErrorMessage='${toString$1(this.patternErrorMessage)}'".`);
31301
31301
  }
31302
31302
  }
31303
+ /**
31304
+ * Set focus on input.
31305
+ */
31306
+ async setFocus() {
31307
+ var _a;
31308
+ (_a = this.editor) === null || _a === void 0 ? void 0 : _a.focus();
31309
+ }
31303
31310
  /**
31304
31311
  * Get editor content as HTML
31305
31312
  * @returns HTML content of the editor
@@ -31369,9 +31376,20 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31369
31376
  if (!this.readonly) {
31370
31377
  this.value = '';
31371
31378
  this.editor.setText('');
31372
- this.checkValidity();
31373
- this.errorMessage = undefined;
31374
- this.hasDisplayedError = false;
31379
+ // Use `Promise` as requested for stencil method
31380
+ // Use `requestAnimationFrame` to ensure:
31381
+ // - DOM is fully updated before validation
31382
+ // - Async operations are completed
31383
+ // - No timing issues with Stencil's render cycle
31384
+ // - Keep everything in sync both inside and outside the component
31385
+ return new Promise(resolve => {
31386
+ requestAnimationFrame(() => {
31387
+ this.checkValidity();
31388
+ this.errorMessage = undefined;
31389
+ this.hasDisplayedError = false;
31390
+ resolve();
31391
+ });
31392
+ });
31375
31393
  }
31376
31394
  }
31377
31395
  /**
@@ -31414,24 +31432,24 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31414
31432
  * add listeners and render editor element
31415
31433
  */
31416
31434
  componentDidLoad() {
31417
- if (this.readonly)
31418
- return;
31419
- this.editor = defineEditor(this.wrapperElement, {
31420
- modules: this.modules,
31421
- readOnly: this.readonly || this.disabled,
31422
- placeholder: this.placeholder,
31423
- value: this.value,
31424
- handleTextChange: this.handleTextChange,
31425
- handleBlur: this.handleBlur,
31426
- handleFocus: this.handleFocus,
31427
- });
31435
+ if (!this.readonly) {
31436
+ this.editor = defineEditor(this.wrapperElement, {
31437
+ modules: this.modules,
31438
+ readOnly: this.readonly || this.disabled,
31439
+ placeholder: this.placeholder,
31440
+ value: this.value,
31441
+ handleTextChange: this.handleTextChange,
31442
+ handleBlur: this.handleBlur,
31443
+ handleFocus: this.handleFocus,
31444
+ });
31445
+ }
31428
31446
  }
31429
31447
  /**
31430
31448
  * Render
31431
31449
  * @returns HTML mg-input Element
31432
31450
  */
31433
31451
  render() {
31434
- return (h("mg-input", { key: '7636809a87a04ebf36f60c0f13152566e3ed45a4', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { ref: el => {
31452
+ return (h("mg-input", { key: 'b11d79ea82720eff4256206374e179efaefa9268', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { ref: el => {
31435
31453
  this.wrapperElement = el;
31436
31454
  }, id: this.identifier, class: "mg-c-input__wrapper" }, h("div", null)))));
31437
31455
  }
@@ -31465,6 +31483,7 @@ const MgInputRichTextEditor$1 = /*@__PURE__*/ proxyCustomElement(class MgInputRi
31465
31483
  "invalid": [1028],
31466
31484
  "classCollection": [32],
31467
31485
  "errorMessage": [32],
31486
+ "setFocus": [64],
31468
31487
  "getHTML": [64],
31469
31488
  "getText": [64],
31470
31489
  "displayError": [64],