@niftykit/widgets 0.2.9 → 0.2.10
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/cjs/nk-connect-wallet-button_10.cjs.entry.js +25 -20
- package/dist/cjs/nk-connect-wallet-button_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nk-edition-mint-button.cjs.entry.js +2 -2
- package/dist/cjs/nk-edition-mint-button.cjs.entry.js.map +1 -1
- package/dist/collection/components/nk-drop-mint-button/nk-drop-mint-button.js +26 -20
- package/dist/collection/components/nk-drop-mint-button/nk-drop-mint-button.js.map +1 -1
- package/dist/collection/components/nk-edition-mint-button/nk-edition-mint-button.js +2 -2
- package/dist/collection/components/nk-edition-mint-button/nk-edition-mint-button.js.map +1 -1
- package/dist/components/nk-drop-mint-button.js +26 -21
- package/dist/components/nk-drop-mint-button.js.map +1 -1
- package/dist/components/nk-edition-mint-button.js +2 -2
- package/dist/components/nk-edition-mint-button.js.map +1 -1
- package/dist/esm/nk-connect-wallet-button_10.entry.js +26 -21
- package/dist/esm/nk-connect-wallet-button_10.entry.js.map +1 -1
- package/dist/esm/nk-edition-mint-button.entry.js +2 -2
- package/dist/esm/nk-edition-mint-button.entry.js.map +1 -1
- package/dist/widgets/{p-a971f887.entry.js → p-02224ee7.entry.js} +2 -2
- package/dist/widgets/p-02224ee7.entry.js.map +1 -0
- package/dist/widgets/p-c4c66ea8.entry.js +200 -0
- package/dist/widgets/p-c4c66ea8.entry.js.map +1 -0
- package/dist/widgets/widgets.esm.js +1 -1
- package/package.json +2 -2
- package/dist/widgets/p-003627b6.entry.js +0 -200
- package/dist/widgets/p-003627b6.entry.js.map +0 -1
- package/dist/widgets/p-a971f887.entry.js.map +0 -1
|
@@ -1314,7 +1314,7 @@ const NKDropMintButton = class {
|
|
|
1314
1314
|
componentWillLoad() {
|
|
1315
1315
|
var _a;
|
|
1316
1316
|
this.disconnect = chunkTSH6VVF4.watchBlockNumber({ listen: true, chainId: (_a = wallet.state.chain) === null || _a === void 0 ? void 0 : _a.id }, async () => {
|
|
1317
|
-
const [
|
|
1317
|
+
const [supplyValue, maxAmountValue, maxPerMintValue, priceValue, saleActiveValue, presaleActiveValue,] = await Promise.all([
|
|
1318
1318
|
wallet.state.diamond.base.totalSupply(),
|
|
1319
1319
|
wallet.state.diamond.apps.drop.maxAmount(),
|
|
1320
1320
|
wallet.state.diamond.apps.drop.maxPerMint(),
|
|
@@ -1322,38 +1322,43 @@ const NKDropMintButton = class {
|
|
|
1322
1322
|
wallet.state.diamond.apps.drop.saleActive(),
|
|
1323
1323
|
wallet.state.diamond.apps.drop.presaleActive(),
|
|
1324
1324
|
]);
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
this.price = price;
|
|
1330
|
-
this.saleActive = saleActive;
|
|
1331
|
-
this.presaleActive = presaleActive;
|
|
1332
|
-
this.selections = Array(this.maxPerMint).fill('');
|
|
1325
|
+
let erc20Price = BigInt(0);
|
|
1326
|
+
let mintFee = wallet.BigNumber.from(0);
|
|
1327
|
+
let erc20SaleActive = false;
|
|
1328
|
+
let erc20PresaleActive = false;
|
|
1333
1329
|
if (wallet.state.diamond.apps.erc20) {
|
|
1334
|
-
const [
|
|
1330
|
+
const [erc20PriceValue, erc20MintFeeValue, erc20SaleActiveValue, erc20PresaleActiveValue,] = await Promise.all([
|
|
1335
1331
|
wallet.state.diamond.apps.erc20.erc20Price(),
|
|
1336
1332
|
wallet.state.diamond.apps.erc20.erc20MintFee(),
|
|
1337
1333
|
wallet.state.diamond.apps.erc20.erc20SaleActive(),
|
|
1338
1334
|
wallet.state.diamond.apps.erc20.erc20PresaleActive(),
|
|
1339
1335
|
]);
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1336
|
+
erc20Price = BigInt(Number(erc20PriceValue));
|
|
1337
|
+
mintFee = erc20MintFeeValue;
|
|
1338
|
+
erc20SaleActive = erc20SaleActiveValue;
|
|
1339
|
+
erc20PresaleActive = erc20PresaleActiveValue;
|
|
1344
1340
|
}
|
|
1345
1341
|
else if (wallet.state.diamond.apps.ape) {
|
|
1346
|
-
const [
|
|
1342
|
+
const [apePriceValue, apeMintFeeValue, apeSaleActiveValue, apePresaleActiveValue,] = await Promise.all([
|
|
1347
1343
|
wallet.state.diamond.apps.ape.apePrice(),
|
|
1348
1344
|
wallet.state.diamond.apps.ape.apeMintFee(),
|
|
1349
1345
|
wallet.state.diamond.apps.ape.apeSaleActive(),
|
|
1350
1346
|
wallet.state.diamond.apps.ape.apePresaleActive(),
|
|
1351
1347
|
]);
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1348
|
+
erc20Price = BigInt(Number(apePriceValue));
|
|
1349
|
+
mintFee = apeMintFeeValue;
|
|
1350
|
+
erc20SaleActive = apeSaleActiveValue;
|
|
1351
|
+
erc20PresaleActive = apePresaleActiveValue;
|
|
1356
1352
|
}
|
|
1353
|
+
this.erc20Price = erc20Price;
|
|
1354
|
+
this.mintFee = mintFee;
|
|
1355
|
+
this.supply = Number(supplyValue);
|
|
1356
|
+
this.maxAmount = Number(maxAmountValue);
|
|
1357
|
+
this.maxPerMint = Number(maxPerMintValue);
|
|
1358
|
+
this.price = priceValue;
|
|
1359
|
+
this.saleActive = saleActiveValue || erc20SaleActive;
|
|
1360
|
+
this.presaleActive = presaleActiveValue || erc20PresaleActive;
|
|
1361
|
+
this.selections = Array.from({ length: this.maxPerMint }, (_, i) => i + 1);
|
|
1357
1362
|
this.loading = false;
|
|
1358
1363
|
// sale not active then disable widget
|
|
1359
1364
|
this.disabled = !(this.saleActive || this.presaleActive);
|
|
@@ -1501,7 +1506,7 @@ const NKDropMintButton = class {
|
|
|
1501
1506
|
return `mdc-deprecated-list-item ${this.selectedValue === value ? 'mdc-deprecated-list-item--selected' : ''}`;
|
|
1502
1507
|
}
|
|
1503
1508
|
render() {
|
|
1504
|
-
return (index.h("div", { part: "mint-btn-container", class: `mdc-select mdc-select--filled mdc-select--no-label ${this.disabled ? 'mdc-select--disabled' : ''}`, ref: (el) => (this.container = el) }, index.h("div", { part: "mint-btn", class: "mdc-select__anchor", role: "button", "aria-haspopup": "listbox", "aria-expanded": "false", "aria-labelledby": "mint-selected-text" }, index.h("span", { class: "mdc-select__ripple" }), index.h("span", { class: "mdc-select__selected-text-container" }, index.h("span", { part: "mint-text", id: "mint-selected-text", class: "mdc-select__selected-text", ref: (el) => (this.selectedText = el) })), index.h("span", { part: "mint-dropdown-icon", class: "mdc-select__dropdown-icon" }, index.h("svg", { class: "mdc-select__dropdown-icon-graphic", viewBox: "7 10 10 5", focusable: "false" }, index.h("polygon", { class: "mdc-select__dropdown-icon-inactive", stroke: "none", "fill-rule": "evenodd", points: "7 10 12 15 17 10" }), index.h("polygon", { class: "mdc-select__dropdown-icon-active", stroke: "none", "fill-rule": "evenodd", points: "7 15 12 10 17 15" })))), index.h("div", { class: "mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth" }, index.h("ul", { class: "mdc-deprecated-list", role: "listbox", "aria-label": "Quantity Picker listbox" }, this.selections.map((
|
|
1509
|
+
return (index.h("div", { part: "mint-btn-container", class: `mdc-select mdc-select--filled mdc-select--no-label ${this.disabled ? 'mdc-select--disabled' : ''}`, ref: (el) => (this.container = el) }, index.h("div", { part: "mint-btn", class: "mdc-select__anchor", role: "button", "aria-haspopup": "listbox", "aria-expanded": "false", "aria-labelledby": "mint-selected-text" }, index.h("span", { class: "mdc-select__ripple" }), index.h("span", { class: "mdc-select__selected-text-container" }, index.h("span", { part: "mint-text", id: "mint-selected-text", class: "mdc-select__selected-text", ref: (el) => (this.selectedText = el) })), index.h("span", { part: "mint-dropdown-icon", class: "mdc-select__dropdown-icon" }, index.h("svg", { class: "mdc-select__dropdown-icon-graphic", viewBox: "7 10 10 5", focusable: "false" }, index.h("polygon", { class: "mdc-select__dropdown-icon-inactive", stroke: "none", "fill-rule": "evenodd", points: "7 10 12 15 17 10" }), index.h("polygon", { class: "mdc-select__dropdown-icon-active", stroke: "none", "fill-rule": "evenodd", points: "7 15 12 10 17 15" })))), index.h("div", { class: "mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth" }, index.h("ul", { class: "mdc-deprecated-list", role: "listbox", "aria-label": "Quantity Picker listbox" }, this.selections.map((value) => (index.h("li", { class: this.optionClasses(value), "aria-selected": value === this.selectedValue, "data-value": value, role: "option" }, index.h("span", { class: "mdc-deprecated-list-item__ripple" }), index.h("span", { class: "mdc-deprecated-list-item__text" }, value)))))), index.h("nk-dialog", { open: this.dialogOpen, dialogTitle: this.dialogTitle }, this.dialogMessage)));
|
|
1505
1510
|
}
|
|
1506
1511
|
};
|
|
1507
1512
|
NKDropMintButton.style = nkDropMintButtonCss;
|