@creative-web-solution/front-library 7.0.6 → 7.1.2
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 +30 -0
- package/DOM/Class.ts +10 -12
- package/DOM/DocumentSize.ts +3 -1
- package/DOM/Filter.ts +0 -2
- package/DOM/Index.ts +1 -3
- package/DOM/Manipulation.ts +0 -3
- package/DOM/Matrix.ts +12 -12
- package/DOM/Offset.ts +4 -5
- package/DOM/OuterSize.ts +12 -12
- package/DOM/PageToDOM.ts +2 -2
- package/DOM/Position.ts +3 -3
- package/DOM/Size.ts +3 -7
- package/DOM/StrToDOM.ts +0 -1
- package/DOM/Styles.ts +3 -12
- package/DOM/Traversing.ts +0 -6
- package/DOM/WindowScroll.ts +3 -1
- package/DOM/WindowSize.ts +3 -1
- package/DOM/Wrap.ts +0 -1
- package/Events/DeviceOrientation.ts +27 -31
- package/Events/EventsManager.ts +10 -25
- package/Events/Gesture.ts +36 -37
- package/Events/HistoryController.ts +11 -17
- package/Events/ImageLoad.ts +35 -19
- package/Events/IntersectObserver.ts +15 -19
- package/Events/KeyboardHandler.ts +10 -8
- package/Events/MediaQueriesEvents.ts +53 -51
- package/Events/OnAnimationEnd.ts +5 -6
- package/Events/OnTransitionEnd.ts +3 -3
- package/Events/PubSub.ts +5 -8
- package/Events/TouchHover.ts +18 -21
- package/Events/WindowEvents.ts +26 -30
- package/Helpers/Colors.ts +7 -23
- package/Helpers/Cookie.ts +5 -12
- package/Helpers/Coordinates.ts +0 -7
- package/Helpers/Debounce.ts +3 -7
- package/Helpers/Defer.ts +1 -1
- package/Helpers/GetValue.ts +0 -2
- package/Helpers/Insert.ts +0 -1
- package/Helpers/Sequential.ts +0 -2
- package/Helpers/Slice.ts +0 -3
- package/Helpers/Throttle.ts +0 -1
- package/Helpers/TransitionHelpers.ts +95 -0
- package/Helpers/Type.ts +1 -14
- package/Helpers/Unique.ts +3 -3
- package/Helpers/UrlParser.ts +14 -23
- package/Helpers/Wait.ts +1 -1
- package/Modules/Accordion/Tab.ts +19 -17
- package/Modules/Accordion/index.ts +27 -19
- package/Modules/Autocomplete.ts +95 -101
- package/Modules/DragSlider.ts +72 -63
- package/Modules/GlobalState.ts +60 -53
- package/Modules/LoadGMap.ts +4 -7
- package/Modules/Notifications/Notification.ts +28 -32
- package/Modules/Notifications/index.ts +43 -36
- package/Modules/Popin/Popin.ts +100 -110
- package/Modules/Popin/PopinAccessibility.ts +8 -8
- package/Modules/Popin/PopinBackground.ts +12 -12
- package/Modules/Popin/PopinController.ts +24 -30
- package/Modules/Popin/Tools.ts +18 -19
- package/Modules/QuickTemplate.ts +4 -6
- package/Modules/ScrollSnap.ts +110 -104
- package/Modules/SkinCheckbox.ts +52 -38
- package/Modules/SkinFile.ts +63 -53
- package/Modules/SkinRadio.ts +63 -43
- package/Modules/SkinSelect.ts +117 -101
- package/Modules/Slider/Slide.ts +49 -52
- package/Modules/Slider/Slider.ts +100 -136
- package/Modules/Slider/SliderControls.ts +60 -59
- package/Modules/Tabs/Tab.ts +28 -24
- package/Modules/Tabs/index.ts +36 -26
- package/Modules/Validator/Date.ts +2 -1
- package/Modules/Validator/Equals.ts +1 -1
- package/Modules/Validator/Internal/Input.ts +366 -0
- package/Modules/Validator/Internal/InputValidator.ts +99 -0
- package/Modules/Validator/Internal/ValidatorFunctionsController.ts +58 -0
- package/Modules/Validator/Max.ts +1 -1
- package/Modules/Validator/Min.ts +1 -1
- package/Modules/Validator/MultiRequired.ts +5 -5
- package/Modules/Validator/Number.ts +1 -0
- package/Modules/Validator/Pattern.ts +1 -1
- package/Modules/Validator/Recaptcha.ts +1 -0
- package/Modules/Validator/Required.ts +3 -2
- package/Modules/Validator/ServerCheck.ts +23 -15
- package/Modules/Validator/Tools/GetQueryFromForm.ts +1 -6
- package/Modules/Validator/Tools/IsDate.ts +2 -3
- package/Modules/Validator/Tools/IsEmail.ts +2 -5
- package/Modules/Validator/Tools/IsEmpty.ts +0 -2
- package/Modules/Validator/Tools/IsNumber.ts +0 -2
- package/Modules/Validator/Tools/IsUrl.ts +1 -3
- package/Modules/Validator/Tools/Label.ts +5 -15
- package/Modules/Validator/Tools/RadioButton.ts +4 -10
- package/Modules/Validator/Url.ts +1 -0
- package/Modules/Validator/index.ts +36 -36
- package/Modules/YouTubePlayer.ts +18 -16
- package/README.md +1 -1
- package/Types/Accordion.d.ts +41 -0
- package/Types/Autocomplete.d.ts +94 -0
- package/Types/DOM.d.ts +69 -0
- package/Types/DragSlider.d.ts +56 -0
- package/Types/EventsHelpers.d.ts +390 -0
- package/Types/GLImageTransition.d.ts +47 -43
- package/Types/GlobalState.d.ts +9 -0
- package/Types/Helpers.d.ts +63 -0
- package/Types/Notifications.d.ts +48 -44
- package/Types/Popin.d.ts +113 -0
- package/Types/ScrollSnap.d.ts +66 -0
- package/Types/SkinCheckbox.d.ts +35 -0
- package/Types/SkinFile.d.ts +45 -0
- package/Types/SkinRadio.d.ts +37 -0
- package/Types/SkinSelect.d.ts +72 -0
- package/Types/Slider.d.ts +106 -0
- package/Types/Tabs.d.ts +33 -0
- package/Types/Validator.d.ts +99 -0
- package/Types/YouTubePlayer.d.ts +27 -0
- package/Types/index.d.ts +22 -21
- package/WebGL/GLImageTransition/GLImageTransition.ts +83 -80
- package/WebGL/GLImageTransition/Presets/Cellular.ts +11 -11
- package/WebGL/GLImageTransition/Presets/Fade.ts +2 -3
- package/WebGL/GLImageTransition/Presets/HorizontalMovingGrid.ts +9 -9
- package/WebGL/GLImageTransition/Presets/PresetSample.ts +11 -9
- package/WebGL/GLImageTransition/Presets/Solarisation.ts +7 -12
- package/package.json +1 -1
- package/Modules/Template.ts +0 -209
- package/Types/AccordionTypes.d.ts +0 -29
- package/Types/AutocompleteTypes.d.ts +0 -85
- package/Types/DOMTypes.d.ts +0 -62
- package/Types/DragSliderTypes.d.ts +0 -52
- package/Types/EventsHelpersTypes.d.ts +0 -370
- package/Types/GlobalStateTypes.d.ts +0 -5
- package/Types/HelpersTypes.d.ts +0 -23
- package/Types/MediaPreloaderTypes.d.ts +0 -12
- package/Types/PopinTypes.d.ts +0 -83
- package/Types/ScrollSnapTypes.d.ts +0 -62
- package/Types/SkinCheckboxTypes.d.ts +0 -23
- package/Types/SkinFileTypes.d.ts +0 -34
- package/Types/SkinRadioTypes.d.ts +0 -24
- package/Types/SkinSelectTypes.d.ts +0 -48
- package/Types/SliderTypes.d.ts +0 -97
- package/Types/TabsTypes.d.ts +0 -22
- package/Types/ValidatorTypes.d.ts +0 -61
- package/Types/YouTubePlayerTypes.d.ts +0 -23
package/Types/SliderTypes.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
type SlideDirectionType = -1 | 1;
|
|
2
|
-
|
|
3
|
-
type SlidePropertiesType = {
|
|
4
|
-
$slide: HTMLElement;
|
|
5
|
-
id: string;
|
|
6
|
-
delay: number;
|
|
7
|
-
index: number;
|
|
8
|
-
position: number;
|
|
9
|
-
isFirst: boolean;
|
|
10
|
-
isLast: boolean;
|
|
11
|
-
isVisible: boolean;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
page: number;
|
|
14
|
-
pageIndex: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type SlideOptionsType = {
|
|
19
|
-
nbSlideVisibleBefore: number;
|
|
20
|
-
nbSlideVisibleAfter: number;
|
|
21
|
-
slidePerPage: number;
|
|
22
|
-
moveByPage: boolean;
|
|
23
|
-
nbSlides: number;
|
|
24
|
-
nbPages: number;
|
|
25
|
-
speed: number;
|
|
26
|
-
$slide: HTMLElement;
|
|
27
|
-
index: number;
|
|
28
|
-
/** Internal function using GSAP to set CSS styles. Can be override to use another library */
|
|
29
|
-
_setStyle?: ( $elem, styles ) => void;
|
|
30
|
-
/** Internal function using GSAP to tween element. Can be override to use another library */
|
|
31
|
-
_tweenTo?: ( $elem, styles ) => void;
|
|
32
|
-
/** Internal function using GSAP to initialize and tween element. Can be override to use another library */
|
|
33
|
-
_tweenFromTo?: ( $elem, init, styles ) => void;
|
|
34
|
-
/** Internal function using GSAP to remove tweens from element. Can be override to use another library */
|
|
35
|
-
_killTweens?: ( $elem ) => void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type SliderCallbackType = ({ currentSlide: SlidePropertiesType, targetSlide: SlidePropertiesType }) => void;
|
|
40
|
-
type SliderInitCallbackType = ({ currentSlide: SlidePropertiesType }) => void;
|
|
41
|
-
|
|
42
|
-
type SliderOptionsType = {
|
|
43
|
-
/** @default 0 */
|
|
44
|
-
startSlide?: number;
|
|
45
|
-
/** @default 0 */
|
|
46
|
-
nbSlideVisibleBefore?: number;
|
|
47
|
-
/** @default 0 */
|
|
48
|
-
nbSlideVisibleAfter?: number;
|
|
49
|
-
/** @default 1 */
|
|
50
|
-
slidePerPage?: number;
|
|
51
|
-
/** @default true */
|
|
52
|
-
moveByPage?: boolean;
|
|
53
|
-
/** In second
|
|
54
|
-
* @default 0.5
|
|
55
|
-
*/
|
|
56
|
-
speed?: number;
|
|
57
|
-
/** @default true */
|
|
58
|
-
smoothHeight?: boolean;
|
|
59
|
-
/** @default .list */
|
|
60
|
-
listSelector?: string;
|
|
61
|
-
/** @default .item */
|
|
62
|
-
itemsSelector?: string;
|
|
63
|
-
/** @default */
|
|
64
|
-
activeClass?: string;
|
|
65
|
-
/** @default active-slide */
|
|
66
|
-
loop?: boolean;
|
|
67
|
-
/** Called one time at the begining of the animation */
|
|
68
|
-
onBefore?: SliderCallbackType;
|
|
69
|
-
/** Called for every slide that will come in the 1st position during the animation */
|
|
70
|
-
onBeforeEach?: SliderCallbackType;
|
|
71
|
-
/** Called one time at the end of the animation */
|
|
72
|
-
onAfter?: SliderCallbackType;
|
|
73
|
-
/** Called for every slide that is came in the 1st position during the animation */
|
|
74
|
-
onAfterEach?: SliderCallbackType;
|
|
75
|
-
/** Called one time at the initialisation of the slider */
|
|
76
|
-
onStart?: SliderInitCallbackType;
|
|
77
|
-
/** Internal function using GSAP to set CSS styles. Can be override to use another library */
|
|
78
|
-
_setStyle?: ( $elem, styles ) => void;
|
|
79
|
-
/** Internal function using GSAP to tween element. Can be override to use another library */
|
|
80
|
-
_tweenTo?: ( $elem, styles ) => void;
|
|
81
|
-
/** Internal function using GSAP to initialize and tween element. Can be override to use another library */
|
|
82
|
-
_tweenFromTo?: ( $elem, init, styles ) => void;
|
|
83
|
-
/** Internal function using GSAP to remove tweens from element. Can be override to use another library */
|
|
84
|
-
_killTweens?: ( $elem ) => void;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
type SliderControlsOptionsType = {
|
|
88
|
-
$btPrev?: HTMLElement;
|
|
89
|
-
$btNext?: HTMLElement;
|
|
90
|
-
$pagination?: HTMLElement;
|
|
91
|
-
paginationItemsSelector?: string;
|
|
92
|
-
/** In second */
|
|
93
|
-
autoslide?: number | boolean;
|
|
94
|
-
swipe?: boolean;
|
|
95
|
-
enableKeyboard?: boolean;
|
|
96
|
-
gestureOptions?: GestureOptionsType;
|
|
97
|
-
}
|
package/Types/TabsTypes.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type TabsAnimationFunctionType = ( $tab: HTMLElement, $panel: HTMLElement ) => Promise<void>;
|
|
2
|
-
type TabsCallbackType = ( $tab: HTMLElement, $panel: HTMLElement, autoClose?: boolean ) => void;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type TabsOptionsType = {
|
|
6
|
-
/** Default: 'li[aria-selected]' */
|
|
7
|
-
tabSelector: string;
|
|
8
|
-
onOpenAtStart?: TabsCallbackType;
|
|
9
|
-
onOpen?: TabsCallbackType;
|
|
10
|
-
onClose?: TabsCallbackType;
|
|
11
|
-
animations: {
|
|
12
|
-
open: TabsAnimationFunctionType;
|
|
13
|
-
close: TabsAnimationFunctionType;
|
|
14
|
-
destroy: TabsAnimationFunctionType;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type TabOptionsType = TabsOptionsType & {
|
|
20
|
-
onOpenTab: (( tab: Tab ) => void) | null;
|
|
21
|
-
index: number;
|
|
22
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
type ValidatorValidationState = {
|
|
2
|
-
$input: HTMLElement;
|
|
3
|
-
value: string | string[];
|
|
4
|
-
isValid: boolean;
|
|
5
|
-
label: string;
|
|
6
|
-
data?: any;
|
|
7
|
-
isLiveValidation: boolean;
|
|
8
|
-
extraErrorMessages?: string[];
|
|
9
|
-
extraMessages?: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type ValidatorValidatorType = {
|
|
13
|
-
name: string;
|
|
14
|
-
selector: string;
|
|
15
|
-
isAsynch: boolean;
|
|
16
|
-
validate: ValidatorValidateFunctionType;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type ValidatorValidateFunctionType = ( $input: HTMLElement, value: string | string[], isLiveValidation: boolean, validatorOptions ) => Promise<ValidatorValidationState>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type ValidatorValidationReturnType = {
|
|
24
|
-
"inputs": Input[];
|
|
25
|
-
"errors": Input[];
|
|
26
|
-
"$form": HTMLElement;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type ValidatorFieldValidationReturnType = {
|
|
30
|
-
"input": Input;
|
|
31
|
-
"error": Input | null;
|
|
32
|
-
"$form": HTMLElement;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type ValidatorOptionsType = {
|
|
37
|
-
/** @default input,textarea,select */
|
|
38
|
-
fields?: string;
|
|
39
|
-
/** @default input[type="button"], input[type="submit"], input[type="reset"], input */
|
|
40
|
-
filter?: string;
|
|
41
|
-
/** @default data-error-label */
|
|
42
|
-
customErrorLabelPrefix?: string;
|
|
43
|
-
/** @default {} */
|
|
44
|
-
errorMessages?: { [ key: string ]: string };
|
|
45
|
-
validatorsOptions?: { [ key: string ]: any };
|
|
46
|
-
onValidate?: ( data: ValidatorValidationReturnType ) => void;
|
|
47
|
-
onInvalidate?: ( data: ValidatorValidationReturnType ) => void;
|
|
48
|
-
liveValidation?: {
|
|
49
|
-
onValidate?: ( input: Input, event ) => void;
|
|
50
|
-
onInvalidate?: ( input: Input, event ) => void;
|
|
51
|
-
eventsName?: {
|
|
52
|
-
/** @default change */
|
|
53
|
-
optin?: string;
|
|
54
|
-
/** @default change */
|
|
55
|
-
select?: string;
|
|
56
|
-
/** @default input */
|
|
57
|
-
inputText?: string;
|
|
58
|
-
}
|
|
59
|
-
eventsHook
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type YouTubePlayerOptionsType = {
|
|
2
|
-
height: number;
|
|
3
|
-
width: number;
|
|
4
|
-
videoId: string;
|
|
5
|
-
$wrapper: HTMLElement;
|
|
6
|
-
/**
|
|
7
|
-
* @default //www.youtube.com/iframe_api
|
|
8
|
-
*/
|
|
9
|
-
apiUrl?: string;
|
|
10
|
-
onPlayerStateChange?: ( e: YT.PlayerEvent ) => void;
|
|
11
|
-
/**
|
|
12
|
-
* @default { "autoplay": 0, "controls": 2, "autohide": 1, "modestbranding": 1, "showinfo": 0 }
|
|
13
|
-
*/
|
|
14
|
-
playerVars?: YT.PlayerVars;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type YouTubePlayerWindowType = Window & typeof globalThis & {
|
|
18
|
-
onYouTubeIframeAPIReady: (() => void) | null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type YouTubePlayerWrapper = HTMLElement & {
|
|
22
|
-
YTPlayer: YT.Player;
|
|
23
|
-
}
|