@mgdis/mg-components 6.14.0 → 6.15.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 (150) hide show
  1. package/dist/cjs/{index-DzBkSgSK.js → index-BGxkpQwi.js} +7 -1
  2. package/dist/cjs/{index-DUJwxnoi.js → index-CpENFzEo.js} +2 -2
  3. package/dist/cjs/{index-CwjAofQ1.js → index-iUZvsp-F.js} +55 -31
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/mg-action-more_37.cjs.entry.js +431 -208
  6. package/dist/cjs/mg-alert.cjs.entry.js +4 -4
  7. package/dist/cjs/mg-components.cjs.js +3 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +145 -81
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +1248 -16004
  10. package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-CwjEAih3.js} +7 -0
  11. package/dist/cjs/mg-input.utils-D-ASK4ua.js +49 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +4 -4
  13. package/dist/cjs/mg-progress.cjs.entry.js +3 -3
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +2 -2
  16. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
  18. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +93 -22
  19. package/dist/collection/components/molecules/inputs/mg-input/mg-input.utils.js +21 -0
  20. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -1
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +49 -106
  22. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +123 -48
  23. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +140 -56
  24. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -1
  26. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +63 -10
  28. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +1 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -6
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  32. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +142 -9
  33. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  34. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -2
  35. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  37. package/dist/collection/components/molecules/mg-form/mg-form.js +1 -1
  38. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  39. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  40. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  41. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  42. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  43. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  44. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
  45. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  46. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  47. package/dist/collection/components/molecules/mg-table/mg-table.js +2 -2
  48. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  49. package/dist/collection/locales/en/messages.json +23 -14
  50. package/dist/collection/locales/fr/messages.json +24 -15
  51. package/dist/components/index2.js +3 -3
  52. package/dist/components/index3.js +55 -31
  53. package/dist/components/mg-action-more.js +2 -2
  54. package/dist/components/mg-alert.js +2 -2
  55. package/dist/components/mg-badge2.js +1 -1
  56. package/dist/components/mg-button2.js +1 -1
  57. package/dist/components/mg-card2.js +1 -1
  58. package/dist/components/mg-character-left2.js +1 -1
  59. package/dist/components/mg-details.js +1 -97
  60. package/dist/components/mg-details2.js +99 -0
  61. package/dist/components/mg-divider2.js +1 -1
  62. package/dist/components/mg-form.js +2 -2
  63. package/dist/components/mg-icon2.js +1 -1
  64. package/dist/components/mg-illustrated-message.js +2 -2
  65. package/dist/components/mg-input-checkbox-paginated2.js +43 -124
  66. package/dist/components/mg-input-checkbox.js +136 -62
  67. package/dist/components/mg-input-combobox.js +135 -63
  68. package/dist/components/mg-input-date.js +9 -3
  69. package/dist/components/mg-input-numeric.js +14 -3
  70. package/dist/components/mg-input-password.js +10 -4
  71. package/dist/components/mg-input-radio.js +54 -13
  72. package/dist/components/mg-input-rich-text-editor.js +1266 -16016
  73. package/dist/components/mg-input-select2.js +45 -9
  74. package/dist/components/mg-input-text2.js +10 -4
  75. package/dist/components/mg-input-textarea.js +10 -4
  76. package/dist/components/mg-input-title2.js +1 -1
  77. package/dist/components/mg-input-toggle.js +97 -12
  78. package/dist/components/mg-input.utils.js +24 -0
  79. package/dist/components/mg-input2.js +100 -23
  80. package/dist/components/mg-item-more2.js +2 -2
  81. package/dist/components/mg-loader2.js +2 -2
  82. package/dist/components/mg-menu-item2.js +1 -1
  83. package/dist/components/mg-message2.js +3 -3
  84. package/dist/components/mg-modal.js +3 -3
  85. package/dist/components/mg-pagination.js +233 -1
  86. package/dist/components/mg-panel.js +14 -8
  87. package/dist/components/mg-popover-content2.js +2 -2
  88. package/dist/components/mg-popover2.js +2 -2
  89. package/dist/components/mg-progress.js +2 -2
  90. package/dist/components/mg-skip-links.js +2 -2
  91. package/dist/components/mg-table.js +3 -3
  92. package/dist/components/mg-tabs.js +1 -311
  93. package/dist/components/mg-tabs2.js +313 -0
  94. package/dist/components/mg-tag.js +1 -1
  95. package/dist/components/mg-tooltip-content2.js +1 -1
  96. package/dist/components/mg-tooltip2.js +2 -2
  97. package/dist/esm/{index-Bv7NHR-W.js → index-CKB-AnCZ.js} +55 -31
  98. package/dist/esm/{index-Degtjvph.js → index-DhAOnZJn.js} +7 -1
  99. package/dist/esm/{index-Dr7GYvIz.js → index-WtiuOkLj.js} +2 -2
  100. package/dist/esm/loader.js +3 -3
  101. package/dist/esm/mg-action-more_37.entry.js +426 -203
  102. package/dist/esm/mg-alert.entry.js +4 -4
  103. package/dist/esm/mg-components.js +4 -4
  104. package/dist/esm/mg-input-combobox.entry.js +125 -61
  105. package/dist/esm/mg-input-rich-text-editor.entry.js +1249 -16005
  106. package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-BAUTlb6r.js} +7 -1
  107. package/dist/esm/mg-input.utils-BYI03zSi.js +46 -0
  108. package/dist/esm/mg-loader.entry.js +4 -4
  109. package/dist/esm/mg-progress.entry.js +3 -3
  110. package/dist/mg-components/locales/en/messages.json +23 -14
  111. package/dist/mg-components/locales/fr/messages.json +24 -15
  112. package/dist/mg-components/mg-components.esm.js +1 -1
  113. package/dist/mg-components/p-31856cff.entry.js +1 -0
  114. package/dist/mg-components/{p-056ba467.entry.js → p-420daa1e.entry.js} +1 -1
  115. package/dist/mg-components/{p-d13a6fdc.entry.js → p-47e19783.entry.js} +1 -1
  116. package/dist/mg-components/p-67af6274.entry.js +1 -0
  117. package/dist/mg-components/p-698dfc6c.entry.js +1 -0
  118. package/dist/mg-components/p-BAUTlb6r.js +1 -0
  119. package/dist/mg-components/p-CKB-AnCZ.js +1 -0
  120. package/dist/mg-components/p-DhAOnZJn.js +2 -0
  121. package/dist/mg-components/p-PuX-pdL4.js +1 -0
  122. package/dist/mg-components/p-WtiuOkLj.js +1 -0
  123. package/dist/mg-components/p-a0fa44cf.entry.js +1 -0
  124. package/dist/types/assets/icons/index.d.ts +6 -0
  125. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +13 -0
  126. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +15 -4
  127. package/dist/types/components/molecules/inputs/mg-input/mg-input.utils.d.ts +8 -0
  128. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +17 -40
  129. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +1 -2
  130. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +36 -9
  131. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +17 -3
  132. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +18 -0
  133. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +18 -0
  134. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +40 -4
  135. package/dist/types/components.d.ts +69 -40
  136. package/ide/intellij/web-types.json +148 -22
  137. package/ide/vscode/html-custom-data.json +143 -9
  138. package/package.json +15 -15
  139. package/dist/cjs/events.utils-D5SAtkpQ.js +0 -25
  140. package/dist/components/mg-pagination2.js +0 -229
  141. package/dist/esm/events.utils-yMGqY8YG.js +0 -23
  142. package/dist/mg-components/p-625c463c.entry.js +0 -1
  143. package/dist/mg-components/p-Bv7NHR-W.js +0 -1
  144. package/dist/mg-components/p-CNgv8hc5.js +0 -1
  145. package/dist/mg-components/p-Degtjvph.js +0 -2
  146. package/dist/mg-components/p-Dr7GYvIz.js +0 -1
  147. package/dist/mg-components/p-c522f3c1.entry.js +0 -1
  148. package/dist/mg-components/p-cac23bd7.entry.js +0 -1
  149. package/dist/mg-components/p-e75f5383.entry.js +0 -10
  150. package/dist/mg-components/p-yMGqY8YG.js +0 -1
@@ -10,5 +10,11 @@ const classFieldset = 'mg-c-input--fieldset';
10
10
  const classDisabled = 'mg-c-input--disabled';
11
11
  const classReadonly = 'mg-c-input--readonly';
12
12
  const classVerticalList = 'mg-c-input--vertical-list';
13
+ /**
14
+ * Define cutom errors
15
+ */
16
+ const CustomError = {
17
+ NoValue: 'noValue',
18
+ };
13
19
 
