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
import { ProgContextModel } from './prog-context.model.js';
import { e } from './custom-element-30fc6381.js';
import { n } from './base.component-813fc7cf.js';
import './query-assigned-elements-fea1f631.js';
import { BaseAccordionTheme } from './base-accordion.theme.js';
import './prog-property.model.js';
import '@dh-software/furnview-icons';
import './accordion.component.js';
import './accordion-item.component.js';
import './query-1c86d710.js';
import './class-map-a0fb5d87.js';
import './style.helper.js';
import './event.handler.model.js';
import './image.service.js';
import './accordion-layer.component.js';
import './titled-image.component.js';
import './info.component.js';
import './property-list.component.js';
import './query-all-828de4b2.js';
import './sikkens-picker.component.js';
import './color-picker.model.js';
import './transition.helper.js';
import './ncs-picker.component.js';
import './ral-picker.component.js';
import './radio.component.js';
import './filter.service.js';
import './filter-container.component.js';
import './filter-list.component.js';
import './label.component.js';
import './sass.default-d943b107.js';
import './single-color.component.js';
import './interface.js';
import './cached-layer.component.js';
import './pp-layer.component.js';
import './cache.service.js';
import './pp-util.class.js';
 
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
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 __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 ProgContextAccordionLayer = class extends BaseAccordionTheme {
  getAccordionItems() {
    return __async(this, null, function* () {
      var _a;
      const componentBuffer = [];
      DragDropHelperService.cleanUp();
      const options = {
        useRelevant: true,
        useSelection: true,
        contextInfo: ((_a = this.contexts) == null ? void 0 : _a.map((x) => {
          return { contextId: x };
        })) || []
      };
      yield ProgContextModel.traverse({
        propertyCallback: (context, program, property2, values, current) => __async(this, null, function* () {
          var _a2;
          if (!this.contexts || !((_a2 = this.contexts) == null ? void 0 : _a2.includes(context.contextId))) {
            return;
          }
          const propertyMenu = yield this.buildAccordionPropertyHeader(program, {
            key: property2.id,
            name: property2.name || "Undefined",
            image: ""
          }, this.PPContainer.accordionItemClasses);
          propertyMenu.replaceChildren();
          const propertyFlexContent = yield this.buildAccordionFlexContent(propertyMenu, context, program, property2);
          propertyFlexContent.replaceChildren();
          for (let ppVI = 0; ppVI < values.length; ppVI++) {
            const propertyValue = values[ppVI];
            let ppItem;
            if (propertyValue.alternativeImageUrl) {
              ppItem = this.buildImageProperty(propertyMenu, propertyFlexContent, context, program, property2, propertyValue, current);
            } else if (propertyValue.colorPicker && propertyValue.colorPicker.type) {
              ppItem = this.buildColorPickerProperty(propertyMenu, propertyFlexContent, context, program, property2, propertyValue, current);
            } else {
              ppItem = this.buildRadioProperty(propertyMenu, propertyFlexContent, context, program, property2, propertyValue, current);
            }
            if (ppItem) {
              const itemKeyIndex = this.getCacheKeys("items").indexOf(propertyValue.propertyKey);
              if (itemKeyIndex !== -1)
                this.getCacheKeys("items").splice(itemKeyIndex, 1);
              propertyFlexContent.appendChild(ppItem);
            }
          }
          if (values.length > 0) {
            propertyMenu.append(propertyFlexContent);
            this.getCache("flex")[property2.key] = propertyFlexContent;
            const flexKeyIndex = this.getCacheKeys("flex").indexOf(property2.key);
            if (flexKeyIndex !== -1)
              this.getCacheKeys("flex").splice(flexKeyIndex, 1);
          }
          if (propertyMenu.childElementCount > 0) {
            componentBuffer.push(propertyMenu);
          }
        })
      }, options);
      return componentBuffer;
    });
  }
  getCacheKeyPrefix() {
    return "progcontext";
  }
};
__decorateClass([
  n({ type: Object })
], ProgContextAccordionLayer.prototype, "contexts", 2);
ProgContextAccordionLayer = __decorateClass([
  e("fv-prog-context-accordion-layer")
], ProgContextAccordionLayer);
 
export { ProgContextAccordionLayer };