@htmlplus/element 2.4.1 → 2.5.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.
- package/client/decorators/element.js +2 -3
- package/constants/index.d.ts +0 -1
- package/constants/index.js +0 -1
- package/package.json +1 -1
- package/types/index.d.ts +1 -6
|
@@ -40,14 +40,13 @@ export function Element() {
|
|
|
40
40
|
const instance = this[CONSTANTS.API_INSTANCE];
|
|
41
41
|
// TODO: experimental for global config
|
|
42
42
|
Object.assign(instance, getConfig('element', getTag(instance), 'property'));
|
|
43
|
+
instance[CONSTANTS.API_CONNECTED] = true;
|
|
43
44
|
const connect = () => {
|
|
44
|
-
instance[CONSTANTS.API_CONNECTED] = true;
|
|
45
|
-
call(instance, CONSTANTS.LIFECYCLE_CONNECTED);
|
|
46
45
|
request(instance, undefined, undefined, () => {
|
|
47
46
|
call(instance, CONSTANTS.LIFECYCLE_LOADED);
|
|
48
47
|
});
|
|
49
48
|
};
|
|
50
|
-
const callback = call(instance, CONSTANTS.
|
|
49
|
+
const callback = call(instance, CONSTANTS.LIFECYCLE_CONNECTED);
|
|
51
50
|
if (!(callback === null || callback === void 0 ? void 0 : callback.then))
|
|
52
51
|
return connect();
|
|
53
52
|
callback.then(() => connect());
|
package/constants/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export declare const DECORATOR_STATE = "State";
|
|
|
16
16
|
export declare const DECORATOR_METHOD = "Method";
|
|
17
17
|
export declare const ELEMENT_HOST_NAME = "host";
|
|
18
18
|
export declare const LIFECYCLE_ADOPTED = "adoptedCallback";
|
|
19
|
-
export declare const LIFECYCLE_CONNECT = "connectCallback";
|
|
20
19
|
export declare const LIFECYCLE_CONNECTED = "connectedCallback";
|
|
21
20
|
export declare const LIFECYCLE_CONSTRUCTED = "constructedCallback";
|
|
22
21
|
export declare const LIFECYCLE_DISCONNECTED = "disconnectedCallback";
|
package/constants/index.js
CHANGED
|
@@ -22,7 +22,6 @@ export const DECORATOR_METHOD = 'Method';
|
|
|
22
22
|
export const ELEMENT_HOST_NAME = 'host';
|
|
23
23
|
// lifecycle
|
|
24
24
|
export const LIFECYCLE_ADOPTED = 'adoptedCallback';
|
|
25
|
-
export const LIFECYCLE_CONNECT = 'connectCallback';
|
|
26
25
|
export const LIFECYCLE_CONNECTED = 'connectedCallback';
|
|
27
26
|
export const LIFECYCLE_CONSTRUCTED = 'constructedCallback';
|
|
28
27
|
export const LIFECYCLE_DISCONNECTED = 'disconnectedCallback';
|
package/package.json
CHANGED