Skip to content

Commit 6f37179

Browse files
authored
Merge pull request #24 from multiversx/development
0.0.0-alpha.2
2 parents 4187a79 + 6a2ccb7 commit 6f37179

File tree

70 files changed

+1923
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1923
-196
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [[0.0.0-alpha.2](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/24)] - 2025-01-27
11+
12+
- [Fixed generic modal event warning](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/23)
13+
- [Added transactions table component](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/22)
14+
- [Added custom notification support](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/21)
15+
1016
## [[0.0.0-alpha.1](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/16)] - 2025-01-20
1117

1218
- [Updated formatAmount component and removed dependencies](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/17)
13-
- [Updated formatAmount component](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/15)
19+
- [Updated formatAmount component](https://github.com/multiversx/mx-sdk-dapp-core-ui/pull/15)

eslint.config.mjs

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import importPlugin from 'eslint-plugin-import';
5+
import prettierPlugin from 'eslint-plugin-prettier';
6+
import jestPlugin from 'eslint-plugin-jest';
7+
8+
/** @type {import('eslint').Linter.Config[]} */
9+
export default [
10+
{
11+
files: ['**/*.{js,mjs,cjs,ts,tsx}', '**/*.{test,spec}.{js,ts,tsx}'],
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
...globals.jest
17+
},
18+
parser: tseslint.parser,
19+
parserOptions: {
20+
ecmaVersion: 2021,
21+
sourceType: 'module',
22+
ecmaFeatures: {
23+
jsx: true
24+
},
25+
project: './tsconfig.json'
26+
}
27+
},
28+
plugins: {
29+
import: importPlugin,
30+
prettier: prettierPlugin,
31+
jest: jestPlugin,
32+
'@typescript-eslint': tseslint.plugin
33+
},
34+
settings: {
35+
'import/parsers': {
36+
'@typescript-eslint/parser': ['.ts', '.tsx']
37+
},
38+
'import/resolver': {
39+
node: {
40+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
41+
moduleDirectory: ['node_modules', 'src/']
42+
},
43+
typescript: {
44+
alwaysTryTypes: true
45+
}
46+
}
47+
},
48+
rules: {
49+
...jestPlugin.configs.recommended.rules,
50+
...pluginJs.configs.recommended.rules,
51+
...tseslint.configs.recommended.rules,
52+
'import/order': [
53+
'warn',
54+
{
55+
groups: ['builtin', 'external', 'internal'],
56+
pathGroups: [
57+
{
58+
pattern: 'react',
59+
group: 'external',
60+
position: 'before'
61+
}
62+
],
63+
'newlines-between': 'ignore',
64+
alphabetize: {
65+
order: 'asc',
66+
caseInsensitive: true
67+
}
68+
}
69+
],
70+
'prettier/prettier': ['error', { endOfLine: 'lf' }],
71+
'@typescript-eslint/indent': 'off',
72+
'@typescript-eslint/explicit-module-boundary-types': 'off',
73+
'@typescript-eslint/no-use-before-define': [
74+
'error',
75+
{ functions: false, classes: false }
76+
],
77+
'@typescript-eslint/no-explicit-any': 'off',
78+
'@typescript-eslint/no-empty-function': 'off',
79+
'@typescript-eslint/no-unused-vars': [
80+
'error',
81+
{
82+
argsIgnorePattern: '^_',
83+
caughtErrorsIgnorePattern: '^_'
84+
}
85+
],
86+
'@typescript-eslint/no-var-requires': 'off',
87+
'@typescript-eslint/explicit-function-return-type': 'off',
88+
'linebreak-style': ['error', 'unix'],
89+
quotes: ['error', 'single'],
90+
semi: ['error', 'always'],
91+
'no-unused-vars': ['off'],
92+
'no-prototype-builtins': 'off',
93+
'jest/no-mocks-import': 'off',
94+
'no-async-promise-executor': 'off',
95+
'object-curly-newline': 'off',
96+
'arrow-body-style': 'off',
97+
'implicit-arrow-linebreak': 'off',
98+
'func-names': 'off',
99+
curly: ['error', 'all'],
100+
'operator-linebreak': 'off',
101+
'function-paren-newline': 'off',
102+
'no-shadow': 'off',
103+
'@typescript-eslint/no-shadow': 'off'
104+
}
105+
}
106+
];

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@multiversx/sdk-dapp-core-ui",
3-
"version": "0.0.0-alpha.1",
3+
"version": "0.0.0-alpha.2",
44
"description": "A library to hold UI components for a dApp on the MultiversX blockchain",
55
"author": "MultiversX",
66
"license": "MIT",
@@ -67,6 +67,7 @@
6767
"jest": "^29.7.0",
6868
"jest-cli": "^29.7.0",
6969
"jsdom": "^22.1.0",
70+
"prettier": "3.2.5",
7071
"puppeteer": "^23.9.0",
7172
"rollup-plugin-node-polyfills": "^0.2.1"
7273
}

src/assets/notification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function showNotification() {
6767
newToast.toastId = notificationId.toString();
6868
newToast.transactions = [{ hash: 'erd1...8ctr', status: 'success' }];
6969

70-
const transactionListElement = document.getElementById('transaction-list');
70+
const transactionListElement = document.getElementById('toast-list');
7171
if (transactionListElement) {
7272
transactionListElement.appendChild(newToast);
7373
}

src/common/generic-modal/generic-modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Prop, VNode, h } from '@stencil/core';
1+
import { Component, Event, EventEmitter, Prop, VNode, h } from '@stencil/core';
22

33
@Component({
44
tag: 'generic-modal',
@@ -9,14 +9,14 @@ export class GenericModal {
99
@Prop() body: VNode;
1010
@Prop() modalTitle: string | VNode;
1111
@Prop() modalSubtitle?: string | VNode;
12-
@Prop() onClose: () => void;
12+
@Event() close: EventEmitter<void>;
1313

1414
render() {
1515
return (
1616
<div class="modal">
1717
<div class="modal-content">
1818
<div class="modal-header">
19-
<span class="close" onClick={this.onClose}>
19+
<span class="close" onClick={() => this.close.emit()}>
2020
2121
</span>
2222
<h2>{this.modalTitle}</h2>

src/common/generic-modal/readme.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
| `body` | -- | | `VNode` | `undefined` |
1313
| `modalSubtitle` | `modal-subtitle` | | `VNode \| string` | `undefined` |
1414
| `modalTitle` | `modal-title` | | `VNode \| string` | `undefined` |
15-
| `onClose` | -- | | `() => void` | `undefined` |
15+
16+
17+
## Events
18+
19+
| Event | Description | Type |
20+
| ------- | ----------- | ------------------- |
21+
| `close` | | `CustomEvent<void>` |
1622

1723

1824
## Dependencies

0 commit comments

Comments
 (0)