frappe-ui 0.0.93 → 0.0.95

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": "frappe-ui",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -39,6 +39,7 @@
39
39
  "@tiptap/extension-text-align": "^2.0.0-beta.205",
40
40
  "@tiptap/extension-text-style": "^2.0.0-beta.205",
41
41
  "@tiptap/extension-typography": "^2.0.0-beta.205",
42
+ "@tiptap/prosemirror-tables": "^1.1.3",
42
43
  "@tiptap/starter-kit": "^2.0.0-beta.205",
43
44
  "@tiptap/suggestion": "^2.0.0-beta.205",
44
45
  "@tiptap/vue-3": "^2.0.0-beta.205",
@@ -8,8 +8,10 @@
8
8
  >
9
9
  <LoadingIndicator
10
10
  v-if="loading"
11
- class="mr-2 -ml-1 h-3 w-3"
11
+ class="h-3 w-3"
12
12
  :class="{
13
+ 'mr-2 -ml-1': !icon,
14
+ 'm-0.5': icon,
13
15
  'text-white': appearance == 'primary',
14
16
  'text-gray-600': appearance == 'secondary',
15
17
  'text-red-200': appearance == 'danger',
@@ -24,7 +26,7 @@
24
26
  aria-hidden="true"
25
27
  />
26
28
  <template v-if="loading && loadingText">{{ loadingText }}</template>
27
- <template v-else-if="icon">
29
+ <template v-else-if="icon && !loading">
28
30
  <FeatherIcon :name="icon" class="h-4 w-4" :aria-label="label" />
29
31
  </template>
30
32
  <span v-else :class="icon ? 'sr-only' : ''">
@@ -13,8 +13,12 @@ export function createDocumentResource(options, vm) {
13
13
  if (!(options.doctype && options.name)) return
14
14
 
15
15
  let cacheKey = getCacheKey([options.doctype, options.name])
16
- if (documentCache[cacheKey]) {
17
- return documentCache[cacheKey]
16
+ let cachedResource = documentCache[cacheKey]
17
+ if (cachedResource) {
18
+ if (cachedResource.auto) {
19
+ cachedResource.reload()
20
+ }
21
+ return cachedResource
18
22
  }
19
23
 
20
24
  let setValueOptions = {
@@ -12,8 +12,12 @@ export function createListResource(options, vm) {
12
12
 
13
13
  let cacheKey = getCacheKey(options.cache)
14
14
  if (cacheKey) {
15
- if (listCache[cacheKey]) {
16
- return listCache[cacheKey]
15
+ let cachedResource = listCache[cacheKey]
16
+ if (cachedResource) {
17
+ if (cachedResource.auto) {
18
+ cachedResource.reload()
19
+ }
20
+ return cachedResource
17
21
  }
18
22
  }
19
23
 
@@ -9,8 +9,13 @@ export function createResource(options, vm) {
9
9
  let cacheKey = null
10
10
  if (options.cache) {
11
11
  cacheKey = getCacheKey(options.cache)
12
- if (cached[cacheKey]) {
13
- return cached[cacheKey]
12
+ let cachedResource = cached[cacheKey]
13
+
14
+ if (cachedResource) {
15
+ if (cachedResource.auto) {
16
+ cachedResource.reload()
17
+ }
18
+ return cachedResource
14
19
  }
15
20
  }
16
21