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.
Files changed (77) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/RNPersonaInquiry.podspec +1 -1
  3. package/android/README.md +14 -0
  4. package/android/build.gradle +21 -100
  5. package/bin/persona-tool +1 -2
  6. package/lib/commonjs/index.js +477 -0
  7. package/lib/commonjs/index.js.map +1 -0
  8. package/lib/commonjs/persona-tools/AndroidResourcePrinter.js +694 -0
  9. package/lib/commonjs/persona-tools/AndroidResourcePrinter.js.map +1 -0
  10. package/lib/commonjs/persona-tools/Config.js +95 -0
  11. package/lib/commonjs/persona-tools/Config.js.map +1 -0
  12. package/lib/commonjs/persona-tools/Theme.js +228 -0
  13. package/lib/commonjs/persona-tools/Theme.js.map +1 -0
  14. package/lib/commonjs/persona-tools/index.js +41 -0
  15. package/lib/commonjs/persona-tools/index.js.map +1 -0
  16. package/lib/commonjs/persona-tools/prompts.js +48 -0
  17. package/lib/commonjs/persona-tools/prompts.js.map +1 -0
  18. package/lib/commonjs/persona-tools/tools/AndroidThemeGenerator.js +112 -0
  19. package/lib/commonjs/persona-tools/tools/AndroidThemeGenerator.js.map +1 -0
  20. package/lib/commonjs/persona-tools/tools/IosThemeInstructions.js +50 -0
  21. package/lib/commonjs/persona-tools/tools/IosThemeInstructions.js.map +1 -0
  22. package/lib/commonjs/util.js +36 -0
  23. package/lib/commonjs/util.js.map +1 -0
  24. package/lib/module/index.js +452 -0
  25. package/lib/module/index.js.map +1 -0
  26. package/lib/module/persona-tools/AndroidResourcePrinter.js +686 -0
  27. package/lib/module/persona-tools/AndroidResourcePrinter.js.map +1 -0
  28. package/lib/module/persona-tools/Config.js +82 -0
  29. package/lib/module/persona-tools/Config.js.map +1 -0
  30. package/lib/module/persona-tools/Theme.js +212 -0
  31. package/lib/module/persona-tools/Theme.js.map +1 -0
  32. package/lib/module/persona-tools/index.js +33 -0
  33. package/lib/module/persona-tools/index.js.map +1 -0
  34. package/lib/module/persona-tools/prompts.js +31 -0
  35. package/lib/module/persona-tools/prompts.js.map +1 -0
  36. package/lib/module/persona-tools/tools/AndroidThemeGenerator.js +82 -0
  37. package/lib/module/persona-tools/tools/AndroidThemeGenerator.js.map +1 -0
  38. package/lib/module/persona-tools/tools/IosThemeInstructions.js +37 -0
  39. package/lib/module/persona-tools/tools/IosThemeInstructions.js.map +1 -0
  40. package/lib/module/util.js +29 -0
  41. package/lib/module/util.js.map +1 -0
  42. package/{generatedTypes → lib/typescript}/index.d.ts +67 -3
  43. package/lib/typescript/persona-tools/AndroidResourcePrinter.d.ts +40 -0
  44. package/lib/typescript/persona-tools/Config.d.ts +15 -0
  45. package/lib/typescript/persona-tools/Theme.d.ts +124 -0
  46. package/lib/typescript/persona-tools/index.d.ts +1 -0
  47. package/lib/typescript/persona-tools/prompts.d.ts +8 -0
  48. package/lib/typescript/persona-tools/tools/AndroidThemeGenerator.d.ts +5 -0
  49. package/lib/typescript/persona-tools/tools/IosThemeInstructions.d.ts +5 -0
  50. package/lib/typescript/util.d.ts +3 -0
  51. package/package.json +79 -22
  52. package/src/index.ts +17 -18
  53. package/{persona-tools/lib → src/persona-tools}/AndroidResourcePrinter.ts +314 -278
  54. package/{persona-tools/config.ts → src/persona-tools/Config.ts} +7 -7
  55. package/src/persona-tools/Theme.ts +262 -0
  56. package/src/persona-tools/index.ts +30 -0
  57. package/{persona-tools/lib → src/persona-tools}/prompts.ts +11 -11
  58. package/{persona-tools → src/persona-tools}/tools/AndroidThemeGenerator.ts +31 -32
  59. package/{persona-tools → src/persona-tools}/tools/IosThemeInstructions.ts +8 -8
  60. package/src/util.ts +3 -3
  61. package/jest.config.js +0 -10
  62. package/persona-tools/Theme.js +0 -213
  63. package/persona-tools/Theme.ts +0 -260
  64. package/persona-tools/config.js +0 -72
  65. package/persona-tools/index.js +0 -30
  66. package/persona-tools/index.ts +0 -30
  67. package/persona-tools/lib/AndroidResourcePrinter.js +0 -832
  68. package/persona-tools/lib/AndroidResourcePrinter.spec.js +0 -1135
  69. package/persona-tools/lib/AndroidResourcePrinter.spec.ts +0 -1229
  70. package/persona-tools/lib/prompts.js +0 -39
  71. package/persona-tools/tools/AndroidThemeGenerator.js +0 -59
  72. package/persona-tools/tools/IosThemeInstructions.js +0 -34
  73. package/src/index.js +0 -307
  74. package/src/util.js +0 -29
  75. package/src/util.spec.js +0 -15
  76. package/src/util.spec.ts +0 -16
  77. package/tsconfig.json +0 -29
