Skip to content

Commit

Permalink
0.0.75
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Oct 25, 2024
1 parent c839de0 commit 99e218a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 47 deletions.
2 changes: 1 addition & 1 deletion URLBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ export class URLBuilder {
return tokens.join('');
}
}
const reg = /:\w+/g;
const reg = /:(@)\w+/g;
2 changes: 1 addition & 1 deletion URLBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export class URLBuilder{
}
}

const reg = /:\w+/g;
const reg = /:(@)\w+/g;
6 changes: 5 additions & 1 deletion be-reformable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ class BeReformable extends BE {
propInfo:{
baseLink: {},
path: {},
urlBuilder:{
ro: true
}
},
compacts:{
when_updateOn_changes_invoke_hydrate: 0,
when_path_changes_invoke_parsePath: 0,
},
actions:{
updateAction:{
ifAllOf: ['updateCnt', 'path'],
ifAllOf: ['updateCnt', 'urlBuilder'],
ifKeyIn: ['baseLink']
}
}
Expand All @@ -44,6 +47,7 @@ class BeReformable extends BE {
const {URLBuilder} = await import('./URLBuilder.js');
const {path} = self;
const urlBuilder = new URLBuilder(path);
console.log({urlBuilder});
return /** @type {PAP} */({
urlBuilder
});
Expand Down
24 changes: 24 additions & 0 deletions demo/NewtonMicroservice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Newton Microservice</title>
<!-- #include virtual="/imports.html" -->
</head>
<body>
<link id=newton-microservice rel=preconnect href=https://newton.now.sh/ >
<form be-reformable='{
"baseLink": "newton-microservice",
"path": "api/v2/:@operation/:@expression"
}'
>
<label for=operation>Operation:</label>
<input id=operation value=integrate>
<label for=expression>Expression:</label>
<input id=expression value="x^2">
</form>

</body>
</html>
42 changes: 0 additions & 42 deletions demo/dev.html

This file was deleted.

11 changes: 9 additions & 2 deletions emc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import { BeHive, seed, MountObserver } from 'be-hive/be-hive.js';
export const emc = {
hostInstanceOf: [HTMLFormElement],
base: 'be-reformable',
enhPropKey: 'beReformable',
map: {

'0.0': {
instanceOf: 'Object',
mapsTo: '.',
},
},
importEnh: async () => {
const { BeReformable } =
Expand All @@ -20,4 +24,7 @@ export const emc = {
(await import('./be-reformable.js'));
return BeReformable;
},
};
};

const mose = seed(emc);
MountObserver.synthesize(document, BeHive, mose);
14 changes: 14 additions & 0 deletions imports.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script type=importmap >
{
"imports": {
"be-enhanced/": "/node_modules/be-enhanced/",
"be-hive/": "/node_modules/be-hive/",
"mount-observer/": "/node_modules/mount-observer/",
"trans-render/": "/node_modules/trans-render/"
}
}
</script>

<script type=module>
import '/emc.js';
</script>

0 comments on commit 99e218a

Please sign in to comment.