@creative-web-solution/front-library 7.1.50 → 7.1.52
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
CHANGED
package/Modules/Popin/Tools.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
export const FOCUSABLE_ELEMENTS_SELECTOR = 'a,button,input,select,textarea';
|
|
2
|
+
export const FOCUSABLE_ELEMENTS_SELECTOR = 'a,button,input,select,textarea,iframe';
|
|
3
3
|
|
|
4
4
|
export function toggleTabIndex( $elements: NodeListOf<HTMLElement> | undefined | null, $popin: HTMLElement, activate: boolean ): void {
|
|
5
5
|
$elements = $elements || $popin.querySelectorAll( FOCUSABLE_ELEMENTS_SELECTOR );
|
|
@@ -206,17 +206,6 @@ export default class Input implements FLib.Validator.Input {
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
#labelToMessage = ( validatorName: string, _locale?: { [ key: string ]: string }, avoidDefaultMessage?: boolean ): string => {
|
|
209
|
-
let customInlineDefaultMessage,
|
|
210
|
-
customErrorDefaultMessage,
|
|
211
|
-
customInlineMessage;
|
|
212
|
-
|
|
213
|
-
if ( !avoidDefaultMessage ) {
|
|
214
|
-
// In attribute data-error-label
|
|
215
|
-
customInlineDefaultMessage = this.#inlineCustomErrorMessages[ 'default' ];
|
|
216
|
-
// In global options configuration
|
|
217
|
-
customErrorDefaultMessage = this.#options.errorMessages[ 'default' ];
|
|
218
|
-
}
|
|
219
|
-
|
|
220
209
|
// Forced in parameters of this function
|
|
221
210
|
const forcedJSMessage = _locale ? _locale[ validatorName ] : null;
|
|
222
211
|
|
|
@@ -225,27 +214,24 @@ export default class Input implements FLib.Validator.Input {
|
|
|
225
214
|
}
|
|
226
215
|
|
|
227
216
|
// In attribute data-error-label-VALIDATOR_NAME
|
|
228
|
-
customInlineMessage = this.#inlineCustomErrorMessages[ validatorName ];
|
|
229
|
-
if ( customInlineMessage ) {
|
|
230
|
-
customInlineMessage =
|
|
231
|
-
this.#options.errorMessages[ customInlineMessage ] ||
|
|
232
|
-
customInlineMessage;
|
|
233
|
-
}
|
|
217
|
+
const customInlineMessage = this.#inlineCustomErrorMessages[ validatorName ];
|
|
234
218
|
|
|
235
219
|
if ( customInlineMessage ) {
|
|
236
|
-
return customInlineMessage
|
|
220
|
+
return this.#options.errorMessages[ customInlineMessage ] ||
|
|
221
|
+
customInlineMessage;
|
|
237
222
|
}
|
|
238
223
|
|
|
239
224
|
// In global options configuration
|
|
240
225
|
const customErrorMessage = this.#options.errorMessages[ validatorName ];
|
|
241
226
|
|
|
242
|
-
if (
|
|
243
|
-
return customErrorMessage;
|
|
227
|
+
if ( avoidDefaultMessage ) {
|
|
228
|
+
return customErrorMessage || validatorName;
|
|
244
229
|
}
|
|
245
230
|
|
|
246
231
|
return (
|
|
247
|
-
|
|
248
|
-
|
|
232
|
+
this.#inlineCustomErrorMessages[ 'default' ] ||
|
|
233
|
+
this.#options.errorMessages[ 'default' ] ||
|
|
234
|
+
customErrorMessage ||
|
|
249
235
|
validatorName
|
|
250
236
|
);
|
|
251
237
|
}
|
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.52",
|
|
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": [],
|