@allnulled/ui-script
Advanced tools
Comparing version 1.0.4 to 1.0.6
@@ -74,3 +74,3 @@ | ||
!xlayoutnopaddingtop [style="text-align: right;"] { | ||
!xbutton {{ Entrar }} | ||
!button [v-on:click="() => { data.is_showing_dialog = true; $forceUpdate(true); }"] {{ Entrar }} | ||
} | ||
@@ -130,2 +130,33 @@ } | ||
} | ||
!div [v-if="data.is_showing_dialog"] { | ||
!xstatic { | ||
!xwindow { | ||
!xwindowtitle {{ Título de la ventana }} | ||
!xwindowbody { | ||
!xtitle {{ Título de página }} | ||
!xsubtitle {{ Subttulo de página }} | ||
!xbreadcrumb { | ||
!xlink {{ Ruta }} | ||
!span {{ » }} | ||
!xlink {{ a }} | ||
!span {{ » }} | ||
!xlink {{ subdireccion }} | ||
} | ||
!xpanel { | ||
!xform { | ||
!xformfield {{ Usuario: }} | ||
!xformfield {{ Contraseña: }} | ||
} | ||
} | ||
!xlayoutnopaddingtop [style="text-align: right;"] { | ||
!button [v-on:click="() => { data.is_showing_dialog = false; $forceUpdate(true); }"] {{ Cerrar }} | ||
} | ||
} | ||
!xwindowfooter { | ||
!xwindowfooteritem {{ Pie de ventana }} | ||
} | ||
} | ||
} | ||
} | ||
@@ -182,3 +213,24 @@ } | ||
this.salidaDelTester = Vue.component( "xtester", | ||
{ template:salidaDelParser | ||
{ template:salidaDelParser, | ||
props:{ root:{ type:Object, | ||
default:() => {try { | ||
return this.root; | ||
} catch(error) { | ||
console.log(error); | ||
throw error; | ||
} | ||
} | ||
} | ||
}, | ||
data:function() {try { | ||
return { data:{ | ||
} | ||
}; | ||
} catch(error) { | ||
console.log(error); | ||
throw error; | ||
} | ||
} | ||
} ); | ||
@@ -232,2 +284,3 @@ console.log("uiScriptContenido"); | ||
+ " <router-view :root=\"this\"></router-view>" | ||
+ " <xdialogport></xdialogport>" | ||
+ " </div>", | ||
@@ -234,0 +287,0 @@ function(component) {return { data() {try { |
window.uiscript_components = {}; | ||
window.uiscript_api = {}; | ||
const xbreadcrumb = require("./xbreadcrumb/xbreadcrumb.js"); | ||
const xbutton = require("./xbutton/xbutton.js"); | ||
const xdialogport = require("./xdialogport/xdialogport.js"); | ||
const xdialogcurrent = require("./xdialogport/xdialogcurrent.js"); | ||
const xform = require("./xform/xform.js"); | ||
@@ -15,2 +18,3 @@ const xformfield = require("./xformfield/xformfield.js"); | ||
const xpanel = require("./xpanel/xpanel.js"); | ||
const xparagraph = require("./xparagraph/xparagraph.js"); | ||
const xsubtitle = require("./xsubtitle/xsubtitle.js"); | ||
@@ -27,10 +31,11 @@ const xtable = require("./xtable/xtable.js"); | ||
const xwindowtitle = require("./xwindowtitle/xwindowtitle.js"); | ||
const xstatic = require("./xstatic/xstatic.js"); | ||
const ast_parser = require("../../../../src/ui-script.parser.ast.js"); | ||
const parser = require("../../../../src/ui-script.parser.js"); | ||
window.uiscript_api = { | ||
Object.assign(window.uiscript_api, { | ||
ast: { parser: ast_parser }, | ||
parser, | ||
components: window.uiscript_components | ||
}; | ||
}); | ||
@@ -37,0 +42,0 @@ window.uiscript_api.default = window.uiscript_api; |
@@ -6,6 +6,9 @@ | ||
+ " </div>", | ||
function(component) {return { props:{ | ||
function(component) {return { props:{ root:{ type:Object, | ||
required:true | ||
} | ||
}, | ||
data() {try { | ||
return { | ||
return { data:{ | ||
} | ||
}; | ||
@@ -30,3 +33,9 @@ } catch(error) { | ||
}, | ||
mounted() { | ||
mounted() {try { | ||
window.xtesterr = this; | ||
} catch(error) { | ||
console.log(error); | ||
throw error; | ||
} | ||
}, | ||
@@ -33,0 +42,0 @@ beforeUpdate() { |
{ | ||
"name": "@allnulled/ui-script", | ||
"version": "1.0.4", | ||
"description": "UI-Script is a shorter & simpler substitute for HTML syntax", | ||
"main": "src/ui-script.parser.js", | ||
"bin": { | ||
"uiscript": "src/ui-script.bin.js", | ||
"xcomponents": "src/xcomponents.bin.js" | ||
}, | ||
"directories": { | ||
"doc": "docs", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"dev": "npx nodemon -x pegjs -w src/ui-script.parser.pegjs -x 'npm run build'", | ||
"build": "npm run build-api && npm run build-ui && npm run build-parser && npm run build-css && npm test", | ||
"build-css": "node dev/build-css.js", | ||
"build-api": "npx browserify docs/lib/ui-script/components/api.js --outfile docs/lib/ui-script/ui-script.js", | ||
"build-ui": "cp docs/index.1.html docs/index.html", | ||
"build-parser": "npx pegjs -o src/ui-script.parser.ast.js src/ui-script.parser.ast.pegjs && npx pegjs -o src/ui-script.parser.js src/ui-script.parser.pegjs", | ||
"start": "npx http-server -c-1 docs -o index.1.html", | ||
"test": "node test/test.js" | ||
}, | ||
"keywords": [], | ||
"author": "allnulled", | ||
"license": "WTFPL", | ||
"devDependencies": { | ||
"fs-extra": "^11.2.0" | ||
}, | ||
"dependencies": { | ||
"graceful-fs": "^4.2.11", | ||
"jsonfile": "^6.1.0", | ||
"universalify": "^2.0.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/allnulled/ui-script-language.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/allnulled/ui-script-language/issues" | ||
}, | ||
"homepage": "https://github.com/allnulled/ui-script-language#readme" | ||
} | ||
"name": "@allnulled/ui-script", | ||
"version": "1.0.6", | ||
"description": "UI-Script is a shorter & simpler substitute for HTML syntax", | ||
"main": "src/ui-script.parser.js", | ||
"bin": { | ||
"uiscript": "src/ui-script.bin.js", | ||
"xcomponents": "src/xcomponents.bin.js" | ||
}, | ||
"directories": { | ||
"doc": "docs", | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"dev": "npx nodemon -x pegjs -w src/ui-script.parser.pegjs -x 'npm run build'", | ||
"build": "npm run build-api && npm run build-ui && npm run build-parser && npm run build-css && npm test", | ||
"build-css": "node dev/build-css.js", | ||
"build-api": "npx browserify docs/lib/ui-script/components/api.js --outfile docs/lib/ui-script/ui-script.js", | ||
"build-ui": "cp docs/index.1.html docs/index.html", | ||
"build-parser": "npx pegjs -o src/ui-script.parser.ast.js src/ui-script.parser.ast.pegjs && npx pegjs -o src/ui-script.parser.js src/ui-script.parser.pegjs", | ||
"start": "npx http-server -c-1 docs -o index.1.html", | ||
"test": "node test/test.js" | ||
}, | ||
"keywords": [], | ||
"author": "allnulled", | ||
"license": "WTFPL", | ||
"devDependencies": { | ||
"fs-extra": "^11.2.0" | ||
}, | ||
"dependencies": { | ||
"graceful-fs": "^4.2.11", | ||
"jsonfile": "^6.1.0", | ||
"universalify": "^2.0.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/allnulled/ui-script-language.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/allnulled/ui-script-language/issues" | ||
}, | ||
"homepage": "https://github.com/allnulled/ui-script-language#readme", | ||
"uuid_commit": 1 | ||
} |
110
README.md
@@ -21,2 +21,5 @@ # UI-Script | ||
- [Usage of `xcomponents`](#usage-of-xcomponents) | ||
- [Extra information](#extra-information) | ||
- [Use Windows 7 programmatic dialogs](#use-windows-7-programmatic-dialogs) | ||
- [More than 25 components](#more-than-25-components) | ||
@@ -35,3 +38,3 @@ # Online version | ||
- On NPM at [https://npmjs.com/@allnulled/ui-script](https://npmjs.com/@allnulled/ui-script) | ||
- On Github at [https://github.com/allnulled/ui-script](https://github.com/allnulled/ui-script) | ||
- On Github at [https://github.com/allnulled/ui-script-language](https://github.com/allnulled/ui-script-language) | ||
@@ -84,30 +87,32 @@ # Installation | ||
- [**`xbreadcrumb`**](./docs/lib/ui-script/components/xbreadcrumb/xbreadcrumb.md) | ||
- [**`xbutton`**](./docs/lib/ui-script/components/xbutton/xbutton.md) | ||
- [**`xform`**](./docs/lib/ui-script/components/xform/xform.md) | ||
- [**`xformfield`**](./docs/lib/ui-script/components/xformfield/xformfield.md) | ||
- [**`xjumbotron`**](./docs/lib/ui-script/components/xjumbotron/xjumbotron.md) | ||
- [**`xlabel`**](./docs/lib/ui-script/components/xlabel/xlabel.md) | ||
- [**`xlayout`**](./docs/lib/ui-script/components/xlayout/xlayout.md) | ||
- [**`xlayoutnopaddingbottom`**](./docs/lib/ui-script/components/xlayoutnopaddingbottom/xlayoutnopaddingbottom.md) | ||
- [**`xlayoutnopaddingtop`**](./docs/lib/ui-script/components/xlayoutnopaddingtop/xlayoutnopaddingtop.md) | ||
- [**`xlink`**](./docs/lib/ui-script/components/xlink/xlink.md) | ||
- [**`xpage`**](./docs/lib/ui-script/components/xpage/xpage.md) | ||
- [**`xpanel`**](./docs/lib/ui-script/components/xpanel/xpanel.md) | ||
- [**`xparagraph`**](./docs/lib/ui-script/components/xparagraph/xparagraph.md) | ||
- [**`xsubtitle`**](./docs/lib/ui-script/components/xsubtitle/xsubtitle.md) | ||
- [**`xtable`**](./docs/lib/ui-script/components/xtable/xtable.md) | ||
- [**`xtablecell`**](./docs/lib/ui-script/components/xtablecell/xtablecell.md) | ||
- [**`xtablerow`**](./docs/lib/ui-script/components/xtablerow/xtablerow.md) | ||
- [**`xtester`**](./docs/lib/ui-script/components/xtester/xtester.md) | ||
- [**`xtitle`**](./docs/lib/ui-script/components/xtitle/xtitle.md) | ||
- [**`xwindow`**](./docs/lib/ui-script/components/xwindow/xwindow.md) | ||
- [**`xwindowbody`**](./docs/lib/ui-script/components/xwindowbody/xwindowbody.md) | ||
- [**`xwindowfooter`**](./docs/lib/ui-script/components/xwindowfooter/xwindowfooter.md) | ||
- [**`xwindowfooteritem`**](./docs/lib/ui-script/components/xwindowfooteritem/xwindowfooteritem.md) | ||
- [**`xwindowtitle`**](./docs/lib/ui-script/components/xwindowtitle/xwindowtitle.md) | ||
- [**xbreadcrumb**](./docs/lib/ui-script/components/xbreadcrumb/xbreadcrumb.md) | ||
- [**xbutton**](./docs/lib/ui-script/components/xbutton/xbutton.md) | ||
- [**xdialogport**](./docs/lib/ui-script/components/xdialogport/xdialogport.md). Imports a special API for Windows 7 dialogs based on Vue.js v2 components usage. | ||
- [**xform**](./docs/lib/ui-script/components/xform/xform.md) | ||
- [**xformfield**](./docs/lib/ui-script/components/xformfield/xformfield.md) | ||
- [**xjumbotron**](./docs/lib/ui-script/components/xjumbotron/xjumbotron.md) | ||
- [**xlabel**](./docs/lib/ui-script/components/xlabel/xlabel.md) | ||
- [**xlayout**](./docs/lib/ui-script/components/xlayout/xlayout.md) | ||
- [**xlayoutnopaddingbottom**](./docs/lib/ui-script/components/xlayoutnopaddingbottom/xlayoutnopaddingbottom.md) | ||
- [**xlayoutnopaddingtop**](./docs/lib/ui-script/components/xlayoutnopaddingtop/xlayoutnopaddingtop.md) | ||
- [**xlink**](./docs/lib/ui-script/components/xlink/xlink.md) | ||
- [**xpage**](./docs/lib/ui-script/components/xpage/xpage.md) | ||
- [**xpanel**](./docs/lib/ui-script/components/xpanel/xpanel.md) | ||
- [**xparagraph**](./docs/lib/ui-script/components/xparagraph/xparagraph.md) | ||
- [**xstatic**](./docs/lib/ui-script/components/xstatic/xstatic.md) | ||
- [**xsubtitle**](./docs/lib/ui-script/components/xsubtitle/xsubtitle.md) | ||
- [**xtable**](./docs/lib/ui-script/components/xtable/xtable.md) | ||
- [**xtablecell**](./docs/lib/ui-script/components/xtablecell/xtablecell.md) | ||
- [**xtablerow**](./docs/lib/ui-script/components/xtablerow/xtablerow.md) | ||
- [**xtester**](./docs/lib/ui-script/components/xtester/xtester.md) | ||
- [**xtitle**](./docs/lib/ui-script/components/xtitle/xtitle.md) | ||
- [**xwindow**](./docs/lib/ui-script/components/xwindow/xwindow.md) | ||
- [**xwindowbody**](./docs/lib/ui-script/components/xwindowbody/xwindowbody.md) | ||
- [**xwindowfooter**](./docs/lib/ui-script/components/xwindowfooter/xwindowfooter.md) | ||
- [**xwindowfooteritem**](./docs/lib/ui-script/components/xwindowfooteritem/xwindowfooteritem.md) | ||
- [**xwindowtitle**](./docs/lib/ui-script/components/xwindowtitle/xwindowtitle.md) | ||
# Examples | ||
The following example demonstrates how to create a new Vue.js component from UI-Scripting markup. | ||
The following example demonstrates how to create a new Vue.js v2 component from UI-Scripting markup. | ||
@@ -169,2 +174,53 @@ ```html | ||
- `win7`: [`win7`](https://khang-nd.github.io/7.css/) CSS library. | ||
- `ui-script`: [`ui-script`](.) JS and CSS files, and the whole component API too, in case you need to modify it. | ||
- `ui-script`: [`ui-script`](.) JS and CSS files, and the whole component API too, in case you need to modify it. | ||
# Extra information | ||
## Use Windows 7 programmatic dialogs | ||
The `xdialogport` provides a special API for Windows 7 based dialogs with very easy asynchronous methods. Visit its documentation [here](./docs/lib/ui-script/components/xdialogport/xdialogport.md) to take full advantage of this API. | ||
As easy as: | ||
```js | ||
const confirmation_1 = await Vue.prototype.$dialogs.confirm("Did you like it?", "Question", "A daily custion", "Yes", "No"); | ||
const confirmation_2 = await Vue.prototype.$dialogs.confirm({ | ||
html: "Did you like it?", | ||
title: "Question", | ||
footer: "A daily custion", | ||
button_accept: "Yes", | ||
button_reject: "No" | ||
}); | ||
``` | ||
## More than 25 components | ||
The most of them are just CSS. But useful anyway to wrap the contents of your templates. | ||
1. **xbreadcrumb** | ||
1. **xbutton** | ||
1. **xdialogport** | ||
1. **xdialogcurrent** | ||
1. **xform** | ||
1. **xformfield** | ||
1. **xjumbotron** | ||
1. **xlabel** | ||
1. **xlayout** | ||
1. **xlayoutnopaddingbottom** | ||
1. **xlayoutnopaddingtop** | ||
1. **xlink** | ||
1. **xpage** | ||
1. **xpanel** | ||
1. **xparagraph** | ||
1. **xstatic** | ||
1. **xsubtitle** | ||
1. **xtable** | ||
1. **xtablecell** | ||
1. **xtablerow** | ||
1. **xtester** | ||
1. **xtitle** | ||
1. **xwindow** | ||
1. **xwindowbody** | ||
1. **xwindowfooter** | ||
1. **xwindowfooteritem** | ||
1. **xwindowtitle** |
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
const path = require("path"); | ||
const UIScriptParser = require("ui-script.parser.js"); | ||
const uiscript_parser = require("ui-script.parser.js"); | ||
@@ -22,4 +22,4 @@ | ||
const filedestination = file.replace(".uis", ".js"); | ||
const filecontentsparsed = UIScriptParser.parse(filecontents); | ||
const filecontentsparsed = uiscript_parser.parse(filecontents); | ||
const fileoutput = wrapAsComponent(filecontentsparsed); | ||
} |
window.uiscript_components = {}; | ||
window.uiscript_api = {}; | ||
const xbreadcrumb = require("./xbreadcrumb/xbreadcrumb.js"); | ||
const xbutton = require("./xbutton/xbutton.js"); | ||
const xdialogport = require("./xdialogport/xdialogport.js"); | ||
const xdialogcurrent = require("./xdialogport/xdialogcurrent.js"); | ||
const xform = require("./xform/xform.js"); | ||
@@ -15,2 +18,3 @@ const xformfield = require("./xformfield/xformfield.js"); | ||
const xpanel = require("./xpanel/xpanel.js"); | ||
const xparagraph = require("./xparagraph/xparagraph.js"); | ||
const xsubtitle = require("./xsubtitle/xsubtitle.js"); | ||
@@ -27,10 +31,11 @@ const xtable = require("./xtable/xtable.js"); | ||
const xwindowtitle = require("./xwindowtitle/xwindowtitle.js"); | ||
const xstatic = require("./xstatic/xstatic.js"); | ||
const ast_parser = require("../../../../src/ui-script.parser.ast.js"); | ||
const parser = require("../../../../src/ui-script.parser.js"); | ||
window.uiscript_api = { | ||
Object.assign(window.uiscript_api, { | ||
ast: { parser: ast_parser }, | ||
parser, | ||
components: window.uiscript_components | ||
}; | ||
}); | ||
@@ -37,0 +42,0 @@ window.uiscript_api.default = window.uiscript_api; |
@@ -6,6 +6,9 @@ | ||
+ " </div>", | ||
function(component) {return { props:{ | ||
function(component) {return { props:{ root:{ type:Object, | ||
required:true | ||
} | ||
}, | ||
data() {try { | ||
return { | ||
return { data:{ | ||
} | ||
}; | ||
@@ -30,3 +33,9 @@ } catch(error) { | ||
}, | ||
mounted() { | ||
mounted() {try { | ||
window.xtesterr = this; | ||
} catch(error) { | ||
console.log(error); | ||
throw error; | ||
} | ||
}, | ||
@@ -33,0 +42,0 @@ beforeUpdate() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5843688
251
127599
222