@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.
- package/dist/angular/index.cjs +1 -1
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.js +1 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/index.umd.js +1 -1
- package/dist/angular/index.umd.js.map +1 -1
- package/dist/locale/index.cjs +3 -1
- package/dist/locale/index.cjs.map +1 -1
- package/dist/locale/index.js +3 -1
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/index.umd.js +3 -1
- package/dist/locale/index.umd.js.map +1 -1
- package/dist/playwright/index.cjs +12 -5
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.js +12 -5
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/index.umd.js +12 -5
- package/dist/playwright/index.umd.js.map +1 -1
- package/dist/stencil/index.cjs +33 -33
- package/dist/stencil/index.cjs.map +1 -1
- package/dist/stencil/index.js +33 -33
- package/dist/stencil/index.js.map +1 -1
- package/dist/stencil/index.umd.js +33 -33
- package/dist/stencil/index.umd.js.map +1 -1
- package/dist/storybook/index.cjs +9 -7
- package/dist/storybook/index.cjs.map +1 -1
- package/dist/storybook/index.js +9 -7
- package/dist/storybook/index.js.map +1 -1
- package/dist/storybook/index.umd.js +9 -7
- package/dist/storybook/index.umd.js.map +1 -1
- package/dist/tests/index.cjs +24 -9
- package/dist/tests/index.cjs.map +1 -1
- package/dist/tests/index.d.ts +2 -2
- package/dist/tests/index.js +24 -9
- package/dist/tests/index.js.map +1 -1
- package/dist/tests/index.umd.js +24 -9
- package/dist/tests/index.umd.js.map +1 -1
- package/dist/utils/index.cjs +14 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +14 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.umd.js +14 -6
- package/dist/utils/index.umd.js.map +1 -1
- package/dist/vue/index.cjs +2 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +2 -1
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/index.umd.js +2 -1
- package/dist/vue/index.umd.js.map +1 -1
- package/package.json +11 -8
- package/.turbo/turbo-build.log +0 -49
- package/CHANGELOG.md +0 -95
- package/json-doc.test.json +0 -264
- package/rollup.config.mjs +0 -61
- package/src/angular/index.spec.ts +0 -8
- package/src/angular/index.ts +0 -1
- package/src/angular/mg-angular-logger/index.ts +0 -1
- package/src/angular/mg-angular-logger/mg-angular-logger.conf.ts +0 -3
- package/src/angular/mg-angular-logger/mg-angular-logger.spec.ts +0 -40
- package/src/angular/mg-angular-logger/mg-angular-logger.ts +0 -23
- package/src/locale/index.spec.ts +0 -15
- package/src/locale/index.ts +0 -1
- package/src/locale/locale.spec.ts +0 -266
- package/src/locale/locale.ts +0 -193
- package/src/playwright/config/index.ts +0 -43
- package/src/playwright/index.spec.ts +0 -16
- package/src/playwright/index.ts +0 -4
- package/src/playwright/utils/__snapshots__/utils.spec.ts.snap +0 -48
- package/src/playwright/utils/index.ts +0 -1
- package/src/playwright/utils/utils.spec.ts +0 -43
- package/src/playwright/utils/utils.ts +0 -69
- package/src/stencil/ide/__snapshots__/cem.spec.ts.snap +0 -248
- package/src/stencil/ide/__snapshots__/ide.spec.ts.snap +0 -414
- package/src/stencil/ide/cem.spec.ts +0 -35
- package/src/stencil/ide/cem.ts +0 -96
- package/src/stencil/ide/ide.spec.ts +0 -29
- package/src/stencil/ide/ide.ts +0 -221
- package/src/stencil/ide/index.ts +0 -2
- package/src/stencil/index.spec.ts +0 -16
- package/src/stencil/index.ts +0 -2
- package/src/stencil/normalize-boolean-attributes/index.ts +0 -1
- package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.spec.ts +0 -63
- package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts +0 -40
- package/src/storybook/index.spec.ts +0 -19
- package/src/storybook/index.ts +0 -1
- package/src/storybook/stencil/__snapshots__/stencil.spec.ts.snap +0 -329
- package/src/storybook/stencil/index.ts +0 -1
- package/src/storybook/stencil/stencil-shim.d.ts +0 -1
- package/src/storybook/stencil/stencil.conf.ts +0 -4
- package/src/storybook/stencil/stencil.spec.ts +0 -146
- package/src/storybook/stencil/stencil.ts +0 -366
- package/src/tests/index.spec.ts +0 -14
- package/src/tests/index.ts +0 -1
- package/src/tests/unit/__snapshots__/unit.spec.ts.snap +0 -52
- package/src/tests/unit/index.ts +0 -1
- package/src/tests/unit/unit.conf.ts +0 -9
- package/src/tests/unit/unit.spec.ts +0 -164
- package/src/tests/unit/unit.ts +0 -306
- package/src/utils/attributes/class-list/class-list.spec.ts +0 -36
- package/src/utils/attributes/class-list/class-list.ts +0 -51
- package/src/utils/attributes/class-list/index.ts +0 -1
- package/src/utils/attributes/id/id.spec.ts +0 -51
- package/src/utils/attributes/id/id.ts +0 -46
- package/src/utils/attributes/id/index.ts +0 -1
- package/src/utils/attributes/index.ts +0 -3
- package/src/utils/attributes/to-kebab-case/index.ts +0 -1
- package/src/utils/attributes/to-kebab-case/to-kebab-case.spec.ts +0 -29
- package/src/utils/attributes/to-kebab-case/to-kebab-case.ts +0 -23
- package/src/utils/components/__snapshots__/components.spec.ts.snap +0 -313
- package/src/utils/components/components.conf.ts +0 -11
- package/src/utils/components/components.spec.ts +0 -192
- package/src/utils/components/components.ts +0 -138
- package/src/utils/components/index.ts +0 -2
- package/src/utils/date/date.spec.ts +0 -12
- package/src/utils/date/date.ts +0 -20
- package/src/utils/date/index.ts +0 -1
- package/src/utils/elements/elements.spec.ts +0 -17
- package/src/utils/elements/elements.ts +0 -16
- package/src/utils/elements/index.ts +0 -1
- package/src/utils/index.spec.ts +0 -84
- package/src/utils/index.ts +0 -8
- package/src/utils/number/index.ts +0 -1
- package/src/utils/number/number.spec.ts +0 -14
- package/src/utils/number/number.ts +0 -6
- package/src/utils/object/index.ts +0 -2
- package/src/utils/object/object.conf.ts +0 -4
- package/src/utils/object/object.spec.ts +0 -110
- package/src/utils/object/object.ts +0 -26
- package/src/utils/string/index.ts +0 -1
- package/src/utils/string/string.spec.ts +0 -47
- package/src/utils/string/string.ts +0 -38
- package/src/utils/windows/index.ts +0 -1
- package/src/utils/windows/windows.spec.ts +0 -65
- package/src/utils/windows/windows.ts +0 -50
- package/src/vue/index.spec.ts +0 -8
- package/src/vue/index.ts +0 -1
- package/src/vue/mg-model/index.ts +0 -1
- package/src/vue/mg-model/mg-model.conf.ts +0 -6
- package/src/vue/mg-model/mg-model.spec.ts +0 -50
- package/src/vue/mg-model/mg-model.ts +0 -50
- package/tsconfig.json +0 -17
- package/typedoc.json +0 -14
- package/vitest.config.mts +0 -13
package/dist/storybook/index.js
CHANGED
|
@@ -2006,7 +2006,9 @@ const renderAttribute = (element, name, value) => {
|
|
|
2006
2006
|
if ([null, undefined, '', false].includes(value) || ['innerHTML', 'style', ''].includes(name)) {
|
|
2007
2007
|
return;
|
|
2008
2008
|
}
|
|
2009
|
-
element.setAttribute(name, !['object', 'function'].includes(typeof value)
|
|
2009
|
+
element.setAttribute(name, !['object', 'function'].includes(typeof value)
|
|
2010
|
+
? value
|
|
2011
|
+
: `⚠️ Property must be set through a script or a framework-specific syntax.`);
|
|
2010
2012
|
};
|
|
2011
2013
|
/**
|
|
2012
2014
|
* Render new element in parent element
|
|
@@ -2020,10 +2022,10 @@ const renderElement = (parentNode, tagName, attributes, children, text) => {
|
|
|
2020
2022
|
// render HTML
|
|
2021
2023
|
if (tagName && typeof tagName === 'string') {
|
|
2022
2024
|
const element = document.createElement(tagName);
|
|
2023
|
-
Object.keys(attributes || {}).forEach(attr => {
|
|
2025
|
+
Object.keys(attributes || {}).forEach((attr) => {
|
|
2024
2026
|
renderAttribute(element, attr, attributes[attr]);
|
|
2025
2027
|
});
|
|
2026
|
-
children?.forEach(child => {
|
|
2028
|
+
children?.forEach((child) => {
|
|
2027
2029
|
renderElement(element, child.$tag$, child.$attrs$, child.$children$, child.$text$);
|
|
2028
2030
|
});
|
|
2029
2031
|
if (attributes?.innerHTML)
|
|
@@ -2146,7 +2148,7 @@ class StorybookPreview {
|
|
|
2146
2148
|
* @returns component data
|
|
2147
2149
|
*/
|
|
2148
2150
|
#getComponentData = (tagName) => {
|
|
2149
|
-
return this.jsonDoc.components.find(component => component.tag === tagName);
|
|
2151
|
+
return this.jsonDoc.components.find((component) => component.tag === tagName);
|
|
2150
2152
|
};
|
|
2151
2153
|
/**
|
|
2152
2154
|
* Get the control for the given prop
|
|
@@ -2159,9 +2161,9 @@ class StorybookPreview {
|
|
|
2159
2161
|
const types = prop.type
|
|
2160
2162
|
.replace(/"([^"]+)"/g, '$1') // Remove quotes
|
|
2161
2163
|
.replace(/\s/g, '') // Remove all whitespace for simplicity
|
|
2162
|
-
.replace(/\(.*?\)/g, match => match.replace(/\|/g, ' OR ')) // Replace '|' inside parentheses
|
|
2164
|
+
.replace(/\(.*?\)/g, (match) => match.replace(/\|/g, ' OR ')) // Replace '|' inside parentheses
|
|
2163
2165
|
.split('|')
|
|
2164
|
-
.map(type => type.trim().replace(/ OR /g, '|')); // Revert ' OR ' back to '|'
|
|
2166
|
+
.map((type) => type.trim().replace(/ OR /g, '|')); // Revert ' OR ' back to '|'
|
|
2165
2167
|
// Return control and options
|
|
2166
2168
|
if (prop.type === 'string') {
|
|
2167
2169
|
return { control: { type: 'text' } };
|
|
@@ -2180,7 +2182,7 @@ class StorybookPreview {
|
|
|
2180
2182
|
if (types.includes('string')) {
|
|
2181
2183
|
return { control: { type: 'text' } };
|
|
2182
2184
|
}
|
|
2183
|
-
else if (types.every(type => type?.includes('[]'))) {
|
|
2185
|
+
else if (types.every((type) => type?.includes('[]'))) {
|
|
2184
2186
|
return { control: { type: 'object' } };
|
|
2185
2187
|
}
|
|
2186
2188
|
else {
|