dh_ackergaul
vor 4 Tagen bb80cdf5a6157ca1f3a276e12e9faae9a4739cb7
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
import { i, r, x } from './query-assigned-elements-fea1f631.js';
import { e as e$1 } from './custom-element-30fc6381.js';
import { n, B as BaseElement } from './base.component-813fc7cf.js';
import { i as i$1 } from './query-1c86d710.js';
import { e } from './query-all-828de4b2.js';
import { HRThemeModel } from './hr-theme.model.js';
import { HRItemComponent } from './hr-item.component.js';
import { o } from './class-map-a0fb5d87.js';
import { StyleHelper } from './style.helper.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{display:flex;margin-bottom:-17px;overflow:hidden;width:100%}:host .content{align-items:center;box-sizing:content-box;display:flex;flex-direction:row;height:100%;margin:auto;overflow:scroll hidden;padding-bottom:17px}:host .arrow{display:flex;flex:0 0 auto;height:calc(100% - 17px);margin:0 8px;width:50px}:host .arrow .arrow-button{background-color:hsla(0,0%,100%,.761);border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.5);display:flex;height:50px;margin:auto;width:50px}:host .arrow .arrow-button i.arrow-icon{display:inline-block;height:2.5rem;margin:auto;position:relative;width:2.5rem}:host .arrow .arrow-button i.arrow-icon:after,:host .arrow .arrow-button i.arrow-icon:before{background:#727272;border-radius:.2rem;content:"";display:block;position:absolute}:host .arrow .arrow-button i.arrow-icon:after:hover,:host .arrow .arrow-button i.arrow-icon:before:hover{background:#464646}:host .arrow .arrow-button i.arrow-icon.left,:host .arrow .arrow-button i.arrow-icon.right{width:1.667em}:host .arrow .arrow-button i.arrow-icon.left:before,:host .arrow .arrow-button i.arrow-icon.right:before{top:55%}:host .arrow .arrow-button i.arrow-icon.left:after,:host .arrow .arrow-button i.arrow-icon.right:after{bottom:55%}:host .arrow .arrow-button i.arrow-icon.left:after,:host .arrow .arrow-button i.arrow-icon.left:before,:host .arrow .arrow-button i.arrow-icon.right:after,:host .arrow .arrow-button i.arrow-icon.right:before{height:25%;left:-5%;width:110%}:host .arrow .arrow-button i.arrow-icon.down,:host .arrow .arrow-button i.arrow-icon.up{height:1.667em}:host .arrow .arrow-button i.arrow-icon.down:before,:host .arrow .arrow-button i.arrow-icon.up:before{left:55%}:host .arrow .arrow-button i.arrow-icon.down:after,:host .arrow .arrow-button i.arrow-icon.up:after{right:55%}:host .arrow .arrow-button i.arrow-icon.down:after,:host .arrow .arrow-button i.arrow-icon.down:before,:host .arrow .arrow-button i.arrow-icon.up:after,:host .arrow .arrow-button i.arrow-icon.up:before{height:110%;top:-5%;width:25%}:host .arrow .arrow-button i.arrow-icon.left{margin:auto auto auto 9px}:host .arrow .arrow-button i.arrow-icon.left:after,:host .arrow .arrow-button i.arrow-icon.left:before{transform:rotate(45deg)}:host .arrow .arrow-button i.arrow-icon.left:after{transform:rotate(-45deg)}:host .arrow .arrow-button i.arrow-icon.right{margin:auto 9px auto auto}:host .arrow .arrow-button i.arrow-icon.right:after,:host .arrow .arrow-button i.arrow-icon.right:before{transform:rotate(-45deg)}:host .arrow .arrow-button i.arrow-icon.right:after{transform:rotate(45deg)}:host .arrow .arrow-button i.arrow-icon.up:after,:host .arrow .arrow-button i.arrow-icon.up:before{transform:rotate(-45deg)}:host .arrow .arrow-button i.arrow-icon.up:after{transform:rotate(45deg)}:host .arrow .arrow-button i.arrow-icon.down:after,:host .arrow .arrow-button i.arrow-icon.down:before{transform:rotate(45deg)}:host .arrow .arrow-button i.arrow-icon.down:after{transform:rotate(-45deg)}`;
 
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 HRListComponent = class extends BaseElement {
  constructor() {
    super();
    this.resetCameraView = false;
    this._list = { "none": { previewImageFile: "" } };
    window.addEventListener("resize", () => {
      this.onResize();
    });
  }
  onResize() {
    var _a;
    (_a = this._arrows) == null ? void 0 : _a.forEach((arrow) => {
      arrow.classList[this._content && this._content.scrollWidth > this._content.clientWidth ? "remove" : "add"]("invisible");
    });
  }
  connectedCallback() {
    var __superGet = (key) => super[key];
    return __async(this, null, function* () {
      this._list = Object.assign(this._list, yield HRThemeModel.get());
      __superGet("connectedCallback").call(this);
    });
  }
  shouldUpdate(_changedProperties) {
    return super.shouldUpdate(_changedProperties);
  }
  updated(_changedProperties) {
    super.updated(_changedProperties);
    this.onResize();
  }
  onWheel(evt) {
    evt.preventDefault();
    evt.currentTarget.scrollLeft += evt.deltaY;
  }
  onRightArrowClick() {
    if (this._content) {
      for (let i = this._content.children.length - 1; i >= 0; i--) {
        if (StyleHelper.isElementInView(this._content.children[i], this._content)) {
          if (StyleHelper.isElementInView(this._content.children[i], this._content, true)) {
            if (this._content.children[i + 1]) {
              this._content.children[i + 1].scrollIntoView({ inline: "center", block: "end", behavior: "smooth" });
            }
          } else {
            if (this._content.children[i]) {
              this._content.children[i].scrollIntoView({ inline: "center", block: "end", behavior: "smooth" });
            }
          }
          break;
        }
      }
    }
  }
  onLeftArrowClick() {
    if (this._content) {
      for (let i = 0; i < this._content.children.length; i++) {
        if (StyleHelper.isElementInView(this._content.children[i], this._content)) {
          if (StyleHelper.isElementInView(this._content.children[i], this._content, true)) {
            if (this._content.children[i - 1]) {
              this._content.children[i - 1].scrollIntoView({ inline: "center", block: "end", behavior: "smooth" });
            }
          } else {
            if (this._content.children[i]) {
              this._content.children[i].scrollIntoView({ inline: "center", block: "end", behavior: "smooth" });
            }
          }
          break;
        }
      }
    }
  }
  render() {
    const arrowClass = {
      arrow: true,
      invisible: true
    };
    return x`
            <div class="${o(arrowClass)}">
                <div class="arrow-button" @click="${this.onLeftArrowClick}">
                    <i class="arrow-icon left"></i>
                </div>
            </div>
            <div class="content" @wheel="${this.onWheel}">
            ${Object.keys(this._list).map((hash) => {
      return (() => {
        const item = new HRItemComponent(hash, this._list[hash]);
        item.addEventListener("onChange", (e) => {
          const event = e;
          this.dispatchEvent(new CustomEvent("onChange", { "detail": event.detail }));
          if (this.resetCameraView) {
            if (event.detail && event.detail.reset) {
              CommunicationMessageService.resetCameraView(false);
            }
          }
        });
        return item;
      })();
    })}
            </div>
            <div class="${o(arrowClass)}">
                <div class="arrow-button" @click="${this.onRightArrowClick}">
                    <i class="arrow-icon right"></i>
                </div>
            </div>
        `;
  }
};
HRListComponent.styles = [
  __superStaticGet(HRListComponent, "styles") || [],
  i`${r(css_248z)}`
];
__decorateClass([
  i$1(".content")
], HRListComponent.prototype, "_content", 2);
__decorateClass([
  e(".arrow")
], HRListComponent.prototype, "_arrows", 2);
__decorateClass([
  e(".arrow-button")
], HRListComponent.prototype, "_arrowButtons", 2);
__decorateClass([
  n({ type: Boolean, reflect: true, attribute: "reset-camera-view" })
], HRListComponent.prototype, "resetCameraView", 2);
HRListComponent = __decorateClass([
  e$1("fv-hr-list")
], HRListComponent);
 
export { HRListComponent };