bm-core-ui 2.11.7 → 2.11.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13707,6 +13707,76 @@ export class BMWindow extends BMView {
13707
13707
  static zIndexMax (): number;
13708
13708
 
13709
13709
 
13710
+ /**
13711
+ * Updates the position of all animated windows based on how many there are.
13712
+ * @param animated Defaults to `YES`. If set to `YES`, this change will be animated.
13713
+ *
13714
+ */
13715
+ private static _updateMinimizedWindowsAnimated (animated?: boolean | null | undefined): void;
13716
+
13717
+
13718
+ /**
13719
+ * Set to `YES` while monitoring the mouse pointer to autohide the minimized windows strip.
13720
+ *
13721
+ */
13722
+ private static _minimizeAutohideActive (): void;
13723
+
13724
+
13725
+ /**
13726
+ * Sets up event handlers that automatically hide the minimize strip after the mouse pointer moves away
13727
+ * from the bottom of the screen for a certain amount of time. For touch devices, this will retain the top part
13728
+ * of the minimize strip so that it can be invoked by tapping it. For mouse devices, this will completely hide
13729
+ * the minimize strip.
13730
+ *
13731
+ * Additionally, sets up event handlers to reposition the minimize strip whenever the browser window resized.
13732
+ *
13733
+ */
13734
+ private static _startMinimizeStripAutohide (): void;
13735
+
13736
+
13737
+ /**
13738
+ * Brings the minimize strip back into view and stops monitoring the mouse pointer to autohide it.
13739
+ *
13740
+ */
13741
+ private static _stopMinimizeStripAutohide (): void;
13742
+
13743
+
13744
+ /**
13745
+ * Invoked whenever the viewport resizes while the minimize strip is visible. Updates the position
13746
+ * of the minimize strip and its windows to match the new viewport size.
13747
+ * @param event The event that triggered this action.
13748
+ *
13749
+ */
13750
+ private static _viewportDidResizeWithEvent (event: Event): void;
13751
+
13752
+
13753
+ /**
13754
+ * Invoked whenever the mouse pointer moves while the minimize strip is visible. Tests if the mouse pointer moves
13755
+ * sufficiently far away from the strip and hides it if it does, or shows the minimize strip if the mouse pointer
13756
+ * moves sufficiently close to the bottom of the viewport.
13757
+ * @param event The event that triggered this action.
13758
+ *
13759
+ */
13760
+ private static _mouseDidMoveWithEvent (event: MouseEvent): void;
13761
+
13762
+
13763
+ /**
13764
+ * Shows the minimize strip if it is hidden.
13765
+ * @param animated Defaults to `YES`. If set to `YES`, this change will be animated.
13766
+ * @return A promise that resolves when the associated animation completes.
13767
+ *
13768
+ */
13769
+ static showMinimizeStripAnimated (animated?: boolean | null | undefined): Promise<void>;
13770
+
13771
+
13772
+ /**
13773
+ * Hides the minimize strip if it is visible.
13774
+ * @param animated Defaults to `YES`. If set to `YES`, this change will be animated.
13775
+ *
13776
+ */
13777
+ static hideMinimizeStripAnimated (animated?: boolean | null | undefined): void;
13778
+
13779
+
13710
13780
  /**
13711
13781
  * Minimizes all non-minimized windows.
13712
13782
  * @param animated Defaults to `YES`. If set to `YES`, this change will be animated.
@@ -13870,7 +13940,7 @@ export class BMWindow extends BMView {
13870
13940
  * A string that is used for when this window is minimized.
13871
13941
  *
13872
13942
  */
13873
- private _title: string;
13943
+ title: string;
13874
13944
 
13875
13945
  /**
13876
13946
  * The point from which this popover should originate when open or dimissed with an animation.
@@ -13966,6 +14036,35 @@ export class BMWindow extends BMView {
13966
14036
  performDragWithEvent(event: MouseEvent | TouchEvent): void;
13967
14037
 
13968
14038
 
14039
+ /**
14040
+ * Invoked whenever a drag operation began for this window.
14041
+ * @param position The position where the drag began, relative to the viewport.
14042
+ * @param withEvent The event that triggered this action.
14043
+ *
14044
+ */
14045
+ protected dragBeganAtPosition(position: BMPoint, {withEvent}: {withEvent: MouseEvent | TouchEvent}): void;
14046
+
14047
+
14048
+ /**
14049
+ * Invoked whenever the pointer position changes during a drag event. Displaces this window's
14050
+ * frame by the amount the event pointer has moved.
14051
+ * @param fromPosition The previous pointer position relative to the viewport.
14052
+ * @param toPosition The current pointer position relative to the viewport.
14053
+ * @param event The event that triggered this action.
14054
+ *
14055
+ */
14056
+ protected dragPositionDidChangeFromPosition(fromPosition: BMPoint, {toPosition, event}: {toPosition: BMPoint, event: MouseEvent | TouchEvent}): void;
14057
+
14058
+
14059
+ /**
14060
+ * Invoked whenever a drag operation ended for this window.
14061
+ * @param position The position where the drag began, relative to the viewport.
14062
+ * @param withEvent The event that triggered this action.
14063
+ *
14064
+ */
14065
+ protected dragEndedAtPosition(position: BMPoint, {withEvent}: {withEvent: MouseEvent | TouchEvent}): void;
14066
+
14067
+
13969
14068
  /**
13970
14069
  * Starts a drag event from the specified `mousedown` event that will move this window.
13971
14070
  * When this method is invoked, further mouse events will be blocked until the drag finishes.
@@ -14087,6 +14186,12 @@ export class BMWindow extends BMView {
14087
14186
  windowDidClose(): void;
14088
14187
 
14089
14188
 
14189
+ /**
14190
+ * The size that this should be when minimized.
14191
+ *
14192
+ */
14193
+ readonly _minimizedSize: BMSize;
14194
+
14090
14195
  /**
14091
14196
  * Minimizes this window. This method will raise an error if this window is modal.
14092
14197
  * If this window is already minimized, this method will have no effect.
@@ -14173,6 +14278,22 @@ export class BMWindow extends BMView {
14173
14278
  }
14174
14279
 
14175
14280
 
14281
+ /**
14282
+ * The duration, in milliseconds, for most window animations.
14283
+ *
14284
+ */
14285
+ export var _BMWindowAnimationDurationDefault: any;
14286
+
14287
+
14288
+
14289
+ /**
14290
+ * The easing to use for most window animations.
14291
+ *
14292
+ */
14293
+ export var _BMWindowAnimationEasingDefault: any;
14294
+
14295
+
14296
+
14176
14297
  /**
14177
14298
  * Constructs and returns a window that will display in the given rect.
14178
14299
  * @param frame The frame.
@@ -14464,6 +14585,105 @@ export interface BMCodeEditorDelegate {
14464
14585
  }
14465
14586
 
14466
14587
 
14588
+ /**
14589
+ * A class that describes the display attributes of a popover and supports interpolation.
14590
+ *
14591
+ */
14592
+ export class _BMPopoverDisplayConfiguration implements BMAnimating {
14593
+
14594
+ /**
14595
+ * The popover's frame, excluding the indicator's size.
14596
+ *
14597
+ */
14598
+ private _frame: BMRect;
14599
+
14600
+ /**
14601
+ * The indicator's direction relative to the popover's anchor.
14602
+ *
14603
+ */
14604
+ private _direction: BMPopoverIndicatorDirection;
14605
+
14606
+ /**
14607
+ * The indicator's position along the popover's edge.
14608
+ *
14609
+ */
14610
+ private _indicatorPosition: number;
14611
+
14612
+ /**
14613
+ * The size of the indicator.
14614
+ *
14615
+ */
14616
+ private _indicatorSize: number;
14617
+
14618
+ /**
14619
+ * The round radius of the popover's corners.
14620
+ *
14621
+ */
14622
+ private _borderRadius: number;
14623
+
14624
+ /**
14625
+ * The height of the visible portion of the indicator.
14626
+ *
14627
+ */
14628
+ readonly _indicatorHeight: number;
14629
+
14630
+ /**
14631
+ * Initializes this popover popover display configuration object with the specified values.
14632
+ * @param frame The popover's frame.
14633
+ * @param direction The indicator's direction relative to the popover's anchor.
14634
+ * @param indicatorPosition The indicator's position relative to the popover's edge.
14635
+ * @param indicatorSize The size of the indicator.
14636
+ * @param borderRadius The size of the popover's corners.
14637
+ * @return This popover display configuration.
14638
+ *
14639
+ */
14640
+ initWithFrame(frame: BMRect, {direction, indicatorPosition, indicatorSize, borderRadius}: {direction: BMPopoverIndicatorDirection, indicatorPosition: number, indicatorSize: number, borderRadius: number}): _BMPopoverDisplayConfiguration;
14641
+
14642
+
14643
+ /**
14644
+ * Initializes this popover popover display configuration object by copying the values of
14645
+ * the specified popover display configuration.
14646
+ * @param config The configuration whose values to copy.
14647
+ * @return This popover display configuration.
14648
+ *
14649
+ */
14650
+ initWithPopoverDisplayConfiguration(config: _BMPopoverDisplayConfiguration): _BMPopoverDisplayConfiguration;
14651
+
14652
+
14653
+ /**
14654
+ * Creates and returns a copy of this popover display configuration.
14655
+ * @return A copy of this object.
14656
+ *
14657
+ */
14658
+ copy(): _BMPopoverDisplayConfiguration;
14659
+
14660
+
14661
+ /**
14662
+ * Invoked by the CoreUI animation engine to obtain an interpolated
14663
+ * value between this object and the target object.
14664
+ * @param fraction The animation fraction.
14665
+ * @param toValue The object to which to interpolate.
14666
+ * @return A popover display configuration.
14667
+ *
14668
+ */
14669
+ interpolatedValueWithFraction(fraction: number, {toValue}: {toValue: _BMPopoverDisplayConfiguration}): _BMPopoverDisplayConfiguration;
14670
+
14671
+
14672
+ /**
14673
+ * Creates and returns a popover display configuration object initialized with the specified values.
14674
+ * @param frame The popover's frame.
14675
+ * @param direction The indicator's direction relative to the popover's anchor.
14676
+ * @param indicatorPosition The indicator's position relative to the popover's edge.
14677
+ * @param indicatorSize The size of the indicator.
14678
+ * @param borderRadius The size of the popover's corners.
14679
+ * @return A popover display configuration.
14680
+ *
14681
+ */
14682
+ static configurationWithFrame (frame: BMRect, {direction, indicatorPosition, indicatorSize, borderRadius}: {direction: BMPopoverIndicatorDirection, indicatorPosition: number, indicatorSize: number, borderRadius: number}): _BMPopoverDisplayConfiguration;
14683
+
14684
+ }
14685
+
14686
+
14467
14687
  /**
14468
14688
  * Constants describing the position where the indicator appears on its popover.
14469
14689
  *
@@ -14507,21 +14727,27 @@ export class BMPopoverIndicatorDirection {
14507
14727
  export class BMPopover extends BMWindow {
14508
14728
 
14509
14729
  /**
14510
- * The point from which this popover should originate, relative to the document. Either this property
14730
+ * An optional delegate which this popover may notify of key events.
14731
+ *
14732
+ */
14733
+ delegate?: BMPopoverDelegate | null | undefined;
14734
+
14735
+ /**
14736
+ * Animatable. The point from which this popover should originate, relative to the document. Either this property
14511
14737
  * or `anchorNode` or `anchorRect` must be set before this popover is displayed.
14512
14738
  *
14513
14739
  */
14514
14740
  anchorPoint?: BMPoint | null | undefined;
14515
14741
 
14516
14742
  /**
14517
- * The rect from which this popover should originate, relative to the document. Either this property
14743
+ * Animatable. The rect from which this popover should originate, relative to the document. Either this property
14518
14744
  * or `anchorPoint` or `anchorNode` must be set before this popover is displayed.
14519
14745
  *
14520
14746
  */
14521
14747
  anchorRect?: BMRect | null | undefined;
14522
14748
 
14523
14749
  /**
14524
- * The element from which this popover should originate. Either this property
14750
+ * Animatable. The element from which this popover should originate. Either this property
14525
14751
  * or `anchorPoint` or `anchorRect` must be set before this popover is displayed.
14526
14752
  *
14527
14753
  */
@@ -14670,7 +14896,80 @@ export class BMPopover extends BMWindow {
14670
14896
 
14671
14897
 
14672
14898
  /**
14673
- * Invoked by CoreUI to update this popover's position and recalculate the various paths used by it.
14899
+ * Set to `YES` while this popover is detached. When set to `YES` the popover is detached from
14900
+ * its anchor and can be freely moved. When set to `NO`, the popover remains attached to its
14901
+ * anchor in a fixed position.
14902
+ *
14903
+ */
14904
+ readonly isDetached: boolean;
14905
+
14906
+ /**
14907
+ * The current detached position of this popover.
14908
+ *
14909
+ */
14910
+ private _position: BMPoint;
14911
+
14912
+ /**
14913
+ * The popover's current direction. Set to `undefined` until this popover is first displayed.
14914
+ *
14915
+ */
14916
+ private _direction?: BMPopoverIndicatorDirection | null | undefined;
14917
+
14918
+ /**
14919
+ * Controls whether this popover retains the direction that was set to it when it was first
14920
+ * displayed. When set to `NO`, whenever the popover's size or attributes change it will try
14921
+ * to find a new direction around the anchor. When set to `YES`, the current direction or the
14922
+ * initial display direction will be kept regardless of how the popover changes.
14923
+ *
14924
+ * When set to `undefined`, this popover will use the behaviour set on the `BMPopover` class.
14925
+ *
14926
+ */
14927
+ retainsDirection?: boolean | null | undefined;
14928
+
14929
+ /**
14930
+ * The current display configuration. Set to `undefined` until this popover is first displayed.
14931
+ *
14932
+ */
14933
+ private _config?: _BMPopoverDisplayConfiguration | null | undefined;
14934
+
14935
+ /**
14936
+ * The current display configuration. Set to `undefined` until this popover is first displayed.
14937
+ *
14938
+ */
14939
+ _displayConfiguration?: _BMPopoverDisplayConfiguration | null | undefined;
14940
+
14941
+ /**
14942
+ * Invoked by CoreUI to create a new display configuration for this popover based on the
14943
+ * current values of its properties.
14944
+ * @return The configuration.
14945
+ *
14946
+ */
14947
+ private _createDisplayConfiguration(): _BMPopoverDisplayConfiguration;
14948
+
14949
+
14950
+ /**
14951
+ * Invoked by CoreUI to apply the specified display configuration to this popover and its various SVG elements.
14952
+ * @param config The configuration to apply.
14953
+ *
14954
+ */
14955
+ private _applyDisplayConfiguration(config: _BMPopoverDisplayConfiguration): void;
14956
+
14957
+
14958
+ /**
14959
+ * The number of display configuration animations running currently against this popover's display configuration.
14960
+ *
14961
+ */
14962
+ private _displayConfigurationAnimations: number;
14963
+
14964
+ /**
14965
+ * A display configuration that will be applied to this popover at the end of any current
14966
+ * animations affecting the display configuration.
14967
+ *
14968
+ */
14969
+ private _pendingDisplayConfiguration: _BMPopoverDisplayConfiguration;
14970
+
14971
+ /**
14972
+ * Animatable. Invoked by CoreUI to update this popover's position and recalculate the various paths used by it.
14674
14973
  *
14675
14974
  */
14676
14975
  private _updatePosition(): void;
@@ -14718,13 +15017,99 @@ export class BMPopover extends BMWindow {
14718
15017
 
14719
15018
 
14720
15019
  /**
14721
- * Constructs and returns a popover with the given size.
15020
+ * Controls whether an in-progress drag can detach this popover.
15021
+ *
15022
+ */
15023
+ private _canDetach: boolean;
15024
+
15025
+ /**
15026
+ * Controls whether this popover is detachable. Defaults to the result provided
15027
+ * by the delegate.
15028
+ * @return `YES` if the popover is detachable, `NO` otherwise.
15029
+ *
15030
+ */
15031
+ protected isDetachable(): boolean;
15032
+
15033
+
15034
+ /**
15035
+ * During a drag operation set to the point where the drag began.
15036
+ *
15037
+ */
15038
+ private _initialDragPosition?: BMPoint | null | undefined;
15039
+
15040
+ /**
15041
+ * Detaches this popover from its anchor and allows it to be freely movable.
15042
+ * @param animated Defaults to `YES`. When set to `YES`, this change will be animated,
15043
+ * otherwise it will be instant.
15044
+ * @return A promise that resolves when the operation completes.
15045
+ *
15046
+ */
15047
+ detachAnimated(animated?: boolean | null | undefined): Promise<void>;
15048
+
15049
+
15050
+ /**
15051
+ * Constructs and returns a popover with the specified size.
14722
15052
  * @param size The popover's size.
14723
15053
  * @return A popover.
14724
15054
  *
14725
15055
  */
14726
15056
  static popoverWithSize (size: BMSize): BMPopover;
14727
15057
 
15058
+
15059
+ /**
15060
+ * Controls whether popovers retain the direction that was set to them when they were first
15061
+ * displayed, by default. When set to `NO`, whenever a popover's size or attributes change it will try
15062
+ * to find a new direction around the anchor. When set to `YES`, the current direction or the
15063
+ * initial display direction will be kept regardless of how the popover changes.
15064
+ *
15065
+ */
15066
+ private static _retainsDirection (): void;
15067
+
15068
+
15069
+ /**
15070
+ * Controls whether popovers retain the direction that was set to them when they were first
15071
+ * displayed, by default. When set to `NO`, whenever a popover's size or attributes change it will try
15072
+ * to find a new direction around the anchor. When set to `YES`, the current direction or the
15073
+ * initial display direction will be kept regardless of how the popover changes.
15074
+ * @param retains Defaults to `NO`. When set to `YES`, popovers will retain their
15075
+ * initial direction, otherwise they will recalculate their direction
15076
+ * whenever any update occurs.
15077
+ *
15078
+ */
15079
+ static setRetainsDirection (retains?: boolean | null | undefined): void;
15080
+
15081
+ }
15082
+
15083
+
15084
+ /**
15085
+ * The specification for a `BMPopoverDelegate` object, which can optionally be used in conjunction with
15086
+ * `BMPopover` objects and will receive various callbacks related to the popover's lifecycle.
15087
+ *
15088
+ */
15089
+ export interface BMPopoverDelegate extends BMWindowDelegate {
15090
+
15091
+ /**
15092
+ * Invoked when a drag interaction starts to verify if the operation can cause the popover
15093
+ * to detach from its anchor and become freely movable.
15094
+ *
15095
+ * Delegate objects can optionally implement this method and return `YES` to cause the popover
15096
+ * to detach from the anchor and be freely movable.
15097
+ *
15098
+ * When this method is not implemented, popovers cannot be detached from their anchor.
15099
+ * @param popover The calling popover.
15100
+ * @return `YES` if the popover should detach, `NO` otherwise.
15101
+ *
15102
+ */
15103
+ popoverCanDetach?(popover: BMPopover): boolean;
15104
+
15105
+
15106
+ /**
15107
+ * Invoked when a popover has detached from its anchor and any associated animation has finished playing.
15108
+ * @param popover The calling popover.
15109
+ *
15110
+ */
15111
+ popoverDidDetach?(popover: BMPopover): void;
15112
+
14728
15113
  }
14729
15114
 
14730
15115
 
@@ -6465,7 +6465,7 @@ class BMCollectionViewDataSetAdapter {
6465
6465
  }
6466
6466
 
6467
6467
  indexPathForObjectAtRow(row, args) {
6468
- return this._dataSource.collectionViewNumberOfObjectsInSectionAtIndex(this._collectionView, row, args);
6468
+ return this._dataSource.collectionViewIndexPathForObjectAtRow(this._collectionView, row, args);
6469
6469
  }
6470
6470
 
6471
6471
  indexPathForObject(object) {
@@ -232,31 +232,107 @@
232
232
  -webkit-tap-highlight-color: transparent;
233
233
  }
234
234
 
235
+ .BMWindowMinimizedPreview {
236
+ z-index: 2008 !important;
237
+ }
238
+
235
239
  .BMWindowMinimized {
236
- position: absolute;
240
+ position: fixed;
237
241
  left: 0px;
238
242
  bottom: 2px;
239
243
 
240
- width: 256px;
241
- height: 32px;
244
+ width: 160px;
245
+ height: 160px;
242
246
 
243
- background-color: white;
244
- color: rgba(0, 0, 0, .8);
245
- font-weight: 500;
247
+ color: white;
248
+ font-weight: 600;
246
249
  line-height: 32px;
247
- vertical-align: middle;
248
250
 
249
251
  box-sizing: border-box !important; /* Important needed for Thingworx new composer */
250
252
 
251
- padding-left: 8px;
252
-
253
- transition: left .3s ease;
254
-
255
253
  z-index: 2008;
256
254
 
257
255
  border-radius: 4px;
258
- box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, .1), 0px 3px 8px rgba(0, 0, 0, .1);
256
+ text-shadow: 0px 0px 1px rgba(0, 0, 0, .5), 0px 3px 8px rgba(0, 0, 0, .33), 0px 8px 20px black, 0px 12px 30px black;
259
257
  cursor: default;
258
+
259
+ display: flex;
260
+ align-items: end;
261
+ justify-content: center;
262
+ }
263
+
264
+ .BMWindowMinimized > span {
265
+ overflow: hidden;
266
+ text-overflow: ellipsis;
267
+ white-space: nowrap;
268
+
269
+ line-height: 1;
270
+
271
+ padding: 6px 10px;
272
+ background-color: rgba(0, 0, 0, .25);
273
+ border-radius: 6px;
274
+
275
+ backdrop-filter: blur(15px);
276
+ -webkit-backdrop-filter: blur(15px);
277
+
278
+ margin-bottom: 2px;
279
+ }
280
+
281
+ @keyframes BMWindowMinimizeStripHide {
282
+ 0% {
283
+ transform: translateY(0px);
284
+ }
285
+
286
+ 100% {
287
+ transform: translateY(180px);
288
+ }
289
+ }
290
+
291
+ @keyframes BMWindowMinimizeStripHideOpacity {
292
+ 0% {
293
+ opacity: 1;
294
+ }
295
+
296
+ 100% {
297
+ opacity: 0;
298
+ }
299
+ }
300
+
301
+ @keyframes BMWindowMinimizeStripShow {
302
+ 0% {
303
+ transform: translateY(180px);
304
+ }
305
+
306
+ 100% {
307
+ transform: translateY(0px);
308
+ }
309
+ }
310
+
311
+ @keyframes BMWindowMinimizeStripShowOpacity {
312
+ 0% {
313
+ opacity: 0;
314
+ }
315
+
316
+ 100% {
317
+ opacity: 1;
318
+ }
319
+ }
320
+
321
+ .BMWindowMinimizeStripHidden > .BMWindowMinimizedThumbnail,
322
+ .BMWindowMinimizeStripHidden > .BMWindowMinimizedControl {
323
+ animation-name: BMWindowMinimizeStripHide, BMWindowMinimizeStripHideOpacity;
324
+ animation-duration: 200ms, 200ms;
325
+ animation-timing-function: ease-in, ease-in;
326
+ animation-fill-mode: forwards, forwards;
327
+ animation-composition: accumulate, replace;
328
+ }
329
+
330
+ .BMWindowMinimizeStripShown > .BMWindowMinimizedThumbnail,
331
+ .BMWindowMinimizeStripShown > .BMWindowMinimizedControl {
332
+ animation-name: BMWindowMinimizeStripShow, BMWindowMinimizeStripShowOpacity;
333
+ animation-duration: 200ms, 200ms;
334
+ animation-timing-function: ease-out, ease-out;
335
+ animation-composition: accumulate, replace;
260
336
  }
261
337
 
262
338
  @media (prefers-color-scheme: dark) {