Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.3.0 #289

Merged
merged 28 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fbf1059
feat: blip blue messenger adjusts
Dec 2, 2024
182365f
feat: create ds navigation service
Dec 3, 2024
a285281
feat: blue messenger fixes
Dec 13, 2024
7bc47ed
feat: add new cards on reply content view
Dec 16, 2024
41a5d17
chore: package upgrade
Dec 16, 2024
4443955
feat: adding suport to scroll to msg when tap in reply
Dec 18, 2024
ed40861
feat: add reply preview
Dec 19, 2024
70c8b98
feat: scroll to previous item
Dec 20, 2024
2a5ebf4
refactor: improve code readability
Dec 20, 2024
e4d46e4
refactor: improve code readability
Dec 20, 2024
c56add6
Merge pull request #287 from takenet/feature/778304-reply-scroll
mpamaro Dec 20, 2024
c043254
fix: reply uploading image fix
Dec 20, 2024
cbc48df
chore: update workflow flutter version
Dec 20, 2024
6b70bee
Merge remote-tracking branch 'origin/develop' into feature/999999-blu…
Dec 23, 2024
2c04637
fix: reply message id
Dec 23, 2024
040d109
fix: reply fixes
Dec 23, 2024
9508481
fix: add unique message id to group card
Dec 24, 2024
9a08005
fix: bubble keep state
Dec 24, 2024
49f87a3
refactor: improve code readability
Dec 26, 2024
eaa4c11
fix: fix elevation
Dec 26, 2024
62b0be0
fix: fix assets directory
Dec 26, 2024
92cc333
feat: enable/disabled reply according to onReply callback
Jan 2, 2025
2bc360f
fix: flutter analyse fixes
Jan 2, 2025
5665033
fix: flutter analyse fixes
Jan 2, 2025
4856d41
refactor: add missing comma
Jan 2, 2025
e309b75
test: update golden tests
Jan 2, 2025
80566bb
Merge pull request #288 from takenet/feature/999999-blue-messenger
leonardogbr Jan 2, 2025
001ec2d
chore: new build version
Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutter": "stable",
"flavors": {}
}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
flutter-version: '3.27.1'
channel: 'stable'
- name: Install dependencies
run: flutter pub get
Expand All @@ -96,7 +96,7 @@ jobs:
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
flutter-version: '3.27.1'
channel: 'stable'
- name: Check Publish Warnings
run: dart pub publish --dry-run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.13.9"
flutter-version: "3.27.1"
channel: "stable"
- name: Install dependencies
run: flutter pub get
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0

- Add support to new Flutter version (3.27.1)

## 0.2.6

- [DSVideoMessageBubble] Fix when thumbnail is unavailable.
Expand Down
6 changes: 6 additions & 0 deletions assets/svg/avatar-default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion lib/blip_ds.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
library blip_ds;
library;

export 'package:scroll_to_index/scroll_to_index.dart' show AutoScrollController;

