decentraland-dapps 16.9.0 → 16.11.0

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.
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { RarityFilterProps } from './RarityFilter.types';
3
+ declare const RarityFilter: ({ onChange, rarities, className, defaultCollapsed }: RarityFilterProps) => JSX.Element;
4
+ export { RarityFilter };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.RarityFilter = void 0;
23
+ const react_1 = __importStar(require("react"));
24
+ const schemas_1 = require("@dcl/schemas");
25
+ const Box_1 = require("decentraland-ui/dist/components/Box/Box");
26
+ const Popup_1 = require("decentraland-ui/dist/components/Popup/Popup");
27
+ const InfoTooltip_1 = require("decentraland-ui/dist/components/InfoTooltip");
28
+ const Media_1 = require("decentraland-ui/dist/components/Media");
29
+ const ArrayFilter_1 = require("decentraland-ui/dist/components/ArrayFilter");
30
+ const utils_1 = require("../../modules/translation/utils");
31
+ const RarityFilter = ({ onChange, rarities = [], className, defaultCollapsed = false }) => {
32
+ const isMobileOrTablet = (0, Media_1.useTabletAndBelowMediaQuery)();
33
+ const rarityOptions = (0, react_1.useMemo)(() => {
34
+ const options = Object.values(schemas_1.Rarity)
35
+ .filter(value => typeof value === 'string')
36
+ .reverse();
37
+ return options.map(rarity => ({
38
+ value: rarity,
39
+ text: (0, utils_1.t)(`rarity.${rarity}`)
40
+ }));
41
+ }, []);
42
+ const handleRaritiesChange = (0, react_1.useCallback)((newValue) => {
43
+ onChange(newValue);
44
+ }, [onChange]);
45
+ const allRaritiesSelected = rarities.length === 0 || rarities.length === rarityOptions.length;
46
+ const header = (0, react_1.useMemo)(() => (react_1.default.createElement("div", { className: 'dui-rarity-filter__header' }, isMobileOrTablet ? (react_1.default.createElement(react_1.default.Fragment, null,
47
+ (0, utils_1.t)('rarities_filter.title'),
48
+ react_1.default.createElement(Popup_1.Popup, { content: (0, utils_1.t)('rarities_filter.tooltip'), position: "bottom right", trigger: react_1.default.createElement(InfoTooltip_1.InfoTooltip, null), on: "hover" }))) : (react_1.default.createElement(react_1.default.Fragment, null,
49
+ react_1.default.createElement("span", { className: 'dui-rarity-filter__name' }, (0, utils_1.t)('rarities_filter.title')),
50
+ react_1.default.createElement("span", { className: "dui-rarity-filter__value" }, allRaritiesSelected
51
+ ? (0, utils_1.t)('rarities_filter.all_items')
52
+ : (0, utils_1.t)('rarities_filter.count_items', {
53
+ count: rarities.length
54
+ })))))), [rarities, isMobileOrTablet, allRaritiesSelected]);
55
+ return (react_1.default.createElement(Box_1.Box, { header: header, className: 'dui-rarity-filter' + (className ? ' ' + className : ''), collapsible: true, defaultCollapsed: defaultCollapsed || isMobileOrTablet },
56
+ react_1.default.createElement(ArrayFilter_1.ArrayFilter, { options: rarityOptions, onChange: handleRaritiesChange, values: rarities })));
57
+ };
58
+ exports.RarityFilter = RarityFilter;
59
+ //# sourceMappingURL=RarityFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RarityFilter.js","sourceRoot":"","sources":["../../../src/components/RarityFilter/Rar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OAAO,EAAE,IAAA,SAAC,EAAC,yBAAyB,CAAC,EACrC,QAAQ,EAAC,cAAc,EACvB,OAAO,EAAE,8BAAC,yBAAW,OAAG,EACxB,EAAE,EAAC,OAAO,GACV,CACD,CACJ,CAAC,CAAC,CAAC,CACF;QACE,wCAAM,SAAS,EAAE,yBAAyB,IACvC,IAAA,SAAC,EAAC,uBAAuB,CAAC,CACtB;QACP,wCAAM,SAAS,EAAC,0BAA0B,IACvC,mBAAmB;YAClB,CAAC,CAAC,IAAA,SAAC,EAAC,2BAA2B,CAAC;YAChC,CAAC,CAAC,IAAA,SAAC,EAAC,6BAA6B,EAAE;gBAC/B,KAAK,EAAE,QAAQ,CAAC,MAAM;aACvB,CAAC,CACD,CACN,CACJ,CACG,CACP,EACD,CAAC,QAAQ,EAAE,gBAAgB,EAAE,mBAAmB,CAAC,CAClD,CAAA;IAED,OAAO,CACL,8BAAC,SAAG,IACF,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,mBAAmB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EACnE,WAAW,QACX,gBAAgB,EAAE,gBAAgB,IAAI,gBAAgB;QAEtD,8BAAC,yBAAW,IACV,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,GAChB,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAEQ,oCAAY"}
@@ -0,0 +1,7 @@
1
+ import { Rarity } from '@dcl/schemas';
2
+ export declare type RarityFilterProps = {
3
+ className?: string;
4
+ rarities: string[];
5
+ onChange: (value: Rarity[]) => void;
6
+ defaultCollapsed?: boolean;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RarityFilter.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RarityFilter.types.js","sourceRoot":"","sources":["../../../src/components/RarityFilter/RarityFilter.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './RarityFilter';
2
+ export * from './RarityFilter.types';
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./RarityFilter"), exports);
14
+ __exportStar(require("./RarityFilter.types"), exports);
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RarityFilter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8B;AAC9B,uDAAoC"}
@@ -1 +1,2 @@
1
1
  export { default as Intercom } from './Intercom';
2
+ export * from './RarityFilter';
@@ -1,4 +1,14 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
2
12
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
14
  };
