Skip to content

Commit

Permalink
v2.4.1
Browse files Browse the repository at this point in the history
- `UIDialog`:
  - Added `getAllDialogs` and `removeAllDialogs`.

- mercury_client: ^2.2.1
- swiss_knife: ^3.1.6
- archive: ^3.4.10
- build_web_compilers: ^4.0.8
  • Loading branch information
gmpassos committed Jan 9, 2024
1 parent f522b4a commit 18b07bf
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 2.4.1

- `UIDialog`:
- Added `getAllDialogs` and `removeAllDialogs`.

- mercury_client: ^2.2.1
- swiss_knife: ^3.1.6
- archive: ^3.4.10
- build_web_compilers: ^4.0.8

## 2.4.0

- New `bones_ui_web.dart`:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/bones_ui.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class BonesUI {
static const String version = '2.4.0';
static const String version = '2.4.1';
}
26 changes: 26 additions & 0 deletions lib/src/component/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,32 @@ DOMElement $uiDialog({
}

class UIDialog extends UIDialogBase {
/// Returns all the `.ui-dialog` as [UIDialogBase].
static List<UIDialogBase> getAllDialogs() {
var dialogs = window.document.querySelectorAll('.ui-dialog');

return dialogs
.map(UIComponent.getContentUIComponent)
.whereType<UIDialogBase>()
.toList();
}

/// Removes and clears all the `.ui-dialog` [Element]s.
static void removeAllDialogs() {
var dialogs = window.document.querySelectorAll('.ui-dialog');

for (var d in dialogs) {
var component = UIComponent.getContentUIComponent(d);
if (component is UIDialogBase) {
component.hide();
}

component?.clear();

d.remove();
}
}

static final UIComponentGenerator<UIDialog> generator =
UIComponentGenerator<UIDialog>('ui-dialog', 'div', 'ui-dialog', '',
(parent, attributes, contentHolder, contentNodes) {
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bones_ui
description: Bones_UI - An intuitive and user-friendly Web User Interface framework for Dart.
version: 2.4.0
version: 2.4.1
homepage: https://github.com/Colossus-Services/bones_ui

environment:
Expand All @@ -16,9 +16,9 @@ dependencies:
dom_builder: ^2.2.2
json_render: ^2.0.5
json_object_mapper: ^2.0.1
swiss_knife: ^3.1.5
swiss_knife: ^3.1.6
statistics: ^1.0.26
mercury_client: ^2.2.0
mercury_client: ^2.2.1
dynamic_call: ^2.0.1
project_template: ^1.0.2
resource_portable: ^3.1.0
Expand All @@ -28,7 +28,7 @@ dependencies:
intl: ^0.18.1
enum_to_string: ^2.0.1
yaml: ^3.1.2
archive: ^3.4.9
archive: ^3.4.10
collection: ^1.18.0
args: ^2.4.2
logging: ^1.2.0
Expand All @@ -41,7 +41,7 @@ dependencies:


dev_dependencies:
build_web_compilers: ^4.0.6
build_web_compilers: ^4.0.8
build_runner: ^2.4.6
lints: ^3.0.0
dependency_validator: ^3.2.3
Expand Down

0 comments on commit 18b07bf

Please sign in to comment.