@htmlplus/element 0.7.0 → 0.7.1
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.
|
@@ -13,8 +13,8 @@ export function Property(options) {
|
|
|
13
13
|
if (next === previous)
|
|
14
14
|
return;
|
|
15
15
|
this[symbol] = next;
|
|
16
|
-
request(this, name, previous, (
|
|
17
|
-
if (!(options === null || options === void 0 ? void 0 : options.reflect) ||
|
|
16
|
+
request(this, name, previous, (skipped) => {
|
|
17
|
+
if (!(options === null || options === void 0 ? void 0 : options.reflect) || skipped)
|
|
18
18
|
return;
|
|
19
19
|
target[CONSTANTS.API_LOCKED] = true;
|
|
20
20
|
updateAttribute(host(this), name, next);
|
|
@@ -6,4 +6,4 @@ import { PlusElement } from '../../types';
|
|
|
6
6
|
* @param previous The previous value of Property/State.
|
|
7
7
|
* @param callback Invoked when the rendering phase is completed.
|
|
8
8
|
*/
|
|
9
|
-
export declare const request: (target: PlusElement, name?: string, previous?: any, callback?:
|
|
9
|
+
export declare const request: (target: PlusElement, name?: string, previous?: any, callback?: ((skipped: boolean) => void) | undefined) => void;
|
|
@@ -54,6 +54,15 @@ export const customElement = (options) => {
|
|
|
54
54
|
path.replaceWith(t.jsxAttribute(t.jsxIdentifier('class'), value));
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
+
// replaces 'tabIndex' attribute with 'tabindex'
|
|
58
|
+
visitor(ast, {
|
|
59
|
+
JSXAttribute(path) {
|
|
60
|
+
const { name, value } = path.node;
|
|
61
|
+
if (name.name != 'tabIndex')
|
|
62
|
+
return;
|
|
63
|
+
path.replaceWith(t.jsxAttribute(t.jsxIdentifier('tabindex'), value));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
57
66
|
// converts 'jsx' to 'uhtml' syntax
|
|
58
67
|
visitor(ast, {
|
|
59
68
|
JSXAttribute: {
|