14
- export { classDisabled as a, classFieldset as b, classReadonly as c, classVerticalList as d, tooltipPositions as t, widths as w };
20
+ export { CustomError as C, classDisabled as a, classFieldset as b, classReadonly as c, classVerticalList as d, tooltipPositions as t, widths as w };
@@ -0,0 +1,46 @@
1
+ import { c as isValidString } from './index-WtiuOkLj.js';
2
+
3
+ /**
4
+ * Keyboard keys
5
+ */
6
+ const Keys = {
7
+ TAB: 'Tab',
8
+ ENTER: 'Enter',
9
+ DOWN: 'Down',
10
+ UP: 'Up',
11
+ LEFT: 'Left',
12
+ RIGHT: 'Right',
13
+ ARROWDOWN: 'ArrowDown',
14
+ ARROWUP: 'ArrowUp',
15
+ ARROWRIGHT: 'ArrowRight',
16
+ ARROWLEFT: 'ArrowLeft',
17
+ HOME: 'Home',
18
+ END: 'End',
19
+ ESC: 'Esc',
20
+ ESCAPE: 'Escape',
21
+ NUMPADENTER: 'NumpadEnter',
22
+ SPACE: 'Space',
23
+ };
24
+
25
+ /**
26
+ * Define error message
27
+ * @param message - message to display
28
+ * @param details - message detail to display
29
+ * @returns formated MgInput["errorMessage"]
30
+ */
31
+ const defineErrorMessage = (message, details) => {
32
+ if (isValidString(message) && isValidString(details)) {
33
+ return {
34
+ summary: message,
35
+ details,
36
+ };
37
+ }
38
+ else if (isValidString(message)) {
39
+ return message;
40
+ }
41
+ else {
42
+ return undefined;
43
+ }
44
+ };
45
+
46
+ export { Keys as K, defineErrorMessage as d };
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, h, a as getElement } from './index-Degtjvph.js';
2
- import { i as initLocales } from './index-Bv7NHR-W.js';
3
- import { c as isValidString, t as toString } from './index-Dr7GYvIz.js';
1
+ import { r as registerInstance, h, a as getElement } from './index-DhAOnZJn.js';
2
+ import { i as initLocales } from './index-CKB-AnCZ.js';
3
+ import { c as isValidString, t as toString } from './index-WtiuOkLj.js';
4
4
 
5
5
  const mgLoaderCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";
6
6
 
