@plaidev/karte-action-sdk 1.1.158-28012700.23c1725b → 1.1.159-28012858.21df2a3f
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/templates.cjs.d.ts +1 -1
- package/dist/templates.cjs.js +8 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.js +8 -1
- package/package.json +1 -1
package/dist/templates.cjs.d.ts
CHANGED
package/dist/templates.cjs.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
*
|
9
9
|
* @internal
|
10
10
|
*/
|
11
|
-
function createAppScript(script = '', icons = []) {
|
11
|
+
function createAppScript(script = '', icons = [], customComponents = []) {
|
12
12
|
// TODO: `script` should be validated!
|
13
13
|
return `<script lang="ts">
|
14
14
|
// DON'T TOUCH THIS: SDK generates the following code
|
@@ -52,6 +52,13 @@ ${icons.length > 0
|
|
52
52
|
? `import {\n ${icons.join(',\n ')},\n} from '@plaidev/karte-action-sdk/icons';`
|
53
53
|
: ''}
|
54
54
|
|
55
|
+
${customComponents
|
56
|
+
.map(path => {
|
57
|
+
const componentName = path.split('/').pop().replace('.svelte', '');
|
58
|
+
return `import ${componentName} from '${path}';`;
|
59
|
+
})
|
60
|
+
.join('\n')}
|
61
|
+
|
55
62
|
export let send: (event_name: string, values?: any) => void;
|
56
63
|
let data_: Data;
|
57
64
|
export { data_ as data };
|
package/dist/templates.d.ts
CHANGED
package/dist/templates.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
*
|
7
7
|
* @internal
|
8
8
|
*/
|
9
|
-
function createAppScript(script = '', icons = []) {
|
9
|
+
function createAppScript(script = '', icons = [], customComponents = []) {
|
10
10
|
// TODO: `script` should be validated!
|
11
11
|
return `<script lang="ts">
|
12
12
|
// DON'T TOUCH THIS: SDK generates the following code
|
@@ -50,6 +50,13 @@ ${icons.length > 0
|
|
50
50
|
? `import {\n ${icons.join(',\n ')},\n} from '@plaidev/karte-action-sdk/icons';`
|
51
51
|
: ''}
|
52
52
|
|
53
|
+
${customComponents
|
54
|
+
.map(path => {
|
55
|
+
const componentName = path.split('/').pop().replace('.svelte', '');
|
56
|
+
return `import ${componentName} from '${path}';`;
|
57
|
+
})
|
58
|
+
.join('\n')}
|
59
|
+
|
53
60
|
export let send: (event_name: string, values?: any) => void;
|
54
61
|
let data_: Data;
|
55
62
|
export { data_ as data };
|