@mgdis/core-ui-helpers 1.2.1 → 1.3.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 (143) hide show
  1. package/dist/angular/index.cjs +1 -1
  2. package/dist/angular/index.cjs.map +1 -1
  3. package/dist/angular/index.js +1 -1
  4. package/dist/angular/index.js.map +1 -1
  5. package/dist/angular/index.umd.js +1 -1
  6. package/dist/angular/index.umd.js.map +1 -1
  7. package/dist/locale/index.cjs +3 -1
  8. package/dist/locale/index.cjs.map +1 -1
  9. package/dist/locale/index.js +3 -1
  10. package/dist/locale/index.js.map +1 -1
  11. package/dist/locale/index.umd.js +3 -1
  12. package/dist/locale/index.umd.js.map +1 -1
  13. package/dist/playwright/index.cjs +12 -5
  14. package/dist/playwright/index.cjs.map +1 -1
  15. package/dist/playwright/index.js +12 -5
  16. package/dist/playwright/index.js.map +1 -1
  17. package/dist/playwright/index.umd.js +12 -5
  18. package/dist/playwright/index.umd.js.map +1 -1
  19. package/dist/stencil/index.cjs +33 -33
  20. package/dist/stencil/index.cjs.map +1 -1
  21. package/dist/stencil/index.js +33 -33
  22. package/dist/stencil/index.js.map +1 -1
  23. package/dist/stencil/index.umd.js +33 -33
  24. package/dist/stencil/index.umd.js.map +1 -1
  25. package/dist/storybook/index.cjs +9 -7
  26. package/dist/storybook/index.cjs.map +1 -1
  27. package/dist/storybook/index.js +9 -7
  28. package/dist/storybook/index.js.map +1 -1
  29. package/dist/storybook/index.umd.js +9 -7
  30. package/dist/storybook/index.umd.js.map +1 -1
  31. package/dist/tests/index.cjs +24 -9
  32. package/dist/tests/index.cjs.map +1 -1
  33. package/dist/tests/index.d.ts +2 -2
  34. package/dist/tests/index.js +24 -9
  35. package/dist/tests/index.js.map +1 -1
  36. package/dist/tests/index.umd.js +24 -9
  37. package/dist/tests/index.umd.js.map +1 -1
  38. package/dist/utils/index.cjs +14 -6
  39. package/dist/utils/index.cjs.map +1 -1
  40. package/dist/utils/index.js +14 -6
  41. package/dist/utils/index.js.map +1 -1
  42. package/dist/utils/index.umd.js +14 -6
  43. package/dist/utils/index.umd.js.map +1 -1
  44. package/dist/vue/index.cjs +2 -1
  45. package/dist/vue/index.cjs.map +1 -1
  46. package/dist/vue/index.js +2 -1
  47. package/dist/vue/index.js.map +1 -1
  48. package/dist/vue/index.umd.js +2 -1
  49. package/dist/vue/index.umd.js.map +1 -1
  50. package/package.json +11 -8
  51. package/.turbo/turbo-build.log +0 -49
  52. package/CHANGELOG.md +0 -95
  53. package/json-doc.test.json +0 -264
  54. package/rollup.config.mjs +0 -61
  55. package/src/angular/index.spec.ts +0 -8
  56. package/src/angular/index.ts +0 -1
  57. package/src/angular/mg-angular-logger/index.ts +0 -1
  58. package/src/angular/mg-angular-logger/mg-angular-logger.conf.ts +0 -3
  59. package/src/angular/mg-angular-logger/mg-angular-logger.spec.ts +0 -40
  60. package/src/angular/mg-angular-logger/mg-angular-logger.ts +0 -23
  61. package/src/locale/index.spec.ts +0 -15
  62. package/src/locale/index.ts +0 -1
  63. package/src/locale/locale.spec.ts +0 -266
  64. package/src/locale/locale.ts +0 -193
  65. package/src/playwright/config/index.ts +0 -43
  66. package/src/playwright/index.spec.ts +0 -16
  67. package/src/playwright/index.ts +0 -4
  68. package/src/playwright/utils/__snapshots__/utils.spec.ts.snap +0 -48
  69. package/src/playwright/utils/index.ts +0 -1
  70. package/src/playwright/utils/utils.spec.ts +0 -43
  71. package/src/playwright/utils/utils.ts +0 -69
  72. package/src/stencil/ide/__snapshots__/cem.spec.ts.snap +0 -248
  73. package/src/stencil/ide/__snapshots__/ide.spec.ts.snap +0 -414
  74. package/src/stencil/ide/cem.spec.ts +0 -35
  75. package/src/stencil/ide/cem.ts +0 -96
  76. package/src/stencil/ide/ide.spec.ts +0 -29
  77. package/src/stencil/ide/ide.ts +0 -221
  78. package/src/stencil/ide/index.ts +0 -2
  79. package/src/stencil/index.spec.ts +0 -16
  80. package/src/stencil/index.ts +0 -2
  81. package/src/stencil/normalize-boolean-attributes/index.ts +0 -1
  82. package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.spec.ts +0 -63
  83. package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts +0 -40
  84. package/src/storybook/index.spec.ts +0 -19
  85. package/src/storybook/index.ts +0 -1
  86. package/src/storybook/stencil/__snapshots__/stencil.spec.ts.snap +0 -329
  87. package/src/storybook/stencil/index.ts +0 -1
  88. package/src/storybook/stencil/stencil-shim.d.ts +0 -1
  89. package/src/storybook/stencil/stencil.conf.ts +0 -4
  90. package/src/storybook/stencil/stencil.spec.ts +0 -146
  91. package/src/storybook/stencil/stencil.ts +0 -366
  92. package/src/tests/index.spec.ts +0 -14
  93. package/src/tests/index.ts +0 -1
  94. package/src/tests/unit/__snapshots__/unit.spec.ts.snap +0 -52
  95. package/src/tests/unit/index.ts +0 -1
  96. package/src/tests/unit/unit.conf.ts +0 -9
  97. package/src/tests/unit/unit.spec.ts +0 -164
  98. package/src/tests/unit/unit.ts +0 -306
  99. package/src/utils/attributes/class-list/class-list.spec.ts +0 -36
  100. package/src/utils/attributes/class-list/class-list.ts +0 -51
  101. package/src/utils/attributes/class-list/index.ts +0 -1
  102. package/src/utils/attributes/id/id.spec.ts +0 -51
  103. package/src/utils/attributes/id/id.ts +0 -46
  104. package/src/utils/attributes/id/index.ts +0 -1
  105. package/src/utils/attributes/index.ts +0 -3
  106. package/src/utils/attributes/to-kebab-case/index.ts +0 -1
  107. package/src/utils/attributes/to-kebab-case/to-kebab-case.spec.ts +0 -29
  108. package/src/utils/attributes/to-kebab-case/to-kebab-case.ts +0 -23
  109. package/src/utils/components/__snapshots__/components.spec.ts.snap +0 -313
  110. package/src/utils/components/components.conf.ts +0 -11
  111. package/src/utils/components/components.spec.ts +0 -192
  112. package/src/utils/components/components.ts +0 -138
  113. package/src/utils/components/index.ts +0 -2
  114. package/src/utils/date/date.spec.ts +0 -12
  115. package/src/utils/date/date.ts +0 -20
  116. package/src/utils/date/index.ts +0 -1
  117. package/src/utils/elements/elements.spec.ts +0 -17
  118. package/src/utils/elements/elements.ts +0 -16
  119. package/src/utils/elements/index.ts +0 -1
  120. package/src/utils/index.spec.ts +0 -84
  121. package/src/utils/index.ts +0 -8
  122. package/src/utils/number/index.ts +0 -1
  123. package/src/utils/number/number.spec.ts +0 -14
  124. package/src/utils/number/number.ts +0 -6
  125. package/src/utils/object/index.ts +0 -2
  126. package/src/utils/object/object.conf.ts +0 -4
  127. package/src/utils/object/object.spec.ts +0 -110
  128. package/src/utils/object/object.ts +0 -26
  129. package/src/utils/string/index.ts +0 -1
  130. package/src/utils/string/string.spec.ts +0 -47
  131. package/src/utils/string/string.ts +0 -38
  132. package/src/utils/windows/index.ts +0 -1
  133. package/src/utils/windows/windows.spec.ts +0 -65
  134. package/src/utils/windows/windows.ts +0 -50
  135. package/src/vue/index.spec.ts +0 -8
  136. package/src/vue/index.ts +0 -1
  137. package/src/vue/mg-model/index.ts +0 -1
  138. package/src/vue/mg-model/mg-model.conf.ts +0 -6
  139. package/src/vue/mg-model/mg-model.spec.ts +0 -50
  140. package/src/vue/mg-model/mg-model.ts +0 -50
  141. package/tsconfig.json +0 -17
  142. package/typedoc.json +0 -14
  143. package/vitest.config.mts +0 -13
