ziko 2.0.0-beta.16.2 → 2.0.0-beta.17.0
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": "ziko",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.17.0",
|
|
4
4
|
"description": "A versatile JavaScript library offering a rich set of Hyperscript Based UI components, advanced mathematical utilities, interactivity, animations, client-side routing and more ...",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"front-end",
|
|
@@ -45,9 +45,6 @@
|
|
|
45
45
|
"url": "git+https://github.com/zikojs/ziko.git",
|
|
46
46
|
"directory": "packages/ziko"
|
|
47
47
|
},
|
|
48
|
-
"publishConfig": {
|
|
49
|
-
"provenance": true
|
|
50
|
-
},
|
|
51
48
|
"author": "zakaria elalaoui",
|
|
52
49
|
"license": "MIT",
|
|
53
50
|
"bugs": {
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
export const __Config__ = {
|
|
2
2
|
default:{
|
|
3
3
|
target:null,
|
|
4
|
-
|
|
5
|
-
// math:{
|
|
6
|
-
// mode:"deg"
|
|
7
|
-
// }
|
|
4
|
+
autoMount:false,
|
|
8
5
|
},
|
|
9
6
|
setDefault:function(pairs){
|
|
10
|
-
const keys=Object.keys(pairs);
|
|
11
|
-
const values=Object.values(pairs);
|
|
7
|
+
const keys = Object.keys(pairs);
|
|
8
|
+
const values = Object.values(pairs);
|
|
12
9
|
for(let i=0; i<keys.length; i++) this.default[keys[i]]=values[i];
|
|
13
10
|
},
|
|
14
11
|
init:()=>{
|
|
15
12
|
// document.documentElement.setAttribute("data-engine","zikojs")
|
|
16
13
|
},
|
|
17
|
-
renderingMode :
|
|
14
|
+
renderingMode :'spa',
|
|
18
15
|
isSSC : false,
|
|
19
16
|
}
|
|
@@ -22,7 +22,7 @@ export class UIElement extends UIElementCore {
|
|
|
22
22
|
element,
|
|
23
23
|
name = "",
|
|
24
24
|
type = "html",
|
|
25
|
-
|
|
25
|
+
autoMount = __Ziko__.__Config__.default.autoMount,
|
|
26
26
|
props,
|
|
27
27
|
} = {}) {
|
|
28
28
|
super();
|
|
@@ -42,7 +42,7 @@ export class UIElement extends UIElementCore {
|
|
|
42
42
|
ViewListeners,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
if (element) this.init({ element, name, type,
|
|
45
|
+
if (element) this.init({ element, name, type, autoMount, props });
|
|
46
46
|
}
|
|
47
47
|
on(
|
|
48
48
|
event_name,
|
|
@@ -7,7 +7,7 @@ class UIElement extends UINode{
|
|
|
7
7
|
constructor(){
|
|
8
8
|
super()
|
|
9
9
|
}
|
|
10
|
-
init({element, name, type,
|
|
10
|
+
init({element, name, type, autoMount, props = {}, items = []} = {}){
|
|
11
11
|
this.target = globalThis.__Ziko__.__Config__.default.target||globalThis?.document?.body;
|
|
12
12
|
if(typeof element === "string") {
|
|
13
13
|
switch(type){
|
|
@@ -52,7 +52,7 @@ class UIElement extends UINode{
|
|
|
52
52
|
globalThis.__Ziko__.__UI__[this.cache.name]
|
|
53
53
|
? globalThis.__Ziko__.__UI__[this.cache.name]?.push(this)
|
|
54
54
|
: globalThis.__Ziko__.__UI__[this.cache.name]=[this];
|
|
55
|
-
element &&
|
|
55
|
+
element && autoMount && this?.mount?.()
|
|
56
56
|
globalThis.__Ziko__.__UI__.push(this)
|
|
57
57
|
|
|
58
58
|
const parsed_props = parse_props(props);
|