Skip to content

Commit

Permalink
Merge branch 'main' into enable-modules-with-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sharjeelyunus authored Dec 2, 2024
2 parents efe377e + 6477300 commit 1936dfd
Show file tree
Hide file tree
Showing 49 changed files with 420 additions and 1,074 deletions.
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,52 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-11-28

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`ensemble` - `v1.1.7`](#ensemble---v117)
- [`ensemble_chat` - `v0.0.1+1`](#ensemble_chat---v0011)
- [`ensemble_camera` - `v0.0.1+1`](#ensemble_camera---v0011)
- [`ensemble_auth` - `v1.0.1`](#ensemble_auth---v101)
- [`ensemble_location` - `v0.0.1+1`](#ensemble_location---v0011)
- [`ensemble_contacts` - `v0.0.1+1`](#ensemble_contacts---v0011)
- [`ensemble_file_manager` - `v0.0.1+1`](#ensemble_file_manager---v0011)
- [`ensemble_connect` - `v0.0.1+1`](#ensemble_connect---v0011)
- [`ensemble_bluetooth` - `v0.0.1+1`](#ensemble_bluetooth---v0011)
- [`ensemble_deeplink` - `v0.0.1+1`](#ensemble_deeplink---v0011)
- [`ensemble_network_info` - `v0.0.1+1`](#ensemble_network_info---v0011)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `ensemble_chat` - `v0.0.1+1`
- `ensemble_camera` - `v0.0.1+1`
- `ensemble_auth` - `v1.0.1`
- `ensemble_location` - `v0.0.1+1`
- `ensemble_contacts` - `v0.0.1+1`
- `ensemble_file_manager` - `v0.0.1+1`
- `ensemble_connect` - `v0.0.1+1`
- `ensemble_bluetooth` - `v0.0.1+1`
- `ensemble_deeplink` - `v0.0.1+1`
- `ensemble_network_info` - `v0.0.1+1`

---

#### `ensemble` - `v1.1.7`

- Removed high charts


## 2024-11-27

### Changes
Expand Down
2 changes: 1 addition & 1 deletion modules/auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

ensemble_ts_interpreter:
Expand Down
2 changes: 1 addition & 1 deletion modules/bracket/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion modules/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble
ensemble_ts_interpreter:
git:
Expand Down
2 changes: 1 addition & 1 deletion modules/chat/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

ensemble_ts_interpreter:
Expand Down
2 changes: 1 addition & 1 deletion modules/connect/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

plaid_flutter: ^3.1.2
Expand Down
2 changes: 1 addition & 1 deletion modules/contacts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

flutter_contacts: ^1.1.7+1
Expand Down
2 changes: 1 addition & 1 deletion modules/deeplink/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
ensemble:
git:
url: https://github.com/EnsembleUI/ensemble.git
ref: ensemble-v1.1.6
ref: ensemble-v1.1.7
path: modules/ensemble

flutter_branch_sdk: ^7.0.1
Expand Down
4 changes: 4 additions & 0 deletions modules/ensemble/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.7

- Removed high charts

## 1.1.6

- Bump "ensemble" to `1.1.6`.
Expand Down
1 change: 0 additions & 1 deletion modules/ensemble/lib/ensemble_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ class EnsembleApp extends StatefulWidget {
GlobalKey<NavigatorState>? navigatorKey,
}) {
externalAppNavigateKey = navigatorKey;
Utils.globalAppKey = GlobalKey<NavigatorState>();
}

final ScreenPayload? screenPayload;
Expand Down
34 changes: 26 additions & 8 deletions modules/ensemble/lib/framework/apiproviders/http_api_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,33 @@ class HTTPAPIProvider extends APIProvider {
// Here it's converted to YAML already
String? bodyPayload;
if (api['body'] != null) {
try {
bodyPayload = json.encode(eContext.eval(api['body']));

// set Content-Type as json but don't override user's value if exists
if (headers['Content-Type'] == null) {
headers['Content-Type'] = 'application/json';
final contentType = headers['Content-Type']?.toLowerCase() ?? '';

if (contentType == 'application/x-www-form-urlencoded') {
// For form-urlencoded, convert body to query string format
if (api['body'] is Map) {
Map<String, dynamic> formData = {};
(api['body'] as Map).forEach((key, value) {
formData[key.toString()] = eContext.eval(value)?.toString() ?? '';
});
// Convert map to x-www-form-urlencoded format
bodyPayload = formData.entries
.map((e) =>
'${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}')
.join('&');
}
} else {
// For JSON and other content types
try {
bodyPayload = json.encode(eContext.eval(api['body']));

// set Content-Type as json but don't override user's value if exists
if (headers['Content-Type'] == null) {
headers['Content-Type'] = 'application/json';
}
} on FormatException catch (_, e) {
log("Only JSON data supported: " + e.toString());
}
} on FormatException catch (_, e) {
log("Only JSON data supported: " + e.toString());
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ensemble/lib/util/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';

class Utils {
/// global appKey to get the context
static GlobalKey<NavigatorState> globalAppKey =
static final GlobalKey<NavigatorState> globalAppKey =
GlobalKey<NavigatorState>();

/// some Flutter widgets (TextInput) has no width constraint, so using them inside
Expand Down
15 changes: 1 addition & 14 deletions modules/ensemble/lib/widget/chart_highcharts_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:ensemble/framework/widget/widget.dart';
import 'package:ensemble/util/utils.dart';
import 'package:ensemble/widget/helpers/controllers.dart';
import 'package:ensemble_ts_interpreter/invokables/invokable.dart';
import 'package:high_chart/high_chart.dart';
import 'package:flutter/material.dart';

class Highcharts extends StatefulWidget
Expand Down Expand Up @@ -50,18 +49,6 @@ class HighchartsController extends WidgetController {
class HighchartsState extends EWidgetState<Highcharts> {
@override
Widget buildWidget(BuildContext context) {
return HighCharts(
loader: const SizedBox(
child: LinearProgressIndicator(),
width: 200,
),
size: Size(widget._controller.width.toDouble(),
widget._controller.height.toDouble()),
data: widget._controller.data,
scripts: const [
'https://code.highcharts.com/highcharts.js',
'https://code.highcharts.com/highcharts-more.js'
],
);
return Text('High Chart is not supported in newer version of please use chartJs instead');
}
}
4 changes: 2 additions & 2 deletions modules/ensemble/lib/widget/lottie/lottie.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ class LottieController extends BoxController {

if (autoPlay) {
if (repeat) {
lottieController!.repeat();
lottieController?.repeat();
} else {
lottieController!.forward();
lottieController?.forward();
}
}
}
Expand Down
Loading

0 comments on commit 1936dfd

Please sign in to comment.