@africanies/angular-web-sdk 0.1.11 → 0.1.12

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 (93) hide show
  1. package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +2572 -962
  2. package/.nx/cache/7821397806208783174/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
  3. package/.nx/cache/{14995846848874973576 → 7821397806208783174}/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +450 -140
  4. package/.nx/cache/run.json +15 -15
  5. package/.nx/cache/terminalOutputs/16208231681037145050 +85 -0
  6. package/.nx/cache/terminalOutputs/{14995846848874973576 → 7821397806208783174} +2 -2
  7. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
  8. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
  9. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
  10. package/.nx/workspace-data/d/daemon.log +1317 -0
  11. package/.nx/workspace-data/d/server-process.json +2 -2
  12. package/.nx/workspace-data/file-map.json +3458 -3424
  13. package/.nx/workspace-data/nx_files.nxt +0 -0
  14. package/.nx/workspace-data/project-graph.json +2 -2
  15. package/apps/playground/src/app/pages/forms-page.ts +70 -14
  16. package/apps/playground/src/app/snippets/forms.snippets.ts +41 -6
  17. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +1000 -8
  18. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
  19. package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +201 -15
  20. package/libs/africanies-ui/src/index.ts +18 -0
  21. package/libs/africanies-ui/src/lib/forms/index.ts +20 -0
  22. package/libs/africanies-ui/src/lib/forms/phone-input/index.ts +21 -0
  23. package/libs/africanies-ui/src/lib/forms/phone-input/phone-codes.ts +264 -0
  24. package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.component.ts +477 -0
  25. package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.types.ts +35 -0
  26. package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.utils.spec.ts +81 -0
  27. package/libs/africanies-ui/src/lib/forms/phone-input/phone-input.utils.ts +275 -0
  28. package/libs/africanies-ui/src/lib/modules/africanies-forms.module.ts +2 -0
  29. package/libs/africanies-ui/src/lib/navigation/segment/segment.component.ts +2 -1
  30. package/package.json +1 -1
  31. package/.nx/cache/13466509747676776487/dist/libs/africanies-core/README.md +0 -85
  32. package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +0 -4634
  33. package/.nx/cache/13466509747676776487/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
  34. package/.nx/cache/13466509747676776487/dist/libs/africanies-core/package.json +0 -31
  35. package/.nx/cache/13466509747676776487/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +0 -2743
  36. package/.nx/cache/14416694322692463866/dist/libs/africanies-models/README.md +0 -60
  37. package/.nx/cache/14416694322692463866/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs +0 -599
  38. package/.nx/cache/14416694322692463866/dist/libs/africanies-models/fesm2022/africanies-africanies-models.mjs.map +0 -1
  39. package/.nx/cache/14416694322692463866/dist/libs/africanies-models/package.json +0 -23
  40. package/.nx/cache/14416694322692463866/dist/libs/africanies-models/types/africanies-africanies-models.d.ts +0 -1452
  41. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +0 -19375
  42. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
  43. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +0 -5490
  44. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/README.md +0 -68
  45. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  46. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  47. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -5
  48. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -7
  49. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +0 -1
  50. package/.nx/cache/14995846848874973576/dist/libs/africanies-ui/package.json +0 -35
  51. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/README.md +0 -46
  52. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +0 -221
  53. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
  54. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/package.json +0 -35
  55. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/tailwind-preset.cjs +0 -253
  56. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +0 -166
  57. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/README.md +0 -69
  58. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/assets/icons.sprite.svg +0 -1844
  59. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs +0 -832
  60. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/fesm2022/africanies-africanies-icons.mjs.map +0 -1
  61. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/package.json +0 -30
  62. package/.nx/cache/6664915487114632770/dist/libs/africanies-icons/types/africanies-africanies-icons.d.ts +0 -108
  63. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/README.md +0 -46
  64. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +0 -231
  65. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +0 -1
  66. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/package.json +0 -35
  67. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/tailwind-preset.cjs +0 -262
  68. package/.nx/cache/6673686859704879504/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +0 -174
  69. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/README.md +0 -85
  70. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +0 -4511
  71. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +0 -1
  72. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/package.json +0 -31
  73. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +0 -2741
  74. package/.nx/cache/terminalOutputs/13466509747676776487 +0 -21
  75. package/.nx/cache/terminalOutputs/13555699813138069787 +0 -6
  76. package/.nx/cache/terminalOutputs/14061940909886036014 +0 -173
  77. package/.nx/cache/terminalOutputs/14416694322692463866 +0 -108
  78. package/.nx/cache/terminalOutputs/1446890025183346611 +0 -32
  79. package/.nx/cache/terminalOutputs/14876618240301288353 +0 -21
  80. package/.nx/cache/terminalOutputs/17394769338046050914 +0 -8
  81. package/.nx/cache/terminalOutputs/17626862048742598274 +0 -21
  82. package/.nx/cache/terminalOutputs/6337357866566791975 +0 -6
  83. package/.nx/cache/terminalOutputs/6664915487114632770 +0 -44
  84. package/.nx/cache/terminalOutputs/6673686859704879504 +0 -21
  85. package/.nx/cache/terminalOutputs/783228502946611950 +0 -19
  86. package/.nx/cache/terminalOutputs/7978448102466861029 +0 -32
  87. package/.nx/cache/terminalOutputs/9040451482998546630 +0 -21
  88. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/README.md +0 -0
  89. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  90. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  91. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +0 -0
  92. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/assets/carriers/dhl.svg +0 -0
  93. /package/.nx/cache/{14876618240301288353 → 7821397806208783174}/dist/libs/africanies-ui/package.json +0 -0
