dh_ackergaul
2026-06-03 a25433795ec239654db2ef31af6d3f4e84b3b8dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
import { i, r, x } from './query-assigned-elements-fea1f631.js';
import { e } from './custom-element-30fc6381.js';
import { n, B as BaseElement } from './base.component-813fc7cf.js';
import '@dh-software/furnview-icons';
 
var css_248z = i`.close-symbol{cursor:pointer;height:100%;position:relative;width:100%}.close-symbol.loading{z-index:999}.close-symbol.loading:after,.close-symbol.loading:before{background:#fff}.close-symbol:after,.close-symbol:before{background:var(--close-symbol-background,#888);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;margin:0;padding:0;position:absolute;top:50%;width:100%}.close-symbol:after:hover,.close-symbol:before:hover{background:var(--close-symbol-background-hover,#333)}.close-symbol:after{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg)}.close-symbol:before{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}:host(.active) .circle-number-symbol{border:var(--circle-number-symbol-border-active,2px solid #000)}.circle-number-symbol{align-items:center;background:var(--circle-number-symbol-background,var(--primary-color,red));border:var(--circle-number-symbol-border,2px solid #fff);border-radius:50%;box-shadow:var(--circle-number-symbol-box-shadow,1px 2px 5px 0 #000);color:var(--circle-number-symbol-color,var(--primary-text-color,#000));display:flex;height:var(--circle-number-symbol-size,30px);justify-content:center;position:relative;width:var(--circle-number-symbol-size,30px)}.custom-symbol{cursor:pointer;display:flex;left:10px;position:relative}.custom-symbol.up:after{background-image:var(--custom-symbol-image-down,url("/webui/images/minus.svg"));content:"";height:18px}.custom-symbol.down:after{background-image:var(--custom-symbol-image-down,url("/webui/images/plus.svg"));content:"";height:18px}.custom-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.accordion-symbol{cursor:pointer;display:flex;left:10px;position:relative}.accordion-symbol.up:after{content:"-";font-size:xx-large;transform:scaleX(2) translateX(-4px)}.accordion-symbol.down:after{content:"+";font-size:xx-large}.accordion-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.chevron-symbol{cursor:pointer;left:10px;position:relative}.chevron-symbol.up:after{content:"<"}.chevron-symbol.down:after{content:">"}.chevron-symbol:after{color:inherit;font:17px Consolas,monospace;padding:0 0 2px;pointer-events:none;position:absolute;-webkit-transform:rotate(90deg) translateX(-100%);-moz-transform:rotate(90deg) translateX(-100%);-ms-transform:rotate(90deg) translateX(-100%);transform:rotate(90deg) translateX(-100%)}@media (width >= 980px){.only-mobile{display:none!important}}@media (width <= 980px){.only-desktop{display:none!important}}.bold{font-weight:var(--global-font-weight-bold,600)}*{font-family:var(--global-font,Roboto);font-weight:var(--global-font-weight,400);-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container{display:flex;margin:10px 0}.container.column{flex-direction:column}.container.column.reverse{flex-direction:column-reverse}.container.row{flex-direction:row}.container.row.reverse{flex-direction:row-reverse}.fluid{flex:1}.fluid.space-after{margin-right:55px}.hidden{display:none!important}.mobile-mode-hide,:host(.mobile-mode-hide){display:none!important}.invisible{visibility:hidden!important}.invisible-scroll,:host(.invisible-scroll){margin-right:-22px;overflow:hidden}.invisible-scroll>:first-child,:host(.invisible-scroll)>:first-child{box-sizing:content-box;overflow-x:hidden;overflow-y:scroll;padding-right:22px}.invisible-scroll.bottom,:host(.invisible-scroll.bottom){margin-right:unset;overflow:hidden}.invisible-scroll.bottom>:first-child,:host(.invisible-scroll.bottom)>:first-child{box-sizing:content-box;margin-bottom:-22px;overflow-x:scroll;overflow-y:hidden;padding-bottom:22px;padding-right:unset}:host([disabled]){filter:contrast(.5) grayscale(1);pointer-events:none}*{scrollbar-color:#5c5c5c hsla(0,0%,100%,.004);scrollbar-width:thin}[disabled]{filter:contrast(.5) grayscale(1);pointer-events:none}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar,::-webkit-scrollbar-corner{background:hsla(0,0%,100%,0)}::-webkit-scrollbar-thumb{background:#5c5c5c;-webkit-border-radius:8px}::-webkit-scrollbar-button,::-webkit-scrollbar-button:horizontal:end:decrement,::-webkit-scrollbar-button:horizontal:end:increment,::-webkit-scrollbar-button:vertical:end:decrement,::-webkit-scrollbar-button:vertical:start:increment{background-color:transparent;border:none;color:transparent}:host{--constrained-input-border-color:var(--webcab-input-border-color,#e3e3e3);--constrained-input-border-size:var(--webcab-input-border-size,2px);--constrained-input-font-size:var(--webcab-inputs-font-size,15px);font-size:var(--webcab-ui-font-size,16px);width:fit-content}:host .indecrease-button{height:100%;width:100%}:host .disabled{--constrained-input-indecrease-buttons-background:var(--webcab-input-button-background,#e3e3e3)}:host .label-outer-container{display:flex;flex-flow:column nowrap;justify-content:var(--webcab-input-label-justify-content,unset)}:host .label-outer-container.inline{flex-flow:row nowrap}:host .label-suffix-container{color:var(--wwebcab-input-min-max-color,#a8a7a7);display:flex;flex-flow:row nowrap}:host .minmax-labels{white-space:nowrap}:host .min-max-label-dash{padding-left:var(--webcab-input-min-max-dash-padding-left-right,unset);padding-right:var(--webcab-input-min-max-dash-padding-left-right,unset)}:host .label-suffixes-container{display:flex;flex-flow:row nowrap;justify-content:var(--webcab-input-label-suffixes-justify-content,unset)}`;
 
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getProtoOf = Object.getPrototypeOf;
var __reflectGet = Reflect.get;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};
var __superStaticGet = (obj, member) => __reflectGet(__getProtoOf(obj), member, obj);
var __async = (__this, __arguments, generator) => {
  return new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    };
    var rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    };
    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });
};
let WebCabValueInputComponent = class extends BaseElement {
  constructor() {
    super();
    this.increment = void 0;
    this.fractionDigits = 0;
    this.timeoutms = 500;
    this.preventInlineLabel = false;
    this.customerType = "";
    this.configSuffix = "";
    this.instanceIdent = -1;
    this.value = 0;
    this.name = "";
    this.GroupID = void 0;
    this.InGroupID = void 0;
    this.ZSpaceID = void 0;
    this.ModificationTargets = void 0;
    this.minValue = void 0;
    this.maxValue = void 0;
    this.unitTxt = "error";
    this.dimScale = void 0;
    this.oldvalue = 0;
  }
  get min() {
    return this.minValue ? this.minValue : 0;
  }
  get max() {
    return this.maxValue ? this.maxValue : 9999999999e-2;
  }
  change(ev_) {
    const target = ev_.target;
    if (target) {
      const changeEventData = {
        "old-value": this.value,
        value: 0
      };
      this.value = target.value;
      changeEventData.value = this.value;
      const changeEvent = new WebCabValueInputChanged(changeEventData);
      this.dispatchEvent(changeEvent);
    }
  }
  applyDimScale(value_) {
    if (this.dimScale) {
      return value_ * (1 / this.dimScale);
    }
    return value_;
  }
  render() {
    const increase = this.value != this.max, decrease = this.value != this.min;
    const additionalSuffix = this.querySelector("[slot='additional-suffix']");
    const hasInlinesuffix = this.unitTxt != void 0 && this.unitTxt.length > 0 && this.unitTxt != "error";
    const inlineSuffix = hasInlinesuffix ? " " + this.unitTxt : "";
    const result = x`
            <div class="label-outer-container${this.preventInlineLabel ? "" : " inline"}">
                <div class="label-container">
                    <span><slot name="label"></slot></span>
                </div>
                <div part="label-suffixes-container" class="label-suffixes-container">
                    <div part="min-max-label" class="label-suffix-container">
                        <span><label part="min-label" class="minmax-labels">${this.min.toFixed(this.fractionDigits) + inlineSuffix}</label></span>
                        <span><label part="min-max-label-dash" class="min-max-label-dash"> - </label></span>
                        <span><label part="max-label" class="minmax-labels">${this.max.toFixed(this.fractionDigits) + inlineSuffix}</label></span>
                    </div>
                    ${additionalSuffix != void 0 ? x`<div part="additional-suffix-container"><slot name="additional-suffix"></slot></div>` : x``}
                </div>
            </div>
            <fv-constrained-input 
                    @change="${this.change}"
                    min="${this.minValue ? this.applyDimScale(this.minValue) : 0}"
                    max="${this.maxValue ? this.applyDimScale(this.maxValue) : 0}"
                    value="${this.value ? this.applyDimScale(this.value) : 0}"
                    step="${this.increment ? this.increment : 1}"
                    decimals="${this.fractionDigits}"
                    unit="${this.unitTxt}"
                    timeoutms="${this.timeoutms}"
                    show-increase-decrease hide-unused-unit-container pool-repeated-button-clicks>
 
                <div slot="increase" part="increase-button${increase ? "" : " disabled"}" class="indecrease-button increase-button${increase ? "" : " disabled"}">
                    <slot name="increase-button"></slot>
                </div>
                <div slot="decrease" part="decrease-button${decrease ? "" : " disabled"}" class="indecrease-button decrease-button${decrease ? "" : " disabled"}">
                    <slot name="decrease-button"></slot>
                </div>
 
            </fv-constrained-input>
        `;
    this.oldvalue = this.value;
    this.setAttribute("exportparts", "label-suffixes-container, additional-suffix-container, min-max-label, min-label, min-max-label-dash, max-label, input, input-suffix-container, input-suffix, increase-button, decrease-button, disabled");
    return result;
  }
  updated(_changedProperties) {
    var __superGet = (key) => super[key];
    return __async(this, null, function* () {
      __superGet("updated").call(this, _changedProperties);
      this.dispatchEvent(new WebCabValueInputRenderedEvent());
    });
  }
  refreshComponent(uidata_) {
    return __async(this, null, function* () {
      if (this.name && this.name.length > 0) {
        let uidata = uidata_;
        if (uidata_ == void 0) {
          uidata = yield WebCabApi.GetUIs(this.customerType, this.configSuffix, [this.instanceIdent]);
        }
        if (uidata != void 0 && uidata[this.instanceIdent] != void 0 && uidata[this.instanceIdent].components != void 0) {
          const components = uidata[this.instanceIdent].components;
          for (const component of components) {
            if (component && component.name === this.name) {
              if (component.change) {
                this.GroupID = component.change.GroupID ? component.change.GroupID : void 0;
                this.InGroupID = component.change.InGroupID ? component.change.InGroupID : void 0;
                this.ModificationTargets = component.change.ModificationTargets ? JSON.stringify(component.change.ModificationTargets) : void 0;
              }
              if (component.attributes) {
                this.maxValue = component.attributes.max;
                this.minValue = component.attributes.min;
                this.unitTxt = component.attributes["unit-txt"] == "" ? "error" : component.attributes["unit-txt"];
              }
              return;
            }
          }
        }
      }
    });
  }
  dispatchLoadingEvent(loading_, uiData_) {
    this.dispatchEvent(new CustomEvent("webcab-value-input-loading", { detail: { loading: loading_, uiData: uiData_ }, bubbles: true, composed: true }));
  }
  ChangeCount(preventLimitToInstanceIdent_ = false) {
    return __async(this, null, function* () {
      if (this.oldvalue != this.value) {
        if (!this.GroupID) {
          console.error("groupId invalid:", this.GroupID);
          return;
        }
        if (!this.ModificationTargets) {
          console.error("ModificationTargets invalid!");
          return;
        }
        this.dispatchLoadingEvent(true);
        const modificationTargets = JSON.parse(this.ModificationTargets);
        const modifications = [];
        for (const target of modificationTargets) {
          modifications.push({
            GroupID: this.GroupID,
            target,
            value: this.value.toFixed(0)
          });
        }
        const uidata = yield WebCabApi.ModifyGroups(this.customerType, modifications, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        yield this.refreshComponent(uidata);
        this.dispatchLoadingEvent(false, uidata);
      }
    });
  }
  ModifyFloatValue(preventLimitToInstanceIdent_ = false) {
    return __async(this, null, function* () {
      if (this.oldvalue != this.value) {
        if (this.ModificationTargets == void 0) {
          console.error("ModificationTargets are not set!");
          return;
        }
        this.dispatchLoadingEvent(true);
        const modificationTargets = JSON.parse(this.ModificationTargets);
        const modifications = [];
        for (const target of modificationTargets) {
          modifications.push({
            target,
            value: this.value.toFixed(2)
          });
        }
        const uidata = yield WebCabApi.ModifyValues(this.customerType, modifications, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        yield this.refreshComponent(uidata);
        this.dispatchLoadingEvent(false, uidata);
      }
    });
  }
  ModifyZSplitting(preventLimitToInstanceIdent_ = false, isFloat) {
    return __async(this, null, function* () {
      if (this.oldvalue != this.value) {
        if (this.ModificationTargets == void 0) {
          console.error("ModificationTargets are not set!");
          return;
        }
        this.dispatchLoadingEvent(true);
        const modificationTargets = JSON.parse(this.ModificationTargets);
        const modifications = [];
        for (const target of modificationTargets) {
          modifications.push({
            XGroupID: this.GroupID ? this.GroupID : "",
            XInGroupID: this.InGroupID ? this.InGroupID : "",
            ZSpaceIndex: this.ZSpaceID ? this.ZSpaceID : void 0,
            target,
            value: isFloat ? this.value.toFixed(2) : this.value.toFixed(0)
          });
        }
        yield WebCabApi.ModifyZSplitting(this.customerType, modifications, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        const uidata = yield WebCabApi.GetUIs(this.customerType, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        yield this.refreshComponent(uidata);
        this.dispatchLoadingEvent(false, uidata);
      }
    });
  }
  ModifySingleSpace(preventLimitToInstanceIdent_ = false) {
    return __async(this, null, function* () {
      if (this.oldvalue != this.value) {
        if (!this.GroupID || !this.InGroupID || !this.ModificationTargets) {
          if (!this.GroupID) {
            console.error("GroupId invalid:", this.GroupID);
          }
          if (!this.InGroupID) {
            console.error("InGroupId invalid:", this.InGroupID);
          }
          if (!this.ModificationTargets) {
            console.error("modificationTarget invalid!");
          }
          return;
        }
        this.dispatchLoadingEvent(true);
        const modificationTargets = JSON.parse(this.ModificationTargets);
        const modifications = [];
        for (const target of modificationTargets) {
          modifications.push({
            GroupID: this.GroupID,
            InGroupID: this.InGroupID,
            target,
            value: this.value.toFixed(2)
          });
        }
        yield WebCabApi.ModifySpaces(this.customerType, modifications, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        const uidata = yield WebCabApi.GetUIs(this.customerType, this.configSuffix, preventLimitToInstanceIdent_ ? void 0 : [this.instanceIdent]);
        yield this.refreshComponent(uidata);
        this.dispatchLoadingEvent(false, uidata);
      }
    });
  }
};
WebCabValueInputComponent.styles = [
  __superStaticGet(WebCabValueInputComponent, "styles") || [],
  i`${r(css_248z)}`
];
__decorateClass([
  n({ type: Number, reflect: true })
], WebCabValueInputComponent.prototype, "increment", 2);
__decorateClass([
  n({ type: Number, reflect: true, attribute: "fraction-digits" })
], WebCabValueInputComponent.prototype, "fractionDigits", 2);
__decorateClass([
  n({ type: Number, reflect: true })
], WebCabValueInputComponent.prototype, "timeoutms", 2);
__decorateClass([
  n({ type: Boolean, reflect: true, attribute: "prevent-inline-label" })
], WebCabValueInputComponent.prototype, "preventInlineLabel", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "customer-type" })
], WebCabValueInputComponent.prototype, "customerType", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "config-suffix" })
], WebCabValueInputComponent.prototype, "configSuffix", 2);
__decorateClass([
  n({ type: Number, reflect: true, attribute: "instance-ident" })
], WebCabValueInputComponent.prototype, "instanceIdent", 2);
__decorateClass([
  n({ type: Number, reflect: true })
], WebCabValueInputComponent.prototype, "value", 2);
__decorateClass([
  n({ type: String, reflect: true })
], WebCabValueInputComponent.prototype, "name", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "group-id" })
], WebCabValueInputComponent.prototype, "GroupID", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "in-group-id" })
], WebCabValueInputComponent.prototype, "InGroupID", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "z-space-id" })
], WebCabValueInputComponent.prototype, "ZSpaceID", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "modification-targets" })
], WebCabValueInputComponent.prototype, "ModificationTargets", 2);
__decorateClass([
  n({ type: Number, reflect: true, attribute: "min-value" })
], WebCabValueInputComponent.prototype, "minValue", 2);
__decorateClass([
  n({ type: Number, reflect: true, attribute: "max-value" })
], WebCabValueInputComponent.prototype, "maxValue", 2);
__decorateClass([
  n({ type: String, reflect: true, attribute: "unit-txt" })
], WebCabValueInputComponent.prototype, "unitTxt", 2);
__decorateClass([
  n({ type: Number, reflect: true, attribute: "dim-scale" })
], WebCabValueInputComponent.prototype, "dimScale", 2);
WebCabValueInputComponent = __decorateClass([
  e("fv-webcab-value-input")
], WebCabValueInputComponent);
class WebCabValueInputRenderedEvent extends CustomEvent {
  constructor() {
    super("webcab-value-input-rendered", { detail: {}, bubbles: true, composed: true });
  }
}
class WebCabValueInputChanged extends CustomEvent {
  constructor(data_) {
    super("webcab-value-input-changed", { detail: data_, bubbles: true, composed: true });
  }
}
 
export { WebCabValueInputChanged, WebCabValueInputComponent, WebCabValueInputRenderedEvent };