@@ -6,4 +16,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
16
  exports.Intercom = void 0;
7
17
  var Intercom_1 = require("./Intercom");
8
18
  Object.defineProperty(exports, "Intercom", { enumerable: true, get: function () { return __importDefault(Intercom_1).default; } });
19
+ __exportStar(require("./RarityFilter"), exports);
9
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAgD;AAAvC,qHAAA,OAAO,OAAY"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAgD;AAAvC,qHAAA,OAAO,OAAY;AAC5B,iDAA8B"}
@@ -7,7 +7,7 @@ declare const _default: import("react-redux").ConnectedComponent<typeof BuyManaW
7
7
  networks?: (import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalNetworkProps & import("decentraland-ui/dist/components/BuyManaWithFiatModal/Network").BuyWithFiatNetworkProps)[] | undefined;
8
8
  hasTranslations?: boolean | undefined;
9
9
  onContinue: (network: Network, gateway: NetworkGatewayType) => void;
10
- }, "metadata" | "name" | "className" | "onClose" | "open" | "loading" | "hasTranslations" | "i18n" | "message" | "hasError" | "networks" | "onInfo" | "onContinue" | keyof import("react").ClassAttributes<BuyManaWithFiatModal>> & Partial<Pick<import("react").ClassAttributes<BuyManaWithFiatModal> & import("./BuyManaWithFiatModal.types").DefaultProps & Omit<import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalProps, "networks"> & Partial<Pick<import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalProps, "networks">> & Omit<import("../../providers/ModalProvider/ModalProvider.types").ModalProps, "metadata"> & {
10
+ }, "metadata" | "className" | "name" | "onClose" | "open" | "loading" | "hasTranslations" | "i18n" | "message" | "hasError" | "networks" | "onInfo" | "onContinue" | keyof import("react").ClassAttributes<BuyManaWithFiatModal>> & Partial<Pick<import("react").ClassAttributes<BuyManaWithFiatModal> & import("./BuyManaWithFiatModal.types").DefaultProps & Omit<import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalProps, "networks"> & Partial<Pick<import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalProps, "networks">> & Omit<import("../../providers/ModalProvider/ModalProvider.types").ModalProps, "metadata"> & {
11
11
  metadata: import("./BuyManaWithFiatModal.types").Metadata;
12
12
  networks?: (import("decentraland-ui/dist/components/BuyManaWithFiatModal/BuyManaWithFiatModal").BuyManaWithFiatModalNetworkProps & import("decentraland-ui/dist/components/BuyManaWithFiatModal/Network").BuyWithFiatNetworkProps)[] | undefined;
13
13
  hasTranslations?: boolean | undefined;
@@ -266,6 +266,21 @@
266
266
  "most_expensive": "Most Expensive",
267
267
  "most_expensive_range": "Most Expensive within range",
268
268
  "also_minting": "Buy directly from the creator"
269
+ },
270
+ "rarities_filter": {
271
+ "title": "Rarity",
272
+ "tooltip": "The Rarity determines the total number of NFTs that can be minted",
273
+ "count_items": "{count} {count, plural, one {rarity} other {rarities}}",
274
+ "all_items": "All rarities"
275
+ },
276
+ "rarities": {
277
+ "unique": "Unique",
278
+ "mythic": "Mythic",
279
+ "legendary": "Legendary",
280
+ "epic": "Epic",
281
+ "rare": "Rare",
282
+ "uncommon": "Uncommon",
283
+ "common": "Common"
269
284
  }
270
285
  }
271
286
  }
@@ -265,6 +265,21 @@
265
265
  "most_expensive": "Más Caro",
266
266
  "most_expensive_range": "Más Caro en el rango",
267
267
  "also_minting": "Compra directo al creador"
