@openremote/or-rules 1.2.0-snapshot.20240512160221
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/README.md +31 -0
- package/lib/flow-viewer/components/confirmation-dialog.d.ts +18 -0
- package/lib/flow-viewer/components/confirmation-dialog.js +24 -0
- package/lib/flow-viewer/components/confirmation-dialog.js.map +1 -0
- package/lib/flow-viewer/components/connection-container.d.ts +6 -0
- package/lib/flow-viewer/components/connection-container.js +1 -0
- package/lib/flow-viewer/components/connection-container.js.map +1 -0
- package/lib/flow-viewer/components/connection-line.d.ts +22 -0
- package/lib/flow-viewer/components/connection-line.js +30 -0
- package/lib/flow-viewer/components/connection-line.js.map +1 -0
- package/lib/flow-viewer/components/context-menu.d.ts +28 -0
- package/lib/flow-viewer/components/context-menu.js +49 -0
- package/lib/flow-viewer/components/context-menu.js.map +1 -0
- package/lib/flow-viewer/components/editor-workspace.d.ts +66 -0
- package/lib/flow-viewer/components/editor-workspace.js +20 -0
- package/lib/flow-viewer/components/editor-workspace.js.map +1 -0
- package/lib/flow-viewer/components/flow-editor.d.ts +47 -0
- package/lib/flow-viewer/components/flow-editor.js +45 -0
- package/lib/flow-viewer/components/flow-editor.js.map +1 -0
- package/lib/flow-viewer/components/flow-node-socket.d.ts +31 -0
- package/lib/flow-viewer/components/flow-node-socket.js +36 -0
- package/lib/flow-viewer/components/flow-node-socket.js.map +1 -0
- package/lib/flow-viewer/components/flow-node.d.ts +23 -0
- package/lib/flow-viewer/components/flow-node.js +7 -0
- package/lib/flow-viewer/components/flow-node.js.map +1 -0
- package/lib/flow-viewer/components/internal-picker.d.ts +36 -0
- package/lib/flow-viewer/components/internal-picker.js +48 -0
- package/lib/flow-viewer/components/internal-picker.js.map +1 -0
- package/lib/flow-viewer/components/node-menu-item.d.ts +29 -0
- package/lib/flow-viewer/components/node-menu-item.js +34 -0
- package/lib/flow-viewer/components/node-menu-item.js.map +1 -0
- package/lib/flow-viewer/components/node-panel.d.ts +24 -0
- package/lib/flow-viewer/components/node-panel.js +60 -0
- package/lib/flow-viewer/components/node-panel.js.map +1 -0
- package/lib/flow-viewer/components/notification-dialog.d.ts +17 -0
- package/lib/flow-viewer/components/notification-dialog.js +23 -0
- package/lib/flow-viewer/components/notification-dialog.js.map +1 -0
- package/lib/flow-viewer/components/popup-modal.d.ts +23 -0
- package/lib/flow-viewer/components/popup-modal.js +55 -0
- package/lib/flow-viewer/components/popup-modal.js.map +1 -0
- package/lib/flow-viewer/components/rule-browser.d.ts +20 -0
- package/lib/flow-viewer/components/rule-browser.js +32 -0
- package/lib/flow-viewer/components/rule-browser.js.map +1 -0
- package/lib/flow-viewer/components/selectable-element.d.ts +23 -0
- package/lib/flow-viewer/components/selectable-element.js +1 -0
- package/lib/flow-viewer/components/selectable-element.js.map +1 -0
- package/lib/flow-viewer/components/selection-box.d.ts +16 -0
- package/lib/flow-viewer/components/selection-box.js +16 -0
- package/lib/flow-viewer/components/selection-box.js.map +1 -0
- package/lib/flow-viewer/components/top-bar.d.ts +21 -0
- package/lib/flow-viewer/components/top-bar.js +51 -0
- package/lib/flow-viewer/components/top-bar.js.map +1 -0
- package/lib/flow-viewer/components/workspace-contextmenu-options.d.ts +3 -0
- package/lib/flow-viewer/components/workspace-contextmenu-options.js +5 -0
- package/lib/flow-viewer/components/workspace-contextmenu-options.js.map +1 -0
- package/lib/flow-viewer/components/writable-dropdown.d.ts +13 -0
- package/lib/flow-viewer/components/writable-dropdown.js +5 -0
- package/lib/flow-viewer/components/writable-dropdown.js.map +1 -0
- package/lib/flow-viewer/converters/node-converter.d.ts +2 -0
- package/lib/flow-viewer/converters/node-converter.js +1 -0
- package/lib/flow-viewer/converters/node-converter.js.map +1 -0
- package/lib/flow-viewer/flow-viewer.d.ts +18 -0
- package/lib/flow-viewer/flow-viewer.js +1 -0
- package/lib/flow-viewer/flow-viewer.js.map +1 -0
- package/lib/flow-viewer/models/camera.d.ts +5 -0
- package/lib/flow-viewer/models/camera.js +1 -0
- package/lib/flow-viewer/models/camera.js.map +1 -0
- package/lib/flow-viewer/models/context-menu-button.d.ts +13 -0
- package/lib/flow-viewer/models/context-menu-button.js +1 -0
- package/lib/flow-viewer/models/context-menu-button.js.map +1 -0
- package/lib/flow-viewer/models/light-node-collection.d.ts +5 -0
- package/lib/flow-viewer/models/light-node-collection.js +1 -0
- package/lib/flow-viewer/models/light-node-collection.js.map +1 -0
- package/lib/flow-viewer/models/status.d.ts +6 -0
- package/lib/flow-viewer/models/status.js +1 -0
- package/lib/flow-viewer/models/status.js.map +1 -0
- package/lib/flow-viewer/node-structure/copy.machine.d.ts +4 -0
- package/lib/flow-viewer/node-structure/copy.machine.js +1 -0
- package/lib/flow-viewer/node-structure/copy.machine.js.map +1 -0
- package/lib/flow-viewer/node-structure/identity.assigner.d.ts +5 -0
- package/lib/flow-viewer/node-structure/identity.assigner.js +1 -0
- package/lib/flow-viewer/node-structure/identity.assigner.js.map +1 -0
- package/lib/flow-viewer/node-structure/identity.dom.link.d.ts +5 -0
- package/lib/flow-viewer/node-structure/identity.dom.link.js +1 -0
- package/lib/flow-viewer/node-structure/identity.dom.link.js.map +1 -0
- package/lib/flow-viewer/node-structure/index.d.ts +5 -0
- package/lib/flow-viewer/node-structure/index.js +1 -0
- package/lib/flow-viewer/node-structure/index.js.map +1 -0
- package/lib/flow-viewer/node-structure/socket.type.matcher.d.ts +5 -0
- package/lib/flow-viewer/node-structure/socket.type.matcher.js +1 -0
- package/lib/flow-viewer/node-structure/socket.type.matcher.js.map +1 -0
- package/lib/flow-viewer/node-structure/utils.d.ts +13 -0
- package/lib/flow-viewer/node-structure/utils.js +1 -0
- package/lib/flow-viewer/node-structure/utils.js.map +1 -0
- package/lib/flow-viewer/services/copy-paste-manager.d.ts +11 -0
- package/lib/flow-viewer/services/copy-paste-manager.js +1 -0
- package/lib/flow-viewer/services/copy-paste-manager.js.map +1 -0
- package/lib/flow-viewer/services/exporter.d.ts +9 -0
- package/lib/flow-viewer/services/exporter.js +1 -0
- package/lib/flow-viewer/services/exporter.js.map +1 -0
- package/lib/flow-viewer/services/input.d.ts +17 -0
- package/lib/flow-viewer/services/input.js +1 -0
- package/lib/flow-viewer/services/input.js.map +1 -0
- package/lib/flow-viewer/services/integration.d.ts +7 -0
- package/lib/flow-viewer/services/integration.js +1 -0
- package/lib/flow-viewer/services/integration.js.map +1 -0
- package/lib/flow-viewer/services/modal.d.ts +8 -0
- package/lib/flow-viewer/services/modal.js +8 -0
- package/lib/flow-viewer/services/modal.js.map +1 -0
- package/lib/flow-viewer/services/project.d.ts +39 -0
- package/lib/flow-viewer/services/project.js +1 -0
- package/lib/flow-viewer/services/project.js.map +1 -0
- package/lib/flow-viewer/services/shortcuts.d.ts +8 -0
- package/lib/flow-viewer/services/shortcuts.js +1 -0
- package/lib/flow-viewer/services/shortcuts.js.map +1 -0
- package/lib/flow-viewer/styles/editor-workspace-style.d.ts +1 -0
- package/lib/flow-viewer/styles/editor-workspace-style.js +53 -0
- package/lib/flow-viewer/styles/editor-workspace-style.js.map +1 -0
- package/lib/flow-viewer/styles/flow-node-style.d.ts +1 -0
- package/lib/flow-viewer/styles/flow-node-style.js +101 -0
- package/lib/flow-viewer/styles/flow-node-style.js.map +1 -0
- package/lib/flow-viewer/styles/picker-styles.d.ts +1 -0
- package/lib/flow-viewer/styles/picker-styles.js +25 -0
- package/lib/flow-viewer/styles/picker-styles.js.map +1 -0
- package/lib/flow-viewer/utils.d.ts +25 -0
- package/lib/flow-viewer/utils.js +1 -0
- package/lib/flow-viewer/utils.js.map +1 -0
- package/lib/index.d.ts +259 -0
- package/lib/index.js +52 -0
- package/lib/index.js.map +1 -0
- package/lib/json-viewer/forms/or-rule-form-email-message.d.ts +20 -0
- package/lib/json-viewer/forms/or-rule-form-email-message.js +12 -0
- package/lib/json-viewer/forms/or-rule-form-email-message.js.map +1 -0
- package/lib/json-viewer/forms/or-rule-form-push-notification.d.ts +21 -0
- package/lib/json-viewer/forms/or-rule-form-push-notification.js +47 -0
- package/lib/json-viewer/forms/or-rule-form-push-notification.js.map +1 -0
- package/lib/json-viewer/forms/or-rule-form-webhook.d.ts +19 -0
- package/lib/json-viewer/forms/or-rule-form-webhook.js +102 -0
- package/lib/json-viewer/forms/or-rule-form-webhook.js.map +1 -0
- package/lib/json-viewer/modals/or-rule-notification-modal.d.ts +24 -0
- package/lib/json-viewer/modals/or-rule-notification-modal.js +5 -0
- package/lib/json-viewer/modals/or-rule-notification-modal.js.map +1 -0
- package/lib/json-viewer/modals/or-rule-radial-modal.d.ts +25 -0
- package/lib/json-viewer/modals/or-rule-radial-modal.js +17 -0
- package/lib/json-viewer/modals/or-rule-radial-modal.js.map +1 -0
- package/lib/json-viewer/modals/or-rule-webhook-modal.d.ts +12 -0
- package/lib/json-viewer/modals/or-rule-webhook-modal.js +8 -0
- package/lib/json-viewer/modals/or-rule-webhook-modal.js.map +1 -0
- package/lib/json-viewer/or-rule-action-attribute.d.ts +32 -0
- package/lib/json-viewer/or-rule-action-attribute.js +33 -0
- package/lib/json-viewer/or-rule-action-attribute.js.map +1 -0
- package/lib/json-viewer/or-rule-action-notification.d.ts +20 -0
- package/lib/json-viewer/or-rule-action-notification.js +44 -0
- package/lib/json-viewer/or-rule-action-notification.js.map +1 -0
- package/lib/json-viewer/or-rule-action-webhook.d.ts +10 -0
- package/lib/json-viewer/or-rule-action-webhook.js +20 -0
- package/lib/json-viewer/or-rule-action-webhook.js.map +1 -0
- package/lib/json-viewer/or-rule-asset-query.d.ts +50 -0
- package/lib/json-viewer/or-rule-asset-query.js +98 -0
- package/lib/json-viewer/or-rule-asset-query.js.map +1 -0
- package/lib/json-viewer/or-rule-condition.d.ts +10 -0
- package/lib/json-viewer/or-rule-condition.js +29 -0
- package/lib/json-viewer/or-rule-condition.js.map +1 -0
- package/lib/json-viewer/or-rule-json-viewer.d.ts +54 -0
- package/lib/json-viewer/or-rule-json-viewer.js +34 -0
- package/lib/json-viewer/or-rule-json-viewer.js.map +1 -0
- package/lib/json-viewer/or-rule-then-otherwise.d.ts +11 -0
- package/lib/json-viewer/or-rule-then-otherwise.js +113 -0
- package/lib/json-viewer/or-rule-then-otherwise.js.map +1 -0
- package/lib/json-viewer/or-rule-trigger-query.d.ts +26 -0
- package/lib/json-viewer/or-rule-trigger-query.js +57 -0
- package/lib/json-viewer/or-rule-trigger-query.js.map +1 -0
- package/lib/json-viewer/or-rule-when.d.ts +1 -0
- package/lib/json-viewer/or-rule-when.js +136 -0
- package/lib/json-viewer/or-rule-when.js.map +1 -0
- package/lib/or-rule-list.d.ts +56 -0
- package/lib/or-rule-list.js +111 -0
- package/lib/or-rule-list.js.map +1 -0
- package/lib/or-rule-text-viewer.d.ts +27 -0
- package/lib/or-rule-text-viewer.js +25 -0
- package/lib/or-rule-text-viewer.js.map +1 -0
- package/lib/or-rule-validity.d.ts +34 -0
- package/lib/or-rule-validity.js +71 -0
- package/lib/or-rule-validity.js.map +1 -0
- package/lib/or-rule-viewer.d.ts +47 -0
- package/lib/or-rule-viewer.js +88 -0
- package/lib/or-rule-viewer.js.map +1 -0
- package/lib/style.d.ts +2 -0
- package/lib/style.js +64 -0
- package/lib/style.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FlowNode}from"../components/flow-node";import{ConnectionLine}from"../components/connection-line";import{input,project}from"../components/flow-editor";export class Shortcuts{constructor(){this.actions=[{keys:["Delete","Backspace"],action:()=>{project.createUndoSnapshot();const e=input.selected.filter((e=>e instanceof FlowNode&&e.selected&&!e.frozen));input.selected.filter((e=>e instanceof ConnectionLine&&e.selected)).forEach((e=>project.removeConnection(e.connection))),e.forEach((e=>project.removeNode(e.node))),project.notifyChange()}},{keys:["KeyA"],requireCtrl:!0,action:()=>{input.selected.length>0?input.clearSelection(!0):input.selectables.forEach((e=>{input.select(e,!0)}))}},{keys:["KeyZ"],requireCtrl:!0,action:()=>{project.undo()}},{keys:["KeyY"],requireCtrl:!0,action:()=>{project.redo()}}],window.addEventListener("keydown",(e=>{document.activeElement instanceof HTMLBodyElement&&this.actions.forEach((o=>{(o.keys.includes(e.key)||o.keys.includes(e.code))&&(o.requireCtrl&&!e.ctrlKey||o.action())}))}))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcuts.js","sourceRoot":"","sources":["../../../src/flow-viewer/services/shortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,OAAO,SAAS;IA0ClB;QAzCO,YAAO,GAAoE;YAC9E;gBACI,IAAI,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;gBAC7B,MAAM,EAAE,GAAG,EAAE;oBACT,OAAO,CAAC,kBAAkB,EAAE,CAAC;oBAC7B,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,MAAM,CAAe,CAAC;oBACnH,MAAM,mBAAmB,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,cAAc,IAAI,CAAC,CAAC,QAAQ,CAAqB,CAAC;oBACxH,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC3E,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;oBACzD,OAAO,CAAC,YAAY,EAAE,CAAC;gBAC3B,CAAC;aACJ;YACD;gBACI,IAA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AAC,OAAO;gBAAC,CAAC;gBAC5C,CAAC,CAAC,MAAM,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EditorWorkspaceStyle: import("lit").CSSResult;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import{css}from"lit";export const EditorWorkspaceStyle=css`
|
|
2
|
+
:host{
|
|
3
|
+
background: whitesmoke;
|
|
4
|
+
position: relative;
|
|
5
|
+
display: block;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0 0 4px inset;
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.view-options{
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.button{
|
|
20
|
+
padding: 10px;
|
|
21
|
+
margin: 10px;
|
|
22
|
+
cursor:pointer;
|
|
23
|
+
background: rgba(0,0,0,0.02);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
or-mwc-input[type=button]
|
|
27
|
+
{
|
|
28
|
+
margin: 10px;
|
|
29
|
+
color: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.button:hover{
|
|
33
|
+
background: rgba(0,0,0,0.04);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.button:active{
|
|
37
|
+
background: rgba(0,0,0,0.06);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
svg, connection-container {
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
position: absolute;
|
|
43
|
+
display: block;
|
|
44
|
+
right: 0;
|
|
45
|
+
top: 0;
|
|
46
|
+
left: 0;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
stroke-width: 4px;
|
|
51
|
+
stroke: rgb(80,80,80);
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-workspace-style.js","sourceRoot":"","sources":["../../../src/flow-viewer/styles/editor-workspace-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FlowNodeStyle: import("lit").CSSResult;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import{css}from"lit";export const FlowNodeStyle=css`
|
|
2
|
+
:host{
|
|
3
|
+
white-space: nowrap;
|
|
4
|
+
min-width: 80px;
|
|
5
|
+
min-height: 80px;
|
|
6
|
+
background: rgba(200,200,200, 0.85);
|
|
7
|
+
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: auto auto auto;
|
|
10
|
+
grid-template-rows: auto 1fr;
|
|
11
|
+
grid-template-areas:
|
|
12
|
+
"title title title"
|
|
13
|
+
"input internal output";
|
|
14
|
+
|
|
15
|
+
position: absolute;
|
|
16
|
+
border-radius: var(--roundness);
|
|
17
|
+
transform-origin: 0 0;
|
|
18
|
+
z-index: 0;
|
|
19
|
+
}
|
|
20
|
+
:host([minimal]){
|
|
21
|
+
min-width: 60px;
|
|
22
|
+
min-height: 60px;
|
|
23
|
+
grid-template-columns: var(--socket-display-size) 1fr var(--socket-display-size);
|
|
24
|
+
grid-template-rows: auto;
|
|
25
|
+
grid-template-areas:
|
|
26
|
+
"input title output";
|
|
27
|
+
}
|
|
28
|
+
.internal-container{
|
|
29
|
+
grid-area: internal;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
padding: 8px 0 8px 0;
|
|
35
|
+
}
|
|
36
|
+
.socket-side{
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
justify-content: space-evenly;
|
|
41
|
+
}
|
|
42
|
+
.inputs{
|
|
43
|
+
grid-area: input;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
}
|
|
46
|
+
.inputs flow-node-socket{
|
|
47
|
+
transform: translateX(calc(var(--socket-size) / -2));
|
|
48
|
+
}
|
|
49
|
+
.outputs{
|
|
50
|
+
grid-area: output;
|
|
51
|
+
align-items: flex-end;
|
|
52
|
+
}
|
|
53
|
+
.outputs flow-node-socket{
|
|
54
|
+
transform: translateX(calc(var(--socket-size) / 2));
|
|
55
|
+
}
|
|
56
|
+
.title{
|
|
57
|
+
grid-area: title;
|
|
58
|
+
padding: 3px 6px 3px 6px;
|
|
59
|
+
background: rgb(180,180,180);
|
|
60
|
+
border-radius: inherit;
|
|
61
|
+
border-bottom-left-radius: 0;
|
|
62
|
+
border-bottom-right-radius: 0;
|
|
63
|
+
color: white;
|
|
64
|
+
cursor: grab;
|
|
65
|
+
}
|
|
66
|
+
.title.input{
|
|
67
|
+
background: var(--input-color);
|
|
68
|
+
text-align: right;
|
|
69
|
+
}
|
|
70
|
+
.title.processor{
|
|
71
|
+
background: var(--processor-color);
|
|
72
|
+
text-align: center;
|
|
73
|
+
}
|
|
74
|
+
.title.output{
|
|
75
|
+
background: var(--output-color);
|
|
76
|
+
text-align: left;
|
|
77
|
+
}
|
|
78
|
+
.title.minimal{
|
|
79
|
+
background: transparent;
|
|
80
|
+
font-size: 20px;
|
|
81
|
+
line-height: 50%;
|
|
82
|
+
display: table;
|
|
83
|
+
padding: 15px 0 15px 0;
|
|
84
|
+
text-align: center;
|
|
85
|
+
margin-top: auto;
|
|
86
|
+
margin-bottom: auto;
|
|
87
|
+
}
|
|
88
|
+
.title.minimal[singlechar]{
|
|
89
|
+
font-size: 32px;
|
|
90
|
+
}
|
|
91
|
+
.lock-icon{
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 0px;
|
|
94
|
+
right: 0px;
|
|
95
|
+
color: rgba(255,255,255,0.8);
|
|
96
|
+
transform: scale(.7);
|
|
97
|
+
}
|
|
98
|
+
.lock-icon.input{
|
|
99
|
+
left: 0;
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-node-style.js","sourceRoot":"","sources":["../../../src/flow-viewer/styles/flow-node-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoG/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PickerStyle: import("lit").CSSResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{css}from"lit";export const PickerStyle=css`
|
|
2
|
+
input{
|
|
3
|
+
border: 0;
|
|
4
|
+
}
|
|
5
|
+
textarea{
|
|
6
|
+
min-width: 150px;
|
|
7
|
+
min-height: 37px;
|
|
8
|
+
}
|
|
9
|
+
textarea, input[type=text], input[type=number], select{
|
|
10
|
+
font-family: inherit;
|
|
11
|
+
padding: 10px;
|
|
12
|
+
border-radius: var(--roundness);
|
|
13
|
+
width: auto;
|
|
14
|
+
border: none;
|
|
15
|
+
}
|
|
16
|
+
.attribute-label{
|
|
17
|
+
padding: 5px;
|
|
18
|
+
background: rgba(0,0,0,0.05);
|
|
19
|
+
text-align: center;
|
|
20
|
+
border-radius: var(--roundness);
|
|
21
|
+
font-size: 110%;
|
|
22
|
+
color: rgb(76, 76, 76);
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-styles.js","sourceRoot":"","sources":["../../../src/flow-viewer/styles/picker-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB7B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class Utilities {
|
|
2
|
+
static getCenter(bounds: ClientRect): {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
static isPointInsideBox(x: number, y: number, box: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}): boolean;
|
|
12
|
+
static isBoxInsideBox(a: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}, b: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}): boolean;
|
|
23
|
+
static humanLike(input: string): string;
|
|
24
|
+
static ellipsis(input: string, maxLength?: number, ellipsis?: string): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export class Utilities{static getCenter(t){return{x:t.left+t.width/2,y:t.top+t.height/2}}static isPointInsideBox(t,e,i){return t>i.x&&t<i.x+i.width&&e>i.y&&e<i.y+i.height}static isBoxInsideBox(t,e){const i=e.x-t.x,s=e.y-t.y;return t.x>=e.x&&t.width-i<=e.width&&t.y>=e.y&&t.height-s<=e.height}static humanLike(t){let e=(t=t.replace(/_+/gm," "))[0].toUpperCase();for(let i=1;i<t.length;i++){const s=t[i];s.match("[A-z]")&&s===s.toUpperCase()&&0!==t[i-1].trim().length&&(e+=" "),e+=s.toLowerCase()}return e}static ellipsis(t,e=15,i="..."){return t&&e&&i?i.length>e?(console.warn("Invalid ellipsis parameters: given ellipsis is longer than the max length"),t):t.length<e?t:t?t.length>8?t.substr(0,e-i.length)+i:t:"":t}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/flow-viewer/utils.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IACX,MAAM,CAAC,SAAS,CAAC,MAAkB;QACtC,OAAO;YACH,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC;YACjC,CAAC,EAAE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC;SACpC,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,gBAAgB,CAAC,CAAS,EAAE,CAAS,EAAE,GAA4D;QAC7G,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7F,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,CAA0D,EAAE,CAA0D;QAC/I,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEzB,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;YAC9C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,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AAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;QACnE,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import "@openremote/or-icon";
|
|
3
|
+
import { AssetQuery, AssetTypeInfo, AttributeDescriptor, JsonRule, LogicGroup, NotificationTargetType, RuleActionUnion, RuleCondition, RulesetLang, RulesetUnion, Asset } from "@openremote/model";
|
|
4
|
+
import "@openremote/or-translate";
|
|
5
|
+
import "@openremote/or-mwc-components/or-mwc-drawer";
|
|
6
|
+
import "./or-rule-list";
|
|
7
|
+
import "./or-rule-viewer";
|
|
8
|
+
import "./flow-viewer/flow-viewer";
|
|
9
|
+
import { RecurrenceOption } from "./json-viewer/or-rule-then-otherwise";
|
|
10
|
+
import { ValueInputProviderGenerator } from "@openremote/or-mwc-components/or-mwc-input";
|
|
11
|
+
export { buttonStyle } from "./style";
|
|
12
|
+
export declare const enum ConditionType {
|
|
13
|
+
AGENT_QUERY = "agentQuery",
|
|
14
|
+
ASSET_QUERY = "assetQuery",
|
|
15
|
+
TIME = "time"
|
|
16
|
+
}
|
|
17
|
+
export declare const enum ActionType {
|
|
18
|
+
WAIT = "wait",
|
|
19
|
+
EMAIL = "email",
|
|
20
|
+
PUSH_NOTIFICATION = "push",
|
|
21
|
+
ATTRIBUTE = "attribute",
|
|
22
|
+
WEBHOOK = "webhook"
|
|
23
|
+
}
|
|
24
|
+
export declare enum TimeTriggerType {
|
|
25
|
+
TIME_OF_DAY = "TIME_OF_DAY"
|
|
26
|
+
}
|
|
27
|
+
export declare enum AssetQueryOperator {
|
|
28
|
+
VALUE_EMPTY = "empty",
|
|
29
|
+
VALUE_NOT_EMPTY = "notEmpty",
|
|
30
|
+
EQUALS = "equals",
|
|
31
|
+
NOT_EQUALS = "notEquals",
|
|
32
|
+
GREATER_THAN = "greaterThan",
|
|
33
|
+
GREATER_EQUALS = "greaterEquals",
|
|
34
|
+
LESS_THAN = "lessThan",
|
|
35
|
+
LESS_EQUALS = "lessEquals",
|
|
36
|
+
BETWEEN = "between",
|
|
37
|
+
NOT_BETWEEN = "notBetween",
|
|
38
|
+
CONTAINS = "contains",
|
|
39
|
+
NOT_CONTAINS = "notContains",
|
|
40
|
+
STARTS_WITH = "startsWith",
|
|
41
|
+
NOT_STARTS_WITH = "notStartsWith",
|
|
42
|
+
ENDS_WITH = "endsWith",
|
|
43
|
+
NOT_ENDS_WITH = "notEndsWith",
|
|
44
|
+
CONTAINS_KEY = "containsKey",
|
|
45
|
+
NOT_CONTAINS_KEY = "notContainsKey",
|
|
46
|
+
INDEX_CONTAINS = "indexContains",
|
|
47
|
+
NOT_INDEX_CONTAINS = "notIndexContains",
|
|
48
|
+
LENGTH_EQUALS = "lengthEquals",
|
|
49
|
+
NOT_LENGTH_EQUALS = "notLengthEquals",
|
|
50
|
+
LENGTH_GREATER_THAN = "lengthGreaterThan",
|
|
51
|
+
LENGTH_LESS_THAN = "lengthLessThan",
|
|
52
|
+
IS_TRUE = "true",
|
|
53
|
+
IS_FALSE = "false",
|
|
54
|
+
WITHIN_RADIUS = "withinRadius",
|
|
55
|
+
OUTSIDE_RADIUS = "outsideRadius",
|
|
56
|
+
WITHIN_RECTANGLE = "withinRectangle",
|
|
57
|
+
OUTSIDE_RECTANGLE = "outsideRectangle"
|
|
58
|
+
}
|
|
59
|
+
export interface AllowedActionTargetTypes {
|
|
60
|
+
default?: NotificationTargetType[];
|
|
61
|
+
actions?: {
|
|
62
|
+
[actionType in ActionType]?: NotificationTargetType[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface RulesConfig {
|
|
66
|
+
controls?: {
|
|
67
|
+
allowedLanguages?: RulesetLang[];
|
|
68
|
+
allowedConditionTypes?: ConditionType[];
|
|
69
|
+
allowedActionTypes?: ActionType[];
|
|
70
|
+
allowedAssetQueryOperators?: {
|
|
71
|
+
[name: string]: AssetQueryOperator[];
|
|
72
|
+
};
|
|
73
|
+
allowedRecurrenceOptions?: RecurrenceOption[];
|
|
74
|
+
allowedActionTargetTypes?: AllowedActionTargetTypes;
|
|
75
|
+
hideActionTypeOptions?: boolean;
|
|
76
|
+
hideActionTargetOptions?: boolean;
|
|
77
|
+
hideActionUpdateOptions?: boolean;
|
|
78
|
+
hideConditionTypeOptions?: boolean;
|
|
79
|
+
hideThenAddAction?: boolean;
|
|
80
|
+
hideWhenAddCondition?: boolean;
|
|
81
|
+
hideWhenAddAttribute?: boolean;
|
|
82
|
+
hideWhenAddGroup?: boolean;
|
|
83
|
+
multiSelect?: boolean;
|
|
84
|
+
};
|
|
85
|
+
inputProvider?: ValueInputProviderGenerator;
|
|
86
|
+
descriptors?: {
|
|
87
|
+
all?: RulesDescriptorSection;
|
|
88
|
+
when?: RulesDescriptorSection;
|
|
89
|
+
action?: RulesDescriptorSection;
|
|
90
|
+
};
|
|
91
|
+
rulesetTemplates?: {
|
|
92
|
+
[key in RulesetLang]?: string;
|
|
93
|
+
};
|
|
94
|
+
rulesetAddHandler?: (ruleset: RulesetUnion) => boolean;
|
|
95
|
+
rulesetDeleteHandler?: (ruleset: RulesetUnion) => boolean;
|
|
96
|
+
rulesetCopyHandler?: (ruleset: RulesetUnion) => boolean;
|
|
97
|
+
rulesetSaveHandler?: (ruleset: RulesetUnion) => boolean;
|
|
98
|
+
json?: {
|
|
99
|
+
rule?: JsonRule;
|
|
100
|
+
whenGroup?: LogicGroup<RuleCondition>;
|
|
101
|
+
whenCondition?: RuleCondition;
|
|
102
|
+
whenAssetQuery?: AssetQuery;
|
|
103
|
+
then?: RuleActionUnion;
|
|
104
|
+
otherwise?: RuleActionUnion;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export interface RulesDescriptorSection {
|
|
108
|
+
includeAssets?: string[];
|
|
109
|
+
excludeAssets?: string[];
|
|
110
|
+
attributeDescriptors?: {
|
|
111
|
+
[attributeName: string]: RulesConfigAttribute;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Asset type specific config; '*' key will be used as a default fallback if no asset type specific entry exists
|
|
115
|
+
*/
|
|
116
|
+
assets?: {
|
|
117
|
+
[assetType: string]: RulesConfigAsset;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export interface RulesConfigAsset {
|
|
121
|
+
includeAttributes?: string[];
|
|
122
|
+
excludeAttributes?: string[];
|
|
123
|
+
name?: string;
|
|
124
|
+
icon?: string;
|
|
125
|
+
color?: string;
|
|
126
|
+
attributeDescriptors?: {
|
|
127
|
+
[attributeName: string]: RulesConfigAttribute;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface RulesConfigAttribute extends AttributeDescriptor {
|
|
131
|
+
}
|
|
132
|
+
export interface RulesetNode {
|
|
133
|
+
ruleset: RulesetUnion;
|
|
134
|
+
selected: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface RequestEventDetail<T> {
|
|
137
|
+
allow: boolean;
|
|
138
|
+
detail: T;
|
|
139
|
+
}
|
|
140
|
+
export interface RuleView {
|
|
141
|
+
validate: () => boolean;
|
|
142
|
+
beforeSave: () => void;
|
|
143
|
+
ruleset?: RulesetUnion;
|
|
144
|
+
readonly?: boolean;
|
|
145
|
+
config?: RulesConfig;
|
|
146
|
+
}
|
|
147
|
+
export interface RuleViewInfo {
|
|
148
|
+
viewTemplateProvider: (ruleset: RulesetUnion, config: RulesConfig | undefined, readonly: boolean) => TemplateResult;
|
|
149
|
+
viewRulesetTemplate?: string;
|
|
150
|
+
}
|
|
151
|
+
export declare const RuleViewInfoMap: {
|
|
152
|
+
[key in RulesetLang]: RuleViewInfo;
|
|
153
|
+
};
|
|
154
|
+
export declare function getAssetTypeFromQuery(query?: AssetQuery): string | undefined;
|
|
155
|
+
export declare function getAssetIdsFromQuery(query?: AssetQuery): any[] | undefined;
|
|
156
|
+
export declare const getAssetTypes: () => Promise<string[]>;
|
|
157
|
+
export declare function getAssetInfos(config: RulesConfig | undefined, useActionConfig: boolean): Promise<AssetTypeInfo[]>;
|
|
158
|
+
export declare function getAssetsByType(type: string, realm?: string, loadedAssets?: Map<string, Asset[]>): Promise<{
|
|
159
|
+
assets?: Asset[];
|
|
160
|
+
loadedAssets?: Map<string, Asset[]>;
|
|
161
|
+
}>;
|
|
162
|
+
export declare class OrRulesRuleChangedEvent extends CustomEvent<boolean> {
|
|
163
|
+
static readonly NAME = "or-rules-rule-changed";
|
|
164
|
+
constructor(valid: boolean);
|
|
165
|
+
}
|
|
166
|
+
export declare class OrRulesRuleUnsupportedEvent extends CustomEvent<void> {
|
|
167
|
+
static readonly NAME = "or-rules-rule-unsupported";
|
|
168
|
+
constructor();
|
|
169
|
+
}
|
|
170
|
+
export interface NodeSelectEventDetail {
|
|
171
|
+
oldNodes: RulesetNode[];
|
|
172
|
+
newNodes: RulesetNode[];
|
|
173
|
+
}
|
|
174
|
+
export declare class OrRulesRequestSelectionEvent extends CustomEvent<RequestEventDetail<NodeSelectEventDetail>> {
|
|
175
|
+
static readonly NAME = "or-rules-request-selection";
|
|
176
|
+
constructor(request: NodeSelectEventDetail);
|
|
177
|
+
}
|
|
178
|
+
export declare class OrRulesSelectionEvent extends CustomEvent<NodeSelectEventDetail> {
|
|
179
|
+
static readonly NAME = "or-rules-selection";
|
|
180
|
+
constructor(nodes: NodeSelectEventDetail);
|
|
181
|
+
}
|
|
182
|
+
export type AddEventDetail = {
|
|
183
|
+
ruleset: RulesetUnion;
|
|
184
|
+
sourceRuleset?: RulesetUnion;
|
|
185
|
+
};
|
|
186
|
+
export declare class OrRulesRequestAddEvent extends CustomEvent<RequestEventDetail<AddEventDetail>> {
|
|
187
|
+
static readonly NAME = "or-rules-request-add";
|
|
188
|
+
constructor(detail: AddEventDetail);
|
|
189
|
+
}
|
|
190
|
+
export declare class OrRulesAddEvent extends CustomEvent<AddEventDetail> {
|
|
191
|
+
static readonly NAME = "or-rules-add";
|
|
192
|
+
constructor(detail: AddEventDetail);
|
|
193
|
+
}
|
|
194
|
+
export declare class OrRulesRequestDeleteEvent extends CustomEvent<RequestEventDetail<RulesetNode[]>> {
|
|
195
|
+
static readonly NAME = "or-rules-request-delete";
|
|
196
|
+
constructor(request: RulesetNode[]);
|
|
197
|
+
}
|
|
198
|
+
export type SaveResult = {
|
|
199
|
+
success: boolean;
|
|
200
|
+
ruleset: RulesetUnion;
|
|
201
|
+
isNew: boolean;
|
|
202
|
+
};
|
|
203
|
+
export declare class OrRulesRequestSaveEvent extends CustomEvent<RequestEventDetail<RulesetUnion>> {
|
|
204
|
+
static readonly NAME = "or-rules-request-save";
|
|
205
|
+
constructor(ruleset: RulesetUnion);
|
|
206
|
+
}
|
|
207
|
+
export declare class OrRulesSaveEvent extends CustomEvent<SaveResult> {
|
|
208
|
+
static readonly NAME = "or-rules-save";
|
|
209
|
+
constructor(result: SaveResult);
|
|
210
|
+
}
|
|
211
|
+
export declare class OrRulesDeleteEvent extends CustomEvent<RulesetUnion[]> {
|
|
212
|
+
static readonly NAME = "or-rules-delete";
|
|
213
|
+
constructor(rulesets: RulesetUnion[]);
|
|
214
|
+
}
|
|
215
|
+
declare global {
|
|
216
|
+
export interface HTMLElementEventMap {
|
|
217
|
+
[OrRulesRuleUnsupportedEvent.NAME]: OrRulesRuleUnsupportedEvent;
|
|
218
|
+
[OrRulesRuleChangedEvent.NAME]: OrRulesRuleChangedEvent;
|
|
219
|
+
[OrRulesRequestSelectionEvent.NAME]: OrRulesRequestSelectionEvent;
|
|
220
|
+
[OrRulesSelectionEvent.NAME]: OrRulesSelectionEvent;
|
|
221
|
+
[OrRulesRequestAddEvent.NAME]: OrRulesRequestAddEvent;
|
|
222
|
+
[OrRulesAddEvent.NAME]: OrRulesAddEvent;
|
|
223
|
+
[OrRulesRequestDeleteEvent.NAME]: OrRulesRequestDeleteEvent;
|
|
224
|
+
[OrRulesRequestSaveEvent.NAME]: OrRulesRequestSaveEvent;
|
|
225
|
+
[OrRulesSaveEvent.NAME]: OrRulesSaveEvent;
|
|
226
|
+
[OrRulesDeleteEvent.NAME]: OrRulesDeleteEvent;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
export declare const style: import("lit").CSSResult;
|
|
230
|
+
declare const OrRules_base: (new (...args: any[]) => {
|
|
231
|
+
_i18nextJustInitialized: boolean;
|
|
232
|
+
connectedCallback(): void;
|
|
233
|
+
disconnectedCallback(): void;
|
|
234
|
+
shouldUpdate(changedProps: import("lit").PropertyValueMap<any> | Map<PropertyKey, unknown>): any;
|
|
235
|
+
initCallback: (options: import("i18next").InitOptions) => void;
|
|
236
|
+
langChangedCallback: () => void;
|
|
237
|
+
readonly isConnected: boolean;
|
|
238
|
+
}) & typeof LitElement;
|
|
239
|
+
export declare class OrRules extends OrRules_base {
|
|
240
|
+
static DEFAULT_RULESET_NAME: string;
|
|
241
|
+
static get styles(): import("lit").CSSResult[];
|
|
242
|
+
readonly?: boolean;
|
|
243
|
+
config?: RulesConfig;
|
|
244
|
+
realm?: string;
|
|
245
|
+
language?: RulesetLang;
|
|
246
|
+
selectedIds?: number[];
|
|
247
|
+
private _isValidRule?;
|
|
248
|
+
private _rulesList;
|
|
249
|
+
private _viewer;
|
|
250
|
+
constructor();
|
|
251
|
+
protected render(): TemplateResult<1>;
|
|
252
|
+
refresh(): void;
|
|
253
|
+
protected isReadonly(): boolean;
|
|
254
|
+
protected _confirmContinue(action: () => void): void;
|
|
255
|
+
protected _onRuleSelectionRequested(event: OrRulesRequestSelectionEvent): void;
|
|
256
|
+
protected _onRuleSelectionChanged(event: OrRulesSelectionEvent): void;
|
|
257
|
+
protected _onRuleAdd(event: OrRulesAddEvent): void;
|
|
258
|
+
protected _onRuleSave(event: OrRulesSaveEvent): Promise<void>;
|
|
259
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __decorate=this&&this.__decorate||function(e,t,r,s){var o,n=arguments.length,i=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,s);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(i=(n<3?o(i):n>3?o(t,r,i):o(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},__awaiter=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))((function(o,n){function i(e){try{a(s.next(e))}catch(e){n(e)}}function l(e){try{a(s.throw(e))}catch(e){n(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}a((s=s.apply(e,t||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query}from"lit/decorators.js";import manager,{DefaultBoxShadow,DefaultColor1,DefaultColor2,DefaultColor3,DefaultColor4,DefaultColor5,DefaultColor6,Util}from"@openremote/core";import i18next from"i18next";import"@openremote/or-icon";import{AssetModelUtil}from"@openremote/model";import"@openremote/or-translate";import"@openremote/or-mwc-components/or-mwc-drawer";import{translate}from"@openremote/or-translate";import"./or-rule-list";import"./or-rule-viewer";import"./flow-viewer/flow-viewer";import{showOkCancelDialog}from"@openremote/or-mwc-components/or-mwc-dialog";export{buttonStyle}from"./style";export var TimeTriggerType;!function(e){e.TIME_OF_DAY="TIME_OF_DAY"}(TimeTriggerType||(TimeTriggerType={}));export var AssetQueryOperator;!function(e){e.VALUE_EMPTY="empty",e.VALUE_NOT_EMPTY="notEmpty",e.EQUALS="equals",e.NOT_EQUALS="notEquals",e.GREATER_THAN="greaterThan",e.GREATER_EQUALS="greaterEquals",e.LESS_THAN="lessThan",e.LESS_EQUALS="lessEquals",e.BETWEEN="between",e.NOT_BETWEEN="notBetween",e.CONTAINS="contains",e.NOT_CONTAINS="notContains",e.STARTS_WITH="startsWith",e.NOT_STARTS_WITH="notStartsWith",e.ENDS_WITH="endsWith",e.NOT_ENDS_WITH="notEndsWith",e.CONTAINS_KEY="containsKey",e.NOT_CONTAINS_KEY="notContainsKey",e.INDEX_CONTAINS="indexContains",e.NOT_INDEX_CONTAINS="notIndexContains",e.LENGTH_EQUALS="lengthEquals",e.NOT_LENGTH_EQUALS="notLengthEquals",e.LENGTH_GREATER_THAN="lengthGreaterThan",e.LENGTH_LESS_THAN="lengthLessThan",e.IS_TRUE="true",e.IS_FALSE="false",e.WITHIN_RADIUS="withinRadius",e.OUTSIDE_RADIUS="outsideRadius",e.WITHIN_RECTANGLE="withinRectangle",e.OUTSIDE_RECTANGLE="outsideRectangle"}(AssetQueryOperator||(AssetQueryOperator={}));export const RuleViewInfoMap={JSON:{viewTemplateProvider:(e,t,r)=>html`<or-rule-json-viewer id="rule-view" .ruleset="${e}" .config="${t}" .readonly="${r}"></or-rule-json-viewer>`},FLOW:{viewTemplateProvider:(e,t,r)=>html`<flow-editor id="rule-view" .ruleset="${e}" .readonly="${r}"></flow-editor>`},GROOVY:{viewTemplateProvider:(e,t,r)=>html`
|
|
2
|
+
<or-rule-text-viewer id="rule-view" .ruleset="${e}" .config="${t}" .readonly="${r}"></or-rule-text-viewer>
|
|
3
|
+
`,viewRulesetTemplate:'package demo.rules\n\nimport org.openremote.manager.rules.RulesBuilder\nimport org.openremote.model.notification.*\nimport org.openremote.model.attribute.AttributeInfo\nimport org.openremote.model.asset.Asset\nimport org.openremote.model.asset.impl.*\nimport org.openremote.model.query.*\nimport org.openremote.model.query.filter.*\nimport org.openremote.model.rules.Assets\nimport org.openremote.model.rules.Notifications\nimport org.openremote.model.rules.Users\n\nimport java.util.logging.Logger\nimport java.util.stream.Collectors\n\nLogger LOG = binding.LOG\nRulesBuilder rules = binding.rules\nNotifications notifications = binding.notifications\nUsers users = binding.users\nAssets assets = binding.assets\n\n/*\n* A groovy rule is made up of a when closure (LHS) which must return a boolean indicating whether the then closure (RHS)\n* should be executed. The rule engine will periodically evaluate the when closure and if it evaluates to true then the\n* rule then closure will execute.\n*\n* NOTE: DO NOT MODIFY THE FACTS IN THE WHEN CLOSURE THIS SHOULD BE DONE IN THE THEN CLOSURE\n*\n* To avoid an infinite rule loop the when closure should not continually return true for subsequent executions\n* so either the then closure should perform an action that prevents the when closure from matching on subsequent\n* evaluations, or custom facts should be used, some ideas:\n*\n* - Change the value of an attribute being matched in the when closure (which will prevent it matching on subsequent evaluations)\n* - Insert a custom fact on first match and test this fact in the when closure to determine when the rule should match again (for\n* example if a rule should match whenever the asset state changes the asset state timestamp can be used)\n*/\n\nrules.add()\n .name("Example rule")\n .when({\n facts ->\n\n // Find first matching asset state using an asset query\n\n facts.matchFirstAssetState(\n\n // Find asset state by asset type and attribute name\n new AssetQuery().types(ThingAsset).attributeNames("someAttribute")\n\n // Find asset state by asset ID and attribute name\n //new AssetQuery().ids("7CaBoyiDhtdf2kn1Xso1w5").attributeNames("someAttribute")\n\n // Find asset state by asset type, attribute name and value string predicate\n //new AssetQuery().types(ThingAsset).attributes(\n // new AttributePredicate()\n // .name("someAttribute")\n // .value(new StringPredicate()\n // .value("someValue")\n // .match(AssetQuery.Match.EXACT)\n // .caseSensitive(true)))\n\n // Find asset state by asset type and location attribute predicate\n //new AssetQuery().types(ThingAsset).attributes(\n // new AttributePredicate()\n // .name(Asset.LOCATION)\n // .value(new RadialGeofencePredicate()\n // .radius(100)\n // .lat(50.0)\n // .lng(0.0)))\n\n ).map { assetState ->\n\n // Use logging to help with debugging if needed //LOG.info("ATTRIBUTE FOUND")\n\n // Check if this rule really should fire this time\n Optional<Long> lastFireTimestamp = facts.getOptional("someAttribute")\n if (lastFireTimestamp.isPresent() && assetState.getTimestamp() <= lastFireTimestamp.get()) {\n return false\n }\n\n // OK to fire if we reach here\n\n // Compute and bind any facts required for the then closure\n facts.bind("assetState", assetState)\n true\n }.orElseGet {\n // Asset state didn\'t match so clear out any custom facts to allow the rule to fire next time the when closure matches\n facts.remove("someAttribute")\n false\n }\n\n})\n .then({\n facts ->\n\n // Extract any binded facts\n AttributeInfo assetState = facts.bound("assetState")\n\n // Insert the custom fact to prevent rule loop\n facts.put("someAttribute", assetState.getTimestamp())\n\n // Write to attributes\n def otherAttributeValue = null\n if (assetState.getValue().orElse{null} == "Value 1") {\n otherAttributeValue = "Converted Value 1"\n } else if (assetState.getValue().orElse{null} == "Value 2") {\n otherAttributeValue = "Converted Value 2"\n } else {\n otherAttributeValue = "Unknown"\n }\n assets.dispatch(assetState.id, "otherAttribute", otherAttributeValue)\n\n // Generate notifications (useful for rules that check if an attribute is out of range)\n //notifications.send(new Notification()\n // .setName("Attribute alert")\n // .setMessage(new EmailNotificationMessage()\n // .setTo("no-reply@openremote.io")\n // .setSubject("Attribute out of range: Attribute=${assetState.name} Asset ID=${assetState.id}")\n // .setText("Some text body")\n // .setHtml("<p>Or some HTML body</p>")\n // )\n //)\n})'},JAVASCRIPT:{viewTemplateProvider:(e,t,r)=>html`
|
|
4
|
+
<or-rule-text-viewer id="rule-view" .ruleset="${e}" .config="${t}" .readonly="${r}"></or-rule-text-viewer>
|
|
5
|
+
`,viewRulesetTemplate:'rules = [ // An array of rules, add more objects to add more rules\n {\n name: "Set bar to foo on someAttribute",\n description: "An example rule that sets \'bar\' on someAttribute when it is \'foo\'",\n when: function(facts) {\n return facts.matchAssetState(\n new AssetQuery().types(AssetType.THING).attributeValue("someAttribute", "foo")\n ).map(function(thing) {\n facts.bind("assetId", thing.id);\n return true;\n }).orElse(false);\n },\n then: function(facts) {\n facts.updateAssetState(\n facts.bound("assetId"), "someAttribute", "bar"\n );\n }\n }\n]'}};function getAssetDescriptorFromSection(e,t,r){if(!t||!t.descriptors)return;const s=r?t.descriptors.action:t.descriptors.when,o=t.descriptors.all;return(s&&s.assets?s.assets[e]?s.assets[e]:s.assets["*"]:void 0)||(o&&o.assets?o.assets[e]?o.assets[e]:o.assets["*"]:void 0)}export function getAssetTypeFromQuery(e){return e&&e.types&&e.types.length>0&&e.types[0]?e.types[0]:void 0}export function getAssetIdsFromQuery(e){return e&&e.ids?[...e.ids]:void 0}export const getAssetTypes=()=>__awaiter(void 0,void 0,void 0,(function*(){return AssetModelUtil.getAssetTypeInfos().map((e=>e.assetDescriptor.name))}));export function getAssetInfos(e,t){const r=AssetModelUtil.getAssetDescriptors();return getAssetTypes().then((s=>{let o=s||[],n=[];if(!e||!e.descriptors)return r.map((e=>AssetModelUtil.getAssetTypeInfo(e)));const i=t?e.descriptors.action:e.descriptors.when;return(i&&i.includeAssets||e.descriptors.all&&e.descriptors.all.includeAssets)&&(o=[],i&&i.includeAssets&&(o=[...i.includeAssets]),e.descriptors.all&&e.descriptors.all.includeAssets&&(o=[...e.descriptors.all.includeAssets])),i&&i.excludeAssets&&(n=[...i.excludeAssets]),e.descriptors.all&&e.descriptors.all.excludeAssets&&(n=n.concat(e.descriptors.all.excludeAssets)),r.filter((e=>!(o.length>0&&o.indexOf(e.name)<0)&&n.indexOf(e.name)<0)).map((r=>{let s=AssetModelUtil.getAssetTypeInfo(r);const o=getAssetDescriptorFromSection(r.name,e,t);if(!o)return s;const n={assetDescriptor:s.assetDescriptor?Object.assign({},s.assetDescriptor):{descriptorType:"asset"},attributeDescriptors:s.attributeDescriptors?[...s.attributeDescriptors]:[],metaItemDescriptors:s.metaItemDescriptors?[...s.metaItemDescriptors]:[],valueDescriptors:s.valueDescriptors?[...s.valueDescriptors]:[]};if(o.icon&&(n.assetDescriptor.icon=o.icon),o.color&&(n.assetDescriptor.colour=o.color),n.attributeDescriptors){const t=void 0!==o.includeAttributes?o.includeAttributes:void 0,r=void 0!==o.excludeAttributes?o.excludeAttributes:void 0;(t||r)&&(n.attributeDescriptors=n.attributeDescriptors.filter((e=>(!t||t.some((t=>Util.stringMatch(t,e.name))))&&(!r||!r.some((t=>Util.stringMatch(t,e.name))))))),o.attributeDescriptors&&n.attributeDescriptors.map((t=>{let r=o.attributeDescriptors[t.name];r||(r=i&&i.attributeDescriptors?i.attributeDescriptors[t.name]:void 0),r||(r=e.descriptors.all&&e.descriptors.all.attributeDescriptors?e.descriptors.all.attributeDescriptors[t.name]:void 0),r&&(r.type&&(t.type=r.type),r.format&&(t.format=r.format),r.units&&(t.units=r.units),r.constraints&&(t.constraints=t.constraints?[...r.constraints,...t.constraints]:r.constraints))}))}return n}))}))}export function getAssetsByType(e,t,r){return __awaiter(this,void 0,void 0,(function*(){if(null==r?void 0:r.has(e))return{assets:null==r?void 0:r.get(e),loadedAssets:r};{r||(r=new Map);const s={types:[e],orderBy:{property:"NAME"}};null!=t&&(s.realm={name:t});const o=yield manager.rest.api.AssetResource.queryAssets(s);return r.set(e,o.data),{assets:o.data,loadedAssets:r}}}))}export class OrRulesRuleChangedEvent extends CustomEvent{constructor(e){super(OrRulesRuleChangedEvent.NAME,{bubbles:!0,composed:!0,detail:e})}}OrRulesRuleChangedEvent.NAME="or-rules-rule-changed";export class OrRulesRuleUnsupportedEvent extends CustomEvent{constructor(){super(OrRulesRuleUnsupportedEvent.NAME,{bubbles:!0,composed:!0})}}OrRulesRuleUnsupportedEvent.NAME="or-rules-rule-unsupported";export class OrRulesRequestSelectionEvent extends CustomEvent{constructor(e){super(OrRulesRequestSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:{detail:e,allow:!0}})}}OrRulesRequestSelectionEvent.NAME="or-rules-request-selection";export class OrRulesSelectionEvent extends CustomEvent{constructor(e){super(OrRulesSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:e})}}OrRulesSelectionEvent.NAME="or-rules-selection";export class OrRulesRequestAddEvent extends CustomEvent{constructor(e){super(OrRulesRequestAddEvent.NAME,{bubbles:!0,composed:!0,detail:{detail:e,allow:!0}})}}OrRulesRequestAddEvent.NAME="or-rules-request-add";export class OrRulesAddEvent extends CustomEvent{constructor(e){super(OrRulesAddEvent.NAME,{bubbles:!0,composed:!0,detail:e})}}OrRulesAddEvent.NAME="or-rules-add";export class OrRulesRequestDeleteEvent extends CustomEvent{constructor(e){super(OrRulesRequestDeleteEvent.NAME,{bubbles:!0,composed:!0,detail:{detail:e,allow:!0}})}}OrRulesRequestDeleteEvent.NAME="or-rules-request-delete";export class OrRulesRequestSaveEvent extends CustomEvent{constructor(e){super(OrRulesRequestSaveEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:e}})}}OrRulesRequestSaveEvent.NAME="or-rules-request-save";export class OrRulesSaveEvent extends CustomEvent{constructor(e){super(OrRulesSaveEvent.NAME,{bubbles:!0,composed:!0,detail:e})}}OrRulesSaveEvent.NAME="or-rules-save";export class OrRulesDeleteEvent extends CustomEvent{constructor(e){super(OrRulesDeleteEvent.NAME,{bubbles:!0,composed:!0,detail:e})}}OrRulesDeleteEvent.NAME="or-rules-delete";export const style=css`
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: flex;
|
|
9
|
+
height: 100%;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
--internal-or-rules-background-color: var(--or-rules-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
|
|
13
|
+
--internal-or-rules-text-color: var(--or-rules-text-color, inherit);
|
|
14
|
+
--internal-or-rules-button-color: var(--or-rules-button-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));
|
|
15
|
+
--internal-or-rules-invalid-color: var(--or-rules-invalid-color, var(--or-app-color6, ${unsafeCSS(DefaultColor6)}));
|
|
16
|
+
--internal-or-rules-panel-color: var(--or-rules-panel-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));
|
|
17
|
+
--internal-or-rules-line-color: var(--or-rules-line-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}));
|
|
18
|
+
|
|
19
|
+
--internal-or-rules-list-selected-color: var(--or-rules-list-selected-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
|
|
20
|
+
--internal-or-rules-list-text-color: var(--or-rules-list-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
|
|
21
|
+
--internal-or-rules-list-text-size: var(--or-rules-list-text-size, 15px);
|
|
22
|
+
--internal-or-rules-list-header-height: var(--or-rules-list-header-height, 48px);
|
|
23
|
+
|
|
24
|
+
--internal-or-rules-list-icon-color-error: var(--or-rules-list-icon-color-error, var(--or-app-color6, ${unsafeCSS(DefaultColor6)}));
|
|
25
|
+
--internal-or-rules-list-icon-color-ok: var(--or-rules-list-icon-color-ok, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}));
|
|
26
|
+
|
|
27
|
+
--internal-or-rules-list-button-size: var(--or-rules-list-button-size, 24px);
|
|
28
|
+
|
|
29
|
+
--internal-or-rules-header-background-color: var(--or-rules-header-background-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
|
|
30
|
+
--internal-or-rules-header-height: var(--or-rules-header-height, unset);
|
|
31
|
+
|
|
32
|
+
--or-panel-background-color: var(--internal-or-rules-panel-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
or-rule-list {
|
|
36
|
+
min-width: 300px;
|
|
37
|
+
width: 300px;
|
|
38
|
+
z-index: 2;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
background-color: var(--internal-or-rules-panel-color);
|
|
42
|
+
color: var(--internal-or-rules-list-text-color);
|
|
43
|
+
box-shadow: ${unsafeCSS(DefaultBoxShadow)};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
or-rule-viewer {
|
|
47
|
+
z-index: 1;
|
|
48
|
+
}
|
|
49
|
+
`;let OrRules=class extends(translate(i18next)(LitElement)){static get styles(){return[style]}constructor(){super(),this.addEventListener(OrRulesRequestSelectionEvent.NAME,this._onRuleSelectionRequested),this.addEventListener(OrRulesSelectionEvent.NAME,this._onRuleSelectionChanged),this.addEventListener(OrRulesAddEvent.NAME,this._onRuleAdd),this.addEventListener(OrRulesSaveEvent.NAME,this._onRuleSave)}render(){return html`
|
|
50
|
+
<or-rule-list id="rule-list" .config="${this.config}" .language="${this.language}" .selectedIds="${this.selectedIds}"></or-rule-list>
|
|
51
|
+
<or-rule-viewer id="rule-viewer" .config="${this.config}" .readonly="${this.isReadonly()}"></or-rule-viewer>
|
|
52
|
+
`}refresh(){this._viewer.ruleset=void 0,this._rulesList.refresh()}isReadonly(){return this.readonly||!manager.hasRole("write:rules")}_confirmContinue(e){this._viewer.modified?showOkCancelDialog(i18next.t("loseChanges"),i18next.t("confirmContinueRulesetModified"),i18next.t("discard")).then((t=>{t&&e()})):e()}_onRuleSelectionRequested(e){this._viewer.modified&&(e.detail.allow=!1,this._confirmContinue((()=>{const t=e.detail.detail.newNodes;Util.objectsEqual(t,e.detail.detail.oldNodes)?this._viewer.ruleset=Object.assign({},t[0].ruleset):(this.selectedIds=t.map((e=>e.ruleset.id)),this._viewer.ruleset=1===t.length?t[0].ruleset:void 0)})))}_onRuleSelectionChanged(e){const t=e.detail.newNodes;this.selectedIds=t.map((e=>e.ruleset.id)),this._viewer.ruleset=1===t.length?Object.assign({},t[0].ruleset):void 0}_onRuleAdd(e){this._viewer.ruleset=e.detail.ruleset}_onRuleSave(e){return __awaiter(this,void 0,void 0,(function*(){yield this._rulesList.refresh(),e.detail.success&&e.detail.isNew&&(this.selectedIds=[e.detail.ruleset.id])}))}};OrRules.DEFAULT_RULESET_NAME="",__decorate([property({type:Boolean})],OrRules.prototype,"readonly",void 0),__decorate([property({type:Object})],OrRules.prototype,"config",void 0),__decorate([property({type:String})],OrRules.prototype,"realm",void 0),__decorate([property({type:String})],OrRules.prototype,"language",void 0),__decorate([property({type:Array})],OrRules.prototype,"selectedIds",void 0),__decorate([property({attribute:!1})],OrRules.prototype,"_isValidRule",void 0),__decorate([query("#rule-list")],OrRules.prototype,"_rulesList",void 0),__decorate([query("#rule-viewer")],OrRules.prototype,"_viewer",void 0),OrRules=__decorate([customElement("or-rules")],OrRules);export{OrRules};
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,GAAG,EAAE,IA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