@sesamy/sesamy-js 1.34.6 → 1.35.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.
package/README.md CHANGED
@@ -18,6 +18,9 @@ The following events are tracked:
18
18
 
19
19
  The following methods are available on the `sesamy` object:
20
20
 
21
+ - amendments
22
+ - create: create an amendment to a contract
23
+ - confirm: confirms a created amendment for a contract.
21
24
  - attributions
22
25
  - get: get the attributions for a user
23
26
  - set: set the attributions for a user
@@ -168,6 +171,43 @@ These are the available configuration options, with their default values:
168
171
  }
169
172
  ```
170
173
 
174
+ # Custom HTML Attributes
175
+
176
+ ## Visibility
177
+
178
+ ### Overview
179
+
180
+ The `sesamy-visibility` attribute allows dynamic visibility control of HTML elements based on the authentication state of a user.
181
+
182
+ ### Usage
183
+
184
+ This attribute can be added to HTML elements to automatically show or hide them based on authentication status.
185
+
186
+ #### Example
187
+
188
+ ```html
189
+ <div sesamy-visibility="logged-in">Welcome, User!</div>
190
+ <div sesamy-visibility="not-logged-in">Please log in.</div>
191
+ ```
192
+
193
+ ## Links
194
+
195
+ ### Overview
196
+
197
+ The `sesamy-link` attribute attaches a click handler to an element that redirects the user.
198
+
199
+ ### Usage
200
+
201
+ This attribute can be added to HTML elements to redirect the user to the following targets: `login`, `logout` and `account`.
202
+
203
+ #### Example
204
+
205
+ ```html
206
+ <div sesamy-link="login">Login</div>
207
+ <div sesamy-link="logout">Logout</div>
208
+ <div sesamy-link="account">Account</div>
209
+ ```
210
+
171
211
  # Auth API
172
212
 
173
213
  ## `isAuthenticated()`