react-native-persona 2.9.2 → 2.9.3

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.
Files changed (47) hide show
  1. package/README.md +0 -42
  2. package/RNPersonaInquiry2.podspec +1 -1
  3. package/android/build.gradle +1 -1
  4. package/package.json +1 -12
  5. package/bin/persona-tool +0 -3
  6. package/lib/commonjs/persona-tool/AndroidResourcePrinter.js +0 -462
  7. package/lib/commonjs/persona-tool/AndroidResourcePrinter.js.map +0 -1
  8. package/lib/commonjs/persona-tool/Config.js +0 -78
  9. package/lib/commonjs/persona-tool/Config.js.map +0 -1
  10. package/lib/commonjs/persona-tool/Theme.js +0 -188
  11. package/lib/commonjs/persona-tool/Theme.js.map +0 -1
  12. package/lib/commonjs/persona-tool/index.js +0 -31
  13. package/lib/commonjs/persona-tool/index.js.map +0 -1
  14. package/lib/commonjs/persona-tool/prompts.js +0 -42
  15. package/lib/commonjs/persona-tool/prompts.js.map +0 -1
  16. package/lib/commonjs/persona-tool/tools/AndroidThemeGenerator.js +0 -74
  17. package/lib/commonjs/persona-tool/tools/AndroidThemeGenerator.js.map +0 -1
  18. package/lib/commonjs/persona-tool/tools/IosThemeInstructions.js +0 -40
  19. package/lib/commonjs/persona-tool/tools/IosThemeInstructions.js.map +0 -1
  20. package/lib/module/persona-tool/AndroidResourcePrinter.js +0 -455
  21. package/lib/module/persona-tool/AndroidResourcePrinter.js.map +0 -1
  22. package/lib/module/persona-tool/Config.js +0 -70
  23. package/lib/module/persona-tool/Config.js.map +0 -1
  24. package/lib/module/persona-tool/Theme.js +0 -178
  25. package/lib/module/persona-tool/Theme.js.map +0 -1
  26. package/lib/module/persona-tool/index.js +0 -28
  27. package/lib/module/persona-tool/index.js.map +0 -1
  28. package/lib/module/persona-tool/prompts.js +0 -31
  29. package/lib/module/persona-tool/prompts.js.map +0 -1
  30. package/lib/module/persona-tool/tools/AndroidThemeGenerator.js +0 -66
  31. package/lib/module/persona-tool/tools/AndroidThemeGenerator.js.map +0 -1
  32. package/lib/module/persona-tool/tools/IosThemeInstructions.js +0 -32
  33. package/lib/module/persona-tool/tools/IosThemeInstructions.js.map +0 -1
  34. package/lib/typescript/persona-tool/AndroidResourcePrinter.d.ts +0 -35
  35. package/lib/typescript/persona-tool/Config.d.ts +0 -15
  36. package/lib/typescript/persona-tool/Theme.d.ts +0 -108
  37. package/lib/typescript/persona-tool/index.d.ts +0 -1
  38. package/lib/typescript/persona-tool/prompts.d.ts +0 -8
  39. package/lib/typescript/persona-tool/tools/AndroidThemeGenerator.d.ts +0 -5
  40. package/lib/typescript/persona-tool/tools/IosThemeInstructions.d.ts +0 -5
  41. package/src/persona-tool/AndroidResourcePrinter.ts +0 -652
  42. package/src/persona-tool/Config.ts +0 -86
  43. package/src/persona-tool/Theme.ts +0 -243
  44. package/src/persona-tool/index.ts +0 -30
  45. package/src/persona-tool/prompts.ts +0 -36
  46. package/src/persona-tool/tools/AndroidThemeGenerator.ts +0 -100
  47. package/src/persona-tool/tools/IosThemeInstructions.ts +0 -41
