{
  "schemaVersion": "1.0.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "src/index.ts",
      "declarations": [
        {
          "kind": "variable",
          "name": "RuleViewInfoMap",
          "type": {
            "text": "{ [key in RulesetLang]: RuleViewInfo }"
          },
          "default": "{ JSON: { viewTemplateProvider: (ruleset, config, readonly) => html`<or-rule-json-viewer id=\"rule-view\" .ruleset=\"${ruleset}\" .config=\"${config}\" .readonly=\"${readonly}\" ></or-rule-json-viewer>`, }, FLOW: { viewTemplateProvider: (ruleset, config, readonly) => html`<flow-editor id=\"rule-view\" .ruleset=\"${ruleset}\" .readonly=\"${readonly}\"></flow-editor>`, }, GROOVY: { viewTemplateProvider: (ruleset, config, readonly) => html` <or-rule-text-viewer id=\"rule-view\" .ruleset=\"${ruleset}\" .config=\"${config}\" .readonly=\"${readonly}\" ></or-rule-text-viewer> `, viewRulesetTemplate: \"package demo.rules\\n\" + \"\\n\" + \"import org.openremote.manager.rules.RulesBuilder\\n\" + \"import org.openremote.model.notification.*\\n\" + \"import org.openremote.model.attribute.AttributeInfo\\n\" + \"import org.openremote.model.asset.Asset\\n\" + \"import org.openremote.model.asset.impl.*\\n\" + \"import org.openremote.model.query.*\\n\" + \"import org.openremote.model.query.filter.*\\n\" + \"import org.openremote.model.rules.Assets\\n\" + \"import org.openremote.model.rules.Notifications\\n\" + \"import org.openremote.model.rules.Users\\n\" + \"\\n\" + \"import java.util.logging.Logger\\n\" + \"import java.util.stream.Collectors\\n\" + \"\\n\" + \"Logger LOG = binding.LOG\\n\" + \"RulesBuilder rules = binding.rules\\n\" + \"Notifications notifications = binding.notifications\\n\" + \"Users users = binding.users\\n\" + \"Assets 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\" + \"\\n\" + \"rules.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: (ruleset, config, readonly) => html` <or-rule-text-viewer id=\"rule-view\" .ruleset=\"${ruleset}\" .config=\"${config}\" .readonly=\"${readonly}\" ></or-rule-text-viewer> `, 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\" + \"]\", }, }"
        },
        {
          "kind": "function",
          "name": "getAssetTypeFromQuery",
          "return": {
            "type": {
              "text": "string | undefined"
            }
          },
          "parameters": [
            {
              "name": "query",
              "optional": true,
              "type": {
                "text": "AssetQuery"
              }
            }
          ]
        },
        {
          "kind": "function",
          "name": "getAssetIdsFromQuery",
          "parameters": [
            {
              "name": "query",
              "optional": true,
              "type": {
                "text": "AssetQuery"
              }
            }
          ]
        },
        {
          "kind": "function",
          "name": "getAssetTypes"
        },
        {
          "kind": "function",
          "name": "getAssetInfos",
          "return": {
            "type": {
              "text": "Promise<AssetTypeInfo[]>"
            }
          },
          "parameters": [
            {
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              }
            },
            {
              "name": "useActionConfig",
              "type": {
                "text": "boolean"
              }
            }
          ]
        },
        {
          "kind": "function",
          "name": "getAssetsByType",
          "return": {
            "type": {
              "text": "Promise<{ assets?: Asset[]; loadedAssets?: Map<string, Asset[]> }>"
            }
          },
          "parameters": [
            {
              "name": "type",
              "type": {
                "text": "string"
              }
            },
            {
              "name": "customQuery",
              "optional": true,
              "type": {
                "text": "AssetQuery"
              }
            },
            {
              "name": "loadedAssets",
              "optional": true,
              "type": {
                "text": "Map<string, Asset[]>"
              }
            }
          ]
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRuleChangedEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-rule-changed\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRuleUnsupportedEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-rule-unsupported\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRequestSelectionEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-request-selection\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesSelectionEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-selection\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRequestAddEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-request-add\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRequestGroupEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-request-group\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesAddEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-add\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRequestDeleteEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-request-delete\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesRequestSaveEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-request-save\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesSaveEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-save\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesDeleteEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-delete\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRulesGroupNameChangeEvent",
          "members": [
            {
              "kind": "field",
              "name": "NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "readonly": true,
              "default": "\"or-rules-group-name-change\""
            }
          ],
          "superclass": {
            "name": "CustomEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "variable",
          "name": "style",
          "default": "css` :host { display: flex; height: 100%; width: 100%; --internal-or-rules-background-color: var( --or-rules-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}) ); --internal-or-rules-text-color: var(--or-rules-text-color, inherit); --internal-or-rules-button-color: var(--or-rules-button-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)})); --internal-or-rules-invalid-color: var(--or-rules-invalid-color, var(--or-app-color6, ${unsafeCSS(DefaultColor6)})); --internal-or-rules-panel-color: var(--or-rules-panel-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)})); --internal-or-rules-line-color: var(--or-rules-line-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)})); --internal-or-rules-list-selected-color: var( --or-rules-list-selected-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}) ); --internal-or-rules-list-text-color: var( --or-rules-list-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}) ); --internal-or-rules-list-text-size: var(--or-rules-list-text-size, 15px); --internal-or-rules-list-header-height: var(--or-rules-list-header-height, 48px); --internal-or-rules-list-icon-color-error: var( --or-rules-list-icon-color-error, var(--or-app-color6, ${unsafeCSS(DefaultColor6)}) ); --internal-or-rules-list-icon-color-ok: var( --or-rules-list-icon-color-ok, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}) ); --internal-or-rules-list-button-size: var(--or-rules-list-button-size, 24px); --internal-or-rules-header-background-color: var( --or-rules-header-background-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}) ); --internal-or-rules-header-height: var(--or-rules-header-height, unset); --or-panel-background-color: var(--internal-or-rules-panel-color); } or-rule-tree { min-width: 300px; width: 300px; z-index: 1; display: flex; flex-direction: column; background-color: var(--internal-or-rules-panel-color); color: var(--internal-or-rules-list-text-color); box-shadow: ${unsafeCSS(DefaultBoxShadow)}; } or-rule-viewer, or-rule-group-viewer { z-index: 0; } `"
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRules",
          "members": [
            {
              "kind": "field",
              "name": "DEFAULT_RULESET_NAME",
              "type": {
                "text": "string"
              },
              "privacy": "public",
              "static": true,
              "default": "\"\""
            },
            {
              "kind": "field",
              "name": "readonly",
              "type": {
                "text": "boolean | undefined"
              },
              "privacy": "public",
              "attribute": "readonly"
            },
            {
              "kind": "field",
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "privacy": "public",
              "attribute": "config"
            },
            {
              "kind": "field",
              "name": "realm",
              "type": {
                "text": "string | undefined"
              },
              "privacy": "public",
              "attribute": "realm"
            },
            {
              "kind": "field",
              "name": "language",
              "type": {
                "text": "RulesetLang | undefined"
              },
              "privacy": "public",
              "attribute": "language"
            },
            {
              "kind": "field",
              "name": "_isValidRule",
              "type": {
                "text": "boolean | undefined"
              },
              "privacy": "private"
            },
            {
              "kind": "field",
              "name": "_selectedGroup",
              "type": {
                "text": "string | undefined"
              },
              "privacy": "protected",
              "description": "Represents the selected group name. (groupId in rules meta)\nWill be undefined once something else is selected"
            },
            {
              "kind": "field",
              "name": "_rulesTree",
              "type": {
                "text": "OrRuleTree | undefined"
              },
              "privacy": "private"
            },
            {
              "kind": "field",
              "name": "_viewer",
              "type": {
                "text": "OrRuleViewer | undefined"
              },
              "privacy": "private"
            },
            {
              "kind": "method",
              "name": "refresh",
              "privacy": "public",
              "type": {
                "text": "refresh() => void"
              }
            },
            {
              "kind": "method",
              "name": "_isReadonly",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "boolean"
                }
              }
            },
            {
              "kind": "method",
              "name": "_isLegacyJavascriptRuleset",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ruleset",
                  "optional": true,
                  "type": {
                    "text": "RulesetUnion"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_containsLegacyJavascriptRuleset",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "rulesets",
                  "optional": true,
                  "type": {
                    "text": "(RulesetUnion | undefined)[]"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_confirmContinue",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "action",
                  "type": {
                    "text": "(ok: boolean) => void"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_onRuleSelectionRequested",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "event",
                  "type": {
                    "text": "OrRulesRequestSelectionEvent"
                  },
                  "description": "The cancellable selection event"
                }
              ],
              "description": "HTML event callback on when a \"rule (or group) selection is requested\".\nIt is a cancellable event that can prompt a user \"to discard changes\" if they have been made."
            },
            {
              "kind": "method",
              "name": "_onRuleSelectionChanged",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "event",
                  "type": {
                    "text": "OrRulesSelectionEvent"
                  },
                  "description": "The selection event"
                }
              ],
              "description": "HTML event callback on when a new rule (or group) has been selected."
            },
            {
              "kind": "method",
              "name": "_onNodeSelectionChanged",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "payload",
                  "type": {
                    "text": "NodeSelectEventDetail"
                  },
                  "description": "Event payload of the {@link RulesetBaseNode}selection\n   "
                }
              ],
              "description": "Utility event callback function called by _onRuleSelectionRequested and _onRuleSelectionChanged,\nwhen a new node in the OrRuleTree element is selected. It processes the event, and updates the OrRuleViewer with the new rule.\nAlternatively, if a group is selected, it updates _selectedGroup instead."
            },
            {
              "kind": "method",
              "name": "_onRuleAdd",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "event",
                  "type": {
                    "text": "OrRulesAddEvent"
                  },
                  "description": "A {@link CustomEvent}with the new ruleset as payload.\n   "
                }
              ],
              "description": "HTML callback event for when a new rule is added."
            },
            {
              "kind": "method",
              "name": "_onRuleSave",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "event",
                  "type": {
                    "text": "OrRulesSaveEvent"
                  },
                  "description": "A {@link CustomEvent}with a {@link SaveResult}payload.\n   "
                }
              ],
              "description": "HTML callback event for when a rule has been saved by the user."
            },
            {
              "kind": "method",
              "name": "_checkForViewerUpdate",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "viewer",
                  "default": "this._viewer",
                  "description": "The or-rule-viewer HTML element"
                },
                {
                  "name": "updatedRulesets",
                  "optional": true,
                  "type": {
                    "text": "RulesetUnion[]"
                  },
                  "description": "List of new rulesets that have been changed"
                }
              ],
              "description": "Utility function that updates the viewer with the latest changes."
            },
            {
              "kind": "method",
              "name": "_onRuleDrag",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "OrTreeDragEvent"
                  },
                  "description": "Tree drag event with a payload of the moved nodes"
                }
              ],
              "description": "HTML callback for OrTreeDragEvent, for when a rule is dragged into (or outside) a group.\nIt handles updating of the 'meta groupId' in a rule, and persists the changes with the HTTP API."
            },
            {
              "kind": "method",
              "name": "_deselectGroup",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "Promise<boolean>"
                }
              },
              "description": "Utility function that deselects the group by clearing _selectedGroup."
            },
            {
              "kind": "method",
              "name": "_onGroupAddRequest",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "OrRulesRequestGroupEvent"
                  },
                  "description": "Callback event"
                }
              ],
              "description": "HTML callback for when a new group is added to the OrRuleTree."
            },
            {
              "kind": "method",
              "name": "_onGroupNameChange",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "OrRulesGroupNameChangeEvent"
                  },
                  "description": "Callback event"
                }
              ],
              "description": "HTML callback for when the selected group name has changed.\nThis function handles renaming the groupId of the rules within that group,\ntogether with persisting the changes using the HTTP API."
            },
            {
              "kind": "method",
              "name": "_saveRuleset",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ruleset",
                  "type": {
                    "text": "RulesetUnion"
                  },
                  "description": "The ruleset to be saved"
                }
              ],
              "description": "Utility function that returns a promise for saving the ruleset, based on its type."
            }
          ],
          "attributes": [
            {
              "name": "readonly",
              "type": {
                "text": "boolean | undefined"
              },
              "fieldName": "readonly"
            },
            {
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "fieldName": "config"
            },
            {
              "name": "realm",
              "type": {
                "text": "string | undefined"
              },
              "fieldName": "realm"
            },
            {
              "name": "language",
              "type": {
                "text": "RulesetLang | undefined"
              },
              "fieldName": "language"
            }
          ],
          "mixins": [
            {
              "name": "translate(i18next)",
              "module": "src/index.ts"
            }
          ],
          "superclass": {
            "name": "OrElement",
            "package": "@openremote/or-element"
          },
          "tagName": "or-rules",
          "customElement": true,
          "modulePath": "src/index.ts",
          "definitionPath": "src/index.ts"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "buttonStyle",
          "declaration": {
            "name": "buttonStyle",
            "module": "./style"
          }
        },
        {
          "kind": "js",
          "name": "RuleViewInfoMap",
          "declaration": {
            "name": "RuleViewInfoMap",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "getAssetTypeFromQuery",
          "declaration": {
            "name": "getAssetTypeFromQuery",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "getAssetIdsFromQuery",
          "declaration": {
            "name": "getAssetIdsFromQuery",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "getAssetTypes",
          "declaration": {
            "name": "getAssetTypes",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "getAssetInfos",
          "declaration": {
            "name": "getAssetInfos",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "getAssetsByType",
          "declaration": {
            "name": "getAssetsByType",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRuleChangedEvent",
          "declaration": {
            "name": "OrRulesRuleChangedEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRuleUnsupportedEvent",
          "declaration": {
            "name": "OrRulesRuleUnsupportedEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRequestSelectionEvent",
          "declaration": {
            "name": "OrRulesRequestSelectionEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesSelectionEvent",
          "declaration": {
            "name": "OrRulesSelectionEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRequestAddEvent",
          "declaration": {
            "name": "OrRulesRequestAddEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRequestGroupEvent",
          "declaration": {
            "name": "OrRulesRequestGroupEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesAddEvent",
          "declaration": {
            "name": "OrRulesAddEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRequestDeleteEvent",
          "declaration": {
            "name": "OrRulesRequestDeleteEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesRequestSaveEvent",
          "declaration": {
            "name": "OrRulesRequestSaveEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesSaveEvent",
          "declaration": {
            "name": "OrRulesSaveEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesDeleteEvent",
          "declaration": {
            "name": "OrRulesDeleteEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRulesGroupNameChangeEvent",
          "declaration": {
            "name": "OrRulesGroupNameChangeEvent",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "style",
          "declaration": {
            "name": "style",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRules",
          "declaration": {
            "name": "OrRules",
            "module": "src/index.ts"
          }
        },
        {
          "kind": "custom-element-definition",
          "name": "or-rules",
          "declaration": {
            "name": "OrRules",
            "module": "src/index.ts"
          }
        }
      ]
    },
    {
      "kind": "javascript-module",
      "path": "src/or-rule-group-viewer.ts",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "OrRuleGroupViewer",
          "members": [
            {
              "kind": "field",
              "name": "group",
              "type": {
                "text": "string | undefined"
              },
              "privacy": "public",
              "description": "Name of the group",
              "attribute": "group"
            },
            {
              "kind": "field",
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false",
              "attribute": "readonly"
            },
            {
              "kind": "field",
              "name": "_lastSaved",
              "type": {
                "text": "string | undefined"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "_groupNameInput",
              "type": {
                "text": "HTMLInputElement | undefined"
              },
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_onGroupNameChange",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "Event"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_cannotSave",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_onSaveClicked",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "void"
                }
              }
            }
          ],
          "attributes": [
            {
              "name": "group",
              "type": {
                "text": "string | undefined"
              },
              "description": "Name of the group",
              "fieldName": "group"
            },
            {
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "readonly"
            }
          ],
          "mixins": [
            {
              "name": "translate(i18next)",
              "module": "src/or-rule-group-viewer.ts"
            }
          ],
          "superclass": {
            "name": "OrElement",
            "package": "@openremote/or-element"
          },
          "tagName": "or-rule-group-viewer",
          "customElement": true,
          "modulePath": "src/or-rule-group-viewer.ts",
          "definitionPath": "src/or-rule-group-viewer.ts"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "OrRuleGroupViewer",
          "declaration": {
            "name": "OrRuleGroupViewer",
            "module": "src/or-rule-group-viewer.ts"
          }
        },
        {
          "kind": "custom-element-definition",
          "name": "or-rule-group-viewer",
          "declaration": {
            "name": "OrRuleGroupViewer",
            "module": "src/or-rule-group-viewer.ts"
          }
        }
      ]
    },
    {
      "kind": "javascript-module",
      "path": "src/or-rule-text-viewer.ts",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "OrRuleTextViewer",
          "members": [
            {
              "kind": "field",
              "name": "readonly",
              "type": {
                "text": "boolean | undefined"
              },
              "privacy": "public"
            },
            {
              "kind": "field",
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "privacy": "public"
            },
            {
              "kind": "field",
              "name": "_ruleset",
              "type": {
                "text": "RulesetUnion"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "_rules",
              "type": {
                "text": "string | undefined"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "_aceEditor",
              "type": {
                "text": "Ref<OrAceEditor>"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "ruleset",
              "privacy": "public"
            },
            {
              "kind": "method",
              "name": "_createRules",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "string"
                }
              }
            },
            {
              "kind": "method",
              "name": "_getMode",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_getRulesString",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_onEditorChanged",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "OrAceEditorChangedEvent"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "beforeSave",
              "privacy": "public",
              "type": {
                "text": "beforeSave() => void"
              }
            },
            {
              "kind": "method",
              "name": "validate",
              "privacy": "public",
              "return": {
                "type": {
                  "text": "boolean"
                }
              },
              "type": {
                "text": "validate() => boolean"
              }
            }
          ],
          "events": [
            {
              "name": "valid",
              "type": {
                "text": "OrRulesRuleChangedEvent"
              }
            }
          ],
          "superclass": {
            "name": "OrElement",
            "package": "@openremote/or-element"
          },
          "tagName": "or-rule-text-viewer",
          "customElement": true,
          "modulePath": "src/or-rule-text-viewer.ts",
          "definitionPath": "src/or-rule-text-viewer.ts"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "OrRuleTextViewer",
          "declaration": {
            "name": "OrRuleTextViewer",
            "module": "src/or-rule-text-viewer.ts"
          }
        },
        {
          "kind": "custom-element-definition",
          "name": "or-rule-text-viewer",
          "declaration": {
            "name": "OrRuleTextViewer",
            "module": "src/or-rule-text-viewer.ts"
          }
        }
      ]
    },
    {
      "kind": "javascript-module",
      "path": "src/or-rule-tree.ts",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "OrRuleTree",
          "members": [
            {
              "kind": "field",
              "name": "DEFAULT_ALLOWED_LANGUAGES",
              "type": {
                "text": "array"
              },
              "privacy": "public",
              "static": true,
              "default": "[RulesetLang.JSON, RulesetLang.GROOVY, RulesetLang.FLOW]"
            },
            {
              "kind": "field",
              "name": "rules",
              "type": {
                "text": "RulesetUnion[] | undefined"
              },
              "privacy": "public",
              "description": "List of rules visible in the tree menu",
              "attribute": "rules"
            },
            {
              "kind": "field",
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "privacy": "public",
              "description": "Rules configuration object, for example to only allow certain ruleset types",
              "attribute": "config"
            },
            {
              "kind": "field",
              "name": "global",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false",
              "description": "Defines whether only global rulesets should be visible.",
              "attribute": "global"
            },
            {
              "kind": "field",
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false",
              "description": "Sets every element in the tree to readonly mode",
              "attribute": "readonly"
            },
            {
              "kind": "field",
              "name": "nodes",
              "type": {
                "text": "RuleTreeNode[]"
              },
              "default": "[]"
            },
            {
              "kind": "field",
              "name": "draggable",
              "type": {
                "text": "boolean"
              },
              "default": "true"
            },
            {
              "kind": "field",
              "name": "selection"
            },
            {
              "kind": "field",
              "name": "sortOptions",
              "type": {
                "text": "any[]"
              },
              "default": "[ RuleTreeSorting.NAME, RuleTreeSorting.CREATED_ON, RuleTreeSorting.STATUS, RuleTreeSorting.LANGUAGE, ]"
            },
            {
              "kind": "field",
              "name": "sortBy",
              "type": {
                "text": "any"
              }
            },
            {
              "kind": "field",
              "name": "groupFirst",
              "type": {
                "text": "boolean"
              },
              "default": "true"
            },
            {
              "kind": "field",
              "name": "menuTitle",
              "type": {
                "text": "string"
              },
              "default": "\"rules\""
            },
            {
              "kind": "field",
              "name": "_loadingPromises",
              "type": {
                "text": "Promise<boolean>[]"
              },
              "privacy": "protected",
              "default": "[]"
            },
            {
              "kind": "field",
              "name": "_selectedTypes",
              "type": {
                "text": "Set<\"group\" | \"ruleset\">"
              },
              "privacy": "protected",
              "default": "new Set()"
            },
            {
              "kind": "field",
              "name": "_cachedEmptyGroupNodes",
              "type": {
                "text": "RuleTreeNode[]"
              },
              "privacy": "protected",
              "default": "[]"
            },
            {
              "kind": "method",
              "name": "_getSingleNodeSlotTemplate",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "TemplateResult"
                }
              },
              "parameters": [
                {
                  "name": "node",
                  "type": {
                    "text": "RuleTreeNode"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_getGroupNodeSlotTemplate",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "TemplateResult"
                }
              },
              "parameters": [
                {
                  "name": "node",
                  "type": {
                    "text": "RuleTreeNode"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_getHeaderTemplate",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "TemplateResult"
                }
              }
            },
            {
              "kind": "method",
              "name": "_onGlobalSwitch",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ev",
                  "type": {
                    "text": "Event"
                  }
                }
              ],
              "description": "HTML callback on when the global switch is toggled.\nIt normally toggles between 'global' and 'realm' rulesets when the user is a superuser."
            },
            {
              "kind": "method",
              "name": "_onCopyClicked",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "_ev",
                  "type": {
                    "text": "Event"
                  }
                }
              ],
              "description": "HTML callback on when the 'copy' menu option is pressed.\nThe function duplicates the current selected rule, and shows it inside the viewer window."
            },
            {
              "kind": "method",
              "name": "_onDeleteClicked",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "_ev",
                  "type": {
                    "text": "Event"
                  }
                }
              ],
              "description": "HTML callback on when the 'delete' menu option is pressed.\nThe function deletes the rule that is affiliated with selected tree node,\nafter prompting a modal that the user confirms this action."
            },
            {
              "kind": "method",
              "name": "_deleteRulesets",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "rulesets",
                  "type": {
                    "text": "RulesetUnion[]"
                  },
                  "description": "List of rulesets to delete."
                }
              ],
              "description": "Utility function that returns a promise for deleting a list of rulesets, based on their type."
            },
            {
              "kind": "method",
              "name": "selectRuleset",
              "privacy": "public",
              "parameters": [
                {
                  "name": "ruleset",
                  "type": {
                    "text": "RulesetUnion"
                  },
                  "description": "ruleset in the tree to be selected"
                },
                {
                  "name": "silent",
                  "default": "false",
                  "description": "skips the modal of 'discard changes' and does not dispatch an event"
                }
              ],
              "description": "Public function that allows consumers to select a ruleset in the tree.\nIt finds the tree node in the UI, and selects it.",
              "type": {
                "text": "selectRuleset(ruleset: RulesetUnion, silent = false) => void"
              }
            },
            {
              "kind": "method",
              "name": "_dispatchSelectEvent",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "boolean"
                }
              },
              "parameters": [
                {
                  "name": "nodes",
                  "optional": true,
                  "type": {
                    "text": "RuleTreeNode[]"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "deselectAllNodes",
              "privacy": "public",
              "type": {
                "text": "deselectAllNodes() => void"
              }
            },
            {
              "kind": "method",
              "name": "_getRuleNodes",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "RuleTreeNode[]"
                }
              },
              "parameters": [
                {
                  "name": "rules",
                  "type": {
                    "text": "RulesetUnion[]"
                  },
                  "description": "List of rulesets"
                }
              ],
              "description": "Gets the list of RuleTreeNode[] (tree nodes) based on a list of rulesets.\nIt maps the ruleset to the correct tree node format. For example, when a groupId is set in the Ruleset meta,\nwe group them together as children of a new group node."
            },
            {
              "kind": "method",
              "name": "_loadRulesets",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "Promise<RulesetUnion[]>"
                }
              },
              "parameters": [
                {
                  "name": "global",
                  "default": "false",
                  "description": "Whether only global rulesets should be loaded instead."
                },
                {
                  "name": "realm",
                  "default": "manager.displayRealm",
                  "description": "Name of the realm to load (if global is `false` or `undefined`)"
                }
              ],
              "description": "Utility function that returns a promise for loading the rulesets, based on the global and realm parameters"
            },
            {
              "kind": "method",
              "name": "refresh",
              "privacy": "public",
              "description": "Refreshes the tree content, and re-fetches the list of rules.",
              "type": {
                "text": "refresh() => void"
              }
            },
            {
              "kind": "method",
              "name": "_getAddActionTemplate",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "TemplateResult"
                }
              },
              "description": "Generates a HTML TemplateResult for the \"add\" button in the controls menu."
            },
            {
              "kind": "method",
              "name": "_onRulesetAddClick",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "lang",
                  "type": {
                    "text": "RulesetLang"
                  },
                  "description": "The language to be used for adding a rule."
                },
                {
                  "name": "global",
                  "default": "this.global",
                  "description": "Whether to create a global ruleset or not."
                }
              ],
              "description": "HTML callback function for clicking a ruleset language in the \"add rule\" menu."
            },
            {
              "kind": "method",
              "name": "_onGroupAddClick",
              "privacy": "protected",
              "description": "HTML callback function for clicking \"add group\" in the controls menu."
            },
            {
              "kind": "method",
              "name": "_getSortFunction",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "(a: RuleTreeNode, b: RuleTreeNode) => number"
                }
              },
              "parameters": [
                {
                  "name": "sortBy",
                  "optional": true,
                  "type": {
                    "text": "TreeMenuSorting"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_getAllowedLanguages",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "RulesetLang[] | undefined"
                }
              },
              "parameters": [
                {
                  "name": "config",
                  "default": "this.config",
                  "description": "Rules configuration to use"
                },
                {
                  "name": "global",
                  "default": "this.global",
                  "description": "Whether only to include global rulesets"
                }
              ],
              "description": "Utility function for getting the list of allowed languages based on config and global parameters."
            },
            {
              "kind": "method",
              "name": "_isLegacyJavascriptRuleset",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ruleset",
                  "optional": true,
                  "type": {
                    "text": "RulesetUnion"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_isSelectedLegacyJavascriptRuleset",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_getRulesetLangIcon",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "string"
                }
              },
              "parameters": [
                {
                  "name": "lang",
                  "optional": true,
                  "type": {
                    "text": "RulesetLang"
                  },
                  "description": "The ruleset language to get an icon of."
                }
              ],
              "description": "Utility function that gets a Material Design icon based on the ruleset language"
            },
            {
              "kind": "method",
              "name": "_getRulesetStatusIcon",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "string | undefined"
                }
              },
              "parameters": [
                {
                  "name": "status",
                  "optional": true,
                  "type": {
                    "text": "RulesetStatus"
                  },
                  "description": "The ruleset status to get an icon of."
                }
              ],
              "description": "Utility function that gets a Material Design icon based on the ruleset status"
            },
            {
              "kind": "method",
              "name": "_getRulesetStatusColorClass",
              "privacy": "protected",
              "return": {
                "type": {
                  "text": "string"
                }
              },
              "parameters": [
                {
                  "name": "status",
                  "optional": true,
                  "type": {
                    "text": "RulesetStatus"
                  },
                  "description": "The ruleset status to get a CSS class of."
                }
              ],
              "description": "Utility function that returns a CSS class for the icon element, based on the ruleset status"
            }
          ],
          "events": [
            {
              "type": {
                "text": "OrRulesAddEvent"
              }
            },
            {
              "name": "groupName",
              "type": {
                "text": "OrRulesRequestGroupEvent"
              }
            }
          ],
          "attributes": [
            {
              "name": "rules",
              "type": {
                "text": "RulesetUnion[] | undefined"
              },
              "description": "List of rules visible in the tree menu",
              "fieldName": "rules"
            },
            {
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "description": "Rules configuration object, for example to only allow certain ruleset types",
              "fieldName": "config"
            },
            {
              "name": "global",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "description": "Defines whether only global rulesets should be visible.",
              "fieldName": "global"
            },
            {
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "description": "Sets every element in the tree to readonly mode",
              "fieldName": "readonly"
            }
          ],
          "superclass": {
            "name": "OrTreeMenu",
            "package": "@openremote/or-tree-menu"
          },
          "tagName": "or-rule-tree",
          "customElement": true,
          "modulePath": "src/or-rule-tree.ts",
          "definitionPath": "src/or-rule-tree.ts"
        },
        {
          "kind": "variable",
          "name": "ruleset",
          "default": "JSON.parse(JSON.stringify(node.ruleset))"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "OrRuleTree",
          "declaration": {
            "name": "OrRuleTree",
            "module": "src/or-rule-tree.ts"
          }
        },
        {
          "kind": "custom-element-definition",
          "name": "or-rule-tree",
          "declaration": {
            "name": "OrRuleTree",
            "module": "src/or-rule-tree.ts"
          }
        }
      ]
    },
    {
      "kind": "javascript-module",
      "path": "src/or-rule-viewer.ts",
      "declarations": [
        {
          "kind": "variable",
          "name": "style",
          "default": "css` :host { display: block; height: 100%; width: 100%; overflow-y: auto; } or-scheduler { margin-left: 10px; margin-right: 20px; max-width: 400px; } .wrapper { display: flex; flex-direction: column; align-items: center; height: 100%; } #main-wrapper.saving { opacity: 0.5; pointer-events: none; } #rule-name { max-width: 400px; flex: 1 1 0; display: flex; } #rule-header { display: flex; align-items: baseline; width: 100%; box-sizing: border-box; min-height: var(--internal-or-rules-header-height); height: var(--internal-or-rules-header-height); z-index: 7; padding: 15px 20px; --or-icon-fill: var(--internal-or-rules-panel-color); } #rule-header-controls { margin-left: auto; display: flex; align-items: center; } #rule-id { margin-left: 10px; font-size: small; } #active-wrapper { display: flex; align-items: center; } #rule-view { flex-grow: 1; background-color: var(--internal-or-rules-background-color); } .iconfill-gray { margin-left: 10px; --or-icon-fill: var(--internal-or-rules-list-icon-color-ok); } .iconfill-red { margin-left: 10px; --or-icon-fill: var(--internal-or-rules-list-icon-color-error); } .legacy-warning { width: calc(100% - 40px); box-sizing: border-box; margin: 0 20px 15px; padding: 12px 14px; border-radius: 4px; border: 2px solid var(--internal-or-rules-invalid-color); color: var(--internal-or-rules-invalid-color); } `"
        },
        {
          "kind": "class",
          "description": "",
          "name": "OrRuleViewer",
          "members": [
            {
              "kind": "field",
              "name": "ruleset",
              "type": {
                "text": "RulesetUnion | undefined"
              },
              "privacy": "public",
              "attribute": "ruleset"
            },
            {
              "kind": "field",
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false",
              "attribute": "readonly"
            },
            {
              "kind": "field",
              "name": "disabled",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false",
              "attribute": "disabled"
            },
            {
              "kind": "field",
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "privacy": "public",
              "attribute": "config"
            },
            {
              "kind": "field",
              "name": "modified",
              "type": {
                "text": "boolean"
              },
              "privacy": "public",
              "default": "false"
            },
            {
              "kind": "field",
              "name": "_ruleValid",
              "type": {
                "text": "boolean"
              },
              "privacy": "protected",
              "default": "false"
            },
            {
              "kind": "field",
              "name": "_supported",
              "type": {
                "text": "boolean"
              },
              "privacy": "protected",
              "default": "true"
            },
            {
              "kind": "field",
              "name": "view",
              "type": {
                "text": "RuleView | undefined"
              },
              "privacy": "public"
            },
            {
              "kind": "field",
              "name": "wrapperElem",
              "type": {
                "text": "HTMLDivElement"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "saveBtnElem",
              "type": {
                "text": "OrVaadinButton"
              },
              "privacy": "protected"
            },
            {
              "kind": "field",
              "name": "_focusName",
              "type": {
                "text": "boolean"
              },
              "privacy": "protected",
              "default": "false"
            },
            {
              "kind": "field",
              "name": "valid",
              "privacy": "public",
              "readonly": true
            },
            {
              "kind": "method",
              "name": "_isReadonly",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_cannotSave",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_isLegacyJavascriptRuleset",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "ruleset",
                  "default": "this.ruleset"
                }
              ]
            },
            {
              "kind": "method",
              "name": "_changeName",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "name",
                  "type": {
                    "text": "string"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_onSchedulerChanged",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "e",
                  "optional": true,
                  "type": {
                    "text": "OrSchedulerChangedEvent"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_onRuleChanged",
              "privacy": "protected",
              "parameters": [
                {
                  "name": "e",
                  "type": {
                    "text": "OrRulesRuleChangedEvent"
                  }
                }
              ]
            },
            {
              "kind": "method",
              "name": "_onSaveClicked",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_doSave",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_onRuleUnsupported",
              "privacy": "protected"
            },
            {
              "kind": "method",
              "name": "_toggleEnabled",
              "privacy": "protected"
            }
          ],
          "events": [
            {
              "type": {
                "text": "OrRulesSaveEvent"
              }
            }
          ],
          "attributes": [
            {
              "name": "ruleset",
              "type": {
                "text": "RulesetUnion | undefined"
              },
              "fieldName": "ruleset"
            },
            {
              "name": "readonly",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "readonly"
            },
            {
              "name": "disabled",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "disabled"
            },
            {
              "name": "config",
              "type": {
                "text": "RulesConfig | undefined"
              },
              "fieldName": "config"
            }
          ],
          "mixins": [
            {
              "name": "translate(i18next)",
              "module": "src/or-rule-viewer.ts"
            }
          ],
          "superclass": {
            "name": "OrElement",
            "package": "@openremote/or-element"
          },
          "tagName": "or-rule-viewer",
          "customElement": true,
          "modulePath": "src/or-rule-viewer.ts",
          "definitionPath": "src/or-rule-viewer.ts"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "style",
          "declaration": {
            "name": "style",
            "module": "src/or-rule-viewer.ts"
          }
        },
        {
          "kind": "js",
          "name": "OrRuleViewer",
          "declaration": {
            "name": "OrRuleViewer",
            "module": "src/or-rule-viewer.ts"
          }
        },
        {
          "kind": "custom-element-definition",
          "name": "or-rule-viewer",
          "declaration": {
            "name": "OrRuleViewer",
            "module": "src/or-rule-viewer.ts"
          }
        }
      ]
    },
    {
      "kind": "javascript-module",
      "path": "src/style.ts",
      "declarations": [
        {
          "kind": "variable",
          "name": "invalidStyle",
          "default": "css` *:invalid { border-bottom: 2px solid var(--internal-or-rules-invalid-color); } `"
        },
        {
          "kind": "variable",
          "name": "buttonStyle",
          "default": "css` .button-clear { background: none; color: ${unsafeCSS(DefaultColor5)}; --or-icon-fill: ${unsafeCSS(DefaultColor5)}; visibility: hidden; display: inline-block; border: none; padding: 0; cursor: pointer; } .button-clear:hover { --or-icon-fill: var(--internal-or-rules-button-color); } .button-clear:focus { outline: 0; } .button-clear.hidden { visibility: hidden; } .plus-button { width: 200px; } .add-button { display: inline-block; font-weight: bold; font-size: 15px; line-height: 24px; } .add-buttons-container { display: flex; flex-direction: column; margin-top: 10px; margin-bottom: -10px; padding-top: 5px; border-top-width: 1px; border-top-style: solid; border-color: var(--internal-or-rules-line-color); } .add-buttons-container.hidden { border: none; margin: 0; padding: 0; } .add-buttons-container > button { display: inline-flex; } .add-buttons-container > button > or-icon { margin-right: 5px; } `"
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "invalidStyle",
          "declaration": {
            "name": "invalidStyle",
            "module": "src/style.ts"
          }
        },
        {
          "kind": "js",
          "name": "buttonStyle",
          "declaration": {
            "name": "buttonStyle",
            "module": "src/style.ts"
          }
        }
      ]
    }
  ]
}