export 'src/enums/ds_align.enum.dart' show DSAlign;
export 'src/enums/ds_border_radius.enum.dart' show DSBorderRadius;
Expand Down Expand Up @@ -58,6 +60,7 @@ export 'src/models/interactive_message/ds_interactive_message_video.model.dart'
show DSInteractiveMessageVideo;
export 'src/services/ds_auth.service.dart' show DSAuthService;
export 'src/services/ds_bottom_sheet.service.dart' show DSBottomSheetService;
export 'src/services/ds_context.service.dart' show DSContextService;
export 'src/services/ds_dialog.service.dart' show DSDialogService;
export 'src/services/ds_file.service.dart' show DSFileService;
export 'src/services/ds_localization.service.dart' show DSLocalizationService;
Expand All @@ -67,6 +70,7 @@ export 'src/services/ds_toast.service.dart' show DSToastService;
export 'src/themes/colors/ds_colors.theme.dart' show DSColors;
export 'src/themes/colors/ds_dark_colors.theme.dart' show DSDarkColors;
export 'src/themes/colors/ds_linear_gradient.theme.dart' show DSLinearGradient;
export 'src/themes/enums/ds_theme_type.enum.dart' show DSThemeType;
export 'src/themes/icons/ds_icons.dart' show DSIcons;
export 'src/themes/system_overlay/ds_system_overlay.style.dart'
show DSSystemOverlayStyle;
Expand All @@ -89,6 +93,7 @@ export 'src/themes/texts/styles/ds_headline_large_text_style.theme.dart'
show DSHeadlineLargeTextStyle;
export 'src/themes/texts/styles/ds_headline_small_text_style.theme.dart'
show DSHeadlineSmallTextStyle;
export 'src/themes/texts/styles/ds_text_style.theme.dart' show DSTextStyle;
export 'src/themes/texts/utils/ds_font_families.theme.dart' show DSFontFamilies;
export 'src/themes/texts/utils/ds_font_weights.theme.dart' show DSFontWeights;
export 'src/utils/ds_animate.util.dart' show DSAnimate;
Expand Down Expand Up @@ -133,6 +138,8 @@ export 'src/widgets/chat/audio/ds_audio_message_bubble.widget.dart'
export 'src/widgets/chat/audio/ds_audio_player.widget.dart' show DSAudioPlayer;
export 'src/widgets/chat/calls/ds_end_calls_message_bubble.widget.dart'
show DSEndCallsMessageBubble;
export 'src/widgets/chat/ds_active_campaign_message_bubble.widget.dart'
show DSActiveCampaignMessageBubble;
export 'src/widgets/chat/ds_application_json_message_bubble.widget.dart'
show DSApplicationJsonMessageBubble;
export 'src/widgets/chat/ds_carrousel.widget.dart' show DSCarrousel;
Expand Down Expand Up @@ -217,3 +224,5 @@ export 'src/widgets/utils/ds_group_card.widget.dart' show DSGroupCard;
export 'src/widgets/utils/ds_header.widget.dart' show DSHeader;
export 'src/widgets/utils/ds_progress_bar.widget.dart' show DSProgressBar;
export 'src/widgets/utils/ds_user_avatar.widget.dart' show DSUserAvatar;
export 'src/widgets/utils/reply_content/ds_reply_preview.widget.dart'
show DSReplyPreview;
3 changes: 2 additions & 1 deletion lib/src/controllers/ds_video_player.controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:get/get.dart';
import 'package:video_player/video_player.dart';

import '../services/ds_auth.service.dart';
import '../services/ds_navigation.service.dart';
import '../themes/colors/ds_colors.theme.dart';
import '../widgets/chat/video/ds_video_error.dialog.dart';

Expand Down Expand Up @@ -66,7 +67,7 @@ class DSVideoPlayerController extends GetxController {
}

