matestack-ui-vuejs 3.0.0.rc2 → 3.1.0.rc1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2288e01bfdc882399c7dc6e1ff70c54c37ac6e547e0f744cb8bac28b6dc7a0e5
|
4
|
+
data.tar.gz: a3ad3450a2f5c6b248a483982441ff8bb17591f4d6ba7e595151112bb309c6a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e74e6ecb663f7d7afe9ea8bafd074e43d55db3efb60742fb155426b524d1805ce506876a9568ce5349fc262915b40d70f6e7a1ba784d92358863ad834ab12cf
|
7
|
+
data.tar.gz: 39402772d0e5d3523cc7083aba41f138defc111aa62be7398ecd91b19df7caef5cd9b89c83a2f6e3965633e26c24800ce6f202d468e16405a05032691a04c440
|
data/README.md
CHANGED
@@ -10,6 +10,8 @@
|
|
10
10
|
|
11
11
|
Boost your productivity & easily create reactive web UIs in pure Ruby. Easily extend with pure JavaScript if required. No Opal involved.
|
12
12
|
|
13
|
+
**New repo, old git history? This repo was duplicated from `matestack-ui-core` in order to extract Vue.js features into `matestack-ui-vuejs` in Feburary 2022**
|
14
|
+
|
13
15
|
## About
|
14
16
|
|
15
17
|
`matestack-ui-vuejs` ships all you need to build **reactive** UIs in **pure Ruby** orchestrating prebuilt Vue.js components with a simple Ruby DSL.
|
@@ -15,11 +15,19 @@ const componentDef = {
|
|
15
15
|
methods: {
|
16
16
|
addItem: function(key){
|
17
17
|
var templateString = JSON.parse(this.getTemplateElement().querySelector('#prototype-template-for-'+key).dataset[":template"])
|
18
|
-
var
|
19
|
-
|
20
|
-
var
|
21
|
-
|
22
|
-
|
18
|
+
var regex = /"component_uid":"(.+?)"/g
|
19
|
+
var staticComponentUidMatches = templateString.matchAll(regex)
|
20
|
+
var staticComponentUids = []
|
21
|
+
for (const match of staticComponentUidMatches) {
|
22
|
+
staticComponentUids.push(match[1])
|
23
|
+
}
|
24
|
+
staticComponentUids.forEach(function(uid){
|
25
|
+
var newUid = Math.floor(Math.random() * 1000000000);
|
26
|
+
templateString = templateString.replaceAll(uid, newUid);
|
27
|
+
})
|
28
|
+
var tmpDomElem = document.createElement('div')
|
29
|
+
tmpDomElem.innerHTML = templateString
|
30
|
+
|
23
31
|
if (this.parentNestedFormRuntimeTemplateDomElements[key] == null){
|
24
32
|
var dom_elem = document.createElement('div')
|
25
33
|
dom_elem.innerHTML = templateString
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import axios from 'axios'
|
3
2
|
import eventHub from './event_hub'
|
4
3
|
const matestackEventHub = eventHub // for compatibility with 1.x
|
5
4
|
|
@@ -70,14 +69,18 @@ const registerComponents = function(appInstance){
|
|
70
69
|
}
|
71
70
|
|
72
71
|
const mount = function(appInstance, elementId='#matestack-ui'){
|
73
|
-
|
72
|
+
if (window.matestackAppMounted != true){
|
73
|
+
window.matestackAppMounted = true
|
74
|
+
registerComponents(appInstance)
|
74
75
|
|
75
|
-
|
76
|
+
appInstance.mount(elementId)
|
77
|
+
}
|
76
78
|
|
77
79
|
return appInstance
|
78
80
|
}
|
79
81
|
|
80
82
|
const MatestackUiVueJs = {
|
83
|
+
axios,
|
81
84
|
eventHub,
|
82
85
|
matestackEventHub, // for compatibility with 1.x
|
83
86
|
componentMixin,
|
@@ -0,0 +1 @@
|
|
1
|
+
require "matestack/ui/vue_js"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matestack-ui-vuejs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Jabari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: matestack-ui-core
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/matestack/ui/vue_js/vue.rb
|
123
123
|
- lib/matestack/ui/vue_js/vue_attributes.rb
|
124
124
|
- lib/matestack/ui/vue_js_component.rb
|
125
|
+
- lib/matestack/ui/vuejs.rb
|
125
126
|
homepage: https://matestack.io
|
126
127
|
licenses:
|
127
128
|
- MIT
|
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: 1.3.1
|
144
145
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.2.15
|
146
147
|
signing_key:
|
147
148
|
specification_version: 4
|
148
149
|
summary: Escape the frontend hustle & easily create interactive web apps in pure Ruby.
|