@@ -1 +0,0 @@
1
- {"version":3,"names":["cosmiconfig","chalk","ANDROID_THEME_CONFIG_KEY","IOS_THEME_CONFIG_KEY","Configuration","constructor","_defineProperty","loadConfig","config","explorer","packageProp","result","search","e","console","error","process","exit","get","androidThemeLines","key","push","iosThemeLines","log","yellow","join"],"sources":["Config.ts"],"sourcesContent":["import { cosmiconfig } from 'cosmiconfig';\nimport chalk from 'chalk';\nimport { ANDROID_THEME_CONFIG_KEY, IOS_THEME_CONFIG_KEY } from './Theme';\n\nexport interface ConfigObject {\n androidTheme: { [key: string]: string | null | undefined };\n iosTheme: { [key: string]: string | null | undefined };\n}\n\nclass Configuration {\n config?: ConfigObject | null;\n\n async loadConfig(): Promise<ConfigObject | null | undefined> {\n if (this.config) return this.config;\n\n try {\n const explorer = cosmiconfig('persona', { packageProp: 'persona' });\n const result = await explorer.search();\n if (result == null) {\n return null;\n }\n\n this.config = result.config;\n\n return this.config;\n } catch (e) {\n console.error(e);\n process.exit(1);\n }\n }\n\n async get(): Promise<ConfigObject> {\n let config = await this.loadConfig();\n\n const androidThemeLines = [];\n for (const key in ANDROID_THEME_CONFIG_KEY) {\n androidThemeLines.push(` \"${key}\": null`);\n }\n\n const iosThemeLines = [];\n for (const key in IOS_THEME_CONFIG_KEY) {\n iosThemeLines.push(` \"${key}\": null`);\n }\n\n if (config == null) {\n console.log(\n `\nMissing configuration.\n\nIn order to use this tool, it must be configured using a ${chalk.yellow(\n 'persona'\n )} object within\nyour package.json.\n\nTo get started, paste the following configuration into your package.json\n\n{\n ...\n\n \"persona\": {\n \"androidTheme\": {\n` +\n androidThemeLines.join(',\\n') +\n `\n },\n \"iosTheme\": {\n` +\n iosThemeLines.join(',\\n') +\n `\n }\n }\n\n ...\n}\n\nand re-run this tool :).\n`\n );\n process.exit(1);\n }\n\n return config as ConfigObject;\n }\n}\n\nexport default new Configuration();\n"],"mappings":";;;AAAA,SAASA,WAAW,QAAQ,aAAa;AACzC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,wBAAwB,EAAEC,oBAAoB,QAAQ,SAAS;AAOxE,MAAMC,aAAa,CAAC;EAAAC,YAAA;IAAAC,eAAA;EAAA;EAGlB,MAAMC,UAAUA,CAAA,EAA6C;IAC3D,IAAI,IAAI,CAACC,MAAM,EAAE,OAAO,IAAI,CAACA,MAAM;IAEnC,IAAI;MACF,MAAMC,QAAQ,GAAGT,WAAW,CAAC,SAAS,EAAE;QAAEU,WAAW,EAAE;MAAU,CAAC,CAAC;MACnE,MAAMC,MAAM,GAAG,MAAMF,QAAQ,CAACG,MAAM,CAAC,CAAC;MACtC,IAAID,MAAM,IAAI,IAAI,EAAE;QAClB,OAAO,IAAI;MACb;MAEA,IAAI,CAACH,MAAM,GAAGG,MAAM,CAACH,MAAM;MAE3B,OAAO,IAAI,CAACA,MAAM;IACpB,CAAC,CAAC,OAAOK,CAAC,EAAE;MACVC,OAAO,CAACC,KAAK,CAACF,CAAC,CAAC;MAChBG,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;IACjB;EACF;EAEA,MAAMC,GAAGA,CAAA,EAA0B;IACjC,IAAIV,MAAM,GAAG,MAAM,IAAI,CAACD,UAAU,CAAC,CAAC;IAEpC,MAAMY,iBAAiB,GAAG,EAAE;IAC5B,KAAK,MAAMC,GAAG,IAAIlB,wBAAwB,EAAE;MAC1CiB,iBAAiB,CAACE,IAAI,CAAE,UAASD,GAAI,SAAQ,CAAC;IAChD;IAEA,MAAME,aAAa,GAAG,EAAE;IACxB,KAAK,MAAMF,GAAG,IAAIjB,oBAAoB,EAAE;MACtCmB,aAAa,CAACD,IAAI,CAAE,UAASD,GAAI,SAAQ,CAAC;IAC5C;IAEA,IAAIZ,MAAM,IAAI,IAAI,EAAE;MAClBM,OAAO,CAACS,GAAG,CACR;AACT;AACA;AACA,2DAA2DtB,KAAK,CAACuB,MAAM,CAC7D,SACF,CAAE;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,GACSL,iBAAiB,CAACM,IAAI,CAAC,KAAK,CAAC,GAC5B;AACX;AACA;AACA,CAAC,GACSH,aAAa,CAACG,IAAI,CAAC,KAAK,CAAC,GACxB;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CACM,CAAC;MACDT,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;IACjB;IAEA,OAAOT,MAAM;EACf;AACF;AAEA,eAAe,IAAIJ,aAAa,CAAC,CAAC"}
@@ -1,178 +0,0 @@
1
- import Table from 'cli-table';
2
- import chalk from 'chalk';
3
- import Config from './Config';
4
- const COLOR_REGEX = /^[a-zA-Z0-9]{6}$/;
5
- export let ANDROID_THEME_CONFIG_KEY = /*#__PURE__*/function (ANDROID_THEME_CONFIG_KEY) {
6
- ANDROID_THEME_CONFIG_KEY["backgroundColor"] = "backgroundColor";
7
- ANDROID_THEME_CONFIG_KEY["primaryColor"] = "primaryColor";
8
- ANDROID_THEME_CONFIG_KEY["darkPrimaryColor"] = "darkPrimaryColor";
9
- ANDROID_THEME_CONFIG_KEY["accentColor"] = "accentColor";
10
- ANDROID_THEME_CONFIG_KEY["titleTextColor"] = "titleTextColor";
11
- ANDROID_THEME_CONFIG_KEY["titleTextFont"] = "titleTextFont";
12
- ANDROID_THEME_CONFIG_KEY["bodyTextColor"] = "bodyTextColor";
13
- ANDROID_THEME_CONFIG_KEY["bodyTextFont"] = "bodyTextFont";
14
- ANDROID_THEME_CONFIG_KEY["footnoteTextColor"] = "footnoteTextColor";
15
- ANDROID_THEME_CONFIG_KEY["footnoteTextFont"] = "footnoteTextFont";
16
- ANDROID_THEME_CONFIG_KEY["textFieldTextColor"] = "textFieldTextColor";
17
- ANDROID_THEME_CONFIG_KEY["textFieldTextFont"] = "textFieldTextFont";
18
- ANDROID_THEME_CONFIG_KEY["pickerTextColor"] = "pickerTextColor";
19
- ANDROID_THEME_CONFIG_KEY["pickerTextFont"] = "pickerTextFont";
20
- ANDROID_THEME_CONFIG_KEY["buttonBackgroundColor"] = "buttonBackgroundColor";
21
- ANDROID_THEME_CONFIG_KEY["buttonDisabledBackgroundColor"] = "buttonDisabledBackgroundColor";
22
- ANDROID_THEME_CONFIG_KEY["buttonTouchedBackgroundColor"] = "buttonTouchedBackgroundColor";
23
- ANDROID_THEME_CONFIG_KEY["buttonTextColor"] = "buttonTextColor";
24
- ANDROID_THEME_CONFIG_KEY["buttonDisabledTextColor"] = "buttonDisabledTextColor";
25
- ANDROID_THEME_CONFIG_KEY["buttonCornerRadius"] = "buttonCornerRadius";
26
- ANDROID_THEME_CONFIG_KEY["buttonFont"] = "buttonFont";
27
- ANDROID_THEME_CONFIG_KEY["progressColor"] = "progressColor";
28
- ANDROID_THEME_CONFIG_KEY["successAsset"] = "successAsset";
29
- ANDROID_THEME_CONFIG_KEY["failAsset"] = "failAsset";
30
- ANDROID_THEME_CONFIG_KEY["loadingAnimationAsset"] = "loadingAnimationAsset";
31
- ANDROID_THEME_CONFIG_KEY["loadingAnimationWidthPercent"] = "loadingAnimationWidthPercent";
32
- ANDROID_THEME_CONFIG_KEY["selfieAnimationAsset"] = "selfieAnimationAsset";
33
- ANDROID_THEME_CONFIG_KEY["selfieAnimationWidthPercent"] = "selfieAnimationWidthPercent";
34
- return ANDROID_THEME_CONFIG_KEY;
35
- }({});
36
- export let IOS_THEME_CONFIG_KEY = /*#__PURE__*/function (IOS_THEME_CONFIG_KEY) {
37
- IOS_THEME_CONFIG_KEY["backgroundColor"] = "backgroundColor";
38
- IOS_THEME_CONFIG_KEY["primaryColor"] = "primaryColor";
39
- IOS_THEME_CONFIG_KEY["darkPrimaryColor"] = "darkPrimaryColor";
40
- IOS_THEME_CONFIG_KEY["accentColor"] = "accentColor";
41
- IOS_THEME_CONFIG_KEY["errorColor"] = "errorColor";
42
- IOS_THEME_CONFIG_KEY["errorTextFont"] = "errorTextFont";
43
- IOS_THEME_CONFIG_KEY["overlayBackgroundColor"] = "overlayBackgroundColor";
44
- IOS_THEME_CONFIG_KEY["titleTextAlignment"] = "titleTextAlignment";
45
- IOS_THEME_CONFIG_KEY["titleTextColor"] = "titleTextColor";
46
- IOS_THEME_CONFIG_KEY["titleTextFont"] = "titleTextFont";
47
- IOS_THEME_CONFIG_KEY["cardTitleTextFont"] = "cardTitleTextFont";
48
- IOS_THEME_CONFIG_KEY["bodyTextAlignment"] = "bodyTextAlignment";
49
- IOS_THEME_CONFIG_KEY["bodyTextColor"] = "bodyTextColor";
50
- IOS_THEME_CONFIG_KEY["bodyTextFont"] = "bodyTextFont";
51
- IOS_THEME_CONFIG_KEY["footnoteTextColor"] = "footnoteTextColor";
52
- IOS_THEME_CONFIG_KEY["footnoteTextFont"] = "footnoteTextFont";
53
- IOS_THEME_CONFIG_KEY["formLabelTextColor"] = "formLabelTextColor";
54
- IOS_THEME_CONFIG_KEY["formLabelTextFont"] = "formLabelTextFont";
55
- IOS_THEME_CONFIG_KEY["textFieldTextColor"] = "textFieldTextColor";
56
- IOS_THEME_CONFIG_KEY["textFieldBackgroundColor"] = "textFieldBackgroundColor";
57
- IOS_THEME_CONFIG_KEY["textFieldBorderColor"] = "textFieldBorderColor";
58
- IOS_THEME_CONFIG_KEY["textFieldCornerRadius"] = "textFieldCornerRadius";
59
- IOS_THEME_CONFIG_KEY["textFieldFont"] = "textFieldFont";
60
- IOS_THEME_CONFIG_KEY["textFieldPlaceholderFont"] = "textFieldPlaceholderFont";
61
- IOS_THEME_CONFIG_KEY["pickerTextColor"] = "pickerTextColor";
62
- IOS_THEME_CONFIG_KEY["pickerTextFont"] = "pickerTextFont";
63
- IOS_THEME_CONFIG_KEY["buttonBackgroundColor"] = "buttonBackgroundColor";
64
- IOS_THEME_CONFIG_KEY["buttonDisabledBackgroundColor"] = "buttonDisabledBackgroundColor";
65
- IOS_THEME_CONFIG_KEY["buttonTouchedBackgroundColor"] = "buttonTouchedBackgroundColor";
66
- IOS_THEME_CONFIG_KEY["buttonTextColor"] = "buttonTextColor";
67
- IOS_THEME_CONFIG_KEY["buttonDisabledTextColor"] = "buttonDisabledTextColor";
68
- IOS_THEME_CONFIG_KEY["buttonTextAlignment"] = "buttonTextAlignment";
69
- IOS_THEME_CONFIG_KEY["buttonImageTintColor"] = "buttonImageTintColor";
70
- IOS_THEME_CONFIG_KEY["buttonCornerRadius"] = "buttonCornerRadius";
71
- IOS_THEME_CONFIG_KEY["buttonBorderWidth"] = "buttonBorderWidth";
72
- IOS_THEME_CONFIG_KEY["buttonBorderColor"] = "buttonBorderColor";
73
- IOS_THEME_CONFIG_KEY["buttonFont"] = "buttonFont";
74
- IOS_THEME_CONFIG_KEY["buttonSecondaryBackgroundColor"] = "buttonSecondaryBackgroundColor";
75
- IOS_THEME_CONFIG_KEY["buttonSecondaryDisabledBackgroundColor"] = "buttonSecondaryDisabledBackgroundColor";
76
- IOS_THEME_CONFIG_KEY["buttonSecondaryTouchedBackgroundColor"] = "buttonSecondaryTouchedBackgroundColor";
77
- IOS_THEME_CONFIG_KEY["buttonSecondaryTextColor"] = "buttonSecondaryTextColor";
78
- IOS_THEME_CONFIG_KEY["buttonSecondaryDisabledTextColor"] = "buttonSecondaryDisabledTextColor";
79
- IOS_THEME_CONFIG_KEY["buttonSecondaryTextAlignment"] = "buttonSecondaryTextAlignment";
80
- IOS_THEME_CONFIG_KEY["buttonSecondaryImageTintColor"] = "buttonSecondaryImageTintColor";
81
- IOS_THEME_CONFIG_KEY["buttonSecondaryCornerRadius"] = "buttonSecondaryCornerRadius";
82
- IOS_THEME_CONFIG_KEY["buttonSecondaryBorderWidth"] = "buttonSecondaryBorderWidth";
83
- IOS_THEME_CONFIG_KEY["buttonSecondaryBorderColor"] = "buttonSecondaryBorderColor";
84
- IOS_THEME_CONFIG_KEY["buttonSecondaryFont"] = "buttonSecondaryFont";
85
- IOS_THEME_CONFIG_KEY["selectedCellBackgroundColor"] = "selectedCellBackgroundColor";
86
- IOS_THEME_CONFIG_KEY["closeButtonTintColor"] = "closeButtonTintColor";
87
- IOS_THEME_CONFIG_KEY["cancelButtonBackgroundColor"] = "cancelButtonBackgroundColor";
88
- IOS_THEME_CONFIG_KEY["cancelButtonTextColor"] = "cancelButtonTextColor";
89
- IOS_THEME_CONFIG_KEY["cancelButtonAlternateBackgroundColor"] = "cancelButtonAlternateBackgroundColor";
90
- IOS_THEME_CONFIG_KEY["cancelButtonAlternateTextColor"] = "cancelButtonAlternateTextColor";
91
- IOS_THEME_CONFIG_KEY["processingLabelsTextAlignment"] = "processingLabelsTextAlignment";
92
- IOS_THEME_CONFIG_KEY["loadingAnimationAssetName"] = "loadingAnimationAssetName";
93
- IOS_THEME_CONFIG_KEY["loadingAnimationAssetWidth"] = "loadingAnimationAssetWidth";
94
- IOS_THEME_CONFIG_KEY["loadingAnimationAssetHeight"] = "loadingAnimationAssetHeight";
95
- IOS_THEME_CONFIG_KEY["processingAnimationAssetName"] = "processingAnimationAssetName";
96
- IOS_THEME_CONFIG_KEY["processingAnimationAssetWidth"] = "processingAnimationAssetWidth";
97
- IOS_THEME_CONFIG_KEY["processingAnimationAssetHeight"] = "processingAnimationAssetHeight";
98
- IOS_THEME_CONFIG_KEY["selfieAnimationAssetName"] = "selfieAnimationAssetName";
99
- IOS_THEME_CONFIG_KEY["selfieAnimationAssetWidth"] = "selfieAnimationAssetWidth";
100
- IOS_THEME_CONFIG_KEY["selfieAnimationAssetHeight"] = "selfieAnimationAssetHeight";
101
- return IOS_THEME_CONFIG_KEY;
102
- }({});
103
- class Theme {
104
- async print() {
105
- let platform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'android';
106
- const config = await Config.get();
107
- const themeConfig = platform === 'android' ? config.androidTheme : config.iosTheme;
108
- let usesCustomFontAndroid = false;
109
- let usesCustomFontIos = false;
110
- const head = platform === 'android' ? ['Style Item', 'Value', 'Note'] : ['Style Item', 'Value', 'Note'];
111
- const table = new Table({
112
- head,
113
- // prettier-ignore
114
- chars: {
115
- 'mid': '',
116
- 'left-mid': '',
117
- 'mid-mid': '',
118
- 'right-mid': ''
119
- }
120
- });
121
- console.log('Specified theme values:');
122
- const keyEnum = platform === 'android' ? ANDROID_THEME_CONFIG_KEY : IOS_THEME_CONFIG_KEY;
123
- for (const key in keyEnum) {
124
- let override = themeConfig[key];
125
- let colorOverride = key.includes('Color') || key.includes('color');
126
- if (override) {
127
- if (colorOverride) {
128
- override = normalizeColor(override, key);
129
- } else {
130
- override = override.toString();
131
- }
132
- }
133
- if (key.includes('Font')) {
134
- if (platform == 'android') {
135
- usesCustomFontAndroid = true;
136
- } else {
137
- usesCustomFontIos = true;
138
- }
139
- }
140
- let row;
141
- row = [key, override ? valueColor(colorOverride, override) : chalk.yellow('unspecified'), key.includes('Font') ? chalk.cyan('Fonts that are not built-in need to be installed.') : ''];
142
- table.push(row);
143
- }
144
- console.log(table.toString());
145
- if (usesCustomFontAndroid) {
146
- console.log(chalk.yellow(' NOTE') + ': A font customization was made. If the font is not built-in to the Android platform (https://github.com/react-native-training/react-native-fonts#android), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml');
147
- }
148
- if (usesCustomFontIos) {
149
- console.log(chalk.yellow(' NOTE') + ': A font customization was made. If the font is not built-in iOS (https://github.com/react-native-training/react-native-ios), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app');
150
- }
151
-
152
- // Add newline for spacing
153
- console.log('');
154
- }
155
- }
156
-
157
- // set default print color for non-color overrides
158
- function valueColor(isColorOverride, override) {
159
- return isColorOverride ? chalk.hex(override)(override) : chalk.magentaBright(override);
160
- }
161
- function normalizeColor(colorHex, themeKey) {
162
- let hex = colorHex;
163
- if (colorHex[0] === '#') {
164
- hex = colorHex.slice(1);
165
- }
166
- if (!COLOR_REGEX.test(hex)) {
167
- if (themeKey) {
168
- console.error(`Received a color value of ${chalk.yellow(colorHex)} for ${chalk.red(themeKey)}.\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk.bgHex('#FFFFFF').hex('#7E66B7')('#290087')}`);
169
- } else {
170
- console.error(`Received a color value of ${chalk.yellow(colorHex)}.\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk.bgHex('#FFFFFF').hex('#7E66B7')('#290087')}`);
171
- }
172
- console.log('');
173
- process.exit(1);
174
- }
175
- return colorHex;
176
- }
177
- export default new Theme();
178
- //# sourceMappingURL=Theme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Table","chalk","Config","COLOR_REGEX","ANDROID_THEME_CONFIG_KEY","IOS_THEME_CONFIG_KEY","Theme","print","platform","arguments","length","undefined","config","get","themeConfig","androidTheme","iosTheme","usesCustomFontAndroid","usesCustomFontIos","head","table","chars","console","log","keyEnum","key","override","colorOverride","includes","normalizeColor","toString","row","valueColor","yellow","cyan","push","isColorOverride","hex","magentaBright","colorHex","themeKey","slice","test","error","red","bgHex","process","exit"],"sources":["Theme.ts"],"sourcesContent":["import Table from 'cli-table';\nimport chalk from 'chalk';\n\nimport Config from './Config';\n\nconst COLOR_REGEX = /^[a-zA-Z0-9]{6}$/;\n\nexport enum ANDROID_THEME_CONFIG_KEY {\n backgroundColor = 'backgroundColor',\n primaryColor = 'primaryColor',\n darkPrimaryColor = 'darkPrimaryColor',\n accentColor = 'accentColor',\n\n titleTextColor = 'titleTextColor',\n titleTextFont = 'titleTextFont',\n\n bodyTextColor = 'bodyTextColor',\n bodyTextFont = 'bodyTextFont',\n\n footnoteTextColor = 'footnoteTextColor',\n footnoteTextFont = 'footnoteTextFont',\n\n // formLabelTextColor = \"formLabelTextColor\",\n // formLabelTextFont = \"formLabelTextFont\",\n\n textFieldTextColor = 'textFieldTextColor',\n textFieldTextFont = 'textFieldTextFont',\n\n pickerTextColor = 'pickerTextColor',\n pickerTextFont = 'pickerTextFont',\n\n buttonBackgroundColor = 'buttonBackgroundColor',\n buttonDisabledBackgroundColor = 'buttonDisabledBackgroundColor',\n buttonTouchedBackgroundColor = 'buttonTouchedBackgroundColor',\n buttonTextColor = 'buttonTextColor',\n buttonDisabledTextColor = 'buttonDisabledTextColor',\n // buttonTextAlignment = \"buttonTextAlignment\",\n buttonCornerRadius = 'buttonCornerRadius',\n buttonFont = 'buttonFont',\n progressColor = 'progressColor',\n successAsset = 'successAsset',\n failAsset = 'failAsset',\n loadingAnimationAsset = 'loadingAnimationAsset',\n loadingAnimationWidthPercent = 'loadingAnimationWidthPercent',\n selfieAnimationAsset = 'selfieAnimationAsset',\n selfieAnimationWidthPercent = 'selfieAnimationWidthPercent',\n}\n\nexport enum IOS_THEME_CONFIG_KEY {\n backgroundColor = 'backgroundColor',\n primaryColor = 'primaryColor',\n darkPrimaryColor = 'darkPrimaryColor',\n accentColor = 'accentColor',\n errorColor = 'errorColor',\n errorTextFont = 'errorTextFont',\n overlayBackgroundColor = 'overlayBackgroundColor',\n titleTextAlignment = 'titleTextAlignment',\n titleTextColor = 'titleTextColor',\n titleTextFont = 'titleTextFont',\n cardTitleTextFont = 'cardTitleTextFont',\n bodyTextAlignment = 'bodyTextAlignment',\n bodyTextColor = 'bodyTextColor',\n bodyTextFont = 'bodyTextFont',\n footnoteTextColor = 'footnoteTextColor',\n footnoteTextFont = 'footnoteTextFont',\n formLabelTextColor = 'formLabelTextColor',\n formLabelTextFont = 'formLabelTextFont',\n textFieldTextColor = 'textFieldTextColor',\n textFieldBackgroundColor = 'textFieldBackgroundColor',\n textFieldBorderColor = 'textFieldBorderColor',\n textFieldCornerRadius = 'textFieldCornerRadius',\n textFieldFont = 'textFieldFont',\n textFieldPlaceholderFont = 'textFieldPlaceholderFont',\n pickerTextColor = 'pickerTextColor',\n pickerTextFont = 'pickerTextFont',\n buttonBackgroundColor = 'buttonBackgroundColor',\n buttonDisabledBackgroundColor = 'buttonDisabledBackgroundColor',\n buttonTouchedBackgroundColor = 'buttonTouchedBackgroundColor',\n buttonTextColor = 'buttonTextColor',\n buttonDisabledTextColor = 'buttonDisabledTextColor',\n buttonTextAlignment = 'buttonTextAlignment',\n buttonImageTintColor = 'buttonImageTintColor',\n buttonCornerRadius = 'buttonCornerRadius',\n buttonBorderWidth = 'buttonBorderWidth',\n buttonBorderColor = 'buttonBorderColor',\n buttonFont = 'buttonFont',\n buttonSecondaryBackgroundColor = 'buttonSecondaryBackgroundColor',\n buttonSecondaryDisabledBackgroundColor = 'buttonSecondaryDisabledBackgroundColor',\n buttonSecondaryTouchedBackgroundColor = 'buttonSecondaryTouchedBackgroundColor',\n buttonSecondaryTextColor = 'buttonSecondaryTextColor',\n buttonSecondaryDisabledTextColor = 'buttonSecondaryDisabledTextColor',\n buttonSecondaryTextAlignment = 'buttonSecondaryTextAlignment',\n buttonSecondaryImageTintColor = 'buttonSecondaryImageTintColor',\n buttonSecondaryCornerRadius = 'buttonSecondaryCornerRadius',\n buttonSecondaryBorderWidth = 'buttonSecondaryBorderWidth',\n buttonSecondaryBorderColor = 'buttonSecondaryBorderColor',\n buttonSecondaryFont = 'buttonSecondaryFont',\n selectedCellBackgroundColor = 'selectedCellBackgroundColor',\n closeButtonTintColor = 'closeButtonTintColor',\n cancelButtonBackgroundColor = 'cancelButtonBackgroundColor',\n cancelButtonTextColor = 'cancelButtonTextColor',\n cancelButtonAlternateBackgroundColor = 'cancelButtonAlternateBackgroundColor',\n cancelButtonAlternateTextColor = 'cancelButtonAlternateTextColor',\n processingLabelsTextAlignment = 'processingLabelsTextAlignment',\n loadingAnimationAssetName = 'loadingAnimationAssetName',\n loadingAnimationAssetWidth = 'loadingAnimationAssetWidth',\n loadingAnimationAssetHeight = 'loadingAnimationAssetHeight',\n processingAnimationAssetName = 'processingAnimationAssetName',\n processingAnimationAssetWidth = 'processingAnimationAssetWidth',\n processingAnimationAssetHeight = 'processingAnimationAssetHeight',\n selfieAnimationAssetName = 'selfieAnimationAssetName',\n selfieAnimationAssetWidth = 'selfieAnimationAssetWidth',\n selfieAnimationAssetHeight = 'selfieAnimationAssetHeight',\n}\n\nexport type AndroidThemeObject = {\n [key in ANDROID_THEME_CONFIG_KEY]: string | null | undefined;\n};\n\nexport type IosThemeObject = {\n [key in IOS_THEME_CONFIG_KEY]: string | null | undefined;\n};\n\nexport type ThemeObject = AndroidThemeObject | IosThemeObject;\n\nclass Theme {\n async print(platform: string = 'android') {\n const config = await Config.get();\n const themeConfig =\n platform === 'android' ? config.androidTheme : config.iosTheme;\n let usesCustomFontAndroid = false;\n let usesCustomFontIos = false;\n\n const head =\n platform === 'android'\n ? ['Style Item', 'Value', 'Note']\n : ['Style Item', 'Value', 'Note'];\n\n const table = new Table({\n head,\n // prettier-ignore\n chars: { 'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },\n });\n\n console.log('Specified theme values:');\n const keyEnum =\n platform === 'android' ? ANDROID_THEME_CONFIG_KEY : IOS_THEME_CONFIG_KEY;\n for (const key in keyEnum) {\n let override =\n themeConfig[key as ANDROID_THEME_CONFIG_KEY | IOS_THEME_CONFIG_KEY];\n let colorOverride = key.includes('Color') || key.includes('color');\n\n if (override) {\n if (colorOverride) {\n override = normalizeColor(override, key);\n } else {\n override = override.toString();\n }\n }\n\n if (key.includes('Font')) {\n if (platform == 'android') {\n usesCustomFontAndroid = true;\n } else {\n usesCustomFontIos = true;\n }\n }\n\n let row;\n\n row = [\n key,\n override\n ? valueColor(colorOverride, override)\n : chalk.yellow('unspecified'),\n key.includes('Font')\n ? chalk.cyan('Fonts that are not built-in need to be installed.')\n : '',\n ];\n\n table.push(row);\n }\n\n console.log(table.toString());\n\n if (usesCustomFontAndroid) {\n console.log(\n chalk.yellow(' NOTE') +\n ': A font customization was made. If the font is not built-in to the Android platform (https://github.com/react-native-training/react-native-fonts#android), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml'\n );\n }\n\n if (usesCustomFontIos) {\n console.log(\n chalk.yellow(' NOTE') +\n ': A font customization was made. If the font is not built-in iOS (https://github.com/react-native-training/react-native-ios), then the font(s) must first be installed. A guide to install a font can be found here: https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app'\n );\n }\n\n // Add newline for spacing\n console.log('');\n }\n}\n\n// set default print color for non-color overrides\nfunction valueColor(isColorOverride: boolean, override: string) {\n return isColorOverride\n ? chalk.hex(override)(override)\n : chalk.magentaBright(override);\n}\n\nfunction normalizeColor(colorHex: string, themeKey: string) {\n let hex = colorHex;\n if (colorHex[0] === '#') {\n hex = colorHex.slice(1);\n }\n\n if (!COLOR_REGEX.test(hex)) {\n if (themeKey) {\n console.error(\n `Received a color value of ${chalk.yellow(colorHex)} for ${chalk.red(\n themeKey\n )}.\\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk\n .bgHex('#FFFFFF')\n .hex('#7E66B7')('#290087')}`\n );\n } else {\n console.error(\n `Received a color value of ${chalk.yellow(\n colorHex\n )}.\\nFormat must follow standard 6 character hexadecimal color code. Eg. ${chalk\n .bgHex('#FFFFFF')\n .hex('#7E66B7')('#290087')}`\n );\n }\n console.log('');\n process.exit(1);\n }\n\n return colorHex;\n}\n\nexport default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B;EAEA,OAAOR,QAAQ;AACjB;AAEA,eAAe,IAAIjC,KAAK,CAAC,CAAC"}
@@ -1,28 +0,0 @@
1
- import Config from './Config';
2
- import { TOOL_CHOICE, whatWouldYouLikePrompt } from './prompts';
3
- import AndroidThemeGenerator from './tools/AndroidThemeGenerator';
4
- import IosThemeInstructions from './tools/IosThemeInstructions';
5
- console.log('');
6
- console.log('============================================');
7
- console.log('Persona React Native SDK customization tool.');
8
- console.log('============================================');
9
- console.log('');
10
- const run = async () => {
11
- // Run this once to print warning messages if it's not configured.
12
- await Config.get();
13
- const {
14
- choice
15
- } = await whatWouldYouLikePrompt();
16
- switch (choice) {
17
- case TOOL_CHOICE.AndroidTheme:
18
- await AndroidThemeGenerator.run();
19
- break;
20
- case TOOL_CHOICE.iosTheme:
21
- await IosThemeInstructions.run();
22
- break;
23
- default:
24
- return;
25
- }
26
- };
27
- run();
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Config","TOOL_CHOICE","whatWouldYouLikePrompt","AndroidThemeGenerator","IosThemeInstructions","console","log","run","get","choice","AndroidTheme","iosTheme"],"sources":["index.ts"],"sourcesContent":["import Config from './Config';\nimport { TOOL_CHOICE, whatWouldYouLikePrompt } from './prompts';\nimport AndroidThemeGenerator from './tools/AndroidThemeGenerator';\nimport IosThemeInstructions from './tools/IosThemeInstructions';\n\nconsole.log('');\nconsole.log('============================================');\nconsole.log('Persona React Native SDK customization tool.');\nconsole.log('============================================');\nconsole.log('');\n\nconst run = async () => {\n // Run this once to print warning messages if it's not configured.\n await Config.get();\n\n const { choice } = await whatWouldYouLikePrompt();\n\n switch (choice) {\n case TOOL_CHOICE.AndroidTheme:\n await AndroidThemeGenerator.run();\n break;\n case TOOL_CHOICE.iosTheme:\n await IosThemeInstructions.run();\n break;\n default:\n return;\n }\n};\n\nrun();\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,UAAU;AAC7B,SAASC,WAAW,EAAEC,sBAAsB,QAAQ,WAAW;AAC/D,OAAOC,qBAAqB,MAAM,+BAA+B;AACjE,OAAOC,oBAAoB,MAAM,8BAA8B;AAE/DC,OAAO,CAACC,GAAG,CAAC,EAAE,CAAC;AACfD,OAAO,CAACC,GAAG,CAAC,8CAA8C,CAAC;AAC3DD,OAAO,CAACC,GAAG,CAAC,8CAA8C,CAAC;AAC3DD,OAAO,CAACC,GAAG,CAAC,8CAA8C,CAAC;AAC3DD,OAAO,CAACC,GAAG,CAAC,EAAE,CAAC;AAEf,MAAMC,GAAG,GAAG,MAAAA,CAAA,KAAY;EACtB;EACA,MAAMP,MAAM,CAACQ,GAAG,CAAC,CAAC;EAElB,MAAM;IAAEC;EAAO,CAAC,GAAG,MAAMP,sBAAsB,CAAC,CAAC;EAEjD,QAAQO,MAAM;IACZ,KAAKR,WAAW,CAACS,YAAY;MAC3B,MAAMP,qBAAqB,CAACI,GAAG,CAAC,CAAC;MACjC;IACF,KAAKN,WAAW,CAACU,QAAQ;MACvB,MAAMP,oBAAoB,CAACG,GAAG,CAAC,CAAC;MAChC;IACF;MACE;EACJ;AACF,CAAC;AAEDA,GAAG,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- import inquirer from 'inquirer';
2
- export const TOOL_CHOICE = {
3
- AndroidTheme: 'Update Android theme',
4
- iosTheme: 'Update iOS theme'
5
- };
6
- export async function whatWouldYouLikePrompt() {
7
- const questions = {
8
- name: 'choice',
9
- type: 'list',
10
- choices: [TOOL_CHOICE.AndroidTheme, TOOL_CHOICE.iosTheme],
11
- message: 'What would you like to do?'
12
- };
13
- return inquirer.prompt(questions);
14
- }
15
- export async function confirmThemeValues() {
16
- const questions = {
17
- name: 'isConfirmed',
18
- type: 'confirm',
19
- message: 'Do these values look right?'
20
- };
21
- return inquirer.prompt(questions);
22
- }
23
- export async function confirmResourceFiles() {
24
- const questions = {
25
- name: 'isConfirmed',
26
- type: 'confirm',
27
- message: `Continue?`
28
- };
29
- return inquirer.prompt(questions);
30
- }
31
- //# sourceMappingURL=prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["inquirer","TOOL_CHOICE","AndroidTheme","iosTheme","whatWouldYouLikePrompt","questions","name","type","choices","message","prompt","confirmThemeValues","confirmResourceFiles"],"sources":["prompts.ts"],"sourcesContent":["import inquirer, { QuestionCollection } from 'inquirer';\n\nexport const TOOL_CHOICE = {\n AndroidTheme: 'Update Android theme',\n iosTheme: 'Update iOS theme',\n};\nexport async function whatWouldYouLikePrompt() {\n const questions = {\n name: 'choice',\n type: 'list',\n choices: [TOOL_CHOICE.AndroidTheme, TOOL_CHOICE.iosTheme],\n message: 'What would you like to do?',\n } as QuestionCollection;\n\n return inquirer.prompt(questions);\n}\n\nexport async function confirmThemeValues() {\n const questions = {\n name: 'isConfirmed',\n type: 'confirm',\n message: 'Do these values look right?',\n } as QuestionCollection;\n\n return inquirer.prompt(questions);\n}\n\nexport async function confirmResourceFiles() {\n const questions = {\n name: 'isConfirmed',\n type: 'confirm',\n message: `Continue?`,\n } as QuestionCollection;\n\n return inquirer.prompt(questions);\n}\n"],"mappings":"AAAA,OAAOA,QAAQ,MAA8B,UAAU;AAEvD,OAAO,MAAMC,WAAW,GAAG;EACzBC,YAAY,EAAE,sBAAsB;EACpCC,QAAQ,EAAE;AACZ,CAAC;AACD,OAAO,eAAeC,sBAAsBA,CAAA,EAAG;EAC7C,MAAMC,SAAS,GAAG;IAChBC,IAAI,EAAE,QAAQ;IACdC,IAAI,EAAE,MAAM;IACZC,OAAO,EAAE,CAACP,WAAW,CAACC,YAAY,EAAED,WAAW,CAACE,QAAQ,CAAC;IACzDM,OAAO,EAAE;EACX,CAAuB;EAEvB,OAAOT,QAAQ,CAACU,MAAM,CAACL,SAAS,CAAC;AACnC;AAEA,OAAO,eAAeM,kBAAkBA,CAAA,EAAG;EACzC,MAAMN,SAAS,GAAG;IAChBC,IAAI,EAAE,aAAa;IACnBC,IAAI,EAAE,SAAS;IACfE,OAAO,EAAE;EACX,CAAuB;EAEvB,OAAOT,QAAQ,CAACU,MAAM,CAACL,SAAS,CAAC;AACnC;AAEA,OAAO,eAAeO,oBAAoBA,CAAA,EAAG;EAC3C,MAAMP,SAAS,GAAG;IAChBC,IAAI,EAAE,aAAa;IACnBC,IAAI,EAAE,SAAS;IACfE,OAAO,EAAG;EACZ,CAAuB;EAEvB,OAAOT,QAAQ,CAACU,MAAM,CAACL,SAAS,CAAC;AACnC"}
@@ -1,66 +0,0 @@
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_COLOR_RESOURCE_PATH = './android/app/src/main/res/color/rn_persona_button.xml';
11
- class ThemeGenerator {
12
- async run() {
13
- await Theme.print();
14
- const {
15
- isConfirmed: themeValuesConfirmed
16
- } = await confirmThemeValues();
17
- if (!themeValuesConfirmed) {
18
- console.log(chalk.yellow('\nPlease adjust the values in package.json.\n'));
19
- return;
20
- }
21
- console.log(`\n${chalk.yellow('Creating an Android Resource files for your project at:')}\n
22
- - ${ANDROID_STYLES_RESOURCE_PATH}
23
- - ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}
24
- - ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}\n`);
25
- console.log('Building your application with this resource file themes your Persona Inquiry flow.\n');
26
- const config = await Configuration.get();
27
- const theme = config.androidTheme;
28
- const {
29
- style,
30
- buttonDrawable,
31
- buttonColor
32
- } = new AndroidResourcePrinter(theme).process();
33
- let {
34
- isConfirmed: confirmed
35
- } = await confirmResourceFiles();
36
- if (!confirmed) {
37
- process.exit(1);
38
- }
39
-
40
- // Add a line after confirmation
41
- console.log('');
42
- fs.mkdirSync(path.dirname(ANDROID_STYLES_RESOURCE_PATH), {
43
- recursive: true
44
- });
45
- fs.writeFileSync(ANDROID_STYLES_RESOURCE_PATH, style.end({
46
- prettyPrint: true
47
- }));
48
- console.log(`${chalk.green('Saved an Android style file at path:')} ${ANDROID_STYLES_RESOURCE_PATH}.`);
49
- fs.mkdirSync(path.dirname(ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH), {
50
- recursive: true
51
- });
52
- fs.writeFileSync(ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH, buttonDrawable.end({
53
- prettyPrint: true
54
- }));
55
- console.log(`${chalk.green('Saved an Android drawable file at path:')} ${ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH}.`);
56
- fs.mkdirSync(path.dirname(ANDROID_BUTTON_COLOR_RESOURCE_PATH), {
57
- recursive: true
58
- });
59
- fs.writeFileSync(ANDROID_BUTTON_COLOR_RESOURCE_PATH, buttonColor.end({
60
- prettyPrint: true
61
- }));
62
- console.log(`${chalk.green('Saved an Android color file at path:')} ${ANDROID_BUTTON_COLOR_RESOURCE_PATH}.`);
63
- }
64
- }
65
- export default new ThemeGenerator();
66
- //# sourceMappingURL=AndroidThemeGenerator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fs","chalk","path","Theme","confirmThemeValues","confirmResourceFiles","AndroidResourcePrinter","Configuration","ANDROID_STYLES_RESOURCE_PATH","ANDROID_BUTTON_DRAWABLE_RESOURCE_PATH","ANDROID_BUTTON_COLOR_RESOURCE_PATH","ThemeGenerator","run","print","isConfirmed","themeValuesConfirmed","console","log","yellow","config","get","theme","androidTheme","style","buttonDrawable","buttonColor","process","confirmed","exit","mkdirSync","dirname","recursive","writeFileSync","end","prettyPrint","green"],"sources":["AndroidThemeGenerator.ts"],"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_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_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, buttonColor } = new AndroidResourcePrinter(\n theme\n ).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(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"],"mappings":"AAAA,OAAOA,EAAE,MAAM,IAAI;AACnB,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,MAAM;AAEvB,OAAOC,KAAK,MAA8B,UAAU;AACpD,SAASC,kBAAkB,EAAEC,oBAAoB,QAAQ,YAAY;AACrE,OAAOC,sBAAsB,MAAM,2BAA2B;AAC9D,OAAOC,aAAa,MAAM,WAAW;AAErC,MAAMC,4BAA4B,GAChC,sDAAsD;AACxD,MAAMC,qCAAqC,GACzC,2DAA2D;AAC7D,MAAMC,kCAAkC,GACtC,wDAAwD;AAE1D,MAAMC,cAAc,CAAC;EACnB,MAAMC,GAAGA,CAAA,EAAG;IACV,MAAMT,KAAK,CAACU,KAAK,CAAC,CAAC;IAEnB,MAAM;MAAEC,WAAW,EAAEC;IAAqB,CAAC,GAAG,MAAMX,kBAAkB,CAAC,CAAC;IAExE,IAAI,CAACW,oBAAoB,EAAE;MACzBC,OAAO,CAACC,GAAG,CACThB,KAAK,CAACiB,MAAM,CAAC,+CAA+C,CAC9D,CAAC;MACD;IACF;IAEAF,OAAO,CAACC,GAAG,CACR,KAAIhB,KAAK,CAACiB,MAAM,CACf,yDACF,CAAE;AACR,UAAUV,4BAA6B;AACvC,UAAUC,qCAAsC;AAChD,UAAUC,kCAAmC,IACzC,CAAC;IACDM,OAAO,CAACC,GAAG,CACT,uFACF,CAAC;IAED,MAAME,MAAM,GAAG,MAAMZ,aAAa,CAAC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gC,aAAa,CACdtB,kCAAkC,EAClCe,WAAW,CAACQ,GAAG,CAAC;MAAEC,WAAW,EAAE;IAAK,CAAC,CACvC,CAAC;IACDlB,OAAO,CAACC,GAAG,CACR,GAAEhB,KAAK,CAACkC,KAAK,CACZ,sCACF,CAAE,IAAGzB,kCAAmC,GAC1C,CAAC;EACH;AACF;AAEA,eAAe,IAAIC,cAAc,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import Theme from '../Theme';
2
- import { confirmThemeValues } from '../prompts';
3
- import chalk from 'chalk';
4
- class IosThemeInstructions {
5
- async run() {
6
- await Theme.print('ios');
7
- const {
8
- isConfirmed: themeValuesConfirmed
9
- } = await confirmThemeValues();
10
- if (!themeValuesConfirmed) {
11
- console.log(chalk.yellow('\nPlease adjust the values in package.json.\n'));
12
- return;
13
- }
14
- console.log(`\n${chalk.yellow('To theme the Persona Inquiry flow for iOS:')}`);
15
- console.log('Add the theme values to the Persona Inquiry SDK client by using the `.iosTheme` builder function');
16
- console.log(`
17
- ${chalk.green(`+ import { persona } from '../package.json'`)}
18
- ...
19
- Inquiry.fromTemplate(selectedTemplateId)
20
- .onSuccess(handleSuccess)
21
- .onCanceled(handleCanceled)
22
- .onFailed(handleFailed)
23
- .onError(handleError)
24
- ${chalk.green('+ .iosTheme(persona.iosTheme)')}
25
- .build()
26
- .start();
27
- ...
28
- `);
29
- }
30
- }
31
- export default new IosThemeInstructions();
32
- //# sourceMappingURL=IosThemeInstructions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Theme","confirmThemeValues","chalk","IosThemeInstructions","run","print","isConfirmed","themeValuesConfirmed","console","log","yellow","green"],"sources":["IosThemeInstructions.ts"],"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 .onCanceled(handleCanceled)\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"],"mappings":"AAAA,OAAOA,KAAK,MAAM,UAAU;AAC5B,SAASC,kBAAkB,QAAQ,YAAY;AAC/C,OAAOC,KAAK,MAAM,OAAO;AAEzB,MAAMC,oBAAoB,CAAC;EACzB,MAAMC,GAAGA,CAAA,EAAG;IACV,MAAMJ,KAAK,CAACK,KAAK,CAAC,KAAK,CAAC;IAExB,MAAM;MAAEC,WAAW,EAAEC;IAAqB,CAAC,GAAG,MAAMN,kBAAkB,CAAC,CAAC;IAExE,IAAI,CAACM,oBAAoB,EAAE;MACzBC,OAAO,CAACC,GAAG,CACTP,KAAK,CAACQ,MAAM,CAAC,+CAA+C,CAC9D,CAAC;MACD;IACF;IAEAF,OAAO,CAACC,GAAG,CACR,KAAIP,KAAK,CAACQ,MAAM,CAAC,4CAA4C,CAAE,EAClE,CAAC;IACDF,OAAO,CAACC,GAAG,CACT,kGACF,CAAC;IAEDD,OAAO,CAACC,GAAG,CAAE;AACjB,MAAMP,KAAK,CAACS,KAAK,CAAE,6CAA4C,CAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMT,KAAK,CAACS,KAAK,CAAC,iCAAiC,CAAE;AACrD;AACA;AACA;AACA,KAAK,CAAC;EACJ;AACF;AAEA,eAAe,IAAIR,oBAAoB,CAAC,CAAC"}
@@ -1,35 +0,0 @@
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
- buttonColor: XMLBuilder;
8
- preprintQueue: (() => void)[];
9
- printQueue: (() => void)[];
10
- postPrintQueue: (() => void)[];
11
- constructor(theme: AndroidThemeObject);
12
- process(): {
13
- style: XMLBuilder;
14
- buttonDrawable: XMLBuilder;
15
- buttonColor: XMLBuilder;
16
- };
17
- private print;
18
- private hasTheme;
19
- private primaryColor;
20
- private accentColor;
21
- private darkPrimaryColor;
22
- private backgroundColor;
23
- private titleText;
24
- private bodyText;
25
- private footnoteText;
26
- private textField;
27
- private pickerText;
28
- private button;
29
- private progressColor;
30
- private successAsset;
31
- private failAsset;
32
- private loadingAnimationAsset;
33
- private selfieAnimationAsset;
34
- }
35
- export default AndroidResourcePrinter;
@@ -1,15 +0,0 @@
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;
@@ -1,108 +0,0 @@
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
- bodyTextColor = "bodyTextColor",
9
- bodyTextFont = "bodyTextFont",
10
- footnoteTextColor = "footnoteTextColor",
11
- footnoteTextFont = "footnoteTextFont",
12
- textFieldTextColor = "textFieldTextColor",
13
- textFieldTextFont = "textFieldTextFont",
14
- pickerTextColor = "pickerTextColor",
15
- pickerTextFont = "pickerTextFont",
16
- buttonBackgroundColor = "buttonBackgroundColor",
17
- buttonDisabledBackgroundColor = "buttonDisabledBackgroundColor",
18
- buttonTouchedBackgroundColor = "buttonTouchedBackgroundColor",
19
- buttonTextColor = "buttonTextColor",
20
- buttonDisabledTextColor = "buttonDisabledTextColor",
21
- buttonCornerRadius = "buttonCornerRadius",
22
- buttonFont = "buttonFont",
23
- progressColor = "progressColor",
24
- successAsset = "successAsset",
25
- failAsset = "failAsset",
26
- loadingAnimationAsset = "loadingAnimationAsset",
27
- loadingAnimationWidthPercent = "loadingAnimationWidthPercent",
28
- selfieAnimationAsset = "selfieAnimationAsset",
29
- selfieAnimationWidthPercent = "selfieAnimationWidthPercent"
30
- }
31
- export declare enum IOS_THEME_CONFIG_KEY {
32
- backgroundColor = "backgroundColor",
33
- primaryColor = "primaryColor",
34
- darkPrimaryColor = "darkPrimaryColor",
35
- accentColor = "accentColor",
36
- errorColor = "errorColor",
37
- errorTextFont = "errorTextFont",
38
- overlayBackgroundColor = "overlayBackgroundColor",
39
- titleTextAlignment = "titleTextAlignment",
40
- titleTextColor = "titleTextColor",
41
- titleTextFont = "titleTextFont",
42
- cardTitleTextFont = "cardTitleTextFont",
43
- bodyTextAlignment = "bodyTextAlignment",
44
- bodyTextColor = "bodyTextColor",
45
- bodyTextFont = "bodyTextFont",
46
- footnoteTextColor = "footnoteTextColor",
47
- footnoteTextFont = "footnoteTextFont",
48
- formLabelTextColor = "formLabelTextColor",
49
- formLabelTextFont = "formLabelTextFont",
50
- textFieldTextColor = "textFieldTextColor",
51
- textFieldBackgroundColor = "textFieldBackgroundColor",
52
- textFieldBorderColor = "textFieldBorderColor",
53
- textFieldCornerRadius = "textFieldCornerRadius",
54
- textFieldFont = "textFieldFont",
55
- textFieldPlaceholderFont = "textFieldPlaceholderFont",
56
- pickerTextColor = "pickerTextColor",
57
- pickerTextFont = "pickerTextFont",
58
- buttonBackgroundColor = "buttonBackgroundColor",
59
- buttonDisabledBackgroundColor = "buttonDisabledBackgroundColor",
60
- buttonTouchedBackgroundColor = "buttonTouchedBackgroundColor",
61
- buttonTextColor = "buttonTextColor",
62
- buttonDisabledTextColor = "buttonDisabledTextColor",
63
- buttonTextAlignment = "buttonTextAlignment",
64
- buttonImageTintColor = "buttonImageTintColor",
65
- buttonCornerRadius = "buttonCornerRadius",
66
- buttonBorderWidth = "buttonBorderWidth",
67
- buttonBorderColor = "buttonBorderColor",
68
- buttonFont = "buttonFont",
69
- buttonSecondaryBackgroundColor = "buttonSecondaryBackgroundColor",
70
- buttonSecondaryDisabledBackgroundColor = "buttonSecondaryDisabledBackgroundColor",
71
- buttonSecondaryTouchedBackgroundColor = "buttonSecondaryTouchedBackgroundColor",
72
- buttonSecondaryTextColor = "buttonSecondaryTextColor",
73
- buttonSecondaryDisabledTextColor = "buttonSecondaryDisabledTextColor",
74
- buttonSecondaryTextAlignment = "buttonSecondaryTextAlignment",
75
- buttonSecondaryImageTintColor = "buttonSecondaryImageTintColor",
76
- buttonSecondaryCornerRadius = "buttonSecondaryCornerRadius",
77
- buttonSecondaryBorderWidth = "buttonSecondaryBorderWidth",
78
- buttonSecondaryBorderColor = "buttonSecondaryBorderColor",
79
- buttonSecondaryFont = "buttonSecondaryFont",
80
- selectedCellBackgroundColor = "selectedCellBackgroundColor",
81
- closeButtonTintColor = "closeButtonTintColor",
82
- cancelButtonBackgroundColor = "cancelButtonBackgroundColor",
83
- cancelButtonTextColor = "cancelButtonTextColor",
84
- cancelButtonAlternateBackgroundColor = "cancelButtonAlternateBackgroundColor",
85
- cancelButtonAlternateTextColor = "cancelButtonAlternateTextColor",
86
- processingLabelsTextAlignment = "processingLabelsTextAlignment",
87
- loadingAnimationAssetName = "loadingAnimationAssetName",
88
- loadingAnimationAssetWidth = "loadingAnimationAssetWidth",
89
- loadingAnimationAssetHeight = "loadingAnimationAssetHeight",
90
- processingAnimationAssetName = "processingAnimationAssetName",
91
- processingAnimationAssetWidth = "processingAnimationAssetWidth",
92
- processingAnimationAssetHeight = "processingAnimationAssetHeight",
93
- selfieAnimationAssetName = "selfieAnimationAssetName",
94
- selfieAnimationAssetWidth = "selfieAnimationAssetWidth",
95
- selfieAnimationAssetHeight = "selfieAnimationAssetHeight"
96
- }
97
- export type AndroidThemeObject = {
98
- [key in ANDROID_THEME_CONFIG_KEY]: string | null | undefined;
99
- };
100
- export type IosThemeObject = {
101
- [key in IOS_THEME_CONFIG_KEY]: string | null | undefined;
102
- };
103
- export type ThemeObject = AndroidThemeObject | IosThemeObject;
104
- declare class Theme {
105
- print(platform?: string): Promise<void>;
106
- }
107
- declare const _default: Theme;
108
- export default _default;
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
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>;
@@ -1,5 +0,0 @@
1
- declare class ThemeGenerator {
2
- run(): Promise<void>;
3
- }
4
- declare const _default: ThemeGenerator;
5
- export default _default;
@@ -1,5 +0,0 @@
1
- declare class IosThemeInstructions {
2
- run(): Promise<void>;
3
- }
4
- declare const _default: IosThemeInstructions;
5
- export default _default;