frappe-ui 0.0.90 → 0.0.91

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.90",
3
+ "version": "0.0.91",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -26,26 +26,36 @@
26
26
  "@popperjs/core": "^2.11.2",
27
27
  "@tailwindcss/forms": "^0.5.3",
28
28
  "@tailwindcss/typography": "^0.5.0",
29
- "@tiptap/extension-color": "^2.0.0-beta.202",
30
- "@tiptap/extension-highlight": "^2.0.0-beta.202",
31
- "@tiptap/extension-image": "^2.0.0-beta.30",
32
- "@tiptap/extension-link": "^2.0.0-beta.43",
33
- "@tiptap/extension-mention": "^2.0.0-beta.102",
34
- "@tiptap/extension-placeholder": "^2.0.0-beta.53",
35
- "@tiptap/extension-table": "^2.0.0-beta.54",
36
- "@tiptap/extension-table-cell": "^2.0.0-beta.23",
37
- "@tiptap/extension-table-header": "^2.0.0-beta.25",
38
- "@tiptap/extension-table-row": "^2.0.0-beta.22",
39
- "@tiptap/extension-text-align": "^2.0.0-beta.31",
40
- "@tiptap/extension-text-style": "^2.0.0-beta.202",
41
- "@tiptap/extension-typography": "^2.0.0-beta.202",
42
- "@tiptap/starter-kit": "^2.0.0-beta.191",
43
- "@tiptap/suggestion": "^2.0.0-beta.195",
44
- "@tiptap/vue-3": "^2.0.0-beta.96",
29
+ "@tiptap/extension-color": "^2.0.0-beta.205",
30
+ "@tiptap/extension-highlight": "^2.0.0-beta.205",
31
+ "@tiptap/extension-image": "^2.0.0-beta.205",
32
+ "@tiptap/extension-link": "^2.0.0-beta.205",
33
+ "@tiptap/extension-mention": "^2.0.0-beta.205",
34
+ "@tiptap/extension-placeholder": "^2.0.0-beta.205",
35
+ "@tiptap/extension-table": "^2.0.0-beta.205",
36
+ "@tiptap/extension-table-cell": "^2.0.0-beta.205",
37
+ "@tiptap/extension-table-header": "^2.0.0-beta.205",
38
+ "@tiptap/extension-table-row": "^2.0.0-beta.205",
39
+ "@tiptap/extension-text-align": "^2.0.0-beta.205",
40
+ "@tiptap/extension-text-style": "^2.0.0-beta.205",
41
+ "@tiptap/extension-typography": "^2.0.0-beta.205",
42
+ "@tiptap/starter-kit": "^2.0.0-beta.205",
43
+ "@tiptap/suggestion": "^2.0.0-beta.205",
44
+ "@tiptap/vue-3": "^2.0.0-beta.205",
45
45
  "autoprefixer": "^10.4.2",
46
46
  "feather-icons": "^4.28.0",
47
47
  "idb-keyval": "^6.2.0",
48
48
  "postcss": "^8.4.5",
49
+ "prosemirror-commands": "^1.5.0",
50
+ "prosemirror-dropcursor": "1.5.0",
51
+ "prosemirror-gapcursor": "^1.3.1",
52
+ "prosemirror-history": "^1.3.0",
53
+ "prosemirror-keymap": "^1.2.0",
54
+ "prosemirror-model": "^1.18.3",
55
+ "prosemirror-schema-list": "^1.2.2",
56
+ "prosemirror-state": "^1.4.2",
57
+ "prosemirror-transform": "^1.7.0",
58
+ "prosemirror-view": "^1.29.1",
49
59
  "showdown": "^2.1.0",
50
60
  "socket.io-client": "^4.5.1",
51
61
  "tailwindcss": "^3.0.12",
@@ -68,7 +68,7 @@ import Button from './Button.vue'
68
68
  import FeatherIcon from './FeatherIcon.vue'
69
69
 
70
70
  export default {
71
- name: 'NewDropdown',
71
+ name: 'Dropdown',
72
72
  props: {
73
73
  button: {
74
74
  type: Object,
@@ -21,9 +21,9 @@ export function createListResource(options, vm) {
21
21
  doctype: options.doctype,
22
22
  fields: options.fields,
23
23
  filters: options.filters,
24
- order_by: options.order_by,
24
+ orderBy: options.orderBy,
25
25
  start: options.start || 0,
26
- limit: options.limit || 20,
26
+ pageLength: options.pageLength || 20,
27
27
  parent: options.parent,
28
28
  debug: options.debug || 0,
29
29
  originalData: null,
@@ -39,17 +39,17 @@ export function createListResource(options, vm) {
39
39
  doctype: out.doctype,
40
40
  fields: out.fields,
41
41
  filters: out.filters,
42
- order_by: out.order_by,
42
+ order_by: out.orderBy,
43
43
  start: out.start,
44
- limit: out.limit,
44
+ limit: out.pageLength,
45
45
  limit_start: out.start,
46
- limit_page_length: out.limit,
46
+ limit_page_length: out.pageLength,
47
47
  parent: out.parent,
48
48
  debug: out.debug,
49
49
  }
50
50
  },
51
51
  onSuccess(data) {
52
- if (data.length < out.limit) {
52
+ if (data.length < out.pageLength) {
53
53
  out.hasNextPage = false
54
54
  }
55
55
  let pagedData
@@ -160,7 +160,9 @@ export function createListResource(options, vm) {
160
160
  updateRowInListResource(doc.doctype, doc)
161
161
  }
162
162
  }
163
+ options.runDocMethod?.onSuccess?.call(vm, data)
163
164
  },
165
+ onError: options.runDocMethod?.onError,
164
166
  },
165
167
  vm
166
168
  ),
@@ -174,9 +176,11 @@ export function createListResource(options, vm) {
174
176
  out.doctype = updatedOptions.doctype
175
177
  out.fields = updatedOptions.fields
176
178
  out.filters = updatedOptions.filters
177
- out.order_by = updatedOptions.order_by
179
+ out.orderBy = updatedOptions.orderBy
178
180
  out.start = updatedOptions.start
179
- out.limit = updatedOptions.limit
181
+ out.pageLength = updatedOptions.pageLength
182
+ out.parent = updatedOptions.parent
183
+ out.debug = updatedOptions.debug
180
184
  }
181
185
 
182
186
  function transform(data) {
@@ -191,14 +195,14 @@ export function createListResource(options, vm) {
191
195
 
192
196
  function reload() {
193
197
  let _start = out.start
194
- let _limit = out.limit
198
+ let _pageLength = out.pageLength
195
199
  if (out.start > 0) {
196
200
  out.start = 0
197
- out.limit = out.originalData.length
201
+ out.pageLength = out.originalData.length
198
202
  }
199
203
  return out.list.fetch().finally(() => {
200
204
  out.start = _start
201
- out.limit = _limit
205
+ out.pageLength = _pageLength
202
206
  })
203
207
  }
204
208
 
@@ -211,7 +215,7 @@ export function createListResource(options, vm) {
211
215
  }
212
216
 
213
217
  function next() {
214
- out.start = out.start + out.limit
218
+ out.start = out.start + out.pageLength
215
219
  out.list.fetch()
216
220
  }
217
221