@db-ux/v-core-components 4.13.1-angular-signal-forms12-ac097f6 → 4.14.0
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.
- package/CHANGELOG.md +14 -0
- package/dist/components/custom-select/model.d.ts +5 -1
- package/dist/components/tabs/model.d.ts +4 -12
- package/dist/components/tabs/tabs.vue.d.ts +3 -1
- package/dist/db-ux.es.js +619 -548
- package/dist/db-ux.umd.js +1 -1
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/model.d.ts +27 -4
- package/dist/utils/abstract-document-listener.d.ts +18 -0
- package/dist/utils/abstract-observer-listener.d.ts +39 -0
- package/dist/utils/document-click-listener.d.ts +3 -3
- package/dist/utils/document-scroll-listener.d.ts +3 -3
- package/dist/utils/floating-components.d.ts +29 -6
- package/dist/utils/intersection-observer-listener.d.ts +15 -0
- package/dist/utils/resize-observer-listener.d.ts +15 -0
- package/package.json +3 -3
|
@@ -14,6 +14,8 @@ export declare const DEFAULT_INVALID_MESSAGE: string;
|
|
|
14
14
|
export declare const DEFAULT_REMOVE: string;
|
|
15
15
|
export declare const DEFAULT_BACK: string;
|
|
16
16
|
export declare const DEFAULT_SELECTED: string;
|
|
17
|
+
export declare const DEFAULT_SCROLL_LEFT: string;
|
|
18
|
+
export declare const DEFAULT_SCROLL_RIGHT: string;
|
|
17
19
|
export declare const DEFAULT_BURGER_MENU: string;
|
|
18
20
|
export declare const DEFAULT_ICON: string;
|
|
19
21
|
export declare const DEFAULT_ROWS: number;
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -237,11 +237,13 @@ export type ValueProps = {
|
|
|
237
237
|
*/
|
|
238
238
|
value?: any;
|
|
239
239
|
};
|
|
240
|
-
export type
|
|
240
|
+
export type DisabledProps = {
|
|
241
241
|
/**
|
|
242
|
-
* The disabled attribute can be set to keep a user from clicking on the
|
|
242
|
+
* The disabled attribute can be set to keep a user from clicking on the item.
|
|
243
243
|
*/
|
|
244
244
|
disabled?: boolean | string;
|
|
245
|
+
};
|
|
246
|
+
export type BaseFormProps = {
|
|
245
247
|
/**
|
|
246
248
|
* The label attribute specifies the caption of the form element.
|
|
247
249
|
*/
|
|
@@ -250,7 +252,7 @@ export type BaseFormProps = {
|
|
|
250
252
|
* The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.
|
|
251
253
|
*/
|
|
252
254
|
name?: string;
|
|
253
|
-
};
|
|
255
|
+
} & DisabledProps;
|
|
254
256
|
export type CustomFormProps = {
|
|
255
257
|
/**
|
|
256
258
|
* Overwrites auto handling for aria-describedby.
|
|
@@ -537,10 +539,31 @@ export type ValueLabelType = {
|
|
|
537
539
|
value: string;
|
|
538
540
|
label?: string;
|
|
539
541
|
};
|
|
542
|
+
export type OverflowScrollButtonProps = {
|
|
543
|
+
/**
|
|
544
|
+
* Change amount of scroll distance when clicking on an overflow scroll arrow button.
|
|
545
|
+
*/
|
|
546
|
+
arrowScrollDistance?: number | string;
|
|
547
|
+
/**
|
|
548
|
+
* Set the text for the scroll left button
|
|
549
|
+
*/
|
|
550
|
+
scrollLeftText?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Set the text for the scroll right button
|
|
553
|
+
*/
|
|
554
|
+
scrollRightText?: string;
|
|
555
|
+
};
|
|
556
|
+
export type OverflowScrollButtonState = {
|
|
557
|
+
scroll: (left?: boolean) => void;
|
|
558
|
+
showScrollLeft?: boolean;
|
|
559
|
+
showScrollRight?: boolean;
|
|
560
|
+
evaluateScrollButtons: (tabList: Element) => void;
|
|
561
|
+
};
|
|
540
562
|
export type DocumentScrollState = {
|
|
541
563
|
_documentScrollListenerCallbackId?: string;
|
|
542
564
|
handleDocumentScroll: (event: any, parent?: HTMLElement) => void;
|
|
543
|
-
|
|
565
|
+
_intersectionObserverCallbackId?: string;
|
|
566
|
+
_resizeObserverCallbackId?: string;
|
|
544
567
|
};
|
|
545
568
|
export type PopoverState = {
|
|
546
569
|
handleEscape: (event: any) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic base class for singleton document event listeners.
|
|
3
|
+
* Manages a shared set of callbacks dispatched when a document-level
|
|
4
|
+
* event fires.
|
|
5
|
+
*
|
|
6
|
+
* Subclasses own their static state (callbacks, instance) and expose
|
|
7
|
+
* it via the abstract accessor methods below.
|
|
8
|
+
*
|
|
9
|
+
* @template TEvent - The event type passed to callbacks (Event, MouseEvent, etc.)
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class AbstractDocumentListener<TEvent = any> {
|
|
12
|
+
/**
|
|
13
|
+
* Subclasses must return a reference to their own static callbacks store.
|
|
14
|
+
*/
|
|
15
|
+
protected abstract getCallbacks(): Record<string, (event: TEvent) => void>;
|
|
16
|
+
addCallback(callback: (event: TEvent) => void): string;
|
|
17
|
+
removeCallback(id: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic base class for singleton observer listeners.
|
|
3
|
+
* Uses a Map<Element, Map<id, callback>> for O(1) element lookup in the
|
|
4
|
+
* observer handler — avoids quadratic scanning when many elements are observed.
|
|
5
|
+
*
|
|
6
|
+
* Subclasses own their static state (callbacksByElement, idToElement, observer,
|
|
7
|
+
* instance) and expose it via the abstract accessor methods below.
|
|
8
|
+
*
|
|
9
|
+
* @template TObserver - The observer type (ResizeObserver, IntersectionObserver, etc.)
|
|
10
|
+
* @template TEntry - The entry type passed to the callback
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class AbstractObserverListener<TObserver, TEntry> {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a Map keyed by Element, where each value is a Map of id → callback.
|
|
15
|
+
*/
|
|
16
|
+
protected abstract getCallbacksByElement(): Map<Element, Map<string, (entry: TEntry) => void>>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a Map of id → Element for reverse lookup during unobserve.
|
|
19
|
+
*/
|
|
20
|
+
protected abstract getIdToElement(): Map<string, Element>;
|
|
21
|
+
/**
|
|
22
|
+
* Subclasses must return their own static observer instance (or null).
|
|
23
|
+
*/
|
|
24
|
+
protected abstract getObserver(): TObserver | null;
|
|
25
|
+
/**
|
|
26
|
+
* Start observing an element via the underlying observer API.
|
|
27
|
+
*/
|
|
28
|
+
protected abstract observeElement(observer: TObserver, element: Element): void;
|
|
29
|
+
/**
|
|
30
|
+
* Stop observing an element via the underlying observer API.
|
|
31
|
+
*/
|
|
32
|
+
protected abstract unobserveElement(observer: TObserver, element: Element): void;
|
|
33
|
+
observe(element: Element, callback: (entry: TEntry) => void): string | undefined;
|
|
34
|
+
unobserve(id: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Called by subclass observer handlers to dispatch callbacks for an entry.
|
|
37
|
+
*/
|
|
38
|
+
protected dispatchEntry(element: Element, entry: TEntry): void;
|
|
39
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { AbstractDocumentListener } from './abstract-document-listener.js';
|
|
2
|
+
export declare class DocumentClickListener extends AbstractDocumentListener {
|
|
2
3
|
private static callbacks;
|
|
3
4
|
private static _instance;
|
|
4
5
|
private static runCallbacks;
|
|
5
6
|
constructor();
|
|
6
|
-
|
|
7
|
-
removeCallback(id: string): void;
|
|
7
|
+
protected getCallbacks(): Record<string, (event: any) => void>;
|
|
8
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { AbstractDocumentListener } from './abstract-document-listener.js';
|
|
2
|
+
export declare class DocumentScrollListener extends AbstractDocumentListener {
|
|
2
3
|
private static callbacks;
|
|
3
4
|
private static _instance;
|
|
4
5
|
private static runCallbacks;
|
|
5
6
|
private ticking;
|
|
6
7
|
constructor();
|
|
7
|
-
|
|
8
|
-
removeCallback(id: string): void;
|
|
8
|
+
protected getCallbacks(): Record<string, (event: any) => void>;
|
|
9
9
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export interface DBDataOutsidePair {
|
|
2
|
-
vx?: 'left' | 'right';
|
|
3
|
-
vy?: 'top' | 'bottom';
|
|
4
|
-
}
|
|
5
|
-
export declare const handleDataOutside: (el: HTMLElement) => DBDataOutsidePair;
|
|
6
1
|
export declare const handleFixedDropdown: (element: HTMLElement, parent: HTMLElement, placement: string) => void;
|
|
7
2
|
export declare const getFloatingProps: (element: HTMLElement, parent: HTMLElement, placement: string) => {
|
|
8
3
|
top: number;
|
|
@@ -16,5 +11,33 @@ export declare const getFloatingProps: (element: HTMLElement, parent: HTMLElemen
|
|
|
16
11
|
correctedPlacement: string;
|
|
17
12
|
innerWidth: number;
|
|
18
13
|
innerHeight: number;
|
|
14
|
+
outsideYBoth?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
top: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
right: number;
|
|
19
|
+
height: number;
|
|
20
|
+
width: number;
|
|
21
|
+
left: number;
|
|
22
|
+
childHeight: number;
|
|
23
|
+
childWidth: number;
|
|
24
|
+
correctedPlacement: string;
|
|
25
|
+
innerWidth: number;
|
|
26
|
+
innerHeight: number;
|
|
27
|
+
outsideYBoth: boolean;
|
|
19
28
|
};
|
|
20
|
-
export declare const handleFixedPopover: (element: HTMLElement, parent: HTMLElement, placement
|
|
29
|
+
export declare const handleFixedPopover: (element: HTMLElement, parent: HTMLElement, placement?: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Detects whether a floating element overflows the viewport edges
|
|
32
|
+
* and sets `data-outside-vy` / `data-outside-vx` attributes accordingly.
|
|
33
|
+
* CSS rules can use these attributes to flip/reposition the element.
|
|
34
|
+
*
|
|
35
|
+
* If the element was already flipped (has existing data-outside-* attributes),
|
|
36
|
+
* it checks whether the flipped position would overflow on the opposite side
|
|
37
|
+
* using the parent's rect as reference, preventing infinite flip-flop.
|
|
38
|
+
*/
|
|
39
|
+
export interface DBDataOutsidePair {
|
|
40
|
+
vx?: 'left' | 'right';
|
|
41
|
+
vy?: 'top' | 'bottom';
|
|
42
|
+
}
|
|
43
|
+
export declare const handleDataOutside: (el: HTMLElement) => DBDataOutsidePair;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractObserverListener } from './abstract-observer-listener.js';
|
|
2
|
+
type IntersectionCallback = (entry: IntersectionObserverEntry) => void;
|
|
3
|
+
export declare class IntersectionObserverListener extends AbstractObserverListener<IntersectionObserver, IntersectionObserverEntry> {
|
|
4
|
+
private static _instance;
|
|
5
|
+
private static callbacksByElement;
|
|
6
|
+
private static idToElement;
|
|
7
|
+
private static observer;
|
|
8
|
+
constructor();
|
|
9
|
+
protected getCallbacksByElement(): Map<Element, Map<string, IntersectionCallback>>;
|
|
10
|
+
protected getIdToElement(): Map<string, Element>;
|
|
11
|
+
protected getObserver(): IntersectionObserver | null;
|
|
12
|
+
protected observeElement(observer: IntersectionObserver, element: Element): void;
|
|
13
|
+
protected unobserveElement(observer: IntersectionObserver, element: Element): void;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractObserverListener } from './abstract-observer-listener.js';
|
|
2
|
+
type ResizeCallback = (entry: ResizeObserverEntry) => void;
|
|
3
|
+
export declare class ResizeObserverListener extends AbstractObserverListener<ResizeObserver, ResizeObserverEntry> {
|
|
4
|
+
private static _instance;
|
|
5
|
+
private static callbacksByElement;
|
|
6
|
+
private static idToElement;
|
|
7
|
+
private static observer;
|
|
8
|
+
constructor();
|
|
9
|
+
protected getCallbacksByElement(): Map<Element, Map<string, ResizeCallback>>;
|
|
10
|
+
protected getIdToElement(): Map<string, Element>;
|
|
11
|
+
protected getObserver(): ResizeObserver | null;
|
|
12
|
+
protected observeElement(observer: ResizeObserver, element: Element): void;
|
|
13
|
+
protected unobserveElement(observer: ResizeObserver, element: Element): void;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/v-core-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue components for @db-ux/core-components",
|
|
6
6
|
"repository": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dist/"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@db-ux/core-components": "4.
|
|
32
|
-
"@db-ux/core-foundations": "4.
|
|
31
|
+
"@db-ux/core-components": "4.14.0",
|
|
32
|
+
"@db-ux/core-foundations": "4.14.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@playwright/experimental-ct-vue": "1.60.0",
|