@mgdis/core-ui-helpers 1.2.1 → 1.2.2
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/CHANGELOG.md +6 -0
- package/package.json +8 -8
- package/rollup.config.mjs +3 -3
- package/src/angular/mg-angular-logger/mg-angular-logger.spec.ts +1 -1
- package/src/angular/mg-angular-logger/mg-angular-logger.ts +2 -1
- package/src/locale/index.spec.ts +10 -1
- package/src/locale/locale.spec.ts +43 -18
- package/src/locale/locale.ts +13 -5
- package/src/playwright/utils/utils.spec.ts +16 -9
- package/src/playwright/utils/utils.ts +14 -6
- package/src/stencil/ide/cem.spec.ts +4 -4
- package/src/stencil/ide/cem.ts +9 -9
- package/src/stencil/ide/ide.ts +26 -26
- package/src/storybook/stencil/stencil.spec.ts +30 -6
- package/src/storybook/stencil/stencil.ts +24 -13
- package/src/tests/index.spec.ts +7 -1
- package/src/tests/unit/unit.conf.ts +9 -2
- package/src/tests/unit/unit.spec.ts +103 -61
- package/src/tests/unit/unit.ts +38 -11
- package/src/utils/attributes/id/id.spec.ts +9 -6
- package/src/utils/attributes/id/id.ts +3 -2
- package/src/utils/components/components.spec.ts +6 -6
- package/src/utils/components/components.ts +19 -5
- package/src/utils/elements/elements.ts +4 -2
- package/src/utils/number/number.spec.ts +2 -2
- package/src/utils/object/object.spec.ts +2 -2
- package/src/utils/object/object.ts +2 -1
- package/src/utils/string/string.spec.ts +12 -5
- package/src/utils/string/string.ts +2 -1
- package/src/utils/windows/windows.spec.ts +6 -2
- package/src/vue/mg-model/mg-model.ts +7 -2
- package/vitest.config.mts +1 -1
- package/.turbo/turbo-build.log +0 -49
- package/dist/angular/index.cjs +0 -27
- package/dist/angular/index.cjs.map +0 -1
- package/dist/angular/index.d.ts +0 -21
- package/dist/angular/index.js +0 -25
- package/dist/angular/index.js.map +0 -1
- package/dist/angular/index.umd.js +0 -33
- package/dist/angular/index.umd.js.map +0 -1
- package/dist/locale/index.cjs +0 -188
- package/dist/locale/index.cjs.map +0 -1
- package/dist/locale/index.d.ts +0 -110
- package/dist/locale/index.js +0 -179
- package/dist/locale/index.js.map +0 -1
- package/dist/locale/index.umd.js +0 -194
- package/dist/locale/index.umd.js.map +0 -1
- package/dist/playwright/index.cjs +0 -130
- package/dist/playwright/index.cjs.map +0 -1
- package/dist/playwright/index.d.ts +0 -39
- package/dist/playwright/index.js +0 -126
- package/dist/playwright/index.js.map +0 -1
- package/dist/playwright/index.umd.js +0 -136
- package/dist/playwright/index.umd.js.map +0 -1
- package/dist/stencil/index.cjs +0 -363
- package/dist/stencil/index.cjs.map +0 -1
- package/dist/stencil/index.d.ts +0 -222
- package/dist/stencil/index.js +0 -357
- package/dist/stencil/index.js.map +0 -1
- package/dist/stencil/index.umd.js +0 -369
- package/dist/stencil/index.umd.js.map +0 -1
- package/dist/storybook/index.cjs +0 -2333
- package/dist/storybook/index.cjs.map +0 -1
- package/dist/storybook/index.d.ts +0 -85
- package/dist/storybook/index.js +0 -2327
- package/dist/storybook/index.js.map +0 -1
- package/dist/storybook/index.umd.js +0 -2339
- package/dist/storybook/index.umd.js.map +0 -1
- package/dist/tests/index.cjs +0 -300
- package/dist/tests/index.cjs.map +0 -1
- package/dist/tests/index.d.ts +0 -100
- package/dist/tests/index.js +0 -294
- package/dist/tests/index.js.map +0 -1
- package/dist/tests/index.umd.js +0 -306
- package/dist/tests/index.umd.js.map +0 -1
- package/dist/utils/index.cjs +0 -433
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.ts +0 -265
- package/dist/utils/index.js +0 -409
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.umd.js +0 -439
- package/dist/utils/index.umd.js.map +0 -1
- package/dist/vue/index.cjs +0 -1934
- package/dist/vue/index.cjs.map +0 -1
- package/dist/vue/index.d.ts +0 -35
- package/dist/vue/index.js +0 -1932
- package/dist/vue/index.js.map +0 -1
- package/dist/vue/index.umd.js +0 -1940
- package/dist/vue/index.umd.js.map +0 -1
package/dist/playwright/index.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
const config = {
|
|
2
|
-
testMatch: '*.e2e.ts',
|
|
3
|
-
snapshotPathTemplate: '{testFileDir}/__screenshots__/{arg}-{projectName}{ext}',
|
|
4
|
-
/* Maximum time one test can run for. */
|
|
5
|
-
timeout: 30 * 1000,
|
|
6
|
-
expect: {
|
|
7
|
-
/**
|
|
8
|
-
* Maximum time expect() should wait for the condition to be met.
|
|
9
|
-
* For example in `await expect(locator).toHaveText();`
|
|
10
|
-
*/
|
|
11
|
-
timeout: 5000,
|
|
12
|
-
},
|
|
13
|
-
/* Run tests in files in parallel */
|
|
14
|
-
fullyParallel: true,
|
|
15
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
16
|
-
forbidOnly: !!process.env.CI,
|
|
17
|
-
/* Retry on CI only */
|
|
18
|
-
retries: process.env.CI ? 2 : 0,
|
|
19
|
-
/* Stop on CI on first failure */
|
|
20
|
-
maxFailures: process.env.CI ? 1 : 0,
|
|
21
|
-
/* Opt out of parallel tests on CI. */
|
|
22
|
-
workers: process.env.CI ? 1 : undefined,
|
|
23
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
24
|
-
reporter: [
|
|
25
|
-
['html', { open: 'never' }],
|
|
26
|
-
['junit', { outputFile: 'results.xml' }],
|
|
27
|
-
],
|
|
28
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
29
|
-
use: {
|
|
30
|
-
headless: true,
|
|
31
|
-
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
|
32
|
-
actionTimeout: 0,
|
|
33
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
34
|
-
// baseURL: 'http://localhost:3000',
|
|
35
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
36
|
-
trace: 'on-first-retry',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Check if a value is of object type.
|
|
42
|
-
* @param object - The value to validate.
|
|
43
|
-
* @returns `true` if the value is a valid object (non-null and not an array), otherwise `false`.
|
|
44
|
-
*/
|
|
45
|
-
const isObject = (object) => typeof object === 'object' && !Array.isArray(object) && object !== null;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Typeguard function to check if all array items are strings.
|
|
49
|
-
* @param items - items to check
|
|
50
|
-
* @returns `true` if all items are strings
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Validate string
|
|
54
|
-
* @param value - value to check
|
|
55
|
-
* @returns `true` if string is valid
|
|
56
|
-
*/
|
|
57
|
-
const isValidString = (value) => typeof value === 'string' && value.trim() !== '';
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Render attributes from props objects.
|
|
61
|
-
*
|
|
62
|
-
* Booleans follow the HTML spec for boolean attributes: `true` emits an empty-value attribute
|
|
63
|
-
* (presence implies `true`), `false` omits the attribute entirely. This matches the behaviour
|
|
64
|
-
* of the `normalizeBooleanAttributes` Stencil helper.
|
|
65
|
-
* @param args - argument to render as string. ex: `{status: 'visible'}`
|
|
66
|
-
* @returns formated inline attributed. ex: 'status="visible"'
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* import { renderAttributes } from '@mgdis/core-ui-helpers/dist/playwright';
|
|
70
|
-
*
|
|
71
|
-
* const attributes = renderAttributes({ status: 'visible', color: 'red', disabled: true, readonly: false });
|
|
72
|
-
* console.log(attributes); // Output: 'status="visible" color="red" disabled=""'
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
const renderAttributes = (args) => (isObject(args) &&
|
|
76
|
-
Object.keys(args)
|
|
77
|
-
.filter(key => ![null, undefined].includes(args[key]) && !['object', 'function'].includes(typeof args[key]) && args[key] !== false)
|
|
78
|
-
.map(key => {
|
|
79
|
-
const attribute = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
80
|
-
if (args[key] === true)
|
|
81
|
-
return `${attribute}=""`;
|
|
82
|
-
const value = typeof args[key] === 'number' || isValidString(args[key]) ? String(args[key]).replace(/"/g, "'") : '';
|
|
83
|
-
return `${attribute}="${value}"`;
|
|
84
|
-
})
|
|
85
|
-
.join(' ')) ||
|
|
86
|
-
'';
|
|
87
|
-
/**
|
|
88
|
-
* Render properties from props objects.
|
|
89
|
-
* Insert return value in <script></script> element
|
|
90
|
-
* @param args - argument to render as script. ex: `{status: 'visible'}`
|
|
91
|
-
* @param selector - querySelector get targetted element and bind properties on it
|
|
92
|
-
* @returns stringified properties script
|
|
93
|
-
* @example
|
|
94
|
-
* ```ts
|
|
95
|
-
* import { renderProperties } from '@mgdis/core-ui-helpers/dist/playwright';
|
|
96
|
-
*
|
|
97
|
-
* const propertiesScript = renderProperties({ status: 'visible', color: 'red' }, '.targetElement');
|
|
98
|
-
* console.log(propertiesScript);
|
|
99
|
-
* // Output: 'document.querySelector(".targetElement").status="visible"; document.querySelector(".targetElement").color="red";'
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
const renderProperties = (args, selector) => {
|
|
103
|
-
// has generated id selector starting with "#" create charcters (ex: '#0j3xzw4w7m') make test crashed sometime with "querySelector"
|
|
104
|
-
// we use "getElementById" document query
|
|
105
|
-
const query = selector.startsWith('#') ? 'getElementById' : 'querySelector';
|
|
106
|
-
if (query === 'getElementById')
|
|
107
|
-
selector = selector.replace('#', '');
|
|
108
|
-
return args !== null && typeof args === 'object' && Object.keys(args).length > 0
|
|
109
|
-
? `
|
|
110
|
-
${Object.keys(args)
|
|
111
|
-
.filter(key => ['object', 'function'].includes(typeof args[key]))
|
|
112
|
-
.map(key => {
|
|
113
|
-
const value = JSON.stringify(args[key], (_key, val) => (typeof val === 'function' ? `<fn>${val}</fn>` : val));
|
|
114
|
-
return `document.${query}('${selector}').${key}=${value}`;
|
|
115
|
-
}) // stringify json AND keep function values
|
|
116
|
-
.join(';') // create string
|
|
117
|
-
.split('"<fn>') // remove fn start decorator
|
|
118
|
-
.join('')
|
|
119
|
-
.split('</fn>"')
|
|
120
|
-
.join('') // remove fn end decorator
|
|
121
|
-
};`
|
|
122
|
-
: '';
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export { config as playwrightBaseConfig, renderAttributes, renderProperties };
|
|
126
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/playwright/config/index.ts","../../src/utils/object/object.ts","../../src/utils/string/string.ts","../../src/playwright/utils/utils.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAyB;AACnC,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,oBAAoB,EAAE,wDAAwD;;IAE9E,OAAO,EAAE,EAAE,GAAG,IAAI;AAClB,IAAA,MAAM,EAAE;AACN;;;AAGG;AACH,QAAA,OAAO,EAAE,IAAI;AACd,KAAA;;AAED,IAAA,aAAa,EAAE,IAAI;;AAEnB,IAAA,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;;AAE5B,IAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;;AAE/B,IAAA,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;;AAEnC,IAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,SAAS;;AAEvC,IAAA,QAAQ,EAAE;AACR,QAAA,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,QAAA,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;AACzC,KAAA;;AAED,IAAA,GAAG,EAAE;AACH,QAAA,QAAQ,EAAE,IAAI;;AAEd,QAAA,aAAa,EAAE,CAAC;;;;AAKhB,QAAA,KAAK,EAAE,gBAAgB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@@ -1,136 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CoreUiHelpers = global.CoreUiHelpers || {}, global.CoreUiHelpers.playwright = {})));
|
|
5
|
-
})(this, (function (exports) { 'use strict';
|
|
6
|
-
|
|
7
|
-
const config = {
|
|
8
|
-
testMatch: '*.e2e.ts',
|
|
9
|
-
snapshotPathTemplate: '{testFileDir}/__screenshots__/{arg}-{projectName}{ext}',
|
|
10
|
-
/* Maximum time one test can run for. */
|
|
11
|
-
timeout: 30 * 1000,
|
|
12
|
-
expect: {
|
|
13
|
-
/**
|
|
14
|
-
* Maximum time expect() should wait for the condition to be met.
|
|
15
|
-
* For example in `await expect(locator).toHaveText();`
|
|
16
|
-
*/
|
|
17
|
-
timeout: 5000,
|
|
18
|
-
},
|
|
19
|
-
/* Run tests in files in parallel */
|
|
20
|
-
fullyParallel: true,
|
|
21
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
22
|
-
forbidOnly: !!process.env.CI,
|
|
23
|
-
/* Retry on CI only */
|
|
24
|
-
retries: process.env.CI ? 2 : 0,
|
|
25
|
-
/* Stop on CI on first failure */
|
|
26
|
-
maxFailures: process.env.CI ? 1 : 0,
|
|
27
|
-
/* Opt out of parallel tests on CI. */
|
|
28
|
-
workers: process.env.CI ? 1 : undefined,
|
|
29
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
30
|
-
reporter: [
|
|
31
|
-
['html', { open: 'never' }],
|
|
32
|
-
['junit', { outputFile: 'results.xml' }],
|
|
33
|
-
],
|
|
34
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
35
|
-
use: {
|
|
36
|
-
headless: true,
|
|
37
|
-
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
|
|
38
|
-
actionTimeout: 0,
|
|
39
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
40
|
-
// baseURL: 'http://localhost:3000',
|
|
41
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
42
|
-
trace: 'on-first-retry',
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Check if a value is of object type.
|
|
48
|
-
* @param object - The value to validate.
|
|
49
|
-
* @returns `true` if the value is a valid object (non-null and not an array), otherwise `false`.
|
|
50
|
-
*/
|
|
51
|
-
const isObject = (object) => typeof object === 'object' && !Array.isArray(object) && object !== null;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Typeguard function to check if all array items are strings.
|
|
55
|
-
* @param items - items to check
|
|
56
|
-
* @returns `true` if all items are strings
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* Validate string
|
|
60
|
-
* @param value - value to check
|
|
61
|
-
* @returns `true` if string is valid
|
|
62
|
-
*/
|
|
63
|
-
const isValidString = (value) => typeof value === 'string' && value.trim() !== '';
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Render attributes from props objects.
|
|
67
|
-
*
|
|
68
|
-
* Booleans follow the HTML spec for boolean attributes: `true` emits an empty-value attribute
|
|
69
|
-
* (presence implies `true`), `false` omits the attribute entirely. This matches the behaviour
|
|
70
|
-
* of the `normalizeBooleanAttributes` Stencil helper.
|
|
71
|
-
* @param args - argument to render as string. ex: `{status: 'visible'}`
|
|
72
|
-
* @returns formated inline attributed. ex: 'status="visible"'
|
|
73
|
-
* @example
|
|
74
|
-
* ```ts
|
|
75
|
-
* import { renderAttributes } from '@mgdis/core-ui-helpers/dist/playwright';
|
|
76
|
-
*
|
|
77
|
-
* const attributes = renderAttributes({ status: 'visible', color: 'red', disabled: true, readonly: false });
|
|
78
|
-
* console.log(attributes); // Output: 'status="visible" color="red" disabled=""'
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
const renderAttributes = (args) => (isObject(args) &&
|
|
82
|
-
Object.keys(args)
|
|
83
|
-
.filter(key => ![null, undefined].includes(args[key]) && !['object', 'function'].includes(typeof args[key]) && args[key] !== false)
|
|
84
|
-
.map(key => {
|
|
85
|
-
const attribute = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
86
|
-
if (args[key] === true)
|
|
87
|
-
return `${attribute}=""`;
|
|
88
|
-
const value = typeof args[key] === 'number' || isValidString(args[key]) ? String(args[key]).replace(/"/g, "'") : '';
|
|
89
|
-
return `${attribute}="${value}"`;
|
|
90
|
-
})
|
|
91
|
-
.join(' ')) ||
|
|
92
|
-
'';
|
|
93
|
-
/**
|
|
94
|
-
* Render properties from props objects.
|
|
95
|
-
* Insert return value in <script></script> element
|
|
96
|
-
* @param args - argument to render as script. ex: `{status: 'visible'}`
|
|
97
|
-
* @param selector - querySelector get targetted element and bind properties on it
|
|
98
|
-
* @returns stringified properties script
|
|
99
|
-
* @example
|
|
100
|
-
* ```ts
|
|
101
|
-
* import { renderProperties } from '@mgdis/core-ui-helpers/dist/playwright';
|
|
102
|
-
*
|
|
103
|
-
* const propertiesScript = renderProperties({ status: 'visible', color: 'red' }, '.targetElement');
|
|
104
|
-
* console.log(propertiesScript);
|
|
105
|
-
* // Output: 'document.querySelector(".targetElement").status="visible"; document.querySelector(".targetElement").color="red";'
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
const renderProperties = (args, selector) => {
|
|
109
|
-
// has generated id selector starting with "#" create charcters (ex: '#0j3xzw4w7m') make test crashed sometime with "querySelector"
|
|
110
|
-
// we use "getElementById" document query
|
|
111
|
-
const query = selector.startsWith('#') ? 'getElementById' : 'querySelector';
|
|
112
|
-
if (query === 'getElementById')
|
|
113
|
-
selector = selector.replace('#', '');
|
|
114
|
-
return args !== null && typeof args === 'object' && Object.keys(args).length > 0
|
|
115
|
-
? `
|
|
116
|
-
${Object.keys(args)
|
|
117
|
-
.filter(key => ['object', 'function'].includes(typeof args[key]))
|
|
118
|
-
.map(key => {
|
|
119
|
-
const value = JSON.stringify(args[key], (_key, val) => (typeof val === 'function' ? `<fn>${val}</fn>` : val));
|
|
120
|
-
return `document.${query}('${selector}').${key}=${value}`;
|
|
121
|
-
}) // stringify json AND keep function values
|
|
122
|
-
.join(';') // create string
|
|
123
|
-
.split('"<fn>') // remove fn start decorator
|
|
124
|
-
.join('')
|
|
125
|
-
.split('</fn>"')
|
|
126
|
-
.join('') // remove fn end decorator
|
|
127
|
-
};`
|
|
128
|
-
: '';
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
exports.playwrightBaseConfig = config;
|
|
132
|
-
exports.renderAttributes = renderAttributes;
|
|
133
|
-
exports.renderProperties = renderProperties;
|
|
134
|
-
|
|
135
|
-
}));
|
|
136
|
-
//# sourceMappingURL=index.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../src/playwright/config/index.ts","../../src/utils/object/object.ts","../../src/utils/string/string.ts","../../src/playwright/utils/utils.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":";;;;;;AAEA,UAAM,MAAM,GAAyB;IACnC,IAAA,SAAS,EAAE,UAAU;IACrB,IAAA,oBAAoB,EAAE,wDAAwD;;QAE9E,OAAO,EAAE,EAAE,GAAG,IAAI;IAClB,IAAA,MAAM,EAAE;IACN;;;IAGG;IACH,QAAA,OAAO,EAAE,IAAI;IACd,KAAA;;IAED,IAAA,aAAa,EAAE,IAAI;;IAEnB,IAAA,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;;IAE5B,IAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;;IAE/B,IAAA,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;;IAEnC,IAAA,OAAO,EAAE,OAAO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,GAAG,GAAG,CAAC,CAAC;YACxI,OAAO,CAAA,SAAA,EAAY,KAAK,CAAA,EAAA,EAAK,QAAQ,MAAM,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE;QAC3D,CAAC,CAAC;AACD,aAAA,IAAI,CAAC,GAAG,CAAC;AACT,aAAA,KAAK,CAAC,OAAO,CAAC;aACd,IAAI,CAAC,EAAE;aACP,KAAK,CAAC,QAAQ;AACd,aAAA,IAAI,CAAC,EAAE,CAAC;SACb,CAAA;cACI,EAAE;IACR;;;;;;;;;;"}
|
package/dist/stencil/index.cjs
DELETED
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Retrieve Component Storybook URL from file path
|
|
5
|
-
* @param storybookBaseUrl - Storybook Base URL
|
|
6
|
-
* @param filePath - Component file path
|
|
7
|
-
* @returns Component Storybook URL
|
|
8
|
-
*/
|
|
9
|
-
const getStorybookUrl = (storybookBaseUrl, filePath) => {
|
|
10
|
-
if (!filePath) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const split = filePath.split('/');
|
|
14
|
-
return `${storybookBaseUrl}${split.slice(2, split.length - 1).join('-')}--docs`;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Retrieve Component source URL from file path
|
|
19
|
-
* @param sourcesBaseUrl - Source base URL
|
|
20
|
-
* @param filePath - Component file path
|
|
21
|
-
* @returns Component source URL
|
|
22
|
-
*/
|
|
23
|
-
const getSourcesUrl = (sourcesBaseUrl, filePath) => {
|
|
24
|
-
if (!filePath) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
return `${sourcesBaseUrl}${filePath}`;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Get Component element description.
|
|
31
|
-
*
|
|
32
|
-
* Neither WebStorm nor VS Code render the structured `attributes` /
|
|
33
|
-
* `js.properties` arrays in the tag-level quick-doc — they only show this
|
|
34
|
-
* markdown description. So the attribute and property listings have to live
|
|
35
|
-
* here, even though they're redundant with the structured arrays used by the
|
|
36
|
-
* inline autocomplete.
|
|
37
|
-
* @param component - Component
|
|
38
|
-
* @returns Component element description
|
|
39
|
-
*/
|
|
40
|
-
const getElementDescription = (component) => {
|
|
41
|
-
let description = component.overview ? `${component.overview}\n\n` : '';
|
|
42
|
-
const attributes = component.props.filter(({ attr }) => attr !== undefined);
|
|
43
|
-
if (attributes.length) {
|
|
44
|
-
description += `Attributes:\n`;
|
|
45
|
-
description += attributes.map(({ attr, docs }) => `- \`${attr}\`: ${docs}\n`).join('');
|
|
46
|
-
description += '\n';
|
|
47
|
-
}
|
|
48
|
-
const properties = component.props.filter(({ attr }) => attr === undefined);
|
|
49
|
-
if (properties.length) {
|
|
50
|
-
description += `Properties:\n`;
|
|
51
|
-
description += properties.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
52
|
-
description += '\n';
|
|
53
|
-
}
|
|
54
|
-
if (component.methods.length) {
|
|
55
|
-
description += `Methods:\n`;
|
|
56
|
-
description += component.methods.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
57
|
-
description += '\n';
|
|
58
|
-
}
|
|
59
|
-
if (component.events.length) {
|
|
60
|
-
description += `Events:\n`;
|
|
61
|
-
description += component.events.map(({ event, docs }) => `- \`${event}\`: ${docs}\n`).join('');
|
|
62
|
-
description += '\n';
|
|
63
|
-
}
|
|
64
|
-
if (component.listeners.length) {
|
|
65
|
-
description += `Listeners:\n`;
|
|
66
|
-
description += component.listeners.map(({ event }) => `- \`${event}\`\n`).join('');
|
|
67
|
-
description += '\n';
|
|
68
|
-
}
|
|
69
|
-
if (component.slots.length) {
|
|
70
|
-
description += `Slots:\n`;
|
|
71
|
-
description += component.slots
|
|
72
|
-
.map(({ name, docs }) => {
|
|
73
|
-
const label = name ? `\`${name}\`` : 'default';
|
|
74
|
-
return `- ${label}: ${docs}\n`;
|
|
75
|
-
})
|
|
76
|
-
.join('');
|
|
77
|
-
description += '\n';
|
|
78
|
-
}
|
|
79
|
-
return description;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Get Props Description
|
|
83
|
-
* @param prop - Component Property
|
|
84
|
-
* @returns Props Description
|
|
85
|
-
*/
|
|
86
|
-
const getAttributeDescription = (prop) => {
|
|
87
|
-
return `${prop.docs}\n\nType: \`${prop.type}\``;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Generate Web Types metadata for IntelliJ's IDE
|
|
91
|
-
* @param name - Library name
|
|
92
|
-
* @param version - Library version
|
|
93
|
-
* @param jsonDocs - Stencil JSON doc
|
|
94
|
-
* @param storybookBaseUrl - Storybook Base Url
|
|
95
|
-
* @returns Web Types metadata
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* const webTypesJson = webTypesGenerator('@mgdis/mg-components', '1.0.0', jsonDocs, 'https://storybook.example.com');
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
const webTypesGenerator = (name, version, jsonDocs, storybookBaseUrl) => ({
|
|
102
|
-
'$schema': 'https://json.schemastore.org/web-types',
|
|
103
|
-
name,
|
|
104
|
-
version,
|
|
105
|
-
'description-markup': 'markdown',
|
|
106
|
-
'contributions': {
|
|
107
|
-
html: {
|
|
108
|
-
elements: jsonDocs.components.map(component => {
|
|
109
|
-
const docUrl = getStorybookUrl(storybookBaseUrl, component.filePath);
|
|
110
|
-
return {
|
|
111
|
-
'name': component.tag,
|
|
112
|
-
'description': getElementDescription(component),
|
|
113
|
-
'doc-url': docUrl,
|
|
114
|
-
'attributes': component.props
|
|
115
|
-
.filter(prop => prop.attr)
|
|
116
|
-
.map(prop => ({
|
|
117
|
-
'name': prop.attr,
|
|
118
|
-
'description': getAttributeDescription(prop),
|
|
119
|
-
'doc-url': docUrl,
|
|
120
|
-
'value': {
|
|
121
|
-
type: prop.type,
|
|
122
|
-
default: prop.default,
|
|
123
|
-
required: prop.required,
|
|
124
|
-
},
|
|
125
|
-
})),
|
|
126
|
-
'js': {
|
|
127
|
-
properties: component.props
|
|
128
|
-
.filter(prop => prop.attr === undefined)
|
|
129
|
-
.map(prop => ({
|
|
130
|
-
'name': prop.name,
|
|
131
|
-
'description': getAttributeDescription(prop),
|
|
132
|
-
'doc-url': docUrl,
|
|
133
|
-
'value': {
|
|
134
|
-
type: prop.type,
|
|
135
|
-
default: prop.default,
|
|
136
|
-
required: prop.required,
|
|
137
|
-
},
|
|
138
|
-
})),
|
|
139
|
-
events: component.events.map(event => ({
|
|
140
|
-
name: event.event,
|
|
141
|
-
description: event.docs,
|
|
142
|
-
})),
|
|
143
|
-
},
|
|
144
|
-
'css': {
|
|
145
|
-
properties: component.styles.map(style => ({
|
|
146
|
-
name: style.name,
|
|
147
|
-
description: style.docs,
|
|
148
|
-
})),
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
}),
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
/**
|
|
156
|
-
* Create Storybook Reference
|
|
157
|
-
* @param storybookBaseUrl - Storybook Base Url
|
|
158
|
-
* @param filePath - Component file path
|
|
159
|
-
* @returns Storybook Reference
|
|
160
|
-
*/
|
|
161
|
-
const getReferences = (storybookBaseUrl, sourceBaseUrl, filePath) => {
|
|
162
|
-
return [
|
|
163
|
-
{ name: 'Storybook', url: getStorybookUrl(storybookBaseUrl, filePath) },
|
|
164
|
-
{ name: 'Sources', url: getSourcesUrl(sourceBaseUrl, filePath) },
|
|
165
|
-
];
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Get Property possible values
|
|
169
|
-
* @param prop - Component Property
|
|
170
|
-
* @returns Property possible values
|
|
171
|
-
*/
|
|
172
|
-
const getValues = (prop) => {
|
|
173
|
-
// Only values Array where all objects have a value seems to be usefull
|
|
174
|
-
if (prop.values.some(({ value }) => value === undefined)) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
return prop.values.map(({ value }) => ({ name: value }));
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Generate custom HTML datasets for VS Code
|
|
181
|
-
* @param jsonDocs - Stencil JSON doc
|
|
182
|
-
* @param storybookBaseUrl - Storybook Base Url
|
|
183
|
-
* @returns custom HTML datasets
|
|
184
|
-
* @example
|
|
185
|
-
* ```ts
|
|
186
|
-
* const customDataJson = vsCodeGenerator(jsonDocs, 'https://storybook.example.com', 'https://sources.example.com');
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
const vsCodeGenerator = (jsonDocs, storybookBaseUrl, sourceBaseUrl) => ({
|
|
190
|
-
version: 1.1,
|
|
191
|
-
tags: jsonDocs.components.map(component => {
|
|
192
|
-
const references = getReferences(storybookBaseUrl, sourceBaseUrl, component.filePath);
|
|
193
|
-
return {
|
|
194
|
-
name: component.tag,
|
|
195
|
-
description: getElementDescription(component),
|
|
196
|
-
attributes: component.props
|
|
197
|
-
.filter(prop => prop.attr !== undefined)
|
|
198
|
-
.map(prop => ({
|
|
199
|
-
name: prop.attr,
|
|
200
|
-
description: getAttributeDescription(prop),
|
|
201
|
-
values: getValues(prop),
|
|
202
|
-
references,
|
|
203
|
-
})),
|
|
204
|
-
references,
|
|
205
|
-
};
|
|
206
|
-
}),
|
|
207
|
-
globalAttributes: [],
|
|
208
|
-
valueSets: [],
|
|
209
|
-
});
|
|
210
|
-
/**
|
|
211
|
-
* Generate custom CSS datasets for VS Code
|
|
212
|
-
* @param jsonDocs - Stencil JSON doc
|
|
213
|
-
* @returns custom CSS datasets
|
|
214
|
-
* @example
|
|
215
|
-
* ```ts
|
|
216
|
-
* const customDataJson = vsCodeCssGenerator(jsonDocs);
|
|
217
|
-
* ```
|
|
218
|
-
*/
|
|
219
|
-
const vsCodeCssGenerator = (jsonDocs) => ({
|
|
220
|
-
version: 1.1,
|
|
221
|
-
properties: jsonDocs.components.flatMap(component => component.styles.map(style => ({
|
|
222
|
-
name: style.name,
|
|
223
|
-
description: style.docs,
|
|
224
|
-
}))),
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Convert a Stencil component's JsonDocs into a CEM v2 module entry.
|
|
229
|
-
* @param component - Stencil component doc
|
|
230
|
-
* @returns CEM module
|
|
231
|
-
*/
|
|
232
|
-
const componentToModule = (component) => {
|
|
233
|
-
const className = component.tag
|
|
234
|
-
.split('-')
|
|
235
|
-
.map(part => part.charAt(0).toUpperCase() + part.slice(1))
|
|
236
|
-
.join('');
|
|
237
|
-
const attributes = component.props
|
|
238
|
-
.filter(prop => prop.attr !== undefined)
|
|
239
|
-
.map(prop => ({
|
|
240
|
-
name: prop.attr,
|
|
241
|
-
description: prop.docs,
|
|
242
|
-
type: { text: prop.type },
|
|
243
|
-
...(prop.default !== undefined && { default: prop.default }),
|
|
244
|
-
fieldName: prop.name,
|
|
245
|
-
}));
|
|
246
|
-
const fieldMembers = component.props.map(prop => ({
|
|
247
|
-
kind: 'field',
|
|
248
|
-
name: prop.name,
|
|
249
|
-
description: prop.docs,
|
|
250
|
-
type: { text: prop.type },
|
|
251
|
-
...(prop.default !== undefined && { default: prop.default }),
|
|
252
|
-
...(prop.attr !== undefined && { attribute: prop.attr }),
|
|
253
|
-
}));
|
|
254
|
-
const methodMembers = component.methods.map(method => ({
|
|
255
|
-
kind: 'method',
|
|
256
|
-
name: method.name,
|
|
257
|
-
description: method.docs,
|
|
258
|
-
}));
|
|
259
|
-
return {
|
|
260
|
-
kind: 'javascript-module',
|
|
261
|
-
path: component.filePath ?? '',
|
|
262
|
-
declarations: [
|
|
263
|
-
{
|
|
264
|
-
kind: 'class',
|
|
265
|
-
name: className,
|
|
266
|
-
tagName: component.tag,
|
|
267
|
-
customElement: true,
|
|
268
|
-
description: component.overview ?? '',
|
|
269
|
-
attributes,
|
|
270
|
-
members: [...fieldMembers, ...methodMembers],
|
|
271
|
-
events: component.events.map(event => ({
|
|
272
|
-
name: event.event,
|
|
273
|
-
description: event.docs,
|
|
274
|
-
type: { text: `CustomEvent<${event.detail}>` },
|
|
275
|
-
})),
|
|
276
|
-
slots: component.slots.map(slot => ({
|
|
277
|
-
name: slot.name,
|
|
278
|
-
description: slot.docs,
|
|
279
|
-
})),
|
|
280
|
-
cssProperties: component.styles.map(style => ({
|
|
281
|
-
name: style.name,
|
|
282
|
-
description: style.docs,
|
|
283
|
-
})),
|
|
284
|
-
cssParts: component.parts.map(part => ({
|
|
285
|
-
name: part.name,
|
|
286
|
-
description: part.docs,
|
|
287
|
-
})),
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
exports: [
|
|
291
|
-
{
|
|
292
|
-
kind: 'custom-element-definition',
|
|
293
|
-
name: component.tag,
|
|
294
|
-
declaration: {
|
|
295
|
-
name: className,
|
|
296
|
-
module: component.filePath ?? '',
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
],
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
/**
|
|
303
|
-
* Generate a Custom Elements Manifest v2 from Stencil JSON docs.
|
|
304
|
-
* @param jsonDocs - Stencil JSON doc
|
|
305
|
-
* @returns CEM v2
|
|
306
|
-
* @example
|
|
307
|
-
* ```ts
|
|
308
|
-
* const cem = cemGenerator(jsonDocs);
|
|
309
|
-
* ```
|
|
310
|
-
*/
|
|
311
|
-
const cemGenerator = (jsonDocs) => ({
|
|
312
|
-
schemaVersion: '2.0.0',
|
|
313
|
-
readme: '',
|
|
314
|
-
modules: jsonDocs.components.map(componentToModule),
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Per the HTML spec, a boolean attribute is `true` whenever it is present on the
|
|
319
|
-
* element, regardless of its value (including `="false"`). Stencil's default Prop
|
|
320
|
-
* parser converts the string `"false"` to the boolean `false`, which breaks this
|
|
321
|
-
* contract for consumers writing markup. Call this helper from `componentWillLoad`
|
|
322
|
-
* to re-normalize every present attribute that maps to a boolean-typed Prop.
|
|
323
|
-
*
|
|
324
|
-
* Iterates the host element's attributes and, for each one whose camelCase name
|
|
325
|
-
* matches a `typeof === 'boolean'` Prop on the instance, rewrites the attribute
|
|
326
|
-
* to `''` — Stencil's parser then turns that into `true` via the standard
|
|
327
|
-
* attribute → prop pipeline (no need for `mutable: true` on the Prop, since the
|
|
328
|
-
* write goes through Stencil's internal setter, not through user code).
|
|
329
|
-
*
|
|
330
|
-
* Non-boolean Props and non-Prop attributes (`class`, `id`, ...) are skipped
|
|
331
|
-
* naturally by the type check.
|
|
332
|
-
*
|
|
333
|
-
* @param target - the component instance (must expose `element` via `@Element()`)
|
|
334
|
-
*
|
|
335
|
-
* @example
|
|
336
|
-
* ```typescript
|
|
337
|
-
* @Component({ tag: 'my-input' })
|
|
338
|
-
* export class MyInput {
|
|
339
|
-
* @Element() element: HTMLMyInputElement;
|
|
340
|
-
* @Prop() readonly = false;
|
|
341
|
-
* @Prop() disabled = false;
|
|
342
|
-
*
|
|
343
|
-
* componentWillLoad() {
|
|
344
|
-
* normalizeBooleanAttributes(this);
|
|
345
|
-
* }
|
|
346
|
-
* }
|
|
347
|
-
* ```
|
|
348
|
-
*/
|
|
349
|
-
const normalizeBooleanAttributes = (target) => {
|
|
350
|
-
for (const attr of Array.from(target.element.attributes)) {
|
|
351
|
-
const propName = attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
352
|
-
if (typeof target[propName] === 'boolean') {
|
|
353
|
-
target.element.setAttribute(attr.name, '');
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
exports.cemGenerator = cemGenerator;
|
|
359
|
-
exports.normalizeBooleanAttributes = normalizeBooleanAttributes;
|
|
360
|
-
exports.vsCodeCssGenerator = vsCodeCssGenerator;
|
|
361
|
-
exports.vsCodeGenerator = vsCodeGenerator;
|
|
362
|
-
exports.webTypesGenerator = webTypesGenerator;
|
|
363
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/storybook/stencil/stencil.ts","../../src/stencil/ide/ide.ts","../../src/stencil/ide/cem.ts","../../src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":";;AAkJA;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAC,gBAAwB,EAAE,QAA4B,KAAwB;IAC5G,IAAI,CAAC,QAAQ,EAAE;QACb;IACF;IACA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;IACjC,OAAO,CAAA,EAAG,gBAAgB,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,MAAA,CAAQ;AACjF,CAAC;;AC3JD;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAE,QAA4B,KAAwB;IACjG,IAAI,CAAC,QAAQ,EAAE;QACb;IACF;AACA,IAAA,OAAO,CAAA,EAAG,cAAc,CAAA,EAAG,QAAQ,EAAE;AACvC,CAAC;AAED;;;;;;;;;;AAUG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAA4B,KAAY;AACrE,IAAA,IAAI,WAAW,GAAG,SAAS,CAAC,QAAQ,GAAG,CAAA,EAAG,SAAS,CAAC,QAAQ,CAAA,IAAA,CAAM,GAAG,EAAE;AACvE,IAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,SAAS,CAAC;AAC3E,IAAA,IAAI,UAAU,CAAC,MAAM,EAAE;QACrB,WAAW,IAAI,eAAe;QAC9B,WAAW,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAA,IAAA,EAAO,IAAI,CAAA,IAAA,EAAO,IAAI,CAAA,EAAA,CAAI,CAAC,CAAC,IAA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