Future<void> _showErrorDialog() async {
Get.back();
NavigationService.pop();
Get.delete<DSVideoPlayerController>();

await DSVideoErrorDialog.show(
Expand Down
1 change: 1 addition & 0 deletions lib/src/enums/ds_delivery_report_status.enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ enum DSDeliveryReportStatus {
consumed,
failed,
sending,
dispatched,
unknown,
}
33 changes: 33 additions & 0 deletions lib/src/models/ds_active_message.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import 'ds_active_message_template.model.dart';
import 'ds_active_message_template_content.model.dart';

class DSActiveMessage {
DSActiveMessage({
required this.type,
this.template,
this.templateContent,
});

final String type;
final DSActiveMessageTemplate? template;
final DSActiveMessageTemplateContent? templateContent;

factory DSActiveMessage.fromJson(Map<String, dynamic> json) {
return DSActiveMessage(
type: json['type'],
template: json['template'] != null
? DSActiveMessageTemplate.fromJson(json['template'])
: null,
templateContent:
DSActiveMessageTemplateContent.fromJson(json['templateContent']),
);
}

Map<String, dynamic> toJson() {
return {
'type': type,
'template': template,
'templateContent': templateContent,
};
}
}
31 changes: 31 additions & 0 deletions lib/src/models/ds_active_message_template.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class DSActiveMessageTemplate {
const DSActiveMessageTemplate({
this.name,
this.language,
this.components,
});

final String? name;
final Map<String, dynamic>? language;
final List<Map<String, dynamic>>? components;

factory DSActiveMessageTemplate.fromJson(Map<String, dynamic> json) {
return DSActiveMessageTemplate(
name: json['name'],
language: (json['language'] as Map<String, dynamic>?)?.map(
(key, value) => MapEntry(key, value),
),
components: (json['components'] as List<dynamic>?)
?.map((e) => e as Map<String, dynamic>)
.toList(),
);
}

Map<String, dynamic> toJson() {
return {
'name': name,
'language': language,
'components': components,
};
}
}
29 changes: 29 additions & 0 deletions lib/src/models/ds_active_message_template_content.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class DSActiveMessageTemplateContent {
const DSActiveMessageTemplateContent({
this.name,
this.language,
this.components,
});

final String? name;
final String? language;
final List<Map<String, dynamic>>? components;

factory DSActiveMessageTemplateContent.fromJson(Map<String, dynamic> json) {
return DSActiveMessageTemplateContent(
name: json['name'],
language: json['language'],
components: (json['components'] as List<dynamic>?)
?.map((e) => e as Map<String, dynamic>)
.toList(),
);
}

Map<String, dynamic> toJson() {
return {
'name': name,
'language': language,
'components': components,
};
}
}
31 changes: 31 additions & 0 deletions lib/src/models/ds_location.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import '../extensions/ds_localization.extension.dart';

class DSLocation {
DSLocation({
required this.text,
this.latitude,
this.longitude,
});

final double? latitude;
final double? longitude;
final String text;

factory DSLocation.fromJson(Map<String, dynamic> json) {
return DSLocation(
latitude: double.tryParse(json['latitude']?.toString() ?? ''),
longitude: double.tryParse(json['longitude']?.toString() ?? ''),
text: (json['text']?.isNotEmpty ?? false)
? json['text']
: 'location.text'.translate(),
);
}

Map<String, dynamic> toJson() {
return {
'latitude': latitude,
'longitude': longitude,
'text': text,
};
}
}
5 changes: 4 additions & 1 deletion lib/src/models/ds_media_link.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class DSMediaLink {
String? aspectRatio;
int? size;
String? authorizationRealm;
String? previewUri;

DSMediaLink({
required this.uri,
Expand All @@ -15,6 +16,7 @@ class DSMediaLink {
this.aspectRatio,
this.size,
this.authorizationRealm,
this.previewUri,
});

DSMediaLink.fromJson(Map<String, dynamic> json)
Expand All @@ -24,5 +26,6 @@ class DSMediaLink {
text = json['text'],
aspectRatio = json['aspectRatio'],
size = json['size'],
authorizationRealm = json['authorizationRealm'];
authorizationRealm = json['authorizationRealm'],
previewUri = json['previewUri'];
}
19 changes: 19 additions & 0 deletions lib/src/models/ds_media_reply_content_props.model.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:flutter/widgets.dart';

class DSMediaReplyContentProps {
String mediaTextTranslateKey;
IconData mediaIcon;
Widget trailing;
double size;
String title;
Widget? subtitle;

DSMediaReplyContentProps({
required this.mediaTextTranslateKey,
required this.mediaIcon,
this.title = '',
this.trailing = const SizedBox.shrink(),
this.size = 0.0,
this.subtitle,
});
}
8 changes: 8 additions & 0 deletions lib/src/models/ds_message_item.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class DSMessageItem {
/// if the media message is uploading
bool isUploading;

/// Message metadata
Map<String, dynamic>? metadata;

/// Creates a new Design System's [DSMessageItemModel] model
DSMessageItem({
this.id,
Expand All @@ -45,6 +48,7 @@ class DSMessageItem {
this.customer,
this.hideMessageDetail,
this.isUploading = false,
this.metadata,
});

factory DSMessageItem.fromJson(Map<String, dynamic> json) {
Expand All @@ -68,6 +72,10 @@ class DSMessageItem {
messageItem.hideMessageDetail = json['hideMessageDetail'];
}

if (json.containsKey('metadata')) {
messageItem.metadata = json['metadata'];
}

return messageItem;
}
}
7 changes: 7 additions & 0 deletions lib/src/models/ds_reply_content.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ class DSReplyContent {
inReplyTo = DSReplyContentInReplyTo.fromJson(
json['inReplyTo'],
);

Map<String, dynamic> toJson() {
return {
'replied': replied.toJson(),
'inReplyTo': inReplyTo.toJson(),
};
}
}
34 changes: 28 additions & 6 deletions lib/src/models/ds_reply_content_in_reply_to.model.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class DSReplyContentInReplyTo {
String id;
String type;
String? id;
String? type;
dynamic value;
String direction;
String? direction;

DSReplyContentInReplyTo({
required this.id,
Expand All @@ -13,7 +13,29 @@ class DSReplyContentInReplyTo {

DSReplyContentInReplyTo.fromJson(Map<String, dynamic> json)
: id = json['id'],
type = json['type'],
value = json['value'],
direction = json['direction'];
type = json['type'] ?? '',
value = json['value'] ?? '',
direction = json['direction'] ?? '';

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};

if (id != null) {
data['id'] = id;
}

if (type != null) {
data['type'] = type;
}

if (value != null) {
data['value'] = value;
}

if (direction != null) {
data['direction'] = direction;
}

return data;
}
}
14 changes: 14 additions & 0 deletions lib/src/models/ds_reply_content_replied.model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,18 @@ class DSReplyContentReplied {
DSReplyContentReplied.fromJson(Map<String, dynamic> json)
: type = json['type'],
value = json['value'];

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = {};

if (type.isNotEmpty) {
data['type'] = type;
}

if (value != null) {
data['value'] = value;
}

return data;
}
}
Loading