Skip to content

Commit cee5c53

Browse files
authored
Merge branch 'main' into triple-state-switch-widget
2 parents 6c772c9 + e7a1101 commit cee5c53

File tree

5 files changed

+37
-19
lines changed

5 files changed

+37
-19
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature to the framework
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
**Describe the solution you'd like if possible share the expected EDL**
13+
14+
**Describe alternatives you've considered**
15+
16+
**Additional context could be screen shot, discord conversation, figma file**

lib/action/upload_files_action.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ Future<void> uploadFiles({
8585
}
8686
});
8787
}
88+
String rawUrl = apiDefinition['url']?.toString().trim() ??
89+
apiDefinition['uri']?.toString().trim() ??
90+
'';
8891

89-
String url =
90-
HttpUtils.resolveUrl(dataContext, apiDefinition['uri'].toString().trim());
92+
String url = HttpUtils.resolveUrl(dataContext, rawUrl);
9193
String method = apiDefinition['method']?.toString().toUpperCase() ?? 'POST';
9294
final fileResponse = action.id == null
9395
? null

lib/framework/theme/theme_loader.dart

+5-8
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ mixin ThemeLoader {
1212
final Color _buttonBorderOutlineColor = Colors.black12;
1313

1414
ThemeData getAppTheme(YamlMap? overrides) {
15+
final seedColor = Utils.getColor(overrides?['Colors']?['seed']);
16+
1517
ThemeData defaultTheme = ThemeData(
1618
useMaterial3: true,
17-
colorScheme: defaultColorScheme,
19+
colorScheme: seedColor == null
20+
? defaultColorScheme
21+
: ColorScheme.fromSeed(seedColor: seedColor),
1822
scaffoldBackgroundColor:
1923
Utils.getColor(overrides?['Screen']?['backgroundColor']) ??
2024
DesignSystem.scaffoldBackgroundColor,
@@ -94,13 +98,6 @@ mixin ThemeLoader {
9498
),
9599
);
96100

97-
final seedColor = Utils.getColor(overrides?['Colors']?['seed']);
98-
99-
if (seedColor != null) {
100-
defaultTheme = defaultTheme.copyWith(
101-
colorScheme: ColorScheme.fromSeed(seedColor: seedColor));
102-
}
103-
104101
final customColorSchema = defaultTheme.colorScheme.copyWith(
105102
primary: Utils.getColor(overrides?['Colors']?['primary']),
106103
onPrimary: Utils.getColor(overrides?['Colors']?['onPrimary']),

lib/util/utils.dart

+5-6
Original file line numberDiff line numberDiff line change
@@ -621,12 +621,11 @@ class Utils {
621621
return int.tryParse(value);
622622
}
623623

624-
static final onlyExpression = RegExp(
625-
r'''^\${([a-z_-\d\s.,:?!$@&|<>\+/*|%^="'\(\)\[\]]+)}$''',
626-
caseSensitive: false);
627-
static final containExpression = RegExp(
628-
r'''\${([a-z_-\d\s.,:?!$@&|<>\+/*|%^="'\(\)\[\]]+)}''',
629-
caseSensitive: false);
624+
static final onlyExpression =
625+
RegExp(r'''^\$\{([^}]+)\}$''', caseSensitive: false);
626+
627+
static final containExpression =
628+
RegExp(r'''\$\{([^}{]+(?:\{[^}{]*\}[^}{]*)*)\}''', caseSensitive: false);
630629

631630
static final i18nExpression = RegExp(r'\br@([\w\.]+)', caseSensitive: false);
632631

lib/widget/calendar.dart

+7-3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class EnsembleCalendar extends StatefulWidget
7575
duration: const Duration(milliseconds: 300), curve: Curves.easeOut),
7676
'addRowSpan': (value) => setRowSpan(value),
7777
'update': () => _controller.update(),
78+
'clearRange': () => clearRange(),
7879
};
7980
}
8081

@@ -119,6 +120,12 @@ class EnsembleCalendar extends StatefulWidget
119120
};
120121
}
121122

123+
void clearRange() {
124+
_controller.rangeStart = null;
125+
_controller.rangeEnd = null;
126+
_controller.range = null;
127+
}
128+
122129
void setRowSpanItemTemplate(dynamic rowSpanData) {
123130
try {
124131
if (rowSpanData is! Map ||
@@ -308,9 +315,6 @@ class EnsembleCalendar extends StatefulWidget
308315
updatedDisabledDays.remove(date);
309316
}
310317

311-
_controller.rangeStart = null;
312-
_controller.rangeEnd = null;
313-
_controller.range = null;
314318
_controller.selectedDays.value = updatedDisabledDays;
315319
}
316320

0 commit comments

Comments
 (0)