@mgdis/mg-components 6.22.0 → 6.23.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 (158) hide show
  1. package/dist/cjs/{index-C2viYwrR.js → index-BEF-cqV9.js} +325 -1789
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +242 -172
  4. package/dist/cjs/mg-alert.cjs.entry.js +6 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +2 -2
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -3
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7491 -6367
  11. package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +2 -2
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  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/internals/mg-input-title/mg-input-title.js +5 -2
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.js +12 -3
  18. package/dist/collection/components/atoms/mg-button/mg-button.js +9 -4
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +16 -7
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +16 -9
  21. package/dist/collection/components/atoms/mg-tag/mg-tag.js +2 -1
  22. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -3
  23. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +15 -13
  24. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
  25. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +49 -26
  27. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +16 -8
  28. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -3
  29. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +7 -4
  30. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +11 -5
  31. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -3
  32. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +7 -3
  33. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +9 -4
  34. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +61 -19
  35. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +15 -8
  36. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -3
  37. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -4
  38. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +5 -3
  39. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +5 -3
  40. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +8 -4
  41. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
  42. package/dist/collection/components/molecules/mg-alert/mg-alert.js +29 -3
  43. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +3 -2
  44. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
  45. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +5 -2
  46. package/dist/collection/components/molecules/mg-form/mg-form.js +8 -4
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
  48. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  49. package/dist/collection/components/molecules/mg-message/mg-message.js +43 -4
  50. package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
  51. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +20 -6
  53. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
  55. package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
  56. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
  57. package/dist/collection/components/molecules/mg-table/mg-table.js +4 -2
  58. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +3 -2
  59. package/dist/components/index2.js +1 -1
  60. package/dist/components/index3.js +1 -1
  61. package/dist/components/index4.js +1 -0
  62. package/dist/components/mg-action-more.js +1 -1
  63. package/dist/components/mg-alert.js +1 -1
  64. package/dist/components/mg-badge2.js +1 -1
  65. package/dist/components/mg-breadcrumb.js +1 -1
  66. package/dist/components/mg-button2.js +1 -1
  67. package/dist/components/mg-card2.js +1 -1
  68. package/dist/components/mg-character-left2.js +1 -1
  69. package/dist/components/mg-details.js +1 -1
  70. package/dist/components/mg-divider2.js +1 -1
  71. package/dist/components/mg-fieldset.js +1 -1
  72. package/dist/components/mg-form.js +1 -1
  73. package/dist/components/mg-icon2.js +1 -1
  74. package/dist/components/mg-illustrated-message.js +1 -1
  75. package/dist/components/mg-input-checkbox.js +1 -1
  76. package/dist/components/mg-input-combobox.js +1 -1
  77. package/dist/components/mg-input-date.js +1 -1
  78. package/dist/components/mg-input-file.js +1 -1
  79. package/dist/components/mg-input-numeric.js +1 -1
  80. package/dist/components/mg-input-password.js +1 -1
  81. package/dist/components/mg-input-radio.js +1 -1
  82. package/dist/components/mg-input-rich-text-editor.js +284 -284
  83. package/dist/components/mg-input-select2.js +1 -1
  84. package/dist/components/mg-input-text2.js +1 -1
  85. package/dist/components/mg-input-textarea.js +1 -1
  86. package/dist/components/mg-input-title2.js +1 -1
  87. package/dist/components/mg-input-toggle.js +1 -1
  88. package/dist/components/mg-input2.js +1 -1
  89. package/dist/components/mg-item-more2.js +1 -1
  90. package/dist/components/mg-loader2.js +1 -1
  91. package/dist/components/mg-menu-item2.js +1 -1
  92. package/dist/components/mg-message2.js +1 -1
  93. package/dist/components/mg-modal.js +1 -1
  94. package/dist/components/mg-pagination.js +1 -1
  95. package/dist/components/mg-panel.js +1 -1
  96. package/dist/components/mg-popover-content2.js +1 -1
  97. package/dist/components/mg-popover2.js +1 -1
  98. package/dist/components/mg-progress.js +1 -1
  99. package/dist/components/mg-skip-links.js +1 -1
  100. package/dist/components/mg-table.js +1 -1
  101. package/dist/components/mg-tabs2.js +1 -1
  102. package/dist/components/mg-tooltip2.js +1 -1
  103. package/dist/custom-elements.json +8828 -0
  104. package/dist/esm/{index-DFwaH2hS.js → index-DshvCiTL.js} +325 -1789
  105. package/dist/esm/loader.js +3 -3
  106. package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +244 -173
  107. package/dist/esm/mg-alert.entry.js +6 -2
  108. package/dist/esm/mg-breadcrumb.entry.js +2 -2
  109. package/dist/esm/mg-components.js +4 -4
  110. package/dist/esm/mg-fieldset.entry.js +4 -3
  111. package/dist/esm/mg-input-combobox.entry.js +4 -3
  112. package/dist/esm/mg-input-file.entry.js +5 -4
  113. package/dist/esm/mg-input-rich-text-editor.entry.js +7491 -6367
  114. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  115. package/dist/esm/mg-loader.entry.js +2 -2
  116. package/dist/esm/mg-progress.entry.js +2 -2
  117. package/dist/mg-components/mg-components.esm.js +1 -1
  118. package/dist/mg-components/{p-d5e69c95.entry.js → p-13feb37a.entry.js} +1 -1
  119. package/dist/mg-components/{p-c8c8cfc1.entry.js → p-236bb1d2.entry.js} +1 -1
  120. package/dist/mg-components/p-79265ad3.entry.js +1 -0
  121. package/dist/mg-components/{p-adec7fcc.entry.js → p-7c63e469.entry.js} +1 -1
  122. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  123. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  124. package/dist/mg-components/p-DshvCiTL.js +2 -0
  125. package/dist/mg-components/p-a0e2c886.entry.js +1 -0
  126. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  127. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  128. package/dist/mg-components/{p-c63f97f0.entry.js → p-d698fa67.entry.js} +283 -283
  129. package/dist/types/assets/icons/index.d.ts +2 -0
  130. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  131. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  132. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
  133. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
  134. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
  135. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
  136. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  137. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  138. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  139. package/dist/types/components.d.ts +547 -170
  140. package/dist/types/stencil-public-runtime.d.ts +53 -2
  141. package/ide/intellij/web-types.json +211 -3476
  142. package/ide/vscode/css-custom-data.json +1 -1
  143. package/ide/vscode/html-custom-data.json +58 -314
  144. package/package.json +30 -25
  145. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  146. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
  147. package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
  148. package/dist/components/mg-input-checkbox-paginated.js +0 -1
  149. package/dist/components/mg-input-checkbox-paginated2.js +0 -1
  150. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  151. package/dist/mg-components/p-0482eb9f.entry.js +0 -1
  152. package/dist/mg-components/p-2ee92f38.entry.js +0 -1
  153. package/dist/mg-components/p-3b653226.entry.js +0 -1
  154. package/dist/mg-components/p-5745fbea.entry.js +0 -1
  155. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  156. package/dist/mg-components/p-DFwaH2hS.js +0 -2
  157. package/dist/mg-components/p-cc793586.entry.js +0 -1
  158. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