@@ -176,6 +176,24 @@ export {
176
176
  NumberInputComponent,
177
177
  OtpInputComponent,
178
178
  type OtpInputVariant,
179
+ PHONE_DIAL_CODES,
180
+ PHONE_MAX_NATIONAL_DIGITS,
181
+ PHONE_MIN_NATIONAL_DIGITS,
182
+ type PhoneCountryOption,
183
+ PhoneInputComponent,
184
+ type PhoneNumberValue,
185
+ buildPhoneNumberValue,
186
+ dialCodeForIso2,
187
+ formatNationalDigits,
188
+ isPhoneNumberComplete,
189
+ matchDialCode,
190
+ normalizePhoneIso2,
191
+ parsePhoneControlValue,
192
+ phoneCountryName,
193
+ phoneCountryOptions,
194
+ phoneDigitsOnly,
195
+ phoneToE164,
196
+ removeDialCode,
179
197
  provideGooglePlaces,
180
198
  RadioComponent,
181
199
  type RadioOption,
@@ -26,6 +26,26 @@ export {
26
26
  } from './file-upload';
27
27
  export { NumberInputComponent } from './number-input';
28
28
  export { OtpInputComponent, type OtpInputVariant } from './otp-input';
29
+ export {
30
+ buildPhoneNumberValue,
31
+ dialCodeForIso2,
32
+ formatNationalDigits,
33
+ isPhoneNumberComplete,
34
+ matchDialCode,
35
+ normalizePhoneIso2,
36
+ parsePhoneControlValue,
37
+ PHONE_DIAL_CODES,
38
+ PHONE_MAX_NATIONAL_DIGITS,
39
+ PHONE_MIN_NATIONAL_DIGITS,
40
+ type PhoneCountryOption,
41
+ PhoneInputComponent,
42
+ type PhoneNumberValue,
43
+ phoneCountryName,
44
+ phoneCountryOptions,
45
+ phoneDigitsOnly,
46
+ phoneToE164,
47
+ removeDialCode,
48
+ } from './phone-input';
29
49
  export { RadioComponent, type RadioOption } from './radio';
30
50
  export {
31
51
  type SearchComboboxBadge,
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Phone input form control exports.
3
+ */
4
+ export { PHONE_DIAL_CODES, PHONE_MAX_NATIONAL_DIGITS, PHONE_MIN_NATIONAL_DIGITS } from './phone-codes';
5
+ export { PhoneInputComponent } from './phone-input.component';
6
+ export type { PhoneCountryOption, PhoneNumberValue } from './phone-input.types';
7
+ export {
8
+ buildPhoneNumberValue,
9
+ dialCodeForIso2,
10
+ filterPhoneCountries,
11
+ formatNationalDigits,
12
+ isPhoneNumberComplete,
13
+ matchDialCode,
14
+ normalizePhoneIso2,
15
+ parsePhoneControlValue,
16
+ phoneCountryName,
17
+ phoneCountryOptions,
18
+ phoneDigitsOnly,
19
+ phoneToE164,
20
+ removeDialCode,
21
+ } from './phone-input.utils';
@@ -0,0 +1,264 @@
1
+ /**
2
+ * ISO 3166-1 alpha-2 → dial code (with `+`).
3
+ *
4
+ * Shared with classic import-export phone fields; used when
5
+ * `libphonenumber-js` is not bundled as a peer.
6
+ */
7
+ export const PHONE_DIAL_CODES: Readonly<Record<string, string>> = {
8
+ AF: '+93',
9
+ AX: '+358',
10
+ AL: '+355',
11
+ DZ: '+213',
12
+ AS: '+1',
13
+ AD: '+376',
14
+ AO: '+244',
15
+ AI: '+1',
16
+ AQ: '+672',
17
+ AG: '+1',
18
+ AR: '+54',
19
+ AM: '+374',
20
+ AW: '+297',
21
+ AU: '+61',
22
+ AT: '+43',
23
+ AZ: '+994',
24
+ BS: '+1',
25
+ BH: '+973',
26
+ BD: '+880',
27
+ BB: '+1',
28
+ BY: '+375',
29
+ BE: '+32',
30
+ BZ: '+501',
31
+ BJ: '+229',
32
+ BM: '+1',
33
+ BT: '+975',
34
+ BO: '+591',
35
+ BQ: '+599',
36
+ BA: '+387',
37
+ BW: '+267',
38
+ BV: '+55',
39
+ BR: '+55',
40
+ IO: '+246',
41
+ BN: '+673',
42
+ BG: '+359',
43
+ BF: '+226',
44
+ BI: '+257',
45
+ KH: '+855',
46
+ CM: '+237',
47
+ CA: '+1',
48
+ CV: '+238',
49
+ KY: '+1',
50
+ CF: '+236',
51
+ TD: '+235',
52
+ CL: '+56',
53
+ CN: '+86',
54
+ CX: '+61',
55
+ CC: '+61',
56
+ CO: '+57',
57
+ KM: '+269',
58
+ CG: '+242',
59
+ CK: '+682',
60
+ CR: '+506',
61
+ HR: '+385',
62
+ CU: '+53',
63
+ CW: '+599',
64
+ CY: '+357',
65
+ CZ: '+420',
66
+ DK: '+45',
67
+ DJ: '+253',
68
+ DM: '+1',
69
+ DO: '+1',
70
+ CD: '+243',
71
+ EC: '+593',
72
+ EG: '+20',
73
+ SV: '+503',
74
+ GQ: '+240',
75
+ ER: '+291',
76
+ EE: '+370',
77
+ ET: '+251',
78
+ FK: '+500',
79
+ FO: '+298',
80
+ FJ: '+679',
81
+ FI: '+358',
82
+ FR: '+33',
83
+ GF: '+594',
84
+ PF: '+689',
85
+ TF: '+262',
86
+ GA: '+241',
87
+ GM: '+220',
88
+ GE: '+995',
89
+ DE: '+49',
90
+ GH: '+233',
91
+ GI: '+350',
92
+ GR: '+30',
93
+ GL: '+299',
94
+ GD: '+1',
95
+ GP: '+590',
96
+ GU: '+1',
97
+ GT: '+502',
98
+ GG: '+44',
99
+ GN: '+224',
100
+ GW: '+245',
101
+ GY: '+592',
102
+ HT: '+509',
103
+ HM: '+672',
104
+ HN: '+504',
105
+ HK: '+852',
106
+ HU: '+36',
107
+ IS: '+354',
108
+ IN: '+91',
109
+ ID: '+62',
110
+ IR: '+98',
111
+ IQ: '+964',
112
+ IE: '+353',
113
+ IM: '+44',
114
+ IL: '+972',
115
+ IT: '+39',
116
+ CI: '+225',
117
+ JM: '+1',
118
+ JP: '+81',
119
+ JE: '+44',
120
+ JO: '+962',
121
+ KZ: '+7',
122
+ KE: '+254',
123
+ KI: '+686',
124
+ XK: '+383',
125
+ KW: '+965',
126
+ KG: '+996',
127
+ LA: '+856',
128
+ LV: '+371',
129
+ LB: '+961',
130
+ LS: '+266',
131
+ LR: '+231',
132
+ LY: '+218',
133
+ LI: '+423',
134
+ LT: '+370',
135
+ LU: '+352',
136
+ MO: '+853',
137
+ MK: '+389',
138
+ MG: '+261',
139
+ MW: '+265',
140
+ MY: '+60',
141
+ MV: '+960',
142
+ ML: '+223',
143
+ MT: '+356',
144
+ MH: '+692',
145
+ MQ: '+596',
146
+ MR: '+222',
147
+ MU: '+230',
148
+ YT: '+262',
149
+ MX: '+52',
150
+ FM: '+691',
151
+ MD: '+373',
152
+ MC: '+377',
153
+ MN: '+976',
154
+ ME: '+382',
155
+ MS: '+1',
156
+ MA: '+212',
157
+ MZ: '+258',
158
+ MM: '+95',
159
+ NA: '+264',
160
+ NR: '+674',
161
+ NP: '+977',
162
+ NL: '+31',
163
+ AN: '+599',
164
+ NC: '+687',
165
+ NZ: '+64',
166
+ NI: '+505',
167
+ NE: '+227',
168
+ NG: '+234',
169
+ NU: '+683',
170
+ NF: '+672',
171
+ MP: '+1',
172
+ KP: '+850',
173
+ NO: '+47',
174
+ OM: '+968',
175
+ PK: '+92',
176
+ PW: '+680',
177
+ PS: '+970',
178
+ PA: '+507',
179
+ PG: '+675',
180
+ PY: '+595',
181
+ PE: '+51',
182
+ PH: '+63',
183
+ PN: '+64',
184
+ PL: '+48',
185
+ PT: '+351',
186
+ PR: '+1',
187
+ QA: '+974',
188
+ RO: '+40',
189
+ RU: '+7',
190
+ RW: '+250',
191
+ RE: '+262',
192
+ BL: '+590',
193
+ MF: '+590',
194
+ SH: '+290',
195
+ KN: '+1',
196
+ LC: '+1',
197
+ PM: '+508',
198
+ VC: '+1',
199
+ WS: '+685',
200
+ SM: '+378',
201
+ ST: '+239',
202
+ SA: '+966',
203
+ SN: '+221',
204
+ RS: '+381',
205
+ SC: '+248',
206
+ SL: '+232',
207
+ SG: '+65',
208
+ SX: '+1',
209
+ SK: '+421',
210
+ SI: '+386',
211
+ SB: '+677',
212
+ SO: '+252',
213
+ ZA: '+27',
214
+ GS: '+500',
215
+ KR: '+82',
216
+ SS: '+211',
217
+ ES: '+34',
218
+ LK: '+94',
219
+ SD: '+249',
220
+ SR: '+597',
221
+ SJ: '+47',
222
+ SZ: '+268',
223
+ SE: '+46',
224
+ CH: '+41',
225
+ SY: '+963',
226
+ TW: '+886',
227
+ TJ: '+992',
228
+ TZ: '+255',
229
+ TH: '+66',
230
+ TL: '+670',
231
+ TG: '+228',
232
+ TK: '+690',
233
+ TO: '+676',
234
+ TT: '+1',
235
+ TN: '+216',
236
+ TR: '+90',
237
+ TM: '+993',
238
+ TC: '+1',
239
+ TV: '+688',
240
+ UG: '+256',
241
+ UA: '+380',
242
+ AE: '+971',
243
+ GB: '+44',
244
+ US: '+1',
245
+ UY: '+598',
246
+ UZ: '+998',
247
+ VU: '+678',
248
+ VA: '+379',
249
+ VE: '+58',
250
+ VN: '+84',
251
+ VG: '+1',
252
+ VI: '+1',
253
+ WF: '+681',
254
+ EH: '+212',
255
+ YE: '+967',
256
+ ZM: '+260',
257
+ ZW: '+263',
258
+ };
259
+
260
+ /** Max national digit count (ITU E.164 national significant number). */
261
+ export const PHONE_MAX_NATIONAL_DIGITS = 15;
262
+
263
+ /** Minimum national digits before we treat a draft as a complete number. */
264
+ export const PHONE_MIN_NATIONAL_DIGITS = 4;