material 0.9.15 → 0.9.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "material",
3
- "version": "0.9.15",
3
+ "version": "0.9.16",
4
4
  "description": "A lightweight implementation of Material Design Components for the web - ES6",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/dialog.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import emitter from './module/emitter'
3
3
  import events from './module/events'
4
4
  import display from './mixin/display'
5
+ import * as css from './module/css'
5
6
 
6
7
  import Element from './element'
7
8
  import Text from './text'
@@ -55,7 +56,8 @@ class Dialog {
55
56
  this.element = this.element
56
57
 
57
58
  if (this.options.class !== 'dialog') {
58
- this.element.classList.add(this.options.class)
59
+ // console.log('css add', this.options.class)
60
+ css.add(this.element, this.options.class)
59
61
  }
60
62
 
61
63
  if (this.options.position) {
@@ -1,4 +1,13 @@
1
- const request = async (url, method = 'GET', body = null, headers = {}, signal = null, debug = false) => {
1
+ const request = async (
2
+ url,
3
+ method = 'GET',
4
+ body = null,
5
+ headers = {},
6
+ signal = null,
7
+ debug = false,
8
+ cache = 'no-store' // Adding cache parameter with a default value
9
+ ) => {
10
+ // console.trace('request')
2
11
  const defaultHeaders = {
3
12
  Accept: 'application/json',
4
13
  'Content-Type': 'application/json'
@@ -7,7 +16,8 @@ const request = async (url, method = 'GET', body = null, headers = {}, signal =
7
16
  const options = {
8
17
  method,
9
18
  headers: { ...defaultHeaders, ...headers },
10
- signal
19
+ signal,
20
+ cache // Including the cache option in the request
11
21
  }
12
22
 
13
23
  if (debug) {