@creative-web-solution/front-library 7.1.4 → 7.1.7
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 +15 -0
- package/Modules/Popin/Popin.ts +3 -2
- package/Modules/SkinCheckbox.ts +4 -4
- package/Modules/SkinRadio.ts +5 -5
- package/Modules/SkinSelect.ts +12 -8
- package/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/Popin/Popin.ts
CHANGED
|
@@ -53,7 +53,7 @@ export default class Popin {
|
|
|
53
53
|
|
|
54
54
|
if ( _controllerOptions ) {
|
|
55
55
|
this.#options = userOptions as FLib.Popin.Options;
|
|
56
|
-
this.#backgroundLayer = _controllerOptions.background;
|
|
56
|
+
this.#backgroundLayer = _controllerOptions.background as PopinBackground;
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
59
|
this.#options = extend( defaultOptions, userOptions );
|
|
@@ -427,7 +427,8 @@ export default class Popin {
|
|
|
427
427
|
e.preventDefault();
|
|
428
428
|
|
|
429
429
|
if ( this.#controllerOptions ) {
|
|
430
|
-
|
|
430
|
+
this.#controllerOptions.controller.close();
|
|
431
|
+
return;
|
|
431
432
|
}
|
|
432
433
|
|
|
433
434
|
this.#closePopin();
|
package/Modules/SkinCheckbox.ts
CHANGED
|
@@ -16,16 +16,16 @@ const defaultOptions: FLib.SkinCheckbox.Options = {
|
|
|
16
16
|
*/
|
|
17
17
|
export default class SkinCheckbox implements FLib.SkinCheckbox.SkinCheckbox {
|
|
18
18
|
|
|
19
|
-
#$checkbox
|
|
20
|
-
#options
|
|
21
|
-
#$parent
|
|
19
|
+
#$checkbox: FLib.SkinCheckbox.CustomCheckbox;
|
|
20
|
+
#options: FLib.SkinCheckbox.Options;
|
|
21
|
+
#$parent: FLib.SkinCheckbox.CustomCheckboxParent;
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
constructor( $checkbox: HTMLInputElement, userOptions: Partial<FLib.SkinCheckbox.Options> = {} ) {
|
|
25
25
|
|
|
26
26
|
// Already skinned
|
|
27
27
|
if ( ($checkbox as FLib.SkinCheckbox.CustomCheckbox).__skinAPI ) {
|
|
28
|
-
|
|
28
|
+
throw 'SkinSelect: Select already skinned';
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
this.#$checkbox = $checkbox;
|
package/Modules/SkinRadio.ts
CHANGED
|
@@ -27,16 +27,16 @@ const defaultOptions = {
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export default class SkinRadioButton implements FLib.SkinRadio.SkinRadio {
|
|
30
|
-
#$radio
|
|
31
|
-
#options
|
|
32
|
-
#$parent
|
|
33
|
-
#$rdGroup
|
|
30
|
+
#$radio: FLib.SkinRadio.CustomRadioButton;
|
|
31
|
+
#options: FLib.SkinRadio.Options;
|
|
32
|
+
#$parent: FLib.SkinRadio.CustomRadioButtonParent;
|
|
33
|
+
#$rdGroup: NodeListOf<FLib.SkinRadio.CustomRadioButton>;
|
|
34
34
|
|
|
35
35
|
constructor( $radio: HTMLInputElement, userOptions?: Partial<FLib.SkinRadio.Options> ) {
|
|
36
36
|
|
|
37
37
|
// Already skinned
|
|
38
38
|
if ( ($radio as FLib.SkinRadio.CustomRadioButton).__skinAPI ) {
|
|
39
|
-
|
|
39
|
+
throw 'SkinSelect: Select already skinned';
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
this.#$radio = $radio;
|
package/Modules/SkinSelect.ts
CHANGED
|
@@ -38,22 +38,26 @@ const defaultOptions: FLib.SkinSelect.Options = {
|
|
|
38
38
|
* You can access the skin API in the __skinAPI property of the $select HTMLElement or its wrapper.
|
|
39
39
|
*/
|
|
40
40
|
export default class SkinSelect implements FLib.SkinSelect.SkinSelect {
|
|
41
|
-
#$select
|
|
41
|
+
#$select: FLib.SkinSelect.CustomSelect;
|
|
42
42
|
#loading = false;
|
|
43
|
-
#options
|
|
44
|
-
#extraClass
|
|
45
|
-
#$parent
|
|
46
|
-
#$title
|
|
43
|
+
#options: FLib.SkinSelect.Options;
|
|
44
|
+
#extraClass: string;
|
|
45
|
+
#$parent: FLib.SkinSelect.CustomSelectParent;
|
|
46
|
+
#$title: HTMLElement;
|
|
47
47
|
#isListOpened = false;
|
|
48
48
|
#$options: NodeList | undefined;
|
|
49
49
|
#$lastOption: HTMLElement | null = null;
|
|
50
50
|
#focusedItemIndex = -1;
|
|
51
51
|
#$layer: HTMLElement | undefined;
|
|
52
52
|
|
|
53
|
+
|
|
53
54
|
constructor( $select: FLib.SkinSelect.CustomSelect, userOptions?: Partial<FLib.SkinSelect.Options> ) {
|
|
54
55
|
|
|
55
|
-
if ( $select.hasAttribute( 'multiple' )
|
|
56
|
-
|
|
56
|
+
if ( $select.hasAttribute( 'multiple' ) ) {
|
|
57
|
+
throw 'SkinSelect: This feature doesn\'t work on select with multiple selection';
|
|
58
|
+
}
|
|
59
|
+
else if ( $select.__skinAPI ) {
|
|
60
|
+
throw 'SkinSelect: Select already skinned';
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
this.#$select = $select;
|
|
@@ -146,7 +150,7 @@ export default class SkinSelect implements FLib.SkinSelect.SkinSelect {
|
|
|
146
150
|
|
|
147
151
|
|
|
148
152
|
#openList = (): void => {
|
|
149
|
-
if ( this.#$select
|
|
153
|
+
if ( this.#$select?.disabled || this.#loading ) {
|
|
150
154
|
return;
|
|
151
155
|
}
|
|
152
156
|
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@creative-web-solution/front-library",
|
|
3
3
|
"title": "Frontend library",
|
|
4
4
|
"description": "Frontend functions and modules",
|
|
5
|
-
"version": "7.1.
|
|
5
|
+
"version": "7.1.7",
|
|
6
6
|
"homepage": "https://github.com/creative-web-solution/front-library",
|
|
7
7
|
"author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
|
|
8
8
|
"keywords": [],
|