react-native-persona 1.2.10 → 1.3.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.
- package/CHANGELOG.md +25 -0
- package/RNPersonaInquiry.podspec +1 -1
- package/android/README.md +14 -0
- package/android/build.gradle +21 -100
- package/bin/persona-tool +1 -2
- package/lib/commonjs/index.js +477 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/persona-tools/AndroidResourcePrinter.js +694 -0
- package/lib/commonjs/persona-tools/AndroidResourcePrinter.js.map +1 -0
- package/lib/commonjs/persona-tools/Config.js +95 -0
- package/lib/commonjs/persona-tools/Config.js.map +1 -0
- package/lib/commonjs/persona-tools/Theme.js +228 -0
- package/lib/commonjs/persona-tools/Theme.js.map +1 -0
- package/lib/commonjs/persona-tools/index.js +41 -0
- package/lib/commonjs/persona-tools/index.js.map +1 -0
- package/lib/commonjs/persona-tools/prompts.js +48 -0
- package/lib/commonjs/persona-tools/prompts.js.map +1 -0
- package/lib/commonjs/persona-tools/tools/AndroidThemeGenerator.js +112 -0
- package/lib/commonjs/persona-tools/tools/AndroidThemeGenerator.js.map +1 -0
- package/lib/commonjs/persona-tools/tools/IosThemeInstructions.js +50 -0
- package/lib/commonjs/persona-tools/tools/IosThemeInstructions.js.map +1 -0
- package/lib/commonjs/util.js +36 -0
- package/lib/commonjs/util.js.map +1 -0
- package/lib/module/index.js +452 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/persona-tools/AndroidResourcePrinter.js +686 -0
- package/lib/module/persona-tools/AndroidResourcePrinter.js.map +1 -0
- package/lib/module/persona-tools/Config.js +82 -0
- package/lib/module/persona-tools/Config.js.map +1 -0
- package/lib/module/persona-tools/Theme.js +212 -0
- package/lib/module/persona-tools/Theme.js.map +1 -0
- package/lib/module/persona-tools/index.js +33 -0
- package/lib/module/persona-tools/index.js.map +1 -0
- package/lib/module/persona-tools/prompts.js +31 -0
- package/lib/module/persona-tools/prompts.js.map +1 -0
- package/lib/module/persona-tools/tools/AndroidThemeGenerator.js +82 -0
- package/lib/module/persona-tools/tools/AndroidThemeGenerator.js.map +1 -0
- package/lib/module/persona-tools/tools/IosThemeInstructions.js +37 -0
- package/lib/module/persona-tools/tools/IosThemeInstructions.js.map +1 -0
- package/lib/module/util.js +29 -0
- package/lib/module/util.js.map +1 -0
- package/{generatedTypes → lib/typescript}/index.d.ts +67 -3
- package/lib/typescript/persona-tools/AndroidResourcePrinter.d.ts +40 -0
- package/lib/typescript/persona-tools/Config.d.ts +15 -0
- package/lib/typescript/persona-tools/Theme.d.ts +124 -0
- package/lib/typescript/persona-tools/index.d.ts +1 -0
- package/lib/typescript/persona-tools/prompts.d.ts +8 -0
- package/lib/typescript/persona-tools/tools/AndroidThemeGenerator.d.ts +5 -0
- package/lib/typescript/persona-tools/tools/IosThemeInstructions.d.ts +5 -0
- package/lib/typescript/util.d.ts +3 -0
- package/package.json +79 -22
- package/src/index.ts +17 -18
- package/{persona-tools/lib → src/persona-tools}/AndroidResourcePrinter.ts +314 -278
- package/{persona-tools/config.ts → src/persona-tools/Config.ts} +7 -7
- package/src/persona-tools/Theme.ts +262 -0
- package/src/persona-tools/index.ts +30 -0
- package/{persona-tools/lib → src/persona-tools}/prompts.ts +11 -11
- package/{persona-tools → src/persona-tools}/tools/AndroidThemeGenerator.ts +31 -32
- package/{persona-tools → src/persona-tools}/tools/IosThemeInstructions.ts +8 -8
- package/src/util.ts +3 -3
- package/jest.config.js +0 -10
- package/persona-tools/Theme.js +0 -213
- package/persona-tools/Theme.ts +0 -260
- package/persona-tools/config.js +0 -72
- package/persona-tools/index.js +0 -30
- package/persona-tools/index.ts +0 -30
- package/persona-tools/lib/AndroidResourcePrinter.js +0 -832
- package/persona-tools/lib/AndroidResourcePrinter.spec.js +0 -1135
- package/persona-tools/lib/AndroidResourcePrinter.spec.ts +0 -1229
- package/persona-tools/lib/prompts.js +0 -39
- package/persona-tools/tools/AndroidThemeGenerator.js +0 -59
- package/persona-tools/tools/IosThemeInstructions.js +0 -34
- package/src/index.js +0 -307
- package/src/util.js +0 -29
- package/src/util.spec.js +0 -15
- package/src/util.spec.ts +0 -16
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import Theme from '../Theme';
|
|
5
|
+
import { confirmThemeValues, confirmResourceFiles } from '../prompts';
|
|
6
|
+
import AndroidResourcePrinter from '../AndroidResourcePrinter';
|
|
7
|
+
import Configuration from '../Config';
|
|
8
|
+
const ANDROID_STYLES_RESOURCE_PATH = './android/app/src/main/res/values/styles_persona.xml';
|
|
9
|
+
const ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH = './android/app/src/main/res/drawable/rn_persona_button.xml';
|
|
10
|
+
const ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH = './android/app/src/main/res/drawable/rn_persona_button_secondary.xml';
|
|
11
|
+
const ANDROID_BUTTON_COLOR_RESOURCE_PATH = './android/app/src/main/res/color/rn_persona_button.xml';
|
|
12
|
+
|
|
13
|
+
class ThemeGenerator {
|
|
14
|
+
async run() {
|
|
15
|
+
await Theme.print();
|
|
16
|
+
const {
|
|
17
|
+
isConfirmed: themeValuesConfirmed
|
|
18
|
+
} = await confirmThemeValues();
|
|
19
|
+
|
|
20
|
+
if (!themeValuesConfirmed) {
|
|
21
|
+
console.log(chalk.yellow('\nPlease adjust the values in package.json.\n'));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log(`\n${chalk.yellow('Creating an Android Resource files for your project at:')}\n
|
|
26
|
+
- ${ANDROID_STYLES_RESOURCE_PATH}
|
|
27
|
+
- ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}
|
|
28
|
+
- ${ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH}
|
|
29
|
+
- ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}\n`);
|
|
30
|
+
console.log('Building your application with this resource file themes your Persona Inquiry flow.\n');
|
|
31
|
+
const config = await Configuration.get();
|
|
32
|
+
const theme = config.androidTheme;
|
|
33
|
+
const {
|
|
34
|
+
style,
|
|
35
|
+
buttonDrawable,
|
|
36
|
+
buttonSecondaryDrawable,
|
|
37
|
+
buttonColor
|
|
38
|
+
} = new AndroidResourcePrinter(theme).process();
|
|
39
|
+
let {
|
|
40
|
+
isConfirmed: confirmed
|
|
41
|
+
} = await confirmResourceFiles();
|
|
42
|
+
|
|
43
|
+
if (!confirmed) {
|
|
44
|
+
process.exit(1);
|
|
45
|
+
} // Add a line after confirmation
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
console.log('');
|
|
49
|
+
fs.mkdirSync(path.dirname(ANDROID_STYLES_RESOURCE_PATH), {
|
|
50
|
+
recursive: true
|
|
51
|
+
});
|
|
52
|
+
fs.writeFileSync(ANDROID_STYLES_RESOURCE_PATH, style.end({
|
|
53
|
+
prettyPrint: true
|
|
54
|
+
}));
|
|
55
|
+
console.log(`${chalk.green('Saved an Android style file at path:')} ${ANDROID_STYLES_RESOURCE_PATH}.`);
|
|
56
|
+
fs.mkdirSync(path.dirname(ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH), {
|
|
57
|
+
recursive: true
|
|
58
|
+
});
|
|
59
|
+
fs.writeFileSync(ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH, buttonDrawable.end({
|
|
60
|
+
prettyPrint: true
|
|
61
|
+
}));
|
|
62
|
+
console.log(`${chalk.green('Saved an Android drawable file at path:')} ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}.`);
|
|
63
|
+
fs.mkdirSync(path.dirname(ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH), {
|
|
64
|
+
recursive: true
|
|
65
|
+
});
|
|
66
|
+
fs.writeFileSync(ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH, buttonSecondaryDrawable.end({
|
|
67
|
+
prettyPrint: true
|
|
68
|
+
}));
|
|
69
|
+
console.log(`${chalk.green('Saved an Android drawable file at path:')} ${ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH}.`);
|
|
70
|
+
fs.mkdirSync(path.dirname(ANDROID_BUTTON_COLOR_RESOURCE_PATH), {
|
|
71
|
+
recursive: true
|
|
72
|
+
});
|
|
73
|
+
fs.writeFileSync(ANDROID_BUTTON_COLOR_RESOURCE_PATH, buttonColor.end({
|
|
74
|
+
prettyPrint: true
|
|
75
|
+
}));
|
|
76
|
+
console.log(`${chalk.green('Saved an Android color file at path:')} ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}.`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default new ThemeGenerator();
|
|
82
|
+
//# sourceMappingURL=AndroidThemeGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AndroidThemeGenerator.ts"],"names":["fs","chalk","path","Theme","confirmThemeValues","confirmResourceFiles","AndroidResourcePrinter","Configuration","ANDROID_STYLES_RESOURCE_PATH","ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH","ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH","ANDROID_BUTTON_COLOR_RESOURCE_PATH","ThemeGenerator","run","print","isConfirmed","themeValuesConfirmed","console","log","yellow","config","get","theme","androidTheme","style","buttonDrawable","buttonSecondaryDrawable","buttonColor","process","confirmed","exit","mkdirSync","dirname","recursive","writeFileSync","end","prettyPrint","green"],"mappings":"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","sourcesContent":["import fs from 'fs';\nimport chalk from 'chalk';\nimport path from 'path';\n\nimport Theme, { AndroidThemeObject } from '../Theme';\nimport { confirmThemeValues, confirmResourceFiles } from '../prompts';\nimport AndroidResourcePrinter from '../AndroidResourcePrinter';\nimport Configuration from '../Config';\n\nconst ANDROID_STYLES_RESOURCE_PATH =\n './android/app/src/main/res/values/styles_persona.xml';\nconst ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH =\n './android/app/src/main/res/drawable/rn_persona_button.xml';\nconst ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH =\n './android/app/src/main/res/drawable/rn_persona_button_secondary.xml';\nconst ANDROID_BUTTON_COLOR_RESOURCE_PATH =\n './android/app/src/main/res/color/rn_persona_button.xml';\n\nclass ThemeGenerator {\n async run() {\n await Theme.print();\n\n const { isConfirmed: themeValuesConfirmed } = await confirmThemeValues();\n\n if (!themeValuesConfirmed) {\n console.log(\n chalk.yellow('\\nPlease adjust the values in package.json.\\n')\n );\n return;\n }\n\n console.log(\n `\\n${chalk.yellow(\n 'Creating an Android Resource files for your project at:'\n )}\\n\n - ${ANDROID_STYLES_RESOURCE_PATH}\n - ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}\n - ${ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH}\n - ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}\\n`\n );\n console.log(\n 'Building your application with this resource file themes your Persona Inquiry flow.\\n'\n );\n\n const config = await Configuration.get();\n const theme = config.androidTheme as AndroidThemeObject;\n\n const { style, buttonDrawable, buttonSecondaryDrawable, buttonColor } =\n new AndroidResourcePrinter(theme).process();\n\n let { isConfirmed: confirmed } = await confirmResourceFiles();\n\n if (!confirmed) {\n process.exit(1);\n }\n\n // Add a line after confirmation\n console.log('');\n\n fs.mkdirSync(path.dirname(ANDROID_STYLES_RESOURCE_PATH), {\n recursive: true,\n });\n fs.writeFileSync(\n ANDROID_STYLES_RESOURCE_PATH,\n style.end({ prettyPrint: true })\n );\n\n console.log(\n `${chalk.green(\n 'Saved an Android style file at path:'\n )} ${ANDROID_STYLES_RESOURCE_PATH}.`\n );\n\n fs.mkdirSync(path.dirname(ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH), {\n recursive: true,\n });\n fs.writeFileSync(\n ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH,\n buttonDrawable.end({ prettyPrint: true })\n );\n console.log(\n `${chalk.green(\n 'Saved an Android drawable file at path:'\n )} ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}.`\n );\n\n fs.mkdirSync(\n path.dirname(ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH),\n {\n recursive: true,\n }\n );\n fs.writeFileSync(\n ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH,\n buttonSecondaryDrawable.end({ prettyPrint: true })\n );\n console.log(\n `${chalk.green(\n 'Saved an Android drawable file at path:'\n )} ${ANDROID_BUTTON_SECONDARY_DRAWABLE_RESOURCE_PATH}.`\n );\n\n fs.mkdirSync(path.dirname(ANDROID_BUTTON_COLOR_RESOURCE_PATH), {\n recursive: true,\n });\n fs.writeFileSync(\n ANDROID_BUTTON_COLOR_RESOURCE_PATH,\n buttonColor.end({ prettyPrint: true })\n );\n console.log(\n `${chalk.green(\n 'Saved an Android color file at path:'\n )} ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}.`\n );\n }\n}\n\nexport default new ThemeGenerator();\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Theme from '../Theme';
|
|
2
|
+
import { confirmThemeValues } from '../prompts';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
|
|
5
|
+
class IosThemeInstructions {
|
|
6
|
+
async run() {
|
|
7
|
+
await Theme.print('ios');
|
|
8
|
+
const {
|
|
9
|
+
isConfirmed: themeValuesConfirmed
|
|
10
|
+
} = await confirmThemeValues();
|
|
11
|
+
|
|
12
|
+
if (!themeValuesConfirmed) {
|
|
13
|
+
console.log(chalk.yellow('\nPlease adjust the values in package.json.\n'));
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
console.log(`\n${chalk.yellow('To theme the Persona Inquiry flow for iOS:')}`);
|
|
18
|
+
console.log('Add the theme values to the Persona Inquiry SDK client by using the `.iosTheme` builder function');
|
|
19
|
+
console.log(`
|
|
20
|
+
${chalk.green(`+ import { persona } from '../package.json'`)}
|
|
21
|
+
...
|
|
22
|
+
Inquiry.fromTemplate(selectedTemplateId)
|
|
23
|
+
.onSuccess(handleSuccess)
|
|
24
|
+
.onCancelled(handleCancelled)
|
|
25
|
+
.onFailed(handleFailed)
|
|
26
|
+
.onError(handleError)
|
|
27
|
+
${chalk.green('+ .iosTheme(persona.iosTheme)')}
|
|
28
|
+
.build()
|
|
29
|
+
.start();
|
|
30
|
+
...
|
|
31
|
+
`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default new IosThemeInstructions();
|
|
37
|
+
//# sourceMappingURL=IosThemeInstructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["IosThemeInstructions.ts"],"names":["Theme","confirmThemeValues","chalk","IosThemeInstructions","run","print","isConfirmed","themeValuesConfirmed","console","log","yellow","green"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,UAAlB;AACA,SAASC,kBAAT,QAAmC,YAAnC;AACA,OAAOC,KAAP,MAAkB,OAAlB;;AAEA,MAAMC,oBAAN,CAA2B;AAChB,QAAHC,GAAG,GAAG;AACV,UAAMJ,KAAK,CAACK,KAAN,CAAY,KAAZ,CAAN;AAEA,UAAM;AAAEC,MAAAA,WAAW,EAAEC;AAAf,QAAwC,MAAMN,kBAAkB,EAAtE;;AAEA,QAAI,CAACM,oBAAL,EAA2B;AACzBC,MAAAA,OAAO,CAACC,GAAR,CACEP,KAAK,CAACQ,MAAN,CAAa,+CAAb,CADF;AAGA;AACD;;AAEDF,IAAAA,OAAO,CAACC,GAAR,CACG,KAAIP,KAAK,CAACQ,MAAN,CAAa,4CAAb,CAA2D,EADlE;AAGAF,IAAAA,OAAO,CAACC,GAAR,CACE,kGADF;AAIAD,IAAAA,OAAO,CAACC,GAAR,CAAa;AACjB,MAAMP,KAAK,CAACS,KAAN,CAAa,6CAAb,CAA2D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMT,KAAK,CAACS,KAAN,CAAY,iCAAZ,CAA+C;AACrD;AACA;AACA;AACA,KAZI;AAaD;;AAjCwB;;AAoC3B,eAAe,IAAIR,oBAAJ,EAAf","sourcesContent":["import Theme from '../Theme';\nimport { confirmThemeValues } from '../prompts';\nimport chalk from 'chalk';\n\nclass IosThemeInstructions {\n async run() {\n await Theme.print('ios');\n\n const { isConfirmed: themeValuesConfirmed } = await confirmThemeValues();\n\n if (!themeValuesConfirmed) {\n console.log(\n chalk.yellow('\\nPlease adjust the values in package.json.\\n')\n );\n return;\n }\n\n console.log(\n `\\n${chalk.yellow('To theme the Persona Inquiry flow for iOS:')}`\n );\n console.log(\n 'Add the theme values to the Persona Inquiry SDK client by using the `.iosTheme` builder function'\n );\n\n console.log(`\n ${chalk.green(`+ import { persona } from '../package.json'`)}\n ...\n Inquiry.fromTemplate(selectedTemplateId)\n .onSuccess(handleSuccess)\n .onCancelled(handleCancelled)\n .onFailed(handleFailed)\n .onError(handleError)\n ${chalk.green('+ .iosTheme(persona.iosTheme)')}\n .build()\n .start();\n ...\n `);\n }\n}\n\nexport default new IosThemeInstructions();\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const HEX_REGEX = /^[a-fA-F0-9]{6}$/;
|
|
2
|
+
export function processThemeValues(themeObject) {
|
|
3
|
+
const result = {};
|
|
4
|
+
|
|
5
|
+
for (const [key, value] of Object.entries(themeObject)) {
|
|
6
|
+
if (value === null) {
|
|
7
|
+
continue;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (key.includes('Color')) {
|
|
11
|
+
let colorValue = value;
|
|
12
|
+
|
|
13
|
+
if (value[0] === '#') {
|
|
14
|
+
colorValue = value.slice(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (HEX_REGEX.test(colorValue)) {
|
|
18
|
+
result[key] = `#${colorValue}`;
|
|
19
|
+
} else {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
result[key] = value.toString();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["util.ts"],"names":["HEX_REGEX","processThemeValues","themeObject","result","key","value","Object","entries","includes","colorValue","slice","test","toString"],"mappings":"AAAA,MAAMA,SAAS,GAAG,kBAAlB;AACA,OAAO,SAASC,kBAAT,CAA4BC,WAA5B,EAAiD;AACtD,QAAMC,MAAiC,GAAG,EAA1C;;AACA,OAAK,MAAM,CAACC,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,WAAf,CAA3B,EAAwD;AACtD,QAAIG,KAAK,KAAK,IAAd,EAAoB;AAClB;AACD;;AAED,QAAID,GAAG,CAACI,QAAJ,CAAa,OAAb,CAAJ,EAA2B;AACzB,UAAIC,UAAU,GAAGJ,KAAjB;;AACA,UAAIA,KAAK,CAAC,CAAD,CAAL,KAAa,GAAjB,EAAsB;AACpBI,QAAAA,UAAU,GAAGJ,KAAK,CAACK,KAAN,CAAY,CAAZ,CAAb;AACD;;AAED,UAAIV,SAAS,CAACW,IAAV,CAAeF,UAAf,CAAJ,EAAgC;AAC9BN,QAAAA,MAAM,CAACC,GAAD,CAAN,GAAe,IAAGK,UAAW,EAA7B;AACD,OAFD,MAEO;AACL;AACD;AACF,KAXD,MAWO;AACLN,MAAAA,MAAM,CAACC,GAAD,CAAN,GAAcC,KAAK,CAACO,QAAN,EAAd;AACD;AACF;;AAED,SAAOT,MAAP;AACD","sourcesContent":["const HEX_REGEX = /^[a-fA-F0-9]{6}$/;\nexport function processThemeValues(themeObject: Object) {\n const result: { [key: string]: string } = {};\n for (const [key, value] of Object.entries(themeObject)) {\n if (value === null) {\n continue;\n }\n\n if (key.includes('Color')) {\n let colorValue = value;\n if (value[0] === '#') {\n colorValue = value.slice(1);\n }\n\n if (HEX_REGEX.test(colorValue)) {\n result[key] = `#${colorValue}`;\n } else {\n continue;\n }\n } else {\n result[key] = value.toString();\n }\n }\n\n return result;\n}\n"]}
|
|
@@ -2,15 +2,45 @@ declare const Unique: unique symbol;
|
|
|
2
2
|
export declare type Opaque<T, Tag> = T & {
|
|
3
3
|
[Unique]: Tag;
|
|
4
4
|
};
|
|
5
|
-
declare type TemplateId = Opaque<string,
|
|
6
|
-
declare type InquiryId = Opaque<string,
|
|
7
|
-
declare type AccountId = Opaque<string,
|
|
5
|
+
declare type TemplateId = Opaque<string, 'TemplateId'>;
|
|
6
|
+
declare type InquiryId = Opaque<string, 'InquiryId'>;
|
|
7
|
+
declare type AccountId = Opaque<string, 'AccountId'>;
|
|
8
8
|
export declare class InvalidTemplateId extends Error {
|
|
9
9
|
}
|
|
10
10
|
export declare class InvalidInquiryId extends Error {
|
|
11
11
|
}
|
|
12
12
|
export declare class InvalidAccountId extends Error {
|
|
13
13
|
}
|
|
14
|
+
export declare namespace Fields {
|
|
15
|
+
class Builder {
|
|
16
|
+
private _name?;
|
|
17
|
+
private _address?;
|
|
18
|
+
private _birthdate?;
|
|
19
|
+
private _emailAddress?;
|
|
20
|
+
private _phoneNumber?;
|
|
21
|
+
private _fields;
|
|
22
|
+
name(name: NameField): this;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the Field.Builder instance
|
|
25
|
+
*
|
|
26
|
+
* @param address - The address object
|
|
27
|
+
*/
|
|
28
|
+
address(address: AddressField): this;
|
|
29
|
+
/**
|
|
30
|
+
* @param date {Date}
|
|
31
|
+
*/
|
|
32
|
+
birthdate(date: Date): this;
|
|
33
|
+
/**
|
|
34
|
+
* @param date {string}
|
|
35
|
+
*/
|
|
36
|
+
emailAddress(email: string): this;
|
|
37
|
+
phoneNumber(phoneNumber: string): this;
|
|
38
|
+
field(fieldKey: string, value: number | string | boolean): this;
|
|
39
|
+
build(): FieldsPayload;
|
|
40
|
+
}
|
|
41
|
+
export function builder(): Builder;
|
|
42
|
+
export {};
|
|
43
|
+
}
|
|
14
44
|
/**
|
|
15
45
|
* String enum for environments. These strings will be parsed
|
|
16
46
|
* on the native side bridge into Kotlin / Swift enums.
|
|
@@ -25,6 +55,8 @@ export interface InquiryOptions {
|
|
|
25
55
|
referenceId?: string;
|
|
26
56
|
accountId?: AccountId;
|
|
27
57
|
environment?: Environment;
|
|
58
|
+
accessToken?: string;
|
|
59
|
+
fields?: FieldsPayload;
|
|
28
60
|
onSuccess?: OnSuccessCallback;
|
|
29
61
|
onCancelled?: OnCancelledCallback;
|
|
30
62
|
onFailed?: OnFailedCallback;
|
|
@@ -43,6 +75,7 @@ export interface InquiryAttributes {
|
|
|
43
75
|
street2: string | null;
|
|
44
76
|
city: string | null;
|
|
45
77
|
subdivision: string | null;
|
|
78
|
+
subdivisionAbbr: string | null;
|
|
46
79
|
postalCode: string | null;
|
|
47
80
|
countryCode: string | null;
|
|
48
81
|
} | null;
|
|
@@ -59,6 +92,7 @@ export interface BridgeInquiryAttributes {
|
|
|
59
92
|
street2: string | null;
|
|
60
93
|
city: string | null;
|
|
61
94
|
subdivision: string | null;
|
|
95
|
+
subdivisionAbbr: string | null;
|
|
62
96
|
postalCode: string | null;
|
|
63
97
|
countryCode: string | null;
|
|
64
98
|
} | null;
|
|
@@ -73,7 +107,9 @@ export declare class Inquiry {
|
|
|
73
107
|
referenceId?: string;
|
|
74
108
|
accountId?: AccountId;
|
|
75
109
|
environment?: Environment;
|
|
110
|
+
accessToken?: string;
|
|
76
111
|
iosThemeObject?: Object | null;
|
|
112
|
+
fields?: FieldsPayload | null;
|
|
77
113
|
private onSuccess?;
|
|
78
114
|
private onCancelled?;
|
|
79
115
|
private onFailed?;
|
|
@@ -86,14 +122,38 @@ export declare class Inquiry {
|
|
|
86
122
|
private clearListeners;
|
|
87
123
|
start(): void;
|
|
88
124
|
}
|
|
125
|
+
interface NameField {
|
|
126
|
+
first?: string;
|
|
127
|
+
middle?: string;
|
|
128
|
+
last?: string;
|
|
129
|
+
}
|
|
130
|
+
interface AddressField {
|
|
131
|
+
street1?: string;
|
|
132
|
+
street2?: string;
|
|
133
|
+
city?: string;
|
|
134
|
+
subdivision?: string;
|
|
135
|
+
postalCode?: string;
|
|
136
|
+
countryCode?: string;
|
|
137
|
+
}
|
|
138
|
+
interface FieldsPayload {
|
|
139
|
+
name?: NameField | null;
|
|
140
|
+
address?: AddressField | null;
|
|
141
|
+
birthdate?: string | null;
|
|
142
|
+
emailAddress?: string | null;
|
|
143
|
+
phoneNumber?: string | null;
|
|
144
|
+
additionalFields?: Object | null;
|
|
145
|
+
}
|
|
89
146
|
declare class InquiryBuilder {
|
|
90
147
|
private _inquiryId;
|
|
148
|
+
private _accessToken?;
|
|
91
149
|
private _onSuccess?;
|
|
92
150
|
private _onCancelled?;
|
|
93
151
|
private _onFailed?;
|
|
94
152
|
private _onError?;
|
|
95
153
|
private _iosThemeObject?;
|
|
154
|
+
private _fields?;
|
|
96
155
|
constructor(inquiryId: InquiryId);
|
|
156
|
+
accessToken(accessToken: string): InquiryBuilder;
|
|
97
157
|
onSuccess(callback: OnSuccessCallback): InquiryBuilder;
|
|
98
158
|
onCancelled(callback: OnCancelledCallback): InquiryBuilder;
|
|
99
159
|
onFailed(callback: OnFailedCallback): InquiryBuilder;
|
|
@@ -106,6 +166,8 @@ declare class TemplateBuilder {
|
|
|
106
166
|
private _accountId?;
|
|
107
167
|
private _referenceId?;
|
|
108
168
|
private _environment?;
|
|
169
|
+
private _fields?;
|
|
170
|
+
private _accessToken?;
|
|
109
171
|
private _onSuccess?;
|
|
110
172
|
private _onCancelled?;
|
|
111
173
|
private _onFailed?;
|
|
@@ -115,6 +177,8 @@ declare class TemplateBuilder {
|
|
|
115
177
|
referenceId(referenceId: string): TemplateBuilder;
|
|
116
178
|
accountId(accountId: string): TemplateBuilder;
|
|
117
179
|
environment(environment: Environment): TemplateBuilder;
|
|
180
|
+
accessToken(accessToken: string): TemplateBuilder;
|
|
181
|
+
fields(fields: FieldsPayload): TemplateBuilder;
|
|
118
182
|
onSuccess(callback: OnSuccessCallback): TemplateBuilder;
|
|
119
183
|
onCancelled(callback: OnCancelledCallback): TemplateBuilder;
|
|
120
184
|
onFailed(callback: OnFailedCallback): TemplateBuilder;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AndroidThemeObject } from './Theme';
|
|
2
|
+
import type { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
|
|
3
|
+
declare class AndroidResourcePrinter {
|
|
4
|
+
theme: AndroidThemeObject;
|
|
5
|
+
root: XMLBuilder;
|
|
6
|
+
buttonDrawable: XMLBuilder;
|
|
7
|
+
buttonSecondaryDrawable: XMLBuilder;
|
|
8
|
+
buttonColor: XMLBuilder;
|
|
9
|
+
preprintQueue: (() => void)[];
|
|
10
|
+
printQueue: (() => void)[];
|
|
11
|
+
postPrintQueue: (() => void)[];
|
|
12
|
+
constructor(theme: AndroidThemeObject);
|
|
13
|
+
process(): {
|
|
14
|
+
style: XMLBuilder;
|
|
15
|
+
buttonDrawable: XMLBuilder;
|
|
16
|
+
buttonSecondaryDrawable: XMLBuilder;
|
|
17
|
+
buttonColor: XMLBuilder;
|
|
18
|
+
};
|
|
19
|
+
private print;
|
|
20
|
+
private hasTheme;
|
|
21
|
+
private primaryColor;
|
|
22
|
+
private accentColor;
|
|
23
|
+
private darkPrimaryColor;
|
|
24
|
+
private backgroundColor;
|
|
25
|
+
private titleText;
|
|
26
|
+
private bodyText;
|
|
27
|
+
private footnoteText;
|
|
28
|
+
private cameraInstructionsText;
|
|
29
|
+
private cameraHintText;
|
|
30
|
+
private cameraGuideHintText;
|
|
31
|
+
private textField;
|
|
32
|
+
private pickerText;
|
|
33
|
+
private button;
|
|
34
|
+
private progressColor;
|
|
35
|
+
private successAsset;
|
|
36
|
+
private failAsset;
|
|
37
|
+
private loadingAnimationAsset;
|
|
38
|
+
private selfieAnimationAsset;
|
|
39
|
+
}
|
|
40
|
+
export default AndroidResourcePrinter;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ConfigObject {
|
|
2
|
+
androidTheme: {
|
|
3
|
+
[key: string]: string | null | undefined;
|
|
4
|
+
};
|
|
5
|
+
iosTheme: {
|
|
6
|
+
[key: string]: string | null | undefined;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
declare class Configuration {
|
|
10
|
+
config?: ConfigObject | null;
|
|
11
|
+
loadConfig(): Promise<ConfigObject | null | undefined>;
|
|
12
|
+
get(): Promise<ConfigObject>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: Configuration;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export declare enum ANDROID_THEME_CONFIG_KEY {
|
|
2
|
+
backgroundColor = "backgroundColor",
|
|
3
|
+
primaryColor = "primaryColor",
|
|
4
|
+
darkPrimaryColor = "darkPrimaryColor",
|
|
5
|
+
accentColor = "accentColor",
|
|
6
|
+
titleTextColor = "titleTextColor",
|
|
7
|
+
titleTextFont = "titleTextFont",
|
|
8
|
+
titleTextSize = "titleTextSize",
|
|
9
|
+
bodyTextColor = "bodyTextColor",
|
|
10
|
+
bodyTextFont = "bodyTextFont",
|
|
11
|
+
bodyTextSize = "bodyTextSize",
|
|
12
|
+
footnoteTextColor = "footnoteTextColor",
|
|
13
|
+
footnoteTextFont = "footnoteTextFont",
|
|
14
|
+
footnoteTextSize = "footnoteTextSize",
|
|
15
|
+
cameraInstructionsTextColor = "cameraInstructionsTextColor",
|
|
16
|
+
cameraInstructionsTextFont = "cameraInstructionsTextFont",
|
|
17
|
+
cameraInstructionsTextSize = "cameraInstructionsTextSize",
|
|
18
|
+
cameraHintTextColor = "cameraHintTextColor",
|
|
19
|
+
cameraHintTextFont = "cameraHintTextFont",
|
|
20
|
+
cameraHintTextSize = "cameraHintTextSize",
|
|
21
|
+
cameraGuideHintTextColor = "cameraGuideHintTextColor",
|
|
22
|
+
cameraGuideHintTextFont = "cameraGuideHintTextFont",
|
|
23
|
+
cameraGuideHintTextSize = "cameraGuideHintTextSize",
|
|
24
|
+
textFieldTextColor = "textFieldTextColor",
|
|
25
|
+
textFieldTextFont = "textFieldTextFont",
|
|
26
|
+
pickerTextColor = "pickerTextColor",
|
|
27
|
+
pickerTextFont = "pickerTextFont",
|
|
28
|
+
buttonBackgroundColor = "buttonBackgroundColor",
|
|
29
|
+
buttonDisabledBackgroundColor = "buttonDisabledBackgroundColor",
|
|
30
|
+
buttonTouchedBackgroundColor = "buttonTouchedBackgroundColor",
|
|
31
|
+
buttonTextColor = "buttonTextColor",
|
|
32
|
+
buttonDisabledTextColor = "buttonDisabledTextColor",
|
|
33
|
+
buttonCornerRadius = "buttonCornerRadius",
|
|
34
|
+
buttonFont = "buttonFont",
|
|
35
|
+
buttonTextSize = "buttonTextSize",
|
|
36
|
+
progressColor = "progressColor",
|
|
37
|
+
successAsset = "successAsset",
|
|
38
|
+
failAsset = "failAsset",
|
|
39
|
+
loadingAnimationAsset = "loadingAnimationAsset",
|
|
40
|
+
loadingAnimationWidthPercent = "loadingAnimationWidthPercent",
|
|
41
|
+
selfieAnimationAsset = "selfieAnimationAsset",
|
|
42
|
+
selfieAnimationWidthPercent = "selfieAnimationWidthPercent"
|
|
43
|
+
}
|
|
44
|
+
export declare enum IOS_THEME_CONFIG_KEY {
|
|
45
|
+
backgroundColor = "backgroundColor",
|
|
46
|
+
primaryColor = "primaryColor",
|
|
47
|
+
darkPrimaryColor = "darkPrimaryColor",
|
|
48
|
+
accentColor = "accentColor",
|
|
49
|
+
progressColor = "progressColor",
|
|
50
|
+
overlayBackgroundColor = "overlayBackgroundColor",
|
|
51
|
+
titleTextColor = "titleTextColor",
|
|
52
|
+
titleTextFont = "titleTextFont",
|
|
53
|
+
titleTextSize = "titleTextSize",
|
|
54
|
+
titleTextAlignment = "titleTextAlignment",
|
|
55
|
+
bodyTextColor = "bodyTextColor",
|
|
56
|
+
bodyTextFont = "bodyTextFont",
|
|
57
|
+
bodyTextSize = "bodyTextSize",
|
|
58
|
+
bodyTextAlignment = "bodyTextAlignment",
|
|
59
|
+
footnoteTextColor = "footnoteTextColor",
|
|
60
|
+
footnoteTextFont = "footnoteTextFont",
|
|
61
|
+
footnoteTextSize = "footnoteTextSize",
|
|
62
|
+
formLabelTextColor = "formLabelTextColor",
|
|
63
|
+
formLabelTextFont = "formLabelTextFont",
|
|
64
|
+
textFieldTextColor = "textFieldTextColor",
|
|
65
|
+
textFieldBackgroundColor = "textFieldBackgroundColor",
|
|
66
|
+
textFieldBorderColor = "textFieldBorderColor",
|
|
67
|
+
pickerTextColor = "pickerTextColor",
|
|
68
|
+
pickerTextFont = "pickerTextFont",
|
|
69
|
+
cameraInstructionsTextColor = "cameraInstructionsTextColor",
|
|
70
|
+
cameraInstructionsTextFont = "cameraInstructionsTextFont",
|
|
71
|
+
cameraInstructionsTextSize = "cameraInstructionsTextFont",
|
|
72
|
+
cameraHintTextColor = "cameraHintTextColor",
|
|
73
|
+
cameraHintTextFont = "cameraHintTextFont",
|
|
74
|
+
cameraHintTextSize = "cameraHintTextSize",
|
|
75
|
+
cameraGuideHintTextColor = "cameraGuideHintTextColor",
|
|
76
|
+
cameraGuideHintTextFont = "cameraGuideHintTextFont",
|
|
77
|
+
cameraGuideHintTextSize = "cameraGuideHintTextSize",
|
|
78
|
+
buttonBackgroundColor = "buttonBackgroundColor",
|
|
79
|
+
buttonDisabledBackgroundColor = "buttonDisabledBackgroundColor",
|
|
80
|
+
buttonTouchedBackgroundColor = "buttonTouchedBackgroundColor",
|
|
81
|
+
buttonImageTintColor = "buttonImageTintColor",
|
|
82
|
+
buttonImageHidden = "buttonImageHidden",
|
|
83
|
+
buttonCornerRadius = "buttonCornerRadius",
|
|
84
|
+
buttonTextAlignment = "buttonTextAlignment",
|
|
85
|
+
buttonDisabledTextColor = "buttonDisabledTextColor",
|
|
86
|
+
buttonTextColor = "buttonTextColor",
|
|
87
|
+
buttonFont = "buttonFont",
|
|
88
|
+
buttonTextSize = "buttonTextSize",
|
|
89
|
+
selectedCellBackgroundColor = "selectedCellBackgroundColor",
|
|
90
|
+
closeButtonTintColor = "closeButtonTintColor",
|
|
91
|
+
cancelButtonBackgroundColor = "cancelButtonBackgroundColor",
|
|
92
|
+
cameraButtonBackgroundColor = "cameraButtonBackgroundColor",
|
|
93
|
+
cameraGuideCornersColor = "cameraGuideCornersColor",
|
|
94
|
+
successAssetName = "successAssetName",
|
|
95
|
+
successAssetWidth = "successAssetWidth",
|
|
96
|
+
successAssetHeight = "successAssetHeight",
|
|
97
|
+
verificationFailAssetName = "verificationFailAssetName",
|
|
98
|
+
verificationFailAssetWidth = "verificationFailAssetWidth",
|
|
99
|
+
verificationFailAssetHeight = "verificationFailAssetHeight",
|
|
100
|
+
failAssetName = "failAssetName",
|
|
101
|
+
failAssetWidth = "failAssetWidth",
|
|
102
|
+
failAssetHeight = "failAssetHeight",
|
|
103
|
+
loadingAnimationAssetName = "loadingAnimationAssetName",
|
|
104
|
+
loadingAnimationAssetWidth = "loadingAnimationAssetWidth",
|
|
105
|
+
loadingAnimationAssetHeight = "loadingAnimationAssetHeight",
|
|
106
|
+
processingAnimationAssetName = "processingAnimationAssetName",
|
|
107
|
+
processingAnimationAssetWidth = "processingAnimationAssetWidth",
|
|
108
|
+
processingAnimationAssetHeight = "processingAnimationAssetHeight",
|
|
109
|
+
selfieAnimationAssetName = "selfieAnimationAssetName",
|
|
110
|
+
selfieAnimationAssetWidth = "selfieAnimationAssetWidth",
|
|
111
|
+
selfieAnimationAssetHeight = "selfieAnimationAssetHeight"
|
|
112
|
+
}
|
|
113
|
+
export declare type AndroidThemeObject = {
|
|
114
|
+
[key in ANDROID_THEME_CONFIG_KEY]: string | null | undefined;
|
|
115
|
+
};
|
|
116
|
+
export declare type IosThemeObject = {
|
|
117
|
+
[key in IOS_THEME_CONFIG_KEY]: string | null | undefined;
|
|
118
|
+
};
|
|
119
|
+
export declare type ThemeObject = AndroidThemeObject | IosThemeObject;
|
|
120
|
+
declare class Theme {
|
|
121
|
+
print(platform?: string): Promise<void>;
|
|
122
|
+
}
|
|
123
|
+
declare const _default: Theme;
|
|
124
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
export declare const TOOL_CHOICE: {
|
|
3
|
+
AndroidTheme: string;
|
|
4
|
+
iosTheme: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function whatWouldYouLikePrompt(): Promise<inquirer.Answers>;
|
|
7
|
+
export declare function confirmThemeValues(): Promise<inquirer.Answers>;
|
|
8
|
+
export declare function confirmResourceFiles(): Promise<inquirer.Answers>;
|