Skip to content

Commit

Permalink
v2.0.7
Browse files Browse the repository at this point in the history
- bones_ui: ^2.0.13
- build_runner: ^2.1.11
- build_web_compilers: ^3.2.3
- lints: ^2.0.0
- dependency_validator: ^3.2.0
- test: ^1.21.3
  • Loading branch information
gmpassos committed Jun 27, 2022
1 parent 313fe1a commit f5eeb8b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 2.0.7

- bones_ui: ^2.0.13
- build_runner: ^2.1.11
- build_web_compilers: ^3.2.3
- lints: ^2.0.0
- dependency_validator: ^3.2.0
- test: ^1.21.3

## 2.0.6

- bones_ui: ^2.0.11
Expand Down
6 changes: 5 additions & 1 deletion lib/src/components/daterangepicker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class BSDateRangePicker extends UIComponent implements UIField<Pair<DateTime>> {
}
}

@override
final String fieldName;

/// The time picker format. Default: [TimePicker.none]
final TimePicker timePicker;

Expand All @@ -70,7 +73,8 @@ class BSDateRangePicker extends UIComponent implements UIField<Pair<DateTime>> {
HashMap<String, List<int>>? _dateRanges;

BSDateRangePicker(Element parent,
{TimePicker? timePicker,
{this.fieldName = 'date-range-picker',
TimePicker? timePicker,
this.showDateTextTitle = true,
List<DateRangeType>? rangesTypes,
DateRangeType? initialRangeType,
Expand Down
14 changes: 7 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: bones_ui_bootstrap
description: Adds Bootstrap 4+ support to Dart package bones_ui, allowing use of Bootstrap components and CSS.
version: 2.0.6
version: 2.0.7
homepage: https://github.com/Colossus-Services/bones_ui_bootstrap

environment:
sdk: '>=2.15.0 <3.0.0'

dependencies:
bones_ui: ^2.0.11
bones_ui: ^2.0.13
swiss_knife: ^3.1.1
amdjs: ^2.0.3
dom_tools: ^2.1.1
dom_builder: ^2.0.9
intl_messages: ^2.0.2

dev_dependencies:
build_runner: ^2.0.6
build_web_compilers: ^3.0.0
build_runner: ^2.1.11
build_web_compilers: ^3.2.3
sass_builder: ^2.1.3 # To automatically build SCSS files.
lints: ^1.0.1
dependency_validator: ^3.1.0
test: ^1.17.10
lints: ^2.0.0
dependency_validator: ^3.2.0
test: ^1.21.3

#dependency_overrides:
# bones_ui:
Expand Down
47 changes: 44 additions & 3 deletions test/bones_ui_bootstrap_test.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
@TestOn('browser')
import 'dart:html';

import 'package:bones_ui/bones_ui.dart';
import 'package:bones_ui_bootstrap/bones_ui_bootstrap.dart';
import 'package:test/test.dart';

void main() {
group('Basic test', () {
setUp(() {});
test('test 1', () {});
group('Components', () {
final rootContainer = DivElement();
late final MyRoot root;

setUpAll(() {
root = MyRoot(rootContainer);
});

test('initialize', () async {
root.initialize();
await root.onFinishRender.first;

var myHome = rootContainer.querySelector('#my-home');
expect(myHome, isA<DivElement>());
});

test('BSAccordion', () async {
var myAccordion = rootContainer.querySelector('#my-accordion');
expect(myAccordion, isA<DivElement>());
});
});
}

class MyRoot extends UIRoot {
MyRoot(Element? rootContainer) : super(rootContainer);

@override
UIComponent? renderContent() => MyHome(content!);
}

class MyHome extends UIComponent {
MyHome(Element? parent) : super(parent, id: 'my-home');

@override
render() => BSAccordion(
content!,
[
AccordionItem('Item A', 'aaa'),
AccordionItem('Item B', 'bbb'),
],
id: 'my-accordion');
}

0 comments on commit f5eeb8b

Please sign in to comment.