268
+ },
269
+ "rarities_filter": {
270
+ "title": "Rareza",
271
+ "tooltip": "La rareza determina la cantidad de NFTs que pueden ser minteados",
272
+ "all_items": "Todas las rarezas",
273
+ "count_items": "{count} {count, plural, one {rareza} other {rarezas}}"
274
+ },
275
+ "rarities": {
276
+ "unique": "Único",
277
+ "mythic": "Mítico",
278
+ "legendary": "Legendario",
279
+ "epic": "Épico",
280
+ "rare": "Raro",
281
+ "uncommon": "Poco común",
282
+ "common": "Común"
268
283
  }
269
284
  }
270
285
  }
@@ -191,6 +191,21 @@
191
191
  "most_expensive": "Le plus cher",
192
192
  "most_expensive_range": "Le plus cher dans la fourchette",
193
193
  "also_minting": "Disponible à l'achat direct auprès du créateur"
194
+ },
195
+ "rarities_filter": {
196
+ "title": "Rareté",
197
+ "tooltip": "La rareté détermine le nombre total de NFT qui peuvent être frappés",
198
+ "count_items": "{count} {count, plural, one {rareté} other {raretés}}",
199
+ "all_items": "Toutes les raretés"
200
+ },
201
+ "rarities": {
202
+ "unique": "unique",
203
+ "mythic": "Mythique",
204
+ "legendary": "Légendaire",
205
+ "epic": "Epic",
206
+ "rare": "Rare",
207
+ "uncommon": "Peu commun",
208
+ "common": "Commun"
194
209
  }
195
210
  }
196
211
  }
@@ -191,6 +191,21 @@
191
191
  "most_expensive": "最も高い価格",
192
192
  "most_expensive_range": "範囲内の最も高い価格",
193
193
  "also_minting": "クリエイターによる直接購入可能"
194
+ },
195
+ "rarities_filter": {
196
+ "title": "珍しい",
197
+ "tooltip": "希少性により、鋳造できるNFTの総数が決まります",
198
+ "count_items": "{count} {count, plural, one {珍しい} other {珍しい}}",
199
+ "all_items": "すべての珍しい"
200
+ },
201
+ "rarities": {
202
+ "unique": "個性的",
203
+ "mythic": "神話",
204
+ "legendary": "伝説",
205
+ "epic": "すごい",
206
+ "rare": "レア",
207
+ "uncommon": "珍しい",
208
+ "common": "一般"
194
209
  }
195
210
  }
196
211
  }
@@ -191,6 +191,21 @@
191
191
  "most_expensive": "가장 비싼 가격",
192
192
  "most_expensive_range": "범위 내 가장 비싼 가격",
193
193
  "also_minting": "제작자에게 직접 구매 가능"
194
+ },
195
+ "rarities_filter": {
196
+ "title": "희박",
197
+ "tooltip": "Rarity는 민트를 사용할 수있는 총 NFT의 총 수를 결정합니다.",
198
+ "count_items": "{count} {count, plural, one {희박} other {희귀 성}}",
199
+ "all_items": "모든 희귀 성"
200
+ },
201
+ "rarities": {
202
+ "unique": "고유한",
203
+ "mythic": "신화",
204
+ "legendary": "전설",
205
+ "epic": "서사시",
206
+ "rare": "희귀한",
207
+ "uncommon": "드문",
208
+ "common": "흔한"
194
209
  }
195
210
  }
196
211
  }
@@ -265,6 +265,21 @@
265
265
  "most_expensive": "最貴",
266
266
  "most_expensive_range": "范围内最贵",
267
267
  "also_minting": "直接從創作者那裡購買"
268
+ },
269
+ "rarities_filter": {
270
+ "title": "稀有",
271
+ "tooltip": "稀有性决定了可以铸造的NFT的总数",
272
+ "count_items": "{count} {count, plural, one {稀有} other {稀有}}",
273
+ "all_items": "所有稀有物"
274
+ },
275
+ "rarities": {
276
+ "unique": "独特的",
277
+ "mythic": "神话",
278
+ "legendary": "传奇的",
279
+ "epic": "史诗",
280
+ "rare": "稀有的",
281
+ "uncommon": "罕见",
282
+ "common": "常见的"
268
283
  }
269
284
  }
270
285
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decentraland-dapps",
3
- "version": "16.9.0",
3
+ "version": "16.11.0",
4
4
  "dependencies": {
5
5
  "@0xsequence/multicall": "^0.25.1",
6
6
  "@0xsequence/relayer": "^0.25.1",
@@ -16,7 +16,7 @@
16
16
  "decentraland-connect": "^5.1.0",
17
17
  "decentraland-crypto-fetch": "^2.0.1",
18
18
  "decentraland-transactions": "^1.47.0",
19
- "decentraland-ui": "^4.11.4",
19
+ "decentraland-ui": "^4.16.0",
20
20
  "ethers": "^5.6.8",
21
21
  "events": "^3.3.0",
22
22
  "flat": "^5.0.2",