@@ -1,6 +1,6 @@
1
- import { create as createXml } from "xmlbuilder2";
2
- import { AndroidThemeObject } from "../Theme";
3
- import { XMLBuilder } from "xmlbuilder2/lib/interfaces";
1
+ import { create as createXml } from 'xmlbuilder2';
2
+ import type { AndroidThemeObject } from './Theme';
3
+ import type { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
4
4
 
5
5
  class AndroidResourcePrinter {
6
6
  theme: AndroidThemeObject;
@@ -14,15 +14,18 @@ class AndroidResourcePrinter {
14
14
 
15
15
  constructor(theme: AndroidThemeObject) {
16
16
  this.theme = theme;
17
- this.root = createXml({ version: "1.0" }).ele("resources");
18
- this.buttonDrawable = createXml({ version: "1.0" }).ele("selector", {
19
- "xmlns:android": "http://schemas.android.com/apk/res/android",
17
+ this.root = createXml({ version: '1.0' }).ele('resources');
18
+ this.buttonDrawable = createXml({ version: '1.0' }).ele('selector', {
19
+ 'xmlns:android': 'http://schemas.android.com/apk/res/android',
20
20
  });
21
- this.buttonSecondaryDrawable = createXml({ version: "1.0" }).ele("selector", {
22
- "xmlns:android": "http://schemas.android.com/apk/res/android",
23
- });
24
- this.buttonColor = createXml({ version: "1.0" }).ele("selector", {
25
- "xmlns:android": "http://schemas.android.com/apk/res/android",
21
+ this.buttonSecondaryDrawable = createXml({ version: '1.0' }).ele(
22
+ 'selector',
23
+ {
24
+ 'xmlns:android': 'http://schemas.android.com/apk/res/android',
25
+ }
26
+ );
27
+ this.buttonColor = createXml({ version: '1.0' }).ele('selector', {
28
+ 'xmlns:android': 'http://schemas.android.com/apk/res/android',
26
29
  });
27
30
  }
28
31
 
@@ -66,23 +69,23 @@ class AndroidResourcePrinter {
66
69
 
67
70
  // Precreate some style namespaces
68
71
  this.root = this.root
69
- .ele("style", {
70
- name: "RN",
72
+ .ele('style', {
73
+ name: 'RN',
71
74
  })
72
75
  .up();
73
76
  this.root = this.root
74
- .ele("style", {
75
- name: "RN.Persona",
77
+ .ele('style', {
78
+ name: 'RN.Persona',
76
79
  })
77
80
  .up();
78
81
  this.root = this.root
79
- .ele("style", {
80
- name: "RN.Persona.Text",
82
+ .ele('style', {
83
+ name: 'RN.Persona.Text',
81
84
  })
82
85
  .up();
83
- this.root = this.root.ele("style", {
84
- name: "Persona.Inquiry.Theme",
85
- parent: "Base.Persona.Inquiry.Theme.Light",
86
+ this.root = this.root.ele('style', {
87
+ name: 'Persona.Inquiry.Theme',
88
+ parent: 'Base.Persona.Inquiry.Theme.Light',
86
89
  });
87
90
  this.printQueue.forEach((fn) => fn());
88
91
  this.root = this.root.up();
@@ -101,10 +104,10 @@ class AndroidResourcePrinter {
101
104
 
102
105
  this.printQueue.push(() => {
103
106
  this.root = this.root
104
- .ele("item", { name: "colorPrimary" })
107
+ .ele('item', { name: 'colorPrimary' })
105
108
  .txt(this.theme.primaryColor as string)
106
109
  .up()
107
- .txt(" ");
110
+ .txt(' ');
108
111
  });
109
112
  }
110
113
 
@@ -113,10 +116,10 @@ class AndroidResourcePrinter {
113
116
 
114
117
  this.printQueue.push(() => {
115
118
  this.root = this.root
116
- .ele("item", { name: "colorAccent" })
119
+ .ele('item', { name: 'colorAccent' })
117
120
  .txt(this.theme.accentColor as string)
118
121
  .up()
119
- .txt(" ");
122
+ .txt(' ');
120
123
  });
121
124
  }
122
125
 
@@ -125,10 +128,10 @@ class AndroidResourcePrinter {
125
128
 
126
129
  this.printQueue.push(() => {
127
130
  this.root = this.root
128
- .ele("item", { name: "colorPrimaryDark" })
131
+ .ele('item', { name: 'colorPrimaryDark' })
129
132
  .txt(this.theme.darkPrimaryColor as string)
130
133
  .up()
131
- .txt(" ");
134
+ .txt(' ');
132
135
  });
133
136
  }
134
137
 
@@ -137,40 +140,44 @@ class AndroidResourcePrinter {
137
140
 
138
141
  this.preprintQueue.push(() => {
139
142
  this.root = this.root
140
- .ele("color", { name: "customPersonaBackgroundColor" })
143
+ .ele('color', { name: 'customPersonaBackgroundColor' })
141
144
  .txt(this.theme.backgroundColor as string)
142
145
  .up()
143
- .txt(" ");
144
- })
146
+ .txt(' ');
147
+ });
145
148
 
146
149
  this.printQueue.push(() => {
147
150
  this.root = this.root
148
- .ele("item", { name: "android:colorBackground" })
149
- .txt("@color/customPersonaBackgroundColor")
151
+ .ele('item', { name: 'android:colorBackground' })
152
+ .txt('@color/customPersonaBackgroundColor')
150
153
  .up()
151
- .txt(" ");
154
+ .txt(' ');
152
155
  });
153
156
  }
154
157
 
155
158
  private titleText() {
156
- if (this.theme.titleTextColor || this.theme.titleTextSize || this.theme.titleTextFont) {
159
+ if (
160
+ this.theme.titleTextColor ||
161
+ this.theme.titleTextSize ||
162
+ this.theme.titleTextFont
163
+ ) {
157
164
  this.printQueue.push(() => {
158
165
  this.root = this.root
159
- .ele("item", { name: "personaTitleTextAppearance" })
160
- .txt("@style/RN.Persona.Text.Title")
166
+ .ele('item', { name: 'personaTitleTextAppearance' })
167
+ .txt('@style/RN.Persona.Text.Title')
161
168
  .up();
162
169
  });
163
170
 
164
171
  // Create a text appearance
165
172
  this.postPrintQueue.push(() => {
166
- this.root = this.root.ele("style", {
167
- name: "RN.Persona.Text.Title",
168
- parent: "Persona.Text.Body",
173
+ this.root = this.root.ele('style', {
174
+ name: 'RN.Persona.Text.Title',
175
+ parent: 'Persona.Text.Body',
169
176
  });
170
177
 
171
178
  if (this.theme.titleTextColor) {
172
179
  this.root = this.root
173
- .ele("item", { name: "android:textColor" })
180
+ .ele('item', { name: 'android:textColor' })
174
181
  .txt(this.theme.titleTextColor as string)
175
182
  .up();
176
183
  }
@@ -179,20 +186,22 @@ class AndroidResourcePrinter {
179
186
  // TODO: Add notice about how to add a custom font that can be
180
187
  // referenced here on Android
181
188
  this.root = this.root
182
- .ele("item", { name: "android:fontFamily" })
189
+ .ele('item', { name: 'android:fontFamily' })
183
190
  .txt(this.theme.titleTextFont as string)
184
191
  .up();
185
192
  }
186
193
 
187
194
  // Default values taken from `Persona.Text.Title`
188
195
  // in shared/src/main/res/values/styles.xml
189
- const textSize = this.theme.titleTextSize ? `${this.theme.titleTextSize}sp` : "26sp";
196
+ const textSize = this.theme.titleTextSize
197
+ ? `${this.theme.titleTextSize}sp`
198
+ : '26sp';
190
199
  this.root = this.root
191
- .ele("item", { name: "android:textSize" })
200
+ .ele('item', { name: 'android:textSize' })
192
201
  .txt(textSize)
193
202
  .up()
194
- .ele("item", { name: "android:textStyle" })
195
- .txt("bold")
203
+ .ele('item', { name: 'android:textStyle' })
204
+ .txt('bold')
196
205
  .up();
197
206
 
198
207
  this.root = this.root.up();
@@ -200,32 +209,36 @@ class AndroidResourcePrinter {
200
209
  } else {
201
210
  this.printQueue.push(() => {
202
211
  this.root = this.root
203
- .ele("item", { name: "personaTitleTextAppearance" })
204
- .txt("@style/Persona.Text.Title")
212
+ .ele('item', { name: 'personaTitleTextAppearance' })
213
+ .txt('@style/Persona.Text.Title')
205
214
  .up();
206
215
  });
207
216
  }
208
217
  }
209
218
 
210
219
  private bodyText() {
211
- if (this.theme.bodyTextColor || this.theme.bodyTextSize || this.theme.bodyTextFont) {
220
+ if (
221
+ this.theme.bodyTextColor ||
222
+ this.theme.bodyTextSize ||
223
+ this.theme.bodyTextFont
224
+ ) {
212
225
  this.printQueue.push(() => {
213
226
  this.root = this.root
214
- .ele("item", { name: "personaBodyTextAppearance" })
215
- .txt("@style/RN.Persona.Text.Body")
227
+ .ele('item', { name: 'personaBodyTextAppearance' })
228
+ .txt('@style/RN.Persona.Text.Body')
216
229
  .up();
217
230
  });
218
231
 
219
232
  // Create a text appearance
220
233
  this.postPrintQueue.push(() => {
221
- this.root = this.root.ele("style", {
222
- name: "RN.Persona.Text.Body",
223
- parent: "Persona.Text.Body",
234
+ this.root = this.root.ele('style', {
235
+ name: 'RN.Persona.Text.Body',
236
+ parent: 'Persona.Text.Body',
224
237
  });
225
238
 
226
239
  if (this.theme.bodyTextColor) {
227
240
  this.root = this.root
228
- .ele("item", { name: "android:textColor" })
241
+ .ele('item', { name: 'android:textColor' })
229
242
  .txt(this.theme.bodyTextColor as string)
230
243
  .up();
231
244
  }
@@ -234,14 +247,16 @@ class AndroidResourcePrinter {
234
247
  // TODO: Add notice about how to add a custom font that can be
235
248
  // referenced here on Android
236
249
  this.root = this.root
237
- .ele("item", { name: "android:fontFamily" })
250
+ .ele('item', { name: 'android:fontFamily' })
238
251
  .txt(this.theme.bodyTextFont as string)
239
252
  .up();
240
253
  }
241
254
 
242
- const textSize = this.theme.bodyTextSize ? `${this.theme.bodyTextSize}sp` : "18sp";
255
+ const textSize = this.theme.bodyTextSize
256
+ ? `${this.theme.bodyTextSize}sp`
257
+ : '18sp';
243
258
  this.root = this.root
244
- .ele("item", { name: "android:textSize" })
259
+ .ele('item', { name: 'android:textSize' })
245
260
  .txt(textSize)
246
261
  .up();
247
262
 
@@ -250,8 +265,8 @@ class AndroidResourcePrinter {
250
265
  } else {
251
266
  this.printQueue.push(() => {
252
267
  this.root = this.root
253
- .ele("item", { name: "personaBodyTextAppearance" })
254
- .txt("@style/Persona.Text.Body")
268
+ .ele('item', { name: 'personaBodyTextAppearance' })
269
+ .txt('@style/Persona.Text.Body')
255
270
  .up();
256
271
  });
257
272
  }
@@ -261,27 +276,29 @@ class AndroidResourcePrinter {
261
276
  if (this.theme.footnoteTextColor || this.theme.footnoteTextFont) {
262
277
  this.postPrintQueue.push(() => {
263
278
  this.root = this.root
264
- .ele("style", { name: "TextAppearance.AppCompat.Small" })
265
- .ele("item", { name: "android:textColor" })
279
+ .ele('style', { name: 'TextAppearance.AppCompat.Small' })
280
+ .ele('item', { name: 'android:textColor' })
266
281
  .txt(
267
282
  // Used default value found in the Android SDK
268
- this.theme.footnoteTextColor ?? "?android:attr/textColorTertiary"
283
+ this.theme.footnoteTextColor ?? '?android:attr/textColorTertiary'
269
284
  )
270
285
  .up();
271
286
 
272
287
  if (this.theme.footnoteTextFont) {
273
288
  this.root = this.root
274
- .ele("item", { name: "android:fontFamily" })
289
+ .ele('item', { name: 'android:fontFamily' })
275
290
  .txt(
276
291
  // Used default value found in the Android SDK
277
- this.theme.footnoteTextFont ?? "?android:attr/textColorTertiary"
292
+ this.theme.footnoteTextFont ?? '?android:attr/textColorTertiary'
278
293
  )
279
294
  .up();
280
295
  }
281
296
  // Default value found in the Android SDK
282
- const textSize = this.theme.footnoteTextSize ? `${this.theme.footnoteTextSize}sp` : "@dimen/abc_text_size_small_material";
297
+ const textSize = this.theme.footnoteTextSize
298
+ ? `${this.theme.footnoteTextSize}sp`
299
+ : '@dimen/abc_text_size_small_material';
283
300
  this.root = this.root
284
- .ele("item", { name: "android:textSize" })
301
+ .ele('item', { name: 'android:textSize' })
285
302
  .txt(textSize)
286
303
  .up();
287
304
 
@@ -291,26 +308,28 @@ class AndroidResourcePrinter {
291
308
  }
292
309
 
293
310
  private cameraInstructionsText() {
294
- if (this.theme.cameraInstructionsTextColor ||
311
+ if (
312
+ this.theme.cameraInstructionsTextColor ||
295
313
  this.theme.cameraInstructionsTextSize ||
296
- this.theme.cameraInstructionsTextFont) {
314
+ this.theme.cameraInstructionsTextFont
315
+ ) {
297
316
  this.printQueue.push(() => {
298
317
  this.root = this.root
299
- .ele("item", { name: "personaCameraTitleTextAppearance" })
300
- .txt("@style/RN.Persona.Text.CameraTitle")
318
+ .ele('item', { name: 'personaCameraTitleTextAppearance' })
319
+ .txt('@style/RN.Persona.Text.CameraTitle')
301
320
  .up();
302
321
  });
303
322
 
304
323
  // Create a text appearance
305
324
  this.postPrintQueue.push(() => {
306
- this.root = this.root.ele("style", {
307
- name: "RN.Persona.Text.CameraTitle",
308
- parent: "Persona.Text.CameraTitle",
325
+ this.root = this.root.ele('style', {
326
+ name: 'RN.Persona.Text.CameraTitle',
327
+ parent: 'Persona.Text.CameraTitle',
309
328
  });
310
329
 
311
330
  if (this.theme.cameraInstructionsTextColor) {
312
331
  this.root = this.root
313
- .ele("item", { name: "android:textColor" })
332
+ .ele('item', { name: 'android:textColor' })
314
333
  .txt(this.theme.cameraInstructionsTextColor as string)
315
334
  .up();
316
335
  }
@@ -319,15 +338,16 @@ class AndroidResourcePrinter {
319
338
  // TODO: Add notice about how to add a custom font that can be
320
339
  // referenced here on Android
321
340
  this.root = this.root
322
- .ele("item", { name: "android:fontFamily" })
341
+ .ele('item', { name: 'android:fontFamily' })
323
342
  .txt(this.theme.cameraInstructionsTextFont as string)
324
343
  .up();
325
344
  }
326
345
 
327
- const textSize = this.theme.cameraInstructionsTextSize ?
328
- `${this.theme.cameraInstructionsTextSize}sp` : "20sp";
346
+ const textSize = this.theme.cameraInstructionsTextSize
347
+ ? `${this.theme.cameraInstructionsTextSize}sp`
348
+ : '20sp';
329
349
  this.root = this.root
330
- .ele("item", { name: "android:textSize" })
350
+ .ele('item', { name: 'android:textSize' })
331
351
  .txt(textSize)
332
352
  .up();
333
353
 
@@ -336,34 +356,36 @@ class AndroidResourcePrinter {
336
356
  } else {
337
357
  this.printQueue.push(() => {
338
358
  this.root = this.root
339
- .ele("item", { name: "personaCameraTitleTextAppearance" })
340
- .txt("@style/Persona.Text.CameraTitle")
359
+ .ele('item', { name: 'personaCameraTitleTextAppearance' })
360
+ .txt('@style/Persona.Text.CameraTitle')
341
361
  .up();
342
362
  });
343
363
  }
344
364
  }
345
365
 
346
366
  private cameraHintText() {
347
- if (this.theme.cameraHintTextColor ||
367
+ if (
368
+ this.theme.cameraHintTextColor ||
348
369
  this.theme.cameraHintTextSize ||
349
- this.theme.cameraHintTextFont) {
370
+ this.theme.cameraHintTextFont
371
+ ) {
350
372
  this.printQueue.push(() => {
351
373
  this.root = this.root
352
- .ele("item", { name: "personaCameraBodyTextAppearance" })
353
- .txt("@style/RN.Persona.Text.CameraBody")
374
+ .ele('item', { name: 'personaCameraBodyTextAppearance' })
375
+ .txt('@style/RN.Persona.Text.CameraBody')
354
376
  .up();
355
377
  });
356
378
 
357
379
  // Create a text appearance
358
380
  this.postPrintQueue.push(() => {
359
- this.root = this.root.ele("style", {
360
- name: "RN.Persona.Text.CameraBody",
361
- parent: "Persona.Text.CameraBody",
381
+ this.root = this.root.ele('style', {
382
+ name: 'RN.Persona.Text.CameraBody',
383
+ parent: 'Persona.Text.CameraBody',
362
384
  });
363
385
 
364
386
  if (this.theme.cameraHintTextColor) {
365
387
  this.root = this.root
366
- .ele("item", { name: "android:textColor" })
388
+ .ele('item', { name: 'android:textColor' })
367
389
  .txt(this.theme.cameraHintTextColor as string)
368
390
  .up();
369
391
  }
@@ -372,15 +394,16 @@ class AndroidResourcePrinter {
372
394
  // TODO: Add notice about how to add a custom font that can be
373
395
  // referenced here on Android
374
396
  this.root = this.root
375
- .ele("item", { name: "android:fontFamily" })
397
+ .ele('item', { name: 'android:fontFamily' })
376
398
  .txt(this.theme.cameraHintTextFont as string)
377
399
  .up();
378
400
  }
379
401
 
380
- const textSize = this.theme.cameraHintTextSize ?
381
- `${this.theme.cameraHintTextSize}sp` : "16sp";
402
+ const textSize = this.theme.cameraHintTextSize
403
+ ? `${this.theme.cameraHintTextSize}sp`
404
+ : '16sp';
382
405
  this.root = this.root
383
- .ele("item", { name: "android:textSize" })
406
+ .ele('item', { name: 'android:textSize' })
384
407
  .txt(textSize)
385
408
  .up();
386
409
 
@@ -389,34 +412,36 @@ class AndroidResourcePrinter {
389
412
  } else {
390
413
  this.printQueue.push(() => {
391
414
  this.root = this.root
392
- .ele("item", { name: "personaCameraBodyTextAppearance" })
393
- .txt("@style/Persona.Text.CameraBody")
415
+ .ele('item', { name: 'personaCameraBodyTextAppearance' })
416
+ .txt('@style/Persona.Text.CameraBody')
394
417
  .up();
395
418
  });
396
419
  }
397
420
  }
398
421
 
399
422
  private cameraGuideHintText() {
400
- if (this.theme.cameraGuideHintTextColor ||
423
+ if (
424
+ this.theme.cameraGuideHintTextColor ||
401
425
  this.theme.cameraGuideHintTextSize ||
402
- this.theme.cameraGuideHintTextFont) {
426
+ this.theme.cameraGuideHintTextFont
427
+ ) {
403
428
  this.printQueue.push(() => {
404
429
  this.root = this.root
405
- .ele("item", { name: "personaCameraHintTextAppearance" })
406
- .txt("@style/RN.Persona.Text.CameraHint")
430
+ .ele('item', { name: 'personaCameraHintTextAppearance' })
431
+ .txt('@style/RN.Persona.Text.CameraHint')
407
432
  .up();
408
433
  });
409
434
 
410
435
  // Create a text appearance
411
436
  this.postPrintQueue.push(() => {
412
- this.root = this.root.ele("style", {
413
- name: "RN.Persona.Text.CameraHint",
414
- parent: "Persona.Text.CameraHint",
437
+ this.root = this.root.ele('style', {
438
+ name: 'RN.Persona.Text.CameraHint',
439
+ parent: 'Persona.Text.CameraHint',
415
440
  });
416
441
 
417
442
  if (this.theme.cameraGuideHintTextColor) {
418
443
  this.root = this.root
419
- .ele("item", { name: "android:textColor" })
444
+ .ele('item', { name: 'android:textColor' })
420
445
  .txt(this.theme.cameraGuideHintTextColor as string)
421
446
  .up();
422
447
  }
@@ -425,15 +450,16 @@ class AndroidResourcePrinter {
425
450
  // TODO: Add notice about how to add a custom font that can be
426
451
  // referenced here on Android
427
452
  this.root = this.root
428
- .ele("item", { name: "android:fontFamily" })
453
+ .ele('item', { name: 'android:fontFamily' })
429
454
  .txt(this.theme.cameraGuideHintTextFont as string)
430
455
  .up();
431
456
  }
432
457
 
433
- const textSize = this.theme.cameraGuideHintTextSize ?
434
- `${this.theme.cameraGuideHintTextSize}sp` : "20sp";
458
+ const textSize = this.theme.cameraGuideHintTextSize
459
+ ? `${this.theme.cameraGuideHintTextSize}sp`
460
+ : '20sp';
435
461
  this.root = this.root
436
- .ele("item", { name: "android:textSize" })
462
+ .ele('item', { name: 'android:textSize' })
437
463
  .txt(textSize)
438
464
  .up();
439
465
 
@@ -442,8 +468,8 @@ class AndroidResourcePrinter {
442
468
  } else {
443
469
  this.printQueue.push(() => {
444
470
  this.root = this.root
445
- .ele("item", { name: "personaCameraHintTextAppearance" })
446
- .txt("@style/Persona.Text.CameraHint")
471
+ .ele('item', { name: 'personaCameraHintTextAppearance' })
472
+ .txt('@style/Persona.Text.CameraHint')
447
473
  .up();
448
474
  });
449
475
  }
@@ -453,40 +479,40 @@ class AndroidResourcePrinter {
453
479
  if (this.theme.textFieldTextColor || this.theme.textFieldTextFont) {
454
480
  this.printQueue.push(() => {
455
481
  this.root = this.root
456
- .ele("item", { name: "editTextStyle" })
457
- .txt("@style/RN.Persona.EditText")
482
+ .ele('item', { name: 'editTextStyle' })
483
+ .txt('@style/RN.Persona.EditText')
458
484
  .up();
459
485
  });
460
486
 
461
487
  this.postPrintQueue.push(() => {
462
488
  this.root = this.root
463
- .ele("style", {
464
- name: "RN.Persona.EditText",
465
- parent: "Widget.AppCompat.EditText",
489
+ .ele('style', {
490
+ name: 'RN.Persona.EditText',
491
+ parent: 'Widget.AppCompat.EditText',
466
492
  })
467
- .ele("item", { name: "android:textAppearance" })
468
- .txt("@style/RN.Persona.EditText.TextAppearance")
493
+ .ele('item', { name: 'android:textAppearance' })
494
+ .txt('@style/RN.Persona.EditText.TextAppearance')
469
495
  .up()
470
- .ele("item", { name: "android:textColor" })
496
+ .ele('item', { name: 'android:textColor' })
471
497
  .txt(this.theme.textFieldTextColor as string)
472
498
  .up()
473
499
  .up();
474
500
 
475
- this.root = this.root.ele("style", {
476
- name: "RN.Persona.EditText.TextAppearance",
477
- parent: "Base.TextAppearance.AppCompat.Medium",
501
+ this.root = this.root.ele('style', {
502
+ name: 'RN.Persona.EditText.TextAppearance',
503
+ parent: 'Base.TextAppearance.AppCompat.Medium',
478
504
  });
479
505
 
480
506
  if (this.theme.textFieldTextColor) {
481
507
  this.root = this.root
482
- .ele("item", { name: "android:textSize" })
483
- .txt("18sp")
508
+ .ele('item', { name: 'android:textSize' })
509
+ .txt('18sp')
484
510
  .up();
485
511
  }
486
512
 
487
513
  if (this.theme.textFieldTextFont) {
488
514
  this.root = this.root
489
- .ele("item", { name: "android:fontFamily" })
515
+ .ele('item', { name: 'android:fontFamily' })
490
516
  .txt(this.theme.textFieldTextFont as string)
491
517
  .up();
492
518
  }
@@ -500,61 +526,61 @@ class AndroidResourcePrinter {
500
526
  if (this.theme.pickerTextColor || this.theme.pickerTextFont) {
501
527
  this.printQueue.push(() => {
502
528
  this.root = this.root
503
- .ele("item", { name: "spinnerStyle" })
504
- .txt("@style/RN.Persona.Spinner")
529
+ .ele('item', { name: 'spinnerStyle' })
530
+ .txt('@style/RN.Persona.Spinner')
505
531
  .up();
506
532
 
507
533
  this.root = this.root
508
- .ele("item", { name: "spinnerDropDownItemStyle" })
509
- .txt("@style/RN.Persona.DropDownItem.Spinner")
534
+ .ele('item', { name: 'spinnerDropDownItemStyle' })
535
+ .txt('@style/RN.Persona.DropDownItem.Spinner')
510
536
  .up();
511
537
  });
512
538
 
513
539
  this.postPrintQueue.push(() => {
514
540
  // Build Rn.Persona.Spinner
515
541
  this.root = this.root
516
- .ele("style", {
517
- name: "RN.Persona.Spinner",
518
- parent: "Widget.AppCompat.Spinner",
542
+ .ele('style', {
543
+ name: 'RN.Persona.Spinner',
544
+ parent: 'Widget.AppCompat.Spinner',
519
545
  })
520
- .ele("item", { name: "android:textColor" })
521
- .txt(this.theme.pickerTextColor ?? "?android:attr/textColorPrimary")
546
+ .ele('item', { name: 'android:textColor' })
547
+ .txt(this.theme.pickerTextColor ?? '?android:attr/textColorPrimary')
522
548
  .up()
523
- .ele("item", { name: "android:textAppearance" })
549
+ .ele('item', { name: 'android:textAppearance' })
524
550
  .txt(
525
551
  this.theme.pickerTextFont
526
- ? "@style/RN.Persona.Text.Spinner"
527
- : "@style/Persona.Text.Body"
552
+ ? '@style/RN.Persona.Text.Spinner'
553
+ : '@style/Persona.Text.Body'
528
554
  )
529
555
  .up()
530
556
  .up();
531
557
 
532
558
  // Build RN.Persona.DropDownItem.Spinner
533
559
  this.root = this.root
534
- .ele("style", {
535
- name: "RN.Persona.DropDownItem.Spinner",
536
- parent: "Widget.AppCompat.DropDownItem.Spinner",
560
+ .ele('style', {
561
+ name: 'RN.Persona.DropDownItem.Spinner',
562
+ parent: 'Widget.AppCompat.DropDownItem.Spinner',
537
563
  })
538
- .ele("item", { name: "android:textColor" })
539
- .txt(this.theme.pickerTextColor ?? "?android:attr/textColorPrimary")
564
+ .ele('item', { name: 'android:textColor' })
565
+ .txt(this.theme.pickerTextColor ?? '?android:attr/textColorPrimary')
540
566
  .up()
541
- .ele("item", { name: "android:textAppearance" })
567
+ .ele('item', { name: 'android:textAppearance' })
542
568
  .txt(
543
569
  this.theme.pickerTextFont
544
- ? "@style/RN.Persona.Text.Spinner"
545
- : "@style/Persona.Text.Body"
570
+ ? '@style/RN.Persona.Text.Spinner'
571
+ : '@style/Persona.Text.Body'
546
572
  )
547
573
  .up()
548
574
  .up();
549
575
 
550
576
  // Build RN.Persona.Text.Spinner
551
- this.root = this.root.ele("style", {
552
- name: "RN.Persona.Text.Spinner",
577
+ this.root = this.root.ele('style', {
578
+ name: 'RN.Persona.Text.Spinner',
553
579
  });
554
580
 
555
581
  if (this.theme.pickerTextColor) {
556
582
  this.root = this.root
557
- .ele("item", { name: "android:textColor" })
583
+ .ele('item', { name: 'android:textColor' })
558
584
  .txt(this.theme.pickerTextColor as string)
559
585
  .up();
560
586
  }
@@ -563,7 +589,7 @@ class AndroidResourcePrinter {
563
589
  // TODO: Add notice about how to add a custom font that can be
564
590
  // referenced here on Android
565
591
  this.root = this.root
566
- .ele("item", { name: "android:fontFamily" })
592
+ .ele('item', { name: 'android:fontFamily' })
567
593
  .txt(this.theme.pickerTextFont as string)
568
594
  .up();
569
595
  }
@@ -586,93 +612,95 @@ class AndroidResourcePrinter {
586
612
  ) {
587
613
  this.printQueue.push(() => {
588
614
  this.root = this.root
589
- .ele("item", { name: "buttonStyle" })
590
- .txt("@style/RN.Persona.Button")
615
+ .ele('item', { name: 'buttonStyle' })
616
+ .txt('@style/RN.Persona.Button')
591
617
  .up();
592
618
 
593
619
  this.root = this.root
594
- .ele("item", { name: "buttonStyleSecondary" })
595
- .txt("@style/RN.Persona.Button.Secondary")
620
+ .ele('item', { name: 'buttonStyleSecondary' })
621
+ .txt('@style/RN.Persona.Button.Secondary')
596
622
  .up();
597
623
  });
598
624
 
599
- const textSize = this.theme.buttonTextSize ? `${this.theme.buttonTextSize}sp` : "18sp";
625
+ const textSize = this.theme.buttonTextSize
626
+ ? `${this.theme.buttonTextSize}sp`
627
+ : '18sp';
600
628
 
601
629
  this.postPrintQueue.push(() => {
602
630
  this.root = this.root
603
- .ele("style", {
604
- name: "RN.Persona.Button",
605
- parent: "android:style/Widget.Button",
631
+ .ele('style', {
632
+ name: 'RN.Persona.Button',
633
+ parent: 'android:style/Widget.Button',
606
634
  })
607
635
  // Taken from
608
636
  // appcompat's res/values/values.xml
609
- .ele("item", {
610
- name: "android:minHeight",
637
+ .ele('item', {
638
+ name: 'android:minHeight',
611
639
  })
612
- .txt("48dip")
640
+ .txt('48dip')
613
641
  .up()
614
642
  // Taken from
615
643
  // appcompat's res/values/values.xml
616
- .ele("item", {
617
- name: "android:minWidth",
644
+ .ele('item', {
645
+ name: 'android:minWidth',
618
646
  })
619
- .txt("88dip")
647
+ .txt('88dip')
620
648
  .up()
621
649
  // Taken from
622
650
  // persona-android's shared/src/main/res/values/styles.xml
623
- .ele("item", {
624
- name: "android:textSize",
651
+ .ele('item', {
652
+ name: 'android:textSize',
625
653
  })
626
654
  .txt(textSize)
627
655
  .up()
628
- .ele("item", {
629
- name: "android:background",
656
+ .ele('item', {
657
+ name: 'android:background',
630
658
  })
631
- .txt("@drawable/rn_persona_button")
659
+ .txt('@drawable/rn_persona_button')
632
660
  .up()
633
- .ele("item", {
634
- name: "android:textColor",
661
+ .ele('item', {
662
+ name: 'android:textColor',
635
663
  })
636
- .txt("@color/rn_persona_button")
664
+ .txt('@color/rn_persona_button')
637
665
  .up()
638
666
  .up();
639
667
 
640
668
  // Build RN.Persona.Button.Secondary
641
669
  this.root = this.root
642
- .ele("style", {
643
- name: "RN.Persona.Button.Secondary",
644
- parent: "RN.Persona.Button",
670
+ .ele('style', {
671
+ name: 'RN.Persona.Button.Secondary',
672
+ parent: 'RN.Persona.Button',
645
673
  })
646
- .ele("item", {
647
- name: "android:background",
674
+ .ele('item', {
675
+ name: 'android:background',
648
676
  })
649
- .txt("@drawable/rn_persona_button_secondary")
677
+ .txt('@drawable/rn_persona_button_secondary')
650
678
  .up()
651
679
  .up();
652
680
 
653
681
  // Disabled
654
682
  this.buttonDrawable = this.buttonDrawable
655
- .ele("item", {
656
- "android:state_enabled": "false",
683
+ .ele('item', {
684
+ 'android:state_enabled': 'false',
657
685
  })
658
- .ele("shape", { "android:shape": "rectangle" })
659
- .ele("corners", {
660
- "android:radius": this.theme.buttonCornerRadius
686
+ .ele('shape', { 'android:shape': 'rectangle' })
687
+ .ele('corners', {
688
+ 'android:radius': this.theme.buttonCornerRadius
661
689
  ? `${this.theme.buttonCornerRadius}dp`
662
- : "@dimen/abc_control_corner_material",
690
+ : '@dimen/abc_control_corner_material',
663
691
  })
664
692
  .up()
665
- .ele("padding", {
666
- "android:left": "@dimen/abc_button_padding_horizontal_material",
667
- "android:top": "@dimen/abc_button_padding_vertical_material",
668
- "android:right": "@dimen/abc_button_padding_horizontal_material",
669
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
693
+ .ele('padding', {
694
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
695
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
696
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
697
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
670
698
  })
671
699
  .up()
672
- .ele("solid", {
673
- "android:color": this.theme.buttonDisabledBackgroundColor
700
+ .ele('solid', {
701
+ 'android:color': this.theme.buttonDisabledBackgroundColor
674
702
  ? this.theme.buttonDisabledBackgroundColor
675
- : "?attr/colorPrimaryDark",
703
+ : '?attr/colorPrimaryDark',
676
704
  })
677
705
  .up()
678
706
  .up()
@@ -680,51 +708,51 @@ class AndroidResourcePrinter {
680
708
 
681
709
  // touched
682
710
  this.buttonDrawable = this.buttonDrawable
683
- .ele("item", {
684
- "android:state_pressed": "true",
711
+ .ele('item', {
712
+ 'android:state_pressed': 'true',
685
713
  })
686
- .ele("shape", { "android:shape": "rectangle" })
687
- .ele("corners", {
688
- "android:radius": this.theme.buttonCornerRadius
714
+ .ele('shape', { 'android:shape': 'rectangle' })
715
+ .ele('corners', {
716
+ 'android:radius': this.theme.buttonCornerRadius
689
717
  ? `${this.theme.buttonCornerRadius}dp`
690
- : "@dimen/abc_control_corner_material",
718
+ : '@dimen/abc_control_corner_material',
691
719
  })
692
720
  .up()
693
- .ele("solid", {
694
- "android:color":
721
+ .ele('solid', {
722
+ 'android:color':
695
723
  this.theme.buttonTouchedBackgroundColor ??
696
- "?attr/colorPrimaryDark",
724
+ '?attr/colorPrimaryDark',
697
725
  })
698
726
  .up()
699
- .ele("padding", {
700
- "android:left": "@dimen/abc_button_padding_horizontal_material",
701
- "android:top": "@dimen/abc_button_padding_vertical_material",
702
- "android:right": "@dimen/abc_button_padding_horizontal_material",
703
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
727
+ .ele('padding', {
728
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
729
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
730
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
731
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
704
732
  })
705
733
  .up()
706
734
  .up()
707
735
  .up();
708
736
 
709
737
  this.buttonDrawable = this.buttonDrawable
710
- .ele("item")
711
- .ele("shape", { "android:shape": "rectangle" })
712
- .ele("corners", {
713
- "android:radius": this.theme.buttonCornerRadius
738
+ .ele('item')
739
+ .ele('shape', { 'android:shape': 'rectangle' })
740
+ .ele('corners', {
741
+ 'android:radius': this.theme.buttonCornerRadius
714
742
  ? `${this.theme.buttonCornerRadius}dp`
715
- : "@dimen/abc_control_corner_material",
743
+ : '@dimen/abc_control_corner_material',
716
744
  })
717
745
  .up()
718
- .ele("solid", {
719
- "android:color":
720
- this.theme.buttonBackgroundColor ?? "?attr/colorPrimary",
746
+ .ele('solid', {
747
+ 'android:color':
748
+ this.theme.buttonBackgroundColor ?? '?attr/colorPrimary',
721
749
  })
722
750
  .up()
723
- .ele("padding", {
724
- "android:left": "@dimen/abc_button_padding_horizontal_material",
725
- "android:top": "@dimen/abc_button_padding_vertical_material",
726
- "android:right": "@dimen/abc_button_padding_horizontal_material",
727
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
751
+ .ele('padding', {
752
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
753
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
754
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
755
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
728
756
  })
729
757
  .up()
730
758
  .up()
@@ -734,22 +762,22 @@ class AndroidResourcePrinter {
734
762
  this.buttonDrawable = this.buttonDrawable.up();
735
763
 
736
764
  this.buttonColor = this.buttonColor
737
- .ele("item", {
738
- "android:state_enabled": "false",
739
- "android:color":
765
+ .ele('item', {
766
+ 'android:state_enabled': 'false',
767
+ 'android:color':
740
768
  this.theme.buttonDisabledTextColor ??
741
- "@android:color/darker_gray",
769
+ '@android:color/darker_gray',
742
770
  })
743
771
  .up()
744
- .ele("item", {
745
- "android:state_pressed": "true",
746
- "android:color":
747
- this.theme.buttonTextColor ?? "@android:color/white",
772
+ .ele('item', {
773
+ 'android:state_pressed': 'true',
774
+ 'android:color':
775
+ this.theme.buttonTextColor ?? '@android:color/white',
748
776
  })
749
777
  .up()
750
- .ele("item", {
751
- "android:color":
752
- this.theme.buttonTextColor ?? "@android:color/white",
778
+ .ele('item', {
779
+ 'android:color':
780
+ this.theme.buttonTextColor ?? '@android:color/white',
753
781
  })
754
782
  .up();
755
783
 
@@ -757,25 +785,25 @@ class AndroidResourcePrinter {
757
785
 
758
786
  // Disabled
759
787
  this.buttonSecondaryDrawable = this.buttonSecondaryDrawable
760
- .ele("item", {
761
- "android:state_enabled": "false",
788
+ .ele('item', {
789
+ 'android:state_enabled': 'false',
762
790
  })
763
- .ele("shape", { "android:shape": "rectangle" })
764
- .ele("corners", {
765
- "android:radius": this.theme.buttonCornerRadius
791
+ .ele('shape', { 'android:shape': 'rectangle' })
792
+ .ele('corners', {
793
+ 'android:radius': this.theme.buttonCornerRadius
766
794
  ? `${this.theme.buttonCornerRadius}dp`
767
- : "@dimen/abc_control_corner_material",
795
+ : '@dimen/abc_control_corner_material',
768
796
  })
769
797
  .up()
770
- .ele("padding", {
771
- "android:left": "@dimen/abc_button_padding_horizontal_material",
772
- "android:top": "@dimen/abc_button_padding_vertical_material",
773
- "android:right": "@dimen/abc_button_padding_horizontal_material",
774
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
798
+ .ele('padding', {
799
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
800
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
801
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
802
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
775
803
  })
776
804
  .up()
777
- .ele("solid", {
778
- "android:color": "@android:color/darker_gray",
805
+ .ele('solid', {
806
+ 'android:color': '@android:color/darker_gray',
779
807
  })
780
808
  .up()
781
809
  .up()
@@ -783,48 +811,48 @@ class AndroidResourcePrinter {
783
811
 
784
812
  // touched
785
813
  this.buttonSecondaryDrawable = this.buttonSecondaryDrawable
786
- .ele("item", {
787
- "android:state_pressed": "true",
814
+ .ele('item', {
815
+ 'android:state_pressed': 'true',
788
816
  })
789
- .ele("shape", { "android:shape": "rectangle" })
790
- .ele("corners", {
791
- "android:radius": this.theme.buttonCornerRadius
817
+ .ele('shape', { 'android:shape': 'rectangle' })
818
+ .ele('corners', {
819
+ 'android:radius': this.theme.buttonCornerRadius
792
820
  ? `${this.theme.buttonCornerRadius}dp`
793
- : "@dimen/abc_control_corner_material",
821
+ : '@dimen/abc_control_corner_material',
794
822
  })
795
823
  .up()
796
- .ele("solid", {
797
- "android:color": "@color/grayButtonDark",
824
+ .ele('solid', {
825
+ 'android:color': '@color/grayButtonDark',
798
826
  })
799
827
  .up()
800
- .ele("padding", {
801
- "android:left": "@dimen/abc_button_padding_horizontal_material",
802
- "android:top": "@dimen/abc_button_padding_vertical_material",
803
- "android:right": "@dimen/abc_button_padding_horizontal_material",
804
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
828
+ .ele('padding', {
829
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
830
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
831
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
832
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
805
833
  })
806
834
  .up()
807
835
  .up()
808
836
  .up();
809
837
 
810
838
  this.buttonSecondaryDrawable = this.buttonSecondaryDrawable
811
- .ele("item")
812
- .ele("shape", { "android:shape": "rectangle" })
813
- .ele("corners", {
814
- "android:radius": this.theme.buttonCornerRadius
839
+ .ele('item')
840
+ .ele('shape', { 'android:shape': 'rectangle' })
841
+ .ele('corners', {
842
+ 'android:radius': this.theme.buttonCornerRadius
815
843
  ? `${this.theme.buttonCornerRadius}dp`
816
- : "@dimen/abc_control_corner_material",
844
+ : '@dimen/abc_control_corner_material',
817
845
  })
818
846
  .up()
819
- .ele("solid", {
820
- "android:color": "@color/grayButton",
847
+ .ele('solid', {
848
+ 'android:color': '@color/grayButton',
821
849
  })
822
850
  .up()
823
- .ele("padding", {
824
- "android:left": "@dimen/abc_button_padding_horizontal_material",
825
- "android:top": "@dimen/abc_button_padding_vertical_material",
826
- "android:right": "@dimen/abc_button_padding_horizontal_material",
827
- "android:bottom": "@dimen/abc_button_padding_vertical_material",
851
+ .ele('padding', {
852
+ 'android:left': '@dimen/abc_button_padding_horizontal_material',
853
+ 'android:top': '@dimen/abc_button_padding_vertical_material',
854
+ 'android:right': '@dimen/abc_button_padding_horizontal_material',
855
+ 'android:bottom': '@dimen/abc_button_padding_vertical_material',
828
856
  })
829
857
  .up()
830
858
  .up()
@@ -841,7 +869,7 @@ class AndroidResourcePrinter {
841
869
  if (this.theme.progressColor) {
842
870
  this.printQueue.push(() => {
843
871
  this.root = this.root
844
- .ele("item", { name: "colorControlActivated" })
872
+ .ele('item', { name: 'colorControlActivated' })
845
873
  .txt(this.theme.progressColor as string)
846
874
  .up();
847
875
  });
@@ -853,10 +881,10 @@ class AndroidResourcePrinter {
853
881
 
854
882
  this.printQueue.push(() => {
855
883
  this.root = this.root
856
- .ele("item", { name: "personaInquiryCompleteImage" })
884
+ .ele('item', { name: 'personaInquiryCompleteImage' })
857
885
  .txt(this.theme.successAsset as string)
858
886
  .up()
859
- .txt(" ");
887
+ .txt(' ');
860
888
  });
861
889
  }
862
890
 
@@ -865,46 +893,54 @@ class AndroidResourcePrinter {
865
893
 
866
894
  this.printQueue.push(() => {
867
895
  this.root = this.root
868
- .ele("item", { name: "personaInquiryFailImage" })
896
+ .ele('item', { name: 'personaInquiryFailImage' })
869
897
  .txt(this.theme.failAsset as string)
870
898
  .up()
871
- .txt(" ");
899
+ .txt(' ');
872
900
  });
873
901
  }
874
902
 
875
903
  private loadingAnimationAsset() {
876
- if (!this.theme.loadingAnimationAsset || !this.theme.loadingAnimationWidthPercent) return;
904
+ if (
905
+ !this.theme.loadingAnimationAsset ||
906
+ !this.theme.loadingAnimationWidthPercent
907
+ )
908
+ return;
877
909
 
878
910
  this.printQueue.push(() => {
879
911
  this.root = this.root
880
- .ele("item", { name: "personaInquiryLoadingLottieRaw" })
912
+ .ele('item', { name: 'personaInquiryLoadingLottieRaw' })
881
913
  .txt(this.theme.loadingAnimationAsset as string)
882
914
  .up()
883
- .txt(" ");
915
+ .txt(' ');
884
916
 
885
917
  this.root = this.root
886
- .ele("item", { name: "personaInquiryLoadingLottieWidthPercent" })
918
+ .ele('item', { name: 'personaInquiryLoadingLottieWidthPercent' })
887
919
  .txt(this.theme.loadingAnimationWidthPercent as string)
888
920
  .up()
889
- .txt(" ");
921
+ .txt(' ');
890
922
  });
891
923
  }
892
924
 
893
925
  private selfieAnimationAsset() {
894
- if (!this.theme.selfieAnimationAsset || !this.theme.selfieAnimationWidthPercent) return;
926
+ if (
927
+ !this.theme.selfieAnimationAsset ||
928
+ !this.theme.selfieAnimationWidthPercent
929
+ )
930
+ return;
895
931
 
896
932
  this.printQueue.push(() => {
897
933
  this.root = this.root
898
- .ele("item", { name: "personaInquirySelfieLottieRaw" })
934
+ .ele('item', { name: 'personaInquirySelfieLottieRaw' })
899
935
  .txt(this.theme.selfieAnimationAsset as string)
900
936
  .up()
901
- .txt(" ");
937
+ .txt(' ');
902
938
 
903
939
  this.root = this.root
904
- .ele("item", { name: "personaInquirySelfieLottieWidthPercent" })
940
+ .ele('item', { name: 'personaInquirySelfieLottieWidthPercent' })
905
941
  .txt(this.theme.selfieAnimationWidthPercent as string)
906
942
  .up()
907
- .txt(" ");
943
+ .txt(' ');
908
944
  });
909
945
  }
910
946
  }