@@ -1,12 +1,14 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, cleanString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
- import { checkboxTypes, SectionKind } from "./mg-input-checkbox.conf";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
4
+ import { checkboxTypes, SectionKind, } from "./mg-input-checkbox.conf";
4
5
  import { MgInputCheckboxList } from "./MgInputCheckboxList";
5
6
  import { classDisabled, classReadonly, classFieldset, classVerticalList } from "../mg-input/mg-input.conf";
6
7
  import { initLocales } from "../../../../locales";
7
8
  import { Status } from "../../mg-tabs/mg-tabs.conf";
9
+ import { MgInputCheckboxPaginated } from "./MgInputCheckboxPaginated";
8
10
  /**
9
- * type CheckboxItem validation function
11
+ * type ICheckboxItem validation function
10
12
  * @param items - Checkbox item
11
13
  * @returns match item type
12
14
  */
@@ -26,6 +28,7 @@ export class MgInputCheckbox {
26
28
  // "multi" setup
27
29
  this.multiStart = 5;
28
30
  this.searchStart = 10;
31
+ this.paginatedStep = 10;
29
32
  // popover variables
30
33
  this.hasOpenedPopover = false;
31
34
  this.checkboxesId = 'checkboxes-list';
@@ -91,6 +94,10 @@ export class MgInputCheckbox {
91
94
  * Define <mg-tabs> active-tab
92
95
  */
93
96
  this.activeTab = 1;
97
+ /**
98
+ * Paginated sections limit per key
99
+ */
100
+ this.paginatedLimits = {};
94
101
  /**
95
102
  * Handle input event
96
103
  * @param event - input event
@@ -136,8 +143,9 @@ export class MgInputCheckbox {
136
143
  * @param event - input value-change event
137
144
  */
138
145
  this.handleSearchChange = (event) => {
139
- this.searchValue = event.detail;
140
146
  event.stopPropagation();
147
+ event.preventDefault();
148
+ this.searchValue = event.detail;
141
149
  };
142
150
  /**
143
151
  * Handle <mg-tabs> tab-change event
@@ -269,9 +277,15 @@ export class MgInputCheckbox {
269
277
  * Reset <mg-input-checkbox-paginated> limit state
270
278
  */
271
279
  this.resetTabsLimit = () => {
272
- Array.from(this.element.shadowRoot.querySelectorAll('mg-input-checkbox-paginated')).forEach(component => {
273
- component.resetLimit();
274
- });
280
+ this.paginatedLimits = {};
281
+ };
282
+ /**
283
+ * Handle load-more action for a paginated section
284
+ * @param key - section key
285
+ */
286
+ this.handlePaginatedLoadMore = (key) => {
287
+ var _a;
288
+ this.paginatedLimits = Object.assign(Object.assign({}, this.paginatedLimits), { [key]: ((_a = this.paginatedLimits[key]) !== null && _a !== void 0 ? _a : this.paginatedStep) + this.paginatedStep });
275
289
  };
276
290
  /**
277
291
  * Renders the readonly value of the input.
@@ -292,7 +306,7 @@ export class MgInputCheckbox {
292
306
  this.valueChange.emit(newValue);
293
307
  }
294
308
  else {
295
- throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type, CheckboxItem. Passed value: ${toString(newValue)}.`);
309
+ throw new Error(`<mg-input-checkbox> prop "value" is required and all values must be the same type, ICheckboxItem. Passed value: ${toString(newValue)}.`);
296
310
  }
297
311
  }
298
312
  validateType(newValue) {
@@ -485,6 +499,7 @@ export class MgInputCheckbox {
485
499
  componentWillLoad() {
486
500
  // Get locales
487
501
  this.messages = initLocales(this.element).messages;
502
+ normalizeBooleanAttributes(this);
488
503
  // Validate
489
504
  // `validateType` must be done before `validateValue` because we need to set mode['auto'|'custom'] from type
490
505
  // and `validateValue` updates `this.checkboxItems` watcher which requires a defined `this.type`.
@@ -517,7 +532,7 @@ export class MgInputCheckbox {
517
532
  * @param checkboxes - checkboxes to render
518
533
  * @returns render sections of checkboxes
519
534
  */
520
- renderCheckboxTabs(checkboxes, checkboxPaginatedProps) {
535
+ renderCheckboxTabs(props) {
521
536
  const handleMassAction = (kind) => () => {
522
537
  const displayItems = this.getDisplayItems();
523
538
  // update only displayed items
@@ -528,39 +543,43 @@ export class MgInputCheckbox {
528
543
  });
529
544
  this.updateValues();
530
545
  };
531
- const [checkedValues, notCheckedValues] = checkboxes.reduce((acc, curr) => {
546
+ const [checkedValues, notCheckedValues] = props.checkboxes.reduce((acc, curr) => {
532
547
  acc[curr.value ? 0 : 1].push(curr);
533
548
  return acc;
534
549
  }, [[], []]);
535
550
  const sections = [
536
- Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
537
- Object.assign(Object.assign({}, checkboxPaginatedProps), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), handleMassAction: handleMassAction(SectionKind.SELECTED) }),
551
+ Object.assign(Object.assign({}, props), { checkboxes: notCheckedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.notSelected), { showMore: this.messages.input.showMore }), key: SectionKind.NOT_SELECTED, handleMassAction: handleMassAction(SectionKind.NOT_SELECTED) }),
552
+ Object.assign(Object.assign({}, props), { checkboxes: checkedValues, messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.selected), { showMore: this.messages.input.showMore }), key: SectionKind.SELECTED, handleMassAction: handleMassAction(SectionKind.SELECTED) }),
538
553
  ];
539
554
  return (h("mg-tabs", { identifier: `${this.identifier}-tabs`, class: "mg-c-input__tabs", label: this.messages.input.checkbox.sections.label, items: sections.map((section, key) => ({
540
555
  label: section.messages.title,
541
556
  badge: { value: section.checkboxes.length, label: this.messages.input.checkbox.sections.badge.label, role: 'information' },
542
557
  status: key + 1 === this.activeTab ? Status.ACTIVE : Status.VISIBLE,
543
- })), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map((section, key) => (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab", slot: `tab_content-${key + 1}` }, section, { key: section.messages.title }), section.checkboxes.length > 0 && section.checkboxes.some(checkbox => checkbox.disabled !== true) && (h("mg-tooltip", { slot: "header-action", class: "mg-c-input__tabs-action", message: section.messages.tooltip }, h("mg-button", { variant: "link", onClick: section.handleMassAction }, section.messages.action))))))));
558
+ })), activeTab: this.activeTab, "onActive-tab-change": this.handleActiveTabChange }, sections.map(section => {
559
+ var _a;
560
+ return (h(MgInputCheckboxPaginated, Object.assign({}, section, { limit: (_a = this.paginatedLimits[section.key]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(section.key) })));
561
+ })));
544
562
  }
545
563
  /**
546
564
  * render checkbox multi element
547
565
  * @returns html element
548
566
  */
549
567
  renderCheckboxMulti() {
568
+ var _a;
550
569
  const selectedValuesNb = this.getSelectedItems().length;
551
- const checkboxes = this.getDisplayItems();
552
- const checkboxPaginatedProps = {
570
+ const props = {
553
571
  readonly: this.readonly,
554
572
  disabled: this.disabled,
555
- identifier: this.identifier,
573
+ checkboxes: this.getDisplayItems(),
556
574
  };
575
+ const checkboxesPaginatedSearchProps = Object.assign(Object.assign({}, props), { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), key: SectionKind.SEARCH, limit: (_a = this.paginatedLimits[SectionKind.SEARCH]) !== null && _a !== void 0 ? _a : this.paginatedStep, handleLoadMore: () => this.handlePaginatedLoadMore(SectionKind.SEARCH) });
557
576
  return (h("div", { class: "mg-c-input__input-container" }, h("mg-popover", { arrowHide: true, identifier: this.getMgPopoverIdentifier(), display: this.hasOpenedPopover, "onDisplay-change": this.handleMgPopoverDisplayChange, ref: (el) => {
558
577
  if (el !== null)
559
578
  this.mgPopover = el;
560
579
  } }, h("mg-button", { variant: "secondary", "aria-describedby": `${this.identifier}-title` }, h("mg-icon", { icon: "list" }), this.getSelectValuesButtonMessage()), h("div", { slot: "content", class: "mg-c-input__content" }, this.displaySearchInput ? ([
561
580
  h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.sections.search.label, label: this.messages.input.checkbox.sections.search.label, mgWidth: "full", value: this.searchValue, labelHide: true, characterLeftHide: true, name: "q", "onValue-change": this.handleSearchChange }),
562
- this.searchValue.length > 0 ? (h("mg-input-checkbox-paginated", Object.assign({ class: "mg-c-input__tab" }, checkboxPaginatedProps, { messages: Object.assign(Object.assign({}, this.messages.input.checkbox.sections.search), { showMore: this.messages.input.showMore }), checkboxes: checkboxes, key: "search" }))) : (this.renderCheckboxTabs(checkboxes, checkboxPaginatedProps)),
563
- ]) : (h(MgInputCheckboxList, { checkboxes: checkboxes, id: this.checkboxesId, disabled: this.disabled, name: this.name, invalid: this.invalid })))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("b", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
581
+ this.searchValue.length > 0 ? h(MgInputCheckboxPaginated, Object.assign({}, checkboxesPaginatedSearchProps)) : this.renderCheckboxTabs(props),
582
+ ]) : (h(MgInputCheckboxList, Object.assign({}, props, { id: this.checkboxesId, name: this.name, invalid: this.invalid }))))), this.displaySelectedValues ? (selectedValuesNb > 0 && (h("ul", { role: "list", class: "mg-c-input__input-container-list" }, this.getSelectedItems().map(({ title }) => (h("li", { class: "mg-c-input__input-value", key: title }, title)))))) : (h("b", null, this.messages.input.checkbox[selectedValuesNb > 1 ? 'selectedValues' : 'selectedValue'].replace('{nb}', selectedValuesNb)))));
564
583
  }
565
584
  /**
566
585
  * Render
@@ -578,7 +597,7 @@ export class MgInputCheckbox {
578
597
  else {
579
598
  inputContent = this.renderCheckboxMulti();
580
599
  }
581
- return (h("mg-input", { key: 'c5797a119a653c27004a171b7b79be7d4504800d', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
600
+ return (h("mg-input", { key: '45c7481c738c254f20892d9c38ba53fd4d22cd7a', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
582
601
  }
583
602
  static get is() { return "mg-input-checkbox"; }
584
603
  static get encapsulation() { return "shadow"; }
@@ -598,13 +617,14 @@ export class MgInputCheckbox {
598
617
  "type": "unknown",
599
618
  "mutable": true,
600
619
  "complexType": {
601
- "original": "CheckboxValue[]",
602
- "resolved": "CheckboxValue[]",
620
+ "original": "ICheckboxValue[]",
621
+ "resolved": "ICheckboxValue[]",
603
622
  "references": {
604
- "CheckboxValue": {
623
+ "ICheckboxValue": {
605
624
  "location": "import",
606
625
  "path": "./mg-input-checkbox.conf",
607
- "id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxValue"
626
+ "id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::ICheckboxValue",
627
+ "referenceLocation": "ICheckboxValue"
608
628
  }
609
629
  }
610
630
  },
@@ -627,7 +647,8 @@ export class MgInputCheckbox {
627
647
  "CheckboxType": {
628
648
  "location": "import",
629
649
  "path": "./mg-input-checkbox.conf",
630
- "id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxType"
650
+ "id": "src/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.ts::CheckboxType",
651
+ "referenceLocation": "CheckboxType"
631
652
  }
632
653
  }
633
654
  },
@@ -869,7 +890,8 @@ export class MgInputCheckbox {
869
890
  "TooltipPosition": {
870
891
  "location": "import",
871
892
  "path": "../mg-input/mg-input.conf",
872
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
893
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
894
+ "referenceLocation": "TooltipPosition"
873
895
  }
874
896
  }
875
897
  },
@@ -1010,7 +1032,8 @@ export class MgInputCheckbox {
1010
1032
  "searchValue": {},
1011
1033
  "searchResults": {},
1012
1034
  "selectValuesButtonKey": {},
1013
- "activeTab": {}
1035
+ "activeTab": {},
1036
+ "paginatedLimits": {}
1014
1037
  };
1015
1038
  }
1016
1039
  static get events() {
@@ -1026,7 +1049,7 @@ export class MgInputCheckbox {
1026
1049
  },
1027
1050
  "complexType": {
1028
1051
  "original": "HTMLMgInputCheckboxElement['value']",
1029
- "resolved": "CheckboxValue[]",
1052
+ "resolved": "ICheckboxValue[]",
1030
1053
  "references": {
1031
1054
  "HTMLMgInputCheckboxElement": {
1032
1055
  "location": "global",
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { allItemsAreString, ClassList, getObjectValueFromKey, isValidString, nextTick, Page, Paginate, Cursor, toString, isObject, formatID, } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, Cursor, Page, Paginate, allItemsAreString, formatID, getObjectValueFromKey, isObject, isValidString, nextTick, toString, } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { widths, classReadonly, classDisabled } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  import { Keys } from "../../../../utils/events.utils";
@@ -709,6 +710,7 @@ export class MgInputCombobox {
709
710
  componentWillLoad() {
710
711
  // Get locales
711
712
  this.messages = initLocales(this.element).messages;
713
+ normalizeBooleanAttributes(this);
712
714
  // Validate
713
715
  this.watchIdentifier(this.identifier);
714
716
  this.watchItems(this.items);
@@ -758,7 +760,7 @@ export class MgInputCombobox {
758
760
  else {
759
761
  activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
760
762
  }
761
- return (h("mg-input", { key: 'd16350f2e21e492932e7264c076454a249e1f5f2', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
763
+ return (h("mg-input", { key: '3f9b79e5c34d691589c16d0955883109501b86fc', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
762
764
  '--mg-c-input-list-width': ((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) > 0 ? `${this.input.offsetWidth}px` : undefined,
763
765
  }, "data-fallback-placement": "bottom-end", "onDisplay-change": this.handlePopoverDisplay }, h("div", { class: "mg-c-input__input-group-container" }, h("mg-icon", { icon: "magnifying-glass" }), h("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: this.disabled, required: this.required, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.popoverDisplay.toString(), "aria-controls": listId, "aria-invalid": (this.invalid === true).toString(), "aria-activedescendant": formatID(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
764
766
  if (el !== null)
@@ -806,7 +808,8 @@ export class MgInputCombobox {
806
808
  "Option": {
807
809
  "location": "import",
808
810
  "path": "../../../../types",
809
- "id": "src/types/index.ts::Option"
811
+ "id": "src/types/index.ts::Option",
812
+ "referenceLocation": "Option"
810
813
  }
811
814
  }
812
815
  },
@@ -831,7 +834,8 @@ export class MgInputCombobox {
831
834
  "Option": {
832
835
  "location": "import",
833
836
  "path": "../../../../types",
834
- "id": "src/types/index.ts::Option"
837
+ "id": "src/types/index.ts::Option",
838
+ "referenceLocation": "Option"
835
839
  }
836
840
  }
837
841
  },
@@ -1053,7 +1057,8 @@ export class MgInputCombobox {
1053
1057
  "Width": {
1054
1058
  "location": "import",
1055
1059
  "path": "../mg-input/mg-input.conf",
1056
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
1060
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
1061
+ "referenceLocation": "Width"
1057
1062
  }
1058
1063
  }
1059
1064
  },
@@ -1098,7 +1103,8 @@ export class MgInputCombobox {
1098
1103
  "TooltipPosition": {
1099
1104
  "location": "import",
1100
1105
  "path": "../mg-input/mg-input.conf",
1101
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
1106
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
1107
+ "referenceLocation": "TooltipPosition"
1102
1108
  }
1103
1109
  }
1104
1110
  },
@@ -1198,12 +1204,14 @@ export class MgInputCombobox {
1198
1204
  "RequestMappingType": {
1199
1205
  "location": "import",
1200
1206
  "path": "./mg-input-combobox.conf",
1201
- "id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::RequestMappingType"
1207
+ "id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::RequestMappingType",
1208
+ "referenceLocation": "RequestMappingType"
1202
1209
  },
1203
1210
  "ResponseMappingType": {
1204
1211
  "location": "import",
1205
1212
  "path": "./mg-input-combobox.conf",
1206
- "id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::ResponseMappingType"
1213
+ "id": "src/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.ts::ResponseMappingType",
1214
+ "referenceLocation": "ResponseMappingType"
1207
1215
  }
1208
1216
  }
1209
1217
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { ClassList, isValidString, dateRegExp, dateToString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, dateRegExp, dateToString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeDate, localeDatePattern } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { DEFAULT_MAX_DATE } from "./mg-input-date.conf";
5
6
  import { classReadonly, classDisabled } from "../mg-input/mg-input.conf";
@@ -339,6 +340,7 @@ export class MgInputDate {
339
340
  // as a native input use the OS locale to define the date pattern
340
341
  // we need to get this locale to define the displayed pattern
341
342
  this.systemLocale = Intl.DateTimeFormat().resolvedOptions().locale;
343
+ normalizeBooleanAttributes(this);
342
344
  // Validate
343
345
  this.validateValue(this.value);
344
346
  this.validateMinMax(this.min);
@@ -357,7 +359,7 @@ export class MgInputDate {
357
359
  * @returns HTML Element
358
360
  */
359
361
  render() {
360
- return (h("mg-input", { key: '53d23a27355884d3b3ac996188f619ad325d58b6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
362
+ return (h("mg-input", { key: '7c6abb93dd859ba55d62860f4fac79ec29273fac', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
361
363
  if (el !== null)
362
364
  this.input = el;
363
365
  } }))));
@@ -621,7 +623,8 @@ export class MgInputDate {
621
623
  "TooltipPosition": {
622
624
  "location": "import",
623
625
  "path": "../mg-input/mg-input.conf",
624
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
626
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
627
+ "referenceLocation": "TooltipPosition"
625
628
  }
626
629
  }
627
630
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { allItemsAreString, ClassList, isObject, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, allItemsAreString, isObject, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeByte } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { classDisabled } from "../mg-input/mg-input.conf";
5
6
  import { initLocales } from "../../../../locales";
@@ -314,6 +315,7 @@ export class MgInputFile {
314
315
  const locales = initLocales(this.element);
315
316
  this.locale = locales.locale;
316
317
  this.messages = locales.messages;
318
+ normalizeBooleanAttributes(this);
317
319
  // Validate
318
320
  this.watchValue(this.value);
319
321
  this.watchDisabled(this.disabled);
@@ -332,9 +334,9 @@ export class MgInputFile {
332
334
  * @returns HTML Element
333
335
  */
334
336
  render() {
335
- return (h("mg-input", { key: '48337d8e0a059dbea60c4bfa152468429b37b897', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: 'b0a67412ce2a054ce84f001efe01156bfce001a1', class: "mg-c-input__file-container" }, h("input", { key: '0585b37ac4da8e5b29b94c04a298cfd8451016c9', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
337
+ return (h("mg-input", { key: '0ca01b9b4697f55406262e93438946c2fe12e5f5', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '99fe30d5339687054392ca2fd8773af76af35396', class: "mg-c-input__file-container" }, h("input", { key: '84d9bee62d4c0c5975b561cc3e261905c759556f', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
336
338
  this.inputElement = el;
337
- } }), h("mg-button", { key: '0c71ea34375f60a357ad2aa38353c7acafc1091a', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
339
+ } }), h("mg-button", { key: '1b6694f7c36fa2c8a2c5347d93a9cb07678e9363', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
338
340
  this.fileButtonElement = el;
339
341
  } }, this.messages.input.file.browse), this.renderFiles())));
340
342
  }
@@ -615,7 +617,8 @@ export class MgInputFile {
615
617
  "TooltipPosition": {
616
618
  "location": "import",
617
619
  "path": "../mg-input/mg-input.conf",
618
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
620
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
621
+ "referenceLocation": "TooltipPosition"
619
622
  }
620
623
  }
621
624
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeCurrency, localeNumber, localePercent, localeUnit } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { types, formats } from "./mg-input-numeric.conf";
5
6
  import { classReadonly, classDisabled, widths } from "../mg-input/mg-input.conf";
@@ -437,6 +438,7 @@ export class MgInputNumeric {
437
438
  const locales = initLocales(this.element);
438
439
  this.locale = locales.locale;
439
440
  this.messages = locales.messages;
441
+ normalizeBooleanAttributes(this);
440
442
  // Validate component config
441
443
  this.watchFormat(this.format);
442
444
  this.validateType(this.type);
@@ -460,7 +462,7 @@ export class MgInputNumeric {
460
462
  * @returns HTML Element
461
463
  */
462
464
  render() {
463
- return (h("mg-input", { key: '4529f67fe43372530d723e8e8a7a6c44f5057bbd', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
465
+ return (h("mg-input", { key: '734f1734139c5919481693c869da68586f18a92f', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
464
466
  ? this.readonlyValue && this.renderReadonly()
465
467
  : [
466
468
  h("input", { key: "input", type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
@@ -728,7 +730,8 @@ export class MgInputNumeric {
728
730
  "Width": {
729
731
  "location": "import",
730
732
  "path": "../mg-input/mg-input.conf",
731
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
733
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
734
+ "referenceLocation": "Width"
732
735
  }
733
736
  }
734
737
  },
@@ -772,7 +775,8 @@ export class MgInputNumeric {
772
775
  "TooltipPosition": {
773
776
  "location": "import",
774
777
  "path": "../mg-input/mg-input.conf",
775
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
778
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
779
+ "referenceLocation": "TooltipPosition"
776
780
  }
777
781
  }
778
782
  },
@@ -817,7 +821,8 @@ export class MgInputNumeric {
817
821
  "NumericType": {
818
822
  "location": "import",
819
823
  "path": "./mg-input-numeric.conf",
820
- "id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::NumericType"
824
+ "id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::NumericType",
825
+ "referenceLocation": "NumericType"
821
826
  }
822
827
  }
823
828
  },
@@ -843,7 +848,8 @@ export class MgInputNumeric {
843
848
  "Format": {
844
849
  "location": "import",
845
850
  "path": "./mg-input-numeric.conf",
846
- "id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::Format"
851
+ "id": "src/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.ts::Format",
852
+ "referenceLocation": "Format"
847
853
  }
848
854
  }
849
855
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled, widths } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  export class MgInputPassword {
@@ -233,6 +234,7 @@ export class MgInputPassword {
233
234
  componentWillLoad() {
234
235
  // Get locales
235
236
  this.messages = initLocales(this.element).messages;
237
+ normalizeBooleanAttributes(this);
236
238
  this.watchReadonly(this.readonly);
237
239
  this.watchDisabled(this.disabled);
238
240
  this.watchMgWidth(this.mgWidth);
@@ -248,7 +250,7 @@ export class MgInputPassword {
248
250
  * @returns HTML Element
249
251
  */
250
252
  render() {
251
- return (h("mg-input", { key: '7154d79c2c609f47ae7c9542cffd1c92d26ce383', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
253
+ return (h("mg-input", { key: 'fb26a8db11651950de2fe01600443bf2d6cad9e6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
252
254
  if (el !== null)
253
255
  this.input = el;
254
256
  } }), h("mg-button", { label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { class: "mg-c-input__input-icon", icon: (this.displayPassword ? 'eye-slash' : 'eye') }))))));
@@ -492,7 +494,8 @@ export class MgInputPassword {
492
494
  "Width": {
493
495
  "location": "import",
494
496
  "path": "../mg-input/mg-input.conf",
495
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width"
497
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::Width",
498
+ "referenceLocation": "Width"
496
499
  }
497
500
  }
498
501
  },
@@ -537,7 +540,8 @@ export class MgInputPassword {
537
540
  "TooltipPosition": {
538
541
  "location": "import",
539
542
  "path": "../mg-input/mg-input.conf",
540
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
543
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
544
+ "referenceLocation": "TooltipPosition"
541
545
  }
542
546
  }
543
547
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, allItemsAreString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled, classFieldset } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  /**
@@ -266,6 +267,7 @@ export class MgInputRadio {
266
267
  componentWillLoad() {
267
268
  // Get locales
268
269
  this.messages = initLocales(this.element).messages;
270
+ normalizeBooleanAttributes(this);
269
271
  // Validate
270
272
  this.validateItems(this.items);
271
273
  this.watchInputVerticalList(this.inputVerticalList);
@@ -284,7 +286,7 @@ export class MgInputRadio {
284
286
  * @returns HTML Element
285
287
  */
286
288
  render() {
287
- return (h("mg-input", { key: 'bdeb5a98bc7f4567beb293c1fcf4f99169089fa6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
289
+ return (h("mg-input", { key: 'a749870b0b690a52d75a5ab6340e26cf0b1449c0', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
288
290
  if (el !== null)
289
291
  this.inputs[index] = el;
290
292
  } }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
@@ -332,7 +334,8 @@ export class MgInputRadio {
332
334
  "RadioOption": {
333
335
  "location": "import",
334
336
  "path": "./mg-input-radio.conf",
335
- "id": "src/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.ts::RadioOption"
337
+ "id": "src/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.ts::RadioOption",
338
+ "referenceLocation": "RadioOption"
336
339
  }
337
340
  }
338
341
  },
@@ -552,7 +555,8 @@ export class MgInputRadio {
552
555
  "TooltipPosition": {
553
556
  "location": "import",
554
557
  "path": "../mg-input/mg-input.conf",
555
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
558
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
559
+ "referenceLocation": "TooltipPosition"
556
560
  }
557
561
  }
558
562
  },
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  import { Sanitizer } from "@mgdis/sanitize-html";
@@ -312,6 +313,7 @@ export class MgInputRichTextEditor {
312
313
  componentWillLoad() {
313
314
  // Get locales
314
315
  this.messages = initLocales(this.element).messages;
316
+ normalizeBooleanAttributes(this);
315
317
  // Validate
316
318
  this.validatePattern(this.pattern);
317
319
  this.validatePattern(this.patternErrorMessage);
@@ -375,7 +377,7 @@ export class MgInputRichTextEditor {
375
377
  * @returns HTML mg-input Element
376
378
  */
377
379
  render() {
378
- return (h("mg-input", { key: '3f7c51ee9114279bff924e698b66853b721a5907', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { id: this.identifier, class: "mg-c-input__wrapper" }, h("textarea", { name: this.name, ref: (el) => {
380
+ return (h("mg-input", { key: '0236e3c0a380087557c381077ad382029a6b7ec7', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { id: this.identifier, class: "mg-c-input__wrapper" }, h("textarea", { name: this.name, ref: (el) => {
379
381
  if (el !== null)
380
382
  this.editorElement = el;
381
383
  } })))));
@@ -678,7 +680,8 @@ export class MgInputRichTextEditor {
678
680
  "TooltipPosition": {
679
681
  "location": "import",
680
682
  "path": "../mg-input/mg-input.conf",
681
- "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition"
683
+ "id": "src/components/molecules/inputs/mg-input/mg-input.conf.ts::TooltipPosition",
684
+ "referenceLocation": "TooltipPosition"
682
685
  }
683
686
  }
684
687
  },
@@ -723,7 +726,8 @@ export class MgInputRichTextEditor {
723
726
  "ButtonsOption": {
724
727
  "location": "import",
725
728
  "path": "./editor/editor.conf",
726
- "id": "src/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.ts::ButtonsOption"
729
+ "id": "src/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.ts::ButtonsOption",
730
+ "referenceLocation": "ButtonsOption"
727
731
  }
728
732
  }
729
733
  },
@@ -748,7 +752,8 @@ export class MgInputRichTextEditor {
748
752
  "SanitizerOptions": {
749
753
  "location": "import",
750
754
  "path": "@mgdis/sanitize-html",
751
- "id": "../sanitize-html/dist/index.d.ts::SanitizerOptions"
755
+ "id": "../sanitize-html/dist/index.d.ts::SanitizerOptions",
756
+ "referenceLocation": "SanitizerOptions"
752
757
  }
753
758
  }
754
759
  },