@creative-web-solution/front-library 7.1.54 → 7.1.56

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.
@@ -1,67 +1,110 @@
1
- import { toggleTabIndex, FOCUSABLE_ELEMENTS_SELECTOR } from './Tools';
2
-
1
+ import { FOCUSABLE_ELEMENTS_SELECTOR } from "./Tools";
3
2
 
4
3
  export default class PopinAccessibility {
5
-
6
- #$elements: NodeListOf<HTMLElement> | undefined;
7
- #$firstElement: HTMLElement | undefined;
8
- #$lastElement: HTMLElement | undefined;
9
- #$popin: HTMLElement;
10
-
11
-
12
- constructor( $popin: HTMLElement ) {
4
+ #$elements: HTMLElement[] | undefined;
5
+ #$firstElement: HTMLElement | undefined;
6
+ #$lastElement: HTMLElement | undefined;
7
+ #$startSentinel: HTMLElement | null = null;
8
+ #$endSentinel: HTMLElement | null = null;
9
+ #$popin: HTMLElement;
10
+ #isFocusBackHandled: boolean = false;
11
+
12
+ constructor($popin: HTMLElement) {
13
13
  this.#$popin = $popin;
14
14
 
15
15
  this.refresh();
16
- this.toggleTabIndexNavigation( false );
17
16
  }
18
17
 
19
-
20
-
21
18
  focusFirstElement(): void {
22
- if ( !this.#$firstElement ) {
19
+ if (!this.#$firstElement) {
23
20
  return;
24
21
  }
25
22
  this.#$firstElement.focus();
26
23
  }
27
24
 
28
-
29
- handleBackwardTab( e: Event ): void {
30
- if ( !this.#$elements?.length || !this.#$firstElement ) {
31
- e.preventDefault();
25
+ focusLastElement(): void {
26
+ if (!this.#$lastElement) {
32
27
  return;
33
28
  }
34
- if ( document.activeElement === this.#$firstElement ) {
35
- e.preventDefault();
36
- this.#$lastElement?.focus();
37
- }
29
+ this.#$lastElement.focus();
38
30
  }
39
31
 
40
-
41
- handleForwardTab( e: Event ): void {
42
- if ( !this.#$elements?.length || !this.#$lastElement ) {
32
+ handleBackwardTab(e: Event): void {
33
+ this.#getFocusableElements();
34
+ if (document.activeElement === this.#$firstElement) {
43
35
  e.preventDefault();
44
- return;
36
+ this.focusLastElement();
45
37
  }
46
- if ( document.activeElement === this.#$lastElement ) {
38
+ }
39
+
40
+ handleForwardTab(e: Event): void {
41
+ this.#getFocusableElements();
42
+ if (document.activeElement === this.#$lastElement) {
47
43
  e.preventDefault();
48
- this.#$firstElement?.focus();
44
+ this.focusFirstElement();
49
45
  }
50
46
  }
51
47
 
48
+ refresh(): void {
49
+ this.#addSentinels();
50
+ this.#handleFocusBackInDocument();
51
+ this.#getFocusableElements();
52
+ }
52
53
 
53
- toggleTabIndexNavigation( activate: boolean ): void {
54
- toggleTabIndex( this.#$elements, this.#$popin, activate );
54
+ #getFocusableElements(): void {
55
+ this.#$elements = Array.from(
56
+ this.#$popin.querySelectorAll<HTMLElement>(
57
+ FOCUSABLE_ELEMENTS_SELECTOR,
58
+ ),
59
+ ).filter(($element) => $element.offsetParent !== null);
60
+ this.#$firstElement = this.#$elements[0] ?? this.#$popin;
61
+ this.#$lastElement = this.#$elements[this.#$elements.length - 1];
62
+ }
55
63
 
56
- if ( activate ) {
57
- this.#$popin.focus();
64
+ #addSentinels(): void {
65
+ if (this.#$startSentinel) {
66
+ return;
58
67
  }
68
+ this.#$startSentinel = document.createElement("div");
69
+ this.#$endSentinel = document.createElement("div");
70
+ [this.#$startSentinel, this.#$endSentinel].forEach(($sentinel) => {
71
+ $sentinel.tabIndex = 0;
72
+ $sentinel.setAttribute("aria-hidden", "true");
73
+ $sentinel.style.cssText =
74
+ "position:fixed;width:1px;height:1px;overflow:hidden;";
75
+ });
76
+ this.#$popin.prepend(this.#$startSentinel);
77
+ this.#$popin.append(this.#$endSentinel);
78
+ this.#$startSentinel.addEventListener("focus", () =>
79
+ this.focusLastElement(),
80
+ );
81
+ this.#$endSentinel.addEventListener("focus", () =>
82
+ this.focusFirstElement(),
83
+ );
59
84
  }
60
85
 
86
+ #handleFocusBackInDocument(): void {
87
+ if (this.#isFocusBackHandled) {
88
+ return;
89
+ }
90
+ this.#isFocusBackHandled = true;
91
+ document.addEventListener("focusin", this.#onFocusBackInDocument);
92
+ }
61
93
 
62
- refresh(): void {
63
- this.#$elements = this.#$popin.querySelectorAll( FOCUSABLE_ELEMENTS_SELECTOR );
64
- this.#$firstElement = this.#$elements[ 0 ] as HTMLElement;
65
- this.#$lastElement = this.#$elements[ this.#$elements.length - 1 ] as HTMLElement;
94
+ #onFocusBackInDocument = (e: FocusEvent): void => {
95
+ if (!this.#$popin.contains(e.target as Node)) {
96
+ this.focusFirstElement();
97
+ }
98
+ };
99
+
100
+ clean(): void {
101
+ document.removeEventListener("focusin", this.#onFocusBackInDocument);
102
+ this.#isFocusBackHandled = false;
103
+
104
+ this.#$startSentinel?.remove();
105
+ this.#$endSentinel?.remove();
106
+
107
+ this.#$startSentinel = null;
108
+ this.#$endSentinel = null;
66
109
  }
67
110
  }
@@ -1,68 +1,63 @@
1
- import { strToDOM } from '../../DOM/StrToDOM';
2
- import PopinController from './PopinController';
3
- import Popin from './Popin';
4
- import { CLICK_EVENT_NAME } from './Tools';
5
-
1
+ import { strToDOM } from "../../DOM/StrToDOM";
2
+ import PopinController from "./PopinController";
3
+ import Popin from "./Popin";
4
+ import { CLICK_EVENT_NAME } from "./Tools";
6
5
 
7
6
  export default class PopinBackground implements FLib.Popin.Background {
8
-
9
7
  #$bgLayer: HTMLElement;
10
8
  #isOpened: boolean;
11
- #options: FLib.Popin.Options;
12
- #popin: Popin | PopinController;
13
-
9
+ #options: FLib.Popin.Options;
10
+ #popin: Popin | PopinController;
14
11
 
15
12
  get isOpened(): boolean {
16
13
  return this.#isOpened;
17
14
  }
18
15
 
19
-
20
- constructor( popin: Popin | PopinController, options: FLib.Popin.Options ) {
16
+ constructor(popin: Popin | PopinController, options: FLib.Popin.Options) {
21
17
  this.#isOpened = false;
22
- this.#popin = popin;
23
- this.#options = options;
24
- this.#$bgLayer = strToDOM( options.templates.bgLayer ) as HTMLElement;
18
+ this.#popin = popin;
19
+ this.#options = options;
20
+ this.#$bgLayer = strToDOM(options.templates.bgLayer) as HTMLElement;
25
21
 
26
- document.body.appendChild( this.#$bgLayer );
22
+ document.body.appendChild(this.#$bgLayer);
27
23
  }
28
24
 
29
-
30
25
  open(): Promise<any> {
31
- if ( this.#isOpened ) {
26
+ if (this.#isOpened) {
32
27
  return Promise.resolve();
33
28
  }
34
29
 
35
- if ( !this.#options.modal ) {
36
- this.#$bgLayer.addEventListener( CLICK_EVENT_NAME, this.#onBgClick );
30
+ if (!this.#options.modal) {
31
+ this.#$bgLayer.addEventListener(CLICK_EVENT_NAME, this.#onBgClick);
37
32
  }
38
33
 
39
- return this.#options.animations.openBg( this.#$bgLayer ).then( () => {
34
+ return this.#options.animations.openBg(this.#$bgLayer).then(() => {
40
35
  this.#isOpened = true;
41
- } );
36
+ });
42
37
  }
43
38
 
44
-
45
39
  close(): Promise<any> {
46
- if ( !this.#isOpened ) {
40
+ if (!this.#isOpened) {
47
41
  return Promise.resolve();
48
42
  }
49
43
 
50
- if ( !this.#options.modal ) {
51
- this.#$bgLayer.removeEventListener( CLICK_EVENT_NAME, this.#onBgClick );
44
+ if (!this.#options.modal) {
45
+ this.#$bgLayer.removeEventListener(
46
+ CLICK_EVENT_NAME,
47
+ this.#onBgClick,
48
+ );
52
49
  }
53
50
 
54
- return this.#options.animations.closeBg( this.#$bgLayer ).then( () => {
51
+ return this.#options.animations.closeBg(this.#$bgLayer).then(() => {
55
52
  this.#isOpened = false;
56
- } );
53
+ });
57
54
  }
58
55
 
59
-
60
56
  #onBgClick = (): void => {
61
57
  this.#popin.close();
62
- }
63
-
58
+ };
64
59
 
65
60
  destroy(): void {
66
- this.#$bgLayer.removeEventListener( CLICK_EVENT_NAME, this.#onBgClick );
61
+ this.#$bgLayer.removeEventListener(CLICK_EVENT_NAME, this.#onBgClick);
67
62
  }
68
63
  }
