From 3802cb1fb584fe95aac902cc13da9da3f23913f2 Mon Sep 17 00:00:00 2001
From: Rah Emil <013131@mail.ru>
Date: Fri, 15 Jul 2022 22:28:08 +0300
Subject: [PATCH] publish v2.2.0
---
CHANGELOG.md | 10 +++++
README.md | 80 +++++++++++++++++++++++++--------
__test__/easySetup.test.js | 19 ++++----
__test__/test-dom.js | 12 ++++-
dist/easy-toggler.cjs | 63 +++++++++++++++++---------
dist/easy-toggler.cjs.map | 2 +-
dist/easy-toggler.es.js | 63 +++++++++++++++++---------
dist/easy-toggler.es.js.map | 2 +-
dist/easy-toggler.es.min.js | 4 +-
dist/easy-toggler.es.min.js.map | 2 +-
dist/easy-toggler.js | 60 +++++++++++++++++--------
dist/easy-toggler.js.map | 2 +-
dist/easy-toggler.min.js | 4 +-
dist/easy-toggler.min.js.map | 2 +-
package.json | 2 +-
src/core/add.js | 2 +
src/core/attrs.js | 11 ++++-
src/core/index.js | 17 +------
src/core/rcoes.js | 20 +++++++++
src/core/remove.js | 2 +
src/core/toggle.js | 2 +
src/easy-toggler.es.js | 6 ++-
src/easy-toggler.umd.js | 4 +-
23 files changed, 275 insertions(+), 116 deletions(-)
create mode 100644 src/core/rcoes.js
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c5c782..7feb738 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# CHANGELOG
+## 2.2.0 (2022-07-15)
+**Closed issues:**
+- easy-self don't work with easy-rcoe attribute #5
+
+**Bugfix:**
+- fix error with attrsDefault for easy-toggler.es
+
+**Implemented enhancements:**
+- Feature suggestion! Add hooks #6 (new hooks: `onToggle($el)`, `onAdd($el)`, `onRemove($el)`, `onRcoe($el)`)
+
## 2.1.0 (2022-06-18)
**Closed issues:**
- Delete log in core/index.js #4
diff --git a/README.md b/README.md
index 00b5388..d8a3fa8 100644
--- a/README.md
+++ b/README.md
@@ -15,20 +15,36 @@ Simple class switcher on web elements. JavaScript only.
import easySetup from "easy-toggler";
easySetup({
- toggle: 'easy-toggle',
- remove: 'easy-remove',
- add: 'easy-add',
- class: 'easy-class',
- rcoe: 'easy-rcoe',
- parallel: 'easy-parallel',
- self: 'easy-self'
+ // html attrs
+ toggle: 'easy-toggle',
+ add: 'easy-add',
+ remove: 'easy-remove',
+ class: 'easy-class',
+ rcoe: 'easy-rcoe',
+ parallel: 'easy-parallel',
+ self: 'easy-self',
+ selfRcoe: 'easy-self-rcoe',
+
+ // Hooks
+ onToggle($el){},
+ onAdd($el){},
+ onRemove($el){},
+ onRcoe($el){},
});
```
+or easier:
+```html
+
+```
### UMD (+ jsDelivr)
```html
-
+
```
### CJS
```html
@@ -36,21 +52,37 @@ Simple class switcher on web elements. JavaScript only.
const easySetup = require("easy-toggler.cjs");
easySetup({
- toggle: 'easy-toggle',
- remove: 'easy-remove',
- add: 'easy-add',
- class: 'easy-class',
- rcoe: 'easy-rcoe',
- parallel: 'easy-parallel',
- self: 'easy-self'
+ // html attrs
+ toggle: 'easy-toggle',
+ add: 'easy-add',
+ remove: 'easy-remove',
+ class: 'easy-class',
+ rcoe: 'easy-rcoe',
+ parallel: 'easy-parallel',
+ self: 'easy-self',
+ selfRcoe: 'easy-self-rcoe',
+
+ // Hooks
+ onToggle($el){},
+ onAdd($el){},
+ onRemove($el){},
+ onRcoe($el){},
});
```
+or easier:
+```html
+
+```
## Example №1
When you click the button, the class ```show``` will be added to ```