@gem-sdk/system 1.58.0-dev.143 → 1.58.0-dev.144
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/cjs/component/template.js +89 -0
- package/dist/cjs/index.js +6 -0
- package/dist/esm/component/template.js +83 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/index.d.ts +8 -1
- package/package.json +15 -6
- package/src/component/__tests__/ template.test.tsx +0 -76
- package/src/component/__tests__/createAttr.test.ts +0 -62
- package/src/component/__tests__/createClass.test.ts +0 -68
- package/src/component/__tests__/createContent.test.ts +0 -52
- package/src/component/__tests__/createStateOrContext.test.ts +0 -129
- package/src/component/__tests__/createStyle.test.ts +0 -63
- package/src/component/createAttr.ts +0 -44
- package/src/component/createClass.ts +0 -48
- package/src/component/createContent.ts +0 -20
- package/src/component/createStateOrContext.ts +0 -70
- package/src/component/createStyle.ts +0 -53
- package/src/component/template.ts +0 -119
- package/src/component/types.ts +0 -9
- package/src/component/utils/__tests__/toCamelCaseKeys.test.ts +0 -79
- package/src/component/utils/toCamelCaseKeys.ts +0 -20
- package/src/e2e-tests/README.md +0 -1
- package/src/examples/components/text/DemoText.liquid.ts +0 -49
- package/src/examples/components/text/DemoText.tsx +0 -50
- package/src/examples/components/text/common/__tests__/globalTypoClasses.test.ts +0 -11
- package/src/examples/components/text/common/getAttr.ts +0 -7
- package/src/examples/components/text/common/getStyle.ts +0 -5
- package/src/examples/components/text/common/globalTypoClasses.ts +0 -5
- package/src/examples/components/text/e2e-tests/DemoText.spec.tsx +0 -23
- package/src/examples/components/text/e2e-tests/DemoText.tsx +0 -23
- package/src/index.ts +0 -34
- package/src/validator/README.md +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/experimental-ct-react';
|
|
2
|
-
import type { TextProps } from "../DemoText";
|
|
3
|
-
import DemoText from "../DemoText"
|
|
4
|
-
import DemoTextLiquid from "../DemoText.liquid"
|
|
5
|
-
|
|
6
|
-
test('should work', async ({ mount }, testInfo) => {
|
|
7
|
-
const props: TextProps = {
|
|
8
|
-
product: {
|
|
9
|
-
id: "1"
|
|
10
|
-
},
|
|
11
|
-
text: "Demo test"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const component = await mount((
|
|
15
|
-
<div>
|
|
16
|
-
<div className='react-el'><DemoText {...props}/></div>
|
|
17
|
-
<div className='liquid-el'><div dangerouslySetInnerHTML={{__html: DemoTextLiquid(props)}}></div></div>
|
|
18
|
-
</div>
|
|
19
|
-
));
|
|
20
|
-
|
|
21
|
-
await expect(component.locator('.react-el')).toHaveScreenshot(`${testInfo.title}.png`);
|
|
22
|
-
await expect(component.locator('.liquid-el')).toHaveScreenshot(`${testInfo.title}.png`);
|
|
23
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { E2ETests } from '../../../../component/types';
|
|
2
|
-
import type { TextProps } from '../DemoText';
|
|
3
|
-
import DemoTextReact from '../DemoText';
|
|
4
|
-
import DemoTextLiquid from '../DemoText.liquid';
|
|
5
|
-
|
|
6
|
-
export const e2eDemoText = (): E2ETests => {
|
|
7
|
-
return {
|
|
8
|
-
'DemoText basic': async () => {
|
|
9
|
-
const props: TextProps = {
|
|
10
|
-
product: {
|
|
11
|
-
id: '1',
|
|
12
|
-
},
|
|
13
|
-
text: 'Demo test',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
props,
|
|
18
|
-
reactComponent: DemoTextReact,
|
|
19
|
-
liquidComponent: DemoTextLiquid,
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
};
|
package/src/index.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { createAttr } from './component/createAttr';
|
|
2
|
-
const createAttrReact = createAttr;
|
|
3
|
-
|
|
4
|
-
import { createStyle, createStyleReact } from './component/createStyle';
|
|
5
|
-
|
|
6
|
-
import { createContent } from './component/createContent';
|
|
7
|
-
const createContentReact = createContent;
|
|
8
|
-
|
|
9
|
-
import { createClass } from './component/createClass';
|
|
10
|
-
const createClassReact = createClass;
|
|
11
|
-
|
|
12
|
-
import { createStateOrContext } from './component/createStateOrContext';
|
|
13
|
-
|
|
14
|
-
import { Liquid, If, LiquidIf, For, LiquidFor } from './component/template';
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
// Attr
|
|
18
|
-
createAttr,
|
|
19
|
-
createAttrReact,
|
|
20
|
-
createStyle,
|
|
21
|
-
createStyleReact,
|
|
22
|
-
createContent,
|
|
23
|
-
createContentReact,
|
|
24
|
-
createClass,
|
|
25
|
-
createClassReact,
|
|
26
|
-
createStateOrContext,
|
|
27
|
-
|
|
28
|
-
// Template
|
|
29
|
-
Liquid,
|
|
30
|
-
If,
|
|
31
|
-
LiquidIf,
|
|
32
|
-
For,
|
|
33
|
-
LiquidFor,
|
|
34
|
-
};
|
package/src/validator/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Đây là folder chưa các func validate component setting
|