@naniteninja/dashboard-components-lib 2.4.0 → 2.4.2

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.
@@ -8605,6 +8605,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImpo
8605
8605
  }]
8606
8606
  }] });
8607
8607
 
8608
+ /** "the date", "the time and the date" — the missing parts as a readable list. */
8609
+ function joinParts(parts) {
8610
+ const labels = parts.map((p) => (p === 'time' ? 'the time' : 'the date'));
8611
+ if (labels.length <= 1)
8612
+ return labels[0] ?? 'the details';
8613
+ return `${labels.slice(0, -1).join(', ')} and ${labels[labels.length - 1]}`;
8614
+ }
8615
+ /**
8616
+ * What to show the matcher while a prospect-suggested *time* is still incomplete.
8617
+ *
8618
+ * A meetup needs a clock time and a calendar date. Naming the missing piece tells the matcher
8619
+ * exactly what to ask for, the same way the location count does — "ask for the date" is
8620
+ * actionable in a way "that time was incomplete" is not. The weekday is never listed: it is
8621
+ * derived from the date, so asking for it separately would be a pointless extra round trip.
8622
+ */
8623
+ function buildIncompleteTimeText(s) {
8624
+ const missing = s.timeMissingParts?.length ? s.timeMissingParts : [];
8625
+ const known = [];
8626
+ if (s.time && !missing.includes('time'))
8627
+ known.push(s.time);
8628
+ if (s.date && !missing.includes('date'))
8629
+ known.push(s.date);
8630
+ if (!missing.length) {
8631
+ return 'Prospect suggested a time. Please ask them to confirm the exact day and date.';
8632
+ }
8633
+ const ask = `Please ask the prospect for ${joinParts(missing)}.`;
8634
+ return known.length
8635
+ ? `Prospect suggested ${known.join(', ')} but did not give ${joinParts(missing)}. ${ask}`
8636
+ : `Prospect suggested a meetup time without ${joinParts(missing)}. ${ask}`;
8637
+ }
8638
+ /**
8639
+ * What to show the matcher while a prospect-suggested location is still unresolved.
8640
+ *
8641
+ * Three cases, most specific first:
8642
+ * - the follow-up address matched nothing — say so, and ask again
8643
+ * - we know how many places share the name — give the count, since "there are 5" tells the
8644
+ * matcher exactly what to ask for in a way "that was ambiguous" does not
8645
+ * - we only know it was ambiguous — fall back to the reason, then to generic wording
8646
+ */
8647
+ function buildAmbiguousLocationText(s) {
8648
+ const place = s.candidateQuery?.trim() || s.location?.trim() || 'that location';
8649
+ if (s.addressNotFound) {
8650
+ const attempted = s.lastUnmatchedAddress?.trim();
8651
+ return attempted
8652
+ ? `Could not find "${attempted}". Please ask the prospect for the exact ${place} address.`
8653
+ : `Could not find this address. Please ask the prospect to be more specific.`;
8654
+ }
8655
+ const count = s.candidateCount;
8656
+ if (typeof count === 'number' && count > 1) {
8657
+ return `There are ${count} ${place} locations in that area. Please ask the prospect to specify which one.`;
8658
+ }
8659
+ return s.ambiguousReason || 'Prospect suggested an ambiguous location. Please ask them to be specific.';
8660
+ }
8608
8661
  const FIVE_MINUTES_MS = 5 * 60 * 1000;
