{
+
+ private String ruleChainId;
+
+ @Override
+ public TbRuleChainInputNodeConfiguration defaultConfiguration() {
+ return new TbRuleChainInputNodeConfiguration();
+ }
+
+}
diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/flow/TbRuleChainOutputNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/flow/TbRuleChainOutputNode.java
new file mode 100644
index 0000000000..59ddc1c096
--- /dev/null
+++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/flow/TbRuleChainOutputNode.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright © 2016-2021 The Thingsboard Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.thingsboard.rule.engine.flow;
+
+import lombok.extern.slf4j.Slf4j;
+import org.thingsboard.rule.engine.api.EmptyNodeConfiguration;
+import org.thingsboard.rule.engine.api.RuleNode;
+import org.thingsboard.rule.engine.api.TbContext;
+import org.thingsboard.rule.engine.api.TbNode;
+import org.thingsboard.rule.engine.api.TbNodeConfiguration;
+import org.thingsboard.rule.engine.api.TbNodeException;
+import org.thingsboard.rule.engine.api.TbRelationTypes;
+import org.thingsboard.rule.engine.api.util.TbNodeUtils;
+import org.thingsboard.server.common.data.plugin.ComponentType;
+import org.thingsboard.server.common.msg.TbMsg;
+
+@Slf4j
+@RuleNode(
+ type = ComponentType.FLOW,
+ name = "output",
+ configClazz = EmptyNodeConfiguration.class,
+ nodeDescription = "transfers the message to the caller rule chain",
+ nodeDetails = "Produces output of the rule chain processing. " +
+ "The output is forwarded to the caller rule chain, as an output of the corresponding \"input\" rule node. " +
+ "The output rule node name corresponds to the relation type of the output message, and it is used to forward messages to other rule nodes in the caller rule chain. ",
+ uiResources = {"static/rulenode/rulenode-core-config.js"},
+ configDirective = "tbFlowNodeRuleChainOutputConfig",
+ outEnabled = false
+)
+public class TbRuleChainOutputNode implements TbNode {
+
+ @Override
+ public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException {
+ }
+
+ @Override
+ public void onMsg(TbContext ctx, TbMsg msg) {
+ ctx.output(msg, ctx.getSelf().getName());
+ }
+
+ @Override
+ public void destroy() {
+ }
+}
diff --git a/rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js b/rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js
index 3505c30a5a..ae61853e4b 100644
--- a/rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js
+++ b/rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js
@@ -1,16 +1,4264 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@ngx-translate/core"),require("@shared/public-api"),require("@ngrx/store"),require("@angular/forms"),require("@home/components/public-api"),require("@core/public-api"),require("@angular/cdk/keycodes"),require("@angular/cdk/coercion"),require("@angular/material/chips"),require("@angular/material/autocomplete"),require("rxjs"),require("rxjs/operators"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("rulenode-core-config",["exports","@angular/core","@angular/common","@ngx-translate/core","@shared/public-api","@ngrx/store","@angular/forms","@home/components/public-api","@core/public-api","@angular/cdk/keycodes","@angular/cdk/coercion","@angular/material/chips","@angular/material/autocomplete","rxjs","rxjs/operators","@angular/platform-browser"],t):t((e=e||self)["rulenode-core-config"]={},e.ng.core,e.ng.common,e["ngx-translate"],e.shared,e["ngrx-store"],e.ng.forms,e.publicApi$1,e.core,e.ng.cdk.keycodes,e.ng.cdk.coercion,e.ng.material.chips,e.ng.material.autocomplete,e.rxjs,e.rxjs.operators,e.ng.platformBrowser)}(this,(function(e,t,r,n,a,o,i,l,s,m,u,d,p,c,f,g){"use strict";
-/*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */var y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function h(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function C(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create;function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var F,x=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.emptyConfigForm},r.prototype.onConfigurationSet=function(e){this.emptyConfigForm=this.fb.group({})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-node-empty-config",template:""}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),T=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.attributeScopes=Object.keys(a.AttributeScope),n.telemetryTypeTranslationsMap=a.telemetryTypeTranslations,n}return b(r,e),r.prototype.configForm=function(){return this.attributesConfigForm},r.prototype.onConfigurationSet=function(e){this.attributesConfigForm=this.fb.group({scope:[e?e.scope:null,[i.Validators.required]],notifyDevice:[!e||e.scope,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-attributes-config",template:'\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n \n
\n {{ \'tb.rulenode.notify-device\' | translate }}\n \n
tb.rulenode.notify-device-hint
\n
\n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),q=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.timeseriesConfigForm},r.prototype.onConfigurationSet=function(e){this.timeseriesConfigForm=this.fb.group({defaultTTL:[e?e.defaultTTL:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-timeseries-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),S=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.rpcRequestConfigForm},r.prototype.onConfigurationSet=function(e){this.rpcRequestConfigForm=this.fb.group({timeoutInSeconds:[e?e.timeoutInSeconds:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-rpc-request-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),I=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.logConfigForm},r.prototype.onConfigurationSet=function(e){this.logConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.logConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"string",this.translate.instant("tb.rulenode.to-string"),"ToString",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/log_node_script_fn").subscribe((function(t){t&&e.logConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-action-node-log-config",template:'\n \n \n \n \n \n
\n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),k=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.assignCustomerConfigForm},r.prototype.onConfigurationSet=function(e){this.assignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required,i.Validators.pattern(/.*\S.*/)]],createCustomerIfNotExists:[!!e&&e.createCustomerIfNotExists,[]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.prepareOutputConfig=function(e){return e.customerNamePattern=e.customerNamePattern.trim(),e},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-assign-to-customer-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),N=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.clearAlarmConfigForm},r.prototype.onConfigurationSet=function(e){this.clearAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],alarmType:[e?e.alarmType:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.clearAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/clear_alarm_node_script_fn").subscribe((function(t){t&&e.clearAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-action-node-clear-alarm-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),V=function(e){function r(t,r,n,o){var i=e.call(this,t)||this;return i.store=t,i.fb=r,i.nodeScriptTestService=n,i.translate=o,i.alarmSeverities=Object.keys(a.AlarmSeverity),i.alarmSeverityTranslationMap=a.alarmSeverityTranslations,i.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],i}return b(r,e),r.prototype.configForm=function(){return this.createAlarmConfigForm},r.prototype.onConfigurationSet=function(e){var t=this;this.createAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],useMessageAlarmData:[!!e&&e.useMessageAlarmData,[]],alarmType:[e?e.alarmType:null,[]],severity:[e?e.severity:null,[]],propagate:[!!e&&e.propagate,[]],relationTypes:[e?e.relationTypes:null,[]],dynamicSeverity:!1}),this.createAlarmConfigForm.get("dynamicSeverity").valueChanges.subscribe((function(e){e?t.createAlarmConfigForm.get("severity").patchValue("",{emitEvent:!1}):t.createAlarmConfigForm.get("severity").patchValue(t.alarmSeverities[0],{emitEvent:!1})}))},r.prototype.validatorTriggers=function(){return["useMessageAlarmData"]},r.prototype.updateValidators=function(e){this.createAlarmConfigForm.get("useMessageAlarmData").value?(this.createAlarmConfigForm.get("alarmType").setValidators([]),this.createAlarmConfigForm.get("severity").setValidators([])):(this.createAlarmConfigForm.get("alarmType").setValidators([i.Validators.required]),this.createAlarmConfigForm.get("severity").setValidators([i.Validators.required])),this.createAlarmConfigForm.get("alarmType").updateValueAndValidity({emitEvent:e}),this.createAlarmConfigForm.get("severity").updateValueAndValidity({emitEvent:e})},r.prototype.testScript=function(){var e=this,t=this.createAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/create_alarm_node_script_fn").subscribe((function(t){t&&e.createAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},r.prototype.removeKey=function(e,t){var r=this.createAlarmConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.createAlarmConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.createAlarmConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.createAlarmConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-action-node-create-alarm-config",template:'\n \n \n \n \n \n
\n \n \n {{ \'tb.rulenode.use-message-alarm-data\' | translate }}\n \n \n {{ \'tb.rulenode.use-dynamically-change-the-severity-of-alar\' | translate }}\n \n
\n \n \n \n {{ \'tb.rulenode.propagate\' | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),E=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return b(r,e),r.prototype.configForm=function(){return this.createRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.createRelationConfigForm=this.fb.group({direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[i.Validators.required]],entityNamePattern:[e?e.entityNamePattern:null,[]],entityTypePattern:[e?e.entityTypePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],createEntityIfNotExists:[!!e&&e.createEntityIfNotExists,[]],removeCurrentRelations:[!!e&&e.removeCurrentRelations,[]],changeOriginatorToRelatedEntity:[!!e&&e.changeOriginatorToRelatedEntity,[]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.validatorTriggers=function(){return["entityType"]},r.prototype.updateValidators=function(e){var t=this.createRelationConfigForm.get("entityType").value;t?this.createRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required,i.Validators.pattern(/.*\S.*/)]):this.createRelationConfigForm.get("entityNamePattern").setValidators([]),!t||t!==a.EntityType.DEVICE&&t!==a.EntityType.ASSET?this.createRelationConfigForm.get("entityTypePattern").setValidators([]):this.createRelationConfigForm.get("entityTypePattern").setValidators([i.Validators.required,i.Validators.pattern(/.*\S.*/)]),this.createRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e}),this.createRelationConfigForm.get("entityTypePattern").updateValueAndValidity({emitEvent:e})},r.prototype.prepareOutputConfig=function(e){return e.entityNamePattern=e.entityNamePattern?e.entityNamePattern.trim():null,e.entityTypePattern=e.entityTypePattern?e.entityTypePattern.trim():null,e},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-create-relation-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),A=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.msgDelayConfigForm},r.prototype.onConfigurationSet=function(e){this.msgDelayConfigForm=this.fb.group({useMetadataPeriodInSecondsPatterns:[!!e&&e.useMetadataPeriodInSecondsPatterns,[]],periodInSeconds:[e?e.periodInSeconds:null,[]],periodInSecondsPattern:[e?e.periodInSecondsPattern:null,[]],maxPendingMsgs:[e?e.maxPendingMsgs:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(1e5)]]})},r.prototype.validatorTriggers=function(){return["useMetadataPeriodInSecondsPatterns"]},r.prototype.updateValidators=function(e){this.msgDelayConfigForm.get("useMetadataPeriodInSecondsPatterns").value?(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([i.Validators.required]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([])):(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([i.Validators.required,i.Validators.min(0)])),this.msgDelayConfigForm.get("periodInSecondsPattern").updateValueAndValidity({emitEvent:e}),this.msgDelayConfigForm.get("periodInSeconds").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-msg-delay-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),L=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return b(r,e),r.prototype.configForm=function(){return this.deleteRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.deleteRelationConfigForm=this.fb.group({deleteForSingleEntity:[!!e&&e.deleteForSingleEntity,[]],direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[]],entityNamePattern:[e?e.entityNamePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.validatorTriggers=function(){return["deleteForSingleEntity","entityType"]},r.prototype.updateValidators=function(e){var t=this.deleteRelationConfigForm.get("deleteForSingleEntity").value,r=this.deleteRelationConfigForm.get("entityType").value;t?this.deleteRelationConfigForm.get("entityType").setValidators([i.Validators.required]):this.deleteRelationConfigForm.get("entityType").setValidators([]),t&&r?this.deleteRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required,i.Validators.pattern(/.*\S.*/)]):this.deleteRelationConfigForm.get("entityNamePattern").setValidators([]),this.deleteRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:!1}),this.deleteRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e})},r.prototype.prepareOutputConfig=function(e){return e.entityNamePattern=e.entityNamePattern?e.entityNamePattern.trim():null,e},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-delete-relation-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),P=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.generatorConfigForm},r.prototype.onConfigurationSet=function(e){this.generatorConfigForm=this.fb.group({msgCount:[e?e.msgCount:null,[i.Validators.required,i.Validators.min(0)]],periodInSeconds:[e?e.periodInSeconds:null,[i.Validators.required,i.Validators.min(1)]],originator:[e?e.originator:null,[]],jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.prepareInputConfig=function(e){return e&&(e.originatorId&&e.originatorType?e.originator={id:e.originatorId,entityType:e.originatorType}:e.originator=null,delete e.originatorId,delete e.originatorType),e},r.prototype.prepareOutputConfig=function(e){return e.originator?(e.originatorId=e.originator.id,e.originatorType=e.originator.entityType):(e.originatorId=null,e.originatorType=null),delete e.originator,e},r.prototype.testScript=function(){var e=this,t=this.generatorConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"generate",this.translate.instant("tb.rulenode.generator"),"Generate",["prevMsg","prevMetadata","prevMsgType"],this.ruleNodeId,"rulenode/generator_node_script_fn").subscribe((function(t){t&&e.generatorConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-action-node-generator-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent);!function(e){e.CUSTOMER="CUSTOMER",e.TENANT="TENANT",e.RELATED="RELATED",e.ALARM_ORIGINATOR="ALARM_ORIGINATOR"}(F||(F={}));var M,w=new Map([[F.CUSTOMER,"tb.rulenode.originator-customer"],[F.TENANT,"tb.rulenode.originator-tenant"],[F.RELATED,"tb.rulenode.originator-related"],[F.ALARM_ORIGINATOR,"tb.rulenode.originator-alarm-originator"]]);!function(e){e.CIRCLE="CIRCLE",e.POLYGON="POLYGON"}(M||(M={}));var R,D=new Map([[M.CIRCLE,"tb.rulenode.perimeter-circle"],[M.POLYGON,"tb.rulenode.perimeter-polygon"]]);!function(e){e.MILLISECONDS="MILLISECONDS",e.SECONDS="SECONDS",e.MINUTES="MINUTES",e.HOURS="HOURS",e.DAYS="DAYS"}(R||(R={}));var O,K=new Map([[R.MILLISECONDS,"tb.rulenode.time-unit-milliseconds"],[R.SECONDS,"tb.rulenode.time-unit-seconds"],[R.MINUTES,"tb.rulenode.time-unit-minutes"],[R.HOURS,"tb.rulenode.time-unit-hours"],[R.DAYS,"tb.rulenode.time-unit-days"]]);!function(e){e.METER="METER",e.KILOMETER="KILOMETER",e.FOOT="FOOT",e.MILE="MILE",e.NAUTICAL_MILE="NAUTICAL_MILE"}(O||(O={}));var B,H=new Map([[O.METER,"tb.rulenode.range-unit-meter"],[O.KILOMETER,"tb.rulenode.range-unit-kilometer"],[O.FOOT,"tb.rulenode.range-unit-foot"],[O.MILE,"tb.rulenode.range-unit-mile"],[O.NAUTICAL_MILE,"tb.rulenode.range-unit-nautical-mile"]]);!function(e){e.TITLE="TITLE",e.COUNTRY="COUNTRY",e.STATE="STATE",e.ZIP="ZIP",e.ADDRESS="ADDRESS",e.ADDRESS2="ADDRESS2",e.PHONE="PHONE",e.EMAIL="EMAIL",e.ADDITIONAL_INFO="ADDITIONAL_INFO"}(B||(B={}));var G,j,U,_=new Map([[B.TITLE,"tb.rulenode.entity-details-title"],[B.COUNTRY,"tb.rulenode.entity-details-country"],[B.STATE,"tb.rulenode.entity-details-state"],[B.ZIP,"tb.rulenode.entity-details-zip"],[B.ADDRESS,"tb.rulenode.entity-details-address"],[B.ADDRESS2,"tb.rulenode.entity-details-address2"],[B.PHONE,"tb.rulenode.entity-details-phone"],[B.EMAIL,"tb.rulenode.entity-details-email"],[B.ADDITIONAL_INFO,"tb.rulenode.entity-details-additional_info"]]);!function(e){e.FIRST="FIRST",e.LAST="LAST",e.ALL="ALL"}(G||(G={})),function(e){e.ASC="ASC",e.DESC="DESC"}(j||(j={})),function(e){e.STANDARD="STANDARD",e.FIFO="FIFO"}(U||(U={}));var z,Q=new Map([[U.STANDARD,"tb.rulenode.sqs-queue-standard"],[U.FIFO,"tb.rulenode.sqs-queue-fifo"]]),$=["anonymous","basic","cert.PEM"],W=new Map([["anonymous","tb.rulenode.credentials-anonymous"],["basic","tb.rulenode.credentials-basic"],["cert.PEM","tb.rulenode.credentials-pem"]]),J=["sas","cert.PEM"],Y=new Map([["sas","tb.rulenode.credentials-sas"],["cert.PEM","tb.rulenode.credentials-pem"]]);!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(z||(z={}));var Z=["US-ASCII","ISO-8859-1","UTF-8","UTF-16BE","UTF-16LE","UTF-16"],X=new Map([["US-ASCII","tb.rulenode.charset-us-ascii"],["ISO-8859-1","tb.rulenode.charset-iso-8859-1"],["UTF-8","tb.rulenode.charset-utf-8"],["UTF-16BE","tb.rulenode.charset-utf-16be"],["UTF-16LE","tb.rulenode.charset-utf-16le"],["UTF-16","tb.rulenode.charset-utf-16"]]),ee=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=M,n.perimeterTypes=Object.keys(M),n.perimeterTypeTranslationMap=D,n.rangeUnits=Object.keys(O),n.rangeUnitTranslationMap=H,n.timeUnits=Object.keys(R),n.timeUnitsTranslationMap=K,n}return b(r,e),r.prototype.configForm=function(){return this.geoActionConfigForm},r.prototype.onConfigurationSet=function(e){this.geoActionConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]],minInsideDuration:[e?e.minInsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minInsideDurationTimeUnit:[e?e.minInsideDurationTimeUnit:null,[i.Validators.required]],minOutsideDuration:[e?e.minOutsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minOutsideDurationTimeUnit:[e?e.minOutsideDurationTimeUnit:null,[i.Validators.required]]})},r.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},r.prototype.updateValidators=function(e){var t=this.geoActionConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoActionConfigForm.get("perimeterType").value;t?this.geoActionConfigForm.get("perimeterType").setValidators([]):this.geoActionConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==M.CIRCLE?(this.geoActionConfigForm.get("centerLatitude").setValidators([]),this.geoActionConfigForm.get("centerLongitude").setValidators([]),this.geoActionConfigForm.get("range").setValidators([]),this.geoActionConfigForm.get("rangeUnit").setValidators([])):(this.geoActionConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoActionConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoActionConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoActionConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==M.POLYGON?this.geoActionConfigForm.get("polygonsDefinition").setValidators([]):this.geoActionConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoActionConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoActionConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-gps-geofencing-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),te=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.msgCountConfigForm},r.prototype.onConfigurationSet=function(e){this.msgCountConfigForm=this.fb.group({interval:[e?e.interval:null,[i.Validators.required,i.Validators.min(1)]],telemetryPrefix:[e?e.telemetryPrefix:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-msg-count-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),re=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.rpcReplyConfigForm},r.prototype.onConfigurationSet=function(e){this.rpcReplyConfigForm=this.fb.group({requestIdMetaDataAttribute:[e?e.requestIdMetaDataAttribute:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-rpc-reply-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ne=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.saveToCustomTableConfigForm},r.prototype.onConfigurationSet=function(e){this.saveToCustomTableConfigForm=this.fb.group({tableName:[e?e.tableName:null,[i.Validators.required,i.Validators.pattern(/.*\S.*/)]],fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},r.prototype.prepareOutputConfig=function(e){return e.tableName=e.tableName.trim(),e},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-custom-table-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ae=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.translate=r,o.injector=n,o.fb=a,o.propagateChange=null,o.valueChangeSubscription=null,o}var a;return b(r,e),a=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){this.ngControl=this.injector.get(i.NgControl),null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.kvListFormGroup=this.fb.group({}),this.kvListFormGroup.addControl("keyVals",this.fb.array([]))},r.prototype.keyValsFormArray=function(){return this.kvListFormGroup.get("keyVals")},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.kvListFormGroup.disable({emitEvent:!1}):this.kvListFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){var t,r,n=this;this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe();var a=[];if(e)try{for(var o=v(Object.keys(e)),l=o.next();!l.done;l=o.next()){var s=l.value;Object.prototype.hasOwnProperty.call(e,s)&&a.push(this.fb.group({key:[s,[i.Validators.required]],value:[e[s],[i.Validators.required]]}))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.kvListFormGroup.setControl("keyVals",this.fb.array(a)),this.valueChangeSubscription=this.kvListFormGroup.valueChanges.subscribe((function(){n.updateModel()}))},r.prototype.removeKeyVal=function(e){this.kvListFormGroup.get("keyVals").removeAt(e)},r.prototype.addKeyVal=function(){this.kvListFormGroup.get("keyVals").push(this.fb.group({key:["",[i.Validators.required]],value:["",[i.Validators.required]]}))},r.prototype.validate=function(e){return!this.kvListFormGroup.get("keyVals").value.length&&this.required?{kvMapRequired:!0}:this.kvListFormGroup.valid?null:{kvFieldsRequired:!0}},r.prototype.updateModel=function(){var e=this.kvListFormGroup.get("keyVals").value;if(this.required&&!e.length||!this.kvListFormGroup.valid)this.propagateChange(null);else{var t={};e.forEach((function(e){t[e.key]=e.value})),this.propagateChange(t)}},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:t.Injector},{type:i.FormBuilder}]},h([t.Input(),C("design:type",Boolean)],r.prototype,"disabled",void 0),h([t.Input(),C("design:type",String)],r.prototype,"requiredText",void 0),h([t.Input(),C("design:type",String)],r.prototype,"keyText",void 0),h([t.Input(),C("design:type",String)],r.prototype,"keyRequiredText",void 0),h([t.Input(),C("design:type",String)],r.prototype,"valText",void 0),h([t.Input(),C("design:type",String)],r.prototype,"valRequiredText",void 0),h([t.Input(),C("design:type",Boolean),C("design:paramtypes",[Boolean])],r.prototype,"required",null),r=a=h([t.Component({selector:"tb-kv-map-config",template:'\n \n \n \n \n \n
\n\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return a})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return a})),multi:!0}],styles:[":host .tb-kv-map-config{margin-bottom:16px}:host .tb-kv-map-config .header{padding-left:5px;padding-right:5px;padding-bottom:5px}:host .tb-kv-map-config .header .cell{padding-left:5px;padding-right:5px;color:rgba(0,0,0,.54);font-size:12px;font-weight:700;white-space:nowrap}:host .tb-kv-map-config .body{padding-left:5px;padding-right:5px;padding-bottom:20px;max-height:300px;overflow:auto}:host .tb-kv-map-config .body .row{padding-top:5px;max-height:40px}:host .tb-kv-map-config .body .cell{padding-left:5px;padding-right:5px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell{margin:0;max-height:40px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell .mat-form-field-infix{border-top:0}:host ::ng-deep .tb-kv-map-config .body button.mat-button{margin:0}"]}),C("design:paramtypes",[o.Store,n.TranslateService,t.Injector,i.FormBuilder])],r)}(a.PageComponent),oe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n.propagateChange=null,n}var n;return b(r,e),n=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.deviceRelationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],relationType:[null],deviceTypes:[null,[i.Validators.required]]}),this.deviceRelationsQueryFormGroup.valueChanges.subscribe((function(t){e.deviceRelationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.deviceRelationsQueryFormGroup.disable({emitEvent:!1}):this.deviceRelationsQueryFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){this.deviceRelationsQueryFormGroup.reset(e,{emitEvent:!1})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},h([t.Input(),C("design:type",Boolean)],r.prototype,"disabled",void 0),h([t.Input(),C("design:type",Boolean),C("design:paramtypes",[Boolean])],r.prototype,"required",null),r=n=h([t.Component({selector:"tb-device-relations-query-config",template:'\n \n {{ \'alias.last-level-relation\' | translate }}\n \n \n \n relation.direction\n \n \n {{ directionTypeTranslations.get(type) | translate }}\n \n \n \n \n tb.rulenode.max-relation-level\n \n \n
\n relation.relation-type
\n \n \n device.device-types
\n \n \n\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.PageComponent),ie=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.propagateChange=null,n}var n;return b(r,e),n=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.relationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],filters:[null]}),this.relationsQueryFormGroup.valueChanges.subscribe((function(t){e.relationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.relationsQueryFormGroup.disable({emitEvent:!1}):this.relationsQueryFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){this.relationsQueryFormGroup.reset(e||{},{emitEvent:!1})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},h([t.Input(),C("design:type",Boolean)],r.prototype,"disabled",void 0),h([t.Input(),C("design:type",Boolean),C("design:paramtypes",[Boolean])],r.prototype,"required",null),r=n=h([t.Component({selector:"tb-relations-query-config",template:'\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.PageComponent),le=function(e){function r(t,r,n,o){var i,l,s=e.call(this,t)||this;s.store=t,s.translate=r,s.truncate=n,s.fb=o,s.placeholder="tb.rulenode.message-type",s.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],s.messageTypes=[],s.messageTypesList=[],s.searchText="",s.propagateChange=function(e){},s.messageTypeConfigForm=s.fb.group({messageType:[null]});try{for(var u=v(Object.keys(a.MessageType)),d=u.next();!d.done;d=u.next()){var p=d.value;s.messageTypesList.push({name:a.messageTypeNames.get(a.MessageType[p]),value:p})}}catch(e){i={error:e}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(i)throw i.error}}return s}var l;return b(r,e),l=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.ngOnInit=function(){var e=this;this.filteredMessageTypes=this.messageTypeConfigForm.get("messageType").valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(t){return e.fetchMessageTypes(t)})),f.share())},r.prototype.ngAfterViewInit=function(){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.messageTypeConfigForm.disable({emitEvent:!1}):this.messageTypeConfigForm.enable({emitEvent:!1})},r.prototype.writeValue=function(e){var t=this;this.searchText="",this.messageTypes.length=0,e&&e.forEach((function(e){var r=t.messageTypesList.find((function(t){return t.value===e}));r?t.messageTypes.push({name:r.name,value:r.value}):t.messageTypes.push({name:e,value:e})}))},r.prototype.displayMessageTypeFn=function(e){return e?e.name:void 0},r.prototype.textIsNotEmpty=function(e){return!!(e&&null!=e&&e.length>0)},r.prototype.createMessageType=function(e,t){e.preventDefault(),this.transformMessageType(t)},r.prototype.add=function(e){this.transformMessageType(e.value)},r.prototype.fetchMessageTypes=function(e){if(this.searchText=e,this.searchText&&this.searchText.length){var t=this.searchText.toUpperCase();return c.of(this.messageTypesList.filter((function(e){return e.name.toUpperCase().includes(t)})))}return c.of(this.messageTypesList)},r.prototype.transformMessageType=function(e){if((e||"").trim()){var t=null,r=e.trim(),n=this.messageTypesList.find((function(e){return e.name===r}));(t=n?{name:n.name,value:n.value}:{name:r,value:r})&&this.addMessageType(t)}this.clear("")},r.prototype.remove=function(e){var t=this.messageTypes.indexOf(e);t>=0&&(this.messageTypes.splice(t,1),this.updateModel())},r.prototype.selected=function(e){this.addMessageType(e.option.value),this.clear("")},r.prototype.addMessageType=function(e){-1===this.messageTypes.findIndex((function(t){return t.value===e.value}))&&(this.messageTypes.push(e),this.updateModel())},r.prototype.onFocus=function(){this.messageTypeConfigForm.get("messageType").updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.messageTypeInput.nativeElement.value=e,this.messageTypeConfigForm.get("messageType").patchValue(null,{emitEvent:!0}),setTimeout((function(){t.messageTypeInput.nativeElement.blur(),t.messageTypeInput.nativeElement.focus()}),0)},r.prototype.updateModel=function(){var e=this.messageTypes.map((function(e){return e.value}));this.required?(this.chipList.errorState=!e.length,this.propagateChange(e.length>0?e:null)):(this.chipList.errorState=!1,this.propagateChange(e))},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:a.TruncatePipe},{type:i.FormBuilder}]},h([t.Input(),C("design:type",Boolean),C("design:paramtypes",[Boolean])],r.prototype,"required",null),h([t.Input(),C("design:type",String)],r.prototype,"label",void 0),h([t.Input(),C("design:type",Object)],r.prototype,"placeholder",void 0),h([t.Input(),C("design:type",Boolean)],r.prototype,"disabled",void 0),h([t.ViewChild("chipList",{static:!1}),C("design:type",d.MatChipList)],r.prototype,"chipList",void 0),h([t.ViewChild("messageTypeAutocomplete",{static:!1}),C("design:type",p.MatAutocomplete)],r.prototype,"matAutocomplete",void 0),h([t.ViewChild("messageTypeInput",{static:!1}),C("design:type",t.ElementRef)],r.prototype,"messageTypeInput",void 0),r=l=h([t.Component({selector:"tb-message-types-config",template:'\n {{ label }}\n \n \n {{messageType.name}}\n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-message-types-found\n
\n
\n \n {{ translate.get(\'tb.rulenode.no-message-type-matching\',\n {messageType: truncate.transform(searchText, true, 6, '...')}) | async }}\n \n \n
\n tb.rulenode.create-new-message-type\n \n
\n \n \n \n {{ \'tb.rulenode.message-types-required\' | translate }}\n \n\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0}]}),C("design:paramtypes",[o.Store,n.TranslateService,a.TruncatePipe,i.FormBuilder])],r)}(a.PageComponent),se=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.subscriptions=[],n.disableCertPemCredentials=!1,n.passwordFieldRquired=!0,n.allCredentialsTypes=$,n.credentialsTypeTranslationsMap=W,n.propagateChange=null,n}var n;return b(r,e),n=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.credentialsConfigFormGroup=this.fb.group({type:[null,[i.Validators.required]],username:[null,[]],password:[null,[]],caCert:[null,[]],caCertFileName:[null,[]],privateKey:[null,[]],privateKeyFileName:[null,[]],cert:[null,[]],certFileName:[null,[]]}),this.subscriptions.push(this.credentialsConfigFormGroup.valueChanges.pipe(f.distinctUntilChanged()).subscribe((function(){e.updateView()}))),this.subscriptions.push(this.credentialsConfigFormGroup.get("type").valueChanges.subscribe((function(){e.credentialsTypeChanged()})))},r.prototype.ngOnChanges=function(e){var t,r,n=this;try{for(var a=v(Object.keys(e)),o=a.next();!o.done;o=a.next()){var i=o.value,l=e[i];if(!l.firstChange&&l.currentValue!==l.previousValue)if(l.currentValue&&"disableCertPemCredentials"===i)"cert.PEM"===this.credentialsConfigFormGroup.get("type").value&&setTimeout((function(){n.credentialsConfigFormGroup.get("type").patchValue("anonymous",{emitEvent:!0})}))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}},r.prototype.ngOnDestroy=function(){this.subscriptions.forEach((function(e){return e.unsubscribe()}))},r.prototype.writeValue=function(e){s.isDefinedAndNotNull(e)&&(this.credentialsConfigFormGroup.reset(e,{emitEvent:!1}),this.updateValidators(!1))},r.prototype.setDisabledState=function(e){e?this.credentialsConfigFormGroup.disable():(this.credentialsConfigFormGroup.enable(),this.updateValidators())},r.prototype.updateView=function(){var e=this.credentialsConfigFormGroup.value,t=e.type;switch(t){case"anonymous":e={type:t};break;case"basic":e={type:t,username:e.username,password:e.password};break;case"cert.PEM":delete e.username}this.propagateChange(e)},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.validate=function(e){return this.credentialsConfigFormGroup.valid?null:{credentialsConfig:{valid:!1}}},r.prototype.credentialsTypeChanged=function(){this.credentialsConfigFormGroup.patchValue({username:null,password:null,caCert:null,caCertFileName:null,privateKey:null,privateKeyFileName:null,cert:null,certFileName:null}),this.updateValidators()},r.prototype.updateValidators=function(e){void 0===e&&(e=!1);var t=this.credentialsConfigFormGroup.get("type").value;switch(e&&this.credentialsConfigFormGroup.reset({type:t},{emitEvent:!1}),this.credentialsConfigFormGroup.setValidators([]),this.credentialsConfigFormGroup.get("username").setValidators([]),this.credentialsConfigFormGroup.get("password").setValidators([]),t){case"anonymous":break;case"basic":this.credentialsConfigFormGroup.get("username").setValidators([i.Validators.required]),this.credentialsConfigFormGroup.get("password").setValidators(this.passwordFieldRquired?[i.Validators.required]:[]);break;case"cert.PEM":this.credentialsConfigFormGroup.setValidators([this.requiredFilesSelected(i.Validators.required,[["caCert","caCertFileName"],["privateKey","privateKeyFileName","cert","certFileName"]])])}this.credentialsConfigFormGroup.get("username").updateValueAndValidity({emitEvent:e}),this.credentialsConfigFormGroup.get("password").updateValueAndValidity({emitEvent:e}),this.credentialsConfigFormGroup.updateValueAndValidity({emitEvent:e})},r.prototype.requiredFilesSelected=function(e,t){return void 0===t&&(t=null),function(r){return t||(t=[Object.keys(r.controls)]),(null==r?void 0:r.controls)&&t.some((function(t){return t.every((function(t){return!e(r.controls[t])}))}))?null:{notAllRequiredFilesSelected:!0}}},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},h([t.Input(),C("design:type",Boolean),C("design:paramtypes",[Boolean])],r.prototype,"required",null),h([t.Input(),C("design:type",Object)],r.prototype,"disableCertPemCredentials",void 0),h([t.Input(),C("design:type",Object)],r.prototype,"passwordFieldRquired",void 0),r=n=h([t.Component({selector:"tb-credentials-config",template:'\n \n \n tb.rulenode.credentials\n \n {{ credentialsTypeTranslationsMap.get(credentialsConfigFormGroup.get(\'type\').value) | translate }}\n \n \n \n \n tb.rulenode.credentials-type\n \n \n {{ credentialsTypeTranslationsMap.get(credentialsType) | translate }}\n \n \n \n {{ \'tb.rulenode.credentials-type-required\' | translate }}\n \n \n \n \n \n\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return n})),multi:!0}]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.PageComponent),me=function(){function e(e){this.sanitizer=e}return e.prototype.transform=function(e){return this.sanitizer.bypassSecurityTrustHtml(e)},e.ctorParameters=function(){return[{type:g.DomSanitizer}]},e=h([t.Pipe({name:"safeHtml"}),C("design:paramtypes",[g.DomSanitizer])],e)}(),ue=function(){function e(){}return e=h([t.NgModule({declarations:[ae,oe,ie,le,se,me],imports:[r.CommonModule,a.SharedModule,l.HomeComponentsModule],exports:[ae,oe,ie,le,se,me]})],e)}(),de=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.unassignCustomerConfigForm},r.prototype.onConfigurationSet=function(e){this.unassignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required,i.Validators.pattern(/.*\S.*/)]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.prepareOutputConfig=function(e){return e.customerNamePattern=e.customerNamePattern.trim(),e},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-un-assign-to-customer-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),pe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.snsConfigForm},r.prototype.onConfigurationSet=function(e){this.snsConfigForm=this.fb.group({topicArnPattern:[e?e.topicArnPattern:null,[i.Validators.required]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-sns-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ce=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.sqsQueueType=U,n.sqsQueueTypes=Object.keys(U),n.sqsQueueTypeTranslationsMap=Q,n}return b(r,e),r.prototype.configForm=function(){return this.sqsConfigForm},r.prototype.onConfigurationSet=function(e){this.sqsConfigForm=this.fb.group({queueType:[e?e.queueType:null,[i.Validators.required]],queueUrlPattern:[e?e.queueUrlPattern:null,[i.Validators.required]],delaySeconds:[e?e.delaySeconds:null,[i.Validators.min(0),i.Validators.max(900)]],messageAttributes:[e?e.messageAttributes:null,[]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-sqs-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),fe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.pubSubConfigForm},r.prototype.onConfigurationSet=function(e){this.pubSubConfigForm=this.fb.group({projectId:[e?e.projectId:null,[i.Validators.required]],topicName:[e?e.topicName:null,[i.Validators.required]],serviceAccountKey:[e?e.serviceAccountKey:null,[i.Validators.required]],serviceAccountKeyFileName:[e?e.serviceAccountKeyFileName:null,[i.Validators.required]],messageAttributes:[e?e.messageAttributes:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-pub-sub-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ge=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.ackValues=["all","-1","0","1"],n.ToByteStandartCharsetTypesValues=Z,n.ToByteStandartCharsetTypeTranslationMap=X,n}return b(r,e),r.prototype.configForm=function(){return this.kafkaConfigForm},r.prototype.onConfigurationSet=function(e){this.kafkaConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],bootstrapServers:[e?e.bootstrapServers:null,[i.Validators.required]],retries:[e?e.retries:null,[i.Validators.min(0)]],batchSize:[e?e.batchSize:null,[i.Validators.min(0)]],linger:[e?e.linger:null,[i.Validators.min(0)]],bufferMemory:[e?e.bufferMemory:null,[i.Validators.min(0)]],acks:[e?e.acks:null,[i.Validators.required]],keySerializer:[e?e.keySerializer:null,[i.Validators.required]],valueSerializer:[e?e.valueSerializer:null,[i.Validators.required]],otherProperties:[e?e.otherProperties:null,[]],addMetadataKeyValuesAsKafkaHeaders:[!!e&&e.addMetadataKeyValuesAsKafkaHeaders,[]],kafkaHeadersCharset:[e?e.kafkaHeadersCharset:null,[]]})},r.prototype.validatorTriggers=function(){return["addMetadataKeyValuesAsKafkaHeaders"]},r.prototype.updateValidators=function(e){this.kafkaConfigForm.get("addMetadataKeyValuesAsKafkaHeaders").value?this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([i.Validators.required]):this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([]),this.kafkaConfigForm.get("kafkaHeadersCharset").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-kafka-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ye=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.mqttConfigForm},r.prototype.onConfigurationSet=function(e){this.mqttConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:[e?e.credentials:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-mqtt-config",template:'\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}:host .tb-hint.client-id{margin-top:-1.25em;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),be=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.messageProperties=[null,"BASIC","TEXT_PLAIN","MINIMAL_BASIC","MINIMAL_PERSISTENT_BASIC","PERSISTENT_BASIC","PERSISTENT_TEXT_PLAIN"],n}return b(r,e),r.prototype.configForm=function(){return this.rabbitMqConfigForm},r.prototype.onConfigurationSet=function(e){this.rabbitMqConfigForm=this.fb.group({exchangeNamePattern:[e?e.exchangeNamePattern:null,[]],routingKeyPattern:[e?e.routingKeyPattern:null,[]],messageProperties:[e?e.messageProperties:null,[]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],virtualHost:[e?e.virtualHost:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]],automaticRecoveryEnabled:[!!e&&e.automaticRecoveryEnabled,[]],connectionTimeout:[e?e.connectionTimeout:null,[i.Validators.min(0)]],handshakeTimeout:[e?e.handshakeTimeout:null,[i.Validators.min(0)]],clientProperties:[e?e.clientProperties:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-rabbit-mq-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),he=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.proxySchemes=["http","https"],n.httpRequestTypes=Object.keys(z),n}return b(r,e),r.prototype.configForm=function(){return this.restApiCallConfigForm},r.prototype.onConfigurationSet=function(e){this.restApiCallConfigForm=this.fb.group({restEndpointUrlPattern:[e?e.restEndpointUrlPattern:null,[i.Validators.required]],requestMethod:[e?e.requestMethod:null,[i.Validators.required]],useSimpleClientHttpFactory:[!!e&&e.useSimpleClientHttpFactory,[]],ignoreRequestBody:[!!e&&e.ignoreRequestBody,[]],enableProxy:[!!e&&e.enableProxy,[]],useSystemProxyProperties:[!!e&&e.enableProxy,[]],proxyScheme:[e?e.proxyHost:null,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],readTimeoutMs:[e?e.readTimeoutMs:null,[]],maxParallelRequestsCount:[e?e.maxParallelRequestsCount:null,[i.Validators.min(0)]],headers:[e?e.headers:null,[]],useRedisQueueForMsgPersistence:[!!e&&e.useRedisQueueForMsgPersistence,[]],trimQueue:[!!e&&e.trimQueue,[]],maxQueueSize:[e?e.maxQueueSize:null,[]],credentials:[e?e.credentials:null,[]]})},r.prototype.validatorTriggers=function(){return["useSimpleClientHttpFactory","useRedisQueueForMsgPersistence","enableProxy","useSystemProxyProperties"]},r.prototype.updateValidators=function(e){var t=this.restApiCallConfigForm.get("useSimpleClientHttpFactory").value,r=this.restApiCallConfigForm.get("useRedisQueueForMsgPersistence").value,n=this.restApiCallConfigForm.get("enableProxy").value,a=this.restApiCallConfigForm.get("useSystemProxyProperties").value;n&&!a?(this.restApiCallConfigForm.get("proxyHost").setValidators(n?[i.Validators.required]:[]),this.restApiCallConfigForm.get("proxyPort").setValidators(n?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])):(this.restApiCallConfigForm.get("proxyHost").setValidators([]),this.restApiCallConfigForm.get("proxyPort").setValidators([]),t?this.restApiCallConfigForm.get("readTimeoutMs").setValidators([]):this.restApiCallConfigForm.get("readTimeoutMs").setValidators([i.Validators.min(0)])),r?this.restApiCallConfigForm.get("maxQueueSize").setValidators([i.Validators.min(0)]):this.restApiCallConfigForm.get("maxQueueSize").setValidators([]),this.restApiCallConfigForm.get("readTimeoutMs").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("maxQueueSize").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("credentials").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-rest-api-call-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ce=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.smtpProtocols=["smtp","smtps"],n.tlsVersions=["TLSv1","TLSv1.1","TLSv1.2","TLSv1.3"],n}return b(r,e),r.prototype.configForm=function(){return this.sendEmailConfigForm},r.prototype.onConfigurationSet=function(e){this.sendEmailConfigForm=this.fb.group({useSystemSmtpSettings:[!!e&&e.useSystemSmtpSettings,[]],smtpProtocol:[e?e.smtpProtocol:null,[]],smtpHost:[e?e.smtpHost:null,[]],smtpPort:[e?e.smtpPort:null,[]],timeout:[e?e.timeout:null,[]],enableTls:[!!e&&e.enableTls,[]],tlsVersion:[e?e.tlsVersion:null,[]],enableProxy:[!!e&&e.enableProxy,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]]})},r.prototype.validatorTriggers=function(){return["useSystemSmtpSettings","enableProxy"]},r.prototype.updateValidators=function(e){var t=this.sendEmailConfigForm.get("useSystemSmtpSettings").value,r=this.sendEmailConfigForm.get("enableProxy").value;t?(this.sendEmailConfigForm.get("smtpProtocol").setValidators([]),this.sendEmailConfigForm.get("smtpHost").setValidators([]),this.sendEmailConfigForm.get("smtpPort").setValidators([]),this.sendEmailConfigForm.get("timeout").setValidators([]),this.sendEmailConfigForm.get("proxyHost").setValidators([]),this.sendEmailConfigForm.get("proxyPort").setValidators([])):(this.sendEmailConfigForm.get("smtpProtocol").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpHost").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpPort").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]),this.sendEmailConfigForm.get("timeout").setValidators([i.Validators.required,i.Validators.min(0)]),this.sendEmailConfigForm.get("proxyHost").setValidators(r?[i.Validators.required]:[]),this.sendEmailConfigForm.get("proxyPort").setValidators(r?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])),this.sendEmailConfigForm.get("smtpProtocol").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpPort").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("timeout").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-send-email-config",template:'\n \n {{ \'tb.rulenode.use-system-smtp-settings\' | translate }}\n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ve=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.serviceType=a.ServiceType.TB_RULE_ENGINE,n}return b(r,e),r.prototype.configForm=function(){return this.checkPointConfigForm},r.prototype.onConfigurationSet=function(e){this.checkPointConfigForm=this.fb.group({queueName:[e?e.queueName:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-check-point-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Fe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allAzureIotHubCredentialsTypes=J,n.azureIotHubCredentialsTypeTranslationsMap=Y,n}return b(r,e),r.prototype.configForm=function(){return this.azureIotHubConfigForm},r.prototype.onConfigurationSet=function(e){this.azureIotHubConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[i.Validators.required]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:this.fb.group({type:[e&&e.credentials?e.credentials.type:null,[i.Validators.required]],sasKey:[e&&e.credentials?e.credentials.sasKey:null,[]],caCert:[e&&e.credentials?e.credentials.caCert:null,[]],caCertFileName:[e&&e.credentials?e.credentials.caCertFileName:null,[]],privateKey:[e&&e.credentials?e.credentials.privateKey:null,[]],privateKeyFileName:[e&&e.credentials?e.credentials.privateKeyFileName:null,[]],cert:[e&&e.credentials?e.credentials.cert:null,[]],certFileName:[e&&e.credentials?e.credentials.certFileName:null,[]],password:[e&&e.credentials?e.credentials.password:null,[]]})})},r.prototype.prepareOutputConfig=function(e){var t=e.credentials.type;return"sas"===t&&(e.credentials={type:t,sasKey:e.credentials.sasKey,caCert:e.credentials.caCert,caCertFileName:e.credentials.caCertFileName}),e},r.prototype.validatorTriggers=function(){return["credentials.type"]},r.prototype.updateValidators=function(e){var t=this.azureIotHubConfigForm.get("credentials"),r=t.get("type").value;switch(e&&t.reset({type:r},{emitEvent:!1}),t.get("sasKey").setValidators([]),t.get("privateKey").setValidators([]),t.get("privateKeyFileName").setValidators([]),t.get("cert").setValidators([]),t.get("certFileName").setValidators([]),r){case"sas":t.get("sasKey").setValidators([i.Validators.required]);break;case"cert.PEM":t.get("privateKey").setValidators([i.Validators.required]),t.get("privateKeyFileName").setValidators([i.Validators.required]),t.get("cert").setValidators([i.Validators.required]),t.get("certFileName").setValidators([i.Validators.required])}t.get("sasKey").updateValueAndValidity({emitEvent:e}),t.get("privateKey").updateValueAndValidity({emitEvent:e}),t.get("privateKeyFileName").updateValueAndValidity({emitEvent:e}),t.get("cert").updateValueAndValidity({emitEvent:e}),t.get("certFileName").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-azure-iot-hub-config",template:'\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}:host .tb-hint.client-id{margin-top:-1.25em;max-width:-webkit-fit-content;max-width:-moz-fit-content;max-width:fit-content}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),xe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.deviceProfile},r.prototype.onConfigurationSet=function(e){this.deviceProfile=this.fb.group({persistAlarmRulesState:[!!e&&e.persistAlarmRulesState,i.Validators.required],fetchAlarmRulesStateOnStart:[!!e&&e.fetchAlarmRulesStateOnStart,i.Validators.required]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-device-profile-config",template:'\n \n {{ \'tb.rulenode.persist-alarm-rules\' | translate }}\n \n \n {{ \'tb.rulenode.fetch-alarm-rules\' | translate }}\n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Te=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.sendSmsConfigForm},r.prototype.onConfigurationSet=function(e){this.sendSmsConfigForm=this.fb.group({numbersToTemplate:[e?e.numbersToTemplate:null,[i.Validators.required]],smsMessageTemplate:[e?e.smsMessageTemplate:null,[i.Validators.required]],useSystemSmsSettings:[!!e&&e.useSystemSmsSettings,[]],smsProviderConfiguration:[e?e.smsProviderConfiguration:null,[]]})},r.prototype.validatorTriggers=function(){return["useSystemSmsSettings"]},r.prototype.updateValidators=function(e){this.sendSmsConfigForm.get("useSystemSmsSettings").value?this.sendSmsConfigForm.get("smsProviderConfiguration").setValidators([]):this.sendSmsConfigForm.get("smsProviderConfiguration").setValidators([i.Validators.required]),this.sendSmsConfigForm.get("smsProviderConfiguration").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-send-sms-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),qe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.attributeScopes=Object.keys(a.AttributeScope),n.telemetryTypeTranslationsMap=a.telemetryTypeTranslations,n}return b(r,e),r.prototype.configForm=function(){return this.pushToEdgeConfigForm},r.prototype.onConfigurationSet=function(e){this.pushToEdgeConfigForm=this.fb.group({scope:[e?e.scope:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-push-to-edge-config",template:'\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Se=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.attributeScopes=Object.keys(a.AttributeScope),n.telemetryTypeTranslationsMap=a.telemetryTypeTranslations,n}return b(r,e),r.prototype.configForm=function(){return this.pushToCloudConfigForm},r.prototype.onConfigurationSet=function(e){this.pushToCloudConfigForm=this.fb.group({scope:[e?e.scope:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-action-node-push-to-cloud-config",template:'\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ie=function(){function e(){}return e=h([t.NgModule({declarations:[T,q,S,I,k,N,V,E,A,L,P,ee,te,re,ne,de,pe,ce,fe,ge,ye,be,he,Ce,ve,Fe,xe,Te,qe,Se],imports:[r.CommonModule,a.SharedModule,l.HomeComponentsModule,ue],exports:[T,q,S,I,k,N,V,E,A,L,P,ee,te,re,ne,de,pe,ce,fe,ge,ye,be,he,Ce,ve,Fe,xe,Te,qe,Se]})],e)}(),ke=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],n}return b(r,e),r.prototype.configForm=function(){return this.checkMessageConfigForm},r.prototype.onConfigurationSet=function(e){this.checkMessageConfigForm=this.fb.group({messageNames:[e?e.messageNames:null,[]],metadataNames:[e?e.metadataNames:null,[]],checkAllKeys:[!!e&&e.checkAllKeys,[]]})},r.prototype.validateConfig=function(){var e=this.checkMessageConfigForm.get("messageNames").value,t=this.checkMessageConfigForm.get("metadataNames").value;return e.length>0||t.length>0},r.prototype.removeMessageName=function(e){var t=this.checkMessageConfigForm.get("messageNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("messageNames").setValue(t,{emitEvent:!0}))},r.prototype.removeMetadataName=function(e){var t=this.checkMessageConfigForm.get("metadataNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("metadataNames").setValue(t,{emitEvent:!0}))},r.prototype.addMessageName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("messageNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("messageNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},r.prototype.addMetadataName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("metadataNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("metadataNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-filter-node-check-message-config",template:'\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ne=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.entitySearchDirection=Object.keys(a.EntitySearchDirection),n.entitySearchDirectionTranslationsMap=a.entitySearchDirectionTranslations,n}return b(r,e),r.prototype.configForm=function(){return this.checkRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.checkRelationConfigForm=this.fb.group({checkForSingleEntity:[!!e&&e.checkForSingleEntity,[]],direction:[e?e.direction:null,[]],entityType:[e?e.entityType:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],entityId:[e?e.entityId:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],relationType:[e?e.relationType:null,[i.Validators.required]]})},r.prototype.validatorTriggers=function(){return["checkForSingleEntity"]},r.prototype.updateValidators=function(e){var t=this.checkRelationConfigForm.get("checkForSingleEntity").value;this.checkRelationConfigForm.get("entityType").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:e}),this.checkRelationConfigForm.get("entityId").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityId").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-filter-node-check-relation-config",template:'\n \n {{ \'tb.rulenode.check-relation-to-specific-entity\' | translate }}\n \n tb.rulenode.check-relation-hint
\n \n relation.direction\n \n \n {{ entitySearchDirectionTranslationsMap.get(direction) | translate }}\n \n \n \n \n \n \n \n \n
\n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ve=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=M,n.perimeterTypes=Object.keys(M),n.perimeterTypeTranslationMap=D,n.rangeUnits=Object.keys(O),n.rangeUnitTranslationMap=H,n}return b(r,e),r.prototype.configForm=function(){return this.geoFilterConfigForm},r.prototype.onConfigurationSet=function(e){this.geoFilterConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]]})},r.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},r.prototype.updateValidators=function(e){var t=this.geoFilterConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoFilterConfigForm.get("perimeterType").value;t?this.geoFilterConfigForm.get("perimeterType").setValidators([]):this.geoFilterConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==M.CIRCLE?(this.geoFilterConfigForm.get("centerLatitude").setValidators([]),this.geoFilterConfigForm.get("centerLongitude").setValidators([]),this.geoFilterConfigForm.get("range").setValidators([]),this.geoFilterConfigForm.get("rangeUnit").setValidators([])):(this.geoFilterConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoFilterConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoFilterConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoFilterConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==M.POLYGON?this.geoFilterConfigForm.get("polygonsDefinition").setValidators([]):this.geoFilterConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoFilterConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoFilterConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-filter-node-gps-geofencing-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ee=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.messageTypeConfigForm},r.prototype.onConfigurationSet=function(e){this.messageTypeConfigForm=this.fb.group({messageTypes:[e?e.messageTypes:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-filter-node-message-type-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ae=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allowedEntityTypes=[a.EntityType.DEVICE,a.EntityType.ASSET,a.EntityType.ENTITY_VIEW,a.EntityType.TENANT,a.EntityType.CUSTOMER,a.EntityType.USER,a.EntityType.DASHBOARD,a.EntityType.RULE_CHAIN,a.EntityType.RULE_NODE],n}return b(r,e),r.prototype.configForm=function(){return this.originatorTypeConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorTypeConfigForm=this.fb.group({originatorTypes:[e?e.originatorTypes:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-filter-node-originator-type-config",template:'\n \n \n \n\n',styles:[":host ::ng-deep tb-entity-type-list .mat-form-field-flex{padding-top:0}:host ::ng-deep tb-entity-type-list .mat-form-field-infix{border-top:0}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Le=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.scriptConfigForm},r.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"filter",this.translate.instant("tb.rulenode.filter"),"Filter",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/filter_node_script_fn").subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-filter-node-script-config",template:'\n \n \n \n \n \n
\n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),Pe=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.switchConfigForm},r.prototype.onConfigurationSet=function(e){this.switchConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.switchConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"switch",this.translate.instant("tb.rulenode.switch"),"Switch",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/switch_node_script_fn").subscribe((function(t){t&&e.switchConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-filter-node-switch-config",template:'\n \n \n \n \n \n
\n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),Me=function(e){function r(t,r,n){var o,l,s=e.call(this,t)||this;s.store=t,s.translate=r,s.fb=n,s.alarmStatusTranslationsMap=a.alarmStatusTranslations,s.alarmStatusList=[],s.searchText="",s.displayStatusFn=s.displayStatus.bind(s);try{for(var m=v(Object.keys(a.AlarmStatus)),u=m.next();!u.done;u=m.next()){var d=u.value;s.alarmStatusList.push(a.AlarmStatus[d])}}catch(e){o={error:e}}finally{try{u&&!u.done&&(l=m.return)&&l.call(m)}finally{if(o)throw o.error}}return s.statusFormControl=new i.FormControl(""),s.filteredAlarmStatus=s.statusFormControl.valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(e){return s.fetchAlarmStatus(e)})),f.share()),s}return b(r,e),r.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},r.prototype.configForm=function(){return this.alarmStatusConfigForm},r.prototype.prepareInputConfig=function(e){return this.searchText="",this.statusFormControl.patchValue("",{emitEvent:!0}),e},r.prototype.onConfigurationSet=function(e){this.alarmStatusConfigForm=this.fb.group({alarmStatusList:[e?e.alarmStatusList:null,[i.Validators.required]]})},r.prototype.displayStatus=function(e){return e?this.translate.instant(a.alarmStatusTranslations.get(e)):void 0},r.prototype.fetchAlarmStatus=function(e){var t=this,r=this.getAlarmStatusList();if(this.searchText=e,this.searchText&&this.searchText.length){var n=this.searchText.toUpperCase();return c.of(r.filter((function(e){return t.translate.instant(a.alarmStatusTranslations.get(a.AlarmStatus[e])).toUpperCase().includes(n)})))}return c.of(r)},r.prototype.alarmStatusSelected=function(e){this.addAlarmStatus(e.option.value),this.clear("")},r.prototype.removeAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))}},r.prototype.addAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))},r.prototype.getAlarmStatusList=function(){var e=this;return this.alarmStatusList.filter((function(t){return-1===e.alarmStatusConfigForm.get("alarmStatusList").value.indexOf(t)}))},r.prototype.onAlarmStatusInputFocus=function(){this.statusFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.alarmStatusInput.nativeElement.value=e,this.statusFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.alarmStatusInput.nativeElement.blur(),t.alarmStatusInput.nativeElement.focus()}),0)},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},h([t.ViewChild("alarmStatusInput",{static:!1}),C("design:type",t.ElementRef)],r.prototype,"alarmStatusInput",void 0),r=h([t.Component({selector:"tb-filter-node-check-alarm-status-config",template:'\n \n tb.rulenode.alarm-status-filter\n \n \n \n {{alarmStatusTranslationsMap.get(alarmStatus) | translate}}\n \n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-alarm-status-matching\n
\n
\n \n \n \n \n \n\n\n\n'}),C("design:paramtypes",[o.Store,n.TranslateService,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),we=function(){function e(){}return e=h([t.NgModule({declarations:[ke,Ne,Ve,Ee,Ae,Le,Pe,Me],imports:[r.CommonModule,a.SharedModule,ue],exports:[ke,Ne,Ve,Ee,Ae,Le,Pe,Me]})],e)}(),Re=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.customerAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.customerAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-customer-attributes-config",template:'\n \n \n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),De=function(e){function r(t,r,n){var a,o,l=e.call(this,t)||this;l.store=t,l.translate=r,l.fb=n,l.entityDetailsTranslationsMap=_,l.entityDetailsList=[],l.searchText="",l.displayDetailsFn=l.displayDetails.bind(l);try{for(var s=v(Object.keys(B)),m=s.next();!m.done;m=s.next()){var u=m.value;l.entityDetailsList.push(B[u])}}catch(e){a={error:e}}finally{try{m&&!m.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}return l.detailsFormControl=new i.FormControl(""),l.filteredEntityDetails=l.detailsFormControl.valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(e){return l.fetchEntityDetails(e)})),f.share()),l}return b(r,e),r.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},r.prototype.configForm=function(){return this.entityDetailsConfigForm},r.prototype.prepareInputConfig=function(e){return this.searchText="",this.detailsFormControl.patchValue("",{emitEvent:!0}),e},r.prototype.onConfigurationSet=function(e){this.entityDetailsConfigForm=this.fb.group({detailsList:[e?e.detailsList:null,[i.Validators.required]],addToMetadata:[!!e&&e.addToMetadata,[]]})},r.prototype.displayDetails=function(e){return e?this.translate.instant(_.get(e)):void 0},r.prototype.fetchEntityDetails=function(e){var t=this;if(this.searchText=e,this.searchText&&this.searchText.length){var r=this.searchText.toUpperCase();return c.of(this.entityDetailsList.filter((function(e){return t.translate.instant(_.get(B[e])).toUpperCase().includes(r)})))}return c.of(this.entityDetailsList)},r.prototype.detailsFieldSelected=function(e){this.addDetailsField(e.option.value),this.clear("")},r.prototype.removeDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.entityDetailsConfigForm.get("detailsList").setValue(t))}},r.prototype.addDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.entityDetailsConfigForm.get("detailsList").setValue(t))},r.prototype.onEntityDetailsInputFocus=function(){this.detailsFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.detailsInput.nativeElement.value=e,this.detailsFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.detailsInput.nativeElement.blur(),t.detailsInput.nativeElement.focus()}),0)},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},h([t.ViewChild("detailsInput",{static:!1}),C("design:type",t.ElementRef)],r.prototype,"detailsInput",void 0),r=h([t.Component({selector:"tb-enrichment-node-entity-details-config",template:'\n \n tb.rulenode.entity-details\n \n \n \n {{entityDetailsTranslationsMap.get(details) | translate}}\n \n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-entity-details-matching\n
\n
\n \n \n \n \n \n {{ \'tb.rulenode.add-to-metadata\' | translate }}\n \n tb.rulenode.add-to-metadata-hint
\n\n',styles:[":host ::ng-deep mat-form-field.entity-fields-list .mat-form-field-wrapper{margin-bottom:-1.25em}"]}),C("design:paramtypes",[o.Store,n.TranslateService,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Oe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],n}return b(r,e),r.prototype.configForm=function(){return this.deviceAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.deviceAttributesConfigForm=this.fb.group({deviceRelationsQuery:[e?e.deviceRelationsQuery:null,[i.Validators.required]],tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},r.prototype.removeKey=function(e,t){var r=this.deviceAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.deviceAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.deviceAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.deviceAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-device-attributes-config",template:'\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ke=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],n}return b(r,e),r.prototype.configForm=function(){return this.originatorAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorAttributesConfigForm=this.fb.group({tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},r.prototype.removeKey=function(e,t){var r=this.originatorAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.originatorAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.originatorAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.originatorAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-originator-attributes-config",template:'\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Be=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.originatorFieldsConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorFieldsConfigForm=this.fb.group({fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-originator-fields-config",template:'\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),He=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],n.aggregationTypes=a.AggregationType,n.aggregations=Object.keys(a.AggregationType),n.aggregationTypesTranslations=a.aggregationTranslations,n.fetchMode=G,n.fetchModes=Object.keys(G),n.samplingOrders=Object.keys(j),n.timeUnits=Object.values(R),n.timeUnitsTranslationMap=K,n}return b(r,e),r.prototype.configForm=function(){return this.getTelemetryFromDatabaseConfigForm},r.prototype.onConfigurationSet=function(e){this.getTelemetryFromDatabaseConfigForm=this.fb.group({latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],aggregation:[e?e.aggregation:null,[i.Validators.required]],fetchMode:[e?e.fetchMode:null,[i.Validators.required]],orderBy:[e?e.orderBy:null,[]],limit:[e?e.limit:null,[]],useMetadataIntervalPatterns:[!!e&&e.useMetadataIntervalPatterns,[]],startInterval:[e?e.startInterval:null,[]],startIntervalTimeUnit:[e?e.startIntervalTimeUnit:null,[]],endInterval:[e?e.endInterval:null,[]],endIntervalTimeUnit:[e?e.endIntervalTimeUnit:null,[]],startIntervalPattern:[e?e.startIntervalPattern:null,[]],endIntervalPattern:[e?e.endIntervalPattern:null,[]]})},r.prototype.validatorTriggers=function(){return["fetchMode","useMetadataIntervalPatterns"]},r.prototype.updateValidators=function(e){var t=this.getTelemetryFromDatabaseConfigForm.get("fetchMode").value,r=this.getTelemetryFromDatabaseConfigForm.get("useMetadataIntervalPatterns").value;t&&t===G.ALL?(this.getTelemetryFromDatabaseConfigForm.get("aggregation").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([i.Validators.required,i.Validators.min(2),i.Validators.max(1e3)])):(this.getTelemetryFromDatabaseConfigForm.get("aggregation").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([])),r?(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([i.Validators.required])):(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([])),this.getTelemetryFromDatabaseConfigForm.get("aggregation").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("orderBy").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("limit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").updateValueAndValidity({emitEvent:e})},r.prototype.removeKey=function(e,t){var r=this.getTelemetryFromDatabaseConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.getTelemetryFromDatabaseConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-get-telemetry-from-database",template:'\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ge=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.relatedAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.relatedAttributesConfigForm=this.fb.group({relationsQuery:[e?e.relationsQuery:null,[i.Validators.required]],telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-related-attributes-config",template:'\n \n \n \n \n \n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),je=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return b(r,e),r.prototype.configForm=function(){return this.tenantAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.tenantAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-tenant-attributes-config",template:'\n \n \n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ue=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[m.ENTER,m.COMMA,m.SEMICOLON],n}return b(r,e),r.prototype.configForm=function(){return this.calculateDeltaConfigForm},r.prototype.onConfigurationSet=function(e){this.calculateDeltaConfigForm=this.fb.group({inputValueKey:[e?e.inputValueKey:null,[i.Validators.required]],outputValueKey:[e?e.outputValueKey:null,[i.Validators.required]],useCache:[e?e.useCache:null,[]],addPeriodBetweenMsgs:[!!e&&e.addPeriodBetweenMsgs,[]],periodValueKey:[e?e.periodValueKey:null,[]],round:[e?e.round:null,[i.Validators.min(0),i.Validators.max(15)]],tellFailureIfDeltaIsNegative:[e?e.tellFailureIfDeltaIsNegative:null,[]]})},r.prototype.updateValidators=function(e){this.calculateDeltaConfigForm.get("addPeriodBetweenMsgs").value?this.calculateDeltaConfigForm.get("periodValueKey").setValidators([i.Validators.required]):this.calculateDeltaConfigForm.get("periodValueKey").setValidators([]),this.calculateDeltaConfigForm.get("periodValueKey").updateValueAndValidity({emitEvent:e})},r.prototype.validatorTriggers=function(){return["addPeriodBetweenMsgs"]},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-enrichment-node-calculate-delta-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),_e=function(){function e(){}return e=h([t.NgModule({declarations:[Re,De,Oe,Ke,Be,He,Ge,je,Ue],imports:[r.CommonModule,a.SharedModule,ue],exports:[Re,De,Oe,Ke,Be,He,Ge,je,Ue]})],e)}(),ze=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.originatorSource=F,n.originatorSources=Object.keys(F),n.originatorSourceTranslationMap=w,n}return b(r,e),r.prototype.configForm=function(){return this.changeOriginatorConfigForm},r.prototype.onConfigurationSet=function(e){this.changeOriginatorConfigForm=this.fb.group({originatorSource:[e?e.originatorSource:null,[i.Validators.required]],relationsQuery:[e?e.relationsQuery:null,[]]})},r.prototype.validatorTriggers=function(){return["originatorSource"]},r.prototype.updateValidators=function(e){var t=this.changeOriginatorConfigForm.get("originatorSource").value;t&&t===F.RELATED?this.changeOriginatorConfigForm.get("relationsQuery").setValidators([i.Validators.required]):this.changeOriginatorConfigForm.get("relationsQuery").setValidators([]),this.changeOriginatorConfigForm.get("relationsQuery").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-transformation-node-change-originator-config",template:'\n \n tb.rulenode.originator-source\n \n \n {{ originatorSourceTranslationMap.get(source) | translate }}\n \n \n \n \n \n \n \n \n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Qe=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return b(r,e),r.prototype.configForm=function(){return this.scriptConfigForm},r.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"update",this.translate.instant("tb.rulenode.transformer"),"Transform",["msg","metadata","msgType"],this.ruleNodeId,"rulenode/transformation_node_script_fn").subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:s.NodeScriptTestService},{type:n.TranslateService}]},h([t.ViewChild("jsFuncComponent",{static:!0}),C("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=h([t.Component({selector:"tb-transformation-node-script-config",template:'\n \n \n \n \n \n
\n\n'}),C("design:paramtypes",[o.Store,i.FormBuilder,s.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),$e=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.mailBodyTypes=[{name:"tb.mail-body-type.plain-text",value:"false"},{name:"tb.mail-body-type.html",value:"true"},{name:"tb.mail-body-type.dynamic",value:"dynamic"}],n}return b(r,e),r.prototype.configForm=function(){return this.toEmailConfigForm},r.prototype.onConfigurationSet=function(e){var t=this;this.toEmailConfigForm=this.fb.group({fromTemplate:[e?e.fromTemplate:null,[i.Validators.required]],toTemplate:[e?e.toTemplate:null,[i.Validators.required]],ccTemplate:[e?e.ccTemplate:null,[]],bccTemplate:[e?e.bccTemplate:null,[]],subjectTemplate:[e?e.subjectTemplate:null,[i.Validators.required]],mailBodyType:[e?e.mailBodyType:null],isHtmlTemplate:[e?e.isHtmlTemplate:null],bodyTemplate:[e?e.bodyTemplate:null,[i.Validators.required]]}),this.toEmailConfigForm.get("mailBodyType").valueChanges.pipe(f.startWith([null==e?void 0:e.subjectTemplate])).subscribe((function(e){"dynamic"===e?(t.toEmailConfigForm.get("isHtmlTemplate").patchValue("",{emitEvent:!1}),t.toEmailConfigForm.get("isHtmlTemplate").setValidators(i.Validators.required)):t.toEmailConfigForm.get("isHtmlTemplate").clearValidators(),t.toEmailConfigForm.get("isHtmlTemplate").updateValueAndValidity()}))},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=h([t.Component({selector:"tb-transformation-node-to-email-config",template:'\n'}),C("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),We=function(){function e(){}return e=h([t.NgModule({declarations:[ze,Qe,$e],imports:[r.CommonModule,a.SharedModule,ue],exports:[ze,Qe,$e]})],e)}(),Je=function(){function e(e){!function(e){e.setTranslation("en_US",{tb:{rulenode:{"create-entity-if-not-exists":"Create new entity if not exists","create-entity-if-not-exists-hint":"Create a new entity set above if it does not exist.","entity-name-pattern":"Name pattern","entity-name-pattern-required":"Name pattern is required","entity-type-pattern":"Type pattern","entity-type-pattern-required":"Type pattern is required","entity-cache-expiration":"Entities cache expiration time (sec)","entity-cache-expiration-hint":"Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.","entity-cache-expiration-required":"Entities cache expiration time is required.","entity-cache-expiration-range":"Entities cache expiration time should be greater than or equal to 0.","customer-name-pattern":"Customer name pattern","customer-name-pattern-required":"Customer name pattern is required","create-customer-if-not-exists":"Create new customer if not exists","customer-cache-expiration":"Customers cache expiration time (sec)","customer-cache-expiration-hint":"Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.","customer-cache-expiration-required":"Customers cache expiration time is required.","customer-cache-expiration-range":"Customers cache expiration time should be greater than or equal to 0.","start-interval":"Start Interval","end-interval":"End Interval","start-interval-time-unit":"Start Interval Time Unit","end-interval-time-unit":"End Interval Time Unit","fetch-mode":"Fetch mode","fetch-mode-hint":"If selected fetch mode 'ALL' you able to choose telemetry sampling order.","order-by":"Order by","order-by-hint":"Select to choose telemetry sampling order.",limit:"Limit","limit-hint":"Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.","time-unit-milliseconds":"Milliseconds","time-unit-seconds":"Seconds","time-unit-minutes":"Minutes","time-unit-hours":"Hours","time-unit-days":"Days","time-value-range":"Time value should be in a range from 1 to 2147483647.","start-interval-value-required":"Start interval value is required.","end-interval-value-required":"End interval value is required.",filter:"Filter",switch:"Switch","message-type":"Message type","message-type-required":"Message type is required.","message-types-filter":"Message types filter","no-message-types-found":"No message types found","no-message-type-matching":"'{{messageType}}' not found.","create-new-message-type":"Create a new one!","message-types-required":"Message types are required.","client-attributes":"Client attributes","shared-attributes":"Shared attributes","server-attributes":"Server attributes","notify-device":"Notify Device","notify-device-hint":"If the message arrives from the device, we will push it back to the device by default.","latest-timeseries":"Latest timeseries","timeseries-key":"Timeseries key","data-keys":"Message data","metadata-keys":"Message metadata","relations-query":"Relations query","device-relations-query":"Device relations query","max-relation-level":"Max relation level","relation-type-pattern":"Relation type pattern","relation-type-pattern-required":"Relation type pattern is required","relation-types-list":"Relation types to propagate","relation-types-list-hint":"If Propagate relation types are not selected, alarms will be propagated without filtering by relation type.","unlimited-level":"Unlimited level","latest-telemetry":"Latest telemetry","attr-mapping":"Attributes mapping","source-attribute":"Source attribute","source-attribute-required":"Source attribute is required.","source-telemetry":"Source telemetry","source-telemetry-required":"Source telemetry is required.","target-attribute":"Target attribute","target-attribute-required":"Target attribute is required.","attr-mapping-required":"At least one attribute mapping should be specified.","fields-mapping":"Fields mapping","fields-mapping-required":"At least one field mapping should be specified.","source-field":"Source field","source-field-required":"Source field is required.","originator-source":"Originator source","originator-customer":"Customer","originator-tenant":"Tenant","originator-related":"Related","originator-alarm-originator":"Alarm Originator","clone-message":"Clone message",transform:"Transform","default-ttl":"Default TTL in seconds","default-ttl-required":"Default TTL is required.","min-default-ttl-message":"Only 0 minimum TTL is allowed.","message-count":"Message count (0 - unlimited)","message-count-required":"Message count is required.","min-message-count-message":"Only 0 minimum message count is allowed.","period-seconds":"Period in seconds","period-seconds-required":"Period is required.","use-metadata-period-in-seconds-patterns":"Use period in seconds pattern","use-metadata-period-in-seconds-patterns-hint":"If selected, rule node use period in seconds interval pattern from message metadata or data assuming that intervals are in the seconds.","period-in-seconds-pattern":"Period in seconds pattern","period-in-seconds-pattern-required":"Period in seconds pattern is required","min-period-seconds-message":"Only 1 second minimum period is allowed.",originator:"Originator","message-body":"Message body","message-metadata":"Message metadata",generate:"Generate","test-generator-function":"Test generator function",generator:"Generator","test-filter-function":"Test filter function","test-switch-function":"Test switch function","test-transformer-function":"Test transformer function",transformer:"Transformer","alarm-create-condition":"Alarm create condition","test-condition-function":"Test condition function","alarm-clear-condition":"Alarm clear condition","alarm-details-builder":"Alarm details builder","test-details-function":"Test details function","alarm-type":"Alarm type","alarm-type-required":"Alarm type is required.","alarm-severity":"Alarm severity","alarm-severity-required":"Alarm severity is required","alarm-status-filter":"Alarm status filter","alarm-status-list-empty":"Alarm status list is empty","no-alarm-status-matching":"No alarm status matching were found.",propagate:"Propagate",condition:"Condition",details:"Details","to-string":"To string","test-to-string-function":"Test to string function","from-template":"From Template","from-template-required":"From Template is required","to-template":"To Template","to-template-required":"To Template is required","mail-address-list-template-hint":'Comma separated address list, use ${metadataKey} for value from metadata, $[messageKey] for value from message body',"cc-template":"Cc Template","bcc-template":"Bcc Template","subject-template":"Subject Template","subject-template-required":"Subject Template is required","body-template":"Body Template","body-template-required":"Body Template is required","dynamic-mail-body-type":"Dynamic mail body type","mail-body-type":"Mail body type","request-id-metadata-attribute":"Request Id Metadata attribute name","timeout-sec":"Timeout in seconds","timeout-required":"Timeout is required","min-timeout-message":"Only 0 minimum timeout value is allowed.","endpoint-url-pattern":"Endpoint URL pattern","endpoint-url-pattern-required":"Endpoint URL pattern is required","request-method":"Request method","use-simple-client-http-factory":"Use simple client HTTP factory","ignore-request-body":"Without request body","read-timeout":"Read timeout in millis","read-timeout-hint":"The value of 0 means an infinite timeout","max-parallel-requests-count":"Max number of parallel requests","max-parallel-requests-count-hint":"The value of 0 specifies no limit in parallel processing",headers:"Headers","headers-hint":'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in header/value fields',header:"Header","header-required":"Header is required",value:"Value","value-required":"Value is required","topic-pattern":"Topic pattern","topic-pattern-required":"Topic pattern is required",topic:"Topic","topic-required":"Topic is required","bootstrap-servers":"Bootstrap servers","bootstrap-servers-required":"Bootstrap servers value is required","other-properties":"Other properties",key:"Key","key-required":"Key is required",retries:"Automatically retry times if fails","min-retries-message":"Only 0 minimum retries is allowed.","batch-size-bytes":"Produces batch size in bytes","min-batch-size-bytes-message":"Only 0 minimum batch size is allowed.","linger-ms":"Time to buffer locally (ms)","min-linger-ms-message":"Only 0 ms minimum value is allowed.","buffer-memory-bytes":"Client buffer max size in bytes","min-buffer-memory-message":"Only 0 minimum buffer size is allowed.",acks:"Number of acknowledgments","key-serializer":"Key serializer","key-serializer-required":"Key serializer is required","value-serializer":"Value serializer","value-serializer-required":"Value serializer is required","topic-arn-pattern":"Topic ARN pattern","topic-arn-pattern-required":"Topic ARN pattern is required","aws-access-key-id":"AWS Access Key ID","aws-access-key-id-required":"AWS Access Key ID is required","aws-secret-access-key":"AWS Secret Access Key","aws-secret-access-key-required":"AWS Secret Access Key is required","aws-region":"AWS Region","aws-region-required":"AWS Region is required","exchange-name-pattern":"Exchange name pattern","routing-key-pattern":"Routing key pattern","message-properties":"Message properties",host:"Host","host-required":"Host is required",port:"Port","port-required":"Port is required","port-range":"Port should be in a range from 1 to 65535.","virtual-host":"Virtual host",username:"Username",password:"Password","automatic-recovery":"Automatic recovery","connection-timeout-ms":"Connection timeout (ms)","min-connection-timeout-ms-message":"Only 0 ms minimum value is allowed.","handshake-timeout-ms":"Handshake timeout (ms)","min-handshake-timeout-ms-message":"Only 0 ms minimum value is allowed.","client-properties":"Client properties","queue-url-pattern":"Queue URL pattern","queue-url-pattern-required":"Queue URL pattern is required","delay-seconds":"Delay (seconds)","min-delay-seconds-message":"Only 0 seconds minimum value is allowed.","max-delay-seconds-message":"Only 900 seconds maximum value is allowed.",name:"Name","name-required":"Name is required","queue-type":"Queue type","sqs-queue-standard":"Standard","sqs-queue-fifo":"FIFO","gcp-project-id":"GCP project ID","gcp-project-id-required":"GCP project ID is required","gcp-service-account-key":"GCP service account key file","gcp-service-account-key-required":"GCP service account key file is required","pubsub-topic-name":"Topic name","pubsub-topic-name-required":"Topic name is required","message-attributes":"Message attributes","message-attributes-hint":'Use ${metadataKey} for value from metadata, $[messageKey] for value from message body in name/value fields',"connect-timeout":"Connection timeout (sec)","connect-timeout-required":"Connection timeout is required.","connect-timeout-range":"Connection timeout should be in a range from 1 to 200.","client-id":"Client ID","client-id-hint":"Hint: Optional. Leave empty for auto-generated client id. Be careful when specifying the Client ID.Majority of the MQTT brokers will not allow multiple connections with the same client id. To connect to such brokers, your mqtt client id must be unique. When platform is running in a micro-services mode, the copy of rule nodeis launched in each micro-service. This will automatically lead to multiple mqtt clients with the same id and may cause failures of the rule node.","device-id":"Device ID","device-id-required":"Device ID is required.","clean-session":"Clean session","enable-ssl":"Enable SSL",credentials:"Credentials","credentials-type":"Credentials type","credentials-type-required":"Credentials type is required.","credentials-anonymous":"Anonymous","credentials-basic":"Basic","credentials-pem":"PEM","credentials-pem-hint":"At least Server CA certificate file or a pair of Client certificate and Client private key files are required","credentials-sas":"Shared Access Signature","sas-key":"SAS Key","sas-key-required":"SAS Key is required.",hostname:"Hostname","hostname-required":"Hostname is required.","azure-ca-cert":"CA certificate file","username-required":"Username is required.","password-required":"Password is required.","ca-cert":"Server CA certificate file *","private-key":"Client private key file *",cert:"Client certificate file *","no-file":"No file selected.","drop-file":"Drop a file or click to select a file to upload.","private-key-password":"Private key password","use-system-smtp-settings":"Use system SMTP settings","use-metadata-interval-patterns":"Use interval patterns","use-metadata-interval-patterns-hint":"If selected, rule node use start and end interval patterns from message metadata or data assuming that intervals are in the milliseconds.","use-message-alarm-data":"Use message alarm data","use-dynamically-change-the-severity-of-alar":"Use dynamically change the severity of alarm","check-all-keys":"Check that all selected keys are present","check-all-keys-hint":"If selected, checks that all specified keys are present in the message data and metadata.","check-relation-to-specific-entity":"Check relation to specific entity","check-relation-hint":"Checks existence of relation to specific entity or to any entity based on direction and relation type.","delete-relation-to-specific-entity":"Delete relation to specific entity","delete-relation-hint":"Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.","remove-current-relations":"Remove current relations","remove-current-relations-hint":"Removes current relations from the originator of the incoming message based on direction and type.","change-originator-to-related-entity":"Change originator to related entity","change-originator-to-related-entity-hint":"Used to process submitted message as a message from another entity.","start-interval-pattern":"Start interval pattern","end-interval-pattern":"End interval pattern","start-interval-pattern-required":"Start interval pattern is required","end-interval-pattern-required":"End interval pattern is required","smtp-protocol":"Protocol","smtp-host":"SMTP host","smtp-host-required":"SMTP host is required.","smtp-port":"SMTP port","smtp-port-required":"You must supply a smtp port.","smtp-port-range":"SMTP port should be in a range from 1 to 65535.","timeout-msec":"Timeout ms","min-timeout-msec-message":"Only 0 ms minimum value is allowed.","enter-username":"Enter username","enter-password":"Enter password","enable-tls":"Enable TLS","tls-version":"TLS version","enable-proxy":"Enable proxy","use-system-proxy-properties":"Use system proxy properties","proxy-host":"Proxy host","proxy-host-required":"Proxy host is required.","proxy-port":"Proxy port","proxy-port-required":"Proxy port is required.","proxy-port-range":"Proxy port should be in a range from 1 to 65535.","proxy-user":"Proxy user","proxy-password":"Proxy password","proxy-scheme":"Proxy scheme","numbers-to-template":"Phone Numbers To Template","numbers-to-template-required":"Phone Numbers To Template is required","numbers-to-template-hint":'Comma separated Phone Numbers, use ${metadataKey} for value from metadata, $[messageKey] for value from message body',"sms-message-template":"SMS message Template","sms-message-template-required":"SMS message Template is required","use-system-sms-settings":"Use system SMS provider settings","min-period-0-seconds-message":"Only 0 second minimum period is allowed.","max-pending-messages":"Maximum pending messages","max-pending-messages-required":"Maximum pending messages is required.","max-pending-messages-range":"Maximum pending messages should be in a range from 1 to 100000.","originator-types-filter":"Originator types filter","interval-seconds":"Interval in seconds","interval-seconds-required":"Interval is required.","min-interval-seconds-message":"Only 1 second minimum interval is allowed.","output-timeseries-key-prefix":"Output timeseries key prefix","output-timeseries-key-prefix-required":"Output timeseries key prefix required.","separator-hint":'You should press "enter" to complete field input.',"entity-details":"Select entity details:","entity-details-title":"Title","entity-details-country":"Country","entity-details-state":"State","entity-details-zip":"Zip","entity-details-address":"Address","entity-details-address2":"Address2","entity-details-additional_info":"Additional Info","entity-details-phone":"Phone","entity-details-email":"Email","add-to-metadata":"Add selected details to message metadata","add-to-metadata-hint":"If selected, adds the selected details keys to the message metadata instead of message data.","entity-details-list-empty":"No entity details selected.","no-entity-details-matching":"No entity details matching were found.","custom-table-name":"Custom table name","custom-table-name-required":"Table Name is required","custom-table-hint":"You should enter the table name without prefix 'cs_tb_'.","message-field":"Message field","message-field-required":"Message field is required.","table-col":"Table column","table-col-required":"Table column is required.","latitude-key-name":"Latitude key name","longitude-key-name":"Longitude key name","latitude-key-name-required":"Latitude key name is required.","longitude-key-name-required":"Longitude key name is required.","fetch-perimeter-info-from-message-metadata":"Fetch perimeter information from message metadata","perimeter-circle":"Circle","perimeter-polygon":"Polygon","perimeter-type":"Perimeter type","circle-center-latitude":"Center latitude","circle-center-latitude-required":"Center latitude is required.","circle-center-longitude":"Center longitude","circle-center-longitude-required":"Center longitude is required.","range-unit-meter":"Meter","range-unit-kilometer":"Kilometer","range-unit-foot":"Foot","range-unit-mile":"Mile","range-unit-nautical-mile":"Nautical mile","range-units":"Range units",range:"Range","range-required":"Range is required.","polygon-definition":"Polygon definition","polygon-definition-required":"Polygon definition is required.","polygon-definition-hint":"Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].","min-inside-duration":"Minimal inside duration","min-inside-duration-value-required":"Minimal inside duration is required","min-inside-duration-time-unit":"Minimal inside duration time unit","min-outside-duration":"Minimal outside duration","min-outside-duration-value-required":"Minimal outside duration is required","min-outside-duration-time-unit":"Minimal outside duration time unit","tell-failure-if-absent":"Tell Failure","tell-failure-if-absent-hint":'If at least one selected key doesn\'t exist the outbound message will report "Failure".',"get-latest-value-with-ts":"Fetch Latest telemetry with Timestamp","get-latest-value-with-ts-hint":'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "{"ts":1574329385897, "value":42}"',"use-redis-queue":"Use redis queue for message persistence","trim-redis-queue":"Trim redis queue","redis-queue-max-size":"Redis queue max size","add-metadata-key-values-as-kafka-headers":"Add Message metadata key-value pairs to Kafka record headers","add-metadata-key-values-as-kafka-headers-hint":"If selected, key-value pairs from message metadata will be added to the outgoing records headers as byte arrays with predefined charset encoding.","charset-encoding":"Charset encoding","charset-encoding-required":"Charset encoding is required.","charset-us-ascii":"US-ASCII","charset-iso-8859-1":"ISO-8859-1","charset-utf-8":"UTF-8","charset-utf-16be":"UTF-16BE","charset-utf-16le":"UTF-16LE","charset-utf-16":"UTF-16","select-queue-hint":"The queue name can be selected from a drop-down list or add a custom name.","persist-alarm-rules":"Persist state of alarm rules","fetch-alarm-rules":"Fetch state of alarm rules","input-value-key":"Input value key","input-value-key-required":"Input value key is required.","output-value-key":"Output value key","output-value-key-required":"Output value key is required.",round:"Decimals","round-range":"Decimals should be in a range from 0 to 15.","use-cache":"Use cache for latest value","tell-failure-if-delta-is-negative":"Tell Failure if delta is negative","add-period-between-msgs":"Add period between messages","period-value-key":"Period value key","period-key-required":"Period value key is required.","general-pattern-hint":'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body',"alarm-severity-pattern-hint":'Hint: use ${metadataKey} for value from metadata, $[messageKey] for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)'},"key-val":{key:"Key",value:"Value","remove-entry":"Remove entry","add-entry":"Add entry"},"mail-body-type":{"plain-text":"Plain Text",html:"HTML",dynamic:"Dynamic"}}},!0)}(e)}return e.ctorParameters=function(){return[{type:n.TranslateService}]},e=h([t.NgModule({declarations:[x],imports:[r.CommonModule,a.SharedModule],exports:[Ie,we,_e,We,x]}),C("design:paramtypes",[n.TranslateService])],e)}();e.RuleNodeCoreConfigModule=Je,e.ɵa=x,e.ɵb=Ie,e.ɵba=ve,e.ɵbb=Fe,e.ɵbc=xe,e.ɵbd=Te,e.ɵbe=qe,e.ɵbf=Se,e.ɵbg=ue,e.ɵbh=ae,e.ɵbi=oe,e.ɵbj=ie,e.ɵbk=le,e.ɵbl=se,e.ɵbm=me,e.ɵbn=we,e.ɵbo=ke,e.ɵbp=Ne,e.ɵbq=Ve,e.ɵbr=Ee,e.ɵbs=Ae,e.ɵbt=Le,e.ɵbu=Pe,e.ɵbv=Me,e.ɵbw=_e,e.ɵbx=Re,e.ɵby=De,e.ɵbz=Oe,e.ɵc=T,e.ɵca=Ke,e.ɵcb=Be,e.ɵcc=He,e.ɵcd=Ge,e.ɵce=je,e.ɵcf=Ue,e.ɵcg=We,e.ɵch=ze,e.ɵci=Qe,e.ɵcj=$e,e.ɵd=q,e.ɵe=S,e.ɵf=I,e.ɵg=k,e.ɵh=N,e.ɵi=V,e.ɵj=E,e.ɵk=A,e.ɵl=L,e.ɵm=P,e.ɵn=ee,e.ɵo=te,e.ɵp=re,e.ɵq=ne,e.ɵr=de,e.ɵs=pe,e.ɵt=ce,e.ɵu=fe,e.ɵv=ge,e.ɵw=ye,e.ɵx=be,e.ɵy=he,e.ɵz=Ce,Object.defineProperty(e,"__esModule",{value:!0})}));
-//# sourceMappingURL=rulenode-core-config.umd.min.js.map
\ No newline at end of file
+import * as i0 from '@angular/core';
+import { Component, Pipe, ViewChild, forwardRef, Input, NgModule } from '@angular/core';
+import * as i3$4 from '@shared/public-api';
+import { RuleNodeConfigurationComponent, AttributeScope, telemetryTypeTranslations, ServiceType, AlarmSeverity, alarmSeverityTranslations, EntitySearchDirection, entitySearchDirectionTranslations, EntityType, PageComponent, MessageType, messageTypeNames, SharedModule, AggregationType, aggregationTranslations, alarmStatusTranslations, AlarmStatus } from '@shared/public-api';
+import * as i1 from '@ngrx/store';
+import * as i2 from '@angular/forms';
+import { Validators, NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormControl } from '@angular/forms';
+import * as i3 from '@angular/material/form-field';
+import * as i3$1 from '@angular/material/checkbox';
+import * as i8 from '@angular/flex-layout/flex';
+import * as i4 from '@ngx-translate/core';
+import * as i11 from '@angular/material/input';
+import * as i10 from '@angular/common';
+import { CommonModule } from '@angular/common';
+import * as i1$1 from '@angular/platform-browser';
+import * as i4$1 from '@angular/material/select';
+import * as i5 from '@angular/material/core';
+import * as i4$2 from '@angular/material/expansion';
+import * as i7 from '@shared/components/button/toggle-password.component';
+import * as i8$1 from '@shared/components/file-input.component';
+import * as i3$2 from '@shared/components/queue/queue-type-list.component';
+import * as i3$3 from '@core/public-api';
+import { isDefinedAndNotNull } from '@core/public-api';
+import * as i5$1 from '@shared/components/js-func.component';
+import * as i6 from '@angular/material/button';
+import { ENTER, COMMA, SEMICOLON } from '@angular/cdk/keycodes';
+import * as i5$2 from '@angular/material/chips';
+import * as i6$1 from '@angular/material/icon';
+import * as i7$1 from '@shared/components/entity/entity-type-select.component';
+import * as i6$2 from '@shared/components/entity/entity-select.component';
+import { coerceBooleanProperty } from '@angular/cdk/coercion';
+import * as i9 from '@shared/components/tb-error.component';
+import * as i9$1 from '@angular/flex-layout/extended';
+import * as i12 from '@angular/material/tooltip';
+import { distinctUntilChanged, startWith, map, mergeMap, share } from 'rxjs/operators';
+import * as i7$2 from '@shared/components/tb-checkbox.component';
+import * as i5$3 from '@home/components/sms/sms-provider-configuration.component';
+import { HomeComponentsModule } from '@home/components/public-api';
+import * as i7$3 from '@shared/components/relation/relation-type-autocomplete.component';
+import * as i8$2 from '@shared/components/entity/entity-subtype-list.component';
+import * as i7$4 from '@home/components/relation/relation-filters.component';
+import { of } from 'rxjs';
+import * as i7$5 from '@angular/material/autocomplete';
+import * as i12$1 from '@shared/pipe/highlight.pipe';
+import * as i8$3 from '@shared/components/entity/entity-autocomplete.component';
+import * as i3$5 from '@shared/components/entity/entity-type-list.component';
+
+class EmptyConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.emptyConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.emptyConfigForm = this.fb.group({});
+ }
+}
+EmptyConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: EmptyConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+EmptyConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: EmptyConfigComponent, selector: "tb-node-empty-config", usesInheritance: true, ngImport: i0, template: '', isInline: true });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: EmptyConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-node-empty-config',
+ template: '',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SafeHtmlPipe {
+ constructor(sanitizer) {
+ this.sanitizer = sanitizer;
+ }
+ transform(html) {
+ return this.sanitizer.bypassSecurityTrustHtml(html);
+ }
+}
+SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
+SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SafeHtmlPipe, decorators: [{
+ type: Pipe,
+ args: [{
+ name: 'safeHtml',
+ }]
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
+
+class AssignCustomerConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.assignCustomerConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.assignCustomerConfigForm = this.fb.group({
+ customerNamePattern: [configuration ? configuration.customerNamePattern : null, [Validators.required, Validators.pattern(/.*\S.*/)]],
+ createCustomerIfNotExists: [configuration ? configuration.createCustomerIfNotExists : false, []],
+ customerCacheExpiration: [configuration ? configuration.customerCacheExpiration : null, [Validators.required, Validators.min(0)]]
+ });
+ }
+ prepareOutputConfig(configuration) {
+ configuration.customerNamePattern = configuration.customerNamePattern.trim();
+ return configuration;
+ }
+}
+AssignCustomerConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AssignCustomerConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+AssignCustomerConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: AssignCustomerConfigComponent, selector: "tb-action-node-assign-to-customer-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AssignCustomerConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-assign-to-customer-config',
+ templateUrl: './assign-customer-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class AttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.attributeScopes = Object.keys(AttributeScope);
+ this.telemetryTypeTranslationsMap = telemetryTypeTranslations;
+ }
+ configForm() {
+ return this.attributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.attributesConfigForm = this.fb.group({
+ scope: [configuration ? configuration.scope : null, [Validators.required]],
+ notifyDevice: [configuration ? configuration.scope : true, []]
+ });
+ }
+}
+AttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+AttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: AttributesConfigComponent, selector: "tb-action-node-attributes-config", usesInheritance: true, ngImport: i0, template: "\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n \n
\n {{ 'tb.rulenode.notify-device' | translate }}\n \n
tb.rulenode.notify-device-hint
\n
\n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-attributes-config',
+ templateUrl: './attributes-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+var OriginatorSource;
+(function (OriginatorSource) {
+ OriginatorSource["CUSTOMER"] = "CUSTOMER";
+ OriginatorSource["TENANT"] = "TENANT";
+ OriginatorSource["RELATED"] = "RELATED";
+ OriginatorSource["ALARM_ORIGINATOR"] = "ALARM_ORIGINATOR";
+})(OriginatorSource || (OriginatorSource = {}));
+const originatorSourceTranslations = new Map([
+ [OriginatorSource.CUSTOMER, 'tb.rulenode.originator-customer'],
+ [OriginatorSource.TENANT, 'tb.rulenode.originator-tenant'],
+ [OriginatorSource.RELATED, 'tb.rulenode.originator-related'],
+ [OriginatorSource.ALARM_ORIGINATOR, 'tb.rulenode.originator-alarm-originator'],
+]);
+var PerimeterType;
+(function (PerimeterType) {
+ PerimeterType["CIRCLE"] = "CIRCLE";
+ PerimeterType["POLYGON"] = "POLYGON";
+})(PerimeterType || (PerimeterType = {}));
+const perimeterTypeTranslations = new Map([
+ [PerimeterType.CIRCLE, 'tb.rulenode.perimeter-circle'],
+ [PerimeterType.POLYGON, 'tb.rulenode.perimeter-polygon'],
+]);
+var TimeUnit;
+(function (TimeUnit) {
+ TimeUnit["MILLISECONDS"] = "MILLISECONDS";
+ TimeUnit["SECONDS"] = "SECONDS";
+ TimeUnit["MINUTES"] = "MINUTES";
+ TimeUnit["HOURS"] = "HOURS";
+ TimeUnit["DAYS"] = "DAYS";
+})(TimeUnit || (TimeUnit = {}));
+const timeUnitTranslations = new Map([
+ [TimeUnit.MILLISECONDS, 'tb.rulenode.time-unit-milliseconds'],
+ [TimeUnit.SECONDS, 'tb.rulenode.time-unit-seconds'],
+ [TimeUnit.MINUTES, 'tb.rulenode.time-unit-minutes'],
+ [TimeUnit.HOURS, 'tb.rulenode.time-unit-hours'],
+ [TimeUnit.DAYS, 'tb.rulenode.time-unit-days']
+]);
+var RangeUnit;
+(function (RangeUnit) {
+ RangeUnit["METER"] = "METER";
+ RangeUnit["KILOMETER"] = "KILOMETER";
+ RangeUnit["FOOT"] = "FOOT";
+ RangeUnit["MILE"] = "MILE";
+ RangeUnit["NAUTICAL_MILE"] = "NAUTICAL_MILE";
+})(RangeUnit || (RangeUnit = {}));
+const rangeUnitTranslations = new Map([
+ [RangeUnit.METER, 'tb.rulenode.range-unit-meter'],
+ [RangeUnit.KILOMETER, 'tb.rulenode.range-unit-kilometer'],
+ [RangeUnit.FOOT, 'tb.rulenode.range-unit-foot'],
+ [RangeUnit.MILE, 'tb.rulenode.range-unit-mile'],
+ [RangeUnit.NAUTICAL_MILE, 'tb.rulenode.range-unit-nautical-mile']
+]);
+var EntityDetailsField;
+(function (EntityDetailsField) {
+ EntityDetailsField["TITLE"] = "TITLE";
+ EntityDetailsField["COUNTRY"] = "COUNTRY";
+ EntityDetailsField["STATE"] = "STATE";
+ EntityDetailsField["CITY"] = "CITY";
+ EntityDetailsField["ZIP"] = "ZIP";
+ EntityDetailsField["ADDRESS"] = "ADDRESS";
+ EntityDetailsField["ADDRESS2"] = "ADDRESS2";
+ EntityDetailsField["PHONE"] = "PHONE";
+ EntityDetailsField["EMAIL"] = "EMAIL";
+ EntityDetailsField["ADDITIONAL_INFO"] = "ADDITIONAL_INFO";
+})(EntityDetailsField || (EntityDetailsField = {}));
+const entityDetailsTranslations = new Map([
+ [EntityDetailsField.TITLE, 'tb.rulenode.entity-details-title'],
+ [EntityDetailsField.COUNTRY, 'tb.rulenode.entity-details-country'],
+ [EntityDetailsField.STATE, 'tb.rulenode.entity-details-state'],
+ [EntityDetailsField.CITY, 'tb.rulenode.entity-details-city'],
+ [EntityDetailsField.ZIP, 'tb.rulenode.entity-details-zip'],
+ [EntityDetailsField.ADDRESS, 'tb.rulenode.entity-details-address'],
+ [EntityDetailsField.ADDRESS2, 'tb.rulenode.entity-details-address2'],
+ [EntityDetailsField.PHONE, 'tb.rulenode.entity-details-phone'],
+ [EntityDetailsField.EMAIL, 'tb.rulenode.entity-details-email'],
+ [EntityDetailsField.ADDITIONAL_INFO, 'tb.rulenode.entity-details-additional_info']
+]);
+var FetchMode;
+(function (FetchMode) {
+ FetchMode["FIRST"] = "FIRST";
+ FetchMode["LAST"] = "LAST";
+ FetchMode["ALL"] = "ALL";
+})(FetchMode || (FetchMode = {}));
+var SamplingOrder;
+(function (SamplingOrder) {
+ SamplingOrder["ASC"] = "ASC";
+ SamplingOrder["DESC"] = "DESC";
+})(SamplingOrder || (SamplingOrder = {}));
+var SqsQueueType;
+(function (SqsQueueType) {
+ SqsQueueType["STANDARD"] = "STANDARD";
+ SqsQueueType["FIFO"] = "FIFO";
+})(SqsQueueType || (SqsQueueType = {}));
+const sqsQueueTypeTranslations = new Map([
+ [SqsQueueType.STANDARD, 'tb.rulenode.sqs-queue-standard'],
+ [SqsQueueType.FIFO, 'tb.rulenode.sqs-queue-fifo'],
+]);
+const credentialsTypes = ['anonymous', 'basic', 'cert.PEM'];
+const credentialsTypeTranslations = new Map([
+ ['anonymous', 'tb.rulenode.credentials-anonymous'],
+ ['basic', 'tb.rulenode.credentials-basic'],
+ ['cert.PEM', 'tb.rulenode.credentials-pem']
+]);
+const azureIotHubCredentialsTypes = ['sas', 'cert.PEM'];
+const azureIotHubCredentialsTypeTranslations = new Map([
+ ['sas', 'tb.rulenode.credentials-sas'],
+ ['cert.PEM', 'tb.rulenode.credentials-pem']
+]);
+var HttpRequestType;
+(function (HttpRequestType) {
+ HttpRequestType["GET"] = "GET";
+ HttpRequestType["POST"] = "POST";
+ HttpRequestType["PUT"] = "PUT";
+ HttpRequestType["DELETE"] = "DELETE";
+})(HttpRequestType || (HttpRequestType = {}));
+const ToByteStandartCharsetTypes = [
+ 'US-ASCII',
+ 'ISO-8859-1',
+ 'UTF-8',
+ 'UTF-16BE',
+ 'UTF-16LE',
+ 'UTF-16'
+];
+const ToByteStandartCharsetTypeTranslations = new Map([
+ ['US-ASCII', 'tb.rulenode.charset-us-ascii'],
+ ['ISO-8859-1', 'tb.rulenode.charset-iso-8859-1'],
+ ['UTF-8', 'tb.rulenode.charset-utf-8'],
+ ['UTF-16BE', 'tb.rulenode.charset-utf-16be'],
+ ['UTF-16LE', 'tb.rulenode.charset-utf-16le'],
+ ['UTF-16', 'tb.rulenode.charset-utf-16'],
+]);
+
+class AzureIotHubConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.allAzureIotHubCredentialsTypes = azureIotHubCredentialsTypes;
+ this.azureIotHubCredentialsTypeTranslationsMap = azureIotHubCredentialsTypeTranslations;
+ }
+ configForm() {
+ return this.azureIotHubConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.azureIotHubConfigForm = this.fb.group({
+ topicPattern: [configuration ? configuration.topicPattern : null, [Validators.required]],
+ host: [configuration ? configuration.host : null, [Validators.required]],
+ port: [configuration ? configuration.port : null, [Validators.required, Validators.min(1), Validators.max(65535)]],
+ connectTimeoutSec: [configuration ? configuration.connectTimeoutSec : null,
+ [Validators.required, Validators.min(1), Validators.max(200)]],
+ clientId: [configuration ? configuration.clientId : null, [Validators.required]],
+ cleanSession: [configuration ? configuration.cleanSession : false, []],
+ ssl: [configuration ? configuration.ssl : false, []],
+ credentials: this.fb.group({
+ type: [configuration && configuration.credentials ? configuration.credentials.type : null, [Validators.required]],
+ sasKey: [configuration && configuration.credentials ? configuration.credentials.sasKey : null, []],
+ caCert: [configuration && configuration.credentials ? configuration.credentials.caCert : null, []],
+ caCertFileName: [configuration && configuration.credentials ? configuration.credentials.caCertFileName : null, []],
+ privateKey: [configuration && configuration.credentials ? configuration.credentials.privateKey : null, []],
+ privateKeyFileName: [configuration && configuration.credentials ? configuration.credentials.privateKeyFileName : null, []],
+ cert: [configuration && configuration.credentials ? configuration.credentials.cert : null, []],
+ certFileName: [configuration && configuration.credentials ? configuration.credentials.certFileName : null, []],
+ password: [configuration && configuration.credentials ? configuration.credentials.password : null, []],
+ })
+ });
+ }
+ prepareOutputConfig(configuration) {
+ const credentialsType = configuration.credentials.type;
+ if (credentialsType === 'sas') {
+ configuration.credentials = {
+ type: credentialsType,
+ sasKey: configuration.credentials.sasKey,
+ caCert: configuration.credentials.caCert,
+ caCertFileName: configuration.credentials.caCertFileName
+ };
+ }
+ return configuration;
+ }
+ validatorTriggers() {
+ return ['credentials.type'];
+ }
+ updateValidators(emitEvent) {
+ const credentialsControl = this.azureIotHubConfigForm.get('credentials');
+ const credentialsType = credentialsControl.get('type').value;
+ if (emitEvent) {
+ credentialsControl.reset({ type: credentialsType }, { emitEvent: false });
+ }
+ credentialsControl.get('sasKey').setValidators([]);
+ credentialsControl.get('privateKey').setValidators([]);
+ credentialsControl.get('privateKeyFileName').setValidators([]);
+ credentialsControl.get('cert').setValidators([]);
+ credentialsControl.get('certFileName').setValidators([]);
+ switch (credentialsType) {
+ case 'sas':
+ credentialsControl.get('sasKey').setValidators([Validators.required]);
+ break;
+ case 'cert.PEM':
+ credentialsControl.get('privateKey').setValidators([Validators.required]);
+ credentialsControl.get('privateKeyFileName').setValidators([Validators.required]);
+ credentialsControl.get('cert').setValidators([Validators.required]);
+ credentialsControl.get('certFileName').setValidators([Validators.required]);
+ break;
+ }
+ credentialsControl.get('sasKey').updateValueAndValidity({ emitEvent });
+ credentialsControl.get('privateKey').updateValueAndValidity({ emitEvent });
+ credentialsControl.get('privateKeyFileName').updateValueAndValidity({ emitEvent });
+ credentialsControl.get('cert').updateValueAndValidity({ emitEvent });
+ credentialsControl.get('certFileName').updateValueAndValidity({ emitEvent });
+ }
+}
+AzureIotHubConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AzureIotHubConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+AzureIotHubConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: AzureIotHubConfigComponent, selector: "tb-action-node-azure-iot-hub-config", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host .tb-mqtt-credentials-panel-group{margin:0 6px}:host .tb-hint.client-id{margin-top:-1.25em;max-width:-moz-fit-content;max-width:fit-content}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.TogglePasswordComponent, selector: "tb-toggle-password" }, { type: i8$1.FileInputComponent, selector: "tb-file-input", inputs: ["label", "accept", "noFileText", "inputId", "allowedExtensions", "dropLabel", "contentConvertFunction", "required", "requiredAsError", "disabled", "existingFileName", "readAsBinary", "workFromFileObj", "multipleFile"], outputs: ["fileNameChanged"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i4$2.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i4$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i4$2.MatExpansionPanelDescription, selector: "mat-panel-description" }, { type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.MatSuffix, selector: "[matSuffix]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: AzureIotHubConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-azure-iot-hub-config',
+ templateUrl: './azure-iot-hub-config.component.html',
+ styleUrls: ['./mqtt-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class CheckPointConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.serviceType = ServiceType.TB_RULE_ENGINE;
+ }
+ configForm() {
+ return this.checkPointConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.checkPointConfigForm = this.fb.group({
+ queueName: [configuration ? configuration.queueName : null, [Validators.required]]
+ });
+ }
+}
+CheckPointConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckPointConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CheckPointConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CheckPointConfigComponent, selector: "tb-action-node-check-point-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3$2.QueueTypeListComponent, selector: "tb-queue-type-list", inputs: ["required", "disabled", "queueType"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckPointConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-check-point-config',
+ templateUrl: './check-point-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class ClearAlarmConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.clearAlarmConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.clearAlarmConfigForm = this.fb.group({
+ alarmDetailsBuildJs: [configuration ? configuration.alarmDetailsBuildJs : null, [Validators.required]],
+ alarmType: [configuration ? configuration.alarmType : null, [Validators.required]]
+ });
+ }
+ testScript() {
+ const script = this.clearAlarmConfigForm.get('alarmDetailsBuildJs').value;
+ this.nodeScriptTestService.testNodeScript(script, 'json', this.translate.instant('tb.rulenode.details'), 'Details', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/clear_alarm_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.clearAlarmConfigForm.get('alarmDetailsBuildJs').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+ClearAlarmConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ClearAlarmConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+ClearAlarmConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: ClearAlarmConfigComponent, selector: "tb-action-node-clear-alarm-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ClearAlarmConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-clear-alarm-config',
+ templateUrl: './clear-alarm-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class CreateAlarmConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ this.alarmSeverities = Object.keys(AlarmSeverity);
+ this.alarmSeverityTranslationMap = alarmSeverityTranslations;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ }
+ configForm() {
+ return this.createAlarmConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.createAlarmConfigForm = this.fb.group({
+ alarmDetailsBuildJs: [configuration ? configuration.alarmDetailsBuildJs : null, [Validators.required]],
+ useMessageAlarmData: [configuration ? configuration.useMessageAlarmData : false, []],
+ alarmType: [configuration ? configuration.alarmType : null, []],
+ severity: [configuration ? configuration.severity : null, []],
+ propagate: [configuration ? configuration.propagate : false, []],
+ relationTypes: [configuration ? configuration.relationTypes : null, []],
+ dynamicSeverity: false
+ });
+ this.createAlarmConfigForm.get('dynamicSeverity').valueChanges.subscribe((dynamicSeverity) => {
+ if (dynamicSeverity) {
+ this.createAlarmConfigForm.get('severity').patchValue('', { emitEvent: false });
+ }
+ else {
+ this.createAlarmConfigForm.get('severity').patchValue(this.alarmSeverities[0], { emitEvent: false });
+ }
+ });
+ }
+ validatorTriggers() {
+ return ['useMessageAlarmData'];
+ }
+ updateValidators(emitEvent) {
+ const useMessageAlarmData = this.createAlarmConfigForm.get('useMessageAlarmData').value;
+ if (useMessageAlarmData) {
+ this.createAlarmConfigForm.get('alarmType').setValidators([]);
+ this.createAlarmConfigForm.get('severity').setValidators([]);
+ }
+ else {
+ this.createAlarmConfigForm.get('alarmType').setValidators([Validators.required]);
+ this.createAlarmConfigForm.get('severity').setValidators([Validators.required]);
+ }
+ this.createAlarmConfigForm.get('alarmType').updateValueAndValidity({ emitEvent });
+ this.createAlarmConfigForm.get('severity').updateValueAndValidity({ emitEvent });
+ }
+ testScript() {
+ const script = this.createAlarmConfigForm.get('alarmDetailsBuildJs').value;
+ this.nodeScriptTestService.testNodeScript(script, 'json', this.translate.instant('tb.rulenode.details'), 'Details', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/create_alarm_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.createAlarmConfigForm.get('alarmDetailsBuildJs').setValue(theScript);
+ }
+ });
+ }
+ removeKey(key, keysField) {
+ const keys = this.createAlarmConfigForm.get(keysField).value;
+ const index = keys.indexOf(key);
+ if (index >= 0) {
+ keys.splice(index, 1);
+ this.createAlarmConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ addKey(event, keysField) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let keys = this.createAlarmConfigForm.get(keysField).value;
+ if (!keys || keys.indexOf(value) === -1) {
+ if (!keys) {
+ keys = [];
+ }
+ keys.push(value);
+ this.createAlarmConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+CreateAlarmConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CreateAlarmConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+CreateAlarmConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CreateAlarmConfigComponent, selector: "tb-action-node-create-alarm-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n \n \n {{ 'tb.rulenode.use-message-alarm-data' | translate }}\n \n \n {{ 'tb.rulenode.use-dynamically-change-the-severity-of-alar' | translate }}\n \n
\n \n \n \n {{ 'tb.rulenode.propagate' | translate }}\n \n \n \n\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CreateAlarmConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-create-alarm-config',
+ templateUrl: './create-alarm-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class CreateRelationConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.directionTypes = Object.keys(EntitySearchDirection);
+ this.directionTypeTranslations = entitySearchDirectionTranslations;
+ this.entityType = EntityType;
+ }
+ configForm() {
+ return this.createRelationConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.createRelationConfigForm = this.fb.group({
+ direction: [configuration ? configuration.direction : null, [Validators.required]],
+ entityType: [configuration ? configuration.entityType : null, [Validators.required]],
+ entityNamePattern: [configuration ? configuration.entityNamePattern : null, []],
+ entityTypePattern: [configuration ? configuration.entityTypePattern : null, []],
+ relationType: [configuration ? configuration.relationType : null, [Validators.required]],
+ createEntityIfNotExists: [configuration ? configuration.createEntityIfNotExists : false, []],
+ removeCurrentRelations: [configuration ? configuration.removeCurrentRelations : false, []],
+ changeOriginatorToRelatedEntity: [configuration ? configuration.changeOriginatorToRelatedEntity : false, []],
+ entityCacheExpiration: [configuration ? configuration.entityCacheExpiration : null, [Validators.required, Validators.min(0)]],
+ });
+ }
+ validatorTriggers() {
+ return ['entityType'];
+ }
+ updateValidators(emitEvent) {
+ const entityType = this.createRelationConfigForm.get('entityType').value;
+ if (entityType) {
+ this.createRelationConfigForm.get('entityNamePattern').setValidators([Validators.required, Validators.pattern(/.*\S.*/)]);
+ }
+ else {
+ this.createRelationConfigForm.get('entityNamePattern').setValidators([]);
+ }
+ if (entityType && (entityType === EntityType.DEVICE || entityType === EntityType.ASSET)) {
+ this.createRelationConfigForm.get('entityTypePattern').setValidators([Validators.required, Validators.pattern(/.*\S.*/)]);
+ }
+ else {
+ this.createRelationConfigForm.get('entityTypePattern').setValidators([]);
+ }
+ this.createRelationConfigForm.get('entityNamePattern').updateValueAndValidity({ emitEvent });
+ this.createRelationConfigForm.get('entityTypePattern').updateValueAndValidity({ emitEvent });
+ }
+ prepareOutputConfig(configuration) {
+ configuration.entityNamePattern = configuration.entityNamePattern ? configuration.entityNamePattern.trim() : null;
+ configuration.entityTypePattern = configuration.entityTypePattern ? configuration.entityTypePattern.trim() : null;
+ return configuration;
+ }
+}
+CreateRelationConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CreateRelationConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CreateRelationConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CreateRelationConfigComponent, selector: "tb-action-node-create-relation-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$1.EntityTypeSelectComponent, selector: "tb-entity-type-select", inputs: ["allowedEntityTypes", "useAliasEntityTypes", "showLabel", "required", "disabled"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CreateRelationConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-create-relation-config',
+ templateUrl: './create-relation-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class DeleteRelationConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.directionTypes = Object.keys(EntitySearchDirection);
+ this.directionTypeTranslations = entitySearchDirectionTranslations;
+ this.entityType = EntityType;
+ }
+ configForm() {
+ return this.deleteRelationConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.deleteRelationConfigForm = this.fb.group({
+ deleteForSingleEntity: [configuration ? configuration.deleteForSingleEntity : false, []],
+ direction: [configuration ? configuration.direction : null, [Validators.required]],
+ entityType: [configuration ? configuration.entityType : null, []],
+ entityNamePattern: [configuration ? configuration.entityNamePattern : null, []],
+ relationType: [configuration ? configuration.relationType : null, [Validators.required]],
+ entityCacheExpiration: [configuration ? configuration.entityCacheExpiration : null, [Validators.required, Validators.min(0)]],
+ });
+ }
+ validatorTriggers() {
+ return ['deleteForSingleEntity', 'entityType'];
+ }
+ updateValidators(emitEvent) {
+ const deleteForSingleEntity = this.deleteRelationConfigForm.get('deleteForSingleEntity').value;
+ const entityType = this.deleteRelationConfigForm.get('entityType').value;
+ if (deleteForSingleEntity) {
+ this.deleteRelationConfigForm.get('entityType').setValidators([Validators.required]);
+ }
+ else {
+ this.deleteRelationConfigForm.get('entityType').setValidators([]);
+ }
+ if (deleteForSingleEntity && entityType) {
+ this.deleteRelationConfigForm.get('entityNamePattern').setValidators([Validators.required, Validators.pattern(/.*\S.*/)]);
+ }
+ else {
+ this.deleteRelationConfigForm.get('entityNamePattern').setValidators([]);
+ }
+ this.deleteRelationConfigForm.get('entityType').updateValueAndValidity({ emitEvent: false });
+ this.deleteRelationConfigForm.get('entityNamePattern').updateValueAndValidity({ emitEvent });
+ }
+ prepareOutputConfig(configuration) {
+ configuration.entityNamePattern = configuration.entityNamePattern ? configuration.entityNamePattern.trim() : null;
+ return configuration;
+ }
+}
+DeleteRelationConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeleteRelationConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+DeleteRelationConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: DeleteRelationConfigComponent, selector: "tb-action-node-delete-relation-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$1.EntityTypeSelectComponent, selector: "tb-entity-type-select", inputs: ["allowedEntityTypes", "useAliasEntityTypes", "showLabel", "required", "disabled"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeleteRelationConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-delete-relation-config',
+ templateUrl: './delete-relation-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class DeviceProfileConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.deviceProfile;
+ }
+ onConfigurationSet(configuration) {
+ this.deviceProfile = this.fb.group({
+ persistAlarmRulesState: [configuration ? configuration.persistAlarmRulesState : false, Validators.required],
+ fetchAlarmRulesStateOnStart: [configuration ? configuration.fetchAlarmRulesStateOnStart : false, Validators.required]
+ });
+ }
+}
+DeviceProfileConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceProfileConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+DeviceProfileConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: DeviceProfileConfigComponent, selector: "tb-device-profile-config", usesInheritance: true, ngImport: i0, template: "\n \n {{ 'tb.rulenode.persist-alarm-rules' | translate }}\n \n \n {{ 'tb.rulenode.fetch-alarm-rules' | translate }}\n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceProfileConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-device-profile-config',
+ templateUrl: './device-profile-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class GeneratorConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.generatorConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.generatorConfigForm = this.fb.group({
+ msgCount: [configuration ? configuration.msgCount : null, [Validators.required, Validators.min(0)]],
+ periodInSeconds: [configuration ? configuration.periodInSeconds : null, [Validators.required, Validators.min(1)]],
+ originator: [configuration ? configuration.originator : null, []],
+ jsScript: [configuration ? configuration.jsScript : null, [Validators.required]]
+ });
+ }
+ prepareInputConfig(configuration) {
+ if (configuration) {
+ if (configuration.originatorId && configuration.originatorType) {
+ configuration.originator = {
+ id: configuration.originatorId, entityType: configuration.originatorType
+ };
+ }
+ else {
+ configuration.originator = null;
+ }
+ delete configuration.originatorId;
+ delete configuration.originatorType;
+ }
+ return configuration;
+ }
+ prepareOutputConfig(configuration) {
+ if (configuration.originator) {
+ configuration.originatorId = configuration.originator.id;
+ configuration.originatorType = configuration.originator.entityType;
+ }
+ else {
+ configuration.originatorId = null;
+ configuration.originatorType = null;
+ }
+ delete configuration.originator;
+ return configuration;
+ }
+ testScript() {
+ const script = this.generatorConfigForm.get('jsScript').value;
+ this.nodeScriptTestService.testNodeScript(script, 'generate', this.translate.instant('tb.rulenode.generator'), 'Generate', ['prevMsg', 'prevMetadata', 'prevMsgType'], this.ruleNodeId, 'rulenode/generator_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.generatorConfigForm.get('jsScript').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+GeneratorConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GeneratorConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+GeneratorConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: GeneratorConfigComponent, selector: "tb-action-node-generator-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6$2.EntitySelectComponent, selector: "tb-entity-select", inputs: ["allowedEntityTypes", "useAliasEntityTypes", "required", "disabled"] }, { type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GeneratorConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-generator-config',
+ templateUrl: './generator-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class GpsGeoActionConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.perimeterType = PerimeterType;
+ this.perimeterTypes = Object.keys(PerimeterType);
+ this.perimeterTypeTranslationMap = perimeterTypeTranslations;
+ this.rangeUnits = Object.keys(RangeUnit);
+ this.rangeUnitTranslationMap = rangeUnitTranslations;
+ this.timeUnits = Object.keys(TimeUnit);
+ this.timeUnitsTranslationMap = timeUnitTranslations;
+ }
+ configForm() {
+ return this.geoActionConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.geoActionConfigForm = this.fb.group({
+ latitudeKeyName: [configuration ? configuration.latitudeKeyName : null, [Validators.required]],
+ longitudeKeyName: [configuration ? configuration.longitudeKeyName : null, [Validators.required]],
+ fetchPerimeterInfoFromMessageMetadata: [configuration ? configuration.fetchPerimeterInfoFromMessageMetadata : false, []],
+ perimeterType: [configuration ? configuration.perimeterType : null, []],
+ centerLatitude: [configuration ? configuration.centerLatitude : null, []],
+ centerLongitude: [configuration ? configuration.centerLatitude : null, []],
+ range: [configuration ? configuration.range : null, []],
+ rangeUnit: [configuration ? configuration.rangeUnit : null, []],
+ polygonsDefinition: [configuration ? configuration.polygonsDefinition : null, []],
+ minInsideDuration: [configuration ? configuration.minInsideDuration : null,
+ [Validators.required, Validators.min(1), Validators.max(2147483647)]],
+ minInsideDurationTimeUnit: [configuration ? configuration.minInsideDurationTimeUnit : null, [Validators.required]],
+ minOutsideDuration: [configuration ? configuration.minOutsideDuration : null,
+ [Validators.required, Validators.min(1), Validators.max(2147483647)]],
+ minOutsideDurationTimeUnit: [configuration ? configuration.minOutsideDurationTimeUnit : null, [Validators.required]],
+ });
+ }
+ validatorTriggers() {
+ return ['fetchPerimeterInfoFromMessageMetadata', 'perimeterType'];
+ }
+ updateValidators(emitEvent) {
+ const fetchPerimeterInfoFromMessageMetadata = this.geoActionConfigForm.get('fetchPerimeterInfoFromMessageMetadata').value;
+ const perimeterType = this.geoActionConfigForm.get('perimeterType').value;
+ if (fetchPerimeterInfoFromMessageMetadata) {
+ this.geoActionConfigForm.get('perimeterType').setValidators([]);
+ }
+ else {
+ this.geoActionConfigForm.get('perimeterType').setValidators([Validators.required]);
+ }
+ if (!fetchPerimeterInfoFromMessageMetadata && perimeterType === PerimeterType.CIRCLE) {
+ this.geoActionConfigForm.get('centerLatitude').setValidators([Validators.required,
+ Validators.min(-90), Validators.max(90)]);
+ this.geoActionConfigForm.get('centerLongitude').setValidators([Validators.required,
+ Validators.min(-180), Validators.max(180)]);
+ this.geoActionConfigForm.get('range').setValidators([Validators.required, Validators.min(0)]);
+ this.geoActionConfigForm.get('rangeUnit').setValidators([Validators.required]);
+ }
+ else {
+ this.geoActionConfigForm.get('centerLatitude').setValidators([]);
+ this.geoActionConfigForm.get('centerLongitude').setValidators([]);
+ this.geoActionConfigForm.get('range').setValidators([]);
+ this.geoActionConfigForm.get('rangeUnit').setValidators([]);
+ }
+ if (!fetchPerimeterInfoFromMessageMetadata && perimeterType === PerimeterType.POLYGON) {
+ this.geoActionConfigForm.get('polygonsDefinition').setValidators([Validators.required]);
+ }
+ else {
+ this.geoActionConfigForm.get('polygonsDefinition').setValidators([]);
+ }
+ this.geoActionConfigForm.get('perimeterType').updateValueAndValidity({ emitEvent: false });
+ this.geoActionConfigForm.get('centerLatitude').updateValueAndValidity({ emitEvent });
+ this.geoActionConfigForm.get('centerLongitude').updateValueAndValidity({ emitEvent });
+ this.geoActionConfigForm.get('range').updateValueAndValidity({ emitEvent });
+ this.geoActionConfigForm.get('rangeUnit').updateValueAndValidity({ emitEvent });
+ this.geoActionConfigForm.get('polygonsDefinition').updateValueAndValidity({ emitEvent });
+ }
+}
+GpsGeoActionConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GpsGeoActionConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+GpsGeoActionConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: GpsGeoActionConfigComponent, selector: "tb-action-node-gps-geofencing-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GpsGeoActionConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-gps-geofencing-config',
+ templateUrl: './gps-geo-action-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class KvMapConfigComponent extends PageComponent {
+ constructor(store, translate, injector, fb) {
+ super(store);
+ this.store = store;
+ this.translate = translate;
+ this.injector = injector;
+ this.fb = fb;
+ this.propagateChange = null;
+ this.valueChangeSubscription = null;
+ }
+ get required() {
+ return this.requiredValue;
+ }
+ set required(value) {
+ this.requiredValue = coerceBooleanProperty(value);
+ }
+ ngOnInit() {
+ this.ngControl = this.injector.get(NgControl);
+ if (this.ngControl != null) {
+ this.ngControl.valueAccessor = this;
+ }
+ this.kvListFormGroup = this.fb.group({});
+ this.kvListFormGroup.addControl('keyVals', this.fb.array([]));
+ }
+ keyValsFormArray() {
+ return this.kvListFormGroup.get('keyVals');
+ }
+ registerOnChange(fn) {
+ this.propagateChange = fn;
+ }
+ registerOnTouched(fn) {
+ }
+ setDisabledState(isDisabled) {
+ this.disabled = isDisabled;
+ if (this.disabled) {
+ this.kvListFormGroup.disable({ emitEvent: false });
+ }
+ else {
+ this.kvListFormGroup.enable({ emitEvent: false });
+ }
+ }
+ writeValue(keyValMap) {
+ if (this.valueChangeSubscription) {
+ this.valueChangeSubscription.unsubscribe();
+ }
+ const keyValsControls = [];
+ if (keyValMap) {
+ for (const property of Object.keys(keyValMap)) {
+ if (Object.prototype.hasOwnProperty.call(keyValMap, property)) {
+ keyValsControls.push(this.fb.group({
+ key: [property, [Validators.required]],
+ value: [keyValMap[property], [Validators.required]]
+ }));
+ }
+ }
+ }
+ this.kvListFormGroup.setControl('keyVals', this.fb.array(keyValsControls));
+ this.valueChangeSubscription = this.kvListFormGroup.valueChanges.subscribe(() => {
+ this.updateModel();
+ });
+ }
+ removeKeyVal(index) {
+ this.kvListFormGroup.get('keyVals').removeAt(index);
+ }
+ addKeyVal() {
+ const keyValsFormArray = this.kvListFormGroup.get('keyVals');
+ keyValsFormArray.push(this.fb.group({
+ key: ['', [Validators.required]],
+ value: ['', [Validators.required]]
+ }));
+ }
+ validate(c) {
+ const kvList = this.kvListFormGroup.get('keyVals').value;
+ if (!kvList.length && this.required) {
+ return {
+ kvMapRequired: true
+ };
+ }
+ if (!this.kvListFormGroup.valid) {
+ return {
+ kvFieldsRequired: true
+ };
+ }
+ return null;
+ }
+ updateModel() {
+ const kvList = this.kvListFormGroup.get('keyVals').value;
+ if (this.required && !kvList.length || !this.kvListFormGroup.valid) {
+ this.propagateChange(null);
+ }
+ else {
+ const keyValMap = {};
+ kvList.forEach((entry) => {
+ keyValMap[entry.key] = entry.value;
+ });
+ this.propagateChange(keyValMap);
+ }
+ }
+}
+KvMapConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: KvMapConfigComponent, deps: [{ token: i1.Store }, { token: i4.TranslateService }, { token: i0.Injector }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+KvMapConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: { disabled: "disabled", requiredText: "requiredText", keyText: "keyText", keyRequiredText: "keyRequiredText", valText: "valText", valRequiredText: "valRequiredText", required: "required" }, providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => KvMapConfigComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => KvMapConfigComponent),
+ multi: true,
+ }
+ ], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n\n", styles: [":host .tb-kv-map-config{margin-bottom:16px}:host .tb-kv-map-config .header{padding-left:5px;padding-right:5px;padding-bottom:5px}:host .tb-kv-map-config .header .cell{padding-left:5px;padding-right:5px;color:#0000008a;font-size:12px;font-weight:700;white-space:nowrap}:host .tb-kv-map-config .body{padding-left:5px;padding-right:5px;padding-bottom:20px;max-height:300px;overflow:auto}:host .tb-kv-map-config .body .row{padding-top:5px;max-height:40px}:host .tb-kv-map-config .body .cell{padding-left:5px;padding-right:5px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell{margin:0;max-height:40px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell .mat-form-field-infix{border-top:0}:host ::ng-deep .tb-kv-map-config .body button.mat-button{margin:0}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9.TbErrorComponent, selector: "tb-error", inputs: ["error"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i9$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "translate": i4.TranslatePipe, "async": i10.AsyncPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: KvMapConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-kv-map-config',
+ templateUrl: './kv-map-config.component.html',
+ styleUrls: ['./kv-map-config.component.scss'],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => KvMapConfigComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => KvMapConfigComponent),
+ multi: true,
+ }
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i4.TranslateService }, { type: i0.Injector }, { type: i2.FormBuilder }]; }, propDecorators: { disabled: [{
+ type: Input
+ }], requiredText: [{
+ type: Input
+ }], keyText: [{
+ type: Input
+ }], keyRequiredText: [{
+ type: Input
+ }], valText: [{
+ type: Input
+ }], valRequiredText: [{
+ type: Input
+ }], required: [{
+ type: Input
+ }] } });
+
+class KafkaConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.ackValues = ['all', '-1', '0', '1'];
+ this.ToByteStandartCharsetTypesValues = ToByteStandartCharsetTypes;
+ this.ToByteStandartCharsetTypeTranslationMap = ToByteStandartCharsetTypeTranslations;
+ }
+ configForm() {
+ return this.kafkaConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.kafkaConfigForm = this.fb.group({
+ topicPattern: [configuration ? configuration.topicPattern : null, [Validators.required]],
+ bootstrapServers: [configuration ? configuration.bootstrapServers : null, [Validators.required]],
+ retries: [configuration ? configuration.retries : null, [Validators.min(0)]],
+ batchSize: [configuration ? configuration.batchSize : null, [Validators.min(0)]],
+ linger: [configuration ? configuration.linger : null, [Validators.min(0)]],
+ bufferMemory: [configuration ? configuration.bufferMemory : null, [Validators.min(0)]],
+ acks: [configuration ? configuration.acks : null, [Validators.required]],
+ keySerializer: [configuration ? configuration.keySerializer : null, [Validators.required]],
+ valueSerializer: [configuration ? configuration.valueSerializer : null, [Validators.required]],
+ otherProperties: [configuration ? configuration.otherProperties : null, []],
+ addMetadataKeyValuesAsKafkaHeaders: [configuration ? configuration.addMetadataKeyValuesAsKafkaHeaders : false, []],
+ kafkaHeadersCharset: [configuration ? configuration.kafkaHeadersCharset : null, []]
+ });
+ }
+ validatorTriggers() {
+ return ['addMetadataKeyValuesAsKafkaHeaders'];
+ }
+ updateValidators(emitEvent) {
+ const addMetadataKeyValuesAsKafkaHeaders = this.kafkaConfigForm.get('addMetadataKeyValuesAsKafkaHeaders').value;
+ if (addMetadataKeyValuesAsKafkaHeaders) {
+ this.kafkaConfigForm.get('kafkaHeadersCharset').setValidators([Validators.required]);
+ }
+ else {
+ this.kafkaConfigForm.get('kafkaHeadersCharset').setValidators([]);
+ }
+ this.kafkaConfigForm.get('kafkaHeadersCharset').updateValueAndValidity({ emitEvent });
+ }
+}
+KafkaConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: KafkaConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+KafkaConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: KafkaConfigComponent, selector: "tb-action-node-kafka-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: KafkaConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-kafka-config',
+ templateUrl: './kafka-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class LogConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.logConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.logConfigForm = this.fb.group({
+ jsScript: [configuration ? configuration.jsScript : null, [Validators.required]]
+ });
+ }
+ testScript() {
+ const script = this.logConfigForm.get('jsScript').value;
+ this.nodeScriptTestService.testNodeScript(script, 'string', this.translate.instant('tb.rulenode.to-string'), 'ToString', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/log_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.logConfigForm.get('jsScript').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+LogConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: LogConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+LogConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: LogConfigComponent, selector: "tb-action-node-log-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: LogConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-log-config',
+ templateUrl: './log-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class CredentialsConfigComponent extends PageComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.subscriptions = [];
+ this.disableCertPemCredentials = false;
+ this.passwordFieldRquired = true;
+ this.allCredentialsTypes = credentialsTypes;
+ this.credentialsTypeTranslationsMap = credentialsTypeTranslations;
+ this.propagateChange = null;
+ }
+ get required() {
+ return this.requiredValue;
+ }
+ set required(value) {
+ this.requiredValue = coerceBooleanProperty(value);
+ }
+ ngOnInit() {
+ this.credentialsConfigFormGroup = this.fb.group({
+ type: [null, [Validators.required]],
+ username: [null, []],
+ password: [null, []],
+ caCert: [null, []],
+ caCertFileName: [null, []],
+ privateKey: [null, []],
+ privateKeyFileName: [null, []],
+ cert: [null, []],
+ certFileName: [null, []]
+ });
+ this.subscriptions.push(this.credentialsConfigFormGroup.valueChanges.pipe(distinctUntilChanged()).subscribe(() => {
+ this.updateView();
+ }));
+ this.subscriptions.push(this.credentialsConfigFormGroup.get('type').valueChanges.subscribe(() => {
+ this.credentialsTypeChanged();
+ }));
+ }
+ ngOnChanges(changes) {
+ for (const propName of Object.keys(changes)) {
+ const change = changes[propName];
+ if (!change.firstChange && change.currentValue !== change.previousValue) {
+ if (change.currentValue && propName === 'disableCertPemCredentials') {
+ const credentialsTypeValue = this.credentialsConfigFormGroup.get('type').value;
+ if (credentialsTypeValue === 'cert.PEM') {
+ setTimeout(() => {
+ this.credentialsConfigFormGroup.get('type').patchValue('anonymous', { emitEvent: true });
+ });
+ }
+ }
+ }
+ }
+ }
+ ngOnDestroy() {
+ this.subscriptions.forEach(s => s.unsubscribe());
+ }
+ writeValue(credentials) {
+ if (isDefinedAndNotNull(credentials)) {
+ this.credentialsConfigFormGroup.reset(credentials, { emitEvent: false });
+ this.updateValidators(false);
+ }
+ }
+ setDisabledState(isDisabled) {
+ if (isDisabled) {
+ this.credentialsConfigFormGroup.disable();
+ }
+ else {
+ this.credentialsConfigFormGroup.enable();
+ this.updateValidators();
+ }
+ }
+ updateView() {
+ let credentialsConfigValue = this.credentialsConfigFormGroup.value;
+ const credentialsTypeValue = credentialsConfigValue.type;
+ switch (credentialsTypeValue) {
+ case 'anonymous':
+ credentialsConfigValue = {
+ type: credentialsTypeValue
+ };
+ break;
+ case 'basic':
+ credentialsConfigValue = {
+ type: credentialsTypeValue,
+ username: credentialsConfigValue.username,
+ password: credentialsConfigValue.password,
+ };
+ break;
+ case 'cert.PEM':
+ delete credentialsConfigValue.username;
+ break;
+ }
+ this.propagateChange(credentialsConfigValue);
+ }
+ registerOnChange(fn) {
+ this.propagateChange = fn;
+ }
+ registerOnTouched(fn) {
+ }
+ validate(c) {
+ return this.credentialsConfigFormGroup.valid ? null : {
+ credentialsConfig: {
+ valid: false,
+ },
+ };
+ }
+ credentialsTypeChanged() {
+ this.credentialsConfigFormGroup.patchValue({
+ username: null,
+ password: null,
+ caCert: null,
+ caCertFileName: null,
+ privateKey: null,
+ privateKeyFileName: null,
+ cert: null,
+ certFileName: null,
+ });
+ this.updateValidators();
+ }
+ updateValidators(emitEvent = false) {
+ const credentialsTypeValue = this.credentialsConfigFormGroup.get('type').value;
+ if (emitEvent) {
+ this.credentialsConfigFormGroup.reset({ type: credentialsTypeValue }, { emitEvent: false });
+ }
+ this.credentialsConfigFormGroup.setValidators([]);
+ this.credentialsConfigFormGroup.get('username').setValidators([]);
+ this.credentialsConfigFormGroup.get('password').setValidators([]);
+ switch (credentialsTypeValue) {
+ case 'anonymous':
+ break;
+ case 'basic':
+ this.credentialsConfigFormGroup.get('username').setValidators([Validators.required]);
+ this.credentialsConfigFormGroup.get('password').setValidators(this.passwordFieldRquired ? [Validators.required] : []);
+ break;
+ case 'cert.PEM':
+ this.credentialsConfigFormGroup.setValidators([this.requiredFilesSelected(Validators.required, [['caCert', 'caCertFileName'], ['privateKey', 'privateKeyFileName', 'cert', 'certFileName']])]);
+ break;
+ }
+ this.credentialsConfigFormGroup.get('username').updateValueAndValidity({ emitEvent });
+ this.credentialsConfigFormGroup.get('password').updateValueAndValidity({ emitEvent });
+ this.credentialsConfigFormGroup.updateValueAndValidity({ emitEvent });
+ }
+ requiredFilesSelected(validator, requiredFieldsSet = null) {
+ return (group) => {
+ if (!requiredFieldsSet) {
+ requiredFieldsSet = [Object.keys(group.controls)];
+ }
+ const allRequiredFilesSelected = (group === null || group === void 0 ? void 0 : group.controls) &&
+ requiredFieldsSet.some(arrFields => arrFields.every(k => !validator(group.controls[k])));
+ return allRequiredFilesSelected ? null : { notAllRequiredFilesSelected: true };
+ };
+ }
+}
+CredentialsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CredentialsConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CredentialsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CredentialsConfigComponent, selector: "tb-credentials-config", inputs: { required: "required", disableCertPemCredentials: "disableCertPemCredentials", passwordFieldRquired: "passwordFieldRquired" }, providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => CredentialsConfigComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => CredentialsConfigComponent),
+ multi: true,
+ }
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "\n \n \n tb.rulenode.credentials\n \n {{ credentialsTypeTranslationsMap.get(credentialsConfigFormGroup.get('type').value) | translate }}\n \n \n \n \n tb.rulenode.credentials-type\n \n \n {{ credentialsTypeTranslationsMap.get(credentialsType) | translate }}\n \n \n \n {{ 'tb.rulenode.credentials-type-required' | translate }}\n \n \n \n \n \n\n", components: [{ type: i4$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i4$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.TogglePasswordComponent, selector: "tb-toggle-password" }, { type: i8$1.FileInputComponent, selector: "tb-file-input", inputs: ["label", "accept", "noFileText", "inputId", "allowedExtensions", "dropLabel", "contentConvertFunction", "required", "requiredAsError", "disabled", "existingFileName", "readAsBinary", "workFromFileObj", "multipleFile"], outputs: ["fileNameChanged"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i4$2.MatExpansionPanelDescription, selector: "mat-panel-description" }, { type: i4$2.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { type: i3.MatLabel, selector: "mat-label" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.MatSuffix, selector: "[matSuffix]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CredentialsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-credentials-config',
+ templateUrl: './credentials-config.component.html',
+ styleUrls: [],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => CredentialsConfigComponent),
+ multi: true
+ },
+ {
+ provide: NG_VALIDATORS,
+ useExisting: forwardRef(() => CredentialsConfigComponent),
+ multi: true,
+ }
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; }, propDecorators: { required: [{
+ type: Input
+ }], disableCertPemCredentials: [{
+ type: Input
+ }], passwordFieldRquired: [{
+ type: Input
+ }] } });
+
+class MqttConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.mqttConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.mqttConfigForm = this.fb.group({
+ topicPattern: [configuration ? configuration.topicPattern : null, [Validators.required]],
+ host: [configuration ? configuration.host : null, [Validators.required]],
+ port: [configuration ? configuration.port : null, [Validators.required, Validators.min(1), Validators.max(65535)]],
+ connectTimeoutSec: [configuration ? configuration.connectTimeoutSec : null,
+ [Validators.required, Validators.min(1), Validators.max(200)]],
+ clientId: [configuration ? configuration.clientId : null, []],
+ cleanSession: [configuration ? configuration.cleanSession : false, []],
+ ssl: [configuration ? configuration.ssl : false, []],
+ credentials: [configuration ? configuration.credentials : null, []]
+ });
+ }
+}
+MqttConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MqttConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+MqttConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: MqttConfigComponent, selector: "tb-action-node-mqtt-config", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host .tb-mqtt-credentials-panel-group{margin:0 6px}:host .tb-hint.client-id{margin-top:-1.25em;max-width:-moz-fit-content;max-width:fit-content}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: CredentialsConfigComponent, selector: "tb-credentials-config", inputs: ["required", "disableCertPemCredentials", "passwordFieldRquired"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MqttConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-mqtt-config',
+ templateUrl: './mqtt-config.component.html',
+ styleUrls: ['./mqtt-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class MsgCountConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.msgCountConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.msgCountConfigForm = this.fb.group({
+ interval: [configuration ? configuration.interval : null, [Validators.required, Validators.min(1)]],
+ telemetryPrefix: [configuration ? configuration.telemetryPrefix : null, [Validators.required]]
+ });
+ }
+}
+MsgCountConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MsgCountConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+MsgCountConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: MsgCountConfigComponent, selector: "tb-action-node-msg-count-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MsgCountConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-msg-count-config',
+ templateUrl: './msg-count-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class MsgDelayConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.msgDelayConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.msgDelayConfigForm = this.fb.group({
+ useMetadataPeriodInSecondsPatterns: [configuration ? configuration.useMetadataPeriodInSecondsPatterns : false, []],
+ periodInSeconds: [configuration ? configuration.periodInSeconds : null, []],
+ periodInSecondsPattern: [configuration ? configuration.periodInSecondsPattern : null, []],
+ maxPendingMsgs: [configuration ? configuration.maxPendingMsgs : null,
+ [Validators.required, Validators.min(1), Validators.max(100000)]],
+ });
+ }
+ validatorTriggers() {
+ return ['useMetadataPeriodInSecondsPatterns'];
+ }
+ updateValidators(emitEvent) {
+ const useMetadataPeriodInSecondsPatterns = this.msgDelayConfigForm.get('useMetadataPeriodInSecondsPatterns').value;
+ if (useMetadataPeriodInSecondsPatterns) {
+ this.msgDelayConfigForm.get('periodInSecondsPattern').setValidators([Validators.required]);
+ this.msgDelayConfigForm.get('periodInSeconds').setValidators([]);
+ }
+ else {
+ this.msgDelayConfigForm.get('periodInSecondsPattern').setValidators([]);
+ this.msgDelayConfigForm.get('periodInSeconds').setValidators([Validators.required, Validators.min(0)]);
+ }
+ this.msgDelayConfigForm.get('periodInSecondsPattern').updateValueAndValidity({ emitEvent });
+ this.msgDelayConfigForm.get('periodInSeconds').updateValueAndValidity({ emitEvent });
+ }
+}
+MsgDelayConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MsgDelayConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+MsgDelayConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: MsgDelayConfigComponent, selector: "tb-action-node-msg-delay-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MsgDelayConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-msg-delay-config',
+ templateUrl: './msg-delay-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class PubSubConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.pubSubConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.pubSubConfigForm = this.fb.group({
+ projectId: [configuration ? configuration.projectId : null, [Validators.required]],
+ topicName: [configuration ? configuration.topicName : null, [Validators.required]],
+ serviceAccountKey: [configuration ? configuration.serviceAccountKey : null, [Validators.required]],
+ serviceAccountKeyFileName: [configuration ? configuration.serviceAccountKeyFileName : null, [Validators.required]],
+ messageAttributes: [configuration ? configuration.messageAttributes : null, []]
+ });
+ }
+}
+PubSubConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PubSubConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+PubSubConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: PubSubConfigComponent, selector: "tb-action-node-pub-sub-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i8$1.FileInputComponent, selector: "tb-file-input", inputs: ["label", "accept", "noFileText", "inputId", "allowedExtensions", "dropLabel", "contentConvertFunction", "required", "requiredAsError", "disabled", "existingFileName", "readAsBinary", "workFromFileObj", "multipleFile"], outputs: ["fileNameChanged"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PubSubConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-pub-sub-config',
+ templateUrl: './pubsub-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class PushToCloudConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.attributeScopes = Object.keys(AttributeScope);
+ this.telemetryTypeTranslationsMap = telemetryTypeTranslations;
+ }
+ configForm() {
+ return this.pushToCloudConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.pushToCloudConfigForm = this.fb.group({
+ scope: [configuration ? configuration.scope : null, [Validators.required]]
+ });
+ }
+}
+PushToCloudConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PushToCloudConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+PushToCloudConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: PushToCloudConfigComponent, selector: "tb-action-node-push-to-cloud-config", usesInheritance: true, ngImport: i0, template: "\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PushToCloudConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-push-to-cloud-config',
+ templateUrl: './push-to-cloud-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class PushToEdgeConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.attributeScopes = Object.keys(AttributeScope);
+ this.telemetryTypeTranslationsMap = telemetryTypeTranslations;
+ }
+ configForm() {
+ return this.pushToEdgeConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.pushToEdgeConfigForm = this.fb.group({
+ scope: [configuration ? configuration.scope : null, [Validators.required]]
+ });
+ }
+}
+PushToEdgeConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PushToEdgeConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+PushToEdgeConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: PushToEdgeConfigComponent, selector: "tb-action-node-push-to-edge-config", usesInheritance: true, ngImport: i0, template: "\n \n attribute.attributes-scope\n \n \n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n \n \n \n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: PushToEdgeConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-push-to-edge-config',
+ templateUrl: './push-to-edge-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RabbitMqConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.messageProperties = [
+ null,
+ 'BASIC',
+ 'TEXT_PLAIN',
+ 'MINIMAL_BASIC',
+ 'MINIMAL_PERSISTENT_BASIC',
+ 'PERSISTENT_BASIC',
+ 'PERSISTENT_TEXT_PLAIN'
+ ];
+ }
+ configForm() {
+ return this.rabbitMqConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.rabbitMqConfigForm = this.fb.group({
+ exchangeNamePattern: [configuration ? configuration.exchangeNamePattern : null, []],
+ routingKeyPattern: [configuration ? configuration.routingKeyPattern : null, []],
+ messageProperties: [configuration ? configuration.messageProperties : null, []],
+ host: [configuration ? configuration.host : null, [Validators.required]],
+ port: [configuration ? configuration.port : null, [Validators.required, Validators.min(1), Validators.max(65535)]],
+ virtualHost: [configuration ? configuration.virtualHost : null, []],
+ username: [configuration ? configuration.username : null, []],
+ password: [configuration ? configuration.password : null, []],
+ automaticRecoveryEnabled: [configuration ? configuration.automaticRecoveryEnabled : false, []],
+ connectionTimeout: [configuration ? configuration.connectionTimeout : null, [Validators.min(0)]],
+ handshakeTimeout: [configuration ? configuration.handshakeTimeout : null, [Validators.min(0)]],
+ clientProperties: [configuration ? configuration.clientProperties : null, []]
+ });
+ }
+}
+RabbitMqConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RabbitMqConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RabbitMqConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RabbitMqConfigComponent, selector: "tb-action-node-rabbit-mq-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.TogglePasswordComponent, selector: "tb-toggle-password" }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3.MatSuffix, selector: "[matSuffix]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RabbitMqConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-rabbit-mq-config',
+ templateUrl: './rabbit-mq-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RestApiCallConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.proxySchemes = ['http', 'https'];
+ this.httpRequestTypes = Object.keys(HttpRequestType);
+ }
+ configForm() {
+ return this.restApiCallConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.restApiCallConfigForm = this.fb.group({
+ restEndpointUrlPattern: [configuration ? configuration.restEndpointUrlPattern : null, [Validators.required]],
+ requestMethod: [configuration ? configuration.requestMethod : null, [Validators.required]],
+ useSimpleClientHttpFactory: [configuration ? configuration.useSimpleClientHttpFactory : false, []],
+ ignoreRequestBody: [configuration ? configuration.ignoreRequestBody : false, []],
+ enableProxy: [configuration ? configuration.enableProxy : false, []],
+ useSystemProxyProperties: [configuration ? configuration.enableProxy : false, []],
+ proxyScheme: [configuration ? configuration.proxyHost : null, []],
+ proxyHost: [configuration ? configuration.proxyHost : null, []],
+ proxyPort: [configuration ? configuration.proxyPort : null, []],
+ proxyUser: [configuration ? configuration.proxyUser : null, []],
+ proxyPassword: [configuration ? configuration.proxyPassword : null, []],
+ readTimeoutMs: [configuration ? configuration.readTimeoutMs : null, []],
+ maxParallelRequestsCount: [configuration ? configuration.maxParallelRequestsCount : null, [Validators.min(0)]],
+ headers: [configuration ? configuration.headers : null, []],
+ useRedisQueueForMsgPersistence: [configuration ? configuration.useRedisQueueForMsgPersistence : false, []],
+ trimQueue: [configuration ? configuration.trimQueue : false, []],
+ maxQueueSize: [configuration ? configuration.maxQueueSize : null, []],
+ credentials: [configuration ? configuration.credentials : null, []]
+ });
+ }
+ validatorTriggers() {
+ return ['useSimpleClientHttpFactory', 'useRedisQueueForMsgPersistence', 'enableProxy', 'useSystemProxyProperties'];
+ }
+ updateValidators(emitEvent) {
+ const useSimpleClientHttpFactory = this.restApiCallConfigForm.get('useSimpleClientHttpFactory').value;
+ const useRedisQueueForMsgPersistence = this.restApiCallConfigForm.get('useRedisQueueForMsgPersistence').value;
+ const enableProxy = this.restApiCallConfigForm.get('enableProxy').value;
+ const useSystemProxyProperties = this.restApiCallConfigForm.get('useSystemProxyProperties').value;
+ if (enableProxy && !useSystemProxyProperties) {
+ this.restApiCallConfigForm.get('proxyHost').setValidators(enableProxy ? [Validators.required] : []);
+ this.restApiCallConfigForm.get('proxyPort').setValidators(enableProxy ?
+ [Validators.required, Validators.min(1), Validators.max(65535)] : []);
+ }
+ else {
+ this.restApiCallConfigForm.get('proxyHost').setValidators([]);
+ this.restApiCallConfigForm.get('proxyPort').setValidators([]);
+ if (useSimpleClientHttpFactory) {
+ this.restApiCallConfigForm.get('readTimeoutMs').setValidators([]);
+ }
+ else {
+ this.restApiCallConfigForm.get('readTimeoutMs').setValidators([Validators.min(0)]);
+ }
+ }
+ if (useRedisQueueForMsgPersistence) {
+ this.restApiCallConfigForm.get('maxQueueSize').setValidators([Validators.min(0)]);
+ }
+ else {
+ this.restApiCallConfigForm.get('maxQueueSize').setValidators([]);
+ }
+ this.restApiCallConfigForm.get('readTimeoutMs').updateValueAndValidity({ emitEvent });
+ this.restApiCallConfigForm.get('maxQueueSize').updateValueAndValidity({ emitEvent });
+ this.restApiCallConfigForm.get('proxyHost').updateValueAndValidity({ emitEvent });
+ this.restApiCallConfigForm.get('proxyPort').updateValueAndValidity({ emitEvent });
+ this.restApiCallConfigForm.get('credentials').updateValueAndValidity({ emitEvent });
+ }
+}
+RestApiCallConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RestApiCallConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RestApiCallConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RestApiCallConfigComponent, selector: "tb-action-node-rest-api-call-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }, { type: CredentialsConfigComponent, selector: "tb-credentials-config", inputs: ["required", "disableCertPemCredentials", "passwordFieldRquired"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RestApiCallConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-rest-api-call-config',
+ templateUrl: './rest-api-call-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RpcReplyConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.rpcReplyConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.rpcReplyConfigForm = this.fb.group({
+ requestIdMetaDataAttribute: [configuration ? configuration.requestIdMetaDataAttribute : null, []]
+ });
+ }
+}
+RpcReplyConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RpcReplyConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RpcReplyConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RpcReplyConfigComponent, selector: "tb-action-node-rpc-reply-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RpcReplyConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-rpc-reply-config',
+ templateUrl: './rpc-reply-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RpcRequestConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.rpcRequestConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.rpcRequestConfigForm = this.fb.group({
+ timeoutInSeconds: [configuration ? configuration.timeoutInSeconds : null, [Validators.required, Validators.min(0)]]
+ });
+ }
+}
+RpcRequestConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RpcRequestConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RpcRequestConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RpcRequestConfigComponent, selector: "tb-action-node-rpc-request-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RpcRequestConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-rpc-request-config',
+ templateUrl: './rpc-request-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SaveToCustomTableConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.saveToCustomTableConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.saveToCustomTableConfigForm = this.fb.group({
+ tableName: [configuration ? configuration.tableName : null, [Validators.required, Validators.pattern(/.*\S.*/)]],
+ fieldsMapping: [configuration ? configuration.fieldsMapping : null, [Validators.required]]
+ });
+ }
+ prepareOutputConfig(configuration) {
+ configuration.tableName = configuration.tableName.trim();
+ return configuration;
+ }
+}
+SaveToCustomTableConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SaveToCustomTableConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+SaveToCustomTableConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SaveToCustomTableConfigComponent, selector: "tb-action-node-custom-table-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SaveToCustomTableConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-custom-table-config',
+ templateUrl: './save-to-custom-table-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SendEmailConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.smtpProtocols = [
+ 'smtp',
+ 'smtps'
+ ];
+ this.tlsVersions = ['TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3'];
+ }
+ configForm() {
+ return this.sendEmailConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.sendEmailConfigForm = this.fb.group({
+ useSystemSmtpSettings: [configuration ? configuration.useSystemSmtpSettings : false, []],
+ smtpProtocol: [configuration ? configuration.smtpProtocol : null, []],
+ smtpHost: [configuration ? configuration.smtpHost : null, []],
+ smtpPort: [configuration ? configuration.smtpPort : null, []],
+ timeout: [configuration ? configuration.timeout : null, []],
+ enableTls: [configuration ? configuration.enableTls : false, []],
+ tlsVersion: [configuration ? configuration.tlsVersion : null, []],
+ enableProxy: [configuration ? configuration.enableProxy : false, []],
+ proxyHost: [configuration ? configuration.proxyHost : null, []],
+ proxyPort: [configuration ? configuration.proxyPort : null, []],
+ proxyUser: [configuration ? configuration.proxyUser : null, []],
+ proxyPassword: [configuration ? configuration.proxyPassword : null, []],
+ username: [configuration ? configuration.username : null, []],
+ password: [configuration ? configuration.password : null, []]
+ });
+ }
+ validatorTriggers() {
+ return ['useSystemSmtpSettings', 'enableProxy'];
+ }
+ updateValidators(emitEvent) {
+ const useSystemSmtpSettings = this.sendEmailConfigForm.get('useSystemSmtpSettings').value;
+ const enableProxy = this.sendEmailConfigForm.get('enableProxy').value;
+ if (useSystemSmtpSettings) {
+ this.sendEmailConfigForm.get('smtpProtocol').setValidators([]);
+ this.sendEmailConfigForm.get('smtpHost').setValidators([]);
+ this.sendEmailConfigForm.get('smtpPort').setValidators([]);
+ this.sendEmailConfigForm.get('timeout').setValidators([]);
+ this.sendEmailConfigForm.get('proxyHost').setValidators([]);
+ this.sendEmailConfigForm.get('proxyPort').setValidators([]);
+ }
+ else {
+ this.sendEmailConfigForm.get('smtpProtocol').setValidators([Validators.required]);
+ this.sendEmailConfigForm.get('smtpHost').setValidators([Validators.required]);
+ this.sendEmailConfigForm.get('smtpPort').setValidators([Validators.required, Validators.min(1), Validators.max(65535)]);
+ this.sendEmailConfigForm.get('timeout').setValidators([Validators.required, Validators.min(0)]);
+ this.sendEmailConfigForm.get('proxyHost').setValidators(enableProxy ? [Validators.required] : []);
+ this.sendEmailConfigForm.get('proxyPort').setValidators(enableProxy ?
+ [Validators.required, Validators.min(1), Validators.max(65535)] : []);
+ }
+ this.sendEmailConfigForm.get('smtpProtocol').updateValueAndValidity({ emitEvent });
+ this.sendEmailConfigForm.get('smtpHost').updateValueAndValidity({ emitEvent });
+ this.sendEmailConfigForm.get('smtpPort').updateValueAndValidity({ emitEvent });
+ this.sendEmailConfigForm.get('timeout').updateValueAndValidity({ emitEvent });
+ this.sendEmailConfigForm.get('proxyHost').updateValueAndValidity({ emitEvent });
+ this.sendEmailConfigForm.get('proxyPort').updateValueAndValidity({ emitEvent });
+ }
+}
+SendEmailConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SendEmailConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+SendEmailConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SendEmailConfigComponent, selector: "tb-action-node-send-email-config", usesInheritance: true, ngImport: i0, template: "\n \n {{ 'tb.rulenode.use-system-smtp-settings' | translate }}\n \n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$2.TbCheckboxComponent, selector: "tb-checkbox", inputs: ["disabled", "trueValue", "falseValue"], outputs: ["valueChange"] }, { type: i7.TogglePasswordComponent, selector: "tb-toggle-password" }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i3.MatSuffix, selector: "[matSuffix]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SendEmailConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-send-email-config',
+ templateUrl: './send-email-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SendSmsConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.sendSmsConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.sendSmsConfigForm = this.fb.group({
+ numbersToTemplate: [configuration ? configuration.numbersToTemplate : null, [Validators.required]],
+ smsMessageTemplate: [configuration ? configuration.smsMessageTemplate : null, [Validators.required]],
+ useSystemSmsSettings: [configuration ? configuration.useSystemSmsSettings : false, []],
+ smsProviderConfiguration: [configuration ? configuration.smsProviderConfiguration : null, []],
+ });
+ }
+ validatorTriggers() {
+ return ['useSystemSmsSettings'];
+ }
+ updateValidators(emitEvent) {
+ const useSystemSmsSettings = this.sendSmsConfigForm.get('useSystemSmsSettings').value;
+ if (useSystemSmsSettings) {
+ this.sendSmsConfigForm.get('smsProviderConfiguration').setValidators([]);
+ }
+ else {
+ this.sendSmsConfigForm.get('smsProviderConfiguration').setValidators([Validators.required]);
+ }
+ this.sendSmsConfigForm.get('smsProviderConfiguration').updateValueAndValidity({ emitEvent });
+ }
+}
+SendSmsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SendSmsConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+SendSmsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SendSmsConfigComponent, selector: "tb-action-node-send-sms-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i5$3.SmsProviderConfigurationComponent, selector: "tb-sms-provider-configuration", inputs: ["required", "disabled"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SendSmsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-send-sms-config',
+ templateUrl: './send-sms-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SnsConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.snsConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.snsConfigForm = this.fb.group({
+ topicArnPattern: [configuration ? configuration.topicArnPattern : null, [Validators.required]],
+ accessKeyId: [configuration ? configuration.accessKeyId : null, [Validators.required]],
+ secretAccessKey: [configuration ? configuration.secretAccessKey : null, [Validators.required]],
+ region: [configuration ? configuration.region : null, [Validators.required]]
+ });
+ }
+}
+SnsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SnsConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+SnsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SnsConfigComponent, selector: "tb-action-node-sns-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SnsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-sns-config',
+ templateUrl: './sns-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class SqsConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.sqsQueueType = SqsQueueType;
+ this.sqsQueueTypes = Object.keys(SqsQueueType);
+ this.sqsQueueTypeTranslationsMap = sqsQueueTypeTranslations;
+ }
+ configForm() {
+ return this.sqsConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.sqsConfigForm = this.fb.group({
+ queueType: [configuration ? configuration.queueType : null, [Validators.required]],
+ queueUrlPattern: [configuration ? configuration.queueUrlPattern : null, [Validators.required]],
+ delaySeconds: [configuration ? configuration.delaySeconds : null, [Validators.min(0), Validators.max(900)]],
+ messageAttributes: [configuration ? configuration.messageAttributes : null, []],
+ accessKeyId: [configuration ? configuration.accessKeyId : null, [Validators.required]],
+ secretAccessKey: [configuration ? configuration.secretAccessKey : null, [Validators.required]],
+ region: [configuration ? configuration.region : null, [Validators.required]]
+ });
+ }
+}
+SqsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SqsConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+SqsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SqsConfigComponent, selector: "tb-action-node-sqs-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SqsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-sqs-config',
+ templateUrl: './sqs-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class TimeseriesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.timeseriesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.timeseriesConfigForm = this.fb.group({
+ defaultTTL: [configuration ? configuration.defaultTTL : null, [Validators.required, Validators.min(0)]]
+ });
+ }
+}
+TimeseriesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TimeseriesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+TimeseriesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: TimeseriesConfigComponent, selector: "tb-action-node-timeseries-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TimeseriesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-timeseries-config',
+ templateUrl: './timeseries-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class UnassignCustomerConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.unassignCustomerConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.unassignCustomerConfigForm = this.fb.group({
+ customerNamePattern: [configuration ? configuration.customerNamePattern : null, [Validators.required, Validators.pattern(/.*\S.*/)]],
+ customerCacheExpiration: [configuration ? configuration.customerCacheExpiration : null, [Validators.required, Validators.min(0)]]
+ });
+ }
+ prepareOutputConfig(configuration) {
+ configuration.customerNamePattern = configuration.customerNamePattern.trim();
+ return configuration;
+ }
+}
+UnassignCustomerConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: UnassignCustomerConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+UnassignCustomerConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: UnassignCustomerConfigComponent, selector: "tb-action-node-un-assign-to-customer-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: UnassignCustomerConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-action-node-un-assign-to-customer-config',
+ templateUrl: './unassign-customer-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class DeviceRelationsQueryConfigComponent extends PageComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.directionTypes = Object.keys(EntitySearchDirection);
+ this.directionTypeTranslations = entitySearchDirectionTranslations;
+ this.entityType = EntityType;
+ this.propagateChange = null;
+ }
+ get required() {
+ return this.requiredValue;
+ }
+ set required(value) {
+ this.requiredValue = coerceBooleanProperty(value);
+ }
+ ngOnInit() {
+ this.deviceRelationsQueryFormGroup = this.fb.group({
+ fetchLastLevelOnly: [false, []],
+ direction: [null, [Validators.required]],
+ maxLevel: [null, []],
+ relationType: [null],
+ deviceTypes: [null, [Validators.required]]
+ });
+ this.deviceRelationsQueryFormGroup.valueChanges.subscribe((query) => {
+ if (this.deviceRelationsQueryFormGroup.valid) {
+ this.propagateChange(query);
+ }
+ else {
+ this.propagateChange(null);
+ }
+ });
+ }
+ registerOnChange(fn) {
+ this.propagateChange = fn;
+ }
+ registerOnTouched(fn) {
+ }
+ setDisabledState(isDisabled) {
+ this.disabled = isDisabled;
+ if (this.disabled) {
+ this.deviceRelationsQueryFormGroup.disable({ emitEvent: false });
+ }
+ else {
+ this.deviceRelationsQueryFormGroup.enable({ emitEvent: false });
+ }
+ }
+ writeValue(query) {
+ this.deviceRelationsQueryFormGroup.reset(query, { emitEvent: false });
+ }
+}
+DeviceRelationsQueryConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceRelationsQueryConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+DeviceRelationsQueryConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: DeviceRelationsQueryConfigComponent, selector: "tb-device-relations-query-config", inputs: { disabled: "disabled", required: "required" }, providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => DeviceRelationsQueryConfigComponent),
+ multi: true
+ }
+ ], usesInheritance: true, ngImport: i0, template: "\n \n {{ 'alias.last-level-relation' | translate }}\n \n \n \n relation.direction\n \n \n {{ directionTypeTranslations.get(type) | translate }}\n \n \n \n \n tb.rulenode.max-relation-level\n \n \n
\n relation.relation-type
\n \n \n device.device-types
\n \n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$3.RelationTypeAutocompleteComponent, selector: "tb-relation-type-autocomplete", inputs: ["required", "disabled"] }, { type: i8$2.EntitySubTypeListComponent, selector: "tb-entity-subtype-list", inputs: ["required", "disabled", "entityType"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceRelationsQueryConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-device-relations-query-config',
+ templateUrl: './device-relations-query-config.component.html',
+ styleUrls: [],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => DeviceRelationsQueryConfigComponent),
+ multi: true
+ }
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; }, propDecorators: { disabled: [{
+ type: Input
+ }], required: [{
+ type: Input
+ }] } });
+
+class RelationsQueryConfigComponent extends PageComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.directionTypes = Object.keys(EntitySearchDirection);
+ this.directionTypeTranslations = entitySearchDirectionTranslations;
+ this.propagateChange = null;
+ }
+ get required() {
+ return this.requiredValue;
+ }
+ set required(value) {
+ this.requiredValue = coerceBooleanProperty(value);
+ }
+ ngOnInit() {
+ this.relationsQueryFormGroup = this.fb.group({
+ fetchLastLevelOnly: [false, []],
+ direction: [null, [Validators.required]],
+ maxLevel: [null, []],
+ filters: [null]
+ });
+ this.relationsQueryFormGroup.valueChanges.subscribe((query) => {
+ if (this.relationsQueryFormGroup.valid) {
+ this.propagateChange(query);
+ }
+ else {
+ this.propagateChange(null);
+ }
+ });
+ }
+ registerOnChange(fn) {
+ this.propagateChange = fn;
+ }
+ registerOnTouched(fn) {
+ }
+ setDisabledState(isDisabled) {
+ this.disabled = isDisabled;
+ if (this.disabled) {
+ this.relationsQueryFormGroup.disable({ emitEvent: false });
+ }
+ else {
+ this.relationsQueryFormGroup.enable({ emitEvent: false });
+ }
+ }
+ writeValue(query) {
+ this.relationsQueryFormGroup.reset(query || {}, { emitEvent: false });
+ }
+}
+RelationsQueryConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RelationsQueryConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RelationsQueryConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RelationsQueryConfigComponent, selector: "tb-relations-query-config", inputs: { disabled: "disabled", required: "required" }, providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => RelationsQueryConfigComponent),
+ multi: true
+ }
+ ], usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$4.RelationFiltersComponent, selector: "tb-relation-filters", inputs: ["disabled", "allowedEntityTypes"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RelationsQueryConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-relations-query-config',
+ templateUrl: './relations-query-config.component.html',
+ styleUrls: [],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => RelationsQueryConfigComponent),
+ multi: true
+ }
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; }, propDecorators: { disabled: [{
+ type: Input
+ }], required: [{
+ type: Input
+ }] } });
+
+class MessageTypesConfigComponent extends PageComponent {
+ constructor(store, translate, truncate, fb) {
+ super(store);
+ this.store = store;
+ this.translate = translate;
+ this.truncate = truncate;
+ this.fb = fb;
+ this.placeholder = 'tb.rulenode.message-type';
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ this.messageTypes = [];
+ this.messageTypesList = [];
+ this.searchText = '';
+ this.propagateChange = (v) => { };
+ this.messageTypeConfigForm = this.fb.group({
+ messageType: [null]
+ });
+ for (const type of Object.keys(MessageType)) {
+ this.messageTypesList.push({
+ name: messageTypeNames.get(MessageType[type]),
+ value: type
+ });
+ }
+ }
+ get required() {
+ return this.requiredValue;
+ }
+ set required(value) {
+ this.requiredValue = coerceBooleanProperty(value);
+ }
+ registerOnChange(fn) {
+ this.propagateChange = fn;
+ }
+ registerOnTouched(fn) {
+ }
+ ngOnInit() {
+ this.filteredMessageTypes = this.messageTypeConfigForm.get('messageType').valueChanges
+ .pipe(startWith(''), map((value) => value ? value : ''), mergeMap(name => this.fetchMessageTypes(name)), share());
+ }
+ ngAfterViewInit() { }
+ setDisabledState(isDisabled) {
+ this.disabled = isDisabled;
+ if (this.disabled) {
+ this.messageTypeConfigForm.disable({ emitEvent: false });
+ }
+ else {
+ this.messageTypeConfigForm.enable({ emitEvent: false });
+ }
+ }
+ writeValue(value) {
+ this.searchText = '';
+ this.messageTypes.length = 0;
+ if (value) {
+ value.forEach((type) => {
+ const found = this.messageTypesList.find((messageType => messageType.value === type));
+ if (found) {
+ this.messageTypes.push({
+ name: found.name,
+ value: found.value
+ });
+ }
+ else {
+ this.messageTypes.push({
+ name: type,
+ value: type
+ });
+ }
+ });
+ }
+ }
+ displayMessageTypeFn(messageType) {
+ return messageType ? messageType.name : undefined;
+ }
+ textIsNotEmpty(text) {
+ return (text && text != null && text.length > 0) ? true : false;
+ }
+ createMessageType($event, value) {
+ $event.preventDefault();
+ this.transformMessageType(value);
+ }
+ add(event) {
+ this.transformMessageType(event.value);
+ }
+ fetchMessageTypes(searchText) {
+ this.searchText = searchText;
+ if (this.searchText && this.searchText.length) {
+ const search = this.searchText.toUpperCase();
+ return of(this.messageTypesList.filter(messageType => messageType.name.toUpperCase().includes(search)));
+ }
+ else {
+ return of(this.messageTypesList);
+ }
+ }
+ transformMessageType(value) {
+ if ((value || '').trim()) {
+ let newMessageType = null;
+ const messageTypeName = value.trim();
+ const existingMessageType = this.messageTypesList.find(messageType => messageType.name === messageTypeName);
+ if (existingMessageType) {
+ newMessageType = {
+ name: existingMessageType.name,
+ value: existingMessageType.value
+ };
+ }
+ else {
+ newMessageType = {
+ name: messageTypeName,
+ value: messageTypeName
+ };
+ }
+ if (newMessageType) {
+ this.addMessageType(newMessageType);
+ }
+ }
+ this.clear('');
+ }
+ remove(messageType) {
+ const index = this.messageTypes.indexOf(messageType);
+ if (index >= 0) {
+ this.messageTypes.splice(index, 1);
+ this.updateModel();
+ }
+ }
+ selected(event) {
+ this.addMessageType(event.option.value);
+ this.clear('');
+ }
+ addMessageType(messageType) {
+ const index = this.messageTypes.findIndex(existingMessageType => existingMessageType.value === messageType.value);
+ if (index === -1) {
+ this.messageTypes.push(messageType);
+ this.updateModel();
+ }
+ }
+ onFocus() {
+ this.messageTypeConfigForm.get('messageType').updateValueAndValidity({ onlySelf: true, emitEvent: true });
+ }
+ clear(value = '') {
+ this.messageTypeInput.nativeElement.value = value;
+ this.messageTypeConfigForm.get('messageType').patchValue(null, { emitEvent: true });
+ setTimeout(() => {
+ this.messageTypeInput.nativeElement.blur();
+ this.messageTypeInput.nativeElement.focus();
+ }, 0);
+ }
+ updateModel() {
+ const value = this.messageTypes.map((messageType => messageType.value));
+ if (this.required) {
+ this.chipList.errorState = !value.length;
+ this.propagateChange(value.length > 0 ? value : null);
+ }
+ else {
+ this.chipList.errorState = false;
+ this.propagateChange(value);
+ }
+ }
+}
+MessageTypesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MessageTypesConfigComponent, deps: [{ token: i1.Store }, { token: i4.TranslateService }, { token: i3$4.TruncatePipe }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+MessageTypesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: MessageTypesConfigComponent, selector: "tb-message-types-config", inputs: { required: "required", label: "label", placeholder: "placeholder", disabled: "disabled" }, providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => MessageTypesConfigComponent),
+ multi: true
+ }
+ ], viewQueries: [{ propertyName: "chipList", first: true, predicate: ["chipList"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["messageTypeAutocomplete"], descendants: true }, { propertyName: "messageTypeInput", first: true, predicate: ["messageTypeInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n {{ label }}\n \n \n {{messageType.name}}\n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-message-types-found\n
\n
\n \n {{ translate.get('tb.rulenode.no-message-type-matching',\n {messageType: truncate.transform(searchText, true, 6, '...')}) | async }}\n \n \n
\n tb.rulenode.create-new-message-type\n \n
\n \n \n \n {{ 'tb.rulenode.message-types-required' | translate }}\n \n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i7$5.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe, "async": i10.AsyncPipe, "highlight": i12$1.HighlightPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MessageTypesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-message-types-config',
+ templateUrl: './message-types-config.component.html',
+ styleUrls: [],
+ providers: [
+ {
+ provide: NG_VALUE_ACCESSOR,
+ useExisting: forwardRef(() => MessageTypesConfigComponent),
+ multi: true
+ }
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i4.TranslateService }, { type: i3$4.TruncatePipe }, { type: i2.FormBuilder }]; }, propDecorators: { required: [{
+ type: Input
+ }], label: [{
+ type: Input
+ }], placeholder: [{
+ type: Input
+ }], disabled: [{
+ type: Input
+ }], chipList: [{
+ type: ViewChild,
+ args: ['chipList', { static: false }]
+ }], matAutocomplete: [{
+ type: ViewChild,
+ args: ['messageTypeAutocomplete', { static: false }]
+ }], messageTypeInput: [{
+ type: ViewChild,
+ args: ['messageTypeInput', { static: false }]
+ }] } });
+
+class RulenodeCoreConfigCommonModule {
+}
+RulenodeCoreConfigCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RulenodeCoreConfigCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigCommonModule, declarations: [KvMapConfigComponent,
+ DeviceRelationsQueryConfigComponent,
+ RelationsQueryConfigComponent,
+ MessageTypesConfigComponent,
+ CredentialsConfigComponent,
+ SafeHtmlPipe], imports: [CommonModule,
+ SharedModule,
+ HomeComponentsModule], exports: [KvMapConfigComponent,
+ DeviceRelationsQueryConfigComponent,
+ RelationsQueryConfigComponent,
+ MessageTypesConfigComponent,
+ CredentialsConfigComponent,
+ SafeHtmlPipe] });
+RulenodeCoreConfigCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigCommonModule, imports: [[
+ CommonModule,
+ SharedModule,
+ HomeComponentsModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigCommonModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ KvMapConfigComponent,
+ DeviceRelationsQueryConfigComponent,
+ RelationsQueryConfigComponent,
+ MessageTypesConfigComponent,
+ CredentialsConfigComponent,
+ SafeHtmlPipe
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ HomeComponentsModule
+ ],
+ exports: [
+ KvMapConfigComponent,
+ DeviceRelationsQueryConfigComponent,
+ RelationsQueryConfigComponent,
+ MessageTypesConfigComponent,
+ CredentialsConfigComponent,
+ SafeHtmlPipe
+ ]
+ }]
+ }] });
+
+class RuleNodeCoreConfigActionModule {
+}
+RuleNodeCoreConfigActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RuleNodeCoreConfigActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigActionModule, declarations: [AttributesConfigComponent,
+ TimeseriesConfigComponent,
+ RpcRequestConfigComponent,
+ LogConfigComponent,
+ AssignCustomerConfigComponent,
+ ClearAlarmConfigComponent,
+ CreateAlarmConfigComponent,
+ CreateRelationConfigComponent,
+ MsgDelayConfigComponent,
+ DeleteRelationConfigComponent,
+ GeneratorConfigComponent,
+ GpsGeoActionConfigComponent,
+ MsgCountConfigComponent,
+ RpcReplyConfigComponent,
+ SaveToCustomTableConfigComponent,
+ UnassignCustomerConfigComponent,
+ SnsConfigComponent,
+ SqsConfigComponent,
+ PubSubConfigComponent,
+ KafkaConfigComponent,
+ MqttConfigComponent,
+ RabbitMqConfigComponent,
+ RestApiCallConfigComponent,
+ SendEmailConfigComponent,
+ CheckPointConfigComponent,
+ AzureIotHubConfigComponent,
+ DeviceProfileConfigComponent,
+ SendSmsConfigComponent,
+ PushToEdgeConfigComponent,
+ PushToCloudConfigComponent], imports: [CommonModule,
+ SharedModule,
+ HomeComponentsModule,
+ RulenodeCoreConfigCommonModule], exports: [AttributesConfigComponent,
+ TimeseriesConfigComponent,
+ RpcRequestConfigComponent,
+ LogConfigComponent,
+ AssignCustomerConfigComponent,
+ ClearAlarmConfigComponent,
+ CreateAlarmConfigComponent,
+ CreateRelationConfigComponent,
+ MsgDelayConfigComponent,
+ DeleteRelationConfigComponent,
+ GeneratorConfigComponent,
+ GpsGeoActionConfigComponent,
+ MsgCountConfigComponent,
+ RpcReplyConfigComponent,
+ SaveToCustomTableConfigComponent,
+ UnassignCustomerConfigComponent,
+ SnsConfigComponent,
+ SqsConfigComponent,
+ PubSubConfigComponent,
+ KafkaConfigComponent,
+ MqttConfigComponent,
+ RabbitMqConfigComponent,
+ RestApiCallConfigComponent,
+ SendEmailConfigComponent,
+ CheckPointConfigComponent,
+ AzureIotHubConfigComponent,
+ DeviceProfileConfigComponent,
+ SendSmsConfigComponent,
+ PushToEdgeConfigComponent,
+ PushToCloudConfigComponent] });
+RuleNodeCoreConfigActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigActionModule, imports: [[
+ CommonModule,
+ SharedModule,
+ HomeComponentsModule,
+ RulenodeCoreConfigCommonModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigActionModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ AttributesConfigComponent,
+ TimeseriesConfigComponent,
+ RpcRequestConfigComponent,
+ LogConfigComponent,
+ AssignCustomerConfigComponent,
+ ClearAlarmConfigComponent,
+ CreateAlarmConfigComponent,
+ CreateRelationConfigComponent,
+ MsgDelayConfigComponent,
+ DeleteRelationConfigComponent,
+ GeneratorConfigComponent,
+ GpsGeoActionConfigComponent,
+ MsgCountConfigComponent,
+ RpcReplyConfigComponent,
+ SaveToCustomTableConfigComponent,
+ UnassignCustomerConfigComponent,
+ SnsConfigComponent,
+ SqsConfigComponent,
+ PubSubConfigComponent,
+ KafkaConfigComponent,
+ MqttConfigComponent,
+ RabbitMqConfigComponent,
+ RestApiCallConfigComponent,
+ SendEmailConfigComponent,
+ CheckPointConfigComponent,
+ AzureIotHubConfigComponent,
+ DeviceProfileConfigComponent,
+ SendSmsConfigComponent,
+ PushToEdgeConfigComponent,
+ PushToCloudConfigComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ HomeComponentsModule,
+ RulenodeCoreConfigCommonModule
+ ],
+ exports: [
+ AttributesConfigComponent,
+ TimeseriesConfigComponent,
+ RpcRequestConfigComponent,
+ LogConfigComponent,
+ AssignCustomerConfigComponent,
+ ClearAlarmConfigComponent,
+ CreateAlarmConfigComponent,
+ CreateRelationConfigComponent,
+ MsgDelayConfigComponent,
+ DeleteRelationConfigComponent,
+ GeneratorConfigComponent,
+ GpsGeoActionConfigComponent,
+ MsgCountConfigComponent,
+ RpcReplyConfigComponent,
+ SaveToCustomTableConfigComponent,
+ UnassignCustomerConfigComponent,
+ SnsConfigComponent,
+ SqsConfigComponent,
+ PubSubConfigComponent,
+ KafkaConfigComponent,
+ MqttConfigComponent,
+ RabbitMqConfigComponent,
+ RestApiCallConfigComponent,
+ SendEmailConfigComponent,
+ CheckPointConfigComponent,
+ AzureIotHubConfigComponent,
+ DeviceProfileConfigComponent,
+ SendSmsConfigComponent,
+ PushToEdgeConfigComponent,
+ PushToCloudConfigComponent
+ ]
+ }]
+ }] });
+
+class CalculateDeltaConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ }
+ configForm() {
+ return this.calculateDeltaConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.calculateDeltaConfigForm = this.fb.group({
+ inputValueKey: [configuration ? configuration.inputValueKey : null, [Validators.required]],
+ outputValueKey: [configuration ? configuration.outputValueKey : null, [Validators.required]],
+ useCache: [configuration ? configuration.useCache : null, []],
+ addPeriodBetweenMsgs: [configuration ? configuration.addPeriodBetweenMsgs : false, []],
+ periodValueKey: [configuration ? configuration.periodValueKey : null, []],
+ round: [configuration ? configuration.round : null, [Validators.min(0), Validators.max(15)]],
+ tellFailureIfDeltaIsNegative: [configuration ? configuration.tellFailureIfDeltaIsNegative : null, []]
+ });
+ }
+ updateValidators(emitEvent) {
+ const addPeriodBetweenMsgs = this.calculateDeltaConfigForm.get('addPeriodBetweenMsgs').value;
+ if (addPeriodBetweenMsgs) {
+ this.calculateDeltaConfigForm.get('periodValueKey').setValidators([Validators.required]);
+ }
+ else {
+ this.calculateDeltaConfigForm.get('periodValueKey').setValidators([]);
+ }
+ this.calculateDeltaConfigForm.get('periodValueKey').updateValueAndValidity({ emitEvent });
+ }
+ validatorTriggers() {
+ return ['addPeriodBetweenMsgs'];
+ }
+}
+CalculateDeltaConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CalculateDeltaConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CalculateDeltaConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CalculateDeltaConfigComponent, selector: "tb-enrichment-node-calculate-delta-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CalculateDeltaConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-calculate-delta-config',
+ templateUrl: './calculate-delta-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class CustomerAttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.customerAttributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.customerAttributesConfigForm = this.fb.group({
+ telemetry: [configuration ? configuration.telemetry : false, []],
+ attrMapping: [configuration ? configuration.attrMapping : null, [Validators.required]]
+ });
+ }
+}
+CustomerAttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CustomerAttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CustomerAttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CustomerAttributesConfigComponent, selector: "tb-enrichment-node-customer-attributes-config", usesInheritance: true, ngImport: i0, template: "\n \n \n {{ 'tb.rulenode.latest-telemetry' | translate }}\n \n \n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CustomerAttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-customer-attributes-config',
+ templateUrl: './customer-attributes-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class DeviceAttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ }
+ configForm() {
+ return this.deviceAttributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.deviceAttributesConfigForm = this.fb.group({
+ deviceRelationsQuery: [configuration ? configuration.deviceRelationsQuery : null, [Validators.required]],
+ tellFailureIfAbsent: [configuration ? configuration.tellFailureIfAbsent : false, []],
+ clientAttributeNames: [configuration ? configuration.clientAttributeNames : null, []],
+ sharedAttributeNames: [configuration ? configuration.sharedAttributeNames : null, []],
+ serverAttributeNames: [configuration ? configuration.serverAttributeNames : null, []],
+ latestTsKeyNames: [configuration ? configuration.latestTsKeyNames : null, []],
+ getLatestValueWithTs: [configuration ? configuration.getLatestValueWithTs : false, []]
+ });
+ }
+ removeKey(key, keysField) {
+ const keys = this.deviceAttributesConfigForm.get(keysField).value;
+ const index = keys.indexOf(key);
+ if (index >= 0) {
+ keys.splice(index, 1);
+ this.deviceAttributesConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ addKey(event, keysField) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let keys = this.deviceAttributesConfigForm.get(keysField).value;
+ if (!keys || keys.indexOf(value) === -1) {
+ if (!keys) {
+ keys = [];
+ }
+ keys.push(value);
+ this.deviceAttributesConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+}
+DeviceAttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceAttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+DeviceAttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: DeviceAttributesConfigComponent, selector: "tb-enrichment-node-device-attributes-config", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host label.tb-title{margin-bottom:-10px}\n"], components: [{ type: DeviceRelationsQueryConfigComponent, selector: "tb-device-relations-query-config", inputs: ["disabled", "required"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: DeviceAttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-device-attributes-config',
+ templateUrl: './device-attributes-config.component.html',
+ styleUrls: ['./device-attributes-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class EntityDetailsConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, translate, fb) {
+ super(store);
+ this.store = store;
+ this.translate = translate;
+ this.fb = fb;
+ this.entityDetailsTranslationsMap = entityDetailsTranslations;
+ this.entityDetailsList = [];
+ this.searchText = '';
+ this.displayDetailsFn = this.displayDetails.bind(this);
+ for (const field of Object.keys(EntityDetailsField)) {
+ this.entityDetailsList.push(EntityDetailsField[field]);
+ }
+ this.detailsFormControl = new FormControl('');
+ this.filteredEntityDetails = this.detailsFormControl.valueChanges
+ .pipe(startWith(''), map((value) => value ? value : ''), mergeMap(name => this.fetchEntityDetails(name)), share());
+ }
+ ngOnInit() {
+ super.ngOnInit();
+ }
+ configForm() {
+ return this.entityDetailsConfigForm;
+ }
+ prepareInputConfig(configuration) {
+ this.searchText = '';
+ this.detailsFormControl.patchValue('', { emitEvent: true });
+ return configuration;
+ }
+ onConfigurationSet(configuration) {
+ this.entityDetailsConfigForm = this.fb.group({
+ detailsList: [configuration ? configuration.detailsList : null, [Validators.required]],
+ addToMetadata: [configuration ? configuration.addToMetadata : false, []]
+ });
+ }
+ displayDetails(details) {
+ return details ? this.translate.instant(entityDetailsTranslations.get(details)) : undefined;
+ }
+ fetchEntityDetails(searchText) {
+ this.searchText = searchText;
+ if (this.searchText && this.searchText.length) {
+ const search = this.searchText.toUpperCase();
+ return of(this.entityDetailsList.filter(field => this.translate.instant(entityDetailsTranslations.get(EntityDetailsField[field])).toUpperCase().includes(search)));
+ }
+ else {
+ return of(this.entityDetailsList);
+ }
+ }
+ detailsFieldSelected(event) {
+ this.addDetailsField(event.option.value);
+ this.clear('');
+ }
+ removeDetailsField(details) {
+ const detailsList = this.entityDetailsConfigForm.get('detailsList').value;
+ if (detailsList) {
+ const index = detailsList.indexOf(details);
+ if (index >= 0) {
+ detailsList.splice(index, 1);
+ this.entityDetailsConfigForm.get('detailsList').setValue(detailsList);
+ }
+ }
+ }
+ addDetailsField(details) {
+ let detailsList = this.entityDetailsConfigForm.get('detailsList').value;
+ if (!detailsList) {
+ detailsList = [];
+ }
+ const index = detailsList.indexOf(details);
+ if (index === -1) {
+ detailsList.push(details);
+ this.entityDetailsConfigForm.get('detailsList').setValue(detailsList);
+ }
+ }
+ onEntityDetailsInputFocus() {
+ this.detailsFormControl.updateValueAndValidity({ onlySelf: true, emitEvent: true });
+ }
+ clear(value = '') {
+ this.detailsInput.nativeElement.value = value;
+ this.detailsFormControl.patchValue(null, { emitEvent: true });
+ setTimeout(() => {
+ this.detailsInput.nativeElement.blur();
+ this.detailsInput.nativeElement.focus();
+ }, 0);
+ }
+}
+EntityDetailsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: EntityDetailsConfigComponent, deps: [{ token: i1.Store }, { token: i4.TranslateService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+EntityDetailsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: EntityDetailsConfigComponent, selector: "tb-enrichment-node-entity-details-config", viewQueries: [{ propertyName: "detailsInput", first: true, predicate: ["detailsInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n \n tb.rulenode.entity-details\n \n \n \n {{entityDetailsTranslationsMap.get(details) | translate}}\n \n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-entity-details-matching\n
\n
\n \n \n \n \n \n {{ 'tb.rulenode.add-to-metadata' | translate }}\n \n tb.rulenode.add-to-metadata-hint
\n\n", styles: [":host ::ng-deep mat-form-field.entity-fields-list .mat-form-field-wrapper{margin-bottom:-1.25em}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9.TbErrorComponent, selector: "tb-error", inputs: ["error"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i7$5.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe, "async": i10.AsyncPipe, "highlight": i12$1.HighlightPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: EntityDetailsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-entity-details-config',
+ templateUrl: './entity-details-config.component.html',
+ styleUrls: ['./entity-details-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i4.TranslateService }, { type: i2.FormBuilder }]; }, propDecorators: { detailsInput: [{
+ type: ViewChild,
+ args: ['detailsInput', { static: false }]
+ }] } });
+
+class GetTelemetryFromDatabaseConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ this.aggregationTypes = AggregationType;
+ this.aggregations = Object.keys(AggregationType);
+ this.aggregationTypesTranslations = aggregationTranslations;
+ this.fetchMode = FetchMode;
+ this.fetchModes = Object.keys(FetchMode);
+ this.samplingOrders = Object.keys(SamplingOrder);
+ this.timeUnits = Object.values(TimeUnit);
+ this.timeUnitsTranslationMap = timeUnitTranslations;
+ }
+ configForm() {
+ return this.getTelemetryFromDatabaseConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.getTelemetryFromDatabaseConfigForm = this.fb.group({
+ latestTsKeyNames: [configuration ? configuration.latestTsKeyNames : null, []],
+ aggregation: [configuration ? configuration.aggregation : null, [Validators.required]],
+ fetchMode: [configuration ? configuration.fetchMode : null, [Validators.required]],
+ orderBy: [configuration ? configuration.orderBy : null, []],
+ limit: [configuration ? configuration.limit : null, []],
+ useMetadataIntervalPatterns: [configuration ? configuration.useMetadataIntervalPatterns : false, []],
+ startInterval: [configuration ? configuration.startInterval : null, []],
+ startIntervalTimeUnit: [configuration ? configuration.startIntervalTimeUnit : null, []],
+ endInterval: [configuration ? configuration.endInterval : null, []],
+ endIntervalTimeUnit: [configuration ? configuration.endIntervalTimeUnit : null, []],
+ startIntervalPattern: [configuration ? configuration.startIntervalPattern : null, []],
+ endIntervalPattern: [configuration ? configuration.endIntervalPattern : null, []],
+ });
+ }
+ validatorTriggers() {
+ return ['fetchMode', 'useMetadataIntervalPatterns'];
+ }
+ updateValidators(emitEvent) {
+ const fetchMode = this.getTelemetryFromDatabaseConfigForm.get('fetchMode').value;
+ const useMetadataIntervalPatterns = this.getTelemetryFromDatabaseConfigForm.get('useMetadataIntervalPatterns').value;
+ if (fetchMode && fetchMode === FetchMode.ALL) {
+ this.getTelemetryFromDatabaseConfigForm.get('aggregation').setValidators([Validators.required]);
+ this.getTelemetryFromDatabaseConfigForm.get('orderBy').setValidators([Validators.required]);
+ this.getTelemetryFromDatabaseConfigForm.get('limit').setValidators([Validators.required, Validators.min(2), Validators.max(1000)]);
+ }
+ else {
+ this.getTelemetryFromDatabaseConfigForm.get('aggregation').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('orderBy').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('limit').setValidators([]);
+ }
+ if (useMetadataIntervalPatterns) {
+ this.getTelemetryFromDatabaseConfigForm.get('startInterval').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalTimeUnit').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('endInterval').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalTimeUnit').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalPattern').setValidators([Validators.required]);
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalPattern').setValidators([Validators.required]);
+ }
+ else {
+ this.getTelemetryFromDatabaseConfigForm.get('startInterval').setValidators([Validators.required,
+ Validators.min(1), Validators.max(2147483647)]);
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalTimeUnit').setValidators([Validators.required]);
+ this.getTelemetryFromDatabaseConfigForm.get('endInterval').setValidators([Validators.required,
+ Validators.min(1), Validators.max(2147483647)]);
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalTimeUnit').setValidators([Validators.required]);
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalPattern').setValidators([]);
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalPattern').setValidators([]);
+ }
+ this.getTelemetryFromDatabaseConfigForm.get('aggregation').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('orderBy').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('limit').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('startInterval').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalTimeUnit').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('endInterval').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalTimeUnit').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('startIntervalPattern').updateValueAndValidity({ emitEvent });
+ this.getTelemetryFromDatabaseConfigForm.get('endIntervalPattern').updateValueAndValidity({ emitEvent });
+ }
+ removeKey(key, keysField) {
+ const keys = this.getTelemetryFromDatabaseConfigForm.get(keysField).value;
+ const index = keys.indexOf(key);
+ if (index >= 0) {
+ keys.splice(index, 1);
+ this.getTelemetryFromDatabaseConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ addKey(event, keysField) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let keys = this.getTelemetryFromDatabaseConfigForm.get(keysField).value;
+ if (!keys || keys.indexOf(value) === -1) {
+ if (!keys) {
+ keys = [];
+ }
+ keys.push(value);
+ this.getTelemetryFromDatabaseConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+}
+GetTelemetryFromDatabaseConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GetTelemetryFromDatabaseConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+GetTelemetryFromDatabaseConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: GetTelemetryFromDatabaseConfigComponent, selector: "tb-enrichment-node-get-telemetry-from-database", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host label.tb-title{margin-bottom:-10px}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GetTelemetryFromDatabaseConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-get-telemetry-from-database',
+ templateUrl: './get-telemetry-from-database-config.component.html',
+ styleUrls: ['./get-telemetry-from-database-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class OriginatorAttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ }
+ configForm() {
+ return this.originatorAttributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.originatorAttributesConfigForm = this.fb.group({
+ tellFailureIfAbsent: [configuration ? configuration.tellFailureIfAbsent : false, []],
+ clientAttributeNames: [configuration ? configuration.clientAttributeNames : null, []],
+ sharedAttributeNames: [configuration ? configuration.sharedAttributeNames : null, []],
+ serverAttributeNames: [configuration ? configuration.serverAttributeNames : null, []],
+ latestTsKeyNames: [configuration ? configuration.latestTsKeyNames : null, []],
+ getLatestValueWithTs: [configuration ? configuration.getLatestValueWithTs : false, []]
+ });
+ }
+ removeKey(key, keysField) {
+ const keys = this.originatorAttributesConfigForm.get(keysField).value;
+ const index = keys.indexOf(key);
+ if (index >= 0) {
+ keys.splice(index, 1);
+ this.originatorAttributesConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ addKey(event, keysField) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let keys = this.originatorAttributesConfigForm.get(keysField).value;
+ if (!keys || keys.indexOf(value) === -1) {
+ if (!keys) {
+ keys = [];
+ }
+ keys.push(value);
+ this.originatorAttributesConfigForm.get(keysField).setValue(keys, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+}
+OriginatorAttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorAttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+OriginatorAttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: OriginatorAttributesConfigComponent, selector: "tb-enrichment-node-originator-attributes-config", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host label.tb-title{margin-bottom:-10px}\n"], components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorAttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-originator-attributes-config',
+ templateUrl: './originator-attributes-config.component.html',
+ styleUrls: ['./originator-attributes-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class OriginatorFieldsConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.originatorFieldsConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.originatorFieldsConfigForm = this.fb.group({
+ fieldsMapping: [configuration ? configuration.fieldsMapping : null, [Validators.required]]
+ });
+ }
+}
+OriginatorFieldsConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorFieldsConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+OriginatorFieldsConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: OriginatorFieldsConfigComponent, selector: "tb-enrichment-node-originator-fields-config", usesInheritance: true, ngImport: i0, template: "\n \n \n \n\n", components: [{ type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorFieldsConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-originator-fields-config',
+ templateUrl: './originator-fields-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RelatedAttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.relatedAttributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.relatedAttributesConfigForm = this.fb.group({
+ relationsQuery: [configuration ? configuration.relationsQuery : null, [Validators.required]],
+ telemetry: [configuration ? configuration.telemetry : false, []],
+ attrMapping: [configuration ? configuration.attrMapping : null, [Validators.required]]
+ });
+ }
+}
+RelatedAttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RelatedAttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RelatedAttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RelatedAttributesConfigComponent, selector: "tb-enrichment-node-related-attributes-config", usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n {{ 'tb.rulenode.latest-telemetry' | translate }}\n \n \n \n\n", components: [{ type: RelationsQueryConfigComponent, selector: "tb-relations-query-config", inputs: ["disabled", "required"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RelatedAttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-related-attributes-config',
+ templateUrl: './related-attributes-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class TenantAttributesConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.tenantAttributesConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.tenantAttributesConfigForm = this.fb.group({
+ telemetry: [configuration ? configuration.telemetry : false, []],
+ attrMapping: [configuration ? configuration.attrMapping : null, [Validators.required]]
+ });
+ }
+}
+TenantAttributesConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TenantAttributesConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+TenantAttributesConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: TenantAttributesConfigComponent, selector: "tb-enrichment-node-tenant-attributes-config", usesInheritance: true, ngImport: i0, template: "\n \n \n {{ 'tb.rulenode.latest-telemetry' | translate }}\n \n \n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: KvMapConfigComponent, selector: "tb-kv-map-config", inputs: ["disabled", "requiredText", "keyText", "keyRequiredText", "valText", "valRequiredText", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TenantAttributesConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-enrichment-node-tenant-attributes-config',
+ templateUrl: './tenant-attributes-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RulenodeCoreConfigEnrichmentModule {
+}
+RulenodeCoreConfigEnrichmentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigEnrichmentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RulenodeCoreConfigEnrichmentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigEnrichmentModule, declarations: [CustomerAttributesConfigComponent,
+ EntityDetailsConfigComponent,
+ DeviceAttributesConfigComponent,
+ OriginatorAttributesConfigComponent,
+ OriginatorFieldsConfigComponent,
+ GetTelemetryFromDatabaseConfigComponent,
+ RelatedAttributesConfigComponent,
+ TenantAttributesConfigComponent,
+ CalculateDeltaConfigComponent], imports: [CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule], exports: [CustomerAttributesConfigComponent,
+ EntityDetailsConfigComponent,
+ DeviceAttributesConfigComponent,
+ OriginatorAttributesConfigComponent,
+ OriginatorFieldsConfigComponent,
+ GetTelemetryFromDatabaseConfigComponent,
+ RelatedAttributesConfigComponent,
+ TenantAttributesConfigComponent,
+ CalculateDeltaConfigComponent] });
+RulenodeCoreConfigEnrichmentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigEnrichmentModule, imports: [[
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigEnrichmentModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ CustomerAttributesConfigComponent,
+ EntityDetailsConfigComponent,
+ DeviceAttributesConfigComponent,
+ OriginatorAttributesConfigComponent,
+ OriginatorFieldsConfigComponent,
+ GetTelemetryFromDatabaseConfigComponent,
+ RelatedAttributesConfigComponent,
+ TenantAttributesConfigComponent,
+ CalculateDeltaConfigComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ],
+ exports: [
+ CustomerAttributesConfigComponent,
+ EntityDetailsConfigComponent,
+ DeviceAttributesConfigComponent,
+ OriginatorAttributesConfigComponent,
+ OriginatorFieldsConfigComponent,
+ GetTelemetryFromDatabaseConfigComponent,
+ RelatedAttributesConfigComponent,
+ TenantAttributesConfigComponent,
+ CalculateDeltaConfigComponent
+ ]
+ }]
+ }] });
+
+class CheckAlarmStatusComponent extends RuleNodeConfigurationComponent {
+ constructor(store, translate, fb) {
+ super(store);
+ this.store = store;
+ this.translate = translate;
+ this.fb = fb;
+ this.alarmStatusTranslationsMap = alarmStatusTranslations;
+ this.alarmStatusList = [];
+ this.searchText = '';
+ this.displayStatusFn = this.displayStatus.bind(this);
+ for (const field of Object.keys(AlarmStatus)) {
+ this.alarmStatusList.push(AlarmStatus[field]);
+ }
+ this.statusFormControl = new FormControl('');
+ this.filteredAlarmStatus = this.statusFormControl.valueChanges
+ .pipe(startWith(''), map((value) => value ? value : ''), mergeMap(name => this.fetchAlarmStatus(name)), share());
+ }
+ ngOnInit() {
+ super.ngOnInit();
+ }
+ configForm() {
+ return this.alarmStatusConfigForm;
+ }
+ prepareInputConfig(configuration) {
+ this.searchText = '';
+ this.statusFormControl.patchValue('', { emitEvent: true });
+ return configuration;
+ }
+ onConfigurationSet(configuration) {
+ this.alarmStatusConfigForm = this.fb.group({
+ alarmStatusList: [configuration ? configuration.alarmStatusList : null, [Validators.required]],
+ });
+ }
+ displayStatus(status) {
+ return status ? this.translate.instant(alarmStatusTranslations.get(status)) : undefined;
+ }
+ fetchAlarmStatus(searchText) {
+ const alarmStatusList = this.getAlarmStatusList();
+ this.searchText = searchText;
+ if (this.searchText && this.searchText.length) {
+ const search = this.searchText.toUpperCase();
+ return of(alarmStatusList.filter(field => this.translate.instant(alarmStatusTranslations.get(AlarmStatus[field])).toUpperCase().includes(search)));
+ }
+ else {
+ return of(alarmStatusList);
+ }
+ }
+ alarmStatusSelected(event) {
+ this.addAlarmStatus(event.option.value);
+ this.clear('');
+ }
+ removeAlarmStatus(status) {
+ const alarmStatusList = this.alarmStatusConfigForm.get('alarmStatusList').value;
+ if (alarmStatusList) {
+ const index = alarmStatusList.indexOf(status);
+ if (index >= 0) {
+ alarmStatusList.splice(index, 1);
+ this.alarmStatusConfigForm.get('alarmStatusList').setValue(alarmStatusList);
+ }
+ }
+ }
+ addAlarmStatus(status) {
+ let alarmStatusList = this.alarmStatusConfigForm.get('alarmStatusList').value;
+ if (!alarmStatusList) {
+ alarmStatusList = [];
+ }
+ const index = alarmStatusList.indexOf(status);
+ if (index === -1) {
+ alarmStatusList.push(status);
+ this.alarmStatusConfigForm.get('alarmStatusList').setValue(alarmStatusList);
+ }
+ }
+ getAlarmStatusList() {
+ return this.alarmStatusList.filter((listItem) => {
+ return this.alarmStatusConfigForm.get('alarmStatusList').value.indexOf(listItem) === -1;
+ });
+ }
+ onAlarmStatusInputFocus() {
+ this.statusFormControl.updateValueAndValidity({ onlySelf: true, emitEvent: true });
+ }
+ clear(value = '') {
+ this.alarmStatusInput.nativeElement.value = value;
+ this.statusFormControl.patchValue(null, { emitEvent: true });
+ setTimeout(() => {
+ this.alarmStatusInput.nativeElement.blur();
+ this.alarmStatusInput.nativeElement.focus();
+ }, 0);
+ }
+}
+CheckAlarmStatusComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckAlarmStatusComponent, deps: [{ token: i1.Store }, { token: i4.TranslateService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CheckAlarmStatusComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CheckAlarmStatusComponent, selector: "tb-filter-node-check-alarm-status-config", viewQueries: [{ propertyName: "alarmStatusInput", first: true, predicate: ["alarmStatusInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n \n tb.rulenode.alarm-status-filter\n \n \n \n {{alarmStatusTranslationsMap.get(alarmStatus) | translate}}\n \n close\n \n \n \n \n \n \n \n \n \n
\n tb.rulenode.no-alarm-status-matching\n
\n
\n \n \n \n \n \n\n\n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9.TbErrorComponent, selector: "tb-error", inputs: ["error"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i7$5.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe, "async": i10.AsyncPipe, "highlight": i12$1.HighlightPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckAlarmStatusComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-check-alarm-status-config',
+ templateUrl: './check-alarm-status.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i4.TranslateService }, { type: i2.FormBuilder }]; }, propDecorators: { alarmStatusInput: [{
+ type: ViewChild,
+ args: ['alarmStatusInput', { static: false }]
+ }] } });
+
+class CheckMessageConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.separatorKeysCodes = [ENTER, COMMA, SEMICOLON];
+ }
+ configForm() {
+ return this.checkMessageConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.checkMessageConfigForm = this.fb.group({
+ messageNames: [configuration ? configuration.messageNames : null, []],
+ metadataNames: [configuration ? configuration.metadataNames : null, []],
+ checkAllKeys: [configuration ? configuration.checkAllKeys : false, []],
+ });
+ }
+ validateConfig() {
+ const messageNames = this.checkMessageConfigForm.get('messageNames').value;
+ const metadataNames = this.checkMessageConfigForm.get('metadataNames').value;
+ return messageNames.length > 0 || metadataNames.length > 0;
+ }
+ removeMessageName(messageName) {
+ const messageNames = this.checkMessageConfigForm.get('messageNames').value;
+ const index = messageNames.indexOf(messageName);
+ if (index >= 0) {
+ messageNames.splice(index, 1);
+ this.checkMessageConfigForm.get('messageNames').setValue(messageNames, { emitEvent: true });
+ }
+ }
+ removeMetadataName(metadataName) {
+ const metadataNames = this.checkMessageConfigForm.get('metadataNames').value;
+ const index = metadataNames.indexOf(metadataName);
+ if (index >= 0) {
+ metadataNames.splice(index, 1);
+ this.checkMessageConfigForm.get('metadataNames').setValue(metadataNames, { emitEvent: true });
+ }
+ }
+ addMessageName(event) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let messageNames = this.checkMessageConfigForm.get('messageNames').value;
+ if (!messageNames || messageNames.indexOf(value) === -1) {
+ if (!messageNames) {
+ messageNames = [];
+ }
+ messageNames.push(value);
+ this.checkMessageConfigForm.get('messageNames').setValue(messageNames, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+ addMetadataName(event) {
+ const input = event.input;
+ let value = event.value;
+ if ((value || '').trim()) {
+ value = value.trim();
+ let metadataNames = this.checkMessageConfigForm.get('metadataNames').value;
+ if (!metadataNames || metadataNames.indexOf(value) === -1) {
+ if (!metadataNames) {
+ metadataNames = [];
+ }
+ metadataNames.push(value);
+ this.checkMessageConfigForm.get('metadataNames').setValue(metadataNames, { emitEvent: true });
+ }
+ }
+ if (input) {
+ input.value = '';
+ }
+ }
+}
+CheckMessageConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckMessageConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CheckMessageConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CheckMessageConfigComponent, selector: "tb-filter-node-check-message-config", usesInheritance: true, ngImport: i0, template: "\n", styles: [":host label.tb-title{margin-bottom:-10px}\n"], components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$2.MatChipList, selector: "mat-chip-list", inputs: ["aria-orientation", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "selectable", "tabIndex", "errorStateMatcher"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i5$2.MatChipRemove, selector: "[matChipRemove]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i5$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputSeparatorKeyCodes", "placeholder", "id", "matChipInputFor", "matChipInputAddOnBlur", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckMessageConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-check-message-config',
+ templateUrl: './check-message-config.component.html',
+ styleUrls: ['./check-message-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class CheckRelationConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.entitySearchDirection = Object.keys(EntitySearchDirection);
+ this.entitySearchDirectionTranslationsMap = entitySearchDirectionTranslations;
+ }
+ configForm() {
+ return this.checkRelationConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.checkRelationConfigForm = this.fb.group({
+ checkForSingleEntity: [configuration ? configuration.checkForSingleEntity : false, []],
+ direction: [configuration ? configuration.direction : null, []],
+ entityType: [configuration ? configuration.entityType : null,
+ configuration && configuration.checkForSingleEntity ? [Validators.required] : []],
+ entityId: [configuration ? configuration.entityId : null,
+ configuration && configuration.checkForSingleEntity ? [Validators.required] : []],
+ relationType: [configuration ? configuration.relationType : null, [Validators.required]]
+ });
+ }
+ validatorTriggers() {
+ return ['checkForSingleEntity'];
+ }
+ updateValidators(emitEvent) {
+ const checkForSingleEntity = this.checkRelationConfigForm.get('checkForSingleEntity').value;
+ this.checkRelationConfigForm.get('entityType').setValidators(checkForSingleEntity ? [Validators.required] : []);
+ this.checkRelationConfigForm.get('entityType').updateValueAndValidity({ emitEvent });
+ this.checkRelationConfigForm.get('entityId').setValidators(checkForSingleEntity ? [Validators.required] : []);
+ this.checkRelationConfigForm.get('entityId').updateValueAndValidity({ emitEvent });
+ }
+}
+CheckRelationConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckRelationConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+CheckRelationConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: CheckRelationConfigComponent, selector: "tb-filter-node-check-relation-config", usesInheritance: true, ngImport: i0, template: "\n \n {{ 'tb.rulenode.check-relation-to-specific-entity' | translate }}\n \n tb.rulenode.check-relation-hint
\n \n relation.direction\n \n \n {{ entitySearchDirectionTranslationsMap.get(direction) | translate }}\n \n \n \n \n \n \n \n \n
\n \n \n\n", components: [{ type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7$1.EntityTypeSelectComponent, selector: "tb-entity-type-select", inputs: ["allowedEntityTypes", "useAliasEntityTypes", "showLabel", "required", "disabled"] }, { type: i8$3.EntityAutocompleteComponent, selector: "tb-entity-autocomplete", inputs: ["entityType", "entitySubtype", "excludeEntityIds", "labelText", "requiredText", "required", "disabled"], outputs: ["entityChanged"] }, { type: i7$3.RelationTypeAutocompleteComponent, selector: "tb-relation-type-autocomplete", inputs: ["required", "disabled"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: CheckRelationConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-check-relation-config',
+ templateUrl: './check-relation-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class GpsGeoFilterConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.perimeterType = PerimeterType;
+ this.perimeterTypes = Object.keys(PerimeterType);
+ this.perimeterTypeTranslationMap = perimeterTypeTranslations;
+ this.rangeUnits = Object.keys(RangeUnit);
+ this.rangeUnitTranslationMap = rangeUnitTranslations;
+ }
+ configForm() {
+ return this.geoFilterConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.geoFilterConfigForm = this.fb.group({
+ latitudeKeyName: [configuration ? configuration.latitudeKeyName : null, [Validators.required]],
+ longitudeKeyName: [configuration ? configuration.longitudeKeyName : null, [Validators.required]],
+ fetchPerimeterInfoFromMessageMetadata: [configuration ? configuration.fetchPerimeterInfoFromMessageMetadata : false, []],
+ perimeterType: [configuration ? configuration.perimeterType : null, []],
+ centerLatitude: [configuration ? configuration.centerLatitude : null, []],
+ centerLongitude: [configuration ? configuration.centerLatitude : null, []],
+ range: [configuration ? configuration.range : null, []],
+ rangeUnit: [configuration ? configuration.rangeUnit : null, []],
+ polygonsDefinition: [configuration ? configuration.polygonsDefinition : null, []]
+ });
+ }
+ validatorTriggers() {
+ return ['fetchPerimeterInfoFromMessageMetadata', 'perimeterType'];
+ }
+ updateValidators(emitEvent) {
+ const fetchPerimeterInfoFromMessageMetadata = this.geoFilterConfigForm.get('fetchPerimeterInfoFromMessageMetadata').value;
+ const perimeterType = this.geoFilterConfigForm.get('perimeterType').value;
+ if (fetchPerimeterInfoFromMessageMetadata) {
+ this.geoFilterConfigForm.get('perimeterType').setValidators([]);
+ }
+ else {
+ this.geoFilterConfigForm.get('perimeterType').setValidators([Validators.required]);
+ }
+ if (!fetchPerimeterInfoFromMessageMetadata && perimeterType === PerimeterType.CIRCLE) {
+ this.geoFilterConfigForm.get('centerLatitude').setValidators([Validators.required,
+ Validators.min(-90), Validators.max(90)]);
+ this.geoFilterConfigForm.get('centerLongitude').setValidators([Validators.required,
+ Validators.min(-180), Validators.max(180)]);
+ this.geoFilterConfigForm.get('range').setValidators([Validators.required, Validators.min(0)]);
+ this.geoFilterConfigForm.get('rangeUnit').setValidators([Validators.required]);
+ }
+ else {
+ this.geoFilterConfigForm.get('centerLatitude').setValidators([]);
+ this.geoFilterConfigForm.get('centerLongitude').setValidators([]);
+ this.geoFilterConfigForm.get('range').setValidators([]);
+ this.geoFilterConfigForm.get('rangeUnit').setValidators([]);
+ }
+ if (!fetchPerimeterInfoFromMessageMetadata && perimeterType === PerimeterType.POLYGON) {
+ this.geoFilterConfigForm.get('polygonsDefinition').setValidators([Validators.required]);
+ }
+ else {
+ this.geoFilterConfigForm.get('polygonsDefinition').setValidators([]);
+ }
+ this.geoFilterConfigForm.get('perimeterType').updateValueAndValidity({ emitEvent: false });
+ this.geoFilterConfigForm.get('centerLatitude').updateValueAndValidity({ emitEvent });
+ this.geoFilterConfigForm.get('centerLongitude').updateValueAndValidity({ emitEvent });
+ this.geoFilterConfigForm.get('range').updateValueAndValidity({ emitEvent });
+ this.geoFilterConfigForm.get('rangeUnit').updateValueAndValidity({ emitEvent });
+ this.geoFilterConfigForm.get('polygonsDefinition').updateValueAndValidity({ emitEvent });
+ }
+}
+GpsGeoFilterConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GpsGeoFilterConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+GpsGeoFilterConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: GpsGeoFilterConfigComponent, selector: "tb-filter-node-gps-geofencing-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: GpsGeoFilterConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-gps-geofencing-config',
+ templateUrl: './gps-geo-filter-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class MessageTypeConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.messageTypeConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.messageTypeConfigForm = this.fb.group({
+ messageTypes: [configuration ? configuration.messageTypes : null, [Validators.required]]
+ });
+ }
+}
+MessageTypeConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MessageTypeConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+MessageTypeConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: MessageTypeConfigComponent, selector: "tb-filter-node-message-type-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: MessageTypesConfigComponent, selector: "tb-message-types-config", inputs: ["required", "label", "placeholder", "disabled"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: MessageTypeConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-message-type-config',
+ templateUrl: './message-type-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class OriginatorTypeConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.allowedEntityTypes = [
+ EntityType.DEVICE,
+ EntityType.ASSET,
+ EntityType.ENTITY_VIEW,
+ EntityType.TENANT,
+ EntityType.CUSTOMER,
+ EntityType.USER,
+ EntityType.DASHBOARD,
+ EntityType.RULE_CHAIN,
+ EntityType.RULE_NODE
+ ];
+ }
+ configForm() {
+ return this.originatorTypeConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.originatorTypeConfigForm = this.fb.group({
+ originatorTypes: [configuration ? configuration.originatorTypes : null, [Validators.required]]
+ });
+ }
+}
+OriginatorTypeConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorTypeConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+OriginatorTypeConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: OriginatorTypeConfigComponent, selector: "tb-filter-node-originator-type-config", usesInheritance: true, ngImport: i0, template: "\n \n \n \n\n", styles: [":host ::ng-deep tb-entity-type-list .mat-form-field-flex{padding-top:0}:host ::ng-deep tb-entity-type-list .mat-form-field-infix{border-top:0}\n"], components: [{ type: i3$5.EntityTypeListComponent, selector: "tb-entity-type-list", inputs: ["required", "disabled", "allowedEntityTypes", "ignoreAuthorityFilter"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: OriginatorTypeConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-originator-type-config',
+ templateUrl: './originator-type-config.component.html',
+ styleUrls: ['./originator-type-config.component.scss']
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class ScriptConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.scriptConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.scriptConfigForm = this.fb.group({
+ jsScript: [configuration ? configuration.jsScript : null, [Validators.required]]
+ });
+ }
+ testScript() {
+ const script = this.scriptConfigForm.get('jsScript').value;
+ this.nodeScriptTestService.testNodeScript(script, 'filter', this.translate.instant('tb.rulenode.filter'), 'Filter', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/filter_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.scriptConfigForm.get('jsScript').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+ScriptConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ScriptConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+ScriptConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: ScriptConfigComponent, selector: "tb-filter-node-script-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ScriptConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-script-config',
+ templateUrl: './script-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class SwitchConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.switchConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.switchConfigForm = this.fb.group({
+ jsScript: [configuration ? configuration.jsScript : null, [Validators.required]]
+ });
+ }
+ testScript() {
+ const script = this.switchConfigForm.get('jsScript').value;
+ this.nodeScriptTestService.testNodeScript(script, 'switch', this.translate.instant('tb.rulenode.switch'), 'Switch', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/switch_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.switchConfigForm.get('jsScript').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+SwitchConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SwitchConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+SwitchConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: SwitchConfigComponent, selector: "tb-filter-node-switch-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: SwitchConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-filter-node-switch-config',
+ templateUrl: './switch-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class RuleNodeCoreConfigFilterModule {
+}
+RuleNodeCoreConfigFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RuleNodeCoreConfigFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFilterModule, declarations: [CheckMessageConfigComponent,
+ CheckRelationConfigComponent,
+ GpsGeoFilterConfigComponent,
+ MessageTypeConfigComponent,
+ OriginatorTypeConfigComponent,
+ ScriptConfigComponent,
+ SwitchConfigComponent,
+ CheckAlarmStatusComponent], imports: [CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule], exports: [CheckMessageConfigComponent,
+ CheckRelationConfigComponent,
+ GpsGeoFilterConfigComponent,
+ MessageTypeConfigComponent,
+ OriginatorTypeConfigComponent,
+ ScriptConfigComponent,
+ SwitchConfigComponent,
+ CheckAlarmStatusComponent] });
+RuleNodeCoreConfigFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFilterModule, imports: [[
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFilterModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ CheckMessageConfigComponent,
+ CheckRelationConfigComponent,
+ GpsGeoFilterConfigComponent,
+ MessageTypeConfigComponent,
+ OriginatorTypeConfigComponent,
+ ScriptConfigComponent,
+ SwitchConfigComponent,
+ CheckAlarmStatusComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ],
+ exports: [
+ CheckMessageConfigComponent,
+ CheckRelationConfigComponent,
+ GpsGeoFilterConfigComponent,
+ MessageTypeConfigComponent,
+ OriginatorTypeConfigComponent,
+ ScriptConfigComponent,
+ SwitchConfigComponent,
+ CheckAlarmStatusComponent
+ ]
+ }]
+ }] });
+
+class ChangeOriginatorConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.originatorSource = OriginatorSource;
+ this.originatorSources = Object.keys(OriginatorSource);
+ this.originatorSourceTranslationMap = originatorSourceTranslations;
+ }
+ configForm() {
+ return this.changeOriginatorConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.changeOriginatorConfigForm = this.fb.group({
+ originatorSource: [configuration ? configuration.originatorSource : null, [Validators.required]],
+ relationsQuery: [configuration ? configuration.relationsQuery : null, []]
+ });
+ }
+ validatorTriggers() {
+ return ['originatorSource'];
+ }
+ updateValidators(emitEvent) {
+ const originatorSource = this.changeOriginatorConfigForm.get('originatorSource').value;
+ if (originatorSource && originatorSource === OriginatorSource.RELATED) {
+ this.changeOriginatorConfigForm.get('relationsQuery').setValidators([Validators.required]);
+ }
+ else {
+ this.changeOriginatorConfigForm.get('relationsQuery').setValidators([]);
+ }
+ this.changeOriginatorConfigForm.get('relationsQuery').updateValueAndValidity({ emitEvent });
+ }
+}
+ChangeOriginatorConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ChangeOriginatorConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+ChangeOriginatorConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: ChangeOriginatorConfigComponent, selector: "tb-transformation-node-change-originator-config", usesInheritance: true, ngImport: i0, template: "\n \n tb.rulenode.originator-source\n \n \n {{ originatorSourceTranslationMap.get(source) | translate }}\n \n \n \n \n \n \n \n \n\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: RelationsQueryConfigComponent, selector: "tb-relations-query-config", inputs: ["disabled", "required"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ChangeOriginatorConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-transformation-node-change-originator-config',
+ templateUrl: './change-originator-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class TransformScriptConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb, nodeScriptTestService, translate) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.nodeScriptTestService = nodeScriptTestService;
+ this.translate = translate;
+ }
+ configForm() {
+ return this.scriptConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.scriptConfigForm = this.fb.group({
+ jsScript: [configuration ? configuration.jsScript : null, [Validators.required]]
+ });
+ }
+ testScript() {
+ const script = this.scriptConfigForm.get('jsScript').value;
+ this.nodeScriptTestService.testNodeScript(script, 'update', this.translate.instant('tb.rulenode.transformer'), 'Transform', ['msg', 'metadata', 'msgType'], this.ruleNodeId, 'rulenode/transformation_node_script_fn').subscribe((theScript) => {
+ if (theScript) {
+ this.scriptConfigForm.get('jsScript').setValue(theScript);
+ }
+ });
+ }
+ onValidate() {
+ this.jsFuncComponent.validateOnSubmit();
+ }
+}
+TransformScriptConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TransformScriptConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }, { token: i3$3.NodeScriptTestService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
+TransformScriptConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: TransformScriptConfigComponent, selector: "tb-transformation-node-script-config", viewQueries: [{ propertyName: "jsFuncComponent", first: true, predicate: ["jsFuncComponent"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "\n \n \n \n \n \n
\n\n", components: [{ type: i5$1.JsFuncComponent, selector: "tb-js-func", inputs: ["functionName", "functionArgs", "validationArgs", "resultType", "disabled", "fillHeight", "editorCompleter", "globalVariables", "disableUndefinedCheck", "helpId", "noValidate", "required"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: TransformScriptConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-transformation-node-script-config',
+ templateUrl: './script-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }, { type: i3$3.NodeScriptTestService }, { type: i4.TranslateService }]; }, propDecorators: { jsFuncComponent: [{
+ type: ViewChild,
+ args: ['jsFuncComponent', { static: true }]
+ }] } });
+
+class ToEmailConfigComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.mailBodyTypes = [
+ { name: 'tb.mail-body-type.plain-text', value: 'false' },
+ { name: 'tb.mail-body-type.html', value: 'true' },
+ { name: 'tb.mail-body-type.dynamic', value: 'dynamic' }
+ ];
+ }
+ configForm() {
+ return this.toEmailConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.toEmailConfigForm = this.fb.group({
+ fromTemplate: [configuration ? configuration.fromTemplate : null, [Validators.required]],
+ toTemplate: [configuration ? configuration.toTemplate : null, [Validators.required]],
+ ccTemplate: [configuration ? configuration.ccTemplate : null, []],
+ bccTemplate: [configuration ? configuration.bccTemplate : null, []],
+ subjectTemplate: [configuration ? configuration.subjectTemplate : null, [Validators.required]],
+ mailBodyType: [configuration ? configuration.mailBodyType : null],
+ isHtmlTemplate: [configuration ? configuration.isHtmlTemplate : null],
+ bodyTemplate: [configuration ? configuration.bodyTemplate : null, [Validators.required]],
+ });
+ this.toEmailConfigForm.get('mailBodyType').valueChanges.pipe(startWith([configuration === null || configuration === void 0 ? void 0 : configuration.subjectTemplate])).subscribe((mailBodyType) => {
+ if (mailBodyType === 'dynamic') {
+ this.toEmailConfigForm.get('isHtmlTemplate').patchValue('', { emitEvent: false });
+ this.toEmailConfigForm.get('isHtmlTemplate').setValidators(Validators.required);
+ }
+ else {
+ this.toEmailConfigForm.get('isHtmlTemplate').clearValidators();
+ }
+ this.toEmailConfigForm.get('isHtmlTemplate').updateValueAndValidity();
+ });
+ }
+}
+ToEmailConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ToEmailConfigComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+ToEmailConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: ToEmailConfigComponent, selector: "tb-transformation-node-to-email-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.MatLabel, selector: "mat-label" }, { type: i4.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe, "safeHtml": SafeHtmlPipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: ToEmailConfigComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-transformation-node-to-email-config',
+ templateUrl: './to-email-config.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RulenodeCoreConfigTransformModule {
+}
+RulenodeCoreConfigTransformModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigTransformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RulenodeCoreConfigTransformModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigTransformModule, declarations: [ChangeOriginatorConfigComponent,
+ TransformScriptConfigComponent,
+ ToEmailConfigComponent], imports: [CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule], exports: [ChangeOriginatorConfigComponent,
+ TransformScriptConfigComponent,
+ ToEmailConfigComponent] });
+RulenodeCoreConfigTransformModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigTransformModule, imports: [[
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RulenodeCoreConfigTransformModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ ChangeOriginatorConfigComponent,
+ TransformScriptConfigComponent,
+ ToEmailConfigComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ],
+ exports: [
+ ChangeOriginatorConfigComponent,
+ TransformScriptConfigComponent,
+ ToEmailConfigComponent
+ ]
+ }]
+ }] });
+
+class RuleChainInputComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ this.entityType = EntityType;
+ }
+ configForm() {
+ return this.ruleChainInputConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.ruleChainInputConfigForm = this.fb.group({
+ ruleChainId: [configuration ? configuration.ruleChainId : null, [Validators.required]]
+ });
+ }
+}
+RuleChainInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleChainInputComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RuleChainInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RuleChainInputComponent, selector: "tb-flow-node-rule-chain-input-config", usesInheritance: true, ngImport: i0, template: "\n", components: [{ type: i8$3.EntityAutocompleteComponent, selector: "tb-entity-autocomplete", inputs: ["entityType", "entitySubtype", "excludeEntityIds", "labelText", "requiredText", "required", "disabled"], outputs: ["entityChanged"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleChainInputComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-flow-node-rule-chain-input-config',
+ templateUrl: './rule-chain-input.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RuleChainOutputComponent extends RuleNodeConfigurationComponent {
+ constructor(store, fb) {
+ super(store);
+ this.store = store;
+ this.fb = fb;
+ }
+ configForm() {
+ return this.ruleChainOutputConfigForm;
+ }
+ onConfigurationSet(configuration) {
+ this.ruleChainOutputConfigForm = this.fb.group({});
+ }
+}
+RuleChainOutputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleChainOutputComponent, deps: [{ token: i1.Store }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
+RuleChainOutputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.14", type: RuleChainOutputComponent, selector: "tb-flow-node-rule-chain-output-config", usesInheritance: true, ngImport: i0, template: "\n", directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "translate": i4.TranslatePipe } });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleChainOutputComponent, decorators: [{
+ type: Component,
+ args: [{
+ selector: 'tb-flow-node-rule-chain-output-config',
+ templateUrl: './rule-chain-output.component.html',
+ styleUrls: []
+ }]
+ }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.FormBuilder }]; } });
+
+class RuleNodeCoreConfigFlowModule {
+}
+RuleNodeCoreConfigFlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
+RuleNodeCoreConfigFlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFlowModule, declarations: [RuleChainInputComponent,
+ RuleChainOutputComponent], imports: [CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule], exports: [RuleChainInputComponent,
+ RuleChainOutputComponent] });
+RuleNodeCoreConfigFlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFlowModule, imports: [[
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ]] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigFlowModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ RuleChainInputComponent,
+ RuleChainOutputComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ RulenodeCoreConfigCommonModule
+ ],
+ exports: [
+ RuleChainInputComponent,
+ RuleChainOutputComponent
+ ]
+ }]
+ }] });
+
+function addRuleNodeCoreLocaleEnglish(translate) {
+ const enUS = {
+ tb: {
+ rulenode: {
+ 'create-entity-if-not-exists': 'Create new entity if not exists',
+ 'create-entity-if-not-exists-hint': 'Create a new entity set above if it does not exist.',
+ 'entity-name-pattern': 'Name pattern',
+ 'entity-name-pattern-required': 'Name pattern is required',
+ 'entity-type-pattern': 'Type pattern',
+ 'entity-type-pattern-required': 'Type pattern is required',
+ 'entity-cache-expiration': 'Entities cache expiration time (sec)',
+ 'entity-cache-expiration-hint': 'Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.',
+ 'entity-cache-expiration-required': 'Entities cache expiration time is required.',
+ 'entity-cache-expiration-range': 'Entities cache expiration time should be greater than or equal to 0.',
+ 'customer-name-pattern': 'Customer name pattern',
+ 'customer-name-pattern-required': 'Customer name pattern is required',
+ 'create-customer-if-not-exists': 'Create new customer if not exists',
+ 'customer-cache-expiration': 'Customers cache expiration time (sec)',
+ 'customer-cache-expiration-hint': 'Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.',
+ 'customer-cache-expiration-required': 'Customers cache expiration time is required.',
+ 'customer-cache-expiration-range': 'Customers cache expiration time should be greater than or equal to 0.',
+ 'start-interval': 'Start Interval',
+ 'end-interval': 'End Interval',
+ 'start-interval-time-unit': 'Start Interval Time Unit',
+ 'end-interval-time-unit': 'End Interval Time Unit',
+ 'fetch-mode': 'Fetch mode',
+ 'fetch-mode-hint': 'If selected fetch mode \'ALL\' you able to choose telemetry sampling order.',
+ 'order-by': 'Order by',
+ 'order-by-hint': 'Select to choose telemetry sampling order.',
+ limit: 'Limit',
+ 'limit-hint': 'Min limit value is 2, max - 1000. In case you want to fetch a single entry, ' +
+ 'select fetch mode \'FIRST\' or \'LAST\'.',
+ 'time-unit-milliseconds': 'Milliseconds',
+ 'time-unit-seconds': 'Seconds',
+ 'time-unit-minutes': 'Minutes',
+ 'time-unit-hours': 'Hours',
+ 'time-unit-days': 'Days',
+ 'time-value-range': 'Time value should be in a range from 1 to 2147483647.',
+ 'start-interval-value-required': 'Start interval value is required.',
+ 'end-interval-value-required': 'End interval value is required.',
+ filter: 'Filter',
+ switch: 'Switch',
+ 'message-type': 'Message type',
+ 'message-type-required': 'Message type is required.',
+ 'message-types-filter': 'Message types filter',
+ 'no-message-types-found': 'No message types found',
+ 'no-message-type-matching': '\'{{messageType}}\' not found.',
+ 'create-new-message-type': 'Create a new one!',
+ 'message-types-required': 'Message types are required.',
+ 'client-attributes': 'Client attributes',
+ 'shared-attributes': 'Shared attributes',
+ 'server-attributes': 'Server attributes',
+ 'notify-device': 'Notify Device',
+ 'notify-device-hint': 'If the message arrives from the device, we will push it back to the device by default.',
+ 'latest-timeseries': 'Latest timeseries',
+ 'timeseries-key': 'Timeseries key',
+ 'data-keys': 'Message data',
+ 'metadata-keys': 'Message metadata',
+ 'relations-query': 'Relations query',
+ 'device-relations-query': 'Device relations query',
+ 'max-relation-level': 'Max relation level',
+ 'relation-type-pattern': 'Relation type pattern',
+ 'relation-type-pattern-required': 'Relation type pattern is required',
+ 'relation-types-list': 'Relation types to propagate',
+ 'relation-types-list-hint': 'If Propagate relation types are not selected, ' +
+ 'alarms will be propagated without filtering by relation type.',
+ 'unlimited-level': 'Unlimited level',
+ 'latest-telemetry': 'Latest telemetry',
+ 'attr-mapping': 'Attributes mapping',
+ 'source-attribute': 'Source attribute',
+ 'source-attribute-required': 'Source attribute is required.',
+ 'source-telemetry': 'Source telemetry',
+ 'source-telemetry-required': 'Source telemetry is required.',
+ 'target-attribute': 'Target attribute',
+ 'target-attribute-required': 'Target attribute is required.',
+ 'attr-mapping-required': 'At least one attribute mapping should be specified.',
+ 'fields-mapping': 'Fields mapping',
+ 'fields-mapping-required': 'At least one field mapping should be specified.',
+ 'source-field': 'Source field',
+ 'source-field-required': 'Source field is required.',
+ 'originator-source': 'Originator source',
+ 'originator-customer': 'Customer',
+ 'originator-tenant': 'Tenant',
+ 'originator-related': 'Related',
+ 'originator-alarm-originator': 'Alarm Originator',
+ 'clone-message': 'Clone message',
+ transform: 'Transform',
+ 'default-ttl': 'Default TTL in seconds',
+ 'default-ttl-required': 'Default TTL is required.',
+ 'min-default-ttl-message': 'Only 0 minimum TTL is allowed.',
+ 'message-count': 'Message count (0 - unlimited)',
+ 'message-count-required': 'Message count is required.',
+ 'min-message-count-message': 'Only 0 minimum message count is allowed.',
+ 'period-seconds': 'Period in seconds',
+ 'period-seconds-required': 'Period is required.',
+ 'use-metadata-period-in-seconds-patterns': 'Use period in seconds pattern',
+ 'use-metadata-period-in-seconds-patterns-hint': 'If selected, rule node use period in seconds interval pattern from message metadata or data ' +
+ 'assuming that intervals are in the seconds.',
+ 'period-in-seconds-pattern': 'Period in seconds pattern',
+ 'period-in-seconds-pattern-required': 'Period in seconds pattern is required',
+ 'min-period-seconds-message': 'Only 1 second minimum period is allowed.',
+ originator: 'Originator',
+ 'message-body': 'Message body',
+ 'message-metadata': 'Message metadata',
+ generate: 'Generate',
+ 'test-generator-function': 'Test generator function',
+ generator: 'Generator',
+ 'test-filter-function': 'Test filter function',
+ 'test-switch-function': 'Test switch function',
+ 'test-transformer-function': 'Test transformer function',
+ transformer: 'Transformer',
+ 'alarm-create-condition': 'Alarm create condition',
+ 'test-condition-function': 'Test condition function',
+ 'alarm-clear-condition': 'Alarm clear condition',
+ 'alarm-details-builder': 'Alarm details builder',
+ 'test-details-function': 'Test details function',
+ 'alarm-type': 'Alarm type',
+ 'alarm-type-required': 'Alarm type is required.',
+ 'alarm-severity': 'Alarm severity',
+ 'alarm-severity-required': 'Alarm severity is required',
+ 'alarm-status-filter': 'Alarm status filter',
+ 'alarm-status-list-empty': 'Alarm status list is empty',
+ 'no-alarm-status-matching': 'No alarm status matching were found.',
+ propagate: 'Propagate',
+ condition: 'Condition',
+ details: 'Details',
+ 'to-string': 'To string',
+ 'test-to-string-function': 'Test to string function',
+ 'from-template': 'From Template',
+ 'from-template-required': 'From Template is required',
+ 'to-template': 'To Template',
+ 'to-template-required': 'To Template is required',
+ 'mail-address-list-template-hint': 'Comma separated address list, use ${metadataKey' +
+ '} for value from metadata, $[messageKey' +
+ '] for value from message body',
+ 'cc-template': 'Cc Template',
+ 'bcc-template': 'Bcc Template',
+ 'subject-template': 'Subject Template',
+ 'subject-template-required': 'Subject Template is required',
+ 'body-template': 'Body Template',
+ 'body-template-required': 'Body Template is required',
+ 'dynamic-mail-body-type': 'Dynamic mail body type',
+ 'mail-body-type': 'Mail body type',
+ 'request-id-metadata-attribute': 'Request Id Metadata attribute name',
+ 'timeout-sec': 'Timeout in seconds',
+ 'timeout-required': 'Timeout is required',
+ 'min-timeout-message': 'Only 0 minimum timeout value is allowed.',
+ 'endpoint-url-pattern': 'Endpoint URL pattern',
+ 'endpoint-url-pattern-required': 'Endpoint URL pattern is required',
+ 'request-method': 'Request method',
+ 'use-simple-client-http-factory': 'Use simple client HTTP factory',
+ 'ignore-request-body': 'Without request body',
+ 'read-timeout': 'Read timeout in millis',
+ 'read-timeout-hint': 'The value of 0 means an infinite timeout',
+ 'max-parallel-requests-count': 'Max number of parallel requests',
+ 'max-parallel-requests-count-hint': 'The value of 0 specifies no limit in parallel processing',
+ headers: 'Headers',
+ 'headers-hint': 'Use ${metadataKey} ' +
+ 'for value from metadata, $[messageKey] ' +
+ 'for value from message body in header/value fields',
+ header: 'Header',
+ 'header-required': 'Header is required',
+ value: 'Value',
+ 'value-required': 'Value is required',
+ 'topic-pattern': 'Topic pattern',
+ 'topic-pattern-required': 'Topic pattern is required',
+ topic: 'Topic',
+ 'topic-required': 'Topic is required',
+ 'bootstrap-servers': 'Bootstrap servers',
+ 'bootstrap-servers-required': 'Bootstrap servers value is required',
+ 'other-properties': 'Other properties',
+ key: 'Key',
+ 'key-required': 'Key is required',
+ retries: 'Automatically retry times if fails',
+ 'min-retries-message': 'Only 0 minimum retries is allowed.',
+ 'batch-size-bytes': 'Produces batch size in bytes',
+ 'min-batch-size-bytes-message': 'Only 0 minimum batch size is allowed.',
+ 'linger-ms': 'Time to buffer locally (ms)',
+ 'min-linger-ms-message': 'Only 0 ms minimum value is allowed.',
+ 'buffer-memory-bytes': 'Client buffer max size in bytes',
+ 'min-buffer-memory-message': 'Only 0 minimum buffer size is allowed.',
+ acks: 'Number of acknowledgments',
+ 'key-serializer': 'Key serializer',
+ 'key-serializer-required': 'Key serializer is required',
+ 'value-serializer': 'Value serializer',
+ 'value-serializer-required': 'Value serializer is required',
+ 'topic-arn-pattern': 'Topic ARN pattern',
+ 'topic-arn-pattern-required': 'Topic ARN pattern is required',
+ 'aws-access-key-id': 'AWS Access Key ID',
+ 'aws-access-key-id-required': 'AWS Access Key ID is required',
+ 'aws-secret-access-key': 'AWS Secret Access Key',
+ 'aws-secret-access-key-required': 'AWS Secret Access Key is required',
+ 'aws-region': 'AWS Region',
+ 'aws-region-required': 'AWS Region is required',
+ 'exchange-name-pattern': 'Exchange name pattern',
+ 'routing-key-pattern': 'Routing key pattern',
+ 'message-properties': 'Message properties',
+ host: 'Host',
+ 'host-required': 'Host is required',
+ port: 'Port',
+ 'port-required': 'Port is required',
+ 'port-range': 'Port should be in a range from 1 to 65535.',
+ 'virtual-host': 'Virtual host',
+ username: 'Username',
+ password: 'Password',
+ 'automatic-recovery': 'Automatic recovery',
+ 'connection-timeout-ms': 'Connection timeout (ms)',
+ 'min-connection-timeout-ms-message': 'Only 0 ms minimum value is allowed.',
+ 'handshake-timeout-ms': 'Handshake timeout (ms)',
+ 'min-handshake-timeout-ms-message': 'Only 0 ms minimum value is allowed.',
+ 'client-properties': 'Client properties',
+ 'queue-url-pattern': 'Queue URL pattern',
+ 'queue-url-pattern-required': 'Queue URL pattern is required',
+ 'delay-seconds': 'Delay (seconds)',
+ 'min-delay-seconds-message': 'Only 0 seconds minimum value is allowed.',
+ 'max-delay-seconds-message': 'Only 900 seconds maximum value is allowed.',
+ name: 'Name',
+ 'name-required': 'Name is required',
+ 'queue-type': 'Queue type',
+ 'sqs-queue-standard': 'Standard',
+ 'sqs-queue-fifo': 'FIFO',
+ 'gcp-project-id': 'GCP project ID',
+ 'gcp-project-id-required': 'GCP project ID is required',
+ 'gcp-service-account-key': 'GCP service account key file',
+ 'gcp-service-account-key-required': 'GCP service account key file is required',
+ 'pubsub-topic-name': 'Topic name',
+ 'pubsub-topic-name-required': 'Topic name is required',
+ 'message-attributes': 'Message attributes',
+ 'message-attributes-hint': 'Use ${metadataKey} ' +
+ 'for value from metadata, $[messageKey] ' +
+ 'for value from message body in name/value fields',
+ 'connect-timeout': 'Connection timeout (sec)',
+ 'connect-timeout-required': 'Connection timeout is required.',
+ 'connect-timeout-range': 'Connection timeout should be in a range from 1 to 200.',
+ 'client-id': 'Client ID',
+ 'client-id-hint': 'Hint: Optional. Leave empty for auto-generated client id. Be careful when specifying the Client ID.' +
+ 'Majority of the MQTT brokers will not allow multiple connections with the same client id. ' +
+ 'To connect to such brokers, your mqtt client id must be unique. ' +
+ 'When platform is running in a micro-services mode, the copy of rule nodeis launched in each micro-service. ' +
+ 'This will automatically lead to multiple mqtt clients with the same id and may cause failures of the rule node.',
+ 'device-id': 'Device ID',
+ 'device-id-required': 'Device ID is required.',
+ 'clean-session': 'Clean session',
+ 'enable-ssl': 'Enable SSL',
+ credentials: 'Credentials',
+ 'credentials-type': 'Credentials type',
+ 'credentials-type-required': 'Credentials type is required.',
+ 'credentials-anonymous': 'Anonymous',
+ 'credentials-basic': 'Basic',
+ 'credentials-pem': 'PEM',
+ 'credentials-pem-hint': 'At least Server CA certificate file or a pair of Client certificate and Client private key files are required',
+ 'credentials-sas': 'Shared Access Signature',
+ 'sas-key': 'SAS Key',
+ 'sas-key-required': 'SAS Key is required.',
+ hostname: 'Hostname',
+ 'hostname-required': 'Hostname is required.',
+ 'azure-ca-cert': 'CA certificate file',
+ 'username-required': 'Username is required.',
+ 'password-required': 'Password is required.',
+ 'ca-cert': 'Server CA certificate file *',
+ 'private-key': 'Client private key file *',
+ cert: 'Client certificate file *',
+ 'no-file': 'No file selected.',
+ 'drop-file': 'Drop a file or click to select a file to upload.',
+ 'private-key-password': 'Private key password',
+ 'use-system-smtp-settings': 'Use system SMTP settings',
+ 'use-metadata-interval-patterns': 'Use interval patterns',
+ 'use-metadata-interval-patterns-hint': 'If selected, rule node use start and end interval patterns from message metadata or data ' +
+ 'assuming that intervals are in the milliseconds.',
+ 'use-message-alarm-data': 'Use message alarm data',
+ 'use-dynamically-change-the-severity-of-alar': 'Use dynamically change the severity of alarm',
+ 'check-all-keys': 'Check that all selected keys are present',
+ 'check-all-keys-hint': 'If selected, checks that all specified keys are present in the message data and metadata.',
+ 'check-relation-to-specific-entity': 'Check relation to specific entity',
+ 'check-relation-hint': 'Checks existence of relation to specific entity or to any entity based on direction and relation type.',
+ 'delete-relation-to-specific-entity': 'Delete relation to specific entity',
+ 'delete-relation-hint': 'Deletes relation from the originator of the incoming message to the specified ' +
+ 'entity or list of entities based on direction and type.',
+ 'remove-current-relations': 'Remove current relations',
+ 'remove-current-relations-hint': 'Removes current relations from the originator of the incoming message based on direction and type.',
+ 'change-originator-to-related-entity': 'Change originator to related entity',
+ 'change-originator-to-related-entity-hint': 'Used to process submitted message as a message from another entity.',
+ 'start-interval-pattern': 'Start interval pattern',
+ 'end-interval-pattern': 'End interval pattern',
+ 'start-interval-pattern-required': 'Start interval pattern is required',
+ 'end-interval-pattern-required': 'End interval pattern is required',
+ 'smtp-protocol': 'Protocol',
+ 'smtp-host': 'SMTP host',
+ 'smtp-host-required': 'SMTP host is required.',
+ 'smtp-port': 'SMTP port',
+ 'smtp-port-required': 'You must supply a smtp port.',
+ 'smtp-port-range': 'SMTP port should be in a range from 1 to 65535.',
+ 'timeout-msec': 'Timeout ms',
+ 'min-timeout-msec-message': 'Only 0 ms minimum value is allowed.',
+ 'enter-username': 'Enter username',
+ 'enter-password': 'Enter password',
+ 'enable-tls': 'Enable TLS',
+ 'tls-version': 'TLS version',
+ 'enable-proxy': 'Enable proxy',
+ 'use-system-proxy-properties': 'Use system proxy properties',
+ 'proxy-host': 'Proxy host',
+ 'proxy-host-required': 'Proxy host is required.',
+ 'proxy-port': 'Proxy port',
+ 'proxy-port-required': 'Proxy port is required.',
+ 'proxy-port-range': 'Proxy port should be in a range from 1 to 65535.',
+ 'proxy-user': 'Proxy user',
+ 'proxy-password': 'Proxy password',
+ 'proxy-scheme': 'Proxy scheme',
+ 'numbers-to-template': 'Phone Numbers To Template',
+ 'numbers-to-template-required': 'Phone Numbers To Template is required',
+ 'numbers-to-template-hint': 'Comma separated Phone Numbers, use ${' +
+ 'metadataKey} for value from metadata, ' +
+ '$[messageKey] for value from message body',
+ 'sms-message-template': 'SMS message Template',
+ 'sms-message-template-required': 'SMS message Template is required',
+ 'use-system-sms-settings': 'Use system SMS provider settings',
+ 'min-period-0-seconds-message': 'Only 0 second minimum period is allowed.',
+ 'max-pending-messages': 'Maximum pending messages',
+ 'max-pending-messages-required': 'Maximum pending messages is required.',
+ 'max-pending-messages-range': 'Maximum pending messages should be in a range from 1 to 100000.',
+ 'originator-types-filter': 'Originator types filter',
+ 'interval-seconds': 'Interval in seconds',
+ 'interval-seconds-required': 'Interval is required.',
+ 'min-interval-seconds-message': 'Only 1 second minimum interval is allowed.',
+ 'output-timeseries-key-prefix': 'Output timeseries key prefix',
+ 'output-timeseries-key-prefix-required': 'Output timeseries key prefix required.',
+ 'separator-hint': 'You should press "enter" to complete field input.',
+ 'entity-details': 'Select entity details:',
+ 'entity-details-title': 'Title',
+ 'entity-details-country': 'Country',
+ 'entity-details-state': 'State',
+ 'entity-details-city': 'City',
+ 'entity-details-zip': 'Zip',
+ 'entity-details-address': 'Address',
+ 'entity-details-address2': 'Address2',
+ 'entity-details-additional_info': 'Additional Info',
+ 'entity-details-phone': 'Phone',
+ 'entity-details-email': 'Email',
+ 'add-to-metadata': 'Add selected details to message metadata',
+ 'add-to-metadata-hint': 'If selected, adds the selected details keys to the message metadata instead of message data.',
+ 'entity-details-list-empty': 'No entity details selected.',
+ 'no-entity-details-matching': 'No entity details matching were found.',
+ 'custom-table-name': 'Custom table name',
+ 'custom-table-name-required': 'Table Name is required',
+ 'custom-table-hint': 'You should enter the table name without prefix \'cs_tb_\'.',
+ 'message-field': 'Message field',
+ 'message-field-required': 'Message field is required.',
+ 'table-col': 'Table column',
+ 'table-col-required': 'Table column is required.',
+ 'latitude-key-name': 'Latitude key name',
+ 'longitude-key-name': 'Longitude key name',
+ 'latitude-key-name-required': 'Latitude key name is required.',
+ 'longitude-key-name-required': 'Longitude key name is required.',
+ 'fetch-perimeter-info-from-message-metadata': 'Fetch perimeter information from message metadata',
+ 'perimeter-circle': 'Circle',
+ 'perimeter-polygon': 'Polygon',
+ 'perimeter-type': 'Perimeter type',
+ 'circle-center-latitude': 'Center latitude',
+ 'circle-center-latitude-required': 'Center latitude is required.',
+ 'circle-center-longitude': 'Center longitude',
+ 'circle-center-longitude-required': 'Center longitude is required.',
+ 'range-unit-meter': 'Meter',
+ 'range-unit-kilometer': 'Kilometer',
+ 'range-unit-foot': 'Foot',
+ 'range-unit-mile': 'Mile',
+ 'range-unit-nautical-mile': 'Nautical mile',
+ 'range-units': 'Range units',
+ range: 'Range',
+ 'range-required': 'Range is required.',
+ 'polygon-definition': 'Polygon definition',
+ 'polygon-definition-required': 'Polygon definition is required.',
+ 'polygon-definition-hint': 'Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].',
+ 'min-inside-duration': 'Minimal inside duration',
+ 'min-inside-duration-value-required': 'Minimal inside duration is required',
+ 'min-inside-duration-time-unit': 'Minimal inside duration time unit',
+ 'min-outside-duration': 'Minimal outside duration',
+ 'min-outside-duration-value-required': 'Minimal outside duration is required',
+ 'min-outside-duration-time-unit': 'Minimal outside duration time unit',
+ 'tell-failure-if-absent': 'Tell Failure',
+ 'tell-failure-if-absent-hint': 'If at least one selected key doesn\'t exist the outbound message will report "Failure".',
+ 'get-latest-value-with-ts': 'Fetch Latest telemetry with Timestamp',
+ 'get-latest-value-with-ts-hint': 'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, ' +
+ 'e.g: "temp": "{"ts":1574329385897, "value":42}"',
+ 'use-redis-queue': 'Use redis queue for message persistence',
+ 'trim-redis-queue': 'Trim redis queue',
+ 'redis-queue-max-size': 'Redis queue max size',
+ 'add-metadata-key-values-as-kafka-headers': 'Add Message metadata key-value pairs to Kafka record headers',
+ 'add-metadata-key-values-as-kafka-headers-hint': 'If selected, key-value pairs from message metadata will be added to the outgoing records headers as byte arrays with predefined charset encoding.',
+ 'charset-encoding': 'Charset encoding',
+ 'charset-encoding-required': 'Charset encoding is required.',
+ 'charset-us-ascii': 'US-ASCII',
+ 'charset-iso-8859-1': 'ISO-8859-1',
+ 'charset-utf-8': 'UTF-8',
+ 'charset-utf-16be': 'UTF-16BE',
+ 'charset-utf-16le': 'UTF-16LE',
+ 'charset-utf-16': 'UTF-16',
+ 'select-queue-hint': 'The queue name can be selected from a drop-down list or add a custom name.',
+ 'persist-alarm-rules': 'Persist state of alarm rules',
+ 'fetch-alarm-rules': 'Fetch state of alarm rules',
+ 'input-value-key': 'Input value key',
+ 'input-value-key-required': 'Input value key is required.',
+ 'output-value-key': 'Output value key',
+ 'output-value-key-required': 'Output value key is required.',
+ round: 'Decimals',
+ 'round-range': 'Decimals should be in a range from 0 to 15.',
+ 'use-cache': 'Use cache for latest value',
+ 'tell-failure-if-delta-is-negative': 'Tell Failure if delta is negative',
+ 'add-period-between-msgs': 'Add period between messages',
+ 'period-value-key': 'Period value key',
+ 'period-key-required': 'Period value key is required.',
+ 'general-pattern-hint': 'Hint: use ${metadataKey} ' +
+ 'for value from metadata, $[messageKey] ' +
+ 'for value from message body',
+ 'alarm-severity-pattern-hint': 'Hint: use ${metadataKey} ' +
+ 'for value from metadata, $[messageKey] ' +
+ 'for value from message body. Alarm severity should be system (CRITICAL, MAJOR etc.)',
+ 'output-node-name-hint': 'The rule node name corresponds to the relation type of the output message, and it is used to forward messages to other rule nodes in the caller rule chain.'
+ },
+ 'key-val': {
+ key: 'Key',
+ value: 'Value',
+ 'remove-entry': 'Remove entry',
+ 'add-entry': 'Add entry'
+ },
+ 'mail-body-type': {
+ 'plain-text': 'Plain Text',
+ html: 'HTML',
+ dynamic: 'Dynamic'
+ }
+ }
+ };
+ translate.setTranslation('en_US', enUS, true);
+}
+
+class RuleNodeCoreConfigModule {
+ constructor(translate) {
+ addRuleNodeCoreLocaleEnglish(translate);
+ }
+}
+RuleNodeCoreConfigModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigModule, deps: [{ token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule });
+RuleNodeCoreConfigModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigModule, declarations: [EmptyConfigComponent], imports: [CommonModule,
+ SharedModule], exports: [RuleNodeCoreConfigActionModule,
+ RuleNodeCoreConfigFilterModule,
+ RulenodeCoreConfigEnrichmentModule,
+ RulenodeCoreConfigTransformModule,
+ RuleNodeCoreConfigFlowModule,
+ EmptyConfigComponent] });
+RuleNodeCoreConfigModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigModule, imports: [[
+ CommonModule,
+ SharedModule
+ ], RuleNodeCoreConfigActionModule,
+ RuleNodeCoreConfigFilterModule,
+ RulenodeCoreConfigEnrichmentModule,
+ RulenodeCoreConfigTransformModule,
+ RuleNodeCoreConfigFlowModule] });
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.14", ngImport: i0, type: RuleNodeCoreConfigModule, decorators: [{
+ type: NgModule,
+ args: [{
+ declarations: [
+ EmptyConfigComponent
+ ],
+ imports: [
+ CommonModule,
+ SharedModule
+ ],
+ exports: [
+ RuleNodeCoreConfigActionModule,
+ RuleNodeCoreConfigFilterModule,
+ RulenodeCoreConfigEnrichmentModule,
+ RulenodeCoreConfigTransformModule,
+ RuleNodeCoreConfigFlowModule,
+ EmptyConfigComponent
+ ]
+ }]
+ }], ctorParameters: function () { return [{ type: i4.TranslateService }]; } });
+
+/*
+ * Public API Surface of rule-core-config
+ */
+
+/**
+ * Generated bundle index. Do not edit.
+ */
+
+export { AssignCustomerConfigComponent, AttributesConfigComponent, AzureIotHubConfigComponent, CalculateDeltaConfigComponent, ChangeOriginatorConfigComponent, CheckAlarmStatusComponent, CheckMessageConfigComponent, CheckPointConfigComponent, CheckRelationConfigComponent, ClearAlarmConfigComponent, CreateAlarmConfigComponent, CreateRelationConfigComponent, CredentialsConfigComponent, CustomerAttributesConfigComponent, DeleteRelationConfigComponent, DeviceAttributesConfigComponent, DeviceProfileConfigComponent, DeviceRelationsQueryConfigComponent, EmptyConfigComponent, EntityDetailsConfigComponent, GeneratorConfigComponent, GetTelemetryFromDatabaseConfigComponent, GpsGeoActionConfigComponent, GpsGeoFilterConfigComponent, KafkaConfigComponent, KvMapConfigComponent, LogConfigComponent, MessageTypeConfigComponent, MessageTypesConfigComponent, MqttConfigComponent, MsgCountConfigComponent, MsgDelayConfigComponent, OriginatorAttributesConfigComponent, OriginatorFieldsConfigComponent, OriginatorTypeConfigComponent, PubSubConfigComponent, PushToCloudConfigComponent, PushToEdgeConfigComponent, RabbitMqConfigComponent, RelatedAttributesConfigComponent, RelationsQueryConfigComponent, RestApiCallConfigComponent, RpcReplyConfigComponent, RpcRequestConfigComponent, RuleChainInputComponent, RuleChainOutputComponent, RuleNodeCoreConfigActionModule, RuleNodeCoreConfigFilterModule, RuleNodeCoreConfigFlowModule, RuleNodeCoreConfigModule, RulenodeCoreConfigCommonModule, RulenodeCoreConfigEnrichmentModule, RulenodeCoreConfigTransformModule, SafeHtmlPipe, SaveToCustomTableConfigComponent, ScriptConfigComponent, SendEmailConfigComponent, SendSmsConfigComponent, SnsConfigComponent, SqsConfigComponent, SwitchConfigComponent, TenantAttributesConfigComponent, TimeseriesConfigComponent, ToEmailConfigComponent, TransformScriptConfigComponent, UnassignCustomerConfigComponent };
+//# sourceMappingURL=rulenode-core-config.js.map
diff --git a/tools/pom.xml b/tools/pom.xml
index 51c4dd689b..b68e4b94a3 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
thingsboard
tools
diff --git a/transport/coap/pom.xml b/transport/coap/pom.xml
index cf54bcb496..cb0bb5e5ee 100644
--- a/transport/coap/pom.xml
+++ b/transport/coap/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
transport
org.thingsboard.transport
diff --git a/transport/http/pom.xml b/transport/http/pom.xml
index 4dd04c1932..7b92d5135f 100644
--- a/transport/http/pom.xml
+++ b/transport/http/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
transport
org.thingsboard.transport
diff --git a/transport/lwm2m/pom.xml b/transport/lwm2m/pom.xml
index 4730be97bd..1b7ed8f6ca 100644
--- a/transport/lwm2m/pom.xml
+++ b/transport/lwm2m/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
transport
org.thingsboard.transport
diff --git a/transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml b/transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml
index 8864b99e8c..b5a6b2075c 100644
--- a/transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml
+++ b/transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml
@@ -199,11 +199,13 @@ transport:
downlink_pool_size: "${LWM2M_DOWNLINK_POOL_SIZE:10}"
ota_pool_size: "${LWM2M_OTA_POOL_SIZE:10}"
clean_period_in_sec: "${LWM2M_CLEAN_PERIOD_IN_SEC:2}"
- log_max_length: "${LWM2M_LOG_MAX_LENGTH:1024}"
psm_activity_timer: "${LWM2M_PSM_ACTIVITY_TIMER:10000}"
paging_transmission_window: "${LWM2M_PAGING_TRANSMISSION_WINDOW:10000}"
# Use redis for Security and Registration stores
redis.enabled: "${LWM2M_REDIS_ENABLED:false}"
+ network_config: # In this section you can specify custom parameters for LwM2M network configuration and expose the env variables to configure outside
+ # - key: "PROTOCOL_STAGE_THREAD_COUNT"
+ # value: "${LWM2M_PROTOCOL_STAGE_THREAD_COUNT:4}"
stats:
enabled: "${TB_TRANSPORT_STATS_ENABLED:true}"
print-interval-ms: "${TB_TRANSPORT_STATS_PRINT_INTERVAL_MS:60000}"
diff --git a/transport/mqtt/pom.xml b/transport/mqtt/pom.xml
index dc2310f62e..1eac98020b 100644
--- a/transport/mqtt/pom.xml
+++ b/transport/mqtt/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
transport
org.thingsboard.transport
diff --git a/transport/pom.xml b/transport/pom.xml
index 9347afe94f..8b19669740 100644
--- a/transport/pom.xml
+++ b/transport/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
thingsboard
transport
diff --git a/transport/snmp/pom.xml b/transport/snmp/pom.xml
index 72201e25dd..520c651c32 100644
--- a/transport/snmp/pom.xml
+++ b/transport/snmp/pom.xml
@@ -21,7 +21,7 @@
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
transport
diff --git a/ui-ngx/.browserslistrc b/ui-ngx/.browserslistrc
new file mode 100644
index 0000000000..4f9ac26980
--- /dev/null
+++ b/ui-ngx/.browserslistrc
@@ -0,0 +1,16 @@
+# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+
+# For the full list of supported browsers by the Angular framework, please see:
+# https://angular.io/guide/browser-support
+
+# You can see what browsers were selected by your queries by running:
+# npx browserslist
+
+last 1 Chrome version
+last 1 Firefox version
+last 2 Edge major versions
+last 2 Safari major versions
+last 2 iOS major versions
+Firefox ESR
diff --git a/ui-ngx/angular.json b/ui-ngx/angular.json
index a97e65b04c..7565ae770c 100644
--- a/ui-ngx/angular.json
+++ b/ui-ngx/angular.json
@@ -11,6 +11,9 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
+ },
+ "@schematics/angular:application": {
+ "strict": true
}
},
"architect": {
@@ -79,6 +82,7 @@
"src/app/modules/home/components/widget/lib/maps/markers.scss",
"node_modules/leaflet.markercluster/dist/MarkerCluster.css",
"node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
+ "node_modules/@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css",
"node_modules/prismjs/themes/prism.css",
"node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css"
],
@@ -91,6 +95,7 @@
"node_modules/tinycolor2/dist/tinycolor-min.js",
"node_modules/split.js/dist/split.min.js",
"node_modules/systemjs/dist/system.js",
+ "node_modules/systemjs-babel/dist/systemjs-babel.js",
"node_modules/marked/lib/marked.js",
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-css.min.js",
@@ -98,7 +103,7 @@
"node_modules/prismjs/components/prism-json.min.js",
"node_modules/prismjs/components/prism-javascript.min.js",
"node_modules/prismjs/components/prism-typescript.min.js",
- "node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js"
+ "node_modules/prismjs/plugins/line-numbers/prism-line-numbers.min.js"
],
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
@@ -129,7 +134,9 @@
"jquery.terminal",
"tooltipster",
"jstree",
- "qrcode"
+ "qrcode",
+ "wcwidth",
+ "leaflet-polylinedecorator"
]
},
"configurations": {
@@ -140,7 +147,14 @@
"with": "src/environments/environment.prod.ts"
}
],
- "optimization": true,
+ "optimization": {
+ "scripts": true,
+ "styles": {
+ "minify": true,
+ "inlineCritical": false
+ },
+ "fonts": false
+ },
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
@@ -154,6 +168,21 @@
"maximumError": "12mb"
}
]
+ },
+ "development": {
+ "buildOptimizer": false,
+ "optimization": {
+ "scripts": false,
+ "styles": {
+ "minify": false,
+ "inlineCritical": false
+ },
+ "fonts": false
+ },
+ "vendorChunk": true,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "namedChunks": true
}
}
},
@@ -166,8 +195,12 @@
"configurations": {
"production": {
"browserTarget": "thingsboard:build:production"
+ },
+ "development": {
+ "browserTarget": "thingsboard:build:development"
}
- }
+ },
+ "defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
diff --git a/ui-ngx/extra-webpack.config.js b/ui-ngx/extra-webpack.config.js
index ef2e115252..e1efad5e67 100644
--- a/ui-ngx/extra-webpack.config.js
+++ b/ui-ngx/extra-webpack.config.js
@@ -14,7 +14,7 @@
* limitations under the License.
*/
const CompressionPlugin = require("compression-webpack-plugin");
-const TerserPlugin = require("terser-webpack-plugin");
+const JavaScriptOptimizerPlugin = require("@angular-devkit/build-angular/src/webpack/plugins/javascript-optimizer-plugin").JavaScriptOptimizerPlugin;
const webpack = require("webpack");
const dirTree = require("directory-tree");
const ngWebpack = require('@ngtools/webpack');
@@ -52,7 +52,10 @@ module.exports = (config, options) => {
})
);
config.plugins.push(
- new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
+ new webpack.IgnorePlugin({
+ resourceRegExp: /^\.\/locale$/,
+ contextRegExp: /moment$/,
+ })
);
if (config.mode === 'production') {
@@ -62,11 +65,10 @@ module.exports = (config, options) => {
angularCompilerOptions.emitNgModuleScope = true;
config.plugins.splice(index, 1);
config.plugins.push(new ngWebpack.ivy.AngularWebpackPlugin(angularCompilerOptions));
- const terserPluginOptions = config.optimization.minimizer[1].options;
- delete terserPluginOptions.terserOptions.compress.global_defs.ngJitMode;
- terserPluginOptions.terserOptions.compress.side_effects = false;
+ const javascriptOptimizerOptions = config.optimization.minimizer[1].options;
+ delete javascriptOptimizerOptions.define.ngJitMode;
config.optimization.minimizer.splice(1, 1);
- config.optimization.minimizer.push(new TerserPlugin(terserPluginOptions));
+ config.optimization.minimizer.push(new JavaScriptOptimizerPlugin(javascriptOptimizerOptions));
}
return config;
};
diff --git a/ui-ngx/package.json b/ui-ngx/package.json
index 519d31b66c..adec5e815a 100644
--- a/ui-ngx/package.json
+++ b/ui-ngx/package.json
@@ -1,11 +1,11 @@
{
"name": "thingsboard",
- "version": "3.3.2",
+ "version": "3.3.3",
"scripts": {
"ng": "ng",
- "start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --open",
+ "start": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open",
"build": "ng build",
- "build:prod": "ng build --prod --vendor-chunk",
+ "build:prod": "ng build --configuration production --vendor-chunk",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
@@ -13,136 +13,139 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "^11.2.14",
- "@angular/cdk": "^11.2.13",
- "@angular/common": "^11.2.14",
- "@angular/compiler": "^11.2.14",
- "@angular/core": "^11.2.14",
- "@angular/flex-layout": "^11.0.0-beta.33",
- "@angular/forms": "^11.2.14",
- "@angular/material": "^11.2.13",
- "@angular/platform-browser": "^11.2.14",
- "@angular/platform-browser-dynamic": "^11.2.14",
- "@angular/router": "^11.2.14",
+ "@angular/animations": "^12.2.13",
+ "@angular/cdk": "^12.2.13",
+ "@angular/common": "^12.2.13",
+ "@angular/compiler": "^12.2.13",
+ "@angular/core": "^12.2.13",
+ "@angular/flex-layout": "^12.0.0-beta.35",
+ "@angular/forms": "^12.2.13",
+ "@angular/material": "^12.2.13",
+ "@angular/platform-browser": "^12.2.13",
+ "@angular/platform-browser-dynamic": "^12.2.13",
+ "@angular/router": "^12.2.13",
"@auth0/angular-jwt": "^5.0.2",
- "@date-io/date-fns": "^2.10.11",
+ "@date-io/date-fns": "^2.11.0",
"@flowjs/flow.js": "^2.14.1",
"@flowjs/ngx-flow": "~0.4.6",
+ "@geoman-io/leaflet-geoman-free": "^2.11.3",
"@juggle/resize-observer": "^3.3.1",
- "@mat-datetimepicker/core": "~6.0.2",
- "@material-ui/core": "^4.11.4",
+ "@mat-datetimepicker/core": "~7.0.1",
+ "@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/pickers": "^3.3.10",
- "@ngrx/effects": "^10.1.2",
- "@ngrx/store": "^10.1.2",
- "@ngrx/store-devtools": "^10.1.2",
+ "@ngrx/effects": "^12.5.1",
+ "@ngrx/store": "^12.5.1",
+ "@ngrx/store-devtools": "^12.5.1",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
- "ace-builds": "^1.4.12",
- "angular-gridster2": "~11.2.0",
- "angular2-hotkeys": "^2.2.0",
+ "ace-builds": "^1.4.13",
+ "angular-gridster2": "~12.1.1",
+ "angular2-hotkeys": "^2.4.0",
"canvas-gauges": "^2.1.7",
- "compass-sass-mixins": "^0.12.7",
- "core-js": "^3.18.3",
- "date-fns": "^2.21.3",
+ "core-js": "^3.19.2",
+ "date-fns": "^2.26.0",
"flot": "git://github.com/thingsboard/flot.git#0.9-work",
"flot.curvedlines": "git://github.com/MichaelZinsmaier/CurvedLines.git#master",
"font-awesome": "^4.7.0",
- "html2canvas": "^1.0.0-rc.7",
- "jquery": "^3.5.1",
- "jquery.terminal": "^2.24.0",
- "js-beautify": "^1.13.13",
+ "html2canvas": "^1.3.3",
+ "jquery": "^3.6.0",
+ "jquery.terminal": "^2.29.4",
+ "js-beautify": "^1.14.0",
"json-schema-defaults": "^0.4.0",
- "jstree": "^3.3.11",
+ "jstree": "^3.3.12",
"jstree-bootstrap-theme": "^1.0.1",
- "jszip": "^3.6.0",
+ "jszip": "^3.7.1",
"leaflet": "^1.7.1",
- "leaflet-editable": "^1.2.0",
"leaflet-polylinedecorator": "^1.6.0",
- "leaflet-providers": "^1.12.0",
- "leaflet.gridlayer.googlemutant": "0.10.2",
- "leaflet.markercluster": "^1.5.0",
+ "leaflet-providers": "^1.13.0",
+ "leaflet.gridlayer.googlemutant": "^0.13.4",
+ "leaflet.markercluster": "^1.5.3",
"material-design-icons": "^3.0.1",
"messageformat": "^2.3.0",
"moment": "^2.29.1",
- "moment-timezone": "^0.5.33",
- "mousetrap": "1.6.3",
- "ngx-clipboard": "^14.0.1",
+ "moment-timezone": "^0.5.34",
+ "ngx-clipboard": "^14.0.2",
"ngx-color-picker": "^11.0.0",
- "ngx-daterangepicker-material": "^4.0.1",
+ "ngx-daterangepicker-material": "^5.0.1",
"ngx-drag-drop": "^2.0.0",
- "ngx-flowchart": "git://github.com/thingsboard/ngx-flowchart.git#master",
- "ngx-hm-carousel": "^2.0.0-rc.1",
- "ngx-markdown": "^11.1.3",
- "ngx-sharebuttons": "^8.0.5",
- "ngx-translate-messageformat-compiler": "^4.9.0",
+ "ngx-flowchart": "git://github.com/thingsboard/ngx-flowchart.git#release/1.0.0",
+ "ngx-hm-carousel": "^2.0.1",
+ "ngx-markdown": "^12.0.1",
+ "ngx-sharebuttons": "^9.0.0",
+ "ngx-translate-messageformat-compiler": "^4.11.0",
"objectpath": "^2.0.0",
- "prettier": "^2.1.2",
+ "prettier": "^2.5.0",
"prop-types": "^15.7.2",
- "qrcode": "^1.4.4",
+ "qrcode": "^1.5.0",
"raphael": "^2.3.0",
- "rc-select": "~10.5.1",
- "react": "~16.14.0",
- "react-ace": "^9.1.4",
- "react-dom": "^16.13.1",
- "react-dropzone": "^11.2.0",
+ "rc-select": "~13.2.0",
+ "react": "~17.0.2",
+ "react-ace": "^9.5.0",
+ "react-dom": "^17.0.2",
+ "react-dropzone": "^11.4.2",
"reactcss": "^1.2.3",
"rxjs": "~6.6.7",
"schema-inspector": "^2.0.1",
- "screenfull": "^5.1.0",
+ "screenfull": "^6.0.0",
"split.js": "^1.6.4",
- "systemjs": "0.21.5",
+ "systemjs": "6.11.0",
+ "systemjs-babel": "^0.3.1",
"tinycolor2": "^1.4.2",
"tooltipster": "^4.2.8",
- "tslib": "^2.2.0",
+ "tslib": "^2.3.1",
"tv4": "^1.3.0",
"typeface-roboto": "^1.1.13",
"zone.js": "~0.11.4"
},
"devDependencies": {
- "@angular-builders/custom-webpack": "~11.1.1",
- "@angular-devkit/build-angular": "^0.1102.13",
- "@angular/cli": "^11.2.13",
- "@angular/compiler-cli": "^11.2.14",
- "@angular/language-service": "^11.2.14",
- "@ngtools/webpack": "~11.2.13",
- "@types/canvas-gauges": "^2.1.2",
- "@types/flot": "^0.0.31",
- "@types/jasmine": "~3.7.4",
- "@types/jasminewd2": "^2.0.9",
- "@types/jquery": "^3.5.2",
- "@types/js-beautify": "^1.13.1",
- "@types/jstree": "^3.3.40",
- "@types/leaflet": "1.5.17",
- "@types/leaflet-editable": "^1.2.1",
- "@types/leaflet-polylinedecorator": "^1.6.0",
- "@types/leaflet.markercluster": "^1.4.4",
- "@types/lodash": "^4.14.170",
+ "@angular-builders/custom-webpack": "~12.1.3",
+ "@angular-devkit/build-angular": "^12.2.13",
+ "@angular/cli": "^12.2.13",
+ "@angular/compiler-cli": "^12.2.13",
+ "@angular/language-service": "^12.2.13",
+ "@ngtools/webpack": "~12.2.13",
+ "@types/canvas-gauges": "^2.1.4",
+ "@types/flot": "^0.0.32",
+ "@types/jasmine": "~3.10.2",
+ "@types/jasminewd2": "^2.0.10",
+ "@types/jquery": "^3.5.9",
+ "@types/js-beautify": "^1.13.3",
+ "@types/jstree": "^3.3.41",
+ "@types/leaflet": "^1.7.6",
+ "@types/leaflet-polylinedecorator": "^1.6.1",
+ "@types/leaflet-providers": "^1.2.1",
+ "@types/leaflet.gridlayer.googlemutant": "^0.4.6",
+ "@types/leaflet.markercluster": "^1.4.6",
+ "@types/lodash": "^4.14.177",
"@types/moment-timezone": "^0.5.30",
- "@types/mousetrap": "1.6.3",
- "@types/raphael": "^2.3.1",
- "@types/react": "^16.9.51",
- "@types/react-dom": "^16.9.8",
- "@types/tinycolor2": "^1.4.2",
- "@types/tooltipster": "^0.0.30",
+ "@types/mousetrap": "^1.6.0",
+ "@types/node": "~15.14.9",
+ "@types/raphael": "^2.3.2",
+ "@types/react": "^17.0.37",
+ "@types/react-dom": "^17.0.11",
+ "@types/systemjs": "6.1.1",
+ "@types/tinycolor2": "^1.4.3",
+ "@types/tooltipster": "^0.0.31",
"codelyzer": "^6.0.2",
- "compression-webpack-plugin": "^6.1.1",
- "directory-tree": "^2.2.4",
- "jasmine-core": "~3.7.1",
+ "compression-webpack-plugin": "^9.0.1",
+ "directory-tree": "^3.0.1",
+ "jasmine-core": "~3.10.1",
"jasmine-spec-reporter": "~7.0.0",
- "karma": "~6.3.2",
+ "karma": "~6.3.9",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
- "karma-jasmine": "~4.0.0",
- "karma-jasmine-html-reporter": "^1.5.0",
+ "karma-jasmine": "~4.0.1",
+ "karma-jasmine-html-reporter": "^1.7.0",
"ngrx-store-freeze": "^0.2.4",
"patch-package": "^6.4.7",
"postinstall-prepare": "^2.0.0",
"protractor": "~7.0.0",
- "ts-node": "^9.0.0",
+ "raw-loader": "^4.0.2",
+ "ts-node": "^10.4.0",
"tslint": "~6.1.3",
- "typescript": "~4.0.3",
- "webpack": "^4.46.0"
+ "typescript": "~4.3.5",
+ "webpack": "^5.64.4"
},
"resolutions": {
"lodash": "~4.17.21"
diff --git a/ui-ngx/pom.xml b/ui-ngx/pom.xml
index 59e85024fd..328a63f949 100644
--- a/ui-ngx/pom.xml
+++ b/ui-ngx/pom.xml
@@ -20,7 +20,7 @@
4.0.0
org.thingsboard
- 3.3.2-SNAPSHOT
+ 3.3.3-SNAPSHOT
thingsboard
org.thingsboard
@@ -56,8 +56,8 @@
install-node-and-yarn
- v12.16.1
- v1.22.4
+ v16.13.0
+ v1.22.17
diff --git a/ui-ngx/src/.browserslistrc b/ui-ngx/src/.browserslistrc
deleted file mode 100644
index 0209813ebf..0000000000
--- a/ui-ngx/src/.browserslistrc
+++ /dev/null
@@ -1,11 +0,0 @@
-# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
-# For additional information regarding the format and rule options, please see:
-# https://github.com/browserslist/browserslist#queries
-#
-# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
-
-> 0.5%
-last 2 versions
-Firefox ESR
-not dead
-IE 11
diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts
index 3346d5ce83..2b71df5a0e 100644
--- a/ui-ngx/src/app/core/http/entity.service.ts
+++ b/ui-ngx/src/app/core/http/entity.service.ts
@@ -906,28 +906,12 @@ export class EntityService {
result.entityFilter = deepClone(filter);
return of(result);
case AliasFilterType.relationsQuery:
- result.stateEntity = filter.rootStateEntity;
- let rootEntityType;
- let rootEntityId;
- if (result.stateEntity && stateEntityId) {
- rootEntityType = stateEntityId.entityType;
- rootEntityId = stateEntityId.id;
- } else if (!result.stateEntity) {
- rootEntityType = filter.rootEntity.entityType;
- rootEntityId = filter.rootEntity.id;
- }
- if (rootEntityType && rootEntityId) {
- const relationQueryRootEntityId = this.resolveAliasEntityId(rootEntityType, rootEntityId);
- result.entityFilter = deepClone(filter);
- result.entityFilter.rootEntity = relationQueryRootEntityId;
- return of(result);
- } else {
- return of(result);
- }
case AliasFilterType.assetSearchQuery:
case AliasFilterType.deviceSearchQuery:
case AliasFilterType.edgeSearchQuery:
case AliasFilterType.entityViewSearchQuery:
+ let rootEntityType;
+ let rootEntityId;
result.stateEntity = filter.rootStateEntity;
if (result.stateEntity && stateEntityId) {
rootEntityType = stateEntityId.entityType;
@@ -937,9 +921,9 @@ export class EntityService {
rootEntityId = filter.rootEntity.id;
}
if (rootEntityType && rootEntityId) {
- const searchQueryRootEntityId = this.resolveAliasEntityId(rootEntityType, rootEntityId);
+ const queryRootEntityId = this.resolveAliasEntityId(rootEntityType, rootEntityId);
result.entityFilter = deepClone(filter);
- result.entityFilter.rootEntity = searchQueryRootEntityId;
+ result.entityFilter.rootEntity = queryRootEntityId;
return of(result);
} else {
return of(result);
diff --git a/ui-ngx/src/app/core/http/rule-chain.service.ts b/ui-ngx/src/app/core/http/rule-chain.service.ts
index e65e7017e0..3fa9168d5f 100644
--- a/ui-ngx/src/app/core/http/rule-chain.service.ts
+++ b/ui-ngx/src/app/core/http/rule-chain.service.ts
@@ -21,11 +21,8 @@ import { HttpClient } from '@angular/common/http';
import { PageLink } from '@shared/models/page/page-link';
import { PageData } from '@shared/models/page/page-data';
import {
- ResolvedRuleChainMetaData,
RuleChain,
- RuleChainConnectionInfo,
RuleChainMetaData,
- ruleChainNodeComponent,
RuleChainType,
ruleNodeTypeComponentTypes,
unknownNodeComponent
@@ -34,17 +31,17 @@ import { ComponentDescriptorService } from './component-descriptor.service';
import {
IRuleNodeConfigurationComponent,
LinkLabel,
- RuleNodeComponentDescriptor,
+ RuleNodeComponentDescriptor, RuleNodeConfiguration,
TestScriptInputParams,
TestScriptResult
} from '@app/shared/models/rule-node.models';
import { ResourcesService } from '../services/resources.service';
import { catchError, map, mergeMap } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
-import { EntityType } from '@shared/models/entity-type.models';
import { deepClone, snakeCase } from '@core/utils';
import { DebugRuleNodeEventBody } from '@app/shared/models/event.models';
import { Edge } from '@shared/models/edge.models';
+import { IModulesMap } from '@modules/common/modules-map.models';
@Injectable({
providedIn: 'root'
@@ -62,7 +59,8 @@ export class RuleChainService {
private translate: TranslateService
) { }
- public getRuleChains(pageLink: PageLink, type: RuleChainType = RuleChainType.CORE, config?: RequestConfig): Observable> {
+ public getRuleChains(pageLink: PageLink, type: RuleChainType = RuleChainType.CORE,
+ config?: RequestConfig): Observable> {
return this.http.get>(`/api/ruleChains${pageLink.toQuery()}&type=${type}`,
defaultHttpOptionsFromConfig(config));
}
@@ -71,6 +69,10 @@ export class RuleChainService {
return this.http.get(`/api/ruleChain/${ruleChainId}`, defaultHttpOptionsFromConfig(config));
}
+ public getRuleChainOutputLabels(ruleChainId: string, config?: RequestConfig): Observable> {
+ return this.http.get>(`/api/ruleChain/${ruleChainId}/output/labels`, defaultHttpOptionsFromConfig(config));
+ }
+
public createDefaultRuleChain(ruleChainName: string, config?: RequestConfig): Observable {
return this.http.post('/api/ruleChain/device/default', {
name: ruleChainName
@@ -93,43 +95,20 @@ export class RuleChainService {
return this.http.get(`/api/ruleChain/${ruleChainId}/metadata`, defaultHttpOptionsFromConfig(config));
}
- public getResolvedRuleChainMetadata(ruleChainId: string, config?: RequestConfig): Observable {
- return this.getRuleChainMetadata(ruleChainId, config).pipe(
- mergeMap((ruleChainMetaData) => this.resolveRuleChainMetadata(ruleChainMetaData))
- );
- }
-
public saveRuleChainMetadata(ruleChainMetaData: RuleChainMetaData, config?: RequestConfig): Observable {
return this.http.post('/api/ruleChain/metadata', ruleChainMetaData, defaultHttpOptionsFromConfig(config));
}
- public saveAndGetResolvedRuleChainMetadata(ruleChainMetaData: RuleChainMetaData,
- config?: RequestConfig): Observable {
- return this.saveRuleChainMetadata(ruleChainMetaData, config).pipe(
- mergeMap((savedRuleChainMetaData) => this.resolveRuleChainMetadata(savedRuleChainMetaData))
- );
- }
-
- public resolveRuleChainMetadata(ruleChainMetaData: RuleChainMetaData): Observable {
- return this.resolveTargetRuleChains(ruleChainMetaData.ruleChainConnections).pipe(
- map((targetRuleChainsMap) => {
- const resolvedRuleChainMetadata: ResolvedRuleChainMetaData = {...ruleChainMetaData, targetRuleChainsMap};
- return resolvedRuleChainMetadata;
- })
- );
- }
-
- public getRuleNodeComponents(ruleNodeConfigResourcesModulesMap: {[key: string]: any}, ruleChainType: RuleChainType, config?: RequestConfig):
+ public getRuleNodeComponents(modulesMap: IModulesMap, ruleChainType: RuleChainType, config?: RequestConfig):
Observable> {
if (this.ruleNodeComponentsMap.get(ruleChainType)) {
return of(this.ruleNodeComponentsMap.get(ruleChainType));
} else {
return this.loadRuleNodeComponents(ruleChainType, config).pipe(
mergeMap((components) => {
- return this.resolveRuleNodeComponentsUiResources(components, ruleNodeConfigResourcesModulesMap).pipe(
+ return this.resolveRuleNodeComponentsUiResources(components, modulesMap).pipe(
map((ruleNodeComponents) => {
this.ruleNodeComponentsMap.set(ruleChainType, ruleNodeComponents);
- this.ruleNodeComponentsMap.get(ruleChainType).push(ruleChainNodeComponent);
this.ruleNodeComponentsMap.get(ruleChainType).sort(
(comp1, comp2) => {
let result = comp1.type.toString().localeCompare(comp2.type.toString());
@@ -179,6 +158,14 @@ export class RuleChainService {
return component.configurationDescriptor.nodeDefinition.customRelations;
}
+ public ruleNodeSourceRuleChainId(component: RuleNodeComponentDescriptor, config: RuleNodeConfiguration): string {
+ if (component.configurationDescriptor.nodeDefinition.ruleChainNode) {
+ return config?.ruleChainId;
+ } else {
+ return null;
+ }
+ }
+
public getLatestRuleNodeDebugInput(ruleNodeId: string, config?: RequestConfig): Observable {
return this.http.get(`/api/ruleNode/${ruleNodeId}/debugIn`, defaultHttpOptionsFromConfig(config));
}
@@ -187,26 +174,6 @@ export class RuleChainService {
return this.http.post('/api/ruleChain/testScript', inputParams, defaultHttpOptionsFromConfig(config));
}
- private resolveTargetRuleChains(ruleChainConnections: Array): Observable<{[ruleChainId: string]: RuleChain}> {
- if (ruleChainConnections && ruleChainConnections.length) {
- const tasks: Observable[] = [];
- ruleChainConnections.forEach((connection) => {
- tasks.push(this.resolveRuleChain(connection.targetRuleChainId.id));
- });
- return forkJoin(tasks).pipe(
- map((ruleChains) => {
- const ruleChainsMap: {[ruleChainId: string]: RuleChain} = {};
- ruleChains.forEach((ruleChain) => {
- ruleChainsMap[ruleChain.id.id] = ruleChain;
- });
- return ruleChainsMap;
- })
- );
- } else {
- return of({} as {[ruleChainId: string]: RuleChain});
- }
- }
-
private loadRuleNodeComponents(ruleChainType: RuleChainType, config?: RequestConfig): Observable> {
return this.componentDescriptorService.getComponentDescriptorsByTypes(ruleNodeTypeComponentTypes, ruleChainType, config).pipe(
map((components) => {
@@ -220,21 +187,21 @@ export class RuleChainService {
}
private resolveRuleNodeComponentsUiResources(components: Array,
- ruleNodeConfigResourcesModulesMap: {[key: string]: any}):
+ modulesMap: IModulesMap):
Observable> {
const tasks: Observable[] = [];
components.forEach((component) => {
- tasks.push(this.resolveRuleNodeComponentUiResources(component, ruleNodeConfigResourcesModulesMap));
+ tasks.push(this.resolveRuleNodeComponentUiResources(component, modulesMap));
});
return forkJoin(tasks).pipe(
- catchError((err) => {
+ catchError(() => {
return of(components);
})
);
}
private resolveRuleNodeComponentUiResources(component: RuleNodeComponentDescriptor,
- ruleNodeConfigResourcesModulesMap: {[key: string]: any}):
+ modulesMap: IModulesMap):
Observable {
const nodeDefinition = component.configurationDescriptor.nodeDefinition;
const uiResources = nodeDefinition.uiResources;
@@ -248,7 +215,7 @@ export class RuleChainService {
});
}
if (moduleResource) {
- tasks.push(this.resourcesService.loadFactories(moduleResource, ruleNodeConfigResourcesModulesMap).pipe(
+ tasks.push(this.resourcesService.loadFactories(moduleResource, modulesMap).pipe(
map((res) => {
if (nodeDefinition.configDirective && nodeDefinition.configDirective.length) {
const selector = snakeCase(nodeDefinition.configDirective, '-');
@@ -267,7 +234,7 @@ export class RuleChainService {
));
}
return forkJoin(tasks).pipe(
- map((res) => {
+ map(() => {
return component;
}),
catchError(() => {
@@ -280,21 +247,6 @@ export class RuleChainService {
}
}
- private resolveRuleChain(ruleChainId: string): Observable {
- return this.getRuleChain(ruleChainId, {ignoreErrors: true}).pipe(
- map(ruleChain => ruleChain),
- catchError((err) => {
- const ruleChain = {
- id: {
- entityType: EntityType.RULE_CHAIN,
- id: ruleChainId
- }
- } as RuleChain;
- return of(ruleChain);
- })
- );
- }
-
public getEdgeRuleChains(edgeId: string, pageLink: PageLink, config?: RequestConfig): Observable> {
return this.http.get>(`/api/edge/${edgeId}/ruleChains${pageLink.toQuery()}`,
defaultHttpOptionsFromConfig(config));
diff --git a/ui-ngx/src/app/core/services/resources.service.ts b/ui-ngx/src/app/core/services/resources.service.ts
index e87f16d885..f6cd757bbb 100644
--- a/ui-ngx/src/app/core/services/resources.service.ts
+++ b/ui-ngx/src/app/core/services/resources.service.ts
@@ -26,8 +26,9 @@ import {
import { DOCUMENT } from '@angular/common';
import { forkJoin, Observable, ReplaySubject, throwError } from 'rxjs';
import { HttpClient } from '@angular/common/http';
+import { IModulesMap } from '@modules/common/modules-map.models';
-declare const SystemJS;
+declare const System;
@Injectable({
providedIn: 'root'
@@ -63,23 +64,19 @@ export class ResourcesService {
return this.loadResourceByType(fileType, url);
}
- public loadFactories(url: string, modulesMap: {[key: string]: any}): Observable[]> {
+ public loadFactories(url: string, modulesMap: IModulesMap): Observable[]> {
if (this.loadedFactories[url]) {
return this.loadedFactories[url].asObservable();
}
+ modulesMap.init();
const subject = new ReplaySubject[]>();
this.loadedFactories[url] = subject;
- if (modulesMap) {
- for (const moduleId of Object.keys(modulesMap)) {
- SystemJS.set(moduleId, modulesMap[moduleId]);
- }
- }
- SystemJS.import(url).then(
- (module) => {
- const modules = this.extractNgModules(module);
- if (modules.length) {
- import('@angular/compiler').then(
- () => {
+ import('@angular/compiler').then(
+ () => {
+ System.import(url).then(
+ (module) => {
+ const modules = this.extractNgModules(module);
+ if (modules.length) {
const tasks: Promise>[] = [];
for (const m of modules) {
tasks.push(this.compiler.compileModuleAndAllComponentsAsync(m));
@@ -101,44 +98,41 @@ export class ResourcesService {
(e) => {
this.loadedFactories[url].error(new Error(`Unable to compile module from url: ${url}`));
delete this.loadedFactories[url];
- }); }
- );
- } else {
- this.loadedFactories[url].error(new Error(`Module '${url}' doesn't have default export!`));
- delete this.loadedFactories[url];
- }
- },
- (e) => {
- this.loadedFactories[url].error(new Error(`Unable to load module from url: ${url}`));
- delete this.loadedFactories[url];
+ });
+ } else {
+ this.loadedFactories[url].error(new Error(`Module '${url}' doesn't have default export!`));
+ delete this.loadedFactories[url];
+ }
+ },
+ (e) => {
+ this.loadedFactories[url].error(new Error(`Unable to load module from url: ${url}`));
+ delete this.loadedFactories[url];
+ }
+ );
}
);
return subject.asObservable();
}
- public loadModules(url: string, modulesMap: {[key: string]: any}): Observable[]> {
+ public loadModules(url: string, modulesMap: IModulesMap): Observable[]> {
if (this.loadedModules[url]) {
return this.loadedModules[url].asObservable();
}
+ modulesMap.init();
const subject = new ReplaySubject[]>();
this.loadedModules[url] = subject;
- if (modulesMap) {
- for (const moduleId of Object.keys(modulesMap)) {
- SystemJS.set(moduleId, modulesMap[moduleId]);
- }
- }
- SystemJS.import(url).then(
- (module) => {
- try {
- let modules;
- try {
- modules = this.extractNgModules(module);
- } catch (e) {
- console.error(e);
- }
- if (modules && modules.length) {
- import('@angular/compiler').then(
- () => {
+ import('@angular/compiler').then(
+ () => {
+ System.import(url).then(
+ (module) => {
+ try {
+ let modules;
+ try {
+ modules = this.extractNgModules(module);
+ } catch (e) {
+ console.error(e);
+ }
+ if (modules && modules.length) {
const tasks: Promise>[] = [];
for (const m of modules) {
tasks.push(this.compiler.compileModuleAndAllComponentsAsync(m));
@@ -159,21 +153,21 @@ export class ResourcesService {
this.loadedModules[url].error(new Error(`Unable to compile module from url: ${url}`));
delete this.loadedModules[url];
});
+ } else {
+ this.loadedModules[url].error(new Error(`Module '${url}' doesn't have default export or not NgModule!`));
+ delete this.loadedModules[url];
}
- );
- } else {
- this.loadedModules[url].error(new Error(`Module '${url}' doesn't have default export or not NgModule!`));
+ } catch (e) {
+ this.loadedModules[url].error(new Error(`Unable to load module from url: ${url}`));
+ delete this.loadedModules[url];
+ }
+ },
+ (e) => {
+ this.loadedModules[url].error(new Error(`Unable to load module from url: ${url}`));
delete this.loadedModules[url];
+ console.error(`Unable to load module from url: ${url}`, e);
}
- } catch (e) {
- this.loadedModules[url].error(new Error(`Unable to load module from url: ${url}`));
- delete this.loadedModules[url];
- }
- },
- (e) => {
- this.loadedModules[url].error(new Error(`Unable to load module from url: ${url}`));
- delete this.loadedModules[url];
- console.error(`Unable to load module from url: ${url}`, e);
+ );
}
);
return subject.asObservable();
@@ -184,24 +178,23 @@ export class ResourcesService {
let potentialModules = [module];
let currentScanDepth = 0;
- while(potentialModules.length && currentScanDepth < 10) {
- let newPotentialModules = [];
- for (const module of potentialModules) {
- if (module && 'ɵmod' in module) {
- modules.push(module);
+ while (potentialModules.length && currentScanDepth < 10) {
+ const newPotentialModules = [];
+ for (const potentialModule of potentialModules) {
+ if (potentialModule && ('ɵmod' in potentialModule)) {
+ modules.push(potentialModule);
} else {
- for (const k of Object.keys(module)) {
- if(!this.isPrimitive(module[k])) {
- newPotentialModules.push(module[k]);
+ for (const k of Object.keys(potentialModule)) {
+ if (!this.isPrimitive(potentialModule[k])) {
+ newPotentialModules.push(potentialModule[k]);
}
}
}
}
-
potentialModules = newPotentialModules;
currentScanDepth++;
}
- } catch(e) {
+ } catch (e) {
console.log('Could not load NgModule', e);
}
return modules;
diff --git a/ui-ngx/src/typings/add-marker.d.ts b/ui-ngx/src/app/modules/common/modules-map.models.ts
similarity index 65%
rename from ui-ngx/src/typings/add-marker.d.ts
rename to ui-ngx/src/app/modules/common/modules-map.models.ts
index daef6bada9..436890554e 100644
--- a/ui-ngx/src/typings/add-marker.d.ts
+++ b/ui-ngx/src/app/modules/common/modules-map.models.ts
@@ -14,18 +14,6 @@
/// limitations under the License.
///
-import * as L from 'leaflet';
-
-declare module 'leaflet' {
-
- namespace Control {
- class AddMarker extends L.Control { }
- class AddPolygon extends L.Control { }
- }
-
- namespace control {
- function addMarker(options): Control.AddMarker;
- function addPolygon(options): Control.AddPolygon;
- }
-
+export interface IModulesMap {
+ init(): void;
}
diff --git a/ui-ngx/src/app/modules/common/modules-map.ts b/ui-ngx/src/app/modules/common/modules-map.ts
index dcb4289934..8404a03aa0 100644
--- a/ui-ngx/src/app/modules/common/modules-map.ts
+++ b/ui-ngx/src/app/modules/common/modules-map.ts
@@ -19,6 +19,9 @@ import * as AngularCore from '@angular/core';
import * as AngularCommon from '@angular/common';
import * as AngularForms from '@angular/forms';
import * as AngularFlexLayout from '@angular/flex-layout';
+import * as AngularFlexLayoutFlex from '@angular/flex-layout/flex';
+import * as AngularFlexLayoutGrid from '@angular/flex-layout/grid';
+import * as AngularFlexLayoutExtended from '@angular/flex-layout/extended';
import * as AngularPlatformBrowser from '@angular/platform-browser';
import * as AngularRouter from '@angular/router';
import * as AngularCdkCoercion from '@angular/cdk/coercion';
@@ -62,76 +65,520 @@ import * as AngularMaterialTabs from '@angular/material/tabs';
import * as AngularMaterialToolbar from '@angular/material/toolbar';
import * as AngularMaterialTooltip from '@angular/material/tooltip';
import * as AngularMaterialTree from '@angular/material/tree';
+import * as DragDropModule from '@angular/cdk/drag-drop';
+import * as HttpClientModule from '@angular/common/http';
+
import * as NgrxStore from '@ngrx/store';
import * as RxJs from 'rxjs';
import * as RxJsOperators from 'rxjs/operators';
import * as TranslateCore from '@ngx-translate/core';
+import * as _moment from 'moment';
+
import * as TbCore from '@core/public-api';
import * as TbShared from '@shared/public-api';
import * as TbHomeComponents from '@home/components/public-api';
-import * as _moment from 'moment';
-import * as DragDropModule from "@angular/cdk/drag-drop";
-import * as HttpClientModule from "@angular/common/http";
-
-declare const SystemJS;
-
-export const modulesMap: {[key: string]: any} = {
- '@angular/animations': SystemJS.newModule(AngularAnimations),
- '@angular/core': SystemJS.newModule(AngularCore),
- '@angular/common': SystemJS.newModule(AngularCommon),
- '@angular/common/http': SystemJS.newModule(HttpClientModule),
- '@angular/forms': SystemJS.newModule(AngularForms),
- '@angular/flex-layout': SystemJS.newModule(AngularFlexLayout),
- '@angular/platform-browser': SystemJS.newModule(AngularPlatformBrowser),
- '@angular/router': SystemJS.newModule(AngularRouter),
- '@angular/cdk/coercion': SystemJS.newModule(AngularCdkCoercion),
- '@angular/cdk/collections': SystemJS.newModule(AngularCdkCollections),
- '@angular/cdk/keycodes': SystemJS.newModule(AngularCdkKeycodes),
- '@angular/cdk/layout': SystemJS.newModule(AngularCdkLayout),
- '@angular/cdk/overlay': SystemJS.newModule(AngularCdkOverlay),
- '@angular/cdk/portal': SystemJS.newModule(AngularCdkPortal),
- '@angular/cdk/drag-drop': SystemJS.newModule(DragDropModule),
- '@angular/material/autocomplete': SystemJS.newModule(AngularMaterialAutocomplete),
- '@angular/material/badge': SystemJS.newModule(AngularMaterialBadge),
- '@angular/material/bottom-sheet': SystemJS.newModule(AngularMaterialBottomSheet),
- '@angular/material/button': SystemJS.newModule(AngularMaterialButton),
- '@angular/material/button-toggle': SystemJS.newModule(AngularMaterialButtonToggle),
- '@angular/material/card': SystemJS.newModule(AngularMaterialCard),
- '@angular/material/checkbox': SystemJS.newModule(AngularMaterialCheckbox),
- '@angular/material/chips': SystemJS.newModule(AngularMaterialChips),
- '@angular/material/core': SystemJS.newModule(AngularMaterialCore),
- '@angular/material/datepicker': SystemJS.newModule(AngularMaterialDatepicker),
- '@angular/material/dialog': SystemJS.newModule(AngularMaterialDialog),
- '@angular/material/divider': SystemJS.newModule(AngularMaterialDivider),
- '@angular/material/expansion': SystemJS.newModule(AngularMaterialExpansion),
- '@angular/material/form-field': SystemJS.newModule(AngularMaterialFormField),
- '@angular/material/grid-list': SystemJS.newModule(AngularMaterialGridList),
- '@angular/material/icon': SystemJS.newModule(AngularMaterialIcon),
- '@angular/material/input': SystemJS.newModule(AngularMaterialInput),
- '@angular/material/list': SystemJS.newModule(AngularMaterialList),
- '@angular/material/menu': SystemJS.newModule(AngularMaterialMenu),
- '@angular/material/paginator': SystemJS.newModule(AngularMaterialPaginator),
- '@angular/material/progress-bar': SystemJS.newModule(AngularMaterialProgressBar),
- '@angular/material/progress-spinner': SystemJS.newModule(AngularMaterialProgressSpinner),
- '@angular/material/radio': SystemJS.newModule(AngularMaterialRadio),
- '@angular/material/select': SystemJS.newModule(AngularMaterialSelect),
- '@angular/material/sidenav': SystemJS.newModule(AngularMaterialSidenav),
- '@angular/material/slide-toggle': SystemJS.newModule(AngularMaterialSlideToggle),
- '@angular/material/slider': SystemJS.newModule(AngularMaterialSlider),
- '@angular/material/snack-bar': SystemJS.newModule(AngularMaterialSnackBar),
- '@angular/material/sort': SystemJS.newModule(AngularMaterialSort),
- '@angular/material/stepper': SystemJS.newModule(AngularMaterialStepper),
- '@angular/material/table': SystemJS.newModule(AngularMaterialTable),
- '@angular/material/tabs': SystemJS.newModule(AngularMaterialTabs),
- '@angular/material/toolbar': SystemJS.newModule(AngularMaterialToolbar),
- '@angular/material/tooltip': SystemJS.newModule(AngularMaterialTooltip),
- '@angular/material/tree': SystemJS.newModule(AngularMaterialTree),
- '@ngrx/store': SystemJS.newModule(NgrxStore),
- rxjs: SystemJS.newModule(RxJs),
- 'rxjs/operators': SystemJS.newModule(RxJsOperators),
- '@ngx-translate/core': SystemJS.newModule(TranslateCore),
- '@core/public-api': SystemJS.newModule(TbCore),
- '@shared/public-api': SystemJS.newModule(TbShared),
- '@home/components/public-api': SystemJS.newModule(TbHomeComponents),
- moment: SystemJS.newModule(_moment)
-};
+
+import * as MillisecondsToTimeStringPipe from '@shared/pipe/milliseconds-to-time-string.pipe';
+import * as EnumToArrayPipe from '@shared/pipe/enum-to-array.pipe';
+import * as HighlightPipe from '@shared/pipe/highlight.pipe';
+import * as TruncatePipe from '@shared/pipe/truncate.pipe';
+import * as TbJsonPipe from '@shared/pipe/tbJson.pipe';
+import * as FileSizePipe from '@shared/pipe/file-size.pipe';
+import * as NospacePipe from '@shared/pipe/nospace.pipe';
+import * as SelectableColumnsPipe from '@shared/pipe/selectable-columns.pipe';
+import * as KeyboardShortcutPipe from '@shared/pipe/keyboard-shortcut.pipe';
+
+import * as FooterComponent from '@shared/components/footer.component';
+import * as LogoComponent from '@shared/components/logo.component';
+import * as FooterFabButtonsComponent from '@shared/components/footer-fab-buttons.component';
+import * as FullscreenDirective from '@shared/components/fullscreen.directive';
+import * as CircularProgressDirective from '@shared/components/circular-progress.directive';
+import * as MatChipDraggableDirective from '@shared/components/mat-chip-draggable.directive';
+import * as TbHotkeysDirective from '@shared/components/hotkeys.directive';
+import * as TbAnchorComponent from '@shared/components/tb-anchor.component';
+import * as TbPopoverComponent from '@shared/components/popover.component';
+import * as TbStringTemplateOutletDirective from '@shared/components/directives/sring-template-outlet.directive';
+import * as TbComponentOutletDirective from '@shared/components/directives/component-outlet.directive';
+import * as TbMarkdownComponent from '@shared/components/markdown.component';
+import * as HelpComponent from '@shared/components/help.component';
+import * as HelpMarkdownComponent from '@shared/components/help-markdown.component';
+import * as HelpPopupComponent from '@shared/components/help-popup.component';
+import * as TbCheckboxComponent from '@shared/components/tb-checkbox.component';
+import * as TbToast from '@shared/components/toast.directive';
+import * as TbErrorComponent from '@shared/components/tb-error.component';
+import * as TbCheatSheetComponent from '@shared/components/cheatsheet.component';
+import * as BreadcrumbComponent from '@shared/components/breadcrumb.component';
+import * as UserMenuComponent from '@shared/components/user-menu.component';
+import * as TimewindowComponent from '@shared/components/time/timewindow.component';
+import * as TimewindowPanelComponent from '@shared/components/time/timewindow-panel.component';
+import * as TimeintervalComponent from '@shared/components/time/timeinterval.component';
+import * as QuickTimeIntervalComponent from '@shared/components/time/quick-time-interval.component';
+import * as DashboardSelectComponent from '@shared/components/dashboard-select.component';
+import * as DashboardSelectPanelComponent from '@shared/components/dashboard-select-panel.component';
+import * as DatetimePeriodComponent from '@shared/components/time/datetime-period.component';
+import * as DatetimeComponent from '@shared/components/time/datetime.component';
+import * as TimezoneSelectComponent from '@shared/components/time/timezone-select.component';
+import * as ValueInputComponent from '@shared/components/value-input.component';
+import * as DashboardAutocompleteComponent from '@shared/components/dashboard-autocomplete.component';
+import * as EntitySubTypeAutocompleteComponent from '@shared/components/entity/entity-subtype-autocomplete.component';
+import * as EntitySubTypeSelectComponent from '@shared/components/entity/entity-subtype-select.component';
+import * as EntitySubTypeListComponent from '@shared/components/entity/entity-subtype-list.component';
+import * as EntityAutocompleteComponent from '@shared/components/entity/entity-autocomplete.component';
+import * as EntityListComponent from '@shared/components/entity/entity-list.component';
+import * as EntityTypeSelectComponent from '@shared/components/entity/entity-type-select.component';
+import * as EntitySelectComponent from '@shared/components/entity/entity-select.component';
+import * as EntityKeysListComponent from '@shared/components/entity/entity-keys-list.component';
+import * as EntityListSelectComponent from '@shared/components/entity/entity-list-select.component';
+import * as EntityTypeListComponent from '@shared/components/entity/entity-type-list.component';
+import * as QueueTypeListComponent from '@shared/components/queue/queue-type-list.component';
+import * as RelationTypeAutocompleteComponent from '@shared/components/relation/relation-type-autocomplete.component';
+import * as SocialSharePanelComponent from '@shared/components/socialshare-panel.component';
+import * as JsonObjectEditComponent from '@shared/components/json-object-edit.component';
+import * as JsonContentComponent from '@shared/components/json-content.component';
+import * as JsFuncComponent from '@shared/components/js-func.component';
+import * as FabToolbarComponent from '@shared/components/fab-toolbar.component';
+import * as WidgetsBundleSelectComponent from '@shared/components/widgets-bundle-select.component';
+import * as ConfirmDialogComponent from '@shared/components/dialog/confirm-dialog.component';
+import * as AlertDialogComponent from '@shared/components/dialog/alert-dialog.component';
+import * as TodoDialogComponent from '@shared/components/dialog/todo-dialog.component';
+import * as ColorPickerDialogComponent from '@shared/components/dialog/color-picker-dialog.component';
+import * as MaterialIconsDialogComponent from '@shared/components/dialog/material-icons-dialog.component';
+import * as ColorInputComponent from '@shared/components/color-input.component';
+import * as MaterialIconSelectComponent from '@shared/components/material-icon-select.component';
+import * as NodeScriptTestDialogComponent from '@shared/components/dialog/node-script-test-dialog.component';
+import * as JsonFormComponent from '@shared/components/json-form/json-form.component';
+import * as ImageInputComponent from '@shared/components/image-input.component';
+import * as FileInputComponent from '@shared/components/file-input.component';
+import * as MessageTypeAutocompleteComponent from '@shared/components/message-type-autocomplete.component';
+import * as KeyValMapComponent from '@shared/components/kv-map.component';
+import * as NavTreeComponent from '@shared/components/nav-tree.component';
+import * as LedLightComponent from '@shared/components/led-light.component';
+import * as TbJsonToStringDirective from '@shared/components/directives/tb-json-to-string.directive';
+import * as JsonObjectEditDialogComponent from '@shared/components/dialog/json-object-edit-dialog.component';
+import * as HistorySelectorComponent from '@shared/components/time/history-selector/history-selector.component';
+import * as EntityGatewaySelectComponent from '@shared/components/entity/entity-gateway-select.component';
+import * as ContactComponent from '@shared/components/contact.component';
+import * as OtaPackageAutocompleteComponent from '@shared/components/ota-package/ota-package-autocomplete.component';
+import * as WidgetsBundleSearchComponent from '@shared/components/widgets-bundle-search.component';
+import * as CopyButtonComponent from '@shared/components/button/copy-button.component';
+import * as TogglePasswordComponent from '@shared/components/button/toggle-password.component';
+import * as ProtobufContentComponent from '@shared/components/protobuf-content.component';
+
+import * as AddEntityDialogComponent from '@home/components/entity/add-entity-dialog.component';
+import * as EntitiesTableComponent from '@home/components/entity/entities-table.component';
+import * as DetailsPanelComponent from '@home/components/details-panel.component';
+import * as EntityDetailsPanelComponent from '@home/components/entity/entity-details-panel.component';
+import * as AuditLogDetailsDialogComponent from '@home/components/audit-log/audit-log-details-dialog.component';
+import * as AuditLogTableComponent from '@home/components/audit-log/audit-log-table.component';
+import * as EventTableHeaderComponent from '@home/components/event/event-table-header.component';
+import * as EventTableComponent from '@home/components/event/event-table.component';
+import * as EventFilterPanelComponent from '@home/components/event/event-filter-panel.component';
+import * as RelationTableComponent from '@home/components/relation/relation-table.component';
+import * as RelationDialogComponent from '@home/components/relation/relation-dialog.component';
+import * as AlarmTableHeaderComponent from '@home/components/alarm/alarm-table-header.component';
+import * as AlarmTableComponent from '@home/components/alarm/alarm-table.component';
+import * as AttributeTableComponent from '@home/components/attribute/attribute-table.component';
+import * as AddAttributeDialogComponent from '@home/components/attribute/add-attribute-dialog.component';
+import * as EditAttributeValuePanelComponent from '@home/components/attribute/edit-attribute-value-panel.component';
+import * as DashboardComponent from '@home/components/dashboard/dashboard.component';
+import * as WidgetComponent from '@home/components/widget/widget.component';
+import * as LegendComponent from '@home/components/widget/legend.component';
+import * as AliasesEntitySelectPanelComponent from '@home/components/alias/aliases-entity-select-panel.component';
+import * as AliasesEntitySelectComponent from '@home/components/alias/aliases-entity-select.component';
+import * as WidgetConfigComponent from '@home/components/widget/widget-config.component';
+import * as EntityAliasesDialogComponent from '@home/components/alias/entity-aliases-dialog.component';
+import * as EntityFilterViewComponent from '@home/components/entity/entity-filter-view.component';
+import * as EntityAliasDialogComponent from '@home/components/alias/entity-alias-dialog.component';
+import * as EntityFilterComponent from '@home/components/entity/entity-filter.component';
+import * as RelationFiltersComponent from '@home/components/relation/relation-filters.component';
+import * as EntityAliasSelectComponent from '@home/components/alias/entity-alias-select.component';
+import * as DataKeysComponent from '@home/components/widget/data-keys.component';
+import * as DataKeyConfigDialogComponent from '@home/components/widget/data-key-config-dialog.component';
+import * as DataKeyConfigComponent from '@home/components/widget/data-key-config.component';
+import * as LegendConfigComponent from '@home/components/widget/legend-config.component';
+import * as ManageWidgetActionsComponent from '@home/components/widget/action/manage-widget-actions.component';
+import * as WidgetActionDialogComponent from '@home/components/widget/action/widget-action-dialog.component';
+import * as CustomActionPrettyResourcesTabsComponent from '@home/components/widget/action/custom-action-pretty-resources-tabs.component';
+import * as CustomActionPrettyEditorComponent from '@home/components/widget/action/custom-action-pretty-editor.component';
+import * as MobileActionEditorComponent from '@home/components/widget/action/mobile-action-editor.component';
+import * as CustomDialogService from '@home/components/widget/dialog/custom-dialog.service';
+import * as CustomDialogContainerComponent from '@home/components/widget/dialog/custom-dialog-container.component';
+import * as ImportDialogComponent from '@home/components/import-export/import-dialog.component';
+import * as AddWidgetToDashboardDialogComponent from '@home/components/attribute/add-widget-to-dashboard-dialog.component';
+import * as ImportDialogCsvComponent from '@home/components/import-export/import-dialog-csv.component';
+import * as TableColumnsAssignmentComponent from '@home/components/import-export/table-columns-assignment.component';
+import * as EventContentDialogComponent from '@home/components/event/event-content-dialog.component';
+import * as SharedHomeComponentsModule from '@home/components/shared-home-components.module';
+import * as SelectTargetLayoutDialogComponent from '@home/components/dashboard/select-target-layout-dialog.component';
+import * as SelectTargetStateDialogComponent from '@home/components/dashboard/select-target-state-dialog.component';
+import * as AliasesEntityAutocompleteComponent from '@home/components/alias/aliases-entity-autocomplete.component';
+import * as BooleanFilterPredicateComponent from '@home/components/filter/boolean-filter-predicate.component';
+import * as StringFilterPredicateComponent from '@home/components/filter/string-filter-predicate.component';
+import * as NumericFilterPredicateComponent from '@home/components/filter/numeric-filter-predicate.component';
+import * as ComplexFilterPredicateComponent from '@home/components/filter/complex-filter-predicate.component';
+import * as FilterPredicateComponent from '@home/components/filter/filter-predicate.component';
+import * as FilterPredicateListComponent from '@home/components/filter/filter-predicate-list.component';
+import * as KeyFilterListComponent from '@home/components/filter/key-filter-list.component';
+import * as ComplexFilterPredicateDialogComponent from '@home/components/filter/complex-filter-predicate-dialog.component';
+import * as KeyFilterDialogComponent from '@home/components/filter/key-filter-dialog.component';
+import * as FiltersDialogComponent from '@home/components/filter/filters-dialog.component';
+import * as FilterDialogComponent from '@home/components/filter/filter-dialog.component';
+import * as FilterSelectComponent from '@home/components/filter/filter-select.component';
+import * as FiltersEditComponent from '@home/components/filter/filters-edit.component';
+import * as FiltersEditPanelComponent from '@home/components/filter/filters-edit-panel.component';
+import * as UserFilterDialogComponent from '@home/components/filter/user-filter-dialog.component';
+import * as FilterUserInfoComponent from '@home/components/filter/filter-user-info.component';
+import * as FilterUserInfoDialogComponent from '@home/components/filter/filter-user-info-dialog.component';
+import * as FilterPredicateValueComponent from '@home/components/filter/filter-predicate-value.component';
+import * as TenantProfileComponent from '@home/components/profile/tenant-profile.component';
+import * as TenantProfileDialogComponent from '@home/components/profile/tenant-profile-dialog.component';
+import * as TenantProfileDataComponent from '@home/components/profile/tenant-profile-data.component';
+// tslint:disable-next-line:max-line-length
+import * as DefaultDeviceProfileConfigurationComponent from '@home/components/profile/device/default-device-profile-configuration.component';
+import * as DeviceProfileConfigurationComponent from '@home/components/profile/device/device-profile-configuration.component';
+import * as DeviceProfileComponent from '@home/components/profile/device-profile.component';
+import * as DefaultDeviceProfileTransportConfigurationComponent from '@home/components/profile/device/default-device-profile-transport-configuration.component';
+import * as DeviceProfileTransportConfigurationComponent from '@home/components/profile/device/device-profile-transport-configuration.component';
+import * as DeviceProfileDialogComponent from '@home/components/profile/device-profile-dialog.component';
+import * as DeviceProfileAutocompleteComponent from '@home/components/profile/device-profile-autocomplete.component';
+import * as MqttDeviceProfileTransportConfigurationComponent from '@home/components/profile/device/mqtt-device-profile-transport-configuration.component';
+import * as CoapDeviceProfileTransportConfigurationComponent from '@home/components/profile/device/coap-device-profile-transport-configuration.component';
+import * as DeviceProfileAlarmsComponent from '@home/components/profile/alarm/device-profile-alarms.component';
+import * as DeviceProfileAlarmComponent from '@home/components/profile/alarm/device-profile-alarm.component';
+import * as CreateAlarmRulesComponent from '@home/components/profile/alarm/create-alarm-rules.component';
+import * as AlarmRuleComponent from '@home/components/profile/alarm/alarm-rule.component';
+import * as AlarmRuleConditionComponent from '@home/components/profile/alarm/alarm-rule-condition.component';
+import * as FilterTextComponent from '@home/components/filter/filter-text.component';
+import * as AddDeviceProfileDialogComponent from '@home/components/profile/add-device-profile-dialog.component';
+import * as RuleChainAutocompleteComponent from '@home/components/rule-chain/rule-chain-autocomplete.component';
+import * as DeviceProfileProvisionConfigurationComponent from '@home/components/profile/device-profile-provision-configuration.component';
+import * as AlarmScheduleComponent from '@home/components/profile/alarm/alarm-schedule.component';
+import * as DeviceWizardDialogComponent from '@home/components/wizard/device-wizard-dialog.component';
+import * as AlarmScheduleInfoComponent from '@home/components/profile/alarm/alarm-schedule-info.component';
+import * as AlarmScheduleDialogComponent from '@home/components/profile/alarm/alarm-schedule-dialog.component';
+import * as EditAlarmDetailsDialogComponent from '@home/components/profile/alarm/edit-alarm-details-dialog.component';
+import * as AlarmRuleConditionDialogComponent from '@home/components/profile/alarm/alarm-rule-condition-dialog.component';
+// tslint:disable-next-line:max-line-length
+import * as DefaultTenantProfileConfigurationComponent from '@home/components/profile/tenant/default-tenant-profile-configuration.component';
+import * as TenantProfileConfigurationComponent from '@home/components/profile/tenant/tenant-profile-configuration.component';
+import * as SmsProviderConfigurationComponent from '@home/components/sms/sms-provider-configuration.component';
+import * as AwsSnsProviderConfigurationComponent from '@home/components/sms/aws-sns-provider-configuration.component';
+import * as TwilioSmsProviderConfigurationComponent from '@home/components/sms/twilio-sms-provider-configuration.component';
+import * as DashboardPageComponent from '@home/components/dashboard-page/dashboard-page.component';
+import * as DashboardToolbarComponent from '@home/components/dashboard-page/dashboard-toolbar.component';
+import * as DashboardLayoutComponent from '@home/components/dashboard-page/layout/dashboard-layout.component';
+import * as EditWidgetComponent from '@home/components/dashboard-page/edit-widget.component';
+import * as DashboardWidgetSelectComponent from '@home/components/dashboard-page/dashboard-widget-select.component';
+import * as AddWidgetDialogComponent from '@home/components/dashboard-page/add-widget-dialog.component';
+import * as ManageDashboardLayoutsDialogComponent from '@home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component';
+import * as DashboardSettingsDialogComponent from '@home/components/dashboard-page/dashboard-settings-dialog.component';
+import * as ManageDashboardStatesDialogComponent from '@home/components/dashboard-page/states/manage-dashboard-states-dialog.component';
+import * as DashboardStateDialogComponent from '@home/components/dashboard-page/states/dashboard-state-dialog.component';
+import * as EmbedDashboardDialogComponent from '@home/components/widget/dialog/embed-dashboard-dialog.component';
+import * as EdgeDownlinkTableComponent from '@home/components/edge/edge-downlink-table.component';
+import * as EdgeDownlinkTableHeaderComponent from '@home/components/edge/edge-downlink-table-header.component';
+import * as DisplayWidgetTypesPanelComponent from '@home/components/dashboard-page/widget-types-panel.component';
+import * as AlarmDurationPredicateValueComponent from '@home/components/profile/alarm/alarm-duration-predicate-value.component';
+import * as DashboardImageDialogComponent from '@home/components/dashboard-page/dashboard-image-dialog.component';
+import * as WidgetContainerComponent from '@home/components/widget/widget-container.component';
+
+import { IModulesMap } from '@modules/common/modules-map.models';
+
+declare const System;
+
+class ModulesMap implements IModulesMap {
+
+ private initialized = false;
+
+ private modulesMap: {[key: string]: any} = {
+ '@angular/animations': AngularAnimations,
+ '@angular/core': AngularCore,
+ '@angular/common': AngularCommon,
+ '@angular/common/http': HttpClientModule,
+ '@angular/forms': AngularForms,
+ '@angular/flex-layout': AngularFlexLayout,
+ '@angular/flex-layout/flex': AngularFlexLayoutFlex,
+ '@angular/flex-layout/grid': AngularFlexLayoutGrid,
+ '@angular/flex-layout/extended': AngularFlexLayoutExtended,
+ '@angular/platform-browser': AngularPlatformBrowser,
+ '@angular/router': AngularRouter,
+ '@angular/cdk/coercion': AngularCdkCoercion,
+ '@angular/cdk/collections': AngularCdkCollections,
+ '@angular/cdk/keycodes': AngularCdkKeycodes,
+ '@angular/cdk/layout': AngularCdkLayout,
+ '@angular/cdk/overlay': AngularCdkOverlay,
+ '@angular/cdk/portal': AngularCdkPortal,
+ '@angular/cdk/drag-drop': DragDropModule,
+ '@angular/material/autocomplete': AngularMaterialAutocomplete,
+ '@angular/material/badge': AngularMaterialBadge,
+ '@angular/material/bottom-sheet': AngularMaterialBottomSheet,
+ '@angular/material/button': AngularMaterialButton,
+ '@angular/material/button-toggle': AngularMaterialButtonToggle,
+ '@angular/material/card': AngularMaterialCard,
+ '@angular/material/checkbox': AngularMaterialCheckbox,
+ '@angular/material/chips': AngularMaterialChips,
+ '@angular/material/core': AngularMaterialCore,
+ '@angular/material/datepicker': AngularMaterialDatepicker,
+ '@angular/material/dialog': AngularMaterialDialog,
+ '@angular/material/divider': AngularMaterialDivider,
+ '@angular/material/expansion': AngularMaterialExpansion,
+ '@angular/material/form-field': AngularMaterialFormField,
+ '@angular/material/grid-list': AngularMaterialGridList,
+ '@angular/material/icon': AngularMaterialIcon,
+ '@angular/material/input': AngularMaterialInput,
+ '@angular/material/list': AngularMaterialList,
+ '@angular/material/menu': AngularMaterialMenu,
+ '@angular/material/paginator': AngularMaterialPaginator,
+ '@angular/material/progress-bar': AngularMaterialProgressBar,
+ '@angular/material/progress-spinner': AngularMaterialProgressSpinner,
+ '@angular/material/radio': AngularMaterialRadio,
+ '@angular/material/select': AngularMaterialSelect,
+ '@angular/material/sidenav': AngularMaterialSidenav,
+ '@angular/material/slide-toggle': AngularMaterialSlideToggle,
+ '@angular/material/slider': AngularMaterialSlider,
+ '@angular/material/snack-bar': AngularMaterialSnackBar,
+ '@angular/material/sort': AngularMaterialSort,
+ '@angular/material/stepper': AngularMaterialStepper,
+ '@angular/material/table': AngularMaterialTable,
+ '@angular/material/tabs': AngularMaterialTabs,
+ '@angular/material/toolbar': AngularMaterialToolbar,
+ '@angular/material/tooltip': AngularMaterialTooltip,
+ '@angular/material/tree': AngularMaterialTree,
+ '@ngrx/store': NgrxStore,
+ rxjs: RxJs,
+ 'rxjs/operators': RxJsOperators,
+ '@ngx-translate/core': TranslateCore,
+ moment: _moment,
+
+ '@core/public-api': TbCore,
+ '@shared/public-api': TbShared,
+ '@home/components/public-api': TbHomeComponents,
+
+ '@shared/pipe/milliseconds-to-time-string.pipe': MillisecondsToTimeStringPipe,
+ '@shared/pipe/enum-to-array.pipe': EnumToArrayPipe,
+ '@shared/pipe/highlight.pipe': HighlightPipe,
+ '@shared/pipe/truncate.pipe': TruncatePipe,
+ '@shared/pipe/tbJson.pipe': TbJsonPipe,
+ '@shared/pipe/file-size.pipe': FileSizePipe,
+ '@shared/pipe/nospace.pipe': NospacePipe,
+ '@shared/pipe/selectable-columns.pipe': SelectableColumnsPipe,
+ '@shared/pipe/keyboard-shortcut.pipe': KeyboardShortcutPipe,
+
+ '@shared/components/footer.component': FooterComponent,
+ '@shared/components/logo.component': LogoComponent,
+ '@shared/components/footer-fab-buttons.component': FooterFabButtonsComponent,
+ '@shared/components/fullscreen.directive': FullscreenDirective,
+ '@shared/components/circular-progress.directive': CircularProgressDirective,
+ '@shared/components/mat-chip-draggable.directive': MatChipDraggableDirective,
+ '@shared/components/hotkeys.directive': TbHotkeysDirective,
+ '@shared/components/tb-anchor.component': TbAnchorComponent,
+ '@shared/components/popover.component': TbPopoverComponent,
+ '@shared/components/directives/sring-template-outlet.directive': TbStringTemplateOutletDirective,
+ '@shared/components/directives/component-outlet.directive': TbComponentOutletDirective,
+ '@shared/components/markdown.component': TbMarkdownComponent,
+ '@shared/components/help.component': HelpComponent,
+ '@shared/components/help-markdown.component': HelpMarkdownComponent,
+ '@shared/components/help-popup.component': HelpPopupComponent,
+ '@shared/components/tb-checkbox.component': TbCheckboxComponent,
+ '@shared/components/toast.directive': TbToast,
+ '@shared/components/tb-error.component': TbErrorComponent,
+ '@shared/components/cheatsheet.component': TbCheatSheetComponent,
+ '@shared/components/breadcrumb.component': BreadcrumbComponent,
+ '@shared/components/user-menu.component': UserMenuComponent,
+ '@shared/components/time/timewindow.component': TimewindowComponent,
+ '@shared/components/time/timewindow-panel.component': TimewindowPanelComponent,
+ '@shared/components/time/timeinterval.component': TimeintervalComponent,
+ '@shared/components/time/quick-time-interval.component': QuickTimeIntervalComponent,
+ '@shared/components/dashboard-select.component': DashboardSelectComponent,
+ '@shared/components/dashboard-select-panel.component': DashboardSelectPanelComponent,
+ '@shared/components/time/datetime-period.component': DatetimePeriodComponent,
+ '@shared/components/time/datetime.component': DatetimeComponent,
+ '@shared/components/time/timezone-select.component': TimezoneSelectComponent,
+ '@shared/components/value-input.component': ValueInputComponent,
+ '@shared/components/dashboard-autocomplete.component': DashboardAutocompleteComponent,
+ '@shared/components/entity/entity-subtype-autocomplete.component': EntitySubTypeAutocompleteComponent,
+ '@shared/components/entity/entity-subtype-select.component': EntitySubTypeSelectComponent,
+ '@shared/components/entity/entity-subtype-list.component': EntitySubTypeListComponent,
+ '@shared/components/entity/entity-autocomplete.component': EntityAutocompleteComponent,
+ '@shared/components/entity/entity-list.component': EntityListComponent,
+ '@shared/components/entity/entity-type-select.component': EntityTypeSelectComponent,
+ '@shared/components/entity/entity-select.component': EntitySelectComponent,
+ '@shared/components/entity/entity-keys-list.component': EntityKeysListComponent,
+ '@shared/components/entity/entity-list-select.component': EntityListSelectComponent,
+ '@shared/components/entity/entity-type-list.component': EntityTypeListComponent,
+ '@shared/components/queue/queue-type-list.component': QueueTypeListComponent,
+ '@shared/components/relation/relation-type-autocomplete.component': RelationTypeAutocompleteComponent,
+ '@shared/components/socialshare-panel.component': SocialSharePanelComponent,
+ '@shared/components/json-object-edit.component': JsonObjectEditComponent,
+ '@shared/components/json-content.component': JsonContentComponent,
+ '@shared/components/js-func.component': JsFuncComponent,
+ '@shared/components/fab-toolbar.component': FabToolbarComponent,
+ '@shared/components/widgets-bundle-select.component': WidgetsBundleSelectComponent,
+ '@shared/components/dialog/confirm-dialog.component': ConfirmDialogComponent,
+ '@shared/components/dialog/alert-dialog.component': AlertDialogComponent,
+ '@shared/components/dialog/todo-dialog.component': TodoDialogComponent,
+ '@shared/components/dialog/color-picker-dialog.component': ColorPickerDialogComponent,
+ '@shared/components/dialog/material-icons-dialog.component': MaterialIconsDialogComponent,
+ '@shared/components/color-input.component': ColorInputComponent,
+ '@shared/components/material-icon-select.component': MaterialIconSelectComponent,
+ '@shared/components/dialog/node-script-test-dialog.component': NodeScriptTestDialogComponent,
+ '@shared/components/json-form/json-form.component': JsonFormComponent,
+ '@shared/components/image-input.component': ImageInputComponent,
+ '@shared/components/file-input.component': FileInputComponent,
+ '@shared/components/message-type-autocomplete.component': MessageTypeAutocompleteComponent,
+ '@shared/components/kv-map.component': KeyValMapComponent,
+ '@shared/components/nav-tree.component': NavTreeComponent,
+ '@shared/components/led-light.component': LedLightComponent,
+ '@shared/components/directives/tb-json-to-string.directive': TbJsonToStringDirective,
+ '@shared/components/dialog/json-object-edit-dialog.component': JsonObjectEditDialogComponent,
+ '@shared/components/time/history-selector/history-selector.component': HistorySelectorComponent,
+ '@shared/components/entity/entity-gateway-select.component': EntityGatewaySelectComponent,
+ '@shared/components/contact.component': ContactComponent,
+ '@shared/components/ota-package/ota-package-autocomplete.component': OtaPackageAutocompleteComponent,
+ '@shared/components/widgets-bundle-search.component': WidgetsBundleSearchComponent,
+ '@shared/components/button/copy-button.component': CopyButtonComponent,
+ '@shared/components/button/toggle-password.component': TogglePasswordComponent,
+ '@shared/components/protobuf-content.component': ProtobufContentComponent,
+
+ '@home/components/entity/add-entity-dialog.component': AddEntityDialogComponent,
+ '@home/components/entity/entities-table.component': EntitiesTableComponent,
+ '@home/components/details-panel.component': DetailsPanelComponent,
+ '@home/components/entity/entity-details-panel.component': EntityDetailsPanelComponent,
+ '@home/components/audit-log/audit-log-details-dialog.component': AuditLogDetailsDialogComponent,
+ '@home/components/audit-log/audit-log-table.component': AuditLogTableComponent,
+ '@home/components/event/event-table-header.component': EventTableHeaderComponent,
+ '@home/components/event/event-table.component': EventTableComponent,
+ '@home/components/event/event-filter-panel.component': EventFilterPanelComponent,
+ '@home/components/relation/relation-table.component': RelationTableComponent,
+ '@home/components/relation/relation-dialog.component': RelationDialogComponent,
+ '@home/components/alarm/alarm-table-header.component': AlarmTableHeaderComponent,
+ '@home/components/alarm/alarm-table.component': AlarmTableComponent,
+ '@home/components/attribute/attribute-table.component': AttributeTableComponent,
+ '@home/components/attribute/add-attribute-dialog.component': AddAttributeDialogComponent,
+ '@home/components/attribute/edit-attribute-value-panel.component': EditAttributeValuePanelComponent,
+ '@home/components/dashboard/dashboard.component': DashboardComponent,
+ '@home/components/widget/widget.component': WidgetComponent,
+ '@home/components/widget/legend.component': LegendComponent,
+ '@home/components/alias/aliases-entity-select-panel.component': AliasesEntitySelectPanelComponent,
+ '@home/components/alias/aliases-entity-select.component': AliasesEntitySelectComponent,
+ '@home/components/widget/widget-config.component': WidgetConfigComponent,
+ '@home/components/alias/entity-aliases-dialog.component': EntityAliasesDialogComponent,
+ '@home/components/entity/entity-filter-view.component': EntityFilterViewComponent,
+ '@home/components/alias/entity-alias-dialog.component': EntityAliasDialogComponent,
+ '@home/components/entity/entity-filter.component': EntityFilterComponent,
+ '@home/components/relation/relation-filters.component': RelationFiltersComponent,
+ '@home/components/alias/entity-alias-select.component': EntityAliasSelectComponent,
+ '@home/components/widget/data-keys.component': DataKeysComponent,
+ '@home/components/widget/data-key-config-dialog.component': DataKeyConfigDialogComponent,
+ '@home/components/widget/data-key-config.component': DataKeyConfigComponent,
+ '@home/components/widget/legend-config.component': LegendConfigComponent,
+ '@home/components/widget/action/manage-widget-actions.component': ManageWidgetActionsComponent,
+ '@home/components/widget/action/widget-action-dialog.component': WidgetActionDialogComponent,
+ '@home/components/widget/action/custom-action-pretty-resources-tabs.component': CustomActionPrettyResourcesTabsComponent,
+ '@home/components/widget/action/custom-action-pretty-editor.component': CustomActionPrettyEditorComponent,
+ '@home/components/widget/action/mobile-action-editor.component': MobileActionEditorComponent,
+ '@home/components/widget/dialog/custom-dialog.service': CustomDialogService,
+ '@home/components/widget/dialog/custom-dialog-container.component': CustomDialogContainerComponent,
+ '@home/components/import-export/import-dialog.component': ImportDialogComponent,
+ '@home/components/attribute/add-widget-to-dashboard-dialog.component': AddWidgetToDashboardDialogComponent,
+ '@home/components/import-export/import-dialog-csv.component': ImportDialogCsvComponent,
+ '@home/components/import-export/table-columns-assignment.component': TableColumnsAssignmentComponent,
+ '@home/components/event/event-content-dialog.component': EventContentDialogComponent,
+ '@home/components/shared-home-components.module': SharedHomeComponentsModule,
+ '@home/components/dashboard/select-target-layout-dialog.component': SelectTargetLayoutDialogComponent,
+ '@home/components/dashboard/select-target-state-dialog.component': SelectTargetStateDialogComponent,
+ '@home/components/alias/aliases-entity-autocomplete.component': AliasesEntityAutocompleteComponent,
+ '@home/components/filter/boolean-filter-predicate.component': BooleanFilterPredicateComponent,
+ '@home/components/filter/string-filter-predicate.component': StringFilterPredicateComponent,
+ '@home/components/filter/numeric-filter-predicate.component': NumericFilterPredicateComponent,
+ '@home/components/filter/complex-filter-predicate.component': ComplexFilterPredicateComponent,
+ '@home/components/filter/filter-predicate.component': FilterPredicateComponent,
+ '@home/components/filter/filter-predicate-list.component': FilterPredicateListComponent,
+ '@home/components/filter/key-filter-list.component': KeyFilterListComponent,
+ '@home/components/filter/complex-filter-predicate-dialog.component': ComplexFilterPredicateDialogComponent,
+ '@home/components/filter/key-filter-dialog.component': KeyFilterDialogComponent,
+ '@home/components/filter/filters-dialog.component': FiltersDialogComponent,
+ '@home/components/filter/filter-dialog.component': FilterDialogComponent,
+ '@home/components/filter/filter-select.component': FilterSelectComponent,
+ '@home/components/filter/filters-edit.component': FiltersEditComponent,
+ '@home/components/filter/filters-edit-panel.component': FiltersEditPanelComponent,
+ '@home/components/filter/user-filter-dialog.component': UserFilterDialogComponent,
+ '@home/components/filter/filter-user-info.component': FilterUserInfoComponent,
+ '@home/components/filter/filter-user-info-dialog.component': FilterUserInfoDialogComponent,
+ '@home/components/filter/filter-predicate-value.component': FilterPredicateValueComponent,
+ '@home/components/profile/tenant-profile.component': TenantProfileComponent,
+ '@home/components/profile/tenant-profile-dialog.component': TenantProfileDialogComponent,
+ '@home/components/profile/tenant-profile-data.component': TenantProfileDataComponent,
+ '@home/components/profile/device/default-device-profile-configuration.component': DefaultDeviceProfileConfigurationComponent,
+ '@home/components/profile/device/device-profile-configuration.component': DeviceProfileConfigurationComponent,
+ '@home/components/profile/device-profile.component': DeviceProfileComponent,
+ '@home/components/profile/device/default-device-profile-transport-configuration.component':
+ DefaultDeviceProfileTransportConfigurationComponent,
+ '@home/components/profile/device/device-profile-transport-configuration.component': DeviceProfileTransportConfigurationComponent,
+ '@home/components/profile/device-profile-dialog.component': DeviceProfileDialogComponent,
+ '@home/components/profile/device-profile-autocomplete.component': DeviceProfileAutocompleteComponent,
+ '@home/components/profile/device/mqtt-device-profile-transport-configuration.component':
+ MqttDeviceProfileTransportConfigurationComponent,
+ '@home/components/profile/device/coap-device-profile-transport-configuration.component':
+ CoapDeviceProfileTransportConfigurationComponent,
+ '@home/components/profile/alarm/device-profile-alarms.component': DeviceProfileAlarmsComponent,
+ '@home/components/profile/alarm/device-profile-alarm.component': DeviceProfileAlarmComponent,
+ '@home/components/profile/alarm/create-alarm-rules.component': CreateAlarmRulesComponent,
+ '@home/components/profile/alarm/alarm-rule.component': AlarmRuleComponent,
+ '@home/components/profile/alarm/alarm-rule-condition.component': AlarmRuleConditionComponent,
+ '@home/components/filter/filter-text.component': FilterTextComponent,
+ '@home/components/profile/add-device-profile-dialog.component': AddDeviceProfileDialogComponent,
+ '@home/components/rule-chain/rule-chain-autocomplete.component': RuleChainAutocompleteComponent,
+ '@home/components/profile/device-profile-provision-configuration.component': DeviceProfileProvisionConfigurationComponent,
+ '@home/components/profile/alarm/alarm-schedule.component': AlarmScheduleComponent,
+ '@home/components/wizard/device-wizard-dialog.component': DeviceWizardDialogComponent,
+ '@home/components/profile/alarm/alarm-schedule-info.component': AlarmScheduleInfoComponent,
+ '@home/components/profile/alarm/alarm-schedule-dialog.component': AlarmScheduleDialogComponent,
+ '@home/components/profile/alarm/edit-alarm-details-dialog.component': EditAlarmDetailsDialogComponent,
+ '@home/components/profile/alarm/alarm-rule-condition-dialog.component': AlarmRuleConditionDialogComponent,
+ '@home/components/profile/tenant/default-tenant-profile-configuration.component': DefaultTenantProfileConfigurationComponent,
+ '@home/components/profile/tenant/tenant-profile-configuration.component': TenantProfileConfigurationComponent,
+ '@home/components/sms/sms-provider-configuration.component': SmsProviderConfigurationComponent,
+ '@home/components/sms/aws-sns-provider-configuration.component': AwsSnsProviderConfigurationComponent,
+ '@home/components/sms/twilio-sms-provider-configuration.component': TwilioSmsProviderConfigurationComponent,
+ '@home/components/dashboard-page/dashboard-page.component': DashboardPageComponent,
+ '@home/components/dashboard-page/dashboard-toolbar.component': DashboardToolbarComponent,
+ '@home/components/dashboard-page/layout/dashboard-layout.component': DashboardLayoutComponent,
+ '@home/components/dashboard-page/edit-widget.component': EditWidgetComponent,
+ '@home/components/dashboard-page/dashboard-widget-select.component': DashboardWidgetSelectComponent,
+ '@home/components/dashboard-page/add-widget-dialog.component': AddWidgetDialogComponent,
+ '@home/components/dashboard-page/layout/manage-dashboard-layouts-dialog.component': ManageDashboardLayoutsDialogComponent,
+ '@home/components/dashboard-page/dashboard-settings-dialog.component': DashboardSettingsDialogComponent,
+ '@home/components/dashboard-page/states/manage-dashboard-states-dialog.component': ManageDashboardStatesDialogComponent,
+ '@home/components/dashboard-page/states/dashboard-state-dialog.component': DashboardStateDialogComponent,
+ '@home/components/widget/dialog/embed-dashboard-dialog.component': EmbedDashboardDialogComponent,
+ '@home/components/edge/edge-downlink-table.component': EdgeDownlinkTableComponent,
+ '@home/components/edge/edge-downlink-table-header.component': EdgeDownlinkTableHeaderComponent,
+ '@home/components/dashboard-page/widget-types-panel.component': DisplayWidgetTypesPanelComponent,
+ '@home/components/profile/alarm/alarm-duration-predicate-value.component': AlarmDurationPredicateValueComponent,
+ '@home/components/dashboard-page/dashboard-image-dialog.component': DashboardImageDialogComponent,
+ '@home/components/widget/widget-container.component': WidgetContainerComponent,
+ };
+
+ init() {
+ if (!this.initialized) {
+ System.constructor.prototype.resolve = (id) => {
+ try {
+ if (this.modulesMap[id]) {
+ return 'app:' + id;
+ } else {
+ return id;
+ }
+ } catch (err) {
+ return id;
+ }
+ };
+ for (const moduleId of Object.keys(this.modulesMap)) {
+ System.set('app:' + moduleId, this.modulesMap[moduleId]);
+ }
+ this.initialized = true;
+ }
+ }
+}
+
+export const modulesMap = new ModulesMap();
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
index 534d22834a..37ef5e0429 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
@@ -345,24 +345,26 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
this.runChangeDetection();
}
));
- this.rxSubscriptions.push(this.route.queryParamMap.subscribe(
- (paramMap) => {
- if (paramMap.has('reload')) {
- this.dashboardCtx.aliasController.updateAliases();
- setTimeout(() => {
- this.mobileService.handleDashboardStateName(this.dashboardCtx.stateController.getCurrentStateName());
- this.mobileService.onDashboardLoaded(this.layouts.right.show, this.isRightLayoutOpened);
- });
+ if (this.syncStateWithQueryParam) {
+ this.rxSubscriptions.push(this.route.queryParamMap.subscribe(
+ (paramMap) => {
+ if (paramMap.has('reload')) {
+ this.dashboardCtx.aliasController.updateAliases();
+ setTimeout(() => {
+ this.mobileService.handleDashboardStateName(this.dashboardCtx.stateController.getCurrentStateName());
+ this.mobileService.onDashboardLoaded(this.layouts.right.show, this.isRightLayoutOpened);
+ });
+ }
}
- }
- ));
+ ));
+ }
this.rxSubscriptions.push(this.breakpointObserver
.observe(MediaBreakpoints['gt-sm'])
.subscribe((state: BreakpointState) => {
this.isMobile = !state.matches;
}
));
- if (this.isMobileApp) {
+ if (this.isMobileApp && this.syncStateWithQueryParam) {
this.mobileService.registerToggleLayoutFunction(() => {
setTimeout(() => {
this.toggleLayouts();
@@ -464,7 +466,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
}
ngOnDestroy(): void {
- if (this.isMobileApp) {
+ if (this.isMobileApp && this.syncStateWithQueryParam) {
this.mobileService.unregisterToggleLayoutFunction();
}
this.rxSubscriptions.forEach((subscription) => {
diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/states/states-controller.module.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/states/states-controller.module.ts
index 0f8c60858a..66b14fee44 100644
--- a/ui-ngx/src/app/modules/home/components/dashboard-page/states/states-controller.module.ts
+++ b/ui-ngx/src/app/modules/home/components/dashboard-page/states/states-controller.module.ts
@@ -17,9 +17,9 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
-import { StatesControllerService } from './states-controller.service';
-import { EntityStateControllerComponent } from './entity-state-controller.component';
-import { StatesComponentDirective } from './states-component.directive';
+import { StatesControllerService } from '@home/components/dashboard-page/states/states-controller.service';
+import { EntityStateControllerComponent } from '@home/components/dashboard-page/states/entity-state-controller.component';
+import { StatesComponentDirective } from '@home/components/dashboard-page/states/states-component.directive';
import { HomeDialogsModule } from '@app/modules/home/dialogs/home-dialogs.module';
import { DefaultStateControllerComponent } from '@home/components/dashboard-page/states/default-state-controller.component';
diff --git a/ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts b/ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts
index 49f1c2c097..ce3bbbbd97 100644
--- a/ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts
+++ b/ui-ngx/src/app/modules/home/components/device/device-credentials.module.ts
@@ -17,11 +17,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@shared/shared.module';
-import { CopyDeviceCredentialsComponent } from './copy-device-credentials.component';
-import { DeviceCredentialsComponent } from './device-credentials.component';
-import { DeviceCredentialsLwm2mComponent } from './device-credentials-lwm2m.component';
-import { DeviceCredentialsLwm2mServerComponent } from './device-credentials-lwm2m-server.component';
-import { DeviceCredentialsMqttBasicComponent } from './device-credentials-mqtt-basic.component';
+import { CopyDeviceCredentialsComponent } from '@home/components/device/copy-device-credentials.component';
+import { DeviceCredentialsComponent } from '@home/components/device/device-credentials.component';
+import { DeviceCredentialsLwm2mComponent } from '@home/components/device/device-credentials-lwm2m.component';
+import { DeviceCredentialsLwm2mServerComponent } from '@home/components/device/device-credentials-lwm2m-server.component';
+import { DeviceCredentialsMqttBasicComponent } from '@home/components/device/device-credentials-mqtt-basic.component';
@NgModule({
declarations: [
diff --git a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
index 79166bb116..4059479cca 100644
--- a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
+++ b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
@@ -43,8 +43,7 @@ import { TranslateService } from '@ngx-translate/core';
import { BaseData, HasId } from '@shared/models/base-data';
import { ActivatedRoute } from '@angular/router';
import {
- CellActionDescriptor,
- CellActionDescriptorType,
+ CellActionDescriptor, CellActionDescriptorType,
EntityActionTableColumn,
EntityColumn,
EntityTableColumn,
@@ -63,6 +62,7 @@ import { isDefined, isUndefined } from '@core/utils';
import { HasUUID } from '@shared/models/id/has-uuid';
import { ResizeObserver } from '@juggle/resize-observer';
import { hidePageSizePixelValue } from '@shared/models/constants';
+import { IEntitiesTableComponent } from '@home/models/entity/entity-table-component.models';
@Component({
selector: 'tb-entities-table',
@@ -70,7 +70,7 @@ import { hidePageSizePixelValue } from '@shared/models/constants';
styleUrls: ['./entities-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
-export class EntitiesTableComponent extends PageComponent implements AfterViewInit, OnInit, OnChanges {
+export class EntitiesTableComponent extends PageComponent implements IEntitiesTableComponent, AfterViewInit, OnInit, OnChanges {
@Input()
entitiesTableConfig: EntityTableConfig>;
diff --git a/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate-dialog.component.ts b/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate-dialog.component.ts
index 3f1bb3cace..4d61aa2c89 100644
--- a/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate-dialog.component.ts
@@ -23,22 +23,12 @@ import { FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm, Valida
import { Router } from '@angular/router';
import { DialogComponent } from '@app/shared/components/dialog.component';
import {
- BooleanOperation, booleanOperationTranslationMap,
- ComplexFilterPredicate, ComplexFilterPredicateInfo, ComplexOperation, complexOperationTranslationMap,
- EntityKeyValueType,
- FilterPredicateType, KeyFilterPredicateInfo
+ ComplexFilterPredicateInfo,
+ ComplexOperation,
+ complexOperationTranslationMap,
+ FilterPredicateType
} from '@shared/models/query/query.models';
-
-export interface ComplexFilterPredicateDialogData {
- complexPredicate: ComplexFilterPredicateInfo;
- key: string;
- readonly: boolean;
- isAdd: boolean;
- valueType: EntityKeyValueType;
- displayUserParameters: boolean;
- allowUserDynamicSource: boolean;
- onlyUserDynamicSource: boolean;
-}
+import { ComplexFilterPredicateDialogData } from '@home/components/filter/filter-component.models';
@Component({
selector: 'tb-complex-filter-predicate-dialog',
diff --git a/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate.component.ts b/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate.component.ts
index b177f118c0..038ff474ae 100644
--- a/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate.component.ts
+++ b/ui-ngx/src/app/modules/home/components/filter/complex-filter-predicate.component.ts
@@ -14,15 +14,14 @@
/// limitations under the License.
///
-import { Component, forwardRef, Input, OnInit } from '@angular/core';
+import { Component, forwardRef, Inject, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { ComplexFilterPredicateInfo, EntityKeyValueType } from '@shared/models/query/query.models';
import { MatDialog } from '@angular/material/dialog';
-import {
- ComplexFilterPredicateDialogComponent,
- ComplexFilterPredicateDialogData
-} from '@home/components/filter/complex-filter-predicate-dialog.component';
import { deepClone } from '@core/utils';
+import { ComplexFilterPredicateDialogData } from '@home/components/filter/filter-component.models';
+import { COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN } from '@home/components/tokens';
+import { ComponentType } from '@angular/cdk/portal';
@Component({
selector: 'tb-complex-filter-predicate',
@@ -54,7 +53,8 @@ export class ComplexFilterPredicateComponent implements ControlValueAccessor, On
private complexFilterPredicate: ComplexFilterPredicateInfo;
- constructor(private dialog: MatDialog) {
+ constructor(@Inject(COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN) private complexFilterPredicateDialogComponent: ComponentType,
+ private dialog: MatDialog) {
}
ngOnInit(): void {
@@ -76,8 +76,8 @@ export class ComplexFilterPredicateComponent implements ControlValueAccessor, On
}
public openComplexFilterDialog() {
- this.dialog.open(ComplexFilterPredicateDialogComponent, {
+ this.dialog.open(this.complexFilterPredicateDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {
diff --git a/ui-ngx/src/app/modules/home/components/filter/filter-component.models.ts b/ui-ngx/src/app/modules/home/components/filter/filter-component.models.ts
new file mode 100644
index 0000000000..325f89a911
--- /dev/null
+++ b/ui-ngx/src/app/modules/home/components/filter/filter-component.models.ts
@@ -0,0 +1,29 @@
+///
+/// Copyright © 2016-2021 The Thingsboard Authors
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+
+import { ComplexFilterPredicateInfo, EntityKeyValueType } from '@shared/models/query/query.models';
+
+export interface ComplexFilterPredicateDialogData {
+ complexPredicate: ComplexFilterPredicateInfo;
+ key: string;
+ readonly: boolean;
+ isAdd: boolean;
+ valueType: EntityKeyValueType;
+ displayUserParameters: boolean;
+ allowUserDynamicSource: boolean;
+ onlyUserDynamicSource: boolean;
+}
+
diff --git a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts
index 75c9bd3ce8..e23c135d9b 100644
--- a/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts
+++ b/ui-ngx/src/app/modules/home/components/filter/filter-predicate-list.component.ts
@@ -14,7 +14,7 @@
/// limitations under the License.
///
-import { Component, forwardRef, Input, OnInit } from '@angular/core';
+import { Component, forwardRef, Inject, Input, OnInit } from '@angular/core';
import {
AbstractControl,
ControlValueAccessor,
@@ -36,12 +36,11 @@ import {
EntityKeyValueType,
KeyFilterPredicateInfo
} from '@shared/models/query/query.models';
-import {
- ComplexFilterPredicateDialogComponent,
- ComplexFilterPredicateDialogData
-} from '@home/components/filter/complex-filter-predicate-dialog.component';
import { MatDialog } from '@angular/material/dialog';
import { map } from 'rxjs/operators';
+import { ComponentType } from '@angular/cdk/portal';
+import { COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN } from '@home/components/tokens';
+import { ComplexFilterPredicateDialogData } from '@home/components/filter/filter-component.models';
@Component({
selector: 'tb-filter-predicate-list',
@@ -87,6 +86,7 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
private valueChangeSubscription: Subscription = null;
constructor(private fb: FormBuilder,
+ @Inject(COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN) private complexFilterPredicateDialogComponent: ComponentType,
private dialog: MatDialog) {
}
@@ -164,8 +164,8 @@ export class FilterPredicateListComponent implements ControlValueAccessor, Valid
}
private openComplexFilterDialog(predicate: KeyFilterPredicateInfo): Observable {
- return this.dialog.open(ComplexFilterPredicateDialogComponent, {
+ return this.dialog.open(this.complexFilterPredicateDialogComponent, {
disableClose: true,
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
data: {
diff --git a/ui-ngx/src/app/modules/home/components/home-components.module.ts b/ui-ngx/src/app/modules/home/components/home-components.module.ts
index 5e0752fcbc..265c5eb659 100644
--- a/ui-ngx/src/app/modules/home/components/home-components.module.ts
+++ b/ui-ngx/src/app/modules/home/components/home-components.module.ts
@@ -141,6 +141,10 @@ import { WidgetContainerComponent } from '@home/components/widget/widget-contain
import { SnmpDeviceProfileTransportModule } from '@home/components/profile/device/snpm/snmp-device-profile-transport.module';
import { DeviceCredentialsModule } from '@home/components/device/device-credentials.module';
import { DeviceProfileCommonModule } from '@home/components/profile/device/common/device-profile-common.module';
+import {
+ COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN,
+ DASHBOARD_PAGE_COMPONENT_TOKEN
+} from '@home/components/tokens';
@NgModule({
declarations:
@@ -375,7 +379,9 @@ import { DeviceProfileCommonModule } from '@home/components/profile/device/commo
WidgetComponentService,
CustomDialogService,
ImportExportService,
- {provide: EMBED_DASHBOARD_DIALOG_TOKEN, useValue: EmbedDashboardDialogComponent}
+ {provide: EMBED_DASHBOARD_DIALOG_TOKEN, useValue: EmbedDashboardDialogComponent},
+ {provide: COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN, useValue: ComplexFilterPredicateDialogComponent},
+ {provide: DASHBOARD_PAGE_COMPONENT_TOKEN, useValue: DashboardPageComponent}
]
})
export class HomeComponentsModule { }
diff --git a/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts b/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts
index 61cc7ae478..20e21f0aad 100644
--- a/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts
+++ b/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts
@@ -423,7 +423,7 @@ export class ImportExportService {
public importRuleChain(expectedRuleChainType: RuleChainType): Observable {
return this.openImportDialog('rulechain.import', 'rulechain.rulechain-file').pipe(
- mergeMap((ruleChainImport: RuleChainImport) => {
+ map((ruleChainImport: RuleChainImport) => {
if (!this.validateImportedRuleChain(ruleChainImport)) {
this.store.dispatch(new ActionNotificationShow(
{message: this.translate.instant('rulechain.invalid-rulechain-file-error'),
@@ -435,12 +435,7 @@ export class ImportExportService {
type: 'error'}));
throw new Error('Invalid rule chain type');
} else {
- return this.ruleChainService.resolveRuleChainMetadata(ruleChainImport.metadata).pipe(
- map((resolvedMetadata) => {
- ruleChainImport.resolvedMetadata = resolvedMetadata;
- return ruleChainImport;
- })
- );
+ return ruleChainImport;
}
}),
catchError((err) => {
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/common/device-profile-common.module.ts b/ui-ngx/src/app/modules/home/components/profile/device/common/device-profile-common.module.ts
index 0ddcb507bb..e4bbdc919f 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/common/device-profile-common.module.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/common/device-profile-common.module.ts
@@ -15,10 +15,10 @@
///
import { NgModule } from '@angular/core';
-import { PowerModeSettingComponent } from './power-mode-setting.component';
+import { PowerModeSettingComponent } from '@home/components/profile/device/common/power-mode-setting.component';
import { SharedModule } from '@shared/shared.module';
import { CommonModule } from '@angular/common';
-import { TimeUnitSelectComponent } from './time-unit-select.component';
+import { TimeUnitSelectComponent } from '@home/components/profile/device/common/time-unit-select.component';
@NgModule({
declarations: [
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-components.module.ts b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-components.module.ts
index aa801f84dc..e1c8e9a14c 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-components.module.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/lwm2m/lwm2m-profile-components.module.ts
@@ -15,19 +15,19 @@
///
import { NgModule } from '@angular/core';
-import { Lwm2mDeviceProfileTransportConfigurationComponent } from './lwm2m-device-profile-transport-configuration.component';
-import { Lwm2mObjectListComponent } from './lwm2m-object-list.component';
-import { Lwm2mObserveAttrTelemetryComponent } from './lwm2m-observe-attr-telemetry.component';
-import { Lwm2mObserveAttrTelemetryResourcesComponent } from './lwm2m-observe-attr-telemetry-resources.component';
-import { Lwm2mAttributesDialogComponent } from './lwm2m-attributes-dialog.component';
-import { Lwm2mAttributesComponent } from './lwm2m-attributes.component';
-import { Lwm2mAttributesKeyListComponent } from './lwm2m-attributes-key-list.component';
-import { Lwm2mDeviceConfigServerComponent } from './lwm2m-device-config-server.component';
-import { Lwm2mObjectAddInstancesDialogComponent } from './lwm2m-object-add-instances-dialog.component';
-import { Lwm2mObjectAddInstancesListComponent } from './lwm2m-object-add-instances-list.component';
+import { Lwm2mDeviceProfileTransportConfigurationComponent } from '@home/components/profile/device/lwm2m/lwm2m-device-profile-transport-configuration.component';
+import { Lwm2mObjectListComponent } from '@home/components/profile/device/lwm2m/lwm2m-object-list.component';
+import { Lwm2mObserveAttrTelemetryComponent } from '@home/components/profile/device/lwm2m/lwm2m-observe-attr-telemetry.component';
+import { Lwm2mObserveAttrTelemetryResourcesComponent } from '@home/components/profile/device/lwm2m/lwm2m-observe-attr-telemetry-resources.component';
+import { Lwm2mAttributesDialogComponent } from '@home/components/profile/device/lwm2m/lwm2m-attributes-dialog.component';
+import { Lwm2mAttributesComponent } from '@home/components/profile/device/lwm2m/lwm2m-attributes.component';
+import { Lwm2mAttributesKeyListComponent } from '@home/components/profile/device/lwm2m/lwm2m-attributes-key-list.component';
+import { Lwm2mDeviceConfigServerComponent } from '@home/components/profile/device/lwm2m/lwm2m-device-config-server.component';
+import { Lwm2mObjectAddInstancesDialogComponent } from '@home/components/profile/device/lwm2m/lwm2m-object-add-instances-dialog.component';
+import { Lwm2mObjectAddInstancesListComponent } from '@home/components/profile/device/lwm2m/lwm2m-object-add-instances-list.component';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@app/shared/shared.module';
-import { Lwm2mObserveAttrTelemetryInstancesComponent } from './lwm2m-observe-attr-telemetry-instances.component';
+import { Lwm2mObserveAttrTelemetryInstancesComponent } from '@home/components/profile/device/lwm2m/lwm2m-observe-attr-telemetry-instances.component';
import { DeviceProfileCommonModule } from '@home/components/profile/device/common/device-profile-common.module';
@NgModule({
diff --git a/ui-ngx/src/app/modules/home/components/profile/device/snpm/snmp-device-profile-transport.module.ts b/ui-ngx/src/app/modules/home/components/profile/device/snpm/snmp-device-profile-transport.module.ts
index c0797d9b0e..95b7c0180d 100644
--- a/ui-ngx/src/app/modules/home/components/profile/device/snpm/snmp-device-profile-transport.module.ts
+++ b/ui-ngx/src/app/modules/home/components/profile/device/snpm/snmp-device-profile-transport.module.ts
@@ -18,8 +18,8 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '@shared/shared.module';
import { CommonModule } from '@angular/common';
import { SnmpDeviceProfileTransportConfigurationComponent } from '@home/components/profile/device/snpm/snmp-device-profile-transport-configuration.component';
-import { SnmpDeviceProfileCommunicationConfigComponent } from './snmp-device-profile-communication-config.component';
-import { SnmpDeviceProfileMappingComponent } from './snmp-device-profile-mapping.component';
+import { SnmpDeviceProfileCommunicationConfigComponent } from '@home/components/profile/device/snpm/snmp-device-profile-communication-config.component';
+import { SnmpDeviceProfileMappingComponent } from '@home/components/profile/device/snpm/snmp-device-profile-mapping.component';
@NgModule({
declarations: [
diff --git a/ui-ngx/src/app/modules/home/components/shared-home-components.module.ts b/ui-ngx/src/app/modules/home/components/shared-home-components.module.ts
index df6764c573..f2c14a535a 100644
--- a/ui-ngx/src/app/modules/home/components/shared-home-components.module.ts
+++ b/ui-ngx/src/app/modules/home/components/shared-home-components.module.ts
@@ -18,8 +18,12 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '@app/shared/shared.module';
import { AlarmDetailsDialogComponent } from '@home/components/alarm/alarm-details-dialog.component';
+import { SHARED_HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens';
@NgModule({
+ providers: [
+ { provide: SHARED_HOME_COMPONENTS_MODULE_TOKEN, useValue: SharedHomeComponentsModule }
+ ],
declarations:
[
AlarmDetailsDialogComponent
diff --git a/ui-ngx/src/app/modules/home/components/tokens.ts b/ui-ngx/src/app/modules/home/components/tokens.ts
new file mode 100644
index 0000000000..b88ea49a03
--- /dev/null
+++ b/ui-ngx/src/app/modules/home/components/tokens.ts
@@ -0,0 +1,27 @@
+///
+/// Copyright © 2016-2021 The Thingsboard Authors
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+
+import { InjectionToken, Type } from '@angular/core';
+import { ComponentType } from '@angular/cdk/portal';
+
+export const SHARED_HOME_COMPONENTS_MODULE_TOKEN: InjectionToken> =
+ new InjectionToken>('SHARED_HOME_COMPONENTS_MODULE_TOKEN');
+
+export const COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN: InjectionToken> =
+ new InjectionToken>('COMPLEX_FILTER_PREDICATE_DIALOG_COMPONENT_TOKEN');
+
+export const DASHBOARD_PAGE_COMPONENT_TOKEN: InjectionToken> =
+ new InjectionToken>('DASHBOARD_PAGE_COMPONENT_TOKEN');
diff --git a/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts b/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts
index ac41188485..a2d61a9eaa 100644
--- a/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/dialog/custom-dialog.service.ts
@@ -14,21 +14,21 @@
/// limitations under the License.
///
-import { Injectable, NgModule } from '@angular/core';
+import { Inject, Injectable, Type } from '@angular/core';
import { Observable } from 'rxjs';
import { MatDialog } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { AuthService } from '@core/auth/auth.service';
import { DynamicComponentFactoryService } from '@core/services/dynamic-component-factory.service';
import { CommonModule } from '@angular/common';
-import { SharedModule } from '@shared/shared.module';
import { mergeMap, tap } from 'rxjs/operators';
import { CustomDialogComponent } from './custom-dialog.component';
import {
CustomDialogContainerComponent,
CustomDialogContainerData
} from '@home/components/widget/dialog/custom-dialog-container.component';
-import { SharedHomeComponentsModule } from '@home/components/shared-home-components.module';
+import { SHARED_MODULE_TOKEN } from '@shared/components/tokens';
+import { SHARED_HOME_COMPONENTS_MODULE_TOKEN } from '@home/components/tokens';
@Injectable()
export class CustomDialogService {
@@ -37,6 +37,8 @@ export class CustomDialogService {
private translate: TranslateService,
private authService: AuthService,
private dynamicComponentFactoryService: DynamicComponentFactoryService,
+ @Inject(SHARED_MODULE_TOKEN) private sharedModule: Type,
+ @Inject(SHARED_HOME_COMPONENTS_MODULE_TOKEN) private sharedHomeComponentsModule: Type,
public dialog: MatDialog
) {
}
@@ -45,7 +47,7 @@ export class CustomDialogService {
return this.dynamicComponentFactoryService.createDynamicComponentFactory(
class CustomDialogComponentInstance extends CustomDialogComponent {},
template,
- [SharedModule, CustomDialogModule, SharedHomeComponentsModule]).pipe(
+ [this.sharedModule, CommonModule, this.sharedHomeComponentsModule]).pipe(
mergeMap((factory) => {
const dialogData: CustomDialogContainerData = {
controller,
@@ -69,15 +71,3 @@ export class CustomDialogService {
}
-@NgModule({
- declarations:
- [
- ],
- imports: [
- CommonModule,
- SharedModule
- ],
- exports: [
- ]
-})
-class CustomDialogModule { }
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.html
new file mode 100644
index 0000000000..93fa72c84b
--- /dev/null
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.html
@@ -0,0 +1,54 @@
+
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.scss
new file mode 100644
index 0000000000..b9600d8731
--- /dev/null
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.scss
@@ -0,0 +1,21 @@
+/**
+ * Copyright © 2016-2021 The Thingsboard Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+:host {
+ .tb-hint {
+ margin-top: -1.25em;
+ max-width: fit-content;
+ }
+}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.ts
new file mode 100644
index 0000000000..58526a4e66
--- /dev/null
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/dialogs/select-entity-dialog.component.ts
@@ -0,0 +1,56 @@
+///
+/// Copyright © 2016-2021 The Thingsboard Authors
+///
+/// Licensed under the Apache License, Version 2.0 (the "License");
+/// you may not use this file except in compliance with the License.
+/// You may obtain a copy of the License at
+///
+/// http://www.apache.org/licenses/LICENSE-2.0
+///
+/// Unless required by applicable law or agreed to in writing, software
+/// distributed under the License is distributed on an "AS IS" BASIS,
+/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+/// See the License for the specific language governing permissions and
+/// limitations under the License.
+///
+
+import { Component, Inject } from '@angular/core';
+import { DialogComponent } from '@shared/components/dialog.component';
+import { Store } from '@ngrx/store';
+import { AppState } from '@core/core.state';
+import { Router } from '@angular/router';
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { FormattedData } from '@home/components/widget/lib/maps/map-models';
+
+export interface SelectEntityDialogData {
+ entities: FormattedData[];
+}
+
+@Component({
+ selector: 'tb-select-entity-dialog',
+ templateUrl: './select-entity-dialog.component.html',
+ styleUrls: ['./select-entity-dialog.component.scss']
+})
+export class SelectEntityDialogComponent extends DialogComponent {
+
+ selectEntityFormGroup: FormGroup;
+
+ constructor(protected store: Store,
+ protected router: Router,
+ @Inject(MAT_DIALOG_DATA) public data: SelectEntityDialogData,
+ public dialogRef: MatDialogRef,
+ public fb: FormBuilder) {
+ super(store, router, dialogRef);
+
+ this.selectEntityFormGroup = this.fb.group(
+ {
+ entity: ['', Validators.required]
+ }
+ );
+ }
+
+ save(): void {
+ this.dialogRef.close(this.selectEntityFormGroup.value.entity);
+ }
+}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts
index 5120fc8c9e..27d6fb5edc 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts
@@ -14,23 +14,15 @@
/// limitations under the License.
///
-import L, {
- FeatureGroup,
- Icon,
- LatLngBounds,
- LatLngTuple,
- markerClusterGroup,
- MarkerClusterGroup,
- MarkerClusterGroupOptions, Projection
-} from 'leaflet';
+import L, { FeatureGroup, Icon, LatLngBounds, LatLngTuple, Projection } from 'leaflet';
import tinycolor from 'tinycolor2';
import 'leaflet-providers';
-import 'leaflet.markercluster/dist/leaflet.markercluster';
+import { MarkerClusterGroup, MarkerClusterGroupOptions } from 'leaflet.markercluster/dist/leaflet.markercluster';
+import '@geoman-io/leaflet-geoman-free';
import {
defaultSettings,
FormattedData,
- MapProviders,
MapSettings,
MarkerSettings,
PolygonSettings,
@@ -42,9 +34,7 @@ import { Marker } from './markers';
import { Observable, of } from 'rxjs';
import { Polyline } from './polyline';
import { Polygon } from './polygon';
-import {
- createTooltip,
-} from '@home/components/widget/lib/maps/maps-utils';
+import { createTooltip } from '@home/components/widget/lib/maps/maps-utils';
import {
checkLngLat,
createLoadingDiv,
@@ -54,6 +44,12 @@ import {
} from '@home/components/widget/lib/maps/common-maps-utils';
import { WidgetContext } from '@home/models/widget-component.models';
import { deepClone, isDefinedAndNotNull, isEmptyStr, isString } from '@core/utils';
+import { TranslateService } from '@ngx-translate/core';
+import {
+ SelectEntityDialogComponent,
+ SelectEntityDialogData
+} from '@home/components/widget/lib/maps/dialogs/select-entity-dialog.component';
+import { MatDialog } from '@angular/material/dialog';
export default abstract class LeafletMap {
@@ -78,20 +74,24 @@ export default abstract class LeafletMap {
drawRoutes: boolean;
showPolygon: boolean;
updatePending = false;
+ editPolygons = false;
+ selectedEntity: FormattedData;
addMarkers: L.Marker[] = [];
addPolygons: L.Polygon[] = [];
// tslint:disable-next-line:no-string-literal
southWest = new L.LatLng(-Projection.SphericalMercator['MAX_LATITUDE'], -180);
// tslint:disable-next-line:no-string-literal
northEast = new L.LatLng(Projection.SphericalMercator['MAX_LATITUDE'], 180);
- mousePositionOnMap: L.LatLng;
- addMarker: L.Control;
- addPolygon: L.Control;
+ saveLocation: (e: FormattedData, values: {[key: string]: any}) => Observable;
+ saveMarkerLocation: (e: FormattedData, lat?: number, lng?: number) => Observable;
+ savePolygonLocation: (e: FormattedData, coordinates?: Array) => Observable;
protected constructor(public ctx: WidgetContext,
public $container: HTMLElement,
options: UnitedMapSettings) {
this.options = options;
+ this.editPolygons = options.showPolygon && options.editablePolygon;
+ L.Icon.Default.imagePath = '/';
}
public initSettings(options: MapSettings) {
@@ -102,16 +102,28 @@ export default abstract class LeafletMap {
removeOutsideVisibleBounds,
animate,
chunkedLoading,
+ spiderfyOnMaxZoom,
maxClusterRadius,
maxZoom }: MapSettings = options;
if (useClusterMarkers) {
+ // disabled marker cluster icon
+ (L as any).MarkerCluster = (L as any).MarkerCluster.extend({
+ options: { pmIgnore: true, ...L.Icon.prototype.options }
+ });
const clusteringSettings: MarkerClusterGroupOptions = {
- spiderfyOnMaxZoom: false,
+ spiderfyOnMaxZoom,
zoomToBoundsOnClick: zoomOnClick,
showCoverageOnHover,
removeOutsideVisibleBounds,
animate,
- chunkedLoading
+ chunkedLoading,
+ pmIgnore: true,
+ spiderLegPolylineOptions: {
+ pmIgnore: true
+ },
+ polygonOptions: {
+ pmIgnore: true
+ }
};
if (maxClusterRadius && maxClusterRadius > 0) {
clusteringSettings.maxClusterRadius = Math.floor(maxClusterRadius);
@@ -119,183 +131,166 @@ export default abstract class LeafletMap {
if (maxZoom && maxZoom >= 0 && maxZoom < 19) {
clusteringSettings.disableClusteringAtZoom = Math.floor(maxZoom);
}
- this.markersCluster = markerClusterGroup(clusteringSettings);
+ this.markersCluster = new MarkerClusterGroup(clusteringSettings);
}
}
- addMarkerControl() {
- if (this.options.draggableMarker) {
- this.map.on('mousemove', (e: L.LeafletMouseEvent) => {
- this.mousePositionOnMap = e.latlng;
- });
- const dragListener = (e: L.DragEndEvent) => {
- if (e.type === 'dragend' && this.mousePositionOnMap) {
- const icon = L.icon({
- iconRetinaUrl: 'marker-icon-2x.png',
- iconUrl: 'marker-icon.png',
- shadowUrl: 'marker-shadow.png',
- iconSize: [25, 41],
- iconAnchor: [12, 41],
- popupAnchor: [1, -34],
- tooltipAnchor: [16, -28],
- shadowSize: [41, 41]
- });
- const customLatLng = this.convertToCustomFormat(this.mousePositionOnMap);
- this.mousePositionOnMap.lat = customLatLng[this.options.latKeyName];
- this.mousePositionOnMap.lng = customLatLng[this.options.lngKeyName];
-
- const newMarker = L.marker(this.mousePositionOnMap, { icon }).addTo(this.map);
- this.addMarkers.push(newMarker);
- const datasourcesList = document.createElement('div');
- const header = document.createElement('p');
- header.appendChild(document.createTextNode('Select entity:'));
- header.setAttribute('style', 'font-size: 14px; margin: 8px 0');
- datasourcesList.appendChild(header);
- this.datasources.forEach(ds => {
- const dsItem = document.createElement('p');
- dsItem.appendChild(document.createTextNode(ds.entityName));
- dsItem.setAttribute('style', 'font-size: 14px; margin: 8px 0; cursor: pointer');
- dsItem.onclick = () => {
- const updatedEnttity = { ...ds, ...customLatLng };
- this.saveMarkerLocation(updatedEnttity).subscribe(() => {
- this.map.removeLayer(newMarker);
- const markerIndex = this.addMarkers.indexOf(newMarker);
- if (markerIndex > -1) {
- this.addMarkers.splice(markerIndex, 1);
- }
- this.deleteMarker(ds.entityName);
- this.createMarker(ds.entityName, updatedEnttity, this.datasources, this.options);
- });
- };
- datasourcesList.appendChild(dsItem);
- });
- datasourcesList.appendChild(document.createElement('br'));
- const deleteBtn = document.createElement('a');
- deleteBtn.appendChild(document.createTextNode('Discard changes'));
- deleteBtn.onclick = () => {
- this.map.removeLayer(newMarker);
- const markerIndex = this.addMarkers.indexOf(newMarker);
- if (markerIndex > -1) {
- this.addMarkers.splice(markerIndex, 1);
- }
- };
- datasourcesList.appendChild(deleteBtn);
- const popup = L.popup();
- popup.setContent(datasourcesList);
- newMarker.bindPopup(popup).openPopup();
- }
- this.addMarker.setPosition('topright');
- };
- const addMarker = L.Control.extend({
- onAdd() {
- const img = L.DomUtil.create('img') as any;
- img.src = `assets/add_location.svg`;
- img.style.width = '32px';
- img.style.height = '32px';
- img.title = 'Drag and drop to add marker';
- img.onclick = this.dragMarker;
- img.draggable = true;
- const draggableImg = new L.Draggable(img);
- draggableImg.enable();
- draggableImg.on('dragend', dragListener);
- return img;
- },
- onRemove() {
- },
- dragMarker: this.dragMarker
- } as any);
- const addMarkerControl = (opts) => {
- return new addMarker(opts);
- };
- this.addMarker = addMarkerControl({ position: 'topright' }).addTo(this.map);
+ private selectEntityWithoutLocationDialog(shapes: L.PM.SUPPORTED_SHAPES): Observable {
+ let entities;
+ switch (shapes) {
+ case 'Polygon':
+ case 'Rectangle':
+ entities = this.datasources.filter(pData => !this.isValidPolygonPosition(pData));
+ break;
+ case 'Marker':
+ entities = this.datasources.filter(mData => !this.convertPosition(mData));
+ break;
+ default:
+ return of(null);
+ }
+ if (entities.length === 1) {
+ return of(entities[0]);
+ }
+ const dialog = this.ctx.$injector.get(MatDialog);
+ return dialog.open(SelectEntityDialogComponent,
+ {
+ disableClose: true,
+ panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
+ data: {
+ entities
+ }
+ }).afterClosed();
+ }
+
+ private selectEntityWithoutLocation(type: string) {
+ this.selectEntityWithoutLocationDialog(type.substring(2)).subscribe((data) => {
+ if (data !== null) {
+ this.selectedEntity = data;
+ this.toggleDrawMode(type);
+ } else {
+ // @ts-ignore
+ this.map.pm.Toolbar.toggleButton(type, false);
}
+ });
+ }
+
+ private toggleDrawMode(type: string) {
+ this.map.pm.Draw[type].toggle();
}
- addPolygonControl() {
- if (this.options.showPolygon && this.options.editablePolygon) {
- this.map.on('mousemove', (e: L.LeafletMouseEvent) => {
- this.mousePositionOnMap = e.latlng;
+ addEditControl() {
+ // Customize edit marker
+ if (this.options.draggableMarker) {
+ const actions = [{
+ text: L.PM.Utils.getTranslation('actions.cancel'),
+ onClick: () => this.toggleDrawMode('tbMarker')
+ }];
+
+ this.map.pm.Toolbar.copyDrawControl('Marker', {
+ name: 'tbMarker',
+ afterClick: () => this.selectEntityWithoutLocation('tbMarker'),
+ disabled: true,
+ actions
+ });
+ }
+
+ // Customize edit polygon
+ if (this.editPolygons) {
+ const rectangleActions = [
+ {
+ text: L.PM.Utils.getTranslation('actions.cancel'),
+ onClick: () => this.toggleDrawMode('tbRectangle')
+ }
+ ];
+
+ const polygonActions = [
+ 'finish' as const,
+ 'removeLastVertex' as const,
+ {
+ text: L.PM.Utils.getTranslation('actions.cancel'),
+ onClick: () => this.toggleDrawMode('tbPolygon')
+ }
+ ];
+
+ this.map.pm.Toolbar.copyDrawControl('Rectangle', {
+ name: 'tbRectangle',
+ afterClick: () => this.selectEntityWithoutLocation('tbRectangle'),
+ disabled: true,
+ actions: rectangleActions
+ });
+
+ this.map.pm.Toolbar.copyDrawControl('Polygon', {
+ name: 'tbPolygon',
+ afterClick: () => this.selectEntityWithoutLocation('tbPolygon'),
+ disabled: true,
+ actions: polygonActions
+ });
+ }
+
+ const translateService = this.ctx.$injector.get(TranslateService);
+ this.map.pm.setLang('en', translateService.instant('widgets.maps'), 'en');
+ this.map.pm.addControls({
+ position: 'topleft',
+ drawMarker: false,
+ drawCircle: false,
+ drawCircleMarker: false,
+ drawRectangle: false,
+ drawPolyline: false,
+ drawPolygon: false,
+ editMode: this.editPolygons,
+ cutPolygon: this.editPolygons,
+ rotateMode: this.editPolygons
});
- const dragListener = (e: L.DragEndEvent) => {
- if (e.type === 'dragend') {
- const polygonOffset = this.options.provider === MapProviders.image ? 10 : 0.01;
-
- const convert = this.convertToCustomFormat(this.mousePositionOnMap, polygonOffset);
- this.mousePositionOnMap.lat = convert[this.options.latKeyName];
- this.mousePositionOnMap.lng = convert[this.options.lngKeyName];
-
- const latlng1 = this.mousePositionOnMap;
- const latlng2 = L.latLng(this.mousePositionOnMap.lat, this.mousePositionOnMap.lng + polygonOffset);
- const latlng3 = L.latLng(this.mousePositionOnMap.lat - polygonOffset, this.mousePositionOnMap.lng);
- const polygonPoints = [latlng1, latlng2, latlng3];
-
- const newPolygon = L.polygon(polygonPoints).addTo(this.map);
- this.addPolygons.push(newPolygon);
- const datasourcesList = document.createElement('div');
- const customLatLng = {[this.options.polygonKeyName]: this.convertToPolygonFormat(polygonPoints)};
- const header = document.createElement('p');
- header.appendChild(document.createTextNode('Select entity:'));
- header.setAttribute('style', 'font-size: 14px; margin: 8px 0');
- datasourcesList.appendChild(header);
- this.datasources.forEach(ds => {
- const dsItem = document.createElement('p');
- dsItem.appendChild(document.createTextNode(ds.entityName));
- dsItem.setAttribute('style', 'font-size: 14px; margin: 8px 0; cursor: pointer');
- dsItem.onclick = () => {
- const updatedEnttity = { ...ds, ...customLatLng };
- this.savePolygonLocation(updatedEnttity).subscribe(() => {
- this.map.removeLayer(newPolygon);
- const polygonIndex = this.addPolygons.indexOf(newPolygon);
- if (polygonIndex > -1) {
- this.addPolygons.splice(polygonIndex, 1);
- }
- this.deletePolygon(ds.entityName);
- });
- };
- datasourcesList.appendChild(dsItem);
+ this.map.on('pm:create', (e) => {
+ if (e.shape === 'tbMarker') {
+ // @ts-ignore
+ this.saveLocation(this.selectedEntity, this.convertToCustomFormat(e.layer.getLatLng())).subscribe(() => {
+ });
+ } else if (e.shape === 'tbRectangle' || e.shape === 'tbPolygon') {
+ // @ts-ignore
+ this.saveLocation(this.selectedEntity, this.convertPolygonToCustomFormat(e.layer.getLatLngs()[0])).subscribe(() => {
});
- datasourcesList.appendChild(document.createElement('br'));
- const deleteBtn = document.createElement('a');
- deleteBtn.appendChild(document.createTextNode('Discard changes'));
- deleteBtn.onclick = () => {
- this.map.removeLayer(newPolygon);
- const polygonIndex = this.addPolygons.indexOf(newPolygon);
- if (polygonIndex > -1) {
- this.addPolygons.splice(polygonIndex, 1);
- }
- };
- datasourcesList.appendChild(deleteBtn);
- const popup = L.popup();
- popup.setContent(datasourcesList);
- newPolygon.bindPopup(popup).openPopup();
}
- this.addPolygon.setPosition('topright');
- };
- const addPolygon = L.Control.extend({
- onAdd() {
- const img = L.DomUtil.create('img') as any;
- img.src = `assets/add_polygon.svg`;
- img.style.width = '32px';
- img.style.height = '32px';
- img.title = 'Drag and drop to add Polygon';
- img.onclick = this.dragPolygonVertex;
- img.draggable = true;
- const draggableImg = new L.Draggable(img);
- draggableImg.enable();
- draggableImg.on('dragend', dragListener);
- return img;
- },
- onRemove() {
- },
- dragPolygonVertex: this.dragPolygonVertex
- } as any);
- const addPolygonControl = (opts) => {
- return new addPolygon(opts);
- };
- this.addPolygon = addPolygonControl({ position: 'topright' }).addTo(this.map);
+ // @ts-ignore
+ e.layer._pmTempLayer = true;
+ e.layer.remove();
+ });
+
+ this.map.on('pm:cut', (e) => {
+ // @ts-ignore
+ e.originalLayer.setLatLngs(e.layer.getLatLngs());
+ e.originalLayer.addTo(this.map);
+ // @ts-ignore
+ e.originalLayer._pmTempLayer = false;
+ const iterator = this.polygons.values();
+ let result = iterator.next();
+ while (!result.done && e.originalLayer !== result.value.leafletPoly) {
+ result = iterator.next();
+ }
+ // @ts-ignore
+ e.layer._pmTempLayer = true;
+ e.layer.remove();
+ });
+
+ this.map.on('pm:remove', (e) => {
+ if (e.shape === 'Marker') {
+ const iterator = this.markers.values();
+ let result = iterator.next();
+ while (!result.done && e.layer !== result.value.leafletMarker) {
+ result = iterator.next();
+ }
+ this.saveLocation(result.value.data, this.convertToCustomFormat(null)).subscribe(() => {});
+ } else if (e.shape === 'Polygon') {
+ const iterator = this.polygons.values();
+ let result = iterator.next();
+ while (!result.done && e.layer !== result.value.leafletPoly) {
+ result = iterator.next();
+ }
+ this.saveLocation(result.value.data, this.convertPolygonToCustomFormat(null)).subscribe(() => {});
+ }
+ });
}
- }
public setLoading(loading: boolean) {
if (this.loading !== loading) {
@@ -337,11 +332,10 @@ export default abstract class LeafletMap {
if (this.options.disableScrollZooming) {
this.map.scrollWheelZoom.disable();
}
- if (this.options.draggableMarker) {
- this.addMarkerControl();
- }
- if (this.options.editablePolygon) {
- this.addPolygonControl();
+ if (this.options.draggableMarker || this.editPolygons) {
+ this.addEditControl();
+ } else {
+ this.map.pm.disableDraw();
}
if (this.options.useClusterMarkers) {
this.map.addLayer(this.markersCluster);
@@ -352,14 +346,6 @@ export default abstract class LeafletMap {
}
}
- public saveMarkerLocation(datasource: FormattedData, lat?: number, lng?: number): Observable {
- return of(null);
- }
-
- public savePolygonLocation(datasource: FormattedData, coordinates?: Array<[number, number]>): Observable {
- return of(null);
- }
-
createLatLng(lat: number, lng: number): L.LatLng {
return L.latLng(lat, lng);
}
@@ -441,7 +427,7 @@ export default abstract class LeafletMap {
}
convertToCustomFormat(position: L.LatLng, offset = 0): object {
- position = checkLngLat(position, this.southWest, this.northEast, offset);
+ position = position ? checkLngLat(position, this.southWest, this.northEast, offset) : {lat: null, lng: null} as L.LatLng;
return {
[this.options.latKeyName]: position.lat,
@@ -455,17 +441,18 @@ export default abstract class LeafletMap {
if (point.length) {
return this.convertToPolygonFormat(point);
} else {
- return [point.lat, point.lng];
+ const convertPoint = checkLngLat(point, this.southWest, this.northEast);
+ return [convertPoint.lat, convertPoint.lng];
}
});
- } else {
- return [];
}
+ return [];
}
- convertPolygonToCustomFormat(expression: any[][]): object {
+ convertPolygonToCustomFormat(expression: any[][]): {[key: string]: any} {
+ const coordinate = expression ? this.convertToPolygonFormat(expression) : null;
return {
- [this.options.polygonKeyName] : this.convertToPolygonFormat(expression)
+ [this.options.polygonKeyName]: coordinate
};
}
@@ -484,7 +471,15 @@ export default abstract class LeafletMap {
}
this.updateMarkers(formattedData, false);
this.updateBoundsInternal();
- if (this.options.draggableMarker || this.options.editablePolygon) {
+ if (this.options.draggableMarker) {
+ const foundEntityWithoutLocation = formattedData.some(mData => !this.convertPosition(mData));
+ this.map.pm.Toolbar.setButtonDisabled('tbMarker', !foundEntityWithoutLocation);
+ this.datasources = formattedData;
+ }
+ if (this.editPolygons) {
+ const foundEntityWithoutPolygon = formattedData.some(pData => !this.isValidPolygonPosition(pData));
+ this.map.pm.Toolbar.setButtonDisabled('tbPolygon', !foundEntityWithoutPolygon);
+ this.map.pm.Toolbar.setButtonDisabled('tbRectangle', !foundEntityWithoutPolygon);
this.datasources = formattedData;
}
} else {
@@ -577,10 +572,10 @@ export default abstract class LeafletMap {
}
dragMarker = (e, data = {} as FormattedData) => {
- if (e.type !== 'dragend') {
+ if (e === undefined) {
return;
}
- this.saveMarkerLocation({ ...data, ...this.convertToCustomFormat(e.target._latlng) }).subscribe();
+ this.saveLocation(data, this.convertToCustomFormat(e.target._latlng)).subscribe();
}
private createMarker(key: string, data: FormattedData, dataSources: FormattedData[], settings: MarkerSettings,
@@ -728,11 +723,15 @@ export default abstract class LeafletMap {
// Polygon
+ isValidPolygonPosition(data: FormattedData): boolean {
+ return data && isDefinedAndNotNull(data[this.options.polygonKeyName]) && !isEmptyStr(data[this.options.polygonKeyName]);
+ }
+
updatePolygons(polyData: FormattedData[], updateBounds = true) {
const keys: string[] = [];
this.polygonsData = deepClone(polyData);
polyData.forEach((data: FormattedData) => {
- if (data && isDefinedAndNotNull(data[this.options.polygonKeyName]) && !isEmptyStr(data[this.options.polygonKeyName])) {
+ if (this.isValidPolygonPosition(data)) {
if (isString((data[this.options.polygonKeyName]))) {
data[this.options.polygonKeyName] = JSON.parse(data[this.options.polygonKeyName]);
}
@@ -758,15 +757,14 @@ export default abstract class LeafletMap {
}
dragPolygonVertex = (e?, data = {} as FormattedData) => {
- if (e === undefined || (e.type !== 'editable:vertex:dragend' && e.type !== 'editable:vertex:deleted')) {
+ if (e === undefined) {
return;
}
- if (this.options.provider !== MapProviders.image) {
- for (const key of Object.keys(e.layer._latlngs[0])) {
- e.layer._latlngs[0][key] = checkLngLat(e.layer._latlngs[0][key], this.southWest, this.northEast);
- }
+ let coordinates = e.layer.getLatLngs();
+ if (coordinates.length === 1) {
+ coordinates = coordinates[0];
}
- this.savePolygonLocation({ ...data, ...this.convertPolygonToCustomFormat(e.layer._latlngs) }).subscribe();
+ this.saveLocation(data, this.convertPolygonToCustomFormat(coordinates)).subscribe(() => {});
}
createPolygon(polyData: FormattedData, dataSources: FormattedData[], settings: PolygonSettings, updateBounds = true) {
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-models.ts
index d9183c1cb6..5b99b792e9 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-models.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-models.ts
@@ -57,6 +57,7 @@ export type MapSettings = {
showCoverageOnHover: boolean,
animate: boolean,
maxClusterRadius: number,
+ spiderfyOnMaxZoom: boolean,
chunkedLoading: boolean,
removeOutsideVisibleBounds: boolean,
useCustomProvider: boolean,
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts
index 3ad10a0980..a2385b2877 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts
@@ -14,42 +14,30 @@
/// limitations under the License.
///
-import {
- defaultSettings,
- FormattedData,
- hereProviders,
- MapProviders,
- UnitedMapSettings
-} from './map-models';
+import { defaultSettings, FormattedData, hereProviders, MapProviders, UnitedMapSettings } from './map-models';
import LeafletMap from './leaflet-map';
import {
commonMapSettingsSchema,
mapPolygonSchema,
- mapProviderSchema,
markerClusteringSettingsSchema,
markerClusteringSettingsSchemaLeaflet,
routeMapSettingsSchema
} from './schemes';
import { MapWidgetInterface, MapWidgetStaticInterface } from './map-widget.interface';
-import {
- addCondition,
- addGroupInfo,
- addToSchema,
- initSchema,
- mergeSchemes
-} from '@core/schema-utils';
+import { addCondition, addGroupInfo, addToSchema, initSchema, mergeSchemes } from '@core/schema-utils';
import { WidgetContext } from '@app/modules/home/models/widget-component.models';
import { getDefCenterPosition, getProviderSchema, parseFunction, parseWithTranslation } from './common-maps-utils';
import { Datasource, DatasourceData, JsonSettingsSchema, WidgetActionDescriptor } from '@shared/models/widget.models';
-import { EntityId } from '@shared/models/id/entity-id';
-import { AttributeScope, DataKeyType, LatestTelemetry } from '@shared/models/telemetry/telemetry.models';
-import { AttributeService } from '@core/http/attribute.service';
import { TranslateService } from '@ngx-translate/core';
import { UtilsService } from '@core/services/utils.service';
import { EntityDataPageLink } from '@shared/models/query/query.models';
+import { providerClass } from '@home/components/widget/lib/maps/providers';
import { isDefined } from '@core/utils';
+import L from 'leaflet';
import { forkJoin, Observable, of } from 'rxjs';
-import { providerClass } from '@home/components/widget/lib/maps/providers';
+import { AttributeService } from '@core/http/attribute.service';
+import { EntityId } from '@shared/models/id/entity-id';
+import { AttributeScope, DataKeyType, LatestTelemetry } from '@shared/models/telemetry/telemetry.models';
// @dynamic
export class MapWidgetController implements MapWidgetInterface {
@@ -81,8 +69,10 @@ export class MapWidgetController implements MapWidgetInterface {
}
parseWithTranslation.setTranslate(this.translate);
this.map = new MapClass(this.ctx, $element, this.settings);
- this.map.saveMarkerLocation = this.setMarkerLocation;
- this.map.savePolygonLocation = this.savePolygonLocation;
+ (this.ctx as any).mapInstance = this.map;
+ this.map.saveMarkerLocation = this.setMarkerLocation.bind(this);
+ this.map.savePolygonLocation = this.savePolygonLocation.bind(this);
+ this.map.saveLocation = this.saveLocation.bind(this);
this.pageLink = {
page: 0,
pageSize: this.settings.mapPageSize,
@@ -178,111 +168,85 @@ export class MapWidgetController implements MapWidgetInterface {
}, entityName, null, entityLabel);
}
- setMarkerLocation = (e: FormattedData, lat?: number, lng?: number) => {
- const attributeService = this.ctx.$injector.get(AttributeService);
-
- const entityId: EntityId = {
- entityType: e.$datasource.entityType,
- id: e.$datasource.entityId
+ setMarkerLocation(e: FormattedData, lat?: number, lng?: number) {
+ let markerValue;
+ if (isDefined(lat) && isDefined(lng)) {
+ const point = lat != null && lng !== null ? L.latLng(lat, lng) : null;
+ markerValue = this.map.convertToCustomFormat(point);
+ } else if (this.settings.mapProvider !== MapProviders.image) {
+ markerValue = {
+ [this.settings.latKeyName]: e[this.settings.latKeyName],
+ [this.settings.lngKeyName]: e[this.settings.lngKeyName],
};
- const attributes = [];
- const timeseries = [];
+ } else {
+ markerValue = {
+ [this.settings.xPosKeyName]: e[this.settings.xPosKeyName],
+ [this.settings.yPosKeyName]: e[this.settings.yPosKeyName],
+ };
+ }
+ return this.saveLocation(e, markerValue);
+ }
- const latProperties = [this.settings.latKeyName, this.settings.xPosKeyName];
- const lngProperties = [this.settings.lngKeyName, this.settings.yPosKeyName];
- e.$datasource.dataKeys.forEach(key => {
- let value;
- if (latProperties.includes(key.name)) {
- value = {
- key: key.name,
- value: isDefined(lat) ? lat : e[key.name]
- };
- } else if (lngProperties.includes(key.name)) {
- value = {
- key: key.name,
- value: isDefined(lng) ? lng : e[key.name]
- };
- }
- if (value) {
- if (key.type === DataKeyType.attribute) {
- attributes.push(value);
- }
- if (key.type === DataKeyType.timeseries) {
- timeseries.push(value);
- }
- }
- });
- const observables: Observable[] = [];
- if (timeseries.length) {
- observables.push(attributeService.saveEntityTimeseries(
- entityId,
- LatestTelemetry.LATEST_TELEMETRY,
- timeseries
- ));
- }
- if (attributes.length) {
- observables.push(attributeService.saveEntityAttributes(
- entityId,
- AttributeScope.SERVER_SCOPE,
- attributes
- ));
- }
- if (observables.length) {
- return forkJoin(observables);
- } else {
- return of(null);
- }
+ savePolygonLocation(e: FormattedData, coordinates?: Array) {
+ let polygonValue;
+ if (isDefined(coordinates)) {
+ polygonValue = this.map.convertToPolygonFormat(coordinates);
+ } else {
+ polygonValue = {
+ [this.settings.polygonKeyName]: e[this.settings.polygonKeyName]
+ };
+ }
+ return this.saveLocation(e, polygonValue);
}
- savePolygonLocation = (e: FormattedData, coordinates?: Array) => {
- const attributeService = this.ctx.$injector.get(AttributeService);
+ saveLocation(e: FormattedData, values: {[key: string]: any}): Observable {
+ const attributeService = this.ctx.$injector.get(AttributeService);
+ const attributes = [];
+ const timeseries = [];
- const entityId: EntityId = {
- entityType: e.$datasource.entityType,
- id: e.$datasource.entityId
- };
- const attributes = [];
- const timeseries = [];
+ const entityId: EntityId = {
+ entityType: e.$datasource.entityType,
+ id: e.$datasource.entityId
+ };
- const coordinatesProperties = this.settings.polygonKeyName;
- e.$datasource.dataKeys.forEach(key => {
- let value;
- if (coordinatesProperties === key.name) {
- value = {
- key: key.name,
- value: isDefined(coordinates) ? coordinates : e[key.name]
- };
- }
- if (value) {
- if (key.type === DataKeyType.attribute) {
- attributes.push(value);
- }
- if (key.type === DataKeyType.timeseries) {
- timeseries.push(value);
+ for (const dataKeyName of Object.keys(values)) {
+ for (const key of e.$datasource.dataKeys) {
+ if (dataKeyName === key.name) {
+ const value = {
+ key: key.name,
+ value: values[dataKeyName]
+ };
+ if (key.type === DataKeyType.attribute) {
+ attributes.push(value);
+ } else if (key.type === DataKeyType.timeseries) {
+ timeseries.push(value);
+ }
+ break;
+ }
}
}
- });
- const observables: Observable[] = [];
- if (timeseries.length) {
- observables.push(attributeService.saveEntityTimeseries(
- entityId,
- LatestTelemetry.LATEST_TELEMETRY,
- timeseries
- ));
- }
- if (attributes.length) {
- observables.push(attributeService.saveEntityAttributes(
- entityId,
- AttributeScope.SERVER_SCOPE,
- attributes
- ));
- }
- if (observables.length) {
- return forkJoin(observables);
- } else {
- return of(null);
+
+ const observables: Observable[] = [];
+ if (timeseries.length) {
+ observables.push(attributeService.saveEntityTimeseries(
+ entityId,
+ LatestTelemetry.LATEST_TELEMETRY,
+ timeseries
+ ));
+ }
+ if (attributes.length) {
+ observables.push(attributeService.saveEntityAttributes(
+ entityId,
+ AttributeScope.SERVER_SCOPE,
+ attributes
+ ));
+ }
+ if (observables.length) {
+ return forkJoin(observables);
+ } else {
+ return of(null);
+ }
}
- }
initSettings(settings: UnitedMapSettings, isEditMap?: boolean): UnitedMapSettings {
const functionParams = ['data', 'dsData', 'dsIndex'];
@@ -335,6 +299,7 @@ export class MapWidgetController implements MapWidgetInterface {
}
destroy() {
+ (this.ctx as any).mapInstance = null;
if (this.map) {
this.map.remove();
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.scss b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.scss
index 7abf1423c7..147386685c 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.scss
@@ -29,6 +29,10 @@
box-shadow: none;
}
-.leaflet-container{
+.leaflet-container {
background-color: white;
}
+
+.leaflet-buttons-control-button.pm-disabled {
+ pointer-events: none;
+}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts
index cd3f19980f..5550706402 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/markers.ts
@@ -42,9 +42,7 @@ export class Marker {
constructor(private map: LeafletMap, private location: L.LatLng, public settings: MarkerSettings,
data?: FormattedData, dataSources?, onDragendListener?) {
this.setDataSources(data, dataSources);
- this.leafletMarker = L.marker(location, {
- draggable: settings.draggableMarker
- });
+ this.leafletMarker = L.marker(location, {pmIgnore: !settings.draggableMarker});
this.markerOffset = [
isDefined(settings.markerOffsetX) ? settings.markerOffsetX : 0.5,
@@ -72,8 +70,8 @@ export class Marker {
});
}
- if (onDragendListener) {
- this.leafletMarker.on('dragend', (e) => onDragendListener(e, this.data));
+ if (settings.draggableMarker && onDragendListener) {
+ this.leafletMarker.on('pm:dragend', (e) => onDragendListener(e, this.data));
}
}
@@ -199,19 +197,24 @@ export class Marker {
createColoredMarkerIcon(color: tinycolor.Instance): { size: number[], icon: Icon } {
return {
- size: [21, 34],
- icon: L.icon({
- iconUrl: 'https://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|' + color.toHex(),
- iconSize: [21, 34],
- iconAnchor: [21 * this.markerOffset[0], 34 * this.markerOffset[1]],
- popupAnchor: [0, -34],
- shadowUrl: 'https://chart.apis.google.com/chart?chst=d_map_pin_shadow',
- shadowSize: [40, 37],
- shadowAnchor: [12, 35]
+ size: [21, 34],
+ icon: L.icon({
+ iconUrl: this.createColorIconURI(color),
+ iconSize: [21, 34],
+ iconAnchor: [21 * this.markerOffset[0], 34 * this.markerOffset[1]],
+ popupAnchor: [0, -34],
+ shadowUrl: 'assets/shadow.png',
+ shadowSize: [40, 37],
+ shadowAnchor: [12, 35]
})
};
}
+ createColorIconURI(color: tinycolor.Instance): string {
+ const svg = ``;
+ return 'data:image/svg+xml;base64,' + btoa(svg);
+ }
+
removeMarker() {
/* this.map$.subscribe(map =>
this.leafletMarker.addTo(map))*/
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts
index c7cca2a40b..d87d764d0a 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts
@@ -17,7 +17,6 @@
import L, { LatLngExpression, LeafletMouseEvent } from 'leaflet';
import { createTooltip } from './maps-utils';
import { functionValueCalculator, parseWithTranslation, safeExecute } from './common-maps-utils';
-import 'leaflet-editable/src/Leaflet.Editable';
import { FormattedData, PolygonSettings } from './map-models';
export class Polygon {
@@ -37,14 +36,12 @@ export class Polygon {
color: settings.polygonStrokeColor,
weight: settings.polygonStrokeWeight,
fillOpacity: settings.polygonOpacity,
- opacity: settings.polygonStrokeOpacity
+ opacity: settings.polygonStrokeOpacity,
+ pmIgnore: !settings.editablePolygon
}).addTo(this.map);
- if (settings.editablePolygon) {
- this.leafletPoly.enableEdit(this.map);
- if (onDragendListener) {
- this.leafletPoly.on('editable:vertex:dragend', e => onDragendListener(e, this.data));
- this.leafletPoly.on('editable:vertex:deleted', e => onDragendListener(e, this.data));
- }
+
+ if (settings.editablePolygon && onDragendListener) {
+ this.leafletPoly.on('pm:edit', (e) => onDragendListener(e, this.data));
}
@@ -73,13 +70,7 @@ export class Polygon {
updatePolygon(data: FormattedData, dataSources: FormattedData[], settings: PolygonSettings) {
this.data = data;
this.dataSources = dataSources;
- if (settings.editablePolygon) {
- this.leafletPoly.disableEdit();
- }
this.leafletPoly.setLatLngs(data[this.settings.polygonKeyName]);
- if (settings.editablePolygon) {
- this.leafletPoly.enableEdit(this.map);
- }
if (settings.showPolygonTooltip) {
this.updateTooltip(this.data);
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/polyline.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/polyline.ts
index be319ded3a..895dc15763 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/polyline.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/polyline.ts
@@ -14,7 +14,8 @@
/// limitations under the License.
///
-import L, { PolylineDecoratorOptions } from 'leaflet';
+// @ts-ignore
+import L, { PolylineDecorator, PolylineDecoratorOptions, Symbol } from 'leaflet';
import 'leaflet-polylinedecorator';
import { FormattedData, PolylineSettings } from './map-models';
@@ -23,7 +24,7 @@ import { functionValueCalculator } from '@home/components/widget/lib/maps/common
export class Polyline {
leafletPoly: L.Polyline;
- polylineDecorator: L.PolylineDecorator;
+ polylineDecorator: PolylineDecorator;
dataSources: FormattedData[];
data: FormattedData;
@@ -36,7 +37,7 @@ export class Polyline {
).addTo(this.map);
if (settings.usePolylineDecorator) {
- this.polylineDecorator = L.polylineDecorator(this.leafletPoly, this.getDecoratorSettings(settings)).addTo(this.map);
+ this.polylineDecorator = new PolylineDecorator(this.leafletPoly, this.getDecoratorSettings(settings)).addTo(this.map);
}
}
@@ -47,7 +48,7 @@ export class Polyline {
offset: settings.decoratorOffset,
endOffset: settings.endDecoratorOffset,
repeat: settings.decoratorRepeat,
- symbol: L.Symbol[settings.decoratorSymbol]({
+ symbol: Symbol[settings.decoratorSymbol]({
pixelSize: settings.decoratorSymbolSize,
polygon: false,
pathOptions: {
@@ -78,7 +79,8 @@ export class Polyline {
opacity: functionValueCalculator(settings.useStrokeOpacityFunction, settings.strokeOpacityFunction,
[this.data, this.dataSources, this.data.dsIndex], settings.strokeOpacity),
weight: functionValueCalculator(settings.useStrokeWeightFunction, settings.strokeWeightFunction,
- [this.data, this.dataSources, this.data.dsIndex], settings.strokeWeight)
+ [this.data, this.dataSources, this.data.dsIndex], settings.strokeWeight),
+ pmIgnore: true
};
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts
index f3369dd46c..00d9353218 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts
@@ -38,7 +38,6 @@ export class GoogleMap extends LeafletMap {
this.loadGoogle(() => {
const map = L.map($container, {
attributionControl: false,
- editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
(L.gridLayer as any).googleMutant({
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/here-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/here-map.ts
index e15c897c3b..caac9a78b4 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/here-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/here-map.ts
@@ -23,7 +23,6 @@ export class HEREMap extends LeafletMap {
constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) {
super(ctx, $container, options);
const map = L.map($container, {
- editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
const tileLayer = (L.tileLayer as any).provider(options.mapProviderHere || 'HERE.normalDay', options.credentials);
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/image-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/image-map.ts
index 272476ea9e..be427f55cf 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/image-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/image-map.ts
@@ -22,7 +22,6 @@ import { filter, map, mergeMap } from 'rxjs/operators';
import {
aspectCache,
calculateNewPointCoordinate,
- checkLngLat,
parseFunction
} from '@home/components/widget/lib/maps/common-maps-utils';
import { WidgetContext } from '@home/models/widget-component.models';
@@ -221,7 +220,6 @@ export class ImageMap extends LeafletMap {
zoom: 1,
crs: L.CRS.Simple,
attributionControl: false,
- editable: !!this.options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
});
this.updateBounds(updateImage);
@@ -263,7 +261,13 @@ export class ImageMap extends LeafletMap {
return L.CRS.Simple.latLngToPoint(latLng, maxZoom - 1);
}
- convertToCustomFormat(position: L.LatLng, offset = 0, width = this.width, height = this.height): object {
+ convertToCustomFormat(position: L.LatLng, offset = 0, width = this.width, height = this.height): {[key: string]: any} {
+ if (!position) {
+ return {
+ [this.options.xPosKeyName]: null,
+ [this.options.yPosKeyName]: null
+ };
+ }
const point = this.latLngToPoint(position);
const customX = calculateNewPointCoordinate(point.x, width);
const customY = calculateNewPointCoordinate(point.y, height);
@@ -279,13 +283,9 @@ export class ImageMap extends LeafletMap {
point.y = height;
}
- const customLatLng = checkLngLat(this.pointToLatLng(point.x, point.y), this.southWest, this.northEast, offset);
-
return {
[this.options.xPosKeyName]: customX,
- [this.options.yPosKeyName]: customY,
- [this.options.latKeyName]: customLatLng.lat,
- [this.options.lngKeyName]: customLatLng.lng
+ [this.options.yPosKeyName]: customY
};
}
@@ -304,9 +304,10 @@ export class ImageMap extends LeafletMap {
}
}
- convertPolygonToCustomFormat(expression: any[][]): object {
+ convertPolygonToCustomFormat(expression: any[][]): {[key: string]: any} {
+ const coordinate = expression ? this.convertToPolygonFormat(expression) : null;
return {
- [this.options.polygonKeyName] : this.convertToPolygonFormat(expression)
+ [this.options.polygonKeyName]: coordinate
};
}
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/openstreet-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/openstreet-map.ts
index 61312aab23..01eb04ea40 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/openstreet-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/openstreet-map.ts
@@ -23,7 +23,6 @@ export class OpenStreetMap extends LeafletMap {
constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) {
super(ctx, $container, options);
const map = L.map($container, {
- editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
let tileLayer;
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/tencent-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/tencent-map.ts
index bd34e24331..5e71d92e5d 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/tencent-map.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/tencent-map.ts
@@ -25,7 +25,6 @@ export class TencentMap extends LeafletMap {
super(ctx, $container, options);
const txUrl = 'http://rt{s}.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0';
const map = L.map($container, {
- editable: !!options.editablePolygon,
tap: L.Browser.safari && L.Browser.mobile
}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel || DEFAULT_ZOOM_LEVEL);
const txLayer = L.tileLayer(txUrl, {
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/schemes.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/schemes.ts
index 4c7e6e61fa..ff52ece929 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/schemes.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/schemes.ts
@@ -728,6 +728,11 @@ export const markerClusteringSettingsSchemaLeaflet =
type: 'number',
default: 80
},
+ spiderfyOnMaxZoom: {
+ title: 'Spiderfy at the max zoom level (to see all cluster markers)',
+ type: 'boolean',
+ default: false
+ },
chunkedLoading: {
title: 'Use chunks for adding markers so that the page does not freeze',
type: 'boolean',
@@ -747,6 +752,7 @@ export const markerClusteringSettingsSchemaLeaflet =
'showCoverageOnHover',
'animate',
'maxClusterRadius',
+ 'spiderfyOnMaxZoom',
'chunkedLoading',
'removeOutsideVisibleBounds'
]
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.scss
index b6b1c45e27..2c789bebbd 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/led-indicator.component.scss
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@import "node_modules/compass-sass-mixins/lib/compass";
$error-height: 14px !default;
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.scss
index 96cdcadeff..7931b05131 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/rpc/round-switch.component.scss
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@import "node_modules/compass-sass-mixins/lib/compass";
$error-height: 14px !default;
diff --git a/ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts b/ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts
index b8b1d193e4..dfa630b3ad 100644
--- a/ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts
@@ -100,7 +100,10 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy
addGroupInfo(schema, 'Path Settings');
addToSchema(schema, addCondition(pointSchema, 'model.showPoints === true', ['showPoints']));
addGroupInfo(schema, 'Path Points Settings');
- addToSchema(schema, addCondition(mapPolygonSchema, 'model.showPolygon === true', ['showPolygon']));
+ const mapPolygonSchemaWithoutEdit = mapPolygonSchema;
+ delete mapPolygonSchemaWithoutEdit.schema.properties.editablePolygon;
+ mapPolygonSchemaWithoutEdit.form.splice(mapPolygonSchemaWithoutEdit.form.indexOf('editablePolygon'), 1);
+ addToSchema(schema, addCondition(mapPolygonSchemaWithoutEdit, 'model.showPolygon === true', ['showPolygon']));
addGroupInfo(schema, 'Polygon Settings');
return schema;
}
@@ -115,6 +118,7 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy
rotationAngle: 0
};
this.settings = { ...settings, ...this.ctx.settings };
+ this.settings.editablePolygon = false;
this.useAnchors = this.settings.showPoints && this.settings.usePointAsAnchor;
this.settings.pointAsAnchorFunction = parseFunction(this.settings.pointAsAnchorFunction, ['data', 'dsData', 'dsIndex']);
this.settings.tooltipFunction = parseFunction(this.settings.tooltipFunction, ['data', 'dsData', 'dsIndex']);
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
index 9f7da7a747..90b3087ced 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
@@ -44,6 +44,7 @@ import { SharedModule } from '@shared/shared.module';
import { MODULES_MAP } from '@shared/public-api';
import * as tinycolor_ from 'tinycolor2';
import moment from 'moment';
+import { IModulesMap } from '@modules/common/modules-map.models';
const tinycolor = tinycolor_;
@@ -64,7 +65,7 @@ export class WidgetComponentService {
private editingWidgetType: WidgetType;
constructor(@Inject(WINDOW) private window: Window,
- @Optional() @Inject(MODULES_MAP) private modulesMap: {[key: string]: any},
+ @Optional() @Inject(MODULES_MAP) private modulesMap: IModulesMap,
private dynamicComponentFactoryService: DynamicComponentFactoryService,
private widgetService: WidgetService,
private utils: UtilsService,
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-components.module.ts b/ui-ngx/src/app/modules/home/components/widget/widget-components.module.ts
index ed9ef23f82..ad7912cdee 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-components.module.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-components.module.ts
@@ -30,10 +30,10 @@ import {
DateRangeNavigatorPanelComponent,
DateRangeNavigatorWidgetComponent
} from '@home/components/widget/lib/date-range-navigator/date-range-navigator.component';
-import { MultipleInputWidgetComponent } from './lib/multiple-input-widget.component';
-import { TripAnimationComponent } from './trip-animation/trip-animation.component';
-import { PhotoCameraInputWidgetComponent } from './lib/photo-camera-input.component';
-import { GatewayFormComponent } from './lib/gateway/gateway-form.component';
+import { MultipleInputWidgetComponent } from '@home/components/widget/lib/multiple-input-widget.component';
+import { TripAnimationComponent } from '@home/components/widget/trip-animation/trip-animation.component';
+import { PhotoCameraInputWidgetComponent } from '@home/components/widget/lib/photo-camera-input.component';
+import { GatewayFormComponent } from '@home/components/widget/lib/gateway/gateway-form.component';
import { ImportExportService } from '@home/components/import-export/import-export.service';
import { NavigationCardsWidgetComponent } from '@home/components/widget/lib/navigation-cards-widget.component';
import { NavigationCardWidgetComponent } from '@home/components/widget/lib/navigation-card-widget.component';
@@ -41,6 +41,7 @@ import { EdgesOverviewWidgetComponent } from '@home/components/widget/lib/edges-
import { JsonInputWidgetComponent } from '@home/components/widget/lib/json-input-widget.component';
import { QrCodeWidgetComponent } from '@home/components/widget/lib/qrcode-widget.component';
import { MarkdownWidgetComponent } from '@home/components/widget/lib/markdown-widget.component';
+import { SelectEntityDialogComponent } from '@home/components/widget/lib/maps/dialogs/select-entity-dialog.component';
@NgModule({
declarations:
@@ -62,7 +63,8 @@ import { MarkdownWidgetComponent } from '@home/components/widget/lib/markdown-wi
NavigationCardsWidgetComponent,
NavigationCardWidgetComponent,
QrCodeWidgetComponent,
- MarkdownWidgetComponent
+ MarkdownWidgetComponent,
+ SelectEntityDialogComponent
],
imports: [
CommonModule,
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html
index 761603a3ee..97542fd3cb 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-config.component.html
@@ -295,8 +295,7 @@
widget-config.data-settings
-