@db-ux/ngx-core-components 2.1.2 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/ngx-core-components",
3
- "version": "2.1.2",
3
+ "version": "2.2.1",
4
4
  "description": "Angular components @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@db-ux/core-components": "2.1.2",
30
- "@db-ux/core-foundations": "2.1.2",
29
+ "@db-ux/core-components": "2.2.1",
30
+ "@db-ux/core-foundations": "2.2.1",
31
31
  "tslib": "^2.3.0"
32
32
  }
33
33
  }
package/shared/model.d.ts CHANGED
@@ -149,9 +149,6 @@ export type PopoverProps = {
149
149
  */
150
150
  width?: PopoverWidthType;
151
151
  };
152
- export type PopoverState = {
153
- handleAutoPlacement: () => void;
154
- };
155
152
  export type NameProps = {
156
153
  /**
157
154
  * The name attribute gives the name of the element to group it.
@@ -233,6 +230,8 @@ export type CustomFormProps = {
233
230
  validation?: ValidationType;
234
231
  };
235
232
  export type FormProps = CustomFormProps & BaseFormProps & RequiredProps & ShowLabelProps & ValueProps;
233
+ export declare const FieldSizingList: readonly ["fixed", "content"];
234
+ export type FieldSizingType = (typeof FieldSizingList)[number];
236
235
  export type FormTextProps = {
237
236
  /**
238
237
  * Maximum length (number of characters) of value
@@ -258,6 +257,11 @@ export type FormTextProps = {
258
257
  * The disabled attribute can be set to keep a user from edit on the form element
259
258
  */
260
259
  readonly?: boolean | string;
260
+ /**
261
+ * Adds shrinkwrap for input and textarea: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing
262
+ * Note: Only supported in Chromium browsers so far
263
+ */
264
+ fieldSizing?: FieldSizingType;
261
265
  };
262
266
  export type FormSizeProps = {
263
267
  /**
@@ -492,3 +496,14 @@ export type ValueLabelType = {
492
496
  value: string;
493
497
  label?: string;
494
498
  };
499
+ export type DocumentScrollState = {
500
+ _documentScrollListenerCallbackId?: string;
501
+ handleDocumentScroll: (event: any, parent?: HTMLElement) => void;
502
+ _observer?: IntersectionObserver;
503
+ };
504
+ export type PopoverState = {
505
+ handleEscape: (event: any) => void;
506
+ handleAutoPlacement: (parent?: HTMLElement) => void;
507
+ handleEnter: (parent?: HTMLElement) => void;
508
+ handleLeave: (event?: any) => void;
509
+ } & DocumentScrollState;
@@ -0,0 +1,9 @@
1
+ export declare class DocumentScrollListener {
2
+ private static callbacks;
3
+ private static _instance;
4
+ private static runCallbacks;
5
+ private ticking;
6
+ constructor();
7
+ addCallback(callback: (event: any) => void): string;
8
+ removeCallback(id: string): void;
9
+ }
@@ -0,0 +1,7 @@
1
+ export interface DBDataOutsidePair {
2
+ vx?: 'left' | 'right';
3
+ vy?: 'top' | 'bottom';
4
+ }
5
+ export declare const handleDataOutside: (el: HTMLElement) => DBDataOutsidePair;
6
+ export declare const handleFixedDropdown: (element: HTMLElement, parent: HTMLElement, placement: string) => void;
7
+ export declare const handleFixedPopover: (element: HTMLElement, parent: HTMLElement, placement: string) => void;
package/utils/index.d.ts CHANGED
@@ -7,19 +7,6 @@ export type ClassNameArg = string | {
7
7
  [key: string]: boolean | undefined;
8
8
  } | undefined;
9
9
  export declare const cls: (...args: ClassNameArg[]) => string;
10
- export declare const visibleInVX: (el: Element) => boolean;
11
- export declare const visibleInVY: (el: Element) => boolean;
12
- export declare const isInView: (el: Element) => {
13
- outTop: boolean;
14
- outBottom: boolean;
15
- outLeft: boolean;
16
- outRight: boolean;
17
- };
18
- export interface DBDataOutsidePair {
19
- vx?: 'left' | 'right';
20
- vy?: 'top' | 'bottom';
21
- }
22
- export declare const handleDataOutside: (el: Element) => DBDataOutsidePair;
23
10
  export declare const isArrayOfStrings: (value: unknown) => value is string[];
24
11
  export declare const hasVoiceOver: () => boolean;
25
12
  export declare const delay: (fn: () => void, ms: number) => Promise<unknown>;
@@ -45,3 +32,7 @@ export declare const getInputValue: (value?: number | string, inputType?: string
45
32
  export declare const getHideProp: (show?: boolean | string) => any;
46
33
  export declare const stringPropVisible: (givenString?: string, showString?: boolean | string) => boolean;
47
34
  export declare const getSearchInput: (element: HTMLElement) => HTMLInputElement | null;
35
+ export declare const getOptionKey: (option: {
36
+ id?: string;
37
+ value?: string | number | string[] | undefined;
38
+ }, prefix: string) => string;
@@ -15,7 +15,7 @@ export declare class NavigationItemSafeTriangle {
15
15
  private initialized;
16
16
  private mouseX;
17
17
  private mouseY;
18
- constructor(element: HTMLElement | null, subNavigation: Element | null);
18
+ constructor(element: HTMLElement | null, subNavigation: HTMLElement | null);
19
19
  private init;
20
20
  enableFollow(): void;
21
21
  disableFollow(): void;