@@ -1,9 +1,8 @@
1
- import { on, off } from '../../Events/EventsManager';
2
- import { extend } from '../../Helpers/Extend';
3
- import Popin from './Popin';
4
- import PopinBackground from './PopinBackground';
5
- import { CLICK_EVENT_NAME, defaultOptions, toggleTabIndex } from './Tools';
6
-
1
+ import { on, off } from "../../Events/EventsManager";
2
+ import { extend } from "../../Helpers/Extend";
3
+ import Popin from "./Popin";
4
+ import PopinBackground from "./PopinBackground";
5
+ import { CLICK_EVENT_NAME, defaultOptions } from "./Tools";
7
6
 
8
7
  /**
9
8
  * Create a controller tha manage all popin in the page
@@ -15,138 +14,136 @@ import { CLICK_EVENT_NAME, defaultOptions, toggleTabIndex } from './Tools';
15
14
  * popin.loadForm( $form );
16
15
  */
17
16
  export default class PopinController implements FLib.Popin.Controller {
18
- #options: FLib.Popin.Options;
19
- #selectors: FLib.Popin.SelectorsOptions;
17
+ #options: FLib.Popin.Options;
18
+ #selectors: FLib.Popin.SelectorsOptions;
20
19
  #background: PopinBackground;
21
- #popin: Popin;
22
-
23
-
24
- constructor( userOptions: FLib.Popin.OptionsInit = {}, $popin?: HTMLElement ) {
25
-
26
- if ( !( "AbortController" in window ) ) {
27
- throw 'This plugin uses fecth and AbortController. You may need to add a polyfill for this browser.';
20
+ #popin: Popin;
21
+
22
+ constructor(
23
+ userOptions: FLib.Popin.OptionsInit = {},
24
+ $popin?: HTMLElement,
25
+ ) {
26
+ if (!("AbortController" in window)) {
27
+ throw "This plugin uses fecth and AbortController. You may need to add a polyfill for this browser.";
28
28
  }
29
29
 
30
- this.#options = extend( defaultOptions, userOptions );
30
+ this.#options = extend(defaultOptions, userOptions);
31
31
 
32
32
  this.#selectors = this.#options.selectors;
33
33
 
34
34
  // global var, only one background for all popin
35
- this.#background = new PopinBackground( this, this.#options );
36
-
37
- this.#popin = new Popin( {
38
- ...this.#options
39
- },
40
- $popin,
41
- {
42
- "controller": this,
43
- "background": this.#background
44
- } );
35
+ this.#background = new PopinBackground(this, this.#options);
45
36
 
37
+ this.#popin = new Popin(
38
+ {
39
+ ...this.#options,
40
+ },
41
+ $popin,
42
+ {
43
+ controller: this,
44
+ background: this.#background,
45
+ },
46
+ );
46
47
 
47
48
  // ------------------- BINDING
48
49
 
49
- if ( $popin ) {
50
- toggleTabIndex( null, $popin, false );
51
-
52
- on( document.body,
53
- {
54
- "eventsName": CLICK_EVENT_NAME,
55
- "selector": `a[href="#${ $popin.id }"]`,
56
- "callback": this.#openPopinHandler
57
- } );
50
+ if ($popin) {
51
+ on(document.body, {
52
+ eventsName: CLICK_EVENT_NAME,
53
+ selector: `a[href="#${$popin.id}"]`,
54
+ callback: this.#openPopinHandler,
55
+ });
58
56
  return;
59
57
  }
60
58
 
61
- on( document.body,
62
- {
63
- "eventsName": CLICK_EVENT_NAME,
64
- "selector": this.#selectors.links,
65
- "callback": this.#openPopinHandler
66
-
67
- } );
68
- on( document.body,
69
- {
70
- "eventsName": "submit",
71
- "selector": this.#selectors.forms,
72
- "callback": this.#openPopinHandler
73
-
74
- } );
75
-
76
- const $triggerOnLoadPopin = document.querySelector( `[${ this.#selectors.openOnLoadAttribute }]` );
59
+ on(document.body, {
60
+ eventsName: CLICK_EVENT_NAME,
61
+ selector: this.#selectors.links,
62
+ callback: this.#openPopinHandler,
63
+ });
64
+ on(document.body, {
65
+ eventsName: "submit",
66
+ selector: this.#selectors.forms,
67
+ callback: this.#openPopinHandler,
68
+ });
69
+
70
+ const $triggerOnLoadPopin = document.querySelector(
71
+ `[${this.#selectors.openOnLoadAttribute}]`,
72
+ );
77
73
 
78
- if ( $triggerOnLoadPopin ) {
74
+ if ($triggerOnLoadPopin) {
79
75
  this.#parseElement(
80
76
  $triggerOnLoadPopin as HTMLElement,
81
- $triggerOnLoadPopin.getAttribute( this.#selectors.openOnLoadAttribute )
77
+ $triggerOnLoadPopin.getAttribute(
78
+ this.#selectors.openOnLoadAttribute,
79
+ ),
82
80
  );
83
81
  }
84
82
  }
85
83
 
86
-
87
- #parseElement = ( $dom: HTMLElement, customUrl?: string | null ): Promise<void> => {
88
- if ( customUrl ) {
89
- return this.#popin.load( customUrl );
84
+ #parseElement = (
85
+ $dom: HTMLElement,
86
+ customUrl?: string | null,
87
+ ): Promise<void> => {
88
+ if (customUrl) {
89
+ return this.#popin.load(customUrl);
90
90
  }
91
91
 
92
- if ( $dom.nodeName === 'FORM' ) {
93
- return this.#popin.loadForm( $dom as HTMLFormElement );
92
+ if ($dom.nodeName === "FORM") {
93
+ return this.#popin.loadForm($dom as HTMLFormElement);
94
94
  }
95
95
 
96
- const anchor = $dom.getAttribute( 'href' );
96
+ const anchor = $dom.getAttribute("href");
97
97
 
98
- if ( anchor && anchor.indexOf( '#' ) === 0 ) {
98
+ if (anchor && anchor.indexOf("#") === 0) {
99
99
  return this.#popin.open();
100
100
  }
101
101
 
102
- return this.#popin.loadLink( $dom as HTMLAnchorElement );
103
- }
104
-
102
+ return this.#popin.loadLink($dom as HTMLAnchorElement);
103
+ };
105
104
 
106
-
107
- #openPopinHandler = ( e: Event, $target: HTMLElement): void => {
105
+ #openPopinHandler = (e: Event, $target: HTMLElement): void => {
108
106
  e.preventDefault();
109
107
 
110
- this.#parseElement( $target );
111
- }
112
-
108
+ this.#parseElement($target);
109
+ };
113
110
 
114
111
  /**
115
112
  * Load a file and display it in the popin
116
113
  *
117
114
  * @param data - All parameters available for window.fetch
118
115
  */
119
- load( url: string, data: RequestInit, type?: FLib.Popin.ResponseType ): Promise<void> {
120
- return this.#popin.load( url, data, type );
116
+ load(
117
+ url: string,
118
+ data: RequestInit,
119
+ type?: FLib.Popin.ResponseType,
120
+ ): Promise<void> {
121
+ return this.#popin.load(url, data, type);
121
122
  }
122
123
 
123
-
124
124
  /**
125
125
  * Send a form and display the result it in the popin
126
126
  */
127
- loadForm( $form: HTMLFormElement ): Promise<void> {
128
- return this.#popin.loadForm( $form );
127
+ loadForm($form: HTMLFormElement): Promise<void> {
128
+ return this.#popin.loadForm($form);
129
129
  }
130
130
 
131
-
132
131
  /**
133
132
  * Load a page from a link and display the result it in the popin
134
133
  */
135
- loadLink( $link: HTMLAnchorElement ): Promise<void> {
136
- return this.#popin.loadLink( $link );
134
+ loadLink($link: HTMLAnchorElement): Promise<void> {
135
+ return this.#popin.loadLink($link);
137
136
  }
138
137
 
139
-
140
138
  /**
141
139
  * Insert some html in the popin and open it
142
140
  *
143
141
  * @param openFirst - Open the popin THEN insert the html
144
142
  */
145
- set( html: string, openFirst?: boolean ): Promise<void> {
146
- return this.#popin.set( html, openFirst );
143
+ set(html: string, openFirst?: boolean): Promise<void> {
144
+ return this.#popin.set(html, openFirst);
147
145
  }
148
146
 
149
-
150
147
  /**
151
148
  * Remove the content of the popin
152
149
  */
@@ -154,7 +151,6 @@ export default class PopinController implements FLib.Popin.Controller {
154
151
  return this.#popin.clear();
155
152
  }
156
153
 
157
-
158
154
  /**
159
155
  * Close the popin
160
156
  */
@@ -162,7 +158,6 @@ export default class PopinController implements FLib.Popin.Controller {
162
158
  return this.#popin.close();
163
159
  }
164
160
 
165
-
166
161
  /**
167
162
  * Open the popin
168
163
  */
@@ -170,7 +165,6 @@ export default class PopinController implements FLib.Popin.Controller {
170
165
  return this.#popin.open();
171
166
  }
172
167
 
173
-
174
168
  /**
175
169
  * Remove all events, css class or inline styles
176
170
  */
@@ -178,15 +172,11 @@ export default class PopinController implements FLib.Popin.Controller {
178
172
  this.#background.destroy();
179
173
  this.#popin.destroy();
180
174
 
181
- off(
182
- document.body,
183
- {
184
- "eventsName": `${ CLICK_EVENT_NAME } submit`,
185
- "callback": this.#openPopinHandler
186
- }
187
- );
175
+ off(document.body, {
176
+ eventsName: `${CLICK_EVENT_NAME} submit`,
177
+ callback: this.#openPopinHandler,
178
+ });
188
179
 
189
180
  return this;
190
181
  }
191
-
192
182
  }
@@ -1,86 +1,80 @@
1
+ export const FOCUSABLE_ELEMENTS_SELECTOR =
2
+ 'a[href],button:not([disabled]),textarea,input,select,[tabindex]:not([tabindex="-1"])';
1
3
 
2
- export const FOCUSABLE_ELEMENTS_SELECTOR = 'a,button,input,select,textarea,iframe';
3
-
4
- export function toggleTabIndex( $elements: NodeListOf<HTMLElement> | undefined | null, $popin: HTMLElement, activate: boolean ): void {
5
- $elements = $elements || $popin.querySelectorAll( FOCUSABLE_ELEMENTS_SELECTOR );
6
- const tabIndex = activate ? '0' : '-1';
7
- $elements.forEach( e => e.setAttribute( 'tabindex', tabIndex ) );
8
- $popin.setAttribute( 'tabindex', tabIndex );
9
- $popin.setAttribute( 'aria-hidden', activate ? 'false' : 'true' );
10
- }
11
-
12
- export const CLICK_EVENT_NAME = window.matchMedia( '(hover: none)' ).matches ? 'touchend' : 'click';
4
+ export const CLICK_EVENT_NAME = window.matchMedia("(hover: none)").matches
5
+ ? "touchend"
6
+ : "click";
13
7
 
14
8
  export const defaultOptions = {
15
- "modal": false,
16
- "errorMessage": 'Error while loading...',
17
- "marginHeight": 20,
18
- "autoResize": false,
19
- "enableKeyboard": true,
20
- "isBackgroundAside": true,
21
- "onLoad": (): Promise<any> => {
9
+ modal: false,
10
+ errorMessage: "Error while loading...",
11
+ marginHeight: 20,
12
+ autoResize: false,
13
+ enableKeyboard: true,
14
+ isBackgroundAside: true,
15
+ onLoad: (): Promise<any> => {
22
16
  return Promise.resolve();
23
17
  },
24
- "setLinkResponseType": (): string => {
25
- return 'text';
18
+ setLinkResponseType: (): string => {
19
+ return "text";
26
20
  },
27
- "setFormResponseType": (): string => {
28
- return 'text';
21
+ setFormResponseType: (): string => {
22
+ return "text";
29
23
  },
30
- "checkValidity": (): boolean => {
24
+ checkValidity: (): boolean => {
31
25
  return true;
32
26
  },
33
- "normalize": <V>( body: V ): { success: boolean, data: V } => {
27
+ normalize: <V>(body: V): { success: boolean; data: V } => {
34
28
  return {
35
- "success": true,
36
- "data": body
29
+ success: true,
30
+ data: body,
37
31
  };
38
32
  },
39
- "autoHandleAjaxError": true,
40
- "templates": {
41
- "popinLoader": "<div class=\"popin-loader\"></div>",
42
- "popin": "<div class=\"popin\"><div class=\"popin-content\"></div></div>",
43
- "bgLayer": "<div class=\"bg-popin\"></div>",
44
- "errorMessage": "<div class=\"error\">{{ message }}</div>"
33
+ autoHandleAjaxError: true,
34
+ templates: {
35
+ popinLoader: '<div class="popin-loader"></div>',
36
+ popin: '<div class="popin"><div class="popin-content"></div></div>',
37
+ bgLayer: '<div class="bg-popin"></div>',
38
+ errorMessage: '<div class="error">{{ message }}</div>',
45
39
  },
46
- "selectors": {
47
- "popin": ".popin",
48
- "popinBody": ".popin",
49
- "popinContent": ".popin-content",
50
- "links": "a[data-popin]",
51
- "forms": "form[data-popin]",
52
- "btClosePopin": "button[data-close-popin]",
53
- "openOnLoadAttribute": "data-onload-popin"
40
+ selectors: {
41
+ popin: ".popin",
42
+ popinBody: ".popin",
43
+ popinContent: ".popin-content",
44
+ links: "a[data-popin]",
45
+ forms: "form[data-popin]",
46
+ btClosePopin: "button[data-close-popin]",
47
+ openOnLoadAttribute: "data-onload-popin",
54
48
  },
55
- "animations": {
56
- "openBg": ( $bg: HTMLElement ): Promise<any> => {
57
- $bg.style.display = 'block';
49
+ animations: {
50
+ openBg: ($bg: HTMLElement): Promise<any> => {
51
+ $bg.style.display = "block";
58
52
  return Promise.resolve();
59
53
  },
60
- "closeBg": ( $bg: HTMLElement ): Promise<any> => {
61
- $bg.style.display = 'none';
54
+ closeBg: ($bg: HTMLElement): Promise<any> => {
55
+ $bg.style.display = "none";
62
56
  return Promise.resolve();
63
57
  },
64
- "initOpenPopin": ( $popin: HTMLElement ): Promise<any> => {
65
- $popin.style.display = 'block';
66
- $popin.style.opacity = '0';
58
+ initOpenPopin: ($popin: HTMLElement): Promise<any> => {
59
+ $popin.style.display = "block";
60
+ $popin.style.opacity = "0";
67
61
  return Promise.resolve();
68
62
  },
69
- "openPopin": ( $popin: HTMLElement ): Promise<any> => {
70
- $popin.style.opacity = '1';
63
+ openPopin: ($popin: HTMLElement): Promise<any> => {
64
+ $popin.style.opacity = "1";
71
65
  return Promise.resolve();
72
66
  },
73
- "closePopin": ( $popin: HTMLElement ): Promise<any> => {
74
- $popin.style.display = 'none';
67
+ closePopin: ($popin: HTMLElement): Promise<any> => {
68
+ $popin.style.display = "none";
75
69
  return Promise.resolve();
76
70
  },
77
- "openLoader": ( $loader: HTMLElement ): Promise<any> => {
78
- $loader.style.display = 'block';
71
+ openLoader: ($loader: HTMLElement): Promise<any> => {
72
+ $loader.style.display = "block";
79
73
  return Promise.resolve();
80
74
  },
81
- "closeLoader": ( $loader : HTMLElement): Promise<any> => {
82
- $loader.style.display = 'none';
75
+ closeLoader: ($loader: HTMLElement): Promise<any> => {
76
+ $loader.style.display = "none";
83
77
  return Promise.resolve();
84
- }
85
- }
86
- }
78
+ },
79
+ },
80
+ };
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 7.1.54
3
+ @version: 7.1.56
4
4
 
5
5
 
6
6
  ## Use
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.54",
5
+ "version": "7.1.56",
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": [],