import { PPLayerComponent } from './pp-layer.component.js';
|
import { CacheService } from './cache.service.js';
|
import { PPUtilClass } from './pp-util.class.js';
|
import './accordion.component.js';
|
import './query-assigned-elements-fea1f631.js';
|
import './custom-element-30fc6381.js';
|
import './base.component-813fc7cf.js';
|
import '@dh-software/furnview-icons';
|
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';
|
|
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());
|
});
|
};
|
class CachedLayerComponent extends PPLayerComponent {
|
constructor() {
|
super(...arguments);
|
this.caches = {};
|
}
|
initCache(name) {
|
return this.caches[name] = CacheService.get(name);
|
}
|
getCache(name) {
|
name = this.getCacheKey(name);
|
if (name in this.caches) {
|
return this.caches[name];
|
}
|
return this.initCache(name);
|
}
|
getCacheKeys(name) {
|
return Object.keys(this.getCache(name));
|
}
|
clear() {
|
Object.keys(this.caches).forEach((key) => {
|
PPUtilClass.cleanup(this, this.getCacheKeys(key), key);
|
});
|
}
|
getCacheKey(key) {
|
return `${this.layerId}_${this.getCacheKeyPrefix()}_${key}`;
|
}
|
refreshPropertyPanel() {
|
var __superGet = (key) => super[key];
|
return __async(this, null, function* () {
|
const result = yield __superGet("refreshPropertyPanel").call(this);
|
this.clear();
|
return result;
|
});
|
}
|
}
|
|
export { CachedLayerComponent };
|