@agnos-ui/core 0.0.1-alpha.0 → 0.0.1-alpha.10
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/README.md +4 -4
- package/{dist/lib → components/accordion}/accordion.d.ts +29 -25
- package/{dist/lib → components/accordion}/accordion.js +81 -77
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/index.js +1 -0
- package/components/alert/alert.d.ts +31 -0
- package/components/alert/alert.js +22 -0
- package/{dist/lib/alert.d.ts → components/alert/common.d.ts} +17 -20
- package/{dist/lib/alert.js → components/alert/common.js} +22 -19
- package/components/alert/index.d.ts +2 -0
- package/components/alert/index.js +2 -0
- package/components/commonProps.d.ts +6 -0
- package/components/commonProps.js +1 -0
- package/components/modal/index.d.ts +1 -0
- package/components/modal/index.js +1 -0
- package/{dist/lib → components}/modal/modal.d.ts +30 -29
- package/{dist/lib → components}/modal/modal.js +59 -29
- package/components/pagination/index.d.ts +2 -0
- package/components/pagination/index.js +2 -0
- package/{dist/lib → components/pagination}/pagination.d.ts +5 -14
- package/{dist/lib → components/pagination}/pagination.js +6 -5
- package/components/progressbar/index.d.ts +1 -0
- package/components/progressbar/index.js +1 -0
- package/components/progressbar/progressbar.d.ts +86 -0
- package/components/progressbar/progressbar.js +78 -0
- package/components/rating/index.d.ts +1 -0
- package/components/rating/index.js +1 -0
- package/{dist/lib → components/rating}/rating.d.ts +6 -13
- package/{dist/lib → components/rating}/rating.js +6 -9
- package/components/select/index.d.ts +1 -0
- package/components/select/index.js +1 -0
- package/components/select/select.d.ts +337 -0
- package/components/select/select.js +266 -0
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +1 -0
- package/components/slider/slider.d.ts +245 -0
- package/components/slider/slider.js +413 -0
- package/{dist/lib/config.d.ts → config.d.ts} +17 -7
- package/{dist/lib/config.js → config.js} +3 -3
- package/index.d.ts +25 -0
- package/index.js +31 -0
- package/package.json +42 -28
- package/services/extendWidget.d.ts +23 -0
- package/services/extendWidget.js +35 -0
- package/services/floatingUI.d.ts +56 -0
- package/services/floatingUI.js +105 -0
- package/{dist/lib/services → services}/focustrack.js +5 -5
- package/services/intersection.d.ts +34 -0
- package/services/intersection.js +55 -0
- package/services/navManager.d.ts +93 -0
- package/services/navManager.js +172 -0
- package/{dist/lib/services → services}/portal.d.ts +7 -0
- package/services/portal.js +44 -0
- package/{dist/lib/services → services}/siblingsInert.d.ts +2 -1
- package/{dist/lib/services → services}/siblingsInert.js +2 -2
- package/{dist/lib → services}/transitions/baseTransitions.d.ts +15 -2
- package/{dist/lib → services}/transitions/baseTransitions.js +21 -10
- package/services/transitions/bootstrap/collapse.d.ts +2 -0
- package/services/transitions/bootstrap/fade.d.ts +1 -0
- package/services/transitions/bootstrap.d.ts +2 -0
- package/services/transitions/bootstrap.js +2 -0
- package/services/transitions/collapse.d.ts +43 -0
- package/{dist/lib → services}/transitions/collapse.js +15 -2
- package/{dist/lib → services}/transitions/cssTransitions.d.ts +6 -0
- package/{dist/lib → services}/transitions/cssTransitions.js +8 -4
- package/{dist/lib → services}/transitions/simpleClassTransition.d.ts +12 -1
- package/services/transitions/simpleClassTransition.js +42 -0
- package/{dist/lib/types.d.ts → types.d.ts} +43 -4
- package/types.js +14 -0
- package/{dist/lib/services/directiveUtils.js → utils/directive.js} +1 -1
- package/utils/internal/checks.d.ts +49 -0
- package/utils/internal/checks.js +60 -0
- package/utils/internal/dom.d.ts +25 -0
- package/utils/internal/dom.js +61 -0
- package/utils/internal/func.d.ts +11 -0
- package/utils/internal/func.js +11 -0
- package/utils/internal/isFocusable.d.ts +9 -0
- package/utils/internal/isFocusable.js +35 -0
- package/utils/internal/math.d.ts +5 -0
- package/utils/internal/math.js +13 -0
- package/utils/internal/promise.d.ts +87 -0
- package/utils/internal/promise.js +169 -0
- package/utils/internal/scrollbars.d.ts +8 -0
- package/{dist/lib/modal → utils/internal}/scrollbars.js +7 -1
- package/utils/internal/sort.d.ts +16 -0
- package/utils/internal/sort.js +28 -0
- package/utils/internal/textDirection.d.ts +7 -0
- package/utils/internal/textDirection.js +7 -0
- package/utils/internal/traversal.d.ts +54 -0
- package/utils/internal/traversal.js +105 -0
- package/{dist/lib/services → utils}/stores.d.ts +67 -33
- package/{dist/lib/services → utils}/stores.js +121 -59
- package/utils/writables.d.ts +32 -0
- package/utils/writables.js +72 -0
- package/dist/lib/index.d.ts +0 -11
- package/dist/lib/index.js +0 -11
- package/dist/lib/modal/scrollbars.d.ts +0 -2
- package/dist/lib/select.d.ts +0 -199
- package/dist/lib/select.js +0 -240
- package/dist/lib/services/checks.d.ts +0 -32
- package/dist/lib/services/checks.js +0 -43
- package/dist/lib/services/index.d.ts +0 -6
- package/dist/lib/services/index.js +0 -6
- package/dist/lib/services/portal.js +0 -33
- package/dist/lib/services/writables.d.ts +0 -7
- package/dist/lib/services/writables.js +0 -16
- package/dist/lib/transitions/bootstrap/collapse.d.ts +0 -2
- package/dist/lib/transitions/bootstrap/fade.d.ts +0 -1
- package/dist/lib/transitions/bootstrap/index.d.ts +0 -2
- package/dist/lib/transitions/bootstrap/index.js +0 -2
- package/dist/lib/transitions/collapse.d.ts +0 -29
- package/dist/lib/transitions/index.d.ts +0 -5
- package/dist/lib/transitions/index.js +0 -5
- package/dist/lib/transitions/simpleClassTransition.js +0 -28
- package/dist/lib/transitions/utils.d.ts +0 -20
- package/dist/lib/transitions/utils.js +0 -83
- package/dist/lib/tsdoc-metadata.json +0 -11
- package/dist/lib/types.js +0 -7
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -2
- /package/{dist/lib/pagination.utils.d.ts → components/pagination/bootstrap.d.ts} +0 -0
- /package/{dist/lib/pagination.utils.js → components/pagination/bootstrap.js} +0 -0
- /package/{dist/lib/services → services}/focustrack.d.ts +0 -0
- /package/{dist/lib → services}/transitions/bootstrap/collapse.js +0 -0
- /package/{dist/lib → services}/transitions/bootstrap/fade.js +0 -0
- /package/{dist/lib/services/directiveUtils.d.ts → utils/directive.d.ts} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReadableSignal } from '@amadeus-it-group/tansu';
|
|
2
|
-
export declare const promiseFromStore: <T>(store: ReadableSignal<T>, condition?: (value: T) => boolean) => {
|
|
3
|
-
promise: Promise<T>;
|
|
4
|
-
unsubscribe(): void;
|
|
5
|
-
};
|
|
6
|
-
export declare const promiseFromEvent: (element: EventTarget, event: string) => {
|
|
7
|
-
promise: Promise<Event>;
|
|
8
|
-
unsubscribe(): void;
|
|
9
|
-
};
|
|
10
|
-
export declare const promiseFromTimeout: (delay: number) => {
|
|
11
|
-
promise: Promise<void>;
|
|
12
|
-
unsubscribe(): void;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Launch a reflow using a call to the provided html element getBoudingClientRect
|
|
16
|
-
* @param element the html element
|
|
17
|
-
*/
|
|
18
|
-
export declare function reflow(element?: HTMLElement): void;
|
|
19
|
-
export declare const addClasses: (element: HTMLElement, classes?: string[]) => void;
|
|
20
|
-
export declare const removeClasses: (element: HTMLElement, classes?: string[]) => void;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const noop = () => {
|
|
2
|
-
/* nothing to do*/
|
|
3
|
-
};
|
|
4
|
-
const truthyValue = (value) => !!value;
|
|
5
|
-
export const promiseFromStore = (store, condition = truthyValue) => {
|
|
6
|
-
let resolve;
|
|
7
|
-
const promise = new Promise((r) => (resolve = r));
|
|
8
|
-
let unsubscribe = () => {
|
|
9
|
-
storeUnsubscribe();
|
|
10
|
-
unsubscribe = noop;
|
|
11
|
-
};
|
|
12
|
-
let storeUnsubscribe = noop;
|
|
13
|
-
storeUnsubscribe = store.subscribe((value) => {
|
|
14
|
-
if (condition(value)) {
|
|
15
|
-
resolve(value);
|
|
16
|
-
unsubscribe();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
if (unsubscribe === noop) {
|
|
20
|
-
storeUnsubscribe();
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
promise,
|
|
24
|
-
unsubscribe() {
|
|
25
|
-
unsubscribe();
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export const promiseFromEvent = (element, event) => {
|
|
30
|
-
let resolve;
|
|
31
|
-
const promise = new Promise((r) => (resolve = r));
|
|
32
|
-
let unsubscribe = () => {
|
|
33
|
-
element.removeEventListener(event, eventListener);
|
|
34
|
-
unsubscribe = noop;
|
|
35
|
-
};
|
|
36
|
-
const eventListener = (event) => {
|
|
37
|
-
if (event.target === element) {
|
|
38
|
-
resolve(event);
|
|
39
|
-
unsubscribe();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
element.addEventListener(event, eventListener);
|
|
43
|
-
return {
|
|
44
|
-
promise,
|
|
45
|
-
unsubscribe() {
|
|
46
|
-
unsubscribe();
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export const promiseFromTimeout = (delay) => {
|
|
51
|
-
let timeout;
|
|
52
|
-
return {
|
|
53
|
-
promise: new Promise((r) => {
|
|
54
|
-
timeout = setTimeout(() => {
|
|
55
|
-
timeout = undefined;
|
|
56
|
-
r();
|
|
57
|
-
}, delay);
|
|
58
|
-
}),
|
|
59
|
-
unsubscribe() {
|
|
60
|
-
if (timeout) {
|
|
61
|
-
clearTimeout(timeout);
|
|
62
|
-
timeout = undefined;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Launch a reflow using a call to the provided html element getBoudingClientRect
|
|
69
|
-
* @param element the html element
|
|
70
|
-
*/
|
|
71
|
-
export function reflow(element = document.body) {
|
|
72
|
-
element.getBoundingClientRect();
|
|
73
|
-
}
|
|
74
|
-
export const addClasses = (element, classes) => {
|
|
75
|
-
if (classes && classes.length > 0) {
|
|
76
|
-
element.classList.add(...classes);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
export const removeClasses = (element, classes) => {
|
|
80
|
-
if (classes && classes.length > 0) {
|
|
81
|
-
element.classList.remove(...classes);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.36.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
package/dist/lib/types.js
DELETED
package/dist/lib/utils.d.ts
DELETED
package/dist/lib/utils.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|