@@ -2012,7 +2012,9 @@
2012
2012
  if ([null, undefined, '', false].includes(value) || ['innerHTML', 'style', ''].includes(name)) {
2013
2013
  return;
2014
2014
  }
2015
- element.setAttribute(name, !['object', 'function'].includes(typeof value) ? value : `⚠️ Property must be set through a script or a framework-specific syntax.`);
2015
+ element.setAttribute(name, !['object', 'function'].includes(typeof value)
2016
+ ? value
2017
+ : `⚠️ Property must be set through a script or a framework-specific syntax.`);
2016
2018
  };
2017
2019
  /**
2018
2020
  * Render new element in parent element
@@ -2026,10 +2028,10 @@
2026
2028
  // render HTML
2027
2029
  if (tagName && typeof tagName === 'string') {
2028
2030
  const element = document.createElement(tagName);
2029
- Object.keys(attributes || {}).forEach(attr => {
2031
+ Object.keys(attributes || {}).forEach((attr) => {
2030
2032
  renderAttribute(element, attr, attributes[attr]);
2031
2033
  });
2032
- children?.forEach(child => {
2034
+ children?.forEach((child) => {
2033
2035
  renderElement(element, child.$tag$, child.$attrs$, child.$children$, child.$text$);
2034
2036
  });
2035
2037
  if (attributes?.innerHTML)
@@ -2152,7 +2154,7 @@
2152
2154
  * @returns component data
2153
2155
  */
2154
2156
  #getComponentData = (tagName) => {
2155
- return this.jsonDoc.components.find(component => component.tag === tagName);
2157
+ return this.jsonDoc.components.find((component) => component.tag === tagName);
2156
2158
  };
2157
2159
  /**
2158
2160
  * Get the control for the given prop
@@ -2165,9 +2167,9 @@
2165
2167
  const types = prop.type
2166
2168
  .replace(/"([^"]+)"/g, '$1') // Remove quotes
2167
2169
  .replace(/\s/g, '') // Remove all whitespace for simplicity
2168
- .replace(/\(.*?\)/g, match => match.replace(/\|/g, ' OR ')) // Replace '|' inside parentheses
2170
+ .replace(/\(.*?\)/g, (match) => match.replace(/\|/g, ' OR ')) // Replace '|' inside parentheses
2169
2171
  .split('|')
2170
- .map(type => type.trim().replace(/ OR /g, '|')); // Revert ' OR ' back to '|'
2172
+ .map((type) => type.trim().replace(/ OR /g, '|')); // Revert ' OR ' back to '|'
2171
2173
  // Return control and options
2172
2174
  if (prop.type === 'string') {
2173
2175
  return { control: { type: 'text' } };
@@ -2186,7 +2188,7 @@
2186
2188
  if (types.includes('string')) {
2187
2189
  return { control: { type: 'text' } };
2188
2190
  }
2189
- else if (types.every(type => type?.includes('[]'))) {
2191
+ else if (types.every((type) => type?.includes('[]'))) {
2190
2192
  return { control: { type: 'object' } };
2191
2193
  }
2192
2194
  else {