Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions ngcomponents/lib/laminate/overlay/module.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ String getDefaultContainerName(
@Optional()
@SkipSelf()
@Inject(overlayContainerName)
Object? containerName) {
Object? containerName) {
return containerName as String? ?? 'default';
}

Expand All @@ -85,7 +85,7 @@ HtmlElement getOverlayContainerParent(
@Optional()
@SkipSelf()
@Inject(overlayContainerParent)
Object? containerParent) {
Object? containerParent) {
return containerParent as HtmlElement? ??
document.querySelector('body') as HtmlElement;
}
Expand Down
1 change: 1 addition & 0 deletions ngcomponents/lib/material_datepicker/calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'package:collection/collection.dart';
import 'package:intl/intl.dart';
import 'package:ngcomponents/model/date/date.dart';
import 'package:quiver/core.dart' as quiver;

part '../src/material_datepicker/calendar/day.dart';
part '../src/material_datepicker/calendar/highlight.dart';
Expand Down
1 change: 1 addition & 0 deletions ngcomponents/lib/material_tooltip/material_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/// see [module.dart](https://github.com/angulardart-communityangular_components/blob/master/lib/material_tooltip/module.dart)
/// for bindings which must be provided in app which use any Material Tooltip
/// component.
library;

export 'package:ngcomponents/src/material_tooltip/icon_tooltip.dart'
show MaterialIconTooltipComponent;
Expand Down
8 changes: 4 additions & 4 deletions ngcomponents/lib/model/date/time_zone_aware_clock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class SettableTimeZone {
/// case, [Clock.now()] will print an error and return system time.
Duration? get offsetFromUtc => _offsetFromUtc;
set offsetFromUtc(Duration? newOffset) {
if (newOffset != null && newOffset.inMicroseconds == null) {
throw ArgumentError.value(
newOffset, 'newOffset' 'holds a null or undefined value');
}
//if (newOffset != null && newOffset.inMicroseconds == null) {
// throw ArgumentError.value(
// newOffset, 'newOffset' 'holds a null or undefined value');
//}
if (newOffset != null && newOffset.inMicroseconds.isNaN) {
throw ArgumentError.value(newOffset, 'newOffset' 'is NaN!');
}
Expand Down
2 changes: 1 addition & 1 deletion ngcomponents/lib/model/selection/tree_selection_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:ngcomponents/model/selection/selection_options.dart';
///
/// When mixin this component, one should override the getHierarchyMap()
/// method in order for the functionality to work.
abstract class TreeSelectionMixin<T>
abstract mixin class TreeSelectionMixin<T>
implements Parent<T, List<OptionGroup<T>>> {
/// Flatten all the OptionGroups of the tree into one long list.
List<OptionGroup<T>> flatOptionGroup() {
Expand Down
5 changes: 5 additions & 0 deletions ngcomponents/lib/src/material_datepicker/calendar/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,9 @@ class CalendarState {
previewAnchoredAtStart == o.previewAnchoredAtStart &&
resolution == o.resolution &&
_setEq(selections, o.selections);

@override
int get hashCode =>
quiver.hash4(currentSelection, cause, preview, previewAnchoredAtStart) ^
quiver.hash2(resolution, selections);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_options;
part of '../../../model/selection/selection_options.dart';

class _FutureSelectionOptions<T> extends SelectionOptions<T> {
_FutureSelectionOptions(Future<List<OptionGroup<T>>> optionGroupListFuture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_model;
part of '../../../model/selection/selection_model.dart';

class _MultiSelectionModelImpl<T> extends PropertyChangeNotifier
with SelectionChangeNotifier<T>, CastIterable<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_model;
part of '../../../model/selection/selection_model.dart';

/// Returned internally as a blank selection model.
class _NoopSelectionModelImpl<T> implements NullSelectionModel<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_model;
part of '../../../model/selection/selection_model.dart';

/// Interface for something that can be observed for selection.
abstract class SelectionObservable<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_model;
part of '../../../model/selection/selection_model.dart';

class _SingleSelectionModelImpl<T> extends PropertyChangeNotifier
with SelectionChangeNotifier<T>, CastIterable<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

part of angular_components.model.selection.selection_options;
part of '../../../model/selection/selection_options.dart';

class _StreamSelectionOptions<T> extends SelectionOptions<T> {
StreamSubscription? _streamSub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:ngcomponents/utils/angular/scroll_host/interface.dart';
import 'package:ngcomponents/utils/async/async.dart';
import 'package:ngcomponents/utils/browser/dom_service/dom_service.dart';
import 'package:ngcomponents/utils/disposer/disposer.dart';
import 'package:quiver/core.dart' as quiver;

/// A non-touchscreen version of pan controller, as it relies on wheel events
/// that are not present on touchscreen displays.
Expand Down Expand Up @@ -247,4 +248,7 @@ class PanEventImpl implements PanEvent {
@override
String toString() => '$isPanning ${isTop ? "t" : ""}'
'${isRight ? "r" : ""}${isBottom ? "b" : ""}${isLeft ? "l" : ""}';

@override
int get hashCode => quiver.hash4(isTop, isRight, isBottom, isLeft);
}
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,8 @@ class ElementScrollHostBase extends ScrollHostBase {

ElementScrollHostBase(super.domService, super.managedZone,
super.gestureListenerFactory, this.element,
{bool usePositionSticky = false, useTouchGestureListener = true})
: super(usePositionSticky: usePositionSticky,
useTouchGestureListener: useTouchGestureListener) {
{bool usePositionSticky = false, super.useTouchGestureListener = true})
: super(usePositionSticky: usePositionSticky) {
element.style.overflowY = 'auto';

// Allows scroll host which contains huge iframe be able to scroll on iOS.
Expand Down
8 changes: 8 additions & 0 deletions ngcomponents/lib/utils/comparators/comparators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:quiver/core.dart' as quiver;

/// Use this as a mixin to be able to use arithmetic comparison operators
/// in your class.
abstract class Comparators<T> implements Comparable<T> {
Expand All @@ -18,6 +20,9 @@ abstract class Comparators<T> implements Comparable<T> {
other is T &&
runtimeType == other.runtimeType &&
compareTo(other as T) == 0;

@override
int get hashCode => quiver.hash2(this, runtimeType);
}

/// This can be extended in classes that are using const constructors.
Expand All @@ -36,4 +41,7 @@ abstract class ConstComparators<T> implements Comparable<T> {
other is T &&
runtimeType == other.runtimeType &&
compareTo(other as T) == 0;

@override
int get hashCode => quiver.hash2(this, runtimeType);
}