@web3auth/modal 10.0.2 → 10.0.4
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/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +3 -0
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +9 -2
- package/dist/lib.cjs/types/react/wagmi/constants.d.ts +1 -0
- package/dist/lib.cjs/types/vue/wagmi/constants.d.ts +1 -0
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +3 -0
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +9 -2
- package/dist/modal.umd.min.js +1 -1
- package/dist/modal.umd.min.js.LICENSE.txt +4 -0
- package/package.json +18 -17
- package/dist/lib.cjs/types/ui/components/Footer/index.d.ts +0 -2
- package/dist/lib.cjs/types/ui/components/SocialLoginList/index.d.ts +0 -2
- package/dist/lib.cjs/types/ui/helper/countryData.d.ts +0 -7
|
@@ -138,6 +138,9 @@ class Web3Auth extends noModal.Web3AuthNoModal {
|
|
|
138
138
|
super.initChainsConfig(projectConfig);
|
|
139
139
|
super.initCachedConnectorAndChainId();
|
|
140
140
|
super.initWalletServicesConfig(projectConfig);
|
|
141
|
+
this.analytics.setGlobalProperties({
|
|
142
|
+
team_id: projectConfig.teamId
|
|
143
|
+
});
|
|
141
144
|
trackData = this.getInitializationTrackData();
|
|
142
145
|
// init login modal
|
|
143
146
|
const {
|
|
@@ -169,8 +169,15 @@ class LoginModal {
|
|
|
169
169
|
}));
|
|
170
170
|
const isDefaultColors = ((_this$uiConfig = this.uiConfig) === null || _this$uiConfig === void 0 || (_this$uiConfig = _this$uiConfig.theme) === null || _this$uiConfig === void 0 ? void 0 : _this$uiConfig.primary) === constants.DEFAULT_PRIMARY_COLOR && ((_this$uiConfig$theme = this.uiConfig.theme) === null || _this$uiConfig$theme === void 0 ? void 0 : _this$uiConfig$theme.onPrimary) === constants.DEFAULT_ON_PRIMARY_COLOR;
|
|
171
171
|
if ((_this$uiConfig2 = this.uiConfig) !== null && _this$uiConfig2 !== void 0 && _this$uiConfig2.theme && !isDefaultColors) {
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
import('color').then(({
|
|
173
|
+
default: Color
|
|
174
|
+
}) => {
|
|
175
|
+
const rootElement = document.getElementById("w3a-parent-container");
|
|
176
|
+
auth.applyWhiteLabelTheme(Color, rootElement, this.uiConfig.theme);
|
|
177
|
+
return;
|
|
178
|
+
}).catch(error => {
|
|
179
|
+
noModal.log.error(error);
|
|
180
|
+
});
|
|
174
181
|
}
|
|
175
182
|
});
|
|
176
183
|
});
|
|
@@ -6,6 +6,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
|
|
|
6
6
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
blockTime?: number | undefined | undefined;
|
|
9
10
|
contracts: {
|
|
10
11
|
readonly ensRegistry: {
|
|
11
12
|
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
@@ -6,6 +6,7 @@ export declare const defaultWagmiConfig: import("wagmi").Config<readonly [{
|
|
|
6
6
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
blockTime?: number | undefined | undefined;
|
|
9
10
|
contracts: {
|
|
10
11
|
readonly ensRegistry: {
|
|
11
12
|
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
@@ -141,6 +141,9 @@ class Web3Auth extends Web3AuthNoModal {
|
|
|
141
141
|
super.initChainsConfig(projectConfig);
|
|
142
142
|
super.initCachedConnectorAndChainId();
|
|
143
143
|
super.initWalletServicesConfig(projectConfig);
|
|
144
|
+
this.analytics.setGlobalProperties({
|
|
145
|
+
team_id: projectConfig.teamId
|
|
146
|
+
});
|
|
144
147
|
trackData = this.getInitializationTrackData();
|
|
145
148
|
|
|
146
149
|
// init login modal
|
|
@@ -169,8 +169,15 @@ class LoginModal {
|
|
|
169
169
|
}));
|
|
170
170
|
const isDefaultColors = ((_this$uiConfig = this.uiConfig) === null || _this$uiConfig === void 0 || (_this$uiConfig = _this$uiConfig.theme) === null || _this$uiConfig === void 0 ? void 0 : _this$uiConfig.primary) === DEFAULT_PRIMARY_COLOR && ((_this$uiConfig$theme = this.uiConfig.theme) === null || _this$uiConfig$theme === void 0 ? void 0 : _this$uiConfig$theme.onPrimary) === DEFAULT_ON_PRIMARY_COLOR;
|
|
171
171
|
if ((_this$uiConfig2 = this.uiConfig) !== null && _this$uiConfig2 !== void 0 && _this$uiConfig2.theme && !isDefaultColors) {
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
import('color').then(({
|
|
173
|
+
default: Color
|
|
174
|
+
}) => {
|
|
175
|
+
const rootElement = document.getElementById("w3a-parent-container");
|
|
176
|
+
applyWhiteLabelTheme(Color, rootElement, this.uiConfig.theme);
|
|
177
|
+
return;
|
|
178
|
+
}).catch(error => {
|
|
179
|
+
log.error(error);
|
|
180
|
+
});
|
|
174
181
|
}
|
|
175
182
|
});
|
|
176
183
|
});
|