@smileid/web-components 1.4.7 → 1.5.1

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.
@@ -1,36 +1,36 @@
1
- import SmartCamera from '../../../../domain/camera/src/SmartCamera';
2
- import './SelfieCapture';
3
-
4
- const meta = {
5
- argTypes: {
6
- 'theme-color': { control: 'color' },
7
- },
8
- component: 'selfie-capture',
9
- };
10
-
11
- export default meta;
12
-
13
- export const SelfieCapture = {
14
- args: {
15
- 'theme-color': '#001096',
16
- },
17
- loaders: [
18
- async () => ({
19
- permissionGranted: await SmartCamera.getMedia({
20
- audio: false,
21
- video: true,
22
- }),
23
- }),
24
- ],
25
- render: (args) => `
26
- <selfie-capture theme-color='${args['theme-color']}'>
27
- </selfie-capture>
28
- `,
29
- };
30
-
31
- export const SelfieCaptureAgentMode = {
32
- render: () => `
33
- <selfie-capture allow-agent-mode='true' data-camera-ready show-agent-mode-for-tests>
34
- </selfie-capture>
35
- `,
36
- };
1
+ import SmartCamera from '../../../../domain/camera/src/SmartCamera';
2
+ import './SelfieCapture';
3
+
4
+ const meta = {
5
+ argTypes: {
6
+ 'theme-color': { control: 'color' },
7
+ },
8
+ component: 'selfie-capture',
9
+ };
10
+
11
+ export default meta;
12
+
13
+ export const SelfieCapture = {
14
+ args: {
15
+ 'theme-color': '#001096',
16
+ },
17
+ loaders: [
18
+ async () => ({
19
+ permissionGranted: await SmartCamera.getMedia({
20
+ audio: false,
21
+ video: true,
22
+ }),
23
+ }),
24
+ ],
25
+ render: (args) => `
26
+ <selfie-capture theme-color='${args['theme-color']}'>
27
+ </selfie-capture>
28
+ `,
29
+ };
30
+
31
+ export const SelfieCaptureAgentMode = {
32
+ render: () => `
33
+ <selfie-capture allow-agent-mode='true' data-camera-ready show-agent-mode-for-tests>
34
+ </selfie-capture>
35
+ `,
36
+ };
@@ -1,30 +1,30 @@
1
- {
2
- "name": "@smileid/signature-pad",
3
- "version": "1.4.7",
4
- "private": "true",
5
- "exports": {
6
- ".": "./index.js"
7
- },
8
- "scripts": {
9
- "lint": "eslint . --ext .js",
10
- "lint:fix": "eslint . --ext .js --fix"
11
- },
12
- "description": "A component to capture signatures using the signature_pad library, and uploads",
13
- "keywords": [
14
- "Web Components"
15
- ],
16
- "author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
17
- "dependencies": {
18
- "signature_pad": "^5.0.2"
19
- },
20
- "devDependencies": {
21
- "eslint": "^8.57.0",
22
- "eslint-config-airbnb-base": "^15.0.0",
23
- "eslint-config-prettier": "^9.1.0",
24
- "eslint-plugin-cypress": "^3.3.0",
25
- "eslint-plugin-import": "^2.29.1",
26
- "eslint-plugin-jest": "^28.8.3",
27
- "eslint-plugin-prettier": "^5.2.1",
28
- "prettier": "^3.3.3"
29
- }
30
- }
1
+ {
2
+ "name": "@smileid/signature-pad",
3
+ "version": "1.5.1",
4
+ "private": "true",
5
+ "exports": {
6
+ ".": "./index.js"
7
+ },
8
+ "scripts": {
9
+ "lint": "eslint . --ext .js",
10
+ "lint:fix": "eslint . --ext .js --fix"
11
+ },
12
+ "description": "A component to capture signatures using the signature_pad library, and uploads",
13
+ "keywords": [
14
+ "Web Components"
15
+ ],
16
+ "author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
17
+ "dependencies": {
18
+ "signature_pad": "^5.0.2"
19
+ },
20
+ "devDependencies": {
21
+ "eslint": "^8.57.0",
22
+ "eslint-config-airbnb-base": "^15.0.0",
23
+ "eslint-config-prettier": "^9.1.0",
24
+ "eslint-plugin-cypress": "^3.3.0",
25
+ "eslint-plugin-import": "^2.29.1",
26
+ "eslint-plugin-jest": "^28.8.3",
27
+ "eslint-plugin-prettier": "^5.2.1",
28
+ "prettier": "^3.3.3"
29
+ }
30
+ }
package/package.json CHANGED
@@ -1,47 +1,48 @@
1
- {
2
- "name": "@smileid/web-components",
3
- "version": "1.4.7",
4
- "main": "index.js",
5
- "exports": {
6
- ".": "./index.js",
7
- "./combobox": "./components/combobox/src/index.js",
8
- "./document-capture": "./components/document/src/index.js",
9
- "./end-user-consent": "./components/end-user-consent/src/index.js",
10
- "./navigation": "./components/navigation/src/index.js",
11
- "./selfie-capture": "./components/selfie/src/index.js",
12
- "./signature-pad": "./components/signature-pad/src/index.js",
13
- "./totp-consent": "./components/totp-consent/src/index.js",
14
- "./smart-camera-web": "./components/smart-camera-web/src/SmartCameraWeb.js"
15
- },
16
- "scripts": {
17
- "build": "NODE_ENV=development node esbuild.js",
18
- "clean": "rm -rf build dist",
19
- "lint:fix": "eslint . --ext .js --fix",
20
- "lint:html": "npx prettier --write $(git ls-files '*.html')",
21
- "lint": "eslint . --ext .js",
22
- "start": "npm run build && npx serve -p 8000 build",
23
- "test": "npx cypress run"
24
- },
25
- "description": "A collection of Web Components used by SmileID",
26
- "keywords": [
27
- "Web Components"
28
- ],
29
- "type": "module",
30
- "author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
31
- "dependencies": {
32
- "signature_pad": "^5.0.2",
33
- "validate.js": "^0.13.1"
34
- },
35
- "devDependencies": {
36
- "cypress": "^13.15.0",
37
- "esbuild": "^0.24.0",
38
- "eslint": "^8.57.0",
39
- "eslint-config-airbnb-base": "^15.0.0",
40
- "eslint-config-prettier": "^9.1.0",
41
- "eslint-plugin-cypress": "^3.3.0",
42
- "eslint-plugin-import": "^2.29.1",
43
- "eslint-plugin-jest": "^28.8.3",
44
- "eslint-plugin-prettier": "^5.2.1",
45
- "prettier": "^3.3.3"
46
- }
47
- }
1
+ {
2
+ "name": "@smileid/web-components",
3
+ "version": "1.5.1",
4
+ "main": "index.js",
5
+ "exports": {
6
+ ".": "./index.js",
7
+ "./combobox": "./components/combobox/src/index.js",
8
+ "./document-capture": "./components/document/src/index.js",
9
+ "./end-user-consent": "./components/end-user-consent/src/index.js",
10
+ "./navigation": "./components/navigation/src/index.js",
11
+ "./selfie-capture": "./components/selfie/src/index.js",
12
+ "./signature-pad": "./components/signature-pad/src/index.js",
13
+ "./totp-consent": "./components/totp-consent/src/index.js",
14
+ "./smart-camera-web": "./components/smart-camera-web/src/SmartCameraWeb.js"
15
+ },
16
+ "scripts": {
17
+ "build": "cross-env NODE_ENV=development node esbuild.js",
18
+ "clean": "rm -rf build dist",
19
+ "lint:fix": "eslint . --ext .js --fix",
20
+ "lint:html": "npx prettier --write $(git ls-files '*.html')",
21
+ "lint": "eslint . --ext .js",
22
+ "start": "npm run build && npx serve -p 8000 build",
23
+ "test": "npx cypress run"
24
+ },
25
+ "description": "A collection of Web Components used by SmileID",
26
+ "keywords": [
27
+ "Web Components"
28
+ ],
29
+ "type": "module",
30
+ "author": "SmileID <support@usesmileid.com> (https://usesmileid.com)",
31
+ "dependencies": {
32
+ "signature_pad": "^5.0.2",
33
+ "validate.js": "^0.13.1"
34
+ },
35
+ "devDependencies": {
36
+ "cross-env": "^7.0.3",
37
+ "cypress": "^13.15.0",
38
+ "esbuild": "^0.24.0",
39
+ "eslint": "^8.57.0",
40
+ "eslint-config-airbnb-base": "^15.0.0",
41
+ "eslint-config-prettier": "^9.1.0",
42
+ "eslint-plugin-cypress": "^3.3.0",
43
+ "eslint-plugin-import": "^2.29.1",
44
+ "eslint-plugin-jest": "^28.8.3",
45
+ "eslint-plugin-prettier": "^5.2.1",
46
+ "prettier": "^3.3.3"
47
+ }
48
+ }
@@ -1,34 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- const componentsDir = './components';
5
- const outputFilePath = './index.js';
6
-
7
- const getDirectories = (source) =>
8
- fs
9
- .readdirSync(source, { withFileTypes: true })
10
- .filter((dirent) => dirent.isDirectory())
11
- .map((dirent) => dirent.name);
12
-
13
- const generateExports = () => {
14
- const componentDirs = getDirectories(componentsDir);
15
- let exportStatements = '';
16
-
17
- componentDirs.forEach((dir) => {
18
- const srcPath = path.join(componentsDir, dir, 'src');
19
- if (fs.existsSync(srcPath)) {
20
- const files = fs.readdirSync(srcPath);
21
- files.forEach((file) => {
22
- const fileName = path.parse(file).name;
23
- const exportName = fileName.charAt(0).toUpperCase() + fileName.slice(1);
24
- exportStatements += `import ${exportName} from './components/${dir}/src/${fileName}';\n`;
25
- exportStatements += `export { ${exportName} };\n`;
26
- });
27
- }
28
- });
29
-
30
- fs.writeFileSync(outputFilePath, exportStatements);
31
- };
32
-
33
- generateExports();
34
- export default generateExports;