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 { i as i$1 } from './query-1c86d710.js';
|
import { U as UtilService } from './modal.component-7c440789.js';
|
import './button.component.js';
|
import { ConfirmingButtonComponent } from './confirming-button.component.js';
|
import { CloudIdService } from './cloud-id.service.js';
|
import '@dh-software/furnview-icons';
|
import './class-map-a0fb5d87.js';
|
import './event.handler.model.js';
|
import './loading.component.js';
|
import './dimmer.component.js';
|
import './dot-flashing-loader.component.js';
|
import './rotating-dots-loader.component.js';
|
import './key-frame-effect.service.js';
|
import './card.data.service.js';
|
import './card-container-definitions.js';
|
import './card-container-events.js';
|
import './card-data-service-update-events.js';
|
import './toolbar.component.js';
|
import './toggle-toolbar.component.js';
|
import './style.helper.js';
|
import './image.service.js';
|
import './svg-icon.component.js';
|
import './popup.component.js';
|
import './popup-closer.component.js';
|
import './hr-item.component.js';
|
import './hr-list.component.js';
|
import './query-all-828de4b2.js';
|
import './hr-theme.model.js';
|
import './configurator.form.component.js';
|
import './configurator.form.base.element.component.js';
|
import './scene-helper.service.js';
|
import './async.base.component.js';
|
import './card-container-settings.js';
|
import './card-container-states.js';
|
import './card-container-additional-data.js';
|
import './card-containers-shared-data.js';
|
import './input.mask.component.js';
|
import './mask.component.js';
|
import './information.mask.component.js';
|
import './open-cloud-id.mask.component.js';
|
import './share-link-per-mail.component.js';
|
import './request-appointment.component.js';
|
import './prog-property.model.js';
|
import './interface.js';
|
import './reset.mask.component.js';
|
import './configuration.service.js';
|
import './step-based.mask.component.js';
|
import './container-mask.component.js';
|
import './messageNoCalc.mask.component.js';
|
import './iwoFurn.mask.component.js';
|
import './input.component.js';
|
import './base-input.js';
|
import './save-dialog.mask.component.js';
|
import './send-offer-request-mask.component.js';
|
import './file-upload-mask.component.js';
|
import './label.component.js';
|
import './sass.default-1ca9b57f.js';
|
import './accordion.component.js';
|
import './accordion-item.component.js';
|
import './accordion-layer.component.js';
|
import './slider.component.js';
|
import './equipment-list.component.js';
|
import './state-7ee0cf4f.js';
|
import './fitting-item.component.js';
|
import './proptrans-item.component.js';
|
import './shoppingcart-item.component.js';
|
import './prog-context.model.js';
|
import './manu-prog.service.js';
|
import './catalog.service.js';
|
import './step-child.component.js';
|
import './clock.controller.js';
|
|
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{background:var(--cloud-id-display-background,transparent);box-shadow:var(--cloud-id-box-shadow,unset);color:var(--cloud-id-display-color,unset);display:flex;flex-direction:column;font-size:var(--cloud-id-font-size,initial);height:auto;margin:var(--cloud-id-display-margin,unset);max-width:var(--cloud-id-max-width,unset);min-width:var(--cloud-id-min-width,unset);padding:var(--cloud-id-display-padding,unset);width:var(--cloud-id-width,auto)}:host fv-input{padding:var(--cloud-id-input-padding,unset);position:relative}:host fv-input .loader-container{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;width:100%}:host .action-button{border-bottom-left-radius:var(--cloud-id-action-button-border-left,unset);border-bottom-right-radius:var(--cloud-id-action-button-border-right,unset);border-top-left-radius:var(--cloud-id-action-button-border-left,unset);border-top-right-radius:var(--cloud-id-action-button-border-right,unset)}:host(.text-overlay){position:relative}:host(.text-overlay) fv-label{background:#fff;font-size:var(--cloud-id-text-overlay-font-size,16px);left:5px;line-height:1em;padding:0 5px;pointer-events:none;position:absolute;top:.3em;z-index:999}:host(.text-overlay) fv-input{margin-top:var(--cloud-id-text-overlay-font-size,16px)}`;
|
|
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 CloudIdComponent = class extends BaseElement {
|
constructor() {
|
super();
|
this._hideButton = false;
|
this._loading = true;
|
this._disableFetch = false;
|
this._resetUserinterfaceManuProg = false;
|
this._clearAfterAction = false;
|
this._iconButton = false;
|
this.addHideStateUpdatedEventListener((value) => {
|
if (!value) {
|
this.updateData();
|
}
|
});
|
}
|
updated(_changedProperties) {
|
super.updated(_changedProperties);
|
}
|
get CloudID() {
|
var _a;
|
return ((_a = this._cloudIDInput) == null ? void 0 : _a.value) || "";
|
}
|
get MoveablePlaceHolder() {
|
return this.classList.contains("moveable-placeholder");
|
}
|
get HoverButton() {
|
return this._actionButton !== void 0 && this.classList.contains("custom-hover-border");
|
}
|
updateData() {
|
return __async(this, null, function* () {
|
var _a, _b, _c, _d;
|
this._loading = true;
|
if (this._disableFetch) {
|
(_a = this._actionButton) == null ? void 0 : _a.removeAttribute("disabled");
|
this._loading = false;
|
if (this._actionButton instanceof ConfirmingButtonComponent) {
|
(_b = this._actionButton) == null ? void 0 : _b.reset();
|
}
|
return "";
|
}
|
const cloudId = yield CloudIdService.createCloudId();
|
if (cloudId != void 0) {
|
if (this._cloudIDInput)
|
this._cloudIDInput.value = cloudId;
|
(_c = this._actionButton) == null ? void 0 : _c.removeAttribute("disabled");
|
this._loading = false;
|
if (this._actionButton instanceof ConfirmingButtonComponent) {
|
(_d = this._actionButton) == null ? void 0 : _d.reset();
|
}
|
return cloudId;
|
}
|
if (this._cloudIDInput)
|
this._cloudIDInput.value = "";
|
yield UtilService.delay(5e3);
|
return this.updateData();
|
});
|
}
|
onChange() {
|
if (this._actionButton && this._actionButton)
|
if (CloudIdService.isCloudIdValid(this._cloudIDInput.value.trim())) {
|
this._actionButton.removeAttribute("disabled");
|
} else {
|
this._actionButton.setAttribute("disabled", "");
|
}
|
}
|
openCloudId() {
|
return __async(this, null, function* () {
|
if (this._actionButton && this._cloudIDInput) {
|
if (this._actionButton.getAttribute("disabled") === null) {
|
yield UtilService.openCloudId(this._cloudIDInput.value, this._resetUserinterfaceManuProg);
|
window.dispatchEvent(new CustomEvent("onCloudId", { detail: { cloudid: this._cloudIDInput.value } }));
|
}
|
}
|
});
|
}
|
copyCloudId() {
|
return __async(this, null, function* () {
|
if (this._cloudIDInput) {
|
yield window.UtilService.copyTextToClipboard(this._cloudIDInput.value);
|
}
|
});
|
}
|
clickButton() {
|
return __async(this, null, function* () {
|
if (this._readonly) {
|
yield this.copyCloudId();
|
} else {
|
yield this.openCloudId();
|
}
|
if (this._clearAfterAction && this._cloudIDInput) {
|
this._cloudIDInput.value = "";
|
this.onChange();
|
}
|
if (this._actionButton && this._actionButton instanceof ConfirmingButtonComponent) {
|
this._actionButton.confirm();
|
yield UtilService.delay(3e3);
|
this._actionButton.reset();
|
}
|
});
|
}
|
createHideButton() {
|
if (!this._hideButton) {
|
if (this._iconButton) {
|
const buttonIcon = !this._readonly ? "fv-icon-cloud-download" : "fv-icon-content-copy";
|
return x`
|
<fv-button id="action-button" class="action-button ${this.HoverButton ? "custom-hover-border" : ""}" @click="${this.clickButton}" disabled icon="${buttonIcon}"></fv-button>`;
|
}
|
const readOnly = !this._readonly ? "20011" : "fs.broadcaster.copy_tooltip";
|
const confirmTxt = !this._readonly ? "fv.opened" : "fv.copied";
|
return x`
|
<fv-confirming-button id="action-button" class="action-button" txt="${readOnly}" confirm-txt="${confirmTxt}"
|
@click="${this.clickButton}" disabled></fv-confirming-button>`;
|
}
|
return x``;
|
}
|
render() {
|
return x`
|
${!this.MoveablePlaceHolder ? x`<fv-label i18n="${!this._readonly ? "fv.modal.open_existing_planning_number" : "fv.modal.your_planning_number"}"></fv-label>` : x``}
|
<fv-input
|
id="cloud-id-input"
|
@change="${this.onChange}"
|
?readonly=${this._readonly}
|
?moveable-placeholder=${this.MoveablePlaceHolder}
|
placeholder="${this.MoveablePlaceHolder ? !this._readonly ? "fv.modal.open_existing_planning_number" : "fv.modal.your_planning_number" : ""}">
|
${this._loading ? x`<div class="loader-container"><slot name="loader"></slot></div>` : x``}
|
${this.createHideButton()}
|
</fv-input>`;
|
}
|
firstUpdated() {
|
if (!this._readonly && this._disableFetch) {
|
this._loading = false;
|
}
|
}
|
};
|
CloudIdComponent.styles = [
|
__superStaticGet(CloudIdComponent, "styles") || [],
|
i`${r(css_248z)}`
|
];
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "readonly" })
|
], CloudIdComponent.prototype, "_readonly", 2);
|
__decorateClass([
|
n({ type: String, reflect: true, attribute: "observable" })
|
], CloudIdComponent.prototype, "_observable", 2);
|
__decorateClass([
|
n({ type: String, attribute: "observe-attr" })
|
], CloudIdComponent.prototype, "_observeAttr", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "hide-button" })
|
], CloudIdComponent.prototype, "_hideButton", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "loading" })
|
], CloudIdComponent.prototype, "_loading", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "disable-fetch" })
|
], CloudIdComponent.prototype, "_disableFetch", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "reset-ui-manu-prog" })
|
], CloudIdComponent.prototype, "_resetUserinterfaceManuProg", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "clear-after-action" })
|
], CloudIdComponent.prototype, "_clearAfterAction", 2);
|
__decorateClass([
|
n({ type: Boolean, reflect: true, attribute: "icon-button" })
|
], CloudIdComponent.prototype, "_iconButton", 2);
|
__decorateClass([
|
i$1("#cloud-id-input")
|
], CloudIdComponent.prototype, "_cloudIDInput", 2);
|
__decorateClass([
|
i$1("#action-button")
|
], CloudIdComponent.prototype, "_actionButton", 2);
|
CloudIdComponent = __decorateClass([
|
e("fv-cloud-id")
|
], CloudIdComponent);
|
|
export { CloudIdComponent };
|