8609
8662
  function formatShortDate(day) {
8610
8663
  if (/^\d{4}-\d{2}-\d{2}$/.test(day)) {
@@ -8643,7 +8696,9 @@ function buildSplitSuggestionText(s) {
8643
8696
  const locStatus = s.locationStatus;
8644
8697
  const timeStatus = s.timeStatus;
8645
8698
  const loc = s.location?.trim() || '';
8646
- const timeParts = [s.time, s.date].filter((v) => v && v !== 'unknown').join(' ');
8699
+ // Weekday included so the matcher reads back the same "2:00 PM, Tuesday, 2026-07-13" the
8700
+ // client was shown, rather than a time and date with the day silently dropped.
8701
+ const timeParts = [s.time, s.day, s.date].filter((v) => v && v !== 'unknown').join(', ');
8647
8702
  if (loc) {
8648
8703
  if (locStatus === 'auto_accepted' || locStatus === 'accepted') {
8649
8704
  lines.push(`Client has ACCEPTED ${loc}`);
@@ -8742,7 +8797,26 @@ class MatcherStatusesStateService {
8742
8797
  this.isExhausted = false;
8743
8798
  this.activeLocationText = '';
8744
8799
  this.activeTimeText = '';
8745
- this.activePriorityText = s.ambiguousReason || 'Prospect suggested an ambiguous location. Please ask them to be specific.';
8800
+ this.activePriorityText = buildAmbiguousLocationText(s);
8801
+ this.remainingPriorities = [];
8802
+ this.emitGrouped(remainingPrioritiesChange, meetupIndicator);
8803
+ cdr.detectChanges();
8804
+ return;
8805
+ }
8806
+ // An incomplete time is the timing counterpart of an ambiguous location: nothing has
8807
+ // reached the client, and the matcher needs to be told which part to chase. Checked
8808
+ // before the accepted/rejected wording below, which would otherwise report the settled
8809
+ // location and say nothing about the time still being unusable.
8810
+ if (s.timeIncomplete) {
8811
+ if (this.rejectionTimerId) {
8812
+ clearTimeout(this.rejectionTimerId);
8813
+ this.rejectionTimerId = null;
8814
+ }
8815
+ this.isStatusMessage = true;
8816
+ this.isExhausted = false;
8817
+ this.activeLocationText = '';
8818
+ this.activeTimeText = '';
8819
+ this.activePriorityText = buildIncompleteTimeText(s);
8746
8820
  this.remainingPriorities = [];
8747
8821
  this.emitGrouped(remainingPrioritiesChange, meetupIndicator);
8748
8822
  cdr.detectChanges();
@@ -14932,7 +15006,7 @@ const allClients = [
14932
15006
  {
14933
15007
  _id: 'clt_001',
14934
15008
  name: 'Sophia Martinez',
14935
- src: 'https://i.pravatar.cc/150?img=44',
15009
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person44',
14936
15010
  interests: ['Photography', 'Yoga', 'Traveling', 'Cooking', 'Music', 'Art'],
14937
15011
  age: 28,
14938
15012
  location: 'New York, NY',
@@ -14940,7 +15014,7 @@ const allClients = [
14940
15014
  {
14941
15015
  _id: 'clt_002',
14942
15016
  name: 'James Okafor',
14943
- src: 'https://i.pravatar.cc/150?img=2',
15017
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person2',
14944
15018
  interests: ['Fitness', 'Music', 'Swimming', 'Entrepreneurship', 'Reading', 'Coffee'],
14945
15019
  age: 31,
14946
15020
  location: 'Lagos, Nigeria',
@@ -14948,7 +15022,7 @@ const allClients = [
14948
15022
  {
14949
15023
  _id: 'clt_003',
14950
15024
  name: 'Emma Thompson',
14951
- src: 'https://i.pravatar.cc/150?img=3',
15025
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person3',
14952
15026
  interests: ['Literature', 'History', 'Cooking', 'Dancing', 'Fashion', 'Wine'],
14953
15027
  age: 26,
14954
15028
  location: 'London, UK',
@@ -14956,7 +15030,7 @@ const allClients = [
14956
15030
  {
14957
15031
  _id: 'clt_004',
14958
15032
  name: 'Lucas Kim',
14959
- src: 'https://i.pravatar.cc/150?img=4',
15033
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person4',
14960
15034
  interests: ['Gaming', 'Technology', 'AI/ML', 'Hiking', 'Photography', 'Startups'],
14961
15035
  age: 33,
14962
15036
  location: 'Seoul, South Korea',
@@ -14964,7 +15038,7 @@ const allClients = [
14964
15038
  {
14965
15039
  _id: 'clt_005',
14966
15040
  name: 'Aisha Patel',
14967
- src: 'https://i.pravatar.cc/150?img=5',
15041
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person5',
14968
15042
  interests: ['Yoga', 'Meditation', 'Cooking', 'Volunteering', 'Music', 'Reading'],
14969
15043
  age: 29,
14970
15044
  location: 'Mumbai, India',
@@ -14972,7 +15046,7 @@ const allClients = [
14972
15046
  {
14973
15047
  _id: 'clt_006',
14974
15048
  name: 'Noah Williams',
14975
- src: 'https://i.pravatar.cc/150?img=6',
15049
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person6',
14976
15050
  interests: ['Sports', 'Investing', 'Movies', 'Coffee', 'Fitness', 'Traveling'],
14977
15051
  age: 35,
14978
15052
  location: 'Chicago, IL',
@@ -14980,7 +15054,7 @@ const allClients = [
14980
15054
  {
14981
15055
  _id: 'clt_007',
14982
15056
  name: 'Olivia Garcia',
14983
- src: 'https://i.pravatar.cc/150?img=7',
15057
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person7',
14984
15058
  interests: ['Art', 'Dancing', 'Cooking', 'Traveling', 'Design', 'Photography'],
14985
15059
  age: 27,
14986
15060
  location: 'Mexico City, Mexico',
@@ -14988,7 +15062,7 @@ const allClients = [
14988
15062
  {
14989
15063
  _id: 'clt_008',
14990
15064
  name: 'Ethan Brown',
14991
- src: 'https://i.pravatar.cc/150?img=8',
15065
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person8',
14992
15066
  interests: ['Science', 'Reading', 'Hiking', 'Programming', 'Philosophy', 'Astronomy'],
14993
15067
  age: 30,
14994
15068
  location: 'Boston, MA',
@@ -14996,7 +15070,7 @@ const allClients = [
14996
15070
  {
14997
15071
  _id: 'clt_009',
14998
15072
  name: 'Mia Rossi',
14999
- src: 'https://i.pravatar.cc/150?img=9',
15073
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person9',
15000
15074
  interests: ['Fashion', 'Art', 'Photography', 'Cooking', 'Wine', 'Traveling'],
15001
15075
  age: 25,
15002
15076
  location: 'Milan, Italy',
@@ -15004,7 +15078,7 @@ const allClients = [
15004
15078
  {
15005
15079
  _id: 'clt_010',
15006
15080
  name: 'Caleb Nakamura',
15007
- src: 'https://i.pravatar.cc/150?img=10',
15081
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person10',
15008
15082
  interests: ['Technology', 'Gaming', 'Robotics', 'Astronomy', 'Fitness', 'AI/ML'],
15009
15083
  age: 34,
15010
15084
  location: 'Tokyo, Japan',
@@ -15012,7 +15086,7 @@ const allClients = [
15012
15086
  {
15013
15087
  _id: 'clt_011',
15014
15088
  name: 'Zara Williams',
15015
- src: 'https://i.pravatar.cc/150?img=16',
15089
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person16',
15016
15090
  interests: ['Music', 'Dancing', 'Fashion', 'Traveling', 'Reading', 'Yoga'],
15017
15091
  age: 27,
15018
15092
  location: 'London, UK',
@@ -15020,7 +15094,7 @@ const allClients = [
15020
15094
  {
15021
15095
  _id: 'clt_012',
15022
15096
  name: 'Mateo Rodriguez',
15023
- src: 'https://i.pravatar.cc/150?img=17',
15097
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person17',
15024
15098
  interests: ['Cooking', 'Wine', 'Traveling', 'Dancing', 'Photography', 'Architecture'],
15025
15099
  age: 32,
15026
15100
  location: 'Barcelona, Spain',
@@ -15028,7 +15102,7 @@ const allClients = [
15028
15102
  {
15029
15103
  _id: 'clt_013',
15030
15104
  name: 'Priya Sharma',
15031
- src: 'https://i.pravatar.cc/150?img=18',
15105
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person18',
15032
15106
  interests: ['Classical Music', 'Dancing', 'Cooking', 'Yoga', 'Reading', 'Art'],
15033
15107
  age: 29,
15034
15108
  location: 'Delhi, India',
@@ -15036,7 +15110,7 @@ const allClients = [
15036
15110
  {
15037
15111
  _id: 'clt_014',
15038
15112
  name: 'Felix Andersen',
15039
- src: 'https://i.pravatar.cc/150?img=19',
15113
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person19',
15040
15114
  interests: ['Hiking', 'Biking', 'Camping', 'Sustainability', 'Coffee', 'Design'],
15041
15115
  age: 31,
15042
15116
  location: 'Copenhagen, Denmark',
@@ -15044,7 +15118,7 @@ const allClients = [
15044
15118
  {
15045
15119
  _id: 'clt_015',
15046
15120
  name: 'Amara Osei',
15047
- src: 'https://i.pravatar.cc/150?img=20',
15121
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person20',
15048
15122
  interests: ['Fashion', 'Music', 'Dancing', 'Entrepreneurship', 'Art', 'Public Speaking'],
15049
15123
  age: 26,
15050
15124
  location: 'Accra, Ghana',
@@ -15052,7 +15126,7 @@ const allClients = [
15052
15126
  {
15053
15127
  _id: 'clt_016',
15054
15128
  name: 'Leo Moreau',
15055
- src: 'https://i.pravatar.cc/150?img=21',
15129
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person21',
15056
15130
  interests: ['Photography', 'Wine', 'Cooking', 'Art', 'Literature', 'Traveling'],
15057
15131
  age: 34,
15058
15132
  location: 'Paris, France',
@@ -15060,7 +15134,7 @@ const allClients = [
15060
15134
  {
15061
15135
  _id: 'clt_017',
15062
15136
  name: 'Hannah Mueller',
15063
- src: 'https://i.pravatar.cc/150?img=22',
15137
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person22',
15064
15138
  interests: ['Fitness', 'Hiking', 'Biking', 'Reading', 'Philosophy', 'Gardening'],
15065
15139
  age: 28,
15066
15140
  location: 'Berlin, Germany',
@@ -15068,7 +15142,7 @@ const allClients = [
15068
15142
  {
15069
15143
  _id: 'clt_018',
15070
15144
  name: 'Kenji Watanabe',
15071
- src: 'https://i.pravatar.cc/150?img=23',
15145
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person23',
15072
15146
  interests: ['Technology', 'Gaming', 'Robotics', 'Photography', 'Coffee', 'Design'],
15073
15147
  age: 36,
15074
15148
  location: 'Kyoto, Japan',
@@ -15076,7 +15150,7 @@ const allClients = [
15076
15150
  {
15077
15151
  _id: 'clt_019',
15078
15152
  name: 'Elena Petrova',
15079
- src: 'https://i.pravatar.cc/150?img=24',
15153
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person24',
15080
15154
  interests: ['Ballet', 'Art', 'Literature', 'History', 'Fashion', 'Photography'],
15081
15155
  age: 27,
15082
15156
  location: 'Moscow, Russia',
@@ -15084,7 +15158,7 @@ const allClients = [
15084
15158
  {
15085
15159
  _id: 'clt_020',
15086
15160
  name: 'Amir Hassan',
15087
- src: 'https://i.pravatar.cc/150?img=25',
15161
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person25',
15088
15162
  interests: ['Chess', 'History', 'Philosophy', 'Reading', 'Swimming', 'Coffee'],
15089
15163
  age: 30,
15090
15164
  location: 'Cairo, Egypt',
@@ -15092,7 +15166,7 @@ const allClients = [
15092
15166
  {
15093
15167
  _id: 'clt_021',
15094
15168
  name: 'Chloe Bennett',
15095
- src: 'https://i.pravatar.cc/150?img=26',
15169
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person26',
15096
15170
  interests: ['Horseback Riding', 'Nature', 'Photography', 'Reading', 'Yoga', 'Sustainability'],
15097
15171
  age: 25,
15098
15172
  location: 'Dublin, Ireland',
@@ -15100,7 +15174,7 @@ const allClients = [
15100
15174
  {
15101
15175
  _id: 'clt_022',
15102
15176
  name: 'Diego Costa',
15103
- src: 'https://i.pravatar.cc/150?img=27',
15177
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person27',
15104
15178
  interests: ['Soccer', 'Music', 'Dancing', 'Fitness', 'Surfing', 'Cooking'],
15105
15179
  age: 33,
15106
15180
  location: 'São Paulo, Brazil',
@@ -15108,7 +15182,7 @@ const allClients = [
15108
15182
  {
15109
15183
  _id: 'clt_023',
15110
15184
  name: 'Meilin Huang',
15111
- src: 'https://i.pravatar.cc/150?img=28',
15185
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person28',
15112
15186
  interests: ['Calligraphy', 'Tea', 'Art', 'Meditation', 'Gardening', 'Literature'],
15113
15187
  age: 29,
15114
15188
  location: 'Shanghai, China',
@@ -15116,7 +15190,7 @@ const allClients = [
15116
15190
  {
15117
15191
  _id: 'clt_024',
15118
15192
  name: 'Oliver Berg',
15119
- src: 'https://i.pravatar.cc/150?img=29',
15193
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person29',
15120
15194
  interests: ['Skiing', 'Snowboarding', 'Fitness', 'Hiking', 'Gaming', 'Technology'],
15121
15195
  age: 35,
15122
15196
  location: 'Stockholm, Sweden',
@@ -15124,7 +15198,7 @@ const allClients = [
15124
15198
  {
15125
15199
  _id: 'clt_025',
15126
15200
  name: 'Fatima Al-Rashid',
15127
- src: 'https://i.pravatar.cc/150?img=30',
15201
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person30',
15128
15202
  interests: ['Architecture', 'History', 'Calligraphy', 'Coffee', 'Reading', 'Traveling'],
15129
15203
  age: 31,
15130
15204
  location: 'Dubai, UAE',
@@ -15138,7 +15212,7 @@ const allMatchers = [
15138
15212
  {
15139
15213
  _id: 'mtch_001',
15140
15214
  name: 'Isabella Russo',
15141
- src: 'https://i.pravatar.cc/150?img=11',
15215
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person11',
15142
15216
  interests: ['Psychology', 'Public Speaking', 'History', 'Art', 'Philosophy', 'Yoga'],
15143
15217
  age: 38,
15144
15218
  location: 'Rome, Italy',
@@ -15146,7 +15220,7 @@ const allMatchers = [
15146
15220
  {
15147
15221
  _id: 'mtch_002',
15148
15222
  name: 'David Chen',
15149
- src: 'https://i.pravatar.cc/150?img=12',
15223
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person12',
15150
15224
  interests: ['Investing', 'Entrepreneurship', 'Technology', 'Golf', 'Traveling', 'Wine'],
15151
15225
  age: 42,
15152
15226
  location: 'Singapore',
@@ -15154,7 +15228,7 @@ const allMatchers = [
15154
15228
  {
15155
15229
  _id: 'mtch_003',
15156
15230
  name: 'Rachel Green',
15157
- src: 'https://i.pravatar.cc/150?img=13',
15231
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person13',
15158
15232
  interests: ['Yoga', 'Wellness', 'Reading', 'Cooking', 'Gardening', 'Fashion'],
15159
15233
  age: 36,
15160
15234
  location: 'Melbourne, Australia',
@@ -15162,7 +15236,7 @@ const allMatchers = [
15162
15236
  {
15163
15237
  _id: 'mtch_004',
15164
15238
  name: 'Marcus Johnson',
15165
- src: 'https://i.pravatar.cc/150?img=14',
15239
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person14',
15166
15240
  interests: ['Sports', 'Fitness', 'Music', 'Volunteering', 'Public Speaking', 'Coaching'],
15167
15241
  age: 45,
15168
15242
  location: 'Atlanta, GA',
@@ -15170,7 +15244,7 @@ const allMatchers = [
15170
15244
  {
15171
15245
  _id: 'mtch_005',
15172
15246
  name: 'Yuki Tanaka',
15173
- src: 'https://i.pravatar.cc/150?img=15',
15247
+ src: 'https://api.dicebear.com/7.x/avataaars/svg?seed=person15',
15174
15248
  interests: ['Design', 'Architecture', 'Sustainability', 'Photography', 'Gardening', 'Art'],
15175
15249
  age: 40,
15176
15250
  location: 'Osaka, Japan',