@@ -33,7 +33,7 @@ const MgLoader = class {
33
33
  * @returns HTML Element
34
34
  */
35
35
  render() {
36
- return (h("div", { key: 'ad7aa5e4fa0704cf2fa174ae1ed960f72deb79e3', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '47e6df1e459a74851bf370e460438b7bdc2ed3d0', icon: "loader", spin: true }), h("span", { key: '44d36e8492401cacb911f21fc707c1de03ae7a5d', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
36
+ return (h("div", { key: 'b74028455b7003824fa5618b1751d05a91ab7071', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '204acdb8f881b348148020214c05269878852c4f', icon: "loader", spin: true }), h("span", { key: '40f1792354df01ec9af61ab128575ea166f34cb5', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
37
37
  }
38
38
  get element() { return getElement(this); }
39
39
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-Degtjvph.js';
2
- import { c as isValidString, t as toString, e as isValidNumber } from './index-Dr7GYvIz.js';
1
+ import { r as registerInstance, h, H as Host } from './index-DhAOnZJn.js';
2
+ import { c as isValidString, t as toString, e as isValidNumber } from './index-WtiuOkLj.js';
3
3
 
4
4
  /**
5
5
  * List of all possibles roles
@@ -73,7 +73,7 @@ const MgProgress = class {
73
73
  * @returns HTML Element
74
74
  */
75
75
  render() {
76
- return (h(Host, { key: 'e6d254a68f35c5019158ab17fcb0e4dfd1943ef8', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: '5b427579ad97336076504a45013a0be00673f9a9', class: "mg-c-progress" }, h("div", { key: '76dbdf88550caf51890e10c45c034d73cd02db5d', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: 'b0ab6f784cdb8cc25a40b83a0d97bcda5b5c1f9b', class: "mg-c-progress__fill", style: {
76
+ return (h(Host, { key: '62c66dbd93249bfde3eb8ff449b49884edfe49c3', role: this.ariaRole, "aria-label": this.label, "aria-valuenow": this.value, "aria-valuemin": this.min, "aria-valuemax": this.max }, h("div", { key: 'b349c9d7358086ca4668705a1935fd8bbdb86afa', class: "mg-c-progress" }, h("div", { key: '57cc19d07c0f006f8ecf3a1f86ec12e37ffd8d6b', class: { 'mg-c-progress__bar': true, 'mg-c-progress__bar--active': this.value > this.min } }, h("div", { key: 'b4c49d94d9cfe2e1a6d8013aa4a39cde51b36d04', class: "mg-c-progress__fill", style: {
77
77
  width: `${Math.round(((this.value - this.min) / (this.max - this.min)) * 100)}%`,
78
78
  } })))));
79
79
  }
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "errors": {
3
- "required": "This field is required."
3
+ "required": "This field is required.",
4
+ "noValue": "No value."
4
5
  },
5
6
  "nbCharLeft": "{counter} characters left.",
6
7
  "input": {
8
+ "showMore": "Show more",
7
9
  "select": {
8
10
  "placeholder": "Select a value"
9
11
  },
@@ -13,23 +15,27 @@
13
15
  "editButton": "Edit",
14
16
  "selectButton": "Select values",
15
17
  "showButton": "Show",
16
- "label": "Enter a value",
17
- "result": "result",
18
- "results": "results",
19
- "searchResults": "Search result(s) list.",
20
- "noResult": "No result.",
21
18
  "sections": {
19
+ "label": "Values grouped by: \"Selected\" or \"Available\"",
20
+ "badge": { "label": "value(s)" },
21
+ "search": {
22
+ "label": "Enter a value",
23
+ "values": "{count} value(s) found",
24
+ "noValue": "No values found"
25
+ },
22
26
  "selected": {
23
27
  "title": "Selected",
24
- "titlePlural": "Selected",
25
28
  "action": "Unselect all",
26
- "tooltip": "Unselect all current search results"
29
+ "tooltip": "Unselect all current values",
30
+ "values": "{count} value(s) selected",
31
+ "noValue": "No value selected"
27
32
  },
28
33
  "notSelected": {
29
- "title": "Not selected",
30
- "titlePlural": "Not selected",
34
+ "title": "Available",
31
35
  "action": "Select all",
32
- "tooltip": "Select all current search results"
36
+ "tooltip": "Select all current values",
37
+ "values": "{count} value(s) available",
38
+ "noValue": "All values are selected"
33
39
  }
34
40
  }
35
41
  },
@@ -61,9 +67,8 @@
61
67
  "hide": "Hide password value"
62
68
  },
63
69
  "combobox": {
64
- "notFound": "No elements match your input",
65
- "notAvailable": "No elements available",
66
- "loadMore": "Load more",
70
+ "notFound": "No value matches your input",
71
+ "notAvailable": "No value available",
67
72
  "search": "Search…"
68
73
  },
69
74
  "text": {
@@ -130,5 +135,9 @@
130
135
  },
131
136
  "table": {
132
137
  "sortableCaption": "(column headers with buttons are sortable)"
138
+ },
139
+ "details": {
140
+ "toggleClosed": "Show details",
141
+ "toggleOpened": "Hide details"
133
142
  }
134
143
  }
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "errors": {
3
- "required": "Ce champ est obligatoire."
3
+ "required": "Ce champ est obligatoire.",
4
+ "noValue": "Aucune valeur."
4
5
  },
5
6
  "nbCharLeft": "{counter} caractères disponibles.",
6
7
  "input": {
8
+ "showMore": "Afficher plus",
7
9
  "select": {
8
10
  "placeholder": "Sélectionnez une valeur"
9
11
  },
@@ -13,23 +15,27 @@
13
15
  "editButton": "Modifier",
14
16
  "selectButton": "Sélectionner des valeurs",
15
17
  "showButton": "Voir",
16
- "label": "Saisissez une valeur",
17
- "result": "résultat",
18
- "results": "résultats",
19
- "searchResults": "Liste de résultat(s) de la recherche.",
20
- "noResult": "Aucun résultat.",
21
18
  "sections": {
19
+ "label": "Valeurs regroupées par: \"Sélectionnées\" ou \"Disponibles\"",
20
+ "badge": { "label": "valeur(s)" },
21
+ "search": {
22
+ "label": "Saisissez une valeur",
23
+ "values": "{count} résultat(s)",
24
+ "noValue": "Aucune valeur n'a été trouvée."
25
+ },
22
26
  "selected": {
23
- "title": "Sélectionné",
24
- "titlePlural": "Sélectionnés",
27
+ "title": "Sélectionnées",
25
28
  "action": "Tout désélectionner",
26
- "tooltip": "Désélectionne tous les résultats de la recherche en cours"
29
+ "tooltip": "Désélectionne toutes les valeurs de la section",
30
+ "values": "{count} valeur(s) sélectionnée(s)",
31
+ "noValue": "Aucune valeur sélectionnée"
27
32
  },
28
33
  "notSelected": {
29
- "title": "Non sélectionné",
30
- "titlePlural": "Non sélectionnés",
34
+ "title": "Disponibles",
31
35
  "action": "Tout sélectionner",
32
- "tooltip": "Sélectionne tous les résultats de la recherche en cours"
36
+ "tooltip": "Sélectionne toutes les valeurs de la section",
37
+ "values": "{count} valeur(s) disponible(s)",
38
+ "noValue": "Toutes les valeurs sont sélectionnées"
33
39
  }
34
40
  }
35
41
  },
@@ -61,9 +67,8 @@
61
67
  "hide": "Masquer le mot de passe"
62
68
  },
63
69
  "combobox": {
64
- "notFound": "Aucun élément ne correspondont a votre saisie",
65
- "notAvailable": "Aucun élément disponible",
66
- "loadMore": "Afficher plus",
70
+ "notFound": "Aucune valeur ne correspondont à votre saisie",
71
+ "notAvailable": "Aucune valeur disponible",
67
72
  "search": "Recherche…"
68
73
  },
69
74
  "text": {
@@ -130,5 +135,9 @@
130
135
  },
131
136
  "table": {
132
137
  "sortableCaption": "(les en-têtes de colonnes avec des boutons peuvent être triés)"
138
+ },
139
+ "details": {
140
+ "toggleClosed": "Voir le detail",
141
+ "toggleOpened": "Masquer le detail"
133
142
  }
134
143
  }
@@ -1 +1 @@
1
- import{p as e,g as a,b as t}from"./p-Degtjvph.js";export{s as setNonce}from"./p-Degtjvph.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await a(),t(JSON.parse('[["p-056ba467",[[1,"mg-alert",{"delay":[2],"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"delay":["watchDelay"],"variant":["watchVariant"],"variantStyle":["watchVariantStyle"],"hidden":["watchHidden"]}]]],["p-d13a6fdc",[[1,"mg-progress",{"label":[1],"ariaRole":[1,"aria-role"],"value":[2],"min":[2],"max":[2]},null,{"label":["watchLabel"],"ariaRole":["watchAriaRole"],"value":["watchValue"],"min":["watchMin"],"max":["watchMax"]}]]],["p-625c463c",[[1,"mg-input-checkbox",{"value":[1040],"type":[1025],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"displaySelectedValues":[4,"display-selected-values"],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"editButtonMessage":[1,"edit-button-message"],"showButtonMessage":[1,"show-button-message"],"selectButtonMessage":[1,"select-button-message"],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"selectValuesButtonKey":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"type":["validateType"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"displaySelectedValues":["watchDisplaySelectedValues"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"displaySearchInput":["watchDisplaySearchInput"],"searchValue":["validateSearchValue"]}],[1,"mg-action-more",{"items":[16],"icon":[1040],"button":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"items":["validateItems"],"icon":["validateIcon"],"button":["validateButton"],"displayChevron":["validateDisplayChevron"]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1,"title-pattern"],"titlePatternErrorMessage":[1,"title-pattern-error-message"],"titleEditable":[1028,"title-editable"],"titlePosition":[1,"title-position"],"expanded":[1028],"expandToggleDisplay":[1,"expand-toggle-display"],"expandToggleDisabled":[4,"expand-toggle-disabled"],"shadow":[4],"classCollection":[32],"isEditing":[32],"updatedPanelTitle":[32]},null,{"identifier":["watchIdentifier"],"panelTitle":["validatePanelTitle"],"titlePattern":["validateTitlePattern"],"titlePatternErrorMessage":["validateTitlePattern"],"titlePosition":["validateTitlePosition"],"expanded":["handleExpanded"],"expandToggleDisplay":["validateExpandToggleDisplay"]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayPassword":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1,"help-text"],"resizable":[1],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"mgWidth":["watchMgWidth"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"],"characterLeftHide":["validatecharacterLeftHide"]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"min":[1],"max":[1],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"min":["validateMinMax","handleValidityChange"],"max":["validateMinMax","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"max":[2],"min":[2],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"type":[1],"format":[1],"currency":[1],"unit":[1],"unitDisplay":[1,"unit-display"],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"hasFocus":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"min":["handleValidityChange"],"max":["handleValidityChange"],"mgWidth":["watchMgWidth"],"type":["validateType"],"format":["watchFormat"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"readonlyValue":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["validateItems"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"classCollection":[32],"options":[32],"errorMessage":[32],"valid":[32],"checked":[32],"setFocus":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["watchIsOnOff"],"isIcon":["watchIsIcon"],"readonly":["watchReadonly"],"disabled":["watchDisabled"],"checked":["handleChecked"]}],[1,"mg-modal",{"identifier":[1],"dialogRole":[1,"dialog-role"],"modalTitle":[1,"modal-title"],"closeButton":[4,"close-button"],"open":[1028],"hasActions":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"dialogRole":["validateDialogRole"],"modalTitle":["validateModalTitle"],"open":["watchOpen"]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"label":["validateLabel"],"size":["validateSize"],"items":["validateItems"],"activeTab":["validateActiveTab"]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]},null,{"toggleClosed":["validateTitles"],"toggleOpened":["validateTitles"],"expanded":["handleExpanded"]}],[1,"mg-table",{"size":[1],"fullWidth":[4,"full-width"],"columns":[16],"classCollection":[32]},null,{"size":["watchSize"],"fullWidth":["watchFullWidth"],"columns":["watchColumns"]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"requiredMessage":[1,"required-message"],"ariaRole":[1,"aria-role"],"labelOnTop":[4,"label-on-top"],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessageText":[32],"displayError":[64],"reset":[64]},null,{"identifier":["watchIdentifier"],"requiredMessage":["validateRequiredMessage","handleAttributeChange"],"ariaRole":["validateAriaRole"],"labelOnTop":["handlelabelOnTop"],"readonly":["handleAttributeChange"],"disabled":["handleAttributeChange"]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1],"classCollection":[32]},null,{"size":["watchSize"],"direction":["watchDirection"]}],[1,"mg-skip-links",{"links":[16]},null,{"links":["validateLinks"]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classCollection":[32]},null,{"variant":["validateVariant"],"outline":["validateOutline"],"soft":["validateSoft"]}],[2,"mg-input-checkbox-paginated",{"readonly":[4],"disabled":[4],"name":[1],"invalid":[4],"currentPage":[1026,"current-page"],"checkboxes":[16],"messages":[16],"expanded":[32]},null,{"checkboxes":["watchCheckboxes"]}],[1,"mg-message",{"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"variant":["watchVariant"],"variantStyle":["watchVariantStyle"]}],[1,"mg-divider",{"fullWidth":[4,"full-width"]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"hidePageCount":[4,"hide-page-count"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"],"messages":[16]},null,{"identifier":["watchIdentifier"],"totalPages":["validateTotalPages"],"currentPage":["validateCurrentPage"],"messages":["watchPaginationMessages"]}],[1,"mg-input-text",{"value":[1544],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"type":[1],"icon":[1],"placeholder":[1],"datalistoptions":[16],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1025,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"type":["validateType"],"icon":["validateIcon"],"datalistoptions":["validateDatalistoptions"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"pattern":["watchPattern"],"patternErrorMessage":["watchPattern"],"helpText":["watchHelpText"]}],[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1]},[[0,"item-loaded","updateItemListener"]],{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[1,"mg-menu-item",{"identifier":[513],"href":[1],"target":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"identifier":["watchIdentifier"],"target":["watchTarget"],"status":["watchStatus"],"expanded":["watchExpanded"],"size":["watchSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"],"data-style-direction":["watchDataStyleDirection"],"data-has-focus":["watchDataHasFocus"]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[520,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"items":["validateItems"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"identifier":["watchIdentifier"],"maxlength":["validateMaxlength"]}],[1,"mg-badge",{"value":[8],"label":[1],"variant":[1],"outline":[4],"classCollection":[32]},null,{"value":["validateValue"],"label":["validateLabel"],"variant":["validateVariant"],"outline":["validateOutline"]}],[1,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[4]},null,{"identifier":["validateIdentifier"],"arrowHide":["validateArrowHide"],"closeButton":["validateCloseButton"],"display":["handleDisplay"]}],[1,"mg-popover-content",{"closeButton":[4,"close-button"],"classCollection":[32]}],[1,"mg-card",{"shadow":[4],"radiusSize":[1,"radius-size"],"classCollection":[32]},null,{"shadow":["watchShadow"],"radiusSize":["watchRadiusSize"]}],[1,"mg-input",{"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"required":[4],"errorMessage":[1,"error-message"],"helpText":[1,"help-text"],"ariaDescribedbyIDs":[1025,"aria-describedby-i-ds"],"isFieldset":[32],"isReadonly":[32],"isDisabled":[32],"isVerticalList":[32]},null,{"identifier":["watchIdentifier","watchAriaDescribedbyIDs"],"labelOnTop":["watchLabelOnTop","watchLabelConfig"],"labelHide":["watchLabelConfig"],"tooltipPosition":["watchTooltipPosition"],"errorMessage":["watchErrorMessage","watchAriaDescribedbyIDs"],"helpText":["watchHelpText","watchAriaDescribedbyIDs"],"ariaDescribedbyIDs":["watchAriaDescribedbyIDs"],"class":["watchClass","watchLabel"],"label":["watchLabel"],"required":["watchLabel"],"isReadonly":["watchLabel"],"isFieldset":["watchLabel"]}],[1,"mg-button",{"variant":[1025],"label":[1],"type":[1],"size":[1],"fullWidth":[4,"full-width"],"form":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classCollection":[32]},null,{"variant":["validateVariant"],"size":["validateSize"],"fullWidth":["validateFullWidth"],"disabled":["disabledHandler"],"isIcon":["watchIsIcon"],"loading":["loadingHandler"]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[4]},null,{"identifier":["watchIdentifier"],"message":["watchMessage"],"display":["watchDisplay"],"disabled":["watchDisabled"]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"readonly":[4],"isLegend":[4,"is-legend"],"tagName":[32]},null,{"identifier":["validateIdentifier"],"isLegend":["validateIsLegend"]}],[1,"mg-tooltip-content",{"message":[1]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classCollection":[32]},null,{"icon":["validateIcon"],"size":["validateSize"],"variant":["validateVariant"],"variantStyle":["validateVariantStyle"],"spin":["handleSpin"]}]]],["p-c522f3c1",[[1,"mg-loader",{"message":[1],"messageHide":[4,"message-hide"]},null,{"message":["watchMessage"]}]]],["p-cac23bd7",[[1,"mg-input-combobox",{"value":[1537],"items":[16],"itemsLabel":[1,"items-label"],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"fetchurl":[1],"fetchoptions":[16],"fetchmappings":[16],"valid":[1028],"invalid":[1028],"isLoading":[32],"options":[32],"option":[32],"filter":[32],"classCollection":[32],"errorMessage":[32],"popoverDisplay":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["watchItems"],"identifier":["watchIdentifier"],"readonly":["watchReadonly","watchValidityChange"],"required":["watchValidityChange"],"disabled":["watchValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"fetchurl":["watchFetchUrl"],"fetchoptions":["watchFetchOptions"],"fetchmappings":["watchFetchMappings"],"options":["watchOptions"],"filter":["watchFilter"],"popoverDisplay":["watchPopoverDisplay"]}]]],["p-e75f5383",[[1,"mg-input-rich-text-editor",{"value":[1025],"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"rows":[2],"required":[4],"readonly":[4],"disabled":[4],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"modules":[16],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"getHTML":[64],"getText":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"readonly":["watchReadonly","handleValidityChange"],"disabled":["watchDisabled","handleValidityChange"],"required":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}]]]]'),e))));
1
+ import{p as e,g as a,b as t}from"./p-DhAOnZJn.js";export{s as setNonce}from"./p-DhAOnZJn.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await a(),t(JSON.parse('[["p-420daa1e",[[257,"mg-alert",{"delay":[2],"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"delay":["watchDelay"],"variant":["watchVariant"],"variantStyle":["watchVariantStyle"],"hidden":["watchHidden"]}]]],["p-47e19783",[[257,"mg-progress",{"label":[1],"ariaRole":[1,"aria-role"],"value":[2],"min":[2],"max":[2]},null,{"label":["watchLabel"],"ariaRole":["watchAriaRole"],"value":["watchValue"],"min":["watchMin"],"max":["watchMax"]}]]],["p-698dfc6c",[[257,"mg-input-checkbox",{"value":[1040],"type":[1025],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"displaySelectedValues":[4,"display-selected-values"],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"editButtonMessage":[1,"edit-button-message"],"showButtonMessage":[1,"show-button-message"],"selectButtonMessage":[1,"select-button-message"],"noValueErrorDetail":[1,"no-value-error-detail"],"classCollection":[32],"errorMessage":[32],"checkboxItems":[32],"displaySearchInput":[32],"searchValue":[32],"searchResults":[32],"selectValuesButtonKey":[32],"activeTab":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"type":["validateType"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"displaySelectedValues":["watchDisplaySelectedValues"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"checkboxItems":["validateCheckboxItems"],"displaySearchInput":["watchDisplaySearchInput"],"searchValue":["validateSearchValue"]}],[257,"mg-action-more",{"items":[16],"icon":[1040],"button":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]},null,{"items":["validateItems"],"icon":["validateIcon"],"button":["validateButton"],"displayChevron":["validateDisplayChevron"]}],[257,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1,"title-pattern"],"titlePatternErrorMessage":[1,"title-pattern-error-message"],"titleEditable":[1028,"title-editable"],"titlePosition":[1,"title-position"],"expanded":[1028],"expandToggleDisplay":[1,"expand-toggle-display"],"expandToggleDisabled":[4,"expand-toggle-disabled"],"shadow":[4],"classCollection":[32],"isEditing":[32],"updatedPanelTitle":[32]},null,{"identifier":["watchIdentifier"],"panelTitle":["validatePanelTitle"],"titlePattern":["validateTitlePattern"],"titlePatternErrorMessage":["validateTitlePattern"],"titlePosition":["validateTitlePosition"],"expanded":["handleExpanded"],"expandToggleDisplay":["validateExpandToggleDisplay"]}],[257,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"hidePageCount":[4,"hide-page-count"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"],"messages":[16]},null,{"identifier":["watchIdentifier"],"totalPages":["validateTotalPages"],"currentPage":["validateCurrentPage"],"messages":["watchPaginationMessages"]}],[257,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"displayPassword":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[257,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1,"help-text"],"resizable":[1],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","validateDisabled"],"mgWidth":["watchMgWidth"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"],"characterLeftHide":["validatecharacterLeftHide"]}],[257,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"min":[1],"max":[1],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"min":["validateMinMax","handleValidityChange"],"max":["validateMinMax","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[257,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"max":[2],"min":[2],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"type":[1],"format":[1],"currency":[1],"unit":[1],"unitDisplay":[1,"unit-display"],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"hasFocus":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"min":["handleValidityChange"],"max":["handleValidityChange"],"mgWidth":["watchMgWidth"],"type":["validateType"],"format":["watchFormat"],"integerLength":["validateIntegerLength"],"decimalLength":["validateDecimalLength"]}],[257,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"noValueErrorDetail":[1,"no-value-error-detail"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"readonlyValue":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["validateItems"],"inputVerticalList":["watchInputVerticalList"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"]}],[257,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"noValueErrorDetail":[1,"no-value-error-detail"],"valid":[1028],"invalid":[1028],"classCollection":[32],"options":[32],"errorMessage":[32],"checked":[32],"setFocus":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"items":["validateItems"],"isOnOff":["watchIsOnOff"],"isIcon":["watchIsIcon"],"readonly":["watchReadonly"],"disabled":["watchDisabled"],"checked":["handleChecked"]}],[257,"mg-modal",{"identifier":[1],"dialogRole":[1,"dialog-role"],"modalTitle":[1,"modal-title"],"closeButton":[4,"close-button"],"open":[1028],"hasActions":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"dialogRole":["validateDialogRole"],"modalTitle":["validateModalTitle"],"open":["watchOpen"]}],[1,"mg-table",{"size":[1],"fullWidth":[4,"full-width"],"columns":[16],"classCollection":[32]},null,{"size":["watchSize"],"fullWidth":["watchFullWidth"],"columns":["watchColumns"]}],[257,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"requiredMessage":[1,"required-message"],"ariaRole":[1,"aria-role"],"labelOnTop":[4,"label-on-top"],"disabled":[4],"valid":[1028],"invalid":[1028],"classCollection":[32],"requiredMessageText":[32],"displayError":[64],"reset":[64]},null,{"identifier":["watchIdentifier"],"requiredMessage":["validateRequiredMessage","handleAttributeChange"],"ariaRole":["validateAriaRole"],"labelOnTop":["handlelabelOnTop"],"readonly":["handleAttributeChange"],"disabled":["handleAttributeChange"]}],[257,"mg-illustrated-message",{"size":[1],"direction":[1],"classCollection":[32]},null,{"size":["watchSize"],"direction":["watchDirection"]}],[257,"mg-skip-links",{"links":[16]},null,{"links":["validateLinks"]}],[257,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classCollection":[32]},null,{"variant":["validateVariant"],"outline":["validateOutline"],"soft":["validateSoft"]}],[257,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[520,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"noValueErrorDetail":[1,"no-value-error-detail"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["validateValue"],"items":["validateItems"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"]}],[262,"mg-input-checkbox-paginated",{"readonly":[4],"disabled":[4],"name":[1],"invalid":[4],"checkboxes":[16],"messages":[16],"limit":[32],"resetLimit":[64]},null,{"checkboxes":["watchCheckboxes"],"limit":["watchLimit"]}],[257,"mg-message",{"variant":[1],"variantStyle":[1,"variant-style"],"classCollection":[32],"hasActions":[32]},null,{"variant":["watchVariant"],"variantStyle":["watchVariantStyle"]}],[257,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classCollection":[32]},null,{"identifier":["watchIdentifier"],"label":["validateLabel"],"size":["validateSize"],"items":["validateItems"],"activeTab":["validateActiveTab"]}],[257,"mg-divider",{"fullWidth":[4,"full-width"]}],[257,"mg-input-text",{"value":[1544],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"type":[1],"icon":[1],"placeholder":[1],"datalistoptions":[16],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"characterLeftHide":[4,"character-left-hide"],"helpText":[1025,"help-text"],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["handleValue"],"type":["validateType"],"icon":["validateIcon"],"datalistoptions":["validateDatalistoptions"],"readonly":["watchReadonly","handleValidityChange"],"required":["handleValidityChange"],"disabled":["handleValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"pattern":["watchPattern"],"patternErrorMessage":["watchPattern"],"helpText":["watchHelpText"]}],[257,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]},null,{"icon":["validateIcon"],"slotlabel":["validateSlotLabel"],"size":["validateSize"]}],[257,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1]},[[0,"item-loaded","updateItemListener"]],{"label":["validateLabel"],"direction":["validateDirection"],"itemmore":["validateItemMore"],"size":["validateSize"]}],[257,"mg-menu-item",{"identifier":[513],"href":[1],"target":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]},null,{"identifier":["watchIdentifier"],"target":["watchTarget"],"status":["watchStatus"],"expanded":["watchExpanded"],"size":["watchSize"],"direction":["validateDirection"],"hasChildren":["validateHasChildren"],"data-style-direction":["watchDataStyleDirection"],"data-has-focus":["watchDataHasFocus"]}],[258,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]},null,{"identifier":["watchIdentifier"],"maxlength":["validateMaxlength"]}],[257,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[4]},null,{"identifier":["validateIdentifier"],"arrowHide":["validateArrowHide"],"closeButton":["validateCloseButton"],"display":["handleDisplay"]}],[257,"mg-badge",{"value":[8],"label":[1],"variant":[1],"outline":[4],"classCollection":[32]},null,{"value":["validateValue"],"label":["validateLabel"],"variant":["validateVariant"],"outline":["validateOutline"]}],[257,"mg-popover-content",{"closeButton":[4,"close-button"],"classCollection":[32]}],[257,"mg-card",{"shadow":[4],"radiusSize":[1,"radius-size"],"classCollection":[32]},null,{"shadow":["watchShadow"],"radiusSize":["watchRadiusSize"]}],[257,"mg-input",{"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"required":[4],"errorMessage":[1,"error-message"],"helpText":[1,"help-text"],"ariaDescribedbyIDs":[1025,"aria-describedby-i-ds"],"isFieldset":[32],"isReadonly":[32],"isDisabled":[32],"isVerticalList":[32]},null,{"identifier":["watchIdentifier","watchAriaDescribedbyIDs"],"labelOnTop":["watchLabelOnTop","watchLabelConfig"],"labelHide":["watchLabelConfig"],"tooltipPosition":["watchTooltipPosition"],"errorMessage":["watchErrorMessage","watchAriaDescribedbyIDs"],"helpText":["watchHelpText","watchAriaDescribedbyIDs"],"ariaDescribedbyIDs":["watchAriaDescribedbyIDs"],"class":["watchClass","watchLabel"],"label":["watchLabel"],"required":["watchLabel"],"isReadonly":["watchLabel"],"isFieldset":["watchLabel"]}],[257,"mg-button",{"variant":[1025],"label":[1],"type":[1],"size":[1],"fullWidth":[4,"full-width"],"form":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classCollection":[32]},null,{"variant":["validateVariant"],"size":["validateSize"],"fullWidth":["validateFullWidth"],"disabled":["disabledHandler"],"isIcon":["watchIsIcon"],"loading":["loadingHandler"]}],[257,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]},null,{"toggleClosed":["validateTitles"],"toggleOpened":["validateTitles"],"expanded":["handleExpanded"]}],[257,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[4]},null,{"identifier":["watchIdentifier"],"message":["watchMessage"],"display":["watchDisplay"],"disabled":["watchDisabled"]}],[262,"mg-input-title",{"identifier":[1],"required":[4],"readonly":[4],"isLegend":[4,"is-legend"],"tagName":[32]},null,{"identifier":["validateIdentifier"],"isLegend":["validateIsLegend"]}],[257,"mg-tooltip-content",{"message":[1]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classCollection":[32]},null,{"icon":["validateIcon"],"size":["validateSize"],"variant":["validateVariant"],"variantStyle":["validateVariantStyle"],"spin":["handleSpin"]}]]],["p-67af6274",[[257,"mg-loader",{"message":[1],"messageHide":[4,"message-hide"]},null,{"message":["watchMessage"]}]]],["p-31856cff",[[257,"mg-input-combobox",{"value":[1537],"items":[16],"itemsLabel":[1,"items-label"],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"fetchurl":[1],"fetchoptions":[16],"fetchmappings":[16],"noValueErrorDetail":[1,"no-value-error-detail"],"valid":[1028],"invalid":[1028],"isLoading":[32],"options":[32],"option":[32],"filter":[32],"classCollection":[32],"errorMessage":[32],"popoverDisplay":[32],"setFocus":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"value":["watchValue"],"items":["watchItems"],"identifier":["watchIdentifier"],"readonly":["watchReadonly","watchValidityChange"],"required":["watchValidityChange"],"disabled":["watchValidityChange","watchDisabled"],"mgWidth":["watchMgWidth"],"fetchurl":["watchFetchUrl"],"fetchoptions":["watchFetchOptions"],"fetchmappings":["watchFetchMappings"],"options":["watchOptions"],"filter":["watchFilter"],"popoverDisplay":["watchPopoverDisplay"]}]]],["p-a0fa44cf",[[257,"mg-input-rich-text-editor",{"value":[1025],"identifier":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"rows":[2],"required":[4],"readonly":[4],"disabled":[4],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"tooltipPosition":[1,"tooltip-position"],"helpText":[1,"help-text"],"modules":[16],"valid":[1028],"invalid":[1028],"classCollection":[32],"errorMessage":[32],"setFocus":[64],"getHTML":[64],"getText":[64],"displayError":[64],"setError":[64],"reset":[64]},null,{"readonly":["watchReadonly","handleValidityChange"],"disabled":["watchDisabled","handleValidityChange"],"required":["handleValidityChange"],"pattern":["validatePattern"],"patternErrorMessage":["validatePattern"]}]]]]'),e))));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,a as e}from"./p-DhAOnZJn.js";import{P as o,C as n,f as h,a,i as r,n as c,g as p,t as m,b as u,c as l,d as g}from"./p-WtiuOkLj.js";import{C as d,c as b,a as v,w as f}from"./p-BAUTlb6r.js";import{i as w}from"./p-CKB-AnCZ.js";import{K as _,d as x}from"./p-PuX-pdL4.js";const y=t=>t&&"object"==typeof t&&"string"==typeof t.title&&void 0!==t.value,z=class{constructor(s){t(this,s),this.valueChange=i(this,"value-change",7),this.filterChange=i(this,"filter-change",7),this.showMore=i(this,"load-more",7),this.inputValid=i(this,"input-valid",7),this.fetchError=i(this,"fetch-error",7),this.classFocus="mg-u-is-focused",this.hasDisplayedError=!1,this.name=this.identifier,this.labelOnTop=!1,this.labelHide=!1,this.required=!1,this.readonly=!1,this.disabled=!1,this.mgWidth="full",this.tooltipPosition="input",this.options=new o([]),this.filter="",this.classCollection=new n(["mg-c-input--combobox","mg-c-input--has-icon","mg-c-input--input-append"]),this.popoverDisplay=!1,this.handleOptionClick=t=>{this.setValue(this.options.items.find((i=>h(i.value)===t.target.id))),this.popoverDisplay=!1},this.handleResetButton=t=>{t.stopPropagation(),this.reset().then((()=>{this.input.focus()}))},this.handlePopoverDisplay=t=>{this.popoverDisplay=t.detail},this.handleFilterInput=()=>{this.checkValidity(),this.hasDisplayedError&&this.setErrorMessage(),this.popoverDisplay||(this.popoverDisplay=!0),this.debounce||(this.debounce=!0,setTimeout((()=>{this.filter=this.input.value,this.debounce=!1}),250))},this.handleFilterBlur=()=>{this.popoverDisplay||(this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))},this.handleFilterFocus=()=>{this.isLoading||(this.option=null)},this.handleLoadMoreButton=()=>{this.loadingWrapper({name:"load-more",cursor:a.NEXT}).then((()=>{this.input.focus()}))},this.handleFilterKeydown=t=>{if(this.disabled||t.ctrlKey||t.shiftKey)return;let i=!1;switch(t.key){case _.TAB:case _.ENTER:i=t.key===_.ENTER;const s=this.option||this.options.items.find(this.isCurrentOption);this.popoverDisplay&&this.setValue(s),this.popoverDisplay=!1;break;case _.DOWN:case _.ARROWDOWN:case _.UP:case _.ARROWUP:if(i=!0,this.isLoading||!(this.page.total>0)){this.popoverDisplay=!0;break}if(Boolean(t.altKey)&&[_.DOWN,_.ARROWDOWN].includes(t.key)){this.popoverDisplay=!0;break}let e;const o=this.popoverDisplay&&y(this.option);[_.DOWN,_.ARROWDOWN].includes(t.key)?e=o?a.NEXT:a.FIRST:[_.UP,_.ARROWUP].includes(t.key)&&(e=o?a.PREVIOUS:a.LAST),this.loadingWrapper({name:"scroll",cursor:e}),this.popoverDisplay=!0;break;case _.LEFT:case _.ARROWLEFT:case _.HOME:case _.RIGHT:case _.ARROWRIGHT:case _.END:if(!y(this.option))break;let n;i=!0,this.option=null,_.HOME===t.key?n=0:_.END===t.key&&(n=this.filter.length),"number"==typeof n&&this.input.setSelectionRange(n,n);break;case _.ESC:case _.ESCAPE:i=!0,this.popoverDisplay?this.popoverDisplay=!1:(this.setValue(null),this.filter="",this.option=null);break;default:this.option=null}i&&(t.stopPropagation(),t.preventDefault())},this.scrollToIndex=t=>{requestAnimationFrame((()=>{var i;this.popoverDisplay&&(null===(i=this.element.shadowRoot.querySelector(`li:nth-of-type(${(t||0)+this.page.baseIndex})`))||void 0===i||i.scrollIntoView({block:"nearest"}))}))},this.isCurrentOption=t=>(y(this.value)?this.value.value:this.value)===t.value,this.getValueTitle=()=>this.value&&y(this.value)?this.value.title:"string"==typeof this.value?this.value:"",this.hasNoValueError=()=>this.customError===d.NoValue,this.checkValidity=()=>{this.setValidity(this.readonly||this.disabled)},this.setErrorMessage=()=>{this.errorMessage=void 0,this.valid||(void 0===this.customError||Object.values(d).includes(this.customError)?this.hasNoValueError()?this.errorMessage=this.messages.errors.noValue:this.input.validity.valueMissing&&(this.errorMessage=this.messages.errors.required):this.errorMessage=this.customError)},this.resetErrorMessage=()=>{this.checkValidity(),this.errorMessage=void 0,this.hasDisplayedError=!1},this.optionsFilter=t=>""===this.filter||t.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()),this.loadingWrapper=t=>{let i,s;if(Boolean(this.loadingAction)||(this.loadingAction=t.name),Boolean(this.option)&&"load-more"!==this.loadingAction?s=this.page.items.findIndex((t=>t.value.toString()===this.option.value.toString())):"load-more"===this.loadingAction&&(s=this.page.items.length-this.page.baseIndex),"load-more"===t.name)this.isLoading=!0,i=this.goToNextPage;else{if(t.cursor===a.NEXT&&this.page.items.length<=this.page.total&&s+this.page.baseIndex===this.page.items.length&&s+this.page.baseIndex<this.page.total)return void this.loadMoreElement.click();i="scroll"===t.name?c:this.updatePage}return i().then((()=>{const i=this.options.items.filter(this.optionsFilter);"load-data"!==t.name&&(s=this.page.getIndexFromCursor(t.cursor,"load-more"===this.loadingAction&&s>=0?i[s]:this.option)),this.option=i[s],this.scrollToIndex(s)})).finally((()=>{requestAnimationFrame((()=>{this.isLoading=!1,this.loadingAction=void 0}))}))},this.goToNextPage=()=>(this.showMore.emit(),void 0!==this.fetchurl?this.getOptions("string"==typeof this.page.next?this.page.next:void 0).then((t=>{if(r(t)){const i=[...this.page.items,...t.items];this.options=new o(i,{total:t.total,next:t.next,top:i.length})}})):c((()=>{if("function"==typeof this.page.next){const t=this.page.next();this.page=new g(Object.assign(Object.assign({},t),{items:[...this.page.items,...t.items]}))}}))),this.updatePage=async()=>{if(void 0!==this.fetchurl)return this.getOptions().then((t=>{r(t)&&(this.options=new o(t.items,{total:t.total,next:t.next,top:t.top}),0===this.filter.length&&0===t.total?this.displayError():this.invalid&&this.hasNoValueError()&&this.resetErrorMessage())}));this.page=this.options.getPage(0,this.optionsFilter)},this.getOptions=async(t=this.fetchurl)=>{const i=("string"==typeof t?t:t.toString()).replaceAll(this.fetchmappings.request.filter,encodeURIComponent(this.filter));try{const t=await fetch(i,this.fetchoptions);if(!t.ok)return this.fetchError.emit(new Error(`${t.status} - ${t.statusText}`)),void this.displayError();const s=await t.json(),e=[],o=p(s,this.fetchmappings.response.items,e).map((t=>({title:p(t,this.fetchmappings.response.itemTitle,"string"==typeof t?t:JSON.stringify(t)),value:p(t,this.fetchmappings.response.itemValue,t)}))),n=Number(p(s,this.fetchmappings.response.total,e.length));let h=p(s,this.fetchmappings.response.next);if(URL.canParse(i)&&Boolean(h)&&!URL.canParse(h)){const t=new URL(i);t.pathname.endsWith(h.split("?")[0])&&(h=new URL(h,t).toString())}return{items:o,total:n,next:h,top:o.length}}catch(t){this.fetchError.emit(t),this.displayError()}}}watchValue(t){this.filter=this.getValueTitle(),this.valueChange.emit(t)}watchItems(t){if([void 0,null].includes(this.fetchurl)||![void 0,null].includes(t)){if(![void 0,null].includes(this.fetchurl)&&Array.isArray(t))throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${m(t)}.`);if([void 0,null].includes(t)||Array.isArray(t)&&0===t.length)this.options=new o([]),this.displayError();else if(u(t))this.options=new o(t.map((t=>({title:t,value:t}))),{total:t.length}),this.invalid&&this.hasNoValueError()&&this.resetErrorMessage();else{if(i=t,!Array.isArray(i)||!i.every(y))throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${m(t)}.`);this.options=new o(t,{total:t.length}),this.invalid&&this.hasNoValueError()&&this.resetErrorMessage()}var i}}watchIdentifier(t){Boolean(t)&&(this.popoverId=`${t}-popover`,this.element.dataset.mgPopoverGuard=this.popoverId)}watchReadonly(t){t?this.classCollection.add(b):this.classCollection.delete(b)}watchValidityChange(t,i,s){void 0!==this.input&&(this.input[s]=t,this.checkValidity(),this.hasDisplayedError&&(this.setErrorMessage(),this.hasDisplayedError=!1))}watchDisabled(t){t?this.classCollection.add(v):this.classCollection.delete(v)}watchMgWidth(t){f.forEach((t=>{this.classCollection.delete(`mg-c-input--width-${t}`)})),void 0!==t&&this.classCollection.add(`mg-c-input--width-${this.mgWidth}`),this.classCollection=new n(this.classCollection.classes)}watchFetchUrl(t){Boolean(t)&&this.loadingWrapper({name:"load-data"})}watchFetchOptions(t){if(this.fetchurl&&t&&!r(t))throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${m(t)}.`);new Request(this.fetchurl,t)}watchFetchMappings(t){if(Boolean(this.fetchurl)&&!Boolean(t))throw new Error('<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.');if(Boolean(t)&&!(t=>{const i=r(t)&&Object.hasOwn(t,"request")&&Object.hasOwn(t,"response");if(i){const{request:i,response:s}=t;return![i,s].some((t=>!r(t)))&&"string"==typeof i.filter&&"object"==typeof s&&"string"==typeof s.total&&"string"==typeof s.items&&"string"==typeof s.next&&"string"==typeof s.itemTitle&&("string"==typeof s.itemValue||void 0===s.itemValue)}return i})(t))throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${m(t)}.`)}watchOptions(t){this.page=t.getPage(0,this.filter.length>0?this.optionsFilter:void 0)}watchFilter(t){this.loadingWrapper({name:"load-data"}),this.filterChange.emit(t)}watchPopoverDisplay(t){t?(this.classCollection.add(this.classFocus),this.input.focus()):(this.option=null,this.filter=this.getValueTitle(),this.classCollection.delete(this.classFocus),this.handlerInProgress="blur",this.displayError().finally((()=>{this.handlerInProgress=void 0})))}async setFocus(){var t;null===(t=this.input)||void 0===t||t.focus()}displayError(){return new Promise((t=>{requestAnimationFrame((()=>{this.checkValidity(),this.setErrorMessage(),this.hasDisplayedError=this.invalid,t()}))}))}async setError(t,i){if("boolean"!=typeof t)throw new Error('<mg-input-combobox> method "setError()" param "valid" must be a boolean.');if(!l(i))throw new Error('<mg-input-combobox> method "setError()" param "errorMessage" must be a string.');this.setValidity(t,i),this.setErrorMessage(),this.hasDisplayedError=this.invalid}async reset(){if(!this.readonly)return this.setValue(null),this.option=null,this.filter="",new Promise((t=>{requestAnimationFrame((()=>{this.resetErrorMessage(),t()}))}))}setValue(t){this.value=y(t)?u(this.items||this.options.items)?t.title:Object.assign({},t):""}setValidity(t,i){var s;const e=this.valid;let o=t;o||void 0===this.input||(this.customError=void 0,l(i)?this.customError=i:0===(void 0===this.fetchurl?(null!==(s=this.items)&&void 0!==s?s:[]).length:this.page.total)&&(this.customError=d.NoValue),o=this.input.checkValidity()&&void 0===this.customError),this.valid=o,this.invalid=!this.valid,(void 0===this.handlerInProgress||"blur"===this.handlerInProgress&&this.valid!==e)&&this.inputValid.emit(this.valid)}componentWillLoad(){return this.messages=w(this.element).messages,this.watchIdentifier(this.identifier),this.watchItems(this.items),Boolean(this.fetchurl)&&(this.watchFetchOptions(this.fetchoptions),this.watchFetchMappings(this.fetchmappings),this.loadingWrapper({name:"load-data"})),this.watchValue(this.value),this.watchOptions(this.options),this.watchMgWidth(this.mgWidth),this.watchReadonly(this.readonly),this.watchDisabled(this.disabled),setTimeout((()=>{this.checkValidity()}),0)}render(){var t,i,e,o,n,a;const r=`${this.identifier}-list`,c=this.getValueTitle(),p=this.value&&!this.disabled,m=this.disabled||this.hasNoValueError();let u,l;return(null===(t=this.page)||void 0===t?void 0:t.items.length)>0?u="list":0===(null===(i=this.page)||void 0===i?void 0:i.items.length)&&this.filter.length>0?u="notfound":0===(null===(e=this.page)||void 0===e?void 0:e.items.length)&&(u="notavailable"),l=[null,void 0].includes(null===(o=this.option)||void 0===o?void 0:o.value)?"string"==typeof this.value?this.value:null===(n=this.value)||void 0===n?void 0:n.value:this.option.value,s("mg-input",{key:"fa0977713a1150c39b4f989bbb139e0e345b4c5f",label:this.label,identifier:this.identifier,class:this.classCollection.classes.join(" "),ariaDescribedbyIDs:u&&"list"!==u?u:void 0,labelOnTop:this.labelOnTop,labelHide:this.labelHide,required:this.required,tooltip:this.tooltip,tooltipPosition:this.readonly&&void 0===this.value?"label":this.tooltipPosition,helpText:this.helpText,errorMessage:x(this.errorMessage,this.noValueErrorDetail)},this.readonly?c&&s("b",{class:"mg-c-input__readonly-value"},c):s("mg-popover",{identifier:this.popoverId,placement:"bottom-start",display:this.popoverDisplay,"arrow-hide":!0,style:{"--mg-c-input-list-width":Boolean(null===(a=this.input)||void 0===a?void 0:a.offsetWidth)?`${this.input.offsetWidth}px`:void 0},"data-fallback-placement":"bottom-end","onDisplay-change":this.handlePopoverDisplay},s("div",{class:"mg-c-input__input-group-container"},s("mg-icon",{icon:"magnifying-glass"}),s("input",{type:"text",role:"combobox",class:"mg-c-input__box mg-c-input__box--width",value:this.filter,id:this.identifier,name:this.name,placeholder:this.placeholder,title:this.placeholder,disabled:m,required:this.required,autocomplete:"off","aria-autocomplete":"list","aria-expanded":this.popoverDisplay.toString(),"aria-controls":r,"aria-invalid":(!0===this.invalid).toString(),"aria-activedescendant":h(l),onInput:this.handleFilterInput,onBlur:this.handleFilterBlur,onFocus:this.handleFilterFocus,onKeyDown:this.handleFilterKeydown,ref:t=>{null!==t&&(this.input=t)}}),p?s("mg-button",{class:"mg-c-input__box-append mg-c-input__reset",variant:"flat","is-icon":!0,label:this.messages.general.reset,"aria-controls":this.identifier,tabindex:"-1",onClick:this.handleResetButton,disabled:m},s("mg-icon",{icon:"cross"})):s("mg-button",{class:"mg-c-input__box-append",variant:"flat","is-icon":!0,label:this.itemsLabel,tabindex:"-1",disabled:m},s("mg-icon",{icon:"chevron-"+(this.popoverDisplay?"up":"down")}))),s("div",{slot:"content",class:"mg-c-input__popover-container"},"list"===u&&[s("ul",{key:"list",class:"mg-c-input__input-list",role:"listbox",id:r,"aria-label":this.itemsLabel,"aria-setsize":this.page.total},this.page.items.map((t=>{var i;return s("li",{role:"option",class:{"mg-c-input__input-list-item":!0,"mg-c-input__input-list-item--focus-visible":JSON.stringify(null===(i=this.option)||void 0===i?void 0:i.value)===JSON.stringify(t.value),"mg-c-input__input-list-item--selected":this.isCurrentOption(t)},key:t.title,id:h(t.value),"aria-selected":this.isCurrentOption(t).toString(),onClick:this.handleOptionClick},t.title,this.isCurrentOption(t)&&s("mg-icon",{icon:"check"}))}))),this.isLoading&&s("mg-loader",{key:"loader",message:this.messages.input.combobox.search,class:{"mg-u-visually-hidden":Boolean(this.page.next)}}),this.page.next&&s("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,disabled:this.isLoading,"full-width":!0,"disable-on-click":!0,onClick:this.handleLoadMoreButton,"aria-controls":r,ref:t=>{null!==t&&(this.loadMoreElement=t)}},s("mg-icon",{icon:"chevron-down"}),this.messages.input.showMore)],"notfound"===u&&s("p",{id:u,class:"mg-c-input__popover-info"},this.messages.input.combobox.notFound),"notavailable"===u&&s("p",{id:u,class:"mg-c-input__popover-info"},this.messages.input.combobox.notAvailable))))}get element(){return e(this)}static get watchers(){return{value:["watchValue"],items:["watchItems"],identifier:["watchIdentifier"],readonly:["watchReadonly","watchValidityChange"],required:["watchValidityChange"],disabled:["watchValidityChange","watchDisabled"],mgWidth:["watchMgWidth"],fetchurl:["watchFetchUrl"],fetchoptions:["watchFetchOptions"],fetchmappings:["watchFetchMappings"],options:["watchOptions"],filter:["watchFilter"],popoverDisplay:["watchPopoverDisplay"]}}};z.style=".mg-c-input__error-details{margin:0}.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left>mg-icon:first-of-type,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__with-character-left .mg-c-input__box,.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:not(:has(textarea)) .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-card-overflow:hidden;--mg-c-popover-padding-vertical:0;--mg-c-popover-padding-horizontal:0}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box:not(:disabled){cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}";export{z as mg_input_combobox}
@@ -1 +1 @@
1
- import{r as t,c as s,f as i,h as e,a}from"./p-Degtjvph.js";import{C as h,t as o}from"./p-Dr7GYvIz.js";import{i as r}from"./p-Bv7NHR-W.js";const n=["info","warning","success","danger"],c=["bar-left","background"],l=class{constructor(i){t(this,i),this.componentShow=s(this,"component-show",3),this.componentHide=s(this,"component-hide",3),this.componentClose=s(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new h(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}watchVariant(t){if(t&&!n.includes(t))throw new Error(`<mg-alert> prop "variant" must be one of: ${n.join(", ")}. Passed value: ${o(t)}.`)}watchVariantStyle(t){if(t&&!c.includes(t))throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),i(this)}componentWillLoad(){this.messages=r(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return e("mg-message",{key:"397a9a25b825bc75479d4562bff61dedc8ddc891",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},e("slot",{key:"793fb1e88b5d68bd41598f020748ea2fb02d7f3b"}),this.hasActions?e("span",{slot:"actions"},e("slot",{name:"actions"})):e("span",{class:"mg-c-alert__close-button"},e("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},e("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};l.style=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";export{l as mg_alert}
1
+ import{r as t,c as s,f as i,h as e,a}from"./p-DhAOnZJn.js";import{C as h,t as o}from"./p-WtiuOkLj.js";import{i as n}from"./p-CKB-AnCZ.js";const r=["info","warning","success","danger"],c=["bar-left","background"],l=class{constructor(i){t(this,i),this.componentShow=s(this,"component-show",3),this.componentHide=s(this,"component-hide",3),this.componentClose=s(this,"component-close",3),this.classCloseButton="mg-c-alert--close-button",this.storedTimer=null,this.isFocused=!1,this.isHovered=!1,this.variant="info",this.variantStyle="bar-left",this.classCollection=new h(["mg-c-alert"]),this.hasActions=!1,this.setTimer=()=>{this.storedTimer=setTimeout((()=>this.element.hidden=!0),1e3*this.delay)},this.clearTimer=()=>{clearTimeout(this.storedTimer)},this.timerEvents=t=>{this.clearTimer();const s="mouseenter"===t.type;this[s?"isHovered":"isFocused"]=!0,this.element.addEventListener(s?"mouseleave":"focusout",(t=>{this["mouseleave"===t.type?"isHovered":"isFocused"]=!1,this.isFocused||this.isHovered||this.setTimer()}),{once:!0})},this.handleClose=()=>{this.element.hidden=!0,this.componentClose.emit()}}watchDelay(t){if(void 0!==t&&t<2)throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${o(t)}.`)}watchVariant(t){if(t&&!r.includes(t))throw new Error(`<mg-alert> prop "variant" must be one of: ${r.join(", ")}. Passed value: ${o(t)}.`)}watchVariantStyle(t){if(t&&!c.includes(t))throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${c.join(", ")}. Passed value: ${o(t)}.`)}watchHidden(t){"string"==typeof t&&""===t&&(t=!0),t?(this.componentHide.emit(),["focusin","mouseenter"].forEach((t=>{this.element.removeEventListener(t,this.timerEvents)})),this.clearTimer()):(this.componentShow.emit(),this.delay>1&&(this.setTimer(),["focusin","mouseenter"].forEach((t=>{this.element.addEventListener(t,this.timerEvents)})))),i(this)}componentWillLoad(){this.messages=n(this.element).messages,this.watchVariant(this.variant),this.watchVariantStyle(this.variantStyle),this.watchDelay(this.delay),this.watchHidden(this.element.hidden),this.hasActions=null!==this.element.querySelector('[slot="actions"]'),this.hasActions||this.classCollection.add(this.classCloseButton)}render(){return e("mg-message",{key:"626afcfe4c86dacff9860d2515827ae5aa6b7234",class:this.classCollection.join(),role:["info","success"].includes(this.variant)?"status":"alert",variant:this.variant,variantStyle:this.variantStyle},e("slot",{key:"bc7d72c21dcf36c9012e144253ce2b3c6ebc14ed"}),this.hasActions?e("span",{slot:"actions"},e("slot",{name:"actions"})):e("span",{class:"mg-c-alert__close-button"},e("mg-button",{"is-icon":!0,variant:"flat",label:this.messages.alert.closeButton,onClick:this.handleClose},e("mg-icon",{icon:"cross"}))))}get element(){return a(this)}static get watchers(){return{delay:["watchDelay"],variant:["watchVariant"],variantStyle:["watchVariantStyle"],hidden:["watchHidden"]}}};l.style=".mg-c-alert__close-button{position:absolute;top:0;right:0}.mg-c-alert.mg-c-alert--close-button{--mg-c-card-spacing:0 var(--mg-b-size-min-height) 0 0}";export{l as mg_alert}
@@ -1 +1 @@
1
- import{r,h as s,H as e}from"./p-Degtjvph.js";import{c as a,t as o,e as i}from"./p-Dr7GYvIz.js";const t=["progressbar","meter"],c=class{constructor(s){r(this,s),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!a(r))throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}watchAriaRole(r){if(r&&!t.includes(r))throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${o(r)}.`)}watchValue(r){if(!(void 0===r||i(r)&&r>=this.min&&r<=this.max))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return s(e,{key:"e6d254a68f35c5019158ab17fcb0e4dfd1943ef8",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},s("div",{key:"5b427579ad97336076504a45013a0be00673f9a9",class:"mg-c-progress"},s("div",{key:"76dbdf88550caf51890e10c45c034d73cd02db5d",class:{"mg-c-progress__bar":!0,"mg-c-progress__bar--active":this.value>this.min}},s("div",{key:"b0ab6f784cdb8cc25a40b83a0d97bcda5b5c1f9b",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};c.style="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";export{c as mg_progress}
1
+ import{r,h as e,H as s}from"./p-DhAOnZJn.js";import{c as a,t as o,e as i}from"./p-WtiuOkLj.js";const t=["progressbar","meter"],c=class{constructor(e){r(this,e),this.ariaRole="progressbar",this.value=0,this.min=0,this.max=100}watchLabel(r){if(!a(r))throw new Error(`<mg-progress> prop "label" must be a valid string. Passed value: ${o(r)}.`)}watchAriaRole(r){if(r&&!t.includes(r))throw new Error(`<mg-progress> prop "ariaRole" must be one of: ${t.join(", ")}. Passed value: ${o(r)}.`)}watchValue(r){if(!(void 0===r||i(r)&&r>=this.min&&r<=this.max))throw new Error(`<mg-progress> prop “value” must be a number within the range ${this.min} to ${this.max}. Passed value: ${o(r)}.`)}watchMin(r){if(0!==r&&void 0!==r&&(!i(r)||r>=this.max))throw new Error(`<mg-progress> prop “min” must be a number lower than: ${this.max}. Passed value: ${o(r)}.`)}watchMax(r){if(100!==r&&void 0!==r&&(!i(r)||r<=this.min))throw new Error(`<mg-progress> prop “max” must be a number greater than: ${this.min}. Passed value: ${o(r)}.`)}componentWillLoad(){this.watchLabel(this.label),this.watchAriaRole(this.ariaRole),this.watchMin(this.min),this.watchMax(this.max),this.watchValue(this.value)}render(){return e(s,{key:"62c66dbd93249bfde3eb8ff449b49884edfe49c3",role:this.ariaRole,"aria-label":this.label,"aria-valuenow":this.value,"aria-valuemin":this.min,"aria-valuemax":this.max},e("div",{key:"b349c9d7358086ca4668705a1935fd8bbdb86afa",class:"mg-c-progress"},e("div",{key:"57cc19d07c0f006f8ecf3a1f86ec12e37ffd8d6b",class:{"mg-c-progress__bar":!0,"mg-c-progress__bar--active":this.value>this.min}},e("div",{key:"b4c49d94d9cfe2e1a6d8013aa4a39cde51b36d04",class:"mg-c-progress__fill",style:{width:`${Math.round((this.value-this.min)/(this.max-this.min)*100)}%`}}))))}static get watchers(){return{label:["watchLabel"],ariaRole:["watchAriaRole"],value:["watchValue"],min:["watchMin"],max:["watchMax"]}}};c.style="/*!\n * @prop --mg-c-progress-size: Defines the size of the progress bar. Default value is `--mg-b-size-8`.\n * @prop --mg-c-progress-border-color: Defines the color of the progress bar border. Default value is `--mg-b-color-neutral-80`.\n * @prop --mg-c-progress-bar-color-background: Defines the color of the progress bar. Default value is `--mg-b-color-neutral-30`.\n * @prop --mg-c-progress-fill-color-background: Defines the color of the progress bar fill background. Default value is `--mg-b-color-app`.\n */.mg-c-progress{min-width:calc(var(--mg-b-size-16)*4)}.mg-c-progress__bar{position:relative;overflow:hidden;height:var(--mg-c-progress-size);border-width:var(--mg-b-size-border);border-style:solid;border-color:var(--mg-c-progress-border-color);border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);background-color:var(--mg-c-progress-bar-color-background)}.mg-c-progress__fill{height:100%;border-radius:calc((var(--mg-c-progress-size) + var(--mg-b-size-border)*2)/2);transition:width 300ms ease-in-out}.mg-c-progress__bar.mg-c-progress__bar--active .mg-c-progress__fill{background-color:var(--mg-c-progress-fill-color-background)}";export{c as mg_progress}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,a}from"./p-DhAOnZJn.js";import{i}from"./p-CKB-AnCZ.js";import{c as r,t as s}from"./p-WtiuOkLj.js";const n=class{constructor(e){t(this,e),this.messageHide=!1}watchMessage(t){if(t&&!r(t))throw new Error(`<mg-loader> prop "message" must be a valid string. Passed value: ${s(t)}.`)}componentWillLoad(){this.messages=i(this.element).messages,this.watchMessage(this.message)}render(){return e("div",{key:"b74028455b7003824fa5618b1751d05a91ab7071",class:"mg-c-loader","aria-live":"polite"},e("mg-icon",{key:"204acdb8f881b348148020214c05269878852c4f",icon:"loader",spin:!0}),e("span",{key:"40f1792354df01ec9af61ab128575ea166f34cb5",class:{"mg-u-visually-hidden":this.messageHide}},this.message||this.messages.loader.inProgress))}get element(){return a(this)}static get watchers(){return{message:["watchMessage"]}}};n.style=".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";export{n as mg_loader}