@rangertechnologies/ngnxt 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49666,13 +49666,13 @@ class NxtMultiSelect {
|
|
|
49666
49666
|
return results;
|
|
49667
49667
|
}
|
|
49668
49668
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NxtMultiSelect, deps: [{ token: CountryService }, { token: TranslationService }, { token: ChangeService }, { token: DataService }, { token: StorageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
49669
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: NxtMultiSelect, isStandalone: true, selector: "nxt-multi-select", inputs: { options: "options", placeholder: "placeholder", apiMeta: "apiMeta", selectedValue: "selectedValue", progressBar: "progressBar", readOnly: "readOnly", error: "error", fromShengel: "fromShengel", question: "question", mode: "mode", from: "from", padding: "padding", onlyView: "onlyView", labelFont: "labelFont", label: "label", labelColor: "labelColor", inputTextColor: "inputTextColor", labelSize: "labelSize", inputValueSize: "inputValueSize", labelWeight: "labelWeight", inputWeight: "inputWeight", showLabel: "showLabel", inputBorder: "inputBorder", inputBgColor: "inputBgColor", inputIconLeftSrc: "inputIconLeftSrc", inputId: "inputId", allowCustomOptions: "allowCustomOptions" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "multiSelectWrapper", first: true, predicate: ["multiSelectWrapper"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #multiSelectWrapper class=\"nxt-multi-select-wrapper\" [ngClass]=\"{ 'loading' : isLoading }\">\n @if (label && showLabel) {\n <div class=\"nxt-multi-select-label\"\n [style.font-family]=\"labelFont\"\n [style.font-weight]=\"labelWeight || 'normal'\"\n [style.font-size]=\"labelSize || '14px'\"\n [style.color]=\"labelColor || '#212529'\">\n {{ label ? ((question?.id+'.questionText') | nxtCustomTranslate : label) : '' }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\">*</span>\n }\n </div>\n }\n\n <div\n class=\"nxt-multi-select-control\"\n [ngClass]=\"{\n 'open': showOptions,\n 'readonly': readOnly || mode !== 'edit',\n 'has-value': selectedValues.length > 0\n }\"\n [style.min-height]=\"from !== 'nxtTable' ? '40px' : null\"\n [style.backgroundColor]=\"mode !== 'edit' ? (inputBgColor || '#ffffff') : (from === 'normalDropDown' && !inputBgColor) ? '#eff8ff' : (inputBgColor || '#ffffff')\"\n [style.border]=\"mode === 'edit' ? (inputBorder === 'none' ? ('1px solid ' + (inputBgColor || '#ffffff')) : '1px solid ' + inputBorder) : 'none'\"\n [style.padding]=\"padding || ''\"\n (click)=\"openOptions()\">\n\n @if (inputIconLeftSrc && mode === 'edit') {\n <img [src]=\"inputIconLeftSrc\" alt=\"icon\" class=\"left-icon\" />\n }\n\n @if (mode === 'edit') {\n <div class=\"nxt-multi-select-value\">\n @if (!showOptions) {\n <span class=\"placeholder\">{{ placeholder || 'Search or add' }}</span>\n } @else {\n <div class=\"nxt-multi-select-search-row\">\n <input\n #searchInput\n [id]=\"inputId || question?.trackingId\"\n type=\"text\"\n [ngStyle]=\"{\n padding: from === 'nxtTable' ? '0px': null\n }\"\n class=\"nxt-multi-select-search\"\n [value]=\"searchText\"\n [placeholder]=\"placeholder || 'Search or add'\"\n [readOnly]=\"readOnly\"\n [style.color]=\"inputTextColor\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\"\n (input)=\"inputValue($any($event.target).value)\"\n (keydown.enter)=\"addSearchTextAsOption($event)\"\n (click)=\"$event.stopPropagation()\" />\n </div>\n }\n </div>\n @if (selectedValues.length > 0) {\n <button type=\"button\" class=\"selected-count\"\n (click)=\"clearSelection($event)\"\n title=\"Clear all selections\">\n {{ selectedValues.length }}\n <span>\u00D7</span>\n </button>\n }\n <svg (click)=\"toggle($event)\" xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"from === 'nxtTable' ? 12 : 16\" [attr.height]=\"from === 'nxtTable' ? 12 : 16\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M4.23499 5.32L6 7.08L7.765 5.32\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n } @else {\n <div class=\"nxt-multi-select-view\"\n [style.color]=\"inputTextColor || '#212529'\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ selectedLabels || '' }}\n </div>\n }\n\n </div>\n\n @if (!isLoading && showOptions) {\n <ul class=\"nxt-multi-select-menu\">\n @if (!isLoading && noDataFound && !canCreateCustomOption) {\n <li class=\"no-data\">\n No Data Found\n </li>\n }\n @if (canCreateCustomOption) {\n <li class=\"add-option\" (mousedown)=\"addSearchTextAsOption($event)\">\n <span class=\"add-indicator\">+</span>\n <span>Add \"{{ customOptionText }}\"</span>\n </li>\n }\n @if (!isLoading && orderedOptions?.length > 0) {\n <li class=\"select-all-option\">\n <div class=\"select-all-left\" (mousedown)=\"toggleSelectAll($event)\">\n <span class=\"check-indicator\" [ngClass]=\"{ 'checked': areAllVisibleSelected(), 'partial': hasPartialVisibleSelection }\">\n @if (areAllVisibleSelected()) {\n <span>\u2713</span>\n }\n @if (hasPartialVisibleSelection && !areAllVisibleSelected()) {\n <span>\u2212</span>\n }\n </span>\n <span>Select all</span>\n </div>\n <button type=\"button\" class=\"done-btn\" (mousedown)=\"closeDropdown($event)\">Done</button>\n </li>\n @for (item of orderedOptions; track item; let i = $index) {\n <li\n class=\"multi-select-option\"\n (mousedown)=\"toggleOption(item, $event)\"\n [ngClass]=\"{ 'selected': isSelected(item), 'selected-divider': isLastSelectedOption(i) }\"\n [style.font-size]=\"question?.fontSize || inputValueSize || '12px'\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightOptionText(getCardPrimaryText(item))\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightOptionText(getCardSubTitleText(item))\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightOptionText(badge.text)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n <div class=\"item-text\">\n <div class=\"item-name primary\" [innerHTML]=\"highlightOptionText(getOptionPrimaryText(item))\"></div>\n @if (getOptionSecondaryValues(item).length > 0) {\n <div class=\"item-secondary\">\n @for (value of getOptionSecondaryValues(item); track value; let last = $last) {\n <span class=\"secondary-text\" [innerHTML]=\"highlightOptionText(value)\"></span>\n @if (!last) {\n <span class=\"separator\"> | </span>\n }\n }\n </div>\n }\n </div>\n @if (isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n }\n @if (apiMeta?.cardConfig && isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n\n @if (mode === 'edit' && selectedValues.length > 0) {\n <!-- MR 23OCT26 Render selected cards instead of pills when cardConfig is present in MultiSelect -->\n @if (apiMeta?.cardConfig) {\n <div class=\"selected-cards-container\">\n @for (selected of selectedValues; track selected) {\n @if (getSelectedRecord(selected); as item) {\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(item)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(item) }}</div>\n @if (!readOnly) {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(item)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(item) }}</div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n } @else {\n <div class=\"selected-chip-row\">\n @for (selected of selectedValues; track selected) {\n <span class=\"selected-chip\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ getSelectionDisplay(selected) }}\n @if (!readOnly) {\n <button type=\"button\" class=\"chip-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </span>\n }\n </div>\n }\n }\n</div>\n", styles: [".nxt-multi-select-wrapper{position:relative;width:100%}.nxt-multi-select-label{display:flex;gap:5px}.required-mark{color:red}.nxt-multi-select-control{position:relative;display:flex;align-items:center;gap:6px;min-height:20px;width:100%;border-radius:3px;padding:0 10px;cursor:pointer;box-sizing:border-box}.nxt-multi-select-control.readonly{cursor:default;padding:0!important}.left-icon{width:20px;height:20px;margin-left:5px}.nxt-multi-select-value{display:flex;align-items:center;font-size:12px;flex:1;gap:5px;min-width:0;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-control.open .nxt-multi-select-value{flex-direction:column;align-items:stretch;gap:0;padding:4px 0}.nxt-multi-select-value::-webkit-scrollbar{display:none}.placeholder{color:#9a9a9a;white-space:nowrap}.selected-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 8px;border-radius:999px;background:var(--fc-primary-color, #007bff);color:#fff;line-height:1.2;white-space:nowrap}.selected-chip-row{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:6px;box-sizing:border-box}.chip-remove,.selected-count{border:none;background:transparent;padding:0;cursor:pointer;font:inherit}.chip-remove{color:#fff;line-height:1}.nxt-multi-select-search-row{display:flex;align-items:center;width:100%;min-height:24px}.nxt-multi-select-search{width:100%;min-width:80px;border:none;outline:none;background:transparent;padding:5px 0}.selected-count{display:inline-flex;align-items:center;gap:8px;min-width:36px;height:22px;justify-content:center;padding:0 10px;border-radius:999px;color:#fff;font-size:12px;background:var(--fc-primary-color, #007bff);line-height:1}.nxt-multi-select-view{width:100%;min-height:24px;display:flex;align-items:center;padding:5px 0;word-break:break-word;white-space:nowrap;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-view::-webkit-scrollbar{display:none}.nxt-multi-select-menu{position:absolute;z-index:10000;background:#fff;border:1px solid #e0e0e0;max-height:300px;overflow-y:auto;width:100%;min-width:320px;margin-top:0;list-style:none;padding:0;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;box-sizing:border-box}.nxt-multi-select-menu li{min-height:38px;padding:0;display:flex;align-items:center;font-size:12px;gap:0;cursor:pointer;box-sizing:border-box}.nxt-multi-select-menu li:hover,.nxt-multi-select-menu li.selected{background-color:#f5f5f5!important}.nxt-multi-select-menu li.selected-divider{border-bottom:1px solid #d7d7d7}.select-all-option{display:flex!important;align-items:center;justify-content:space-between;border-bottom:1px solid #d7d7d7;padding:8px 12px!important}.select-all-left{display:flex;align-items:center;gap:12px;cursor:pointer;flex:1}.done-btn{background:transparent;border:none;color:var(--fc-primary-color, #007bff);font-weight:600;font-size:13px;cursor:pointer;padding:2px 8px;border-radius:4px;line-height:1.2}.done-btn:hover{background-color:#007bff1a}.add-option{color:var(--fc-primary-color, #007bff);border-bottom:1px solid #d7d7d7;gap:12px!important;padding:8px 12px!important}.add-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid var(--fc-primary-color, #007bff);color:var(--fc-primary-color, #007bff);font-size:13px;line-height:1}.check-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid #b7b7b7;color:#fff;font-size:11px;line-height:1}.check-indicator.checked,.check-indicator.partial{background:var(--fc-primary-color, #007bff);border-color:var(--fc-primary-color, #007bff)}.no-data{font-size:12px;color:#777;padding:8px 12px!important}.multi-select-option{align-items:stretch!important;border-bottom:1px solid #f0f0f0;outline:none;transition:background-color .2s ease}.multi-select-option:last-child{border-bottom:none}.item-content{width:100%;padding:5px 10px;box-sizing:border-box}.item-details{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;text-align:left}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:600;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex;flex-wrap:wrap}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.option-selected-mark{color:var(--fc-primary-color, #007bff);flex-shrink:0;font-size:13px;line-height:20px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-multi-select-wrapper:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:2px;overflow:hidden}.nxt-multi-select-wrapper.loading:after{background:linear-gradient(90deg,transparent,var(--fc-primary-color, #007bff),transparent);background-size:200% 100%;animation:shimmer 1.2s linear infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:6px 4px;width:100%}.card-image-wrapper{flex-shrink:0;width:80px;height:54px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:11px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;line-height:1.2}.badge-icon{width:11px;height:11px;flex-shrink:0;color:#27406b}.badge-icon-img{width:11px;height:11px;object-fit:contain;flex-shrink:0}.selected-cards-container{display:flex;flex-direction:column;gap:8px;margin-top:10px;width:100%}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }] });
|
|
49669
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: NxtMultiSelect, isStandalone: true, selector: "nxt-multi-select", inputs: { options: "options", placeholder: "placeholder", apiMeta: "apiMeta", selectedValue: "selectedValue", progressBar: "progressBar", readOnly: "readOnly", error: "error", fromShengel: "fromShengel", question: "question", mode: "mode", from: "from", padding: "padding", onlyView: "onlyView", labelFont: "labelFont", label: "label", labelColor: "labelColor", inputTextColor: "inputTextColor", labelSize: "labelSize", inputValueSize: "inputValueSize", labelWeight: "labelWeight", inputWeight: "inputWeight", showLabel: "showLabel", inputBorder: "inputBorder", inputBgColor: "inputBgColor", inputIconLeftSrc: "inputIconLeftSrc", inputId: "inputId", allowCustomOptions: "allowCustomOptions" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "multiSelectWrapper", first: true, predicate: ["multiSelectWrapper"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #multiSelectWrapper class=\"nxt-multi-select-wrapper\" [ngClass]=\"{ 'loading' : isLoading }\">\n @if (label && showLabel) {\n <div class=\"nxt-multi-select-label\"\n [style.font-family]=\"labelFont\"\n [style.font-weight]=\"labelWeight || 'normal'\"\n [style.font-size]=\"labelSize || '14px'\"\n [style.color]=\"labelColor || '#212529'\">\n {{ label ? ((question?.id+'.questionText') | nxtCustomTranslate : label) : '' }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\">*</span>\n }\n </div>\n }\n\n <div\n class=\"nxt-multi-select-control\"\n [ngClass]=\"{\n 'open': showOptions,\n 'readonly': readOnly || mode !== 'edit',\n 'has-value': selectedValues.length > 0\n }\"\n [style.min-height]=\"from !== 'nxtTable' ? '40px' : null\"\n [style.backgroundColor]=\"mode !== 'edit' ? (inputBgColor || '#ffffff') : (from === 'normalDropDown' && !inputBgColor) ? '#eff8ff' : (inputBgColor || '#ffffff')\"\n [style.border]=\"mode === 'edit' ? (inputBorder === 'none' ? ('1px solid ' + (inputBgColor || '#ffffff')) : '1px solid ' + inputBorder) : 'none'\"\n [style.padding]=\"padding || ''\"\n (click)=\"openOptions()\">\n\n @if (inputIconLeftSrc && mode === 'edit') {\n <img [src]=\"inputIconLeftSrc\" alt=\"icon\" class=\"left-icon\" />\n }\n\n @if (mode === 'edit') {\n <div class=\"nxt-multi-select-value\">\n @if (!showOptions) {\n <span class=\"placeholder\">{{ placeholder || 'Search or add' }}</span>\n } @else {\n <div class=\"nxt-multi-select-search-row\">\n <input\n #searchInput\n [id]=\"inputId || question?.trackingId\"\n type=\"text\"\n [ngStyle]=\"{\n padding: from === 'nxtTable' ? '0px': null\n }\"\n class=\"nxt-multi-select-search\"\n [value]=\"searchText\"\n [placeholder]=\"placeholder || 'Search or add'\"\n [readOnly]=\"readOnly\"\n [style.color]=\"inputTextColor\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\"\n (input)=\"inputValue($any($event.target).value)\"\n (keydown.enter)=\"addSearchTextAsOption($event)\"\n (click)=\"$event.stopPropagation()\" />\n </div>\n }\n </div>\n @if (selectedValues.length > 0) {\n <button type=\"button\" class=\"selected-count\"\n (click)=\"clearSelection($event)\"\n title=\"Clear all selections\">\n {{ selectedValues.length }}\n <span>\u00D7</span>\n </button>\n }\n <svg (click)=\"toggle($event)\" xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"from === 'nxtTable' ? 12 : 16\" [attr.height]=\"from === 'nxtTable' ? 12 : 16\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M4.23499 5.32L6 7.08L7.765 5.32\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n } @else {\n <div class=\"nxt-multi-select-view\"\n [style.color]=\"inputTextColor || '#212529'\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ selectedLabels || '' }}\n </div>\n }\n\n </div>\n\n @if (!isLoading && showOptions) {\n <ul class=\"nxt-multi-select-menu\">\n @if (!isLoading && noDataFound && !canCreateCustomOption) {\n <li class=\"no-data\">\n No Data Found\n </li>\n }\n @if (canCreateCustomOption) {\n <li class=\"add-option\" (mousedown)=\"addSearchTextAsOption($event)\">\n <span class=\"add-indicator\">+</span>\n <span>Add \"{{ customOptionText }}\"</span>\n </li>\n }\n @if (!isLoading && orderedOptions?.length > 0) {\n <li class=\"select-all-option\">\n <div class=\"select-all-left\" (mousedown)=\"toggleSelectAll($event)\">\n <span class=\"check-indicator\" [ngClass]=\"{ 'checked': areAllVisibleSelected(), 'partial': hasPartialVisibleSelection }\">\n @if (areAllVisibleSelected()) {\n <span>\u2713</span>\n }\n @if (hasPartialVisibleSelection && !areAllVisibleSelected()) {\n <span>\u2212</span>\n }\n </span>\n <span>Select all</span>\n </div>\n <button type=\"button\" class=\"done-btn\" (mousedown)=\"closeDropdown($event)\">Done</button>\n </li>\n @for (item of orderedOptions; track item; let i = $index) {\n <li\n class=\"multi-select-option\"\n (mousedown)=\"toggleOption(item, $event)\"\n [ngClass]=\"{ 'selected': isSelected(item), 'selected-divider': isLastSelectedOption(i) }\"\n [style.font-size]=\"question?.fontSize || inputValueSize || '12px'\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightOptionText(getCardPrimaryText(item))\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightOptionText(getCardSubTitleText(item))\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightOptionText(badge.text)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n <div class=\"item-text\">\n <div class=\"item-name primary\" [innerHTML]=\"highlightOptionText(getOptionPrimaryText(item))\"></div>\n @if (getOptionSecondaryValues(item).length > 0) {\n <div class=\"item-secondary\">\n @for (value of getOptionSecondaryValues(item); track value; let last = $last) {\n <span class=\"secondary-text\" [innerHTML]=\"highlightOptionText(value)\"></span>\n @if (!last) {\n <span class=\"separator\"> | </span>\n }\n }\n </div>\n }\n </div>\n @if (isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n }\n @if (apiMeta?.cardConfig && isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n\n @if (mode === 'edit' && selectedValues.length > 0) {\n <!-- MR 23OCT26 Render selected cards instead of pills when cardConfig is present in MultiSelect -->\n @if (apiMeta?.cardConfig) {\n <div class=\"selected-cards-container\">\n @for (selected of selectedValues; track selected) {\n @if (getSelectedRecord(selected); as item) {\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(item)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(item) }}</div>\n @if (!readOnly) {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(item)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(item) }}</div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n } @else {\n <div class=\"selected-chip-row\">\n @for (selected of selectedValues; track selected) {\n <span class=\"selected-chip\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ getSelectionDisplay(selected) }}\n @if (!readOnly) {\n <button type=\"button\" class=\"chip-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </span>\n }\n </div>\n }\n }\n</div>\n", styles: [".nxt-multi-select-wrapper{position:relative;width:100%}.nxt-multi-select-label{display:flex;gap:5px}.required-mark{color:red}.nxt-multi-select-control{position:relative;display:flex;align-items:center;gap:6px;min-height:20px;width:100%;border-radius:3px;padding:0 10px;cursor:pointer;box-sizing:border-box}.nxt-multi-select-control.readonly{cursor:default;padding:0!important}.left-icon{width:20px;height:20px;margin-left:5px}.nxt-multi-select-value{display:flex;align-items:center;font-size:12px;flex:1;gap:5px;min-width:0;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-control.open .nxt-multi-select-value{flex-direction:column;align-items:stretch;gap:0;padding:4px 0}.nxt-multi-select-value::-webkit-scrollbar{display:none}.placeholder{white-space:nowrap}.selected-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 8px;border-radius:999px;background:var(--fc-primary-color, #007bff);color:#fff;line-height:1.2;white-space:nowrap}.selected-chip-row{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:6px;box-sizing:border-box}.chip-remove,.selected-count{border:none;background:transparent;padding:0;cursor:pointer;font:inherit}.chip-remove{color:#fff;line-height:1}.nxt-multi-select-search-row{display:flex;align-items:center;width:100%;min-height:24px}.nxt-multi-select-search{width:100%;min-width:80px;border:none;outline:none;background:transparent;padding:5px 0}.selected-count{display:inline-flex;align-items:center;gap:8px;min-width:36px;height:22px;justify-content:center;padding:0 10px;border-radius:999px;color:#fff;font-size:12px;background:var(--fc-primary-color, #007bff);line-height:1}.nxt-multi-select-view{width:100%;min-height:24px;display:flex;align-items:center;padding:5px 0;word-break:break-word;white-space:nowrap;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-view::-webkit-scrollbar{display:none}.nxt-multi-select-menu{position:absolute;z-index:10000;background:#fff;border:1px solid #e0e0e0;max-height:300px;overflow-y:auto;width:100%;min-width:320px;margin-top:0;list-style:none;padding:0;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;box-sizing:border-box}.nxt-multi-select-menu li{min-height:38px;padding:0;display:flex;align-items:center;font-size:12px;gap:0;cursor:pointer;box-sizing:border-box}.nxt-multi-select-menu li:hover,.nxt-multi-select-menu li.selected{background-color:#f5f5f5!important}.nxt-multi-select-menu li.selected-divider{border-bottom:1px solid #d7d7d7}.select-all-option{display:flex!important;align-items:center;justify-content:space-between;border-bottom:1px solid #d7d7d7;padding:8px 12px!important}.select-all-left{display:flex;align-items:center;gap:12px;cursor:pointer;flex:1}.done-btn{background:transparent;border:none;color:var(--fc-primary-color, #007bff);font-weight:600;font-size:13px;cursor:pointer;padding:2px 8px;border-radius:4px;line-height:1.2}.done-btn:hover{background-color:#007bff1a}.add-option{color:var(--fc-primary-color, #007bff);border-bottom:1px solid #d7d7d7;gap:12px!important;padding:8px 12px!important}.add-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid var(--fc-primary-color, #007bff);color:var(--fc-primary-color, #007bff);font-size:13px;line-height:1}.check-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid #b7b7b7;color:#fff;font-size:11px;line-height:1}.check-indicator.checked,.check-indicator.partial{background:var(--fc-primary-color, #007bff);border-color:var(--fc-primary-color, #007bff)}.no-data{font-size:12px;color:#777;padding:8px 12px!important}.multi-select-option{align-items:stretch!important;border-bottom:1px solid #f0f0f0;outline:none;transition:background-color .2s ease}.multi-select-option:last-child{border-bottom:none}.item-content{width:100%;padding:5px 10px;box-sizing:border-box}.item-details{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;text-align:left}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:600;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex;flex-wrap:wrap}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.option-selected-mark{color:var(--fc-primary-color, #007bff);flex-shrink:0;font-size:13px;line-height:20px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-multi-select-wrapper:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:2px;overflow:hidden}.nxt-multi-select-wrapper.loading:after{background:linear-gradient(90deg,transparent,var(--fc-primary-color, #007bff),transparent);background-size:200% 100%;animation:shimmer 1.2s linear infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:6px 4px;width:100%}.card-image-wrapper{flex-shrink:0;width:80px;height:54px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:11px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;line-height:1.2}.badge-icon{width:11px;height:11px;flex-shrink:0;color:#27406b}.badge-icon-img{width:11px;height:11px;object-fit:contain;flex-shrink:0}.selected-cards-container{display:flex;flex-direction:column;gap:8px;margin-top:10px;width:100%}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }] });
|
|
49670
49670
|
}
|
|
49671
49671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NxtMultiSelect, decorators: [{
|
|
49672
49672
|
type: Component,
|
|
49673
49673
|
args: [{ selector: 'nxt-multi-select', standalone: true, imports: [
|
|
49674
49674
|
CommonModule, FormsModule, NxtCustomTranslatePipe
|
|
49675
|
-
], template: "<div #multiSelectWrapper class=\"nxt-multi-select-wrapper\" [ngClass]=\"{ 'loading' : isLoading }\">\n @if (label && showLabel) {\n <div class=\"nxt-multi-select-label\"\n [style.font-family]=\"labelFont\"\n [style.font-weight]=\"labelWeight || 'normal'\"\n [style.font-size]=\"labelSize || '14px'\"\n [style.color]=\"labelColor || '#212529'\">\n {{ label ? ((question?.id+'.questionText') | nxtCustomTranslate : label) : '' }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\">*</span>\n }\n </div>\n }\n\n <div\n class=\"nxt-multi-select-control\"\n [ngClass]=\"{\n 'open': showOptions,\n 'readonly': readOnly || mode !== 'edit',\n 'has-value': selectedValues.length > 0\n }\"\n [style.min-height]=\"from !== 'nxtTable' ? '40px' : null\"\n [style.backgroundColor]=\"mode !== 'edit' ? (inputBgColor || '#ffffff') : (from === 'normalDropDown' && !inputBgColor) ? '#eff8ff' : (inputBgColor || '#ffffff')\"\n [style.border]=\"mode === 'edit' ? (inputBorder === 'none' ? ('1px solid ' + (inputBgColor || '#ffffff')) : '1px solid ' + inputBorder) : 'none'\"\n [style.padding]=\"padding || ''\"\n (click)=\"openOptions()\">\n\n @if (inputIconLeftSrc && mode === 'edit') {\n <img [src]=\"inputIconLeftSrc\" alt=\"icon\" class=\"left-icon\" />\n }\n\n @if (mode === 'edit') {\n <div class=\"nxt-multi-select-value\">\n @if (!showOptions) {\n <span class=\"placeholder\">{{ placeholder || 'Search or add' }}</span>\n } @else {\n <div class=\"nxt-multi-select-search-row\">\n <input\n #searchInput\n [id]=\"inputId || question?.trackingId\"\n type=\"text\"\n [ngStyle]=\"{\n padding: from === 'nxtTable' ? '0px': null\n }\"\n class=\"nxt-multi-select-search\"\n [value]=\"searchText\"\n [placeholder]=\"placeholder || 'Search or add'\"\n [readOnly]=\"readOnly\"\n [style.color]=\"inputTextColor\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\"\n (input)=\"inputValue($any($event.target).value)\"\n (keydown.enter)=\"addSearchTextAsOption($event)\"\n (click)=\"$event.stopPropagation()\" />\n </div>\n }\n </div>\n @if (selectedValues.length > 0) {\n <button type=\"button\" class=\"selected-count\"\n (click)=\"clearSelection($event)\"\n title=\"Clear all selections\">\n {{ selectedValues.length }}\n <span>\u00D7</span>\n </button>\n }\n <svg (click)=\"toggle($event)\" xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"from === 'nxtTable' ? 12 : 16\" [attr.height]=\"from === 'nxtTable' ? 12 : 16\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M4.23499 5.32L6 7.08L7.765 5.32\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n } @else {\n <div class=\"nxt-multi-select-view\"\n [style.color]=\"inputTextColor || '#212529'\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ selectedLabels || '' }}\n </div>\n }\n\n </div>\n\n @if (!isLoading && showOptions) {\n <ul class=\"nxt-multi-select-menu\">\n @if (!isLoading && noDataFound && !canCreateCustomOption) {\n <li class=\"no-data\">\n No Data Found\n </li>\n }\n @if (canCreateCustomOption) {\n <li class=\"add-option\" (mousedown)=\"addSearchTextAsOption($event)\">\n <span class=\"add-indicator\">+</span>\n <span>Add \"{{ customOptionText }}\"</span>\n </li>\n }\n @if (!isLoading && orderedOptions?.length > 0) {\n <li class=\"select-all-option\">\n <div class=\"select-all-left\" (mousedown)=\"toggleSelectAll($event)\">\n <span class=\"check-indicator\" [ngClass]=\"{ 'checked': areAllVisibleSelected(), 'partial': hasPartialVisibleSelection }\">\n @if (areAllVisibleSelected()) {\n <span>\u2713</span>\n }\n @if (hasPartialVisibleSelection && !areAllVisibleSelected()) {\n <span>\u2212</span>\n }\n </span>\n <span>Select all</span>\n </div>\n <button type=\"button\" class=\"done-btn\" (mousedown)=\"closeDropdown($event)\">Done</button>\n </li>\n @for (item of orderedOptions; track item; let i = $index) {\n <li\n class=\"multi-select-option\"\n (mousedown)=\"toggleOption(item, $event)\"\n [ngClass]=\"{ 'selected': isSelected(item), 'selected-divider': isLastSelectedOption(i) }\"\n [style.font-size]=\"question?.fontSize || inputValueSize || '12px'\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightOptionText(getCardPrimaryText(item))\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightOptionText(getCardSubTitleText(item))\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightOptionText(badge.text)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n <div class=\"item-text\">\n <div class=\"item-name primary\" [innerHTML]=\"highlightOptionText(getOptionPrimaryText(item))\"></div>\n @if (getOptionSecondaryValues(item).length > 0) {\n <div class=\"item-secondary\">\n @for (value of getOptionSecondaryValues(item); track value; let last = $last) {\n <span class=\"secondary-text\" [innerHTML]=\"highlightOptionText(value)\"></span>\n @if (!last) {\n <span class=\"separator\"> | </span>\n }\n }\n </div>\n }\n </div>\n @if (isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n }\n @if (apiMeta?.cardConfig && isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n\n @if (mode === 'edit' && selectedValues.length > 0) {\n <!-- MR 23OCT26 Render selected cards instead of pills when cardConfig is present in MultiSelect -->\n @if (apiMeta?.cardConfig) {\n <div class=\"selected-cards-container\">\n @for (selected of selectedValues; track selected) {\n @if (getSelectedRecord(selected); as item) {\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(item)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(item) }}</div>\n @if (!readOnly) {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(item)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(item) }}</div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n } @else {\n <div class=\"selected-chip-row\">\n @for (selected of selectedValues; track selected) {\n <span class=\"selected-chip\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ getSelectionDisplay(selected) }}\n @if (!readOnly) {\n <button type=\"button\" class=\"chip-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </span>\n }\n </div>\n }\n }\n</div>\n", styles: [".nxt-multi-select-wrapper{position:relative;width:100%}.nxt-multi-select-label{display:flex;gap:5px}.required-mark{color:red}.nxt-multi-select-control{position:relative;display:flex;align-items:center;gap:6px;min-height:20px;width:100%;border-radius:3px;padding:0 10px;cursor:pointer;box-sizing:border-box}.nxt-multi-select-control.readonly{cursor:default;padding:0!important}.left-icon{width:20px;height:20px;margin-left:5px}.nxt-multi-select-value{display:flex;align-items:center;font-size:12px;flex:1;gap:5px;min-width:0;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-control.open .nxt-multi-select-value{flex-direction:column;align-items:stretch;gap:0;padding:4px 0}.nxt-multi-select-value::-webkit-scrollbar{display:none}.placeholder{color:#9a9a9a;white-space:nowrap}.selected-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 8px;border-radius:999px;background:var(--fc-primary-color, #007bff);color:#fff;line-height:1.2;white-space:nowrap}.selected-chip-row{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:6px;box-sizing:border-box}.chip-remove,.selected-count{border:none;background:transparent;padding:0;cursor:pointer;font:inherit}.chip-remove{color:#fff;line-height:1}.nxt-multi-select-search-row{display:flex;align-items:center;width:100%;min-height:24px}.nxt-multi-select-search{width:100%;min-width:80px;border:none;outline:none;background:transparent;padding:5px 0}.selected-count{display:inline-flex;align-items:center;gap:8px;min-width:36px;height:22px;justify-content:center;padding:0 10px;border-radius:999px;color:#fff;font-size:12px;background:var(--fc-primary-color, #007bff);line-height:1}.nxt-multi-select-view{width:100%;min-height:24px;display:flex;align-items:center;padding:5px 0;word-break:break-word;white-space:nowrap;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-view::-webkit-scrollbar{display:none}.nxt-multi-select-menu{position:absolute;z-index:10000;background:#fff;border:1px solid #e0e0e0;max-height:300px;overflow-y:auto;width:100%;min-width:320px;margin-top:0;list-style:none;padding:0;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;box-sizing:border-box}.nxt-multi-select-menu li{min-height:38px;padding:0;display:flex;align-items:center;font-size:12px;gap:0;cursor:pointer;box-sizing:border-box}.nxt-multi-select-menu li:hover,.nxt-multi-select-menu li.selected{background-color:#f5f5f5!important}.nxt-multi-select-menu li.selected-divider{border-bottom:1px solid #d7d7d7}.select-all-option{display:flex!important;align-items:center;justify-content:space-between;border-bottom:1px solid #d7d7d7;padding:8px 12px!important}.select-all-left{display:flex;align-items:center;gap:12px;cursor:pointer;flex:1}.done-btn{background:transparent;border:none;color:var(--fc-primary-color, #007bff);font-weight:600;font-size:13px;cursor:pointer;padding:2px 8px;border-radius:4px;line-height:1.2}.done-btn:hover{background-color:#007bff1a}.add-option{color:var(--fc-primary-color, #007bff);border-bottom:1px solid #d7d7d7;gap:12px!important;padding:8px 12px!important}.add-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid var(--fc-primary-color, #007bff);color:var(--fc-primary-color, #007bff);font-size:13px;line-height:1}.check-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid #b7b7b7;color:#fff;font-size:11px;line-height:1}.check-indicator.checked,.check-indicator.partial{background:var(--fc-primary-color, #007bff);border-color:var(--fc-primary-color, #007bff)}.no-data{font-size:12px;color:#777;padding:8px 12px!important}.multi-select-option{align-items:stretch!important;border-bottom:1px solid #f0f0f0;outline:none;transition:background-color .2s ease}.multi-select-option:last-child{border-bottom:none}.item-content{width:100%;padding:5px 10px;box-sizing:border-box}.item-details{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;text-align:left}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:600;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex;flex-wrap:wrap}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.option-selected-mark{color:var(--fc-primary-color, #007bff);flex-shrink:0;font-size:13px;line-height:20px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-multi-select-wrapper:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:2px;overflow:hidden}.nxt-multi-select-wrapper.loading:after{background:linear-gradient(90deg,transparent,var(--fc-primary-color, #007bff),transparent);background-size:200% 100%;animation:shimmer 1.2s linear infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:6px 4px;width:100%}.card-image-wrapper{flex-shrink:0;width:80px;height:54px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:11px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;line-height:1.2}.badge-icon{width:11px;height:11px;flex-shrink:0;color:#27406b}.badge-icon-img{width:11px;height:11px;object-fit:contain;flex-shrink:0}.selected-cards-container{display:flex;flex-direction:column;gap:8px;margin-top:10px;width:100%}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"] }]
|
|
49675
|
+
], template: "<div #multiSelectWrapper class=\"nxt-multi-select-wrapper\" [ngClass]=\"{ 'loading' : isLoading }\">\n @if (label && showLabel) {\n <div class=\"nxt-multi-select-label\"\n [style.font-family]=\"labelFont\"\n [style.font-weight]=\"labelWeight || 'normal'\"\n [style.font-size]=\"labelSize || '14px'\"\n [style.color]=\"labelColor || '#212529'\">\n {{ label ? ((question?.id+'.questionText') | nxtCustomTranslate : label) : '' }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\">*</span>\n }\n </div>\n }\n\n <div\n class=\"nxt-multi-select-control\"\n [ngClass]=\"{\n 'open': showOptions,\n 'readonly': readOnly || mode !== 'edit',\n 'has-value': selectedValues.length > 0\n }\"\n [style.min-height]=\"from !== 'nxtTable' ? '40px' : null\"\n [style.backgroundColor]=\"mode !== 'edit' ? (inputBgColor || '#ffffff') : (from === 'normalDropDown' && !inputBgColor) ? '#eff8ff' : (inputBgColor || '#ffffff')\"\n [style.border]=\"mode === 'edit' ? (inputBorder === 'none' ? ('1px solid ' + (inputBgColor || '#ffffff')) : '1px solid ' + inputBorder) : 'none'\"\n [style.padding]=\"padding || ''\"\n (click)=\"openOptions()\">\n\n @if (inputIconLeftSrc && mode === 'edit') {\n <img [src]=\"inputIconLeftSrc\" alt=\"icon\" class=\"left-icon\" />\n }\n\n @if (mode === 'edit') {\n <div class=\"nxt-multi-select-value\">\n @if (!showOptions) {\n <span class=\"placeholder\">{{ placeholder || 'Search or add' }}</span>\n } @else {\n <div class=\"nxt-multi-select-search-row\">\n <input\n #searchInput\n [id]=\"inputId || question?.trackingId\"\n type=\"text\"\n [ngStyle]=\"{\n padding: from === 'nxtTable' ? '0px': null\n }\"\n class=\"nxt-multi-select-search\"\n [value]=\"searchText\"\n [placeholder]=\"placeholder || 'Search or add'\"\n [readOnly]=\"readOnly\"\n [style.color]=\"inputTextColor\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\"\n (input)=\"inputValue($any($event.target).value)\"\n (keydown.enter)=\"addSearchTextAsOption($event)\"\n (click)=\"$event.stopPropagation()\" />\n </div>\n }\n </div>\n @if (selectedValues.length > 0) {\n <button type=\"button\" class=\"selected-count\"\n (click)=\"clearSelection($event)\"\n title=\"Clear all selections\">\n {{ selectedValues.length }}\n <span>\u00D7</span>\n </button>\n }\n <svg (click)=\"toggle($event)\" xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"from === 'nxtTable' ? 12 : 16\" [attr.height]=\"from === 'nxtTable' ? 12 : 16\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M4.23499 5.32L6 7.08L7.765 5.32\" stroke=\"#B0ADAB\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n } @else {\n <div class=\"nxt-multi-select-view\"\n [style.color]=\"inputTextColor || '#212529'\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ selectedLabels || '' }}\n </div>\n }\n\n </div>\n\n @if (!isLoading && showOptions) {\n <ul class=\"nxt-multi-select-menu\">\n @if (!isLoading && noDataFound && !canCreateCustomOption) {\n <li class=\"no-data\">\n No Data Found\n </li>\n }\n @if (canCreateCustomOption) {\n <li class=\"add-option\" (mousedown)=\"addSearchTextAsOption($event)\">\n <span class=\"add-indicator\">+</span>\n <span>Add \"{{ customOptionText }}\"</span>\n </li>\n }\n @if (!isLoading && orderedOptions?.length > 0) {\n <li class=\"select-all-option\">\n <div class=\"select-all-left\" (mousedown)=\"toggleSelectAll($event)\">\n <span class=\"check-indicator\" [ngClass]=\"{ 'checked': areAllVisibleSelected(), 'partial': hasPartialVisibleSelection }\">\n @if (areAllVisibleSelected()) {\n <span>\u2713</span>\n }\n @if (hasPartialVisibleSelection && !areAllVisibleSelected()) {\n <span>\u2212</span>\n }\n </span>\n <span>Select all</span>\n </div>\n <button type=\"button\" class=\"done-btn\" (mousedown)=\"closeDropdown($event)\">Done</button>\n </li>\n @for (item of orderedOptions; track item; let i = $index) {\n <li\n class=\"multi-select-option\"\n (mousedown)=\"toggleOption(item, $event)\"\n [ngClass]=\"{ 'selected': isSelected(item), 'selected-divider': isLastSelectedOption(i) }\"\n [style.font-size]=\"question?.fontSize || inputValueSize || '12px'\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightOptionText(getCardPrimaryText(item))\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightOptionText(getCardSubTitleText(item))\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightOptionText(badge.text)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n <div class=\"item-text\">\n <div class=\"item-name primary\" [innerHTML]=\"highlightOptionText(getOptionPrimaryText(item))\"></div>\n @if (getOptionSecondaryValues(item).length > 0) {\n <div class=\"item-secondary\">\n @for (value of getOptionSecondaryValues(item); track value; let last = $last) {\n <span class=\"secondary-text\" [innerHTML]=\"highlightOptionText(value)\"></span>\n @if (!last) {\n <span class=\"separator\"> | </span>\n }\n }\n </div>\n }\n </div>\n @if (isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n }\n @if (apiMeta?.cardConfig && isSelected(item)) {\n <span class=\"option-selected-mark\">\u2713</span>\n }\n </div>\n </li>\n }\n }\n </ul>\n }\n\n @if (mode === 'edit' && selectedValues.length > 0) {\n <!-- MR 23OCT26 Render selected cards instead of pills when cardConfig is present in MultiSelect -->\n @if (apiMeta?.cardConfig) {\n <div class=\"selected-cards-container\">\n @for (selected of selectedValues; track selected) {\n @if (getSelectedRecord(selected); as item) {\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(item)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(item) }}</div>\n @if (!readOnly) {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(item)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(item) }}</div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n } @else {\n <div class=\"selected-chip-row\">\n @for (selected of selectedValues; track selected) {\n <span class=\"selected-chip\"\n [style.font-size]=\"inputValueSize || '12px'\"\n [style.font-weight]=\"inputWeight || '400'\">\n {{ getSelectionDisplay(selected) }}\n @if (!readOnly) {\n <button type=\"button\" class=\"chip-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeSelected(selected, $event)\">\u00D7</button>\n }\n </span>\n }\n </div>\n }\n }\n</div>\n", styles: [".nxt-multi-select-wrapper{position:relative;width:100%}.nxt-multi-select-label{display:flex;gap:5px}.required-mark{color:red}.nxt-multi-select-control{position:relative;display:flex;align-items:center;gap:6px;min-height:20px;width:100%;border-radius:3px;padding:0 10px;cursor:pointer;box-sizing:border-box}.nxt-multi-select-control.readonly{cursor:default;padding:0!important}.left-icon{width:20px;height:20px;margin-left:5px}.nxt-multi-select-value{display:flex;align-items:center;font-size:12px;flex:1;gap:5px;min-width:0;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-control.open .nxt-multi-select-value{flex-direction:column;align-items:stretch;gap:0;padding:4px 0}.nxt-multi-select-value::-webkit-scrollbar{display:none}.placeholder{white-space:nowrap}.selected-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 8px;border-radius:999px;background:var(--fc-primary-color, #007bff);color:#fff;line-height:1.2;white-space:nowrap}.selected-chip-row{display:flex;flex-wrap:wrap;gap:6px;width:100%;margin-top:6px;box-sizing:border-box}.chip-remove,.selected-count{border:none;background:transparent;padding:0;cursor:pointer;font:inherit}.chip-remove{color:#fff;line-height:1}.nxt-multi-select-search-row{display:flex;align-items:center;width:100%;min-height:24px}.nxt-multi-select-search{width:100%;min-width:80px;border:none;outline:none;background:transparent;padding:5px 0}.selected-count{display:inline-flex;align-items:center;gap:8px;min-width:36px;height:22px;justify-content:center;padding:0 10px;border-radius:999px;color:#fff;font-size:12px;background:var(--fc-primary-color, #007bff);line-height:1}.nxt-multi-select-view{width:100%;min-height:24px;display:flex;align-items:center;padding:5px 0;word-break:break-word;white-space:nowrap;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.nxt-multi-select-view::-webkit-scrollbar{display:none}.nxt-multi-select-menu{position:absolute;z-index:10000;background:#fff;border:1px solid #e0e0e0;max-height:300px;overflow-y:auto;width:100%;min-width:320px;margin-top:0;list-style:none;padding:0;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;box-sizing:border-box}.nxt-multi-select-menu li{min-height:38px;padding:0;display:flex;align-items:center;font-size:12px;gap:0;cursor:pointer;box-sizing:border-box}.nxt-multi-select-menu li:hover,.nxt-multi-select-menu li.selected{background-color:#f5f5f5!important}.nxt-multi-select-menu li.selected-divider{border-bottom:1px solid #d7d7d7}.select-all-option{display:flex!important;align-items:center;justify-content:space-between;border-bottom:1px solid #d7d7d7;padding:8px 12px!important}.select-all-left{display:flex;align-items:center;gap:12px;cursor:pointer;flex:1}.done-btn{background:transparent;border:none;color:var(--fc-primary-color, #007bff);font-weight:600;font-size:13px;cursor:pointer;padding:2px 8px;border-radius:4px;line-height:1.2}.done-btn:hover{background-color:#007bff1a}.add-option{color:var(--fc-primary-color, #007bff);border-bottom:1px solid #d7d7d7;gap:12px!important;padding:8px 12px!important}.add-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid var(--fc-primary-color, #007bff);color:var(--fc-primary-color, #007bff);font-size:13px;line-height:1}.check-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;min-width:16px;height:16px;border-radius:50%;border:1px solid #b7b7b7;color:#fff;font-size:11px;line-height:1}.check-indicator.checked,.check-indicator.partial{background:var(--fc-primary-color, #007bff);border-color:var(--fc-primary-color, #007bff)}.no-data{font-size:12px;color:#777;padding:8px 12px!important}.multi-select-option{align-items:stretch!important;border-bottom:1px solid #f0f0f0;outline:none;transition:background-color .2s ease}.multi-select-option:last-child{border-bottom:none}.item-content{width:100%;padding:5px 10px;box-sizing:border-box}.item-details{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;text-align:left}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:600;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex;flex-wrap:wrap}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.option-selected-mark{color:var(--fc-primary-color, #007bff);flex-shrink:0;font-size:13px;line-height:20px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-multi-select-wrapper:after{content:\"\";position:absolute;left:0;bottom:0;width:100%;height:2px;overflow:hidden}.nxt-multi-select-wrapper.loading:after{background:linear-gradient(90deg,transparent,var(--fc-primary-color, #007bff),transparent);background-size:200% 100%;animation:shimmer 1.2s linear infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:6px 4px;width:100%}.card-image-wrapper{flex-shrink:0;width:80px;height:54px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:11px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;line-height:1.2}.badge-icon{width:11px;height:11px;flex-shrink:0;color:#27406b}.badge-icon-img{width:11px;height:11px;object-fit:contain;flex-shrink:0}.selected-cards-container{display:flex;flex-direction:column;gap:8px;margin-top:10px;width:100%}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"] }]
|
|
49676
49676
|
}], ctorParameters: () => [{ type: CountryService }, { type: TranslationService }, { type: ChangeService }, { type: DataService }, { type: StorageService }, { type: i0.ChangeDetectorRef }], propDecorators: { options: [{
|
|
49677
49677
|
type: Input
|
|
49678
49678
|
}], placeholder: [{
|
|
@@ -51149,6 +51149,14 @@ class NxtSearchBox {
|
|
|
51149
51149
|
removeValueEmit() {
|
|
51150
51150
|
this.clickItem(null, 'remove');
|
|
51151
51151
|
}
|
|
51152
|
+
// MR 24OCT26 Support selected card presentation in nxt-search when cardConfig is enabled
|
|
51153
|
+
isCardSelected() {
|
|
51154
|
+
return !!(this.apiMeta?.cardConfig &&
|
|
51155
|
+
this.valueObj &&
|
|
51156
|
+
typeof this.valueObj === 'object' &&
|
|
51157
|
+
Object.keys(this.valueObj).length > 0 &&
|
|
51158
|
+
this.filterName);
|
|
51159
|
+
}
|
|
51152
51160
|
// MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder
|
|
51153
51161
|
getCardImageUrl(item) {
|
|
51154
51162
|
if (!item)
|
|
@@ -51219,7 +51227,7 @@ class NxtSearchBox {
|
|
|
51219
51227
|
return results;
|
|
51220
51228
|
}
|
|
51221
51229
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NxtSearchBox, deps: [{ token: StorageService }, { token: ChangeService }, { token: DataService }, { token: CountryService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
51222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: NxtSearchBox, isStandalone: true, selector: "nxt-search-box", inputs: { placeHolderText: "placeHolderText", question: "question", apiMeta: "apiMeta", id: "id", readOnly: "readOnly", mode: "mode", from: "from", value: "value", onlyView: "onlyView", rowData: "rowData" }, outputs: { searchValueChange: "searchValueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "searchWrapper", first: true, predicate: ["searchWrapper"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"search-wrapper\" #searchWrapper>\n <nxt-input\n [type]=\"'list'\"\n [mode]=\"mode\"\n [from]=\"from\" [readOnly]=\"readOnly\"\n [value]=\"mode === 'edit' ? filterName : viewFilterName\"\n [labelFont]=\"question?.font\"\n [label]=\"question?.questionText ? ((question?.id+'.questionText') | nxtCustomTranslate : question?.questionText): ''\"\n [labelColor]=\"question?.color\"\n [labelSize]=\"question?.fontSize\"\n [inputValueSize]=\"question?.fontSize\"\n [labelWeight]=\"question?.fontWeight\"\n [inputWeight]=\"question?.fontWeight\"\n [showLabel]=\"question?.style ? question?.style?.showLabel && question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true : true\"\n inputBorder=\"#ccc\"\n svgHeight=\"20px\"\n svgWidth=\"20px\"\n [placeholder]=\"placeHolderText\"\n [required]=\"question?.isOptional\"\n inputBgColor=\"#ffffff\"\n [inputId]=\"question?.trackingId\"\n [errorMessages]=\"{ required: 'This field is required' }\"\n [inputIconLeftSrc]=\"question?.iconLeftSrc\"\n (inputValue)=\"getSourceDataLocal($event); inputValue($event.value, $event.question)\"\n (onFocus)=\"onInputFocus()\"\n (onBlur)=\"onInputBlur()\"\n [showSuggestion]=\"showSuggestion\"\n ariaOwns=\"selectList\"\n ariaHasPopup=\"listbox\"\n [isLoading]=\"isLoading\"\n [question]=\"question\"\n [onlyView]=\"onlyView\"\n (removeValueEmit)=\"removeValueEmit()\">\n </nxt-input>\n\n @if (showSuggestion) {\n <div id=\"selectList\" class=\"suggestion-wrapper\" role=\"listbox\">\n @if (finalResults().length > 0) {\n <div class=\"nxt-suggestions-container\">\n @for (item of finalResults(); track trackByFn($index, item)) {\n <div\n (click)=\"clickItem(item)\"\n class=\"suggestion-item\"\n role=\"option\"\n tabindex=\"0\"\n (keydown.enter)=\"clickItem(item)\"\n (keydown.space)=\"clickItem(item)\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightText(getCardPrimaryText(item), searchKeyWord)\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightText(getCardSubTitleText(item), searchKeyWord)\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightText(badge.text, searchKeyWord)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n @if (item.thumbnail) {\n <div class=\"thumbnail-wrapper\">\n <img [src]=\"item.thumbnail\" [alt]=\"item.name + ' avatar'\" />\n </div>\n }\n <div class=\"item-text\">\n <!-- Primary text (first key) -->\n @if (getKeys(getValues(item, SearchItem)).length > 0) {\n <div class=\"item-name primary\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[getKeys(getValues(item, SearchItem))[0]], searchKeyWord)\">\n </div>\n }\n <!-- Secondary text (remaining keys) -->\n @if (getKeys(getValues(item, SearchItem)).length > 1) {\n <div class=\"item-secondary\">\n @for (key of getKeys(getValues(item, SearchItem)); track key; let i = $index) {\n @if (i > 0) {\n <span class=\"secondary-text\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[key], searchKeyWord)\">\n </span>\n @if (i < getKeys(getValues(item, SearchItem)).length - 1) {\n <span class=\"separator\"> | </span>\n }\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (noResult && searchKeyWord) {\n <div class=\"no-results\">\n <div class=\"no-results-content\">\n <p>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <path d=\"m21 21-4.35-4.35\"></path>\n </svg>\n {{ 'NO_RESULTS_FOUND' | nxtCustomTranslate : 'No results found for' }} {{searchKeyWord}}\n </p>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".search-wrapper{position:relative;width:100%}.suggestion-wrapper{position:absolute;top:100%;left:0;right:0;min-width:320px;background:#fff;border:1px solid #e0e0e0;border-top:none;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;z-index:1050;max-height:320px;overflow:hidden}.nxt-suggestions-container{max-height:300px;overflow-y:auto;min-width:100%}.suggestion-item{cursor:pointer;border-bottom:1px solid #f0f0f0;transition:background-color .2s ease;outline:none}.suggestion-item:hover,.suggestion-item:focus{background-color:#f5f5f5}.suggestion-item:last-child{border-bottom:none}.item-content{padding:5px}.item-details{display:flex;align-items:flex-start;gap:12px;text-align:left}.thumbnail-wrapper{flex-shrink:0}.thumbnail-wrapper img{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid #e0e0e0}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:500;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.no-results{padding:5px;text-align:center;color:#666}.no-results-content{display:flex}.no-results-content svg{width:15px;height:15px}.no-results-content p{color:#6b7280;margin:0;font-size:11px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-suggestions-container::-webkit-scrollbar{width:6px}.nxt-suggestions-container::-webkit-scrollbar-track{background:#f1f1f1}.nxt-suggestions-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.nxt-suggestions-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}@media(max-width:768px){.suggestion-wrapper,.nxt-suggestions-container{max-height:250px}.item-content{padding:10px 12px}.item-details{gap:8px}.thumbnail-wrapper img{width:32px;height:32px}.item-name{font-size:13px}.item-secondary{font-size:11px}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:4px 2px}.card-image-wrapper{flex-shrink:0;width:90px;height:60px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:14px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:12px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:11px;font-weight:600;padding:2px 7px;border-radius:4px;line-height:1.2}.badge-icon{width:12px;height:12px;flex-shrink:0;color:#27406b}.badge-icon-img{width:12px;height:12px;object-fit:contain;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: NxtInput, selector: "nxt-input", inputs: ["label", "labelFont", "labelWeight", "inputWeight", "labelSize", "inputValueSize", "textAlign", "labelColor", "showLabel", "svgHeight", "svgWidth", "type", "inputIconRightSrc", "inputIconLeftSrc", "required", "minLength", "pattern", "errorMessages", "maxLength", "placeholder", "inputBgColor", "inputBorder", "placeholderColor", "placeholderFont", "placeholderWeight", "placeholderSize", "inputTextColor", "inputHeight", "inputWidth", "inputId", "inputBorderSize", "inputConfig", "confPassVal", "confPass", "mode", "value", "question", "showSuggestion", "ariaOwns", "ariaHasPopup", "isLoading", "options", "minDate", "maxDate", "rows", "from", "selectedOption", "apiMeta", "direction", "currency", "helpText", "apiKey", "readOnly", "padding", "margin", "onlyView", "mentionUsers", "size"], outputs: ["valueChange", "inputValue", "selectEmit", "onBlur", "onFocus", "toggleEmit", "removeValueEmit"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }] });
|
|
51230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: NxtSearchBox, isStandalone: true, selector: "nxt-search-box", inputs: { placeHolderText: "placeHolderText", question: "question", apiMeta: "apiMeta", id: "id", readOnly: "readOnly", mode: "mode", from: "from", value: "value", onlyView: "onlyView", rowData: "rowData" }, outputs: { searchValueChange: "searchValueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "searchWrapper", first: true, predicate: ["searchWrapper"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"search-wrapper\" #searchWrapper>\n <!-- MR 24OCT26 Support selected card presentation in nxt-search when cardConfig is enabled -->\n @if (isCardSelected()) {\n <div class=\"search-card-wrapper\">\n @if (question?.questionText && (question?.style ? (question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true) : true)) {\n <div class=\"search-card-label\"\n [style.font-family]=\"question?.font\"\n [style.font-weight]=\"question?.fontWeight || 'normal'\"\n [style.font-size]=\"question?.fontSize || '14px'\"\n [style.color]=\"question?.color || '#212529'\">\n {{ ((question?.id + '.questionText') | nxtCustomTranslate : question?.questionText) }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\" style=\"color: red; margin-left: 2px;\">*</span>\n }\n </div>\n }\n\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(valueObj)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(valueObj)\" [alt]=\"getCardPrimaryText(valueObj) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(valueObj) }}</div>\n @if (!readOnly && mode === 'edit') {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeValueEmit()\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(valueObj)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(valueObj) }}</div>\n }\n @if (getCardBadges(valueObj).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(valueObj); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n </div>\n } @else {\n <nxt-input\n [type]=\"'list'\"\n [mode]=\"mode\"\n [from]=\"from\" [readOnly]=\"readOnly\"\n [value]=\"mode === 'edit' ? filterName : viewFilterName\"\n [labelFont]=\"question?.font\"\n [label]=\"question?.questionText ? ((question?.id+'.questionText') | nxtCustomTranslate : question?.questionText): ''\"\n [labelColor]=\"question?.color\"\n [labelSize]=\"question?.fontSize\"\n [inputValueSize]=\"question?.fontSize\"\n [labelWeight]=\"question?.fontWeight\"\n [inputWeight]=\"question?.fontWeight\"\n [showLabel]=\"question?.style ? question?.style?.showLabel && question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true : true\"\n inputBorder=\"#ccc\"\n svgHeight=\"20px\"\n svgWidth=\"20px\"\n [placeholder]=\"placeHolderText\"\n [required]=\"question?.isOptional\"\n inputBgColor=\"#ffffff\"\n [inputId]=\"question?.trackingId\"\n [errorMessages]=\"{ required: 'This field is required' }\"\n [inputIconLeftSrc]=\"question?.iconLeftSrc\"\n (inputValue)=\"getSourceDataLocal($event); inputValue($event.value, $event.question)\"\n (onFocus)=\"onInputFocus()\"\n (onBlur)=\"onInputBlur()\"\n [showSuggestion]=\"showSuggestion\"\n ariaOwns=\"selectList\"\n ariaHasPopup=\"listbox\"\n [isLoading]=\"isLoading\"\n [question]=\"question\"\n [onlyView]=\"onlyView\"\n (removeValueEmit)=\"removeValueEmit()\">\n </nxt-input>\n\n @if (showSuggestion) {\n <div id=\"selectList\" class=\"suggestion-wrapper\" role=\"listbox\">\n @if (finalResults().length > 0) {\n <div class=\"nxt-suggestions-container\">\n @for (item of finalResults(); track trackByFn($index, item)) {\n <div\n (click)=\"clickItem(item)\"\n class=\"suggestion-item\"\n role=\"option\"\n tabindex=\"0\"\n (keydown.enter)=\"clickItem(item)\"\n (keydown.space)=\"clickItem(item)\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightText(getCardPrimaryText(item), searchKeyWord)\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightText(getCardSubTitleText(item), searchKeyWord)\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightText(badge.text, searchKeyWord)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n @if (item.thumbnail) {\n <div class=\"thumbnail-wrapper\">\n <img [src]=\"item.thumbnail\" [alt]=\"item.name + ' avatar'\" />\n </div>\n }\n <div class=\"item-text\">\n <!-- Primary text (first key) -->\n @if (getKeys(getValues(item, SearchItem)).length > 0) {\n <div class=\"item-name primary\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[getKeys(getValues(item, SearchItem))[0]], searchKeyWord)\">\n </div>\n }\n <!-- Secondary text (remaining keys) -->\n @if (getKeys(getValues(item, SearchItem)).length > 1) {\n <div class=\"item-secondary\">\n @for (key of getKeys(getValues(item, SearchItem)); track key; let i = $index) {\n @if (i > 0) {\n <span class=\"secondary-text\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[key], searchKeyWord)\">\n </span>\n @if (i < getKeys(getValues(item, SearchItem)).length - 1) {\n <span class=\"separator\"> | </span>\n }\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (noResult && searchKeyWord) {\n <div class=\"no-results\">\n <div class=\"no-results-content\">\n <p>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <path d=\"m21 21-4.35-4.35\"></path>\n </svg>\n {{ 'NO_RESULTS_FOUND' | nxtCustomTranslate : 'No results found for' }} {{searchKeyWord}}\n </p>\n </div>\n </div>\n }\n </div>\n }\n}\n</div>", styles: [".search-wrapper{position:relative;width:100%}.suggestion-wrapper{position:absolute;top:100%;left:0;right:0;min-width:320px;background:#fff;border:1px solid #e0e0e0;border-top:none;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;z-index:1050;max-height:320px;overflow:hidden}.nxt-suggestions-container{max-height:300px;overflow-y:auto;min-width:100%}.suggestion-item{cursor:pointer;border-bottom:1px solid #f0f0f0;transition:background-color .2s ease;outline:none}.suggestion-item:hover,.suggestion-item:focus{background-color:#f5f5f5}.suggestion-item:last-child{border-bottom:none}.item-content{padding:5px}.item-details{display:flex;align-items:flex-start;gap:12px;text-align:left}.thumbnail-wrapper{flex-shrink:0}.thumbnail-wrapper img{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid #e0e0e0}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:500;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.no-results{padding:5px;text-align:center;color:#666}.no-results-content{display:flex}.no-results-content svg{width:15px;height:15px}.no-results-content p{color:#6b7280;margin:0;font-size:11px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-suggestions-container::-webkit-scrollbar{width:6px}.nxt-suggestions-container::-webkit-scrollbar-track{background:#f1f1f1}.nxt-suggestions-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.nxt-suggestions-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}@media(max-width:768px){.suggestion-wrapper,.nxt-suggestions-container{max-height:250px}.item-content{padding:10px 12px}.item-details{gap:8px}.thumbnail-wrapper img{width:32px;height:32px}.item-name{font-size:13px}.item-secondary{font-size:11px}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:4px 2px}.card-image-wrapper{flex-shrink:0;width:90px;height:60px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:14px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:12px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:11px;font-weight:600;padding:2px 7px;border-radius:4px;line-height:1.2}.badge-icon{width:12px;height:12px;flex-shrink:0;color:#27406b}.badge-icon-img{width:12px;height:12px;object-fit:contain;flex-shrink:0}.search-card-wrapper{display:flex;flex-direction:column;width:100%}.search-card-label{display:flex;align-items:center;gap:4px;margin-bottom:6px}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out;width:100%;box-sizing:border-box}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: NxtInput, selector: "nxt-input", inputs: ["label", "labelFont", "labelWeight", "inputWeight", "labelSize", "inputValueSize", "textAlign", "labelColor", "showLabel", "svgHeight", "svgWidth", "type", "inputIconRightSrc", "inputIconLeftSrc", "required", "minLength", "pattern", "errorMessages", "maxLength", "placeholder", "inputBgColor", "inputBorder", "placeholderColor", "placeholderFont", "placeholderWeight", "placeholderSize", "inputTextColor", "inputHeight", "inputWidth", "inputId", "inputBorderSize", "inputConfig", "confPassVal", "confPass", "mode", "value", "question", "showSuggestion", "ariaOwns", "ariaHasPopup", "isLoading", "options", "minDate", "maxDate", "rows", "from", "selectedOption", "apiMeta", "direction", "currency", "helpText", "apiKey", "readOnly", "padding", "margin", "onlyView", "mentionUsers", "size"], outputs: ["valueChange", "inputValue", "selectEmit", "onBlur", "onFocus", "toggleEmit", "removeValueEmit"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }] });
|
|
51223
51231
|
}
|
|
51224
51232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NxtSearchBox, decorators: [{
|
|
51225
51233
|
type: Component,
|
|
@@ -51227,7 +51235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
51227
51235
|
FormsModule,
|
|
51228
51236
|
NxtInput,
|
|
51229
51237
|
NxtCustomTranslatePipe
|
|
51230
|
-
], template: "<div class=\"search-wrapper\" #searchWrapper>\n <nxt-input\n [type]=\"'list'\"\n [mode]=\"mode\"\n [from]=\"from\" [readOnly]=\"readOnly\"\n [value]=\"mode === 'edit' ? filterName : viewFilterName\"\n [labelFont]=\"question?.font\"\n [label]=\"question?.questionText ? ((question?.id+'.questionText') | nxtCustomTranslate : question?.questionText): ''\"\n [labelColor]=\"question?.color\"\n [labelSize]=\"question?.fontSize\"\n [inputValueSize]=\"question?.fontSize\"\n [labelWeight]=\"question?.fontWeight\"\n [inputWeight]=\"question?.fontWeight\"\n [showLabel]=\"question?.style ? question?.style?.showLabel && question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true : true\"\n inputBorder=\"#ccc\"\n svgHeight=\"20px\"\n svgWidth=\"20px\"\n [placeholder]=\"placeHolderText\"\n [required]=\"question?.isOptional\"\n inputBgColor=\"#ffffff\"\n [inputId]=\"question?.trackingId\"\n [errorMessages]=\"{ required: 'This field is required' }\"\n [inputIconLeftSrc]=\"question?.iconLeftSrc\"\n (inputValue)=\"getSourceDataLocal($event); inputValue($event.value, $event.question)\"\n (onFocus)=\"onInputFocus()\"\n (onBlur)=\"onInputBlur()\"\n [showSuggestion]=\"showSuggestion\"\n ariaOwns=\"selectList\"\n ariaHasPopup=\"listbox\"\n [isLoading]=\"isLoading\"\n [question]=\"question\"\n [onlyView]=\"onlyView\"\n (removeValueEmit)=\"removeValueEmit()\">\n </nxt-input>\n\n @if (showSuggestion) {\n <div id=\"selectList\" class=\"suggestion-wrapper\" role=\"listbox\">\n @if (finalResults().length > 0) {\n <div class=\"nxt-suggestions-container\">\n @for (item of finalResults(); track trackByFn($index, item)) {\n <div\n (click)=\"clickItem(item)\"\n class=\"suggestion-item\"\n role=\"option\"\n tabindex=\"0\"\n (keydown.enter)=\"clickItem(item)\"\n (keydown.space)=\"clickItem(item)\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightText(getCardPrimaryText(item), searchKeyWord)\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightText(getCardSubTitleText(item), searchKeyWord)\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightText(badge.text, searchKeyWord)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n @if (item.thumbnail) {\n <div class=\"thumbnail-wrapper\">\n <img [src]=\"item.thumbnail\" [alt]=\"item.name + ' avatar'\" />\n </div>\n }\n <div class=\"item-text\">\n <!-- Primary text (first key) -->\n @if (getKeys(getValues(item, SearchItem)).length > 0) {\n <div class=\"item-name primary\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[getKeys(getValues(item, SearchItem))[0]], searchKeyWord)\">\n </div>\n }\n <!-- Secondary text (remaining keys) -->\n @if (getKeys(getValues(item, SearchItem)).length > 1) {\n <div class=\"item-secondary\">\n @for (key of getKeys(getValues(item, SearchItem)); track key; let i = $index) {\n @if (i > 0) {\n <span class=\"secondary-text\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[key], searchKeyWord)\">\n </span>\n @if (i < getKeys(getValues(item, SearchItem)).length - 1) {\n <span class=\"separator\"> | </span>\n }\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (noResult && searchKeyWord) {\n <div class=\"no-results\">\n <div class=\"no-results-content\">\n <p>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <path d=\"m21 21-4.35-4.35\"></path>\n </svg>\n {{ 'NO_RESULTS_FOUND' | nxtCustomTranslate : 'No results found for' }} {{searchKeyWord}}\n </p>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".search-wrapper{position:relative;width:100%}.suggestion-wrapper{position:absolute;top:100%;left:0;right:0;min-width:320px;background:#fff;border:1px solid #e0e0e0;border-top:none;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;z-index:1050;max-height:320px;overflow:hidden}.nxt-suggestions-container{max-height:300px;overflow-y:auto;min-width:100%}.suggestion-item{cursor:pointer;border-bottom:1px solid #f0f0f0;transition:background-color .2s ease;outline:none}.suggestion-item:hover,.suggestion-item:focus{background-color:#f5f5f5}.suggestion-item:last-child{border-bottom:none}.item-content{padding:5px}.item-details{display:flex;align-items:flex-start;gap:12px;text-align:left}.thumbnail-wrapper{flex-shrink:0}.thumbnail-wrapper img{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid #e0e0e0}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:500;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.no-results{padding:5px;text-align:center;color:#666}.no-results-content{display:flex}.no-results-content svg{width:15px;height:15px}.no-results-content p{color:#6b7280;margin:0;font-size:11px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-suggestions-container::-webkit-scrollbar{width:6px}.nxt-suggestions-container::-webkit-scrollbar-track{background:#f1f1f1}.nxt-suggestions-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.nxt-suggestions-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}@media(max-width:768px){.suggestion-wrapper,.nxt-suggestions-container{max-height:250px}.item-content{padding:10px 12px}.item-details{gap:8px}.thumbnail-wrapper img{width:32px;height:32px}.item-name{font-size:13px}.item-secondary{font-size:11px}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:4px 2px}.card-image-wrapper{flex-shrink:0;width:90px;height:60px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:14px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:12px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:11px;font-weight:600;padding:2px 7px;border-radius:4px;line-height:1.2}.badge-icon{width:12px;height:12px;flex-shrink:0;color:#27406b}.badge-icon-img{width:12px;height:12px;object-fit:contain;flex-shrink:0}\n"] }]
|
|
51238
|
+
], template: "<div class=\"search-wrapper\" #searchWrapper>\n <!-- MR 24OCT26 Support selected card presentation in nxt-search when cardConfig is enabled -->\n @if (isCardSelected()) {\n <div class=\"search-card-wrapper\">\n @if (question?.questionText && (question?.style ? (question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true) : true)) {\n <div class=\"search-card-label\"\n [style.font-family]=\"question?.font\"\n [style.font-weight]=\"question?.fontWeight || 'normal'\"\n [style.font-size]=\"question?.fontSize || '14px'\"\n [style.color]=\"question?.color || '#212529'\">\n {{ ((question?.id + '.questionText') | nxtCustomTranslate : question?.questionText) }}\n @if (question?.isOptional && mode === 'edit') {\n <span class=\"required-mark\" style=\"color: red; margin-left: 2px;\">*</span>\n }\n </div>\n }\n\n <div class=\"selected-card-item\">\n @if (getCardImageUrl(valueObj)) {\n <div class=\"selected-card-image-wrapper\">\n <img [src]=\"getCardImageUrl(valueObj)\" [alt]=\"getCardPrimaryText(valueObj) || 'Card image'\" />\n </div>\n }\n <div class=\"selected-card-content\">\n <div class=\"selected-card-header\">\n <div class=\"selected-card-primary\">{{ getCardPrimaryText(valueObj) }}</div>\n @if (!readOnly && mode === 'edit') {\n <button type=\"button\" class=\"selected-card-remove\" aria-label=\"Remove selected item\"\n (click)=\"removeValueEmit()\">\u00D7</button>\n }\n </div>\n @if (getCardSubTitleText(valueObj)) {\n <div class=\"selected-card-subtitle\">{{ getCardSubTitleText(valueObj) }}</div>\n }\n @if (getCardBadges(valueObj).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(valueObj); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\">{{ badge.text }}</span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n </div>\n } @else {\n <nxt-input\n [type]=\"'list'\"\n [mode]=\"mode\"\n [from]=\"from\" [readOnly]=\"readOnly\"\n [value]=\"mode === 'edit' ? filterName : viewFilterName\"\n [labelFont]=\"question?.font\"\n [label]=\"question?.questionText ? ((question?.id+'.questionText') | nxtCustomTranslate : question?.questionText): ''\"\n [labelColor]=\"question?.color\"\n [labelSize]=\"question?.fontSize\"\n [inputValueSize]=\"question?.fontSize\"\n [labelWeight]=\"question?.fontWeight\"\n [inputWeight]=\"question?.fontWeight\"\n [showLabel]=\"question?.style ? question?.style?.showLabel && question?.style?.showLabel !== null && question?.style?.showLabel !== undefined ? question?.style?.showLabel : true : true\"\n inputBorder=\"#ccc\"\n svgHeight=\"20px\"\n svgWidth=\"20px\"\n [placeholder]=\"placeHolderText\"\n [required]=\"question?.isOptional\"\n inputBgColor=\"#ffffff\"\n [inputId]=\"question?.trackingId\"\n [errorMessages]=\"{ required: 'This field is required' }\"\n [inputIconLeftSrc]=\"question?.iconLeftSrc\"\n (inputValue)=\"getSourceDataLocal($event); inputValue($event.value, $event.question)\"\n (onFocus)=\"onInputFocus()\"\n (onBlur)=\"onInputBlur()\"\n [showSuggestion]=\"showSuggestion\"\n ariaOwns=\"selectList\"\n ariaHasPopup=\"listbox\"\n [isLoading]=\"isLoading\"\n [question]=\"question\"\n [onlyView]=\"onlyView\"\n (removeValueEmit)=\"removeValueEmit()\">\n </nxt-input>\n\n @if (showSuggestion) {\n <div id=\"selectList\" class=\"suggestion-wrapper\" role=\"listbox\">\n @if (finalResults().length > 0) {\n <div class=\"nxt-suggestions-container\">\n @for (item of finalResults(); track trackByFn($index, item)) {\n <div\n (click)=\"clickItem(item)\"\n class=\"suggestion-item\"\n role=\"option\"\n tabindex=\"0\"\n (keydown.enter)=\"clickItem(item)\"\n (keydown.space)=\"clickItem(item)\">\n <div class=\"item-content\">\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n @if (apiMeta?.cardConfig) {\n <div class=\"card-item-wrapper\">\n @if (getCardImageUrl(item)) {\n <div class=\"card-image-wrapper\">\n <img [src]=\"getCardImageUrl(item)\" [alt]=\"getCardPrimaryText(item) || 'Card image'\" />\n </div>\n }\n <div class=\"card-content\">\n @if (getCardPrimaryText(item)) {\n <div class=\"card-primary\" [innerHTML]=\"highlightText(getCardPrimaryText(item), searchKeyWord)\"></div>\n }\n @if (getCardSubTitleText(item)) {\n <div class=\"card-subtitle\" [innerHTML]=\"highlightText(getCardSubTitleText(item), searchKeyWord)\"></div>\n }\n @if (getCardBadges(item).length > 0) {\n <div class=\"card-badges-row\">\n @for (badge of getCardBadges(item); track badge.text + badge.icon) {\n <span class=\"card-badge-pill\">\n @if (badge.icon === 'hotel') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z\"/>\n </svg>\n } @else if (badge.icon === 'calendar') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n </svg>\n } @else if (badge.icon === 'location' || badge.icon === 'pin') {\n <svg class=\"badge-icon\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z\"/>\n </svg>\n } @else if (badge.icon && (badge.icon.startsWith('http://') || badge.icon.startsWith('https://') || badge.icon.startsWith('data:') || badge.icon.startsWith('/'))) {\n <img [src]=\"badge.icon\" class=\"badge-icon-img\" alt=\"icon\" />\n }\n <span class=\"badge-label\" [innerHTML]=\"highlightText(badge.text, searchKeyWord)\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"item-details\">\n @if (item.thumbnail) {\n <div class=\"thumbnail-wrapper\">\n <img [src]=\"item.thumbnail\" [alt]=\"item.name + ' avatar'\" />\n </div>\n }\n <div class=\"item-text\">\n <!-- Primary text (first key) -->\n @if (getKeys(getValues(item, SearchItem)).length > 0) {\n <div class=\"item-name primary\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[getKeys(getValues(item, SearchItem))[0]], searchKeyWord)\">\n </div>\n }\n <!-- Secondary text (remaining keys) -->\n @if (getKeys(getValues(item, SearchItem)).length > 1) {\n <div class=\"item-secondary\">\n @for (key of getKeys(getValues(item, SearchItem)); track key; let i = $index) {\n @if (i > 0) {\n <span class=\"secondary-text\"\n [innerHTML]=\"highlightText(getValues(item, SearchItem)[key], searchKeyWord)\">\n </span>\n @if (i < getKeys(getValues(item, SearchItem)).length - 1) {\n <span class=\"separator\"> | </span>\n }\n }\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (noResult && searchKeyWord) {\n <div class=\"no-results\">\n <div class=\"no-results-content\">\n <p>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <path d=\"m21 21-4.35-4.35\"></path>\n </svg>\n {{ 'NO_RESULTS_FOUND' | nxtCustomTranslate : 'No results found for' }} {{searchKeyWord}}\n </p>\n </div>\n </div>\n }\n </div>\n }\n}\n</div>", styles: [".search-wrapper{position:relative;width:100%}.suggestion-wrapper{position:absolute;top:100%;left:0;right:0;min-width:320px;background:#fff;border:1px solid #e0e0e0;border-top:none;border-radius:0 0 4px 4px;box-shadow:0 2px 8px #0000001a;z-index:1050;max-height:320px;overflow:hidden}.nxt-suggestions-container{max-height:300px;overflow-y:auto;min-width:100%}.suggestion-item{cursor:pointer;border-bottom:1px solid #f0f0f0;transition:background-color .2s ease;outline:none}.suggestion-item:hover,.suggestion-item:focus{background-color:#f5f5f5}.suggestion-item:last-child{border-bottom:none}.item-content{padding:5px}.item-details{display:flex;align-items:flex-start;gap:12px;text-align:left}.thumbnail-wrapper{flex-shrink:0}.thumbnail-wrapper img{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid #e0e0e0}.item-text{flex:1;min-width:0}.item-name{font-size:14px;font-weight:500;color:#333;line-height:1.4;margin-bottom:2px;word-wrap:break-word;overflow-wrap:break-word}.item-secondary{font-size:12px;color:#666;line-height:1.3;display:flex}.secondary-text{display:inline}.separator{color:#999;margin:0 3px}.no-results{padding:5px;text-align:center;color:#666}.no-results-content{display:flex}.no-results-content svg{width:15px;height:15px}.no-results-content p{color:#6b7280;margin:0;font-size:11px}:host ::ng-deep .highlight{font-weight:700;display:inline}.nxt-suggestions-container::-webkit-scrollbar{width:6px}.nxt-suggestions-container::-webkit-scrollbar-track{background:#f1f1f1}.nxt-suggestions-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.nxt-suggestions-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}@media(max-width:768px){.suggestion-wrapper,.nxt-suggestions-container{max-height:250px}.item-content{padding:10px 12px}.item-details{gap:8px}.thumbnail-wrapper img{width:32px;height:32px}.item-name{font-size:13px}.item-secondary{font-size:11px}}.card-item-wrapper{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:4px 2px}.card-image-wrapper{flex-shrink:0;width:90px;height:60px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.card-primary{font-size:14px;font-weight:700;color:#0b1a48;line-height:1.3;word-wrap:break-word}.card-subtitle{font-size:12px;font-weight:400;color:#556987;line-height:1.3;word-wrap:break-word}.card-badges-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px}.card-badge-pill{display:inline-flex;align-items:center;gap:4px;background-color:#f0f4f9;color:#27406b;font-size:11px;font-weight:600;padding:2px 7px;border-radius:4px;line-height:1.2}.badge-icon{width:12px;height:12px;flex-shrink:0;color:#27406b}.badge-icon-img{width:12px;height:12px;object-fit:contain;flex-shrink:0}.search-card-wrapper{display:flex;flex-direction:column;width:100%}.search-card-label{display:flex;align-items:center;gap:4px;margin-bottom:6px}.selected-card-item{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 1px 3px #0f172a0d;position:relative;transition:all .15s ease-in-out;width:100%;box-sizing:border-box}.selected-card-item:hover{border-color:#cbd5e1;box-shadow:0 3px 6px -1px #0f172a14}.selected-card-image-wrapper{flex-shrink:0;width:76px;height:52px;border-radius:6px;overflow:hidden;background:#f1f5f9;border:1px solid #e2e8f0}.selected-card-image-wrapper img{width:100%;height:100%;object-fit:cover;display:block}.selected-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.selected-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.selected-card-primary{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.3}.selected-card-remove{background:#f1f5f9;border:none;color:#64748b;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0;flex-shrink:0;transition:all .15s ease}.selected-card-remove:hover{background:#fee2e2;color:#ef4444}.selected-card-subtitle{font-size:11px;font-weight:400;color:#64748b;line-height:1.35;word-wrap:break-word}\n"] }]
|
|
51231
51239
|
}], ctorParameters: () => [{ type: StorageService }, { type: ChangeService }, { type: DataService }, { type: CountryService }, { type: i0.ElementRef }], propDecorators: { placeHolderText: [{
|
|
51232
51240
|
type: Input
|
|
51233
51241
|
}], question: [{
|
|
@@ -67471,6 +67479,7 @@ class PropertiesComponent {
|
|
|
67471
67479
|
modalSubText = {};
|
|
67472
67480
|
modalSubTextFieldsStr = '';
|
|
67473
67481
|
modalSubTextQueryParamStr = '';
|
|
67482
|
+
modalSubTextAllowedTypesStr = '';
|
|
67474
67483
|
isCardConfigEnabled = false;
|
|
67475
67484
|
modalCardConfig = { imageUrl: '', primary: '', subTitle: '' };
|
|
67476
67485
|
modalBadges = [];
|
|
@@ -67937,7 +67946,7 @@ class PropertiesComponent {
|
|
|
67937
67946
|
toggleSubQuestion(prop) {
|
|
67938
67947
|
this.openSubTextModal(prop);
|
|
67939
67948
|
}
|
|
67940
|
-
// MR
|
|
67949
|
+
// MR 24OCT26 Fix SubText modal binding and clearing issues
|
|
67941
67950
|
hasSubTextConfigured() {
|
|
67942
67951
|
const el = this.selectedElement();
|
|
67943
67952
|
if (!el)
|
|
@@ -67945,7 +67954,7 @@ class PropertiesComponent {
|
|
|
67945
67954
|
let sub = el.subText;
|
|
67946
67955
|
if (el.type === 'Table' && this.selectColumn()) {
|
|
67947
67956
|
const col = el.fieldsMeta?.find((f) => f.uniqueIdentifier === this.selectColumn() || f.fieldName === this.selectColumn());
|
|
67948
|
-
sub = col?.question?.subText || sub;
|
|
67957
|
+
sub = col?.question?.subText || col?.subText || sub;
|
|
67949
67958
|
}
|
|
67950
67959
|
if (typeof sub === 'string') {
|
|
67951
67960
|
try {
|
|
@@ -67964,8 +67973,8 @@ class PropertiesComponent {
|
|
|
67964
67973
|
let sub = el.subText;
|
|
67965
67974
|
if (el.type === 'Table' && this.selectColumn()) {
|
|
67966
67975
|
const col = el.fieldsMeta?.find((f) => f.uniqueIdentifier === this.selectColumn() || f.fieldName === this.selectColumn());
|
|
67967
|
-
if (col?.question?.subText) {
|
|
67968
|
-
sub = col
|
|
67976
|
+
if (col?.question?.subText || col?.subText) {
|
|
67977
|
+
sub = col?.question?.subText || col?.subText;
|
|
67969
67978
|
}
|
|
67970
67979
|
}
|
|
67971
67980
|
if (typeof sub === 'string' && sub.trim() !== '') {
|
|
@@ -67986,6 +67995,9 @@ class PropertiesComponent {
|
|
|
67986
67995
|
this.modalSubTextQueryParamStr = Array.isArray(sub.queryParameter)
|
|
67987
67996
|
? sub.queryParameter.join(', ')
|
|
67988
67997
|
: (sub.queryParameter || '');
|
|
67998
|
+
this.modalSubTextAllowedTypesStr = Array.isArray(sub.allowedTypes)
|
|
67999
|
+
? sub.allowedTypes.join(', ')
|
|
68000
|
+
: (sub.allowedTypes || '');
|
|
67989
68001
|
if (sub.cardConfig) {
|
|
67990
68002
|
this.isCardConfigEnabled = true;
|
|
67991
68003
|
this.modalCardConfig = {
|
|
@@ -68025,6 +68037,7 @@ class PropertiesComponent {
|
|
|
68025
68037
|
closeSubTextModal() {
|
|
68026
68038
|
this.isSubTextModalOpen = false;
|
|
68027
68039
|
}
|
|
68040
|
+
// MR 24OCT26 Fix SubText modal binding and clearing issues
|
|
68028
68041
|
saveSubTextModal() {
|
|
68029
68042
|
const updated = { ...this.modalSubText };
|
|
68030
68043
|
if (typeof this.modalSubTextFieldsStr === 'string' && this.modalSubTextFieldsStr.trim() !== '') {
|
|
@@ -68042,6 +68055,29 @@ class PropertiesComponent {
|
|
|
68042
68055
|
.map((s) => s.trim())
|
|
68043
68056
|
.filter((s) => s.length > 0);
|
|
68044
68057
|
}
|
|
68058
|
+
else {
|
|
68059
|
+
updated.queryParameter = null;
|
|
68060
|
+
}
|
|
68061
|
+
if (typeof this.modalSubTextAllowedTypesStr === 'string' && this.modalSubTextAllowedTypesStr.trim() !== '') {
|
|
68062
|
+
updated.allowedTypes = this.modalSubTextAllowedTypesStr
|
|
68063
|
+
.split(',')
|
|
68064
|
+
.map((s) => s.trim())
|
|
68065
|
+
.filter((s) => s.length > 0);
|
|
68066
|
+
}
|
|
68067
|
+
else {
|
|
68068
|
+
updated.allowedTypes = null;
|
|
68069
|
+
}
|
|
68070
|
+
const stringFields = [
|
|
68071
|
+
'endpoint', 'variable', 'defaultField', 'sourceQuestionId',
|
|
68072
|
+
'dependentValue', 'queryField', 'queryValue', 'queryValueReference',
|
|
68073
|
+
'uniqueKey', 'groupField', 'childGroupField'
|
|
68074
|
+
];
|
|
68075
|
+
stringFields.forEach(key => {
|
|
68076
|
+
if (typeof updated[key] === 'string') {
|
|
68077
|
+
const trimmed = updated[key].trim();
|
|
68078
|
+
updated[key] = trimmed !== '' ? trimmed : null;
|
|
68079
|
+
}
|
|
68080
|
+
});
|
|
68045
68081
|
if (this.isCardConfigEnabled) {
|
|
68046
68082
|
const validBadges = this.modalBadges.filter(b => b.field && b.field.trim() !== '');
|
|
68047
68083
|
updated.cardConfig = {
|
|
@@ -68889,7 +68925,7 @@ class PropertiesComponent {
|
|
|
68889
68925
|
}
|
|
68890
68926
|
}
|
|
68891
68927
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PropertiesComponent, deps: [{ token: FormBuilderService }, { token: TemplateService }, { token: TranslationService }, { token: i0.ChangeDetectorRef }, { token: DataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
68892
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PropertiesComponent, isStandalone: true, selector: "app-properties", inputs: { templateSelected: "templateSelected", selectedElementType: "selectedElementType" }, outputs: { formButtonHandler: "formButtonHandler", templateSaveHandler: "templateSaveHandler" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <div style=\"margin-top: 15px; border: 1px solid #ddd; padding: 20px; border-radius: 12px; background-color: #f9f9f9;\">\n <div class=\"form-header\">\n <label class=\"form-label\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n <button (click)=\"addNewButton()\" class=\"add-button\">+ {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}</button>\n </div>\n @for (btn of book()?.questionbook?.action || []; track btn; let i = $index) {\n <div class=\"button-config-card\">\n <div class=\"form-group\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [ngModel]=\"btn.id\" (ngModelChange)=\"onButtonPropertyChange(i, 'id', $event,true)\" placeholder=\"Enter button id\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((btn.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [ngModel]=\"btn.name\" (ngModelChange)=\"onButtonPropertyChange(i, 'name', $event,true)\" placeholder=\"Enter button name\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event Name' }}</label>\n <input type=\"text\" [ngModel]=\"btn.eventtoemit\" (ngModelChange)=\"onButtonPropertyChange(i, 'eventtoemit', $event)\" placeholder=\"Event to emit\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [ngModel]=\"btn.actionData\" (ngModelChange)=\"onButtonPropertyChange(i, 'actionData', $event)\" placeholder=\"Event to actionData\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt' }}</label>\n <input type=\"text\" [ngModel]=\"btn.alt\" (ngModelChange)=\"onButtonPropertyChange(i, 'alt', $event)\" placeholder=\"Button alt text\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [ngModel]=\"btn.endpoint\" (ngModelChange)=\"onButtonPropertyChange(i, 'endpoint', $event)\" placeholder=\"API endpoint\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [ngModel]=\"btn.method\" (ngModelChange)=\"onButtonPropertyChange(i, 'method', $event)\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.bgColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'bgColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderSize\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderSize', $event)\">\n <span>{{ btn.borderSize }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.borderColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderRadius\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderRadius', $event)\">\n <span>{{ btn.borderRadius }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [ngModel]=\"btn.width\" (ngModelChange)=\"onButtonPropertyChange(i, 'width', $event)\" min=\"50\" placeholder=\"Enter width in px\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.textColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'textColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}</label>\n <input type=\"range\" min=\"0\" max=\"100\" [ngModel]=\"btn.positionPercent\" (ngModelChange)=\"onButtonPropertyChange(i, 'positionPercent', $event)\">\n <span>{{ btn.positionPercent }}%</span>\n </div>\n <div class=\"form-group\">\n <label>\n <input type=\"checkbox\" [ngModel]=\"btn.updateParentData\"\n (ngModelChange)=\"onButtonPropertyChange(i, 'updateParentData', $event)\"\n />\n {{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'updateParentData' }}\n </label>\n </div>\n <button (click)=\"removeButton(btn)\" class=\"remove-button\">\u00D7 {{ 'REMOVE' | nxtCustomTranslate : 'Remove' }}</button>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable (Response Key)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field (Selected Value)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (comma-separated)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryParameter\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field (in API URL)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value (Parent referenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (Pill Chips with Icons)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">×</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.allowedTypes\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size (MB)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">×</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">×</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n ▲\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n ▼\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">☰</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i6$1.NgClass, i6.NgSelectOption, i6.ɵNgSelectMultipleOption, i6.DefaultValueAccessor, i6.NumberValueAccessor, i6.RangeValueAccessor, i6.CheckboxControlValueAccessor, i6.SelectControlValueAccessor, i6.NgControlStatus, i6.MinValidator, i6.NgModel, /* @ts-ignore */
|
|
68928
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PropertiesComponent, isStandalone: true, selector: "app-properties", inputs: { templateSelected: "templateSelected", selectedElementType: "selectedElementType" }, outputs: { formButtonHandler: "formButtonHandler", templateSaveHandler: "templateSaveHandler" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <div style=\"margin-top: 15px; border: 1px solid #ddd; padding: 20px; border-radius: 12px; background-color: #f9f9f9;\">\n <div class=\"form-header\">\n <label class=\"form-label\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n <button (click)=\"addNewButton()\" class=\"add-button\">+ {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}</button>\n </div>\n @for (btn of book()?.questionbook?.action || []; track btn; let i = $index) {\n <div class=\"button-config-card\">\n <div class=\"form-group\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [ngModel]=\"btn.id\" (ngModelChange)=\"onButtonPropertyChange(i, 'id', $event,true)\" placeholder=\"Enter button id\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((btn.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [ngModel]=\"btn.name\" (ngModelChange)=\"onButtonPropertyChange(i, 'name', $event,true)\" placeholder=\"Enter button name\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event Name' }}</label>\n <input type=\"text\" [ngModel]=\"btn.eventtoemit\" (ngModelChange)=\"onButtonPropertyChange(i, 'eventtoemit', $event)\" placeholder=\"Event to emit\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [ngModel]=\"btn.actionData\" (ngModelChange)=\"onButtonPropertyChange(i, 'actionData', $event)\" placeholder=\"Event to actionData\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt' }}</label>\n <input type=\"text\" [ngModel]=\"btn.alt\" (ngModelChange)=\"onButtonPropertyChange(i, 'alt', $event)\" placeholder=\"Button alt text\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [ngModel]=\"btn.endpoint\" (ngModelChange)=\"onButtonPropertyChange(i, 'endpoint', $event)\" placeholder=\"API endpoint\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [ngModel]=\"btn.method\" (ngModelChange)=\"onButtonPropertyChange(i, 'method', $event)\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.bgColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'bgColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderSize\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderSize', $event)\">\n <span>{{ btn.borderSize }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.borderColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderRadius\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderRadius', $event)\">\n <span>{{ btn.borderRadius }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [ngModel]=\"btn.width\" (ngModelChange)=\"onButtonPropertyChange(i, 'width', $event)\" min=\"50\" placeholder=\"Enter width in px\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.textColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'textColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}</label>\n <input type=\"range\" min=\"0\" max=\"100\" [ngModel]=\"btn.positionPercent\" (ngModelChange)=\"onButtonPropertyChange(i, 'positionPercent', $event)\">\n <span>{{ btn.positionPercent }}%</span>\n </div>\n <div class=\"form-group\">\n <label>\n <input type=\"checkbox\" [ngModel]=\"btn.updateParentData\"\n (ngModelChange)=\"onButtonPropertyChange(i, 'updateParentData', $event)\"\n />\n {{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'updateParentData' }}\n </label>\n </div>\n <button (click)=\"removeButton(btn)\" class=\"remove-button\">\u00D7 {{ 'REMOVE' | nxtCustomTranslate : 'Remove' }}</button>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable (Response Key)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field (Selected Value)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (comma-separated)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field (in API URL)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value (Parent referenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (Pill Chips with Icons)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">×</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size (MB)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">×</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">×</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n ▲\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n ▼\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">☰</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i6$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: NxtCustomTranslatePipe, name: "nxtCustomTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i6$1.NgClass, i6.NgSelectOption, i6.ɵNgSelectMultipleOption, i6.DefaultValueAccessor, i6.NumberValueAccessor, i6.RangeValueAccessor, i6.CheckboxControlValueAccessor, i6.SelectControlValueAccessor, i6.NgControlStatus, i6.MinValidator, i6.NgModel, /* @ts-ignore */
|
|
68893
68929
|
Promise.resolve().then(function () { return searchBox_component; }).then(m => m.NxtSearchBox), /* @ts-ignore */
|
|
68894
68930
|
Promise.resolve().then(function () { return formulaInput_component; }).then(m => m.FormulaInputComponent), GetValueByPathPipe, NxtCustomTranslatePipe], () => [i6$1.NgClass, /* @ts-ignore */
|
|
68895
68931
|
Promise.resolve().then(function () { return imageCropper_component; }).then(m => m.ImageCropperComponent), NxtCustomTranslatePipe], () => [i6.DefaultValueAccessor, i6.NgControlStatus, i6.NgModel, /* @ts-ignore */
|
|
@@ -68900,7 +68936,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.7", ng
|
|
|
68900
68936
|
Promise.resolve().then(function () { return formulaInput_component; }).then(m => m.FormulaInputComponent), /* @ts-ignore */
|
|
68901
68937
|
Promise.resolve().then(function () { return imageCropper_component; }).then(m => m.ImageCropperComponent)], resolveMetadata: (NxtSearchBox, FormulaInputComponent, ImageCropperComponent) => ({ decorators: [{
|
|
68902
68938
|
type: Component,
|
|
68903
|
-
args: [{ selector: 'app-properties', standalone: true, imports: [CommonModule, FormsModule, ImageCropperComponent, NxtSearchBox, NgClass, GetValueByPathPipe, NxtCustomTranslatePipe, FormulaInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <div style=\"margin-top: 15px; border: 1px solid #ddd; padding: 20px; border-radius: 12px; background-color: #f9f9f9;\">\n <div class=\"form-header\">\n <label class=\"form-label\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n <button (click)=\"addNewButton()\" class=\"add-button\">+ {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}</button>\n </div>\n @for (btn of book()?.questionbook?.action || []; track btn; let i = $index) {\n <div class=\"button-config-card\">\n <div class=\"form-group\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [ngModel]=\"btn.id\" (ngModelChange)=\"onButtonPropertyChange(i, 'id', $event,true)\" placeholder=\"Enter button id\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((btn.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [ngModel]=\"btn.name\" (ngModelChange)=\"onButtonPropertyChange(i, 'name', $event,true)\" placeholder=\"Enter button name\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event Name' }}</label>\n <input type=\"text\" [ngModel]=\"btn.eventtoemit\" (ngModelChange)=\"onButtonPropertyChange(i, 'eventtoemit', $event)\" placeholder=\"Event to emit\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [ngModel]=\"btn.actionData\" (ngModelChange)=\"onButtonPropertyChange(i, 'actionData', $event)\" placeholder=\"Event to actionData\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt' }}</label>\n <input type=\"text\" [ngModel]=\"btn.alt\" (ngModelChange)=\"onButtonPropertyChange(i, 'alt', $event)\" placeholder=\"Button alt text\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [ngModel]=\"btn.endpoint\" (ngModelChange)=\"onButtonPropertyChange(i, 'endpoint', $event)\" placeholder=\"API endpoint\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [ngModel]=\"btn.method\" (ngModelChange)=\"onButtonPropertyChange(i, 'method', $event)\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.bgColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'bgColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderSize\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderSize', $event)\">\n <span>{{ btn.borderSize }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.borderColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderRadius\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderRadius', $event)\">\n <span>{{ btn.borderRadius }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [ngModel]=\"btn.width\" (ngModelChange)=\"onButtonPropertyChange(i, 'width', $event)\" min=\"50\" placeholder=\"Enter width in px\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.textColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'textColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}</label>\n <input type=\"range\" min=\"0\" max=\"100\" [ngModel]=\"btn.positionPercent\" (ngModelChange)=\"onButtonPropertyChange(i, 'positionPercent', $event)\">\n <span>{{ btn.positionPercent }}%</span>\n </div>\n <div class=\"form-group\">\n <label>\n <input type=\"checkbox\" [ngModel]=\"btn.updateParentData\"\n (ngModelChange)=\"onButtonPropertyChange(i, 'updateParentData', $event)\"\n />\n {{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'updateParentData' }}\n </label>\n </div>\n <button (click)=\"removeButton(btn)\" class=\"remove-button\">\u00D7 {{ 'REMOVE' | nxtCustomTranslate : 'Remove' }}</button>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable (Response Key)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field (Selected Value)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (comma-separated)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryParameter\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field (in API URL)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value (Parent referenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (Pill Chips with Icons)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">×</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.allowedTypes\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size (MB)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">×</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">×</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n ▲\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n ▼\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">☰</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}\n"] }]
|
|
68939
|
+
args: [{ selector: 'app-properties', standalone: true, imports: [CommonModule, FormsModule, ImageCropperComponent, NxtSearchBox, NgClass, GetValueByPathPipe, NxtCustomTranslatePipe, FormulaInputComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- AP 22JAN25 - Field and Element Properties -->\n\n<div class=\"container\">\n <div class=\"tabs\">\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'attributes'}\" (click)=\"setActiveTab('attributes')\">{{ 'ATTRIBUTES' | nxtCustomTranslate : 'Attributes' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'property'}\" (click)=\"setActiveTab('property')\">{{ 'PROPERTY' | nxtCustomTranslate : 'Property' }}</div>\n <div class=\"tab\" [ngClass]=\"{'active': activeTab() === 'appearance'}\" (click)=\"setActiveTab('appearance')\">{{ 'APPEARANCE' | nxtCustomTranslate : 'Appearance' }}</div>\n </div>\n @if (activeTab() === 'attributes') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @defer (when selectedElement()?.type === 'Image') {\n @if (selectedElement().imageData) {\n <image-cropper\n [imageBase64]=\"selectedElement().orgImageData\"\n [disabled]=\"false\"\n [alignImage]=\"alignImage\"\n [roundCropper]=\"roundCropper\"\n [backgroundColor]=\"'white'\"\n imageAltText=\"Alternative image text\"\n [allowMoveImage]=\"false\"\n [hideResizeSquares]=\"false\"\n [canvasRotation]=\"canvasRotation()\"\n [aspectRatio]=\"aspectRatio\"\n [containWithinAspectRatio]=\"false\"\n [maintainAspectRatio]=\"false\"\n [cropperStaticWidth]=\"cropperStaticWidth\"\n [cropperStaticHeight]=\"cropperStaticHeight\"\n [cropperMinWidth]=\"cropperMinWidth\"\n [cropperMinHeight]=\"cropperMinHeight\"\n [cropperMaxWidth]=\"cropperMaxWidth\"\n [cropperMaxHeight]=\"cropperMaxHeight\"\n [resetCropOnAspectRatioChange]=\"true\"\n [(cropper)]=\"cropper\"\n [(transform)]=\"transform\"\n [onlyScaleDown]=\"true\"\n output=\"blob\"\n format=\"png\"\n (imageCropped)=\"imageCropped($event)\"\n (cropperReady)=\"cropperReady($event)\"\n ></image-cropper>\n }\n @if (selectedElement().imageData) {\n <div style=\"display: flex; gap: 2px;\">\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateLeft()\" title=\"{{ 'ROTATE_LEFT' | nxtCustomTranslate : 'Rotate Left' }}\">\u27F2</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"rotateRight()\" title=\"{{ 'ROTATE_RIGHT' | nxtCustomTranslate : 'Rotate Right' }}\">\u27F3</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomOut()\" title=\"{{ 'ZOOM_OUT' | nxtCustomTranslate : 'Zoom Out' }}\">-</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"zoomIn()\" title=\"{{ 'ZOOM_IN' | nxtCustomTranslate : 'Zoom In' }}\">+</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveLeft()\" title=\"{{ 'MOVE_LEFT' | nxtCustomTranslate : 'Move Left' }}\">\u2190</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveRight()\" title=\"{{ 'MOVE_RIGHT' | nxtCustomTranslate : 'Move Right' }}\">\u2192</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveUp()\" title=\"{{ 'MOVE_UP' | nxtCustomTranslate : 'Move Up' }}\">\u2191</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"moveDown()\" title=\"{{ 'MOVE_DOWN' | nxtCustomTranslate : 'Move Down' }}\">\u2193</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipHorizontal()\" [ngClass]=\"{'enabled': transform().flipH}\" title=\"{{ 'FLIP_HORIZONTALLY' | nxtCustomTranslate : 'Flip Horizontally' }}\">\u2194</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"flipVertical()\" [ngClass]=\"{'enabled': transform().flipV}\" title=\"{{ 'FLIP_VERTICALLY' | nxtCustomTranslate : 'Flip Vertically' }}\">\u2195</div>\n <div class=\"cursor-pointer logo-icon\" (click)=\"resetImage()\" title=\"{{ 'RESET' | nxtCustomTranslate : 'Reset' }}\">\u00D7</div>\n </div>\n }\n }\n @if (selectedElement()?.type === 'Book') {\n <div>\n <label class=\"text-sm\">{{ 'SEARCH_BOOK' | nxtCustomTranslate : 'Search Book' }}</label>\n <div style=\"display: flex; gap: 2px; align-items: center; justify-content: center;\">\n <nxt-search-box\n [question]=\"selectedElement()\"\n [apiMeta]=\"bookSubtext()\"\n [placeHolderText]=\"'SEARCH' | nxtCustomTranslate : 'Search...'\"\n (searchValueChange)=\"childEventCapture($event.value)\"\n ></nxt-search-box>\n <div class=\"link-icon\">\n <svg (click)=\"linkToggleDropdown($event)\" fill=\"#000000\" version=\"1.1\" id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\"\n viewBox=\"0 0 450 450\" xml:space=\"preserve\">\n <g>\n <g>\n <g>\n <path d=\"M318.15,230.195l77.934-77.937c31.894-31.892,31.894-83.782-0.004-115.674l-12.66-12.66\n c-31.893-31.896-83.78-31.896-115.674-0.004l-77.937,77.934c-17.588,17.588-25.457,41.264-23.646,64.311\n c-23.045-1.813-46.722,6.056-64.308,23.647L23.92,267.748c-31.894,31.889-31.894,83.779,0,115.674l12.664,12.662\n c31.893,31.893,83.783,31.893,115.674,0l77.935-77.936c17.592-17.59,25.459-41.266,23.647-64.309\n C276.884,255.654,300.56,247.783,318.15,230.195z M202.653,290.605l-77.936,77.938c-16.705,16.703-43.889,16.703-60.59,0\n l-12.666-12.666c-16.705-16.701-16.703-43.885,0-60.594l77.936-77.932c14.14-14.141,35.779-16.306,52.226-6.516l-32.302,32.307\n c-7.606,7.604-7.606,19.938,0,27.541c7.605,7.607,19.937,7.607,27.541,0l32.306-32.303\n C218.959,254.828,216.795,276.469,202.653,290.605z M238.382,209.169l32.299-32.306c7.608-7.602,7.608-19.935,0-27.538\n c-7.604-7.61-19.936-7.61-27.541-0.004l-32.303,32.303c-9.791-16.446-7.627-38.087,6.514-52.226l77.935-77.935\n c16.707-16.707,43.89-16.707,60.594,0l12.664,12.664c16.705,16.705,16.705,43.886,0,60.591l-77.936,77.937\n C276.468,216.797,254.828,218.959,238.382,209.169z\" />\n <path d=\"M343.466,261.465c-45.287,0-82,36.713-82,82s36.713,82,82,82c45.286,0,82-36.713,82-82S388.753,261.465,343.466,261.465z\n M372.505,333.564l-56.046,56.104c-0.239,0.238-0.536,0.41-0.862,0.496l-22.315,5.85c-0.649,0.168-1.347-0.02-1.822-0.494\n c-0.477-0.479-0.666-1.172-0.496-1.824l5.826-22.318c0.084-0.326,0.256-0.627,0.494-0.863l56.047-56.104\n c0.742-0.742,1.945-0.744,2.688-0.002l4.548,4.541c0.739,0.74,0.741,1.943,0,2.688l-37.433,37.471l4.709,4.703l37.435-37.471\n c0.739-0.742,1.94-0.742,2.682-0.002l4.55,4.541C373.25,331.617,373.25,332.822,372.505,333.564z M395.472,310.574l-17,17.018\n c-0.739,0.744-1.942,0.744-2.685,0.002l-16.489-16.475c-0.744-0.74-0.744-1.943-0.002-2.688l17-17.02\n c0.741-0.74,1.944-0.74,2.688-0.002l16.487,16.477C396.216,308.629,396.216,309.832,395.472,310.574z\" />\n </g>\n </g>\n </g>\n </svg>\n @if (isLinkDropdownOpen()) {\n <div class=\"link-dropdown-menu\" #dropdown>\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().endpoint\" (ngModelChange)=\"updateBookSubtext('endpoint', $event)\" />\n <label>{{ 'VARIABLE' | nxtCustomTranslate : 'Variable' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().variable\" (ngModelChange)=\"updateBookSubtext('variable', $event)\" />\n <label>{{ 'FIELD' | nxtCustomTranslate : 'Field' }}:</label>\n <input type=\"text\" [ngModel]=\"fieldAsString()\" (ngModelChange)=\"updateField($event)\" />\n <label>{{ 'DEFAULT_FIELD' | nxtCustomTranslate : 'Default Field' }}:</label>\n <input type=\"text\" [ngModel]=\"bookSubtext().defaultField\" (ngModelChange)=\"updateBookSubtext('defaultField', $event)\" />\n </div>\n }\n </div>\n </div>\n </div>\n }\n @for (prop of getProperties()?.elementProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'checkbox' && prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.isTranslate && formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if (((selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? selectColumn() : selectedElement().id) + '.' + prop.key | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n @if (prop.key === 'helpText' && selectedElement()?.helpText) {\n <div>{{ selectedElement()?.helpText }}</div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'number') {\n <input\n type=\"number\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n }\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n <span class=\"toggle-label\" style=\"padding-left: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n </div>\n }\n @if (prop.type === 'subQuestion') {\n <div>\n <div style=\"display: flex; flex-direction: row; gap: 10px; align-items: center;\">\n <div>{{ prop.labelPath | nxtCustomTranslate : prop.label }}</div>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n @if (selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)) {\n <div>\n @for (subProp of prop.subQuestion; track subProp) {\n <div style=\"background-color: #e7f2ff; padding: 8px; border-radius: 4px;\">\n <div class=\"form-group\">\n <label>{{ subProp.labelPath | nxtCustomTranslate : subProp.label }}</label>\n @if (subProp.type === 'array') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"subProp.operands ? subProp.operands.includes(column.apiName) : false\"\n (change)=\"onCheckboxChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName, $event.target.checked)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'radio') {\n <div>\n @for (column of filteredColumns(); track column) {\n <div>\n <label>\n <input\n type=\"radio\"\n [name]=\"subProp.key\"\n [value]=\"column.apiName\"\n [checked]=\"getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) === column.apiName\"\n (change)=\"onRadioChange(subProp.targetArray, subProp.targetArrayKey, subProp.key, column.apiName)\"\n >\n {{ column.apiName }}\n </label>\n </div>\n }\n </div>\n }\n @if (subProp.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"subProp.placeholder\"\n [ngModel]=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key) : (selectedElement() | getValueByPath : subProp.key)) : (selectedElement() | getValueByPath : subProp.key)\"\n (ngModelChange)=\"selectedElement()?.type === 'Table' ? (subProp.targetArray ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event,false, prop.isTranslate) : setValueByPath(subProp.key, $event)) : setValueByPath(subProp.key, $event, prop.isTranslate)\"\n />\n }\n @if (subProp.type === 'boolean') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n @if (subProp.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? (getValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, subProp.isTableColumn)) : (selectedElement() | getValueByPath : subProp.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (subProp.targetArray || subProp.isTableColumn) ? updateValueByArrayPath(subProp.targetArray, subProp.targetArrayKey, selectColumn(), subProp.key, $event, subProp.isTableColumn, prop.isTranslate) : setValueByPath(subProp.key, $event, prop.isTranslate))\"\n >\n @for (option of subProp.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (subProp.type === 'checkbox') {\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement() | getValueByPath : subProp.key\"\n (change)=\"setValueByPath(subProp.key, $event.target.checked)\"\n />\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (prop.type === 'align') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onAlignSelect(option.value)\" [ngClass]=\"{'active': selectedElement()?.textAlign === option.value}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'style') {\n <div>\n @for (option of prop.options; track option) {\n <button (click)=\"onStyleSelect(option.value)\" [ngClass]=\"{'active': isStyleActive(option.value)}\" [title]=\"option.value\">\n <img [src]=\"'../assets/icons/' + option.icon + '.svg'\" [alt]=\"option.value\" class=\"icon-size\" />\n </button>\n }\n </div>\n }\n @if (prop.type === 'color') {\n <div>\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n @if (prop.key === 'title') {\n <div style=\"margin-top: 15px; border: 1px solid #ddd; padding: 20px; border-radius: 12px; background-color: #f9f9f9;\">\n <div class=\"form-header\">\n <label class=\"form-label\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n <button (click)=\"addNewButton()\" class=\"add-button\">+ {{ 'ADD_BUTTON' | nxtCustomTranslate : 'Add Button' }}</button>\n </div>\n @for (btn of book()?.questionbook?.action || []; track btn; let i = $index) {\n <div class=\"button-config-card\">\n <div class=\"form-group\">\n <label>{{ 'BUTTON_ID' | nxtCustomTranslate : 'Button ID' }}</label>\n <input type=\"text\" [ngModel]=\"btn.id\" (ngModelChange)=\"onButtonPropertyChange(i, 'id', $event,true)\" placeholder=\"Enter button id\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_NAME' | nxtCustomTranslate : 'Button Name' }}</label>\n @if (formBuilderLanguageCode && formBuilderLanguageCode !== 'en') {\n @if ((btn.id + '.name' | nxtCustomTranslate : '' : 'formBuilder'); as translated) {\n @if (translated?.trim()) {\n <div class=\"translation-fallback\">\n <div style=\"font-size: 10px;\">Default (English)</div>\n <div class=\"readonly-box\" style=\"display: flex; align-items: center; gap: 8px; position: relative;\">\n <span>{{ translated }}</span>\n <!-- Copy Icon -->\n @if (!copied) {\n <svg\n (click)=\"copyToClipboard(translated)\" width=\"16px\" height=\"16px\" viewBox=\"0 0 24.00 24.00\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" transform=\"rotate(0)\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"#CCCCCC\" stroke-width=\"0.048\"></g><g id=\"SVGRepo_iconCarrier\"> <g id=\"style=stroke\"> <g id=\"copy\"> <path id=\"rec (Stroke)\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 5.25C6.25 2.50265 8.43733 0.25 11.1667 0.25H17.8333C20.5627 0.25 22.75 2.50265 22.75 5.25V13.75C22.75 16.4974 20.5627 18.75 17.8333 18.75C17.4191 18.75 17.0833 18.4142 17.0833 18C17.0833 17.5858 17.4191 17.25 17.8333 17.25C19.7064 17.25 21.25 15.6971 21.25 13.75V5.25C21.25 3.30293 19.7064 1.75 17.8333 1.75H11.1667C9.29363 1.75 7.75 3.30293 7.75 5.25C7.75 5.66421 7.41421 6 7 6C6.58579 6 6.25 5.66421 6.25 5.25Z\" fill=\"#000000\"></path> <path id=\"rec (Stroke)_2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.25 10.25C1.25 7.50265 3.43733 5.25 6.16667 5.25H12.8333C15.5627 5.25 17.75 7.50265 17.75 10.25V18.75C17.75 21.4974 15.5627 23.75 12.8333 23.75H6.16667C3.43733 23.75 1.25 21.4974 1.25 18.75V10.25ZM6.16667 6.75C4.29363 6.75 2.75 8.30293 2.75 10.25V18.75C2.75 20.6971 4.29363 22.25 6.16667 22.25H12.8333C14.7064 22.25 16.25 20.6971 16.25 18.75V10.25C16.25 8.30293 14.7064 6.75 12.8333 6.75H6.16667Z\" fill=\"#000000\"></path> </g> </g> </g></svg>\n }\n <!-- Copied Message -->\n @if (copied) {\n <span class=\"copied-msg\">Copied!</span>\n }\n </div>\n </div>\n }\n }\n }\n <input type=\"text\" [ngModel]=\"btn.name\" (ngModelChange)=\"onButtonPropertyChange(i, 'name', $event,true)\" placeholder=\"Enter button name\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'EVENT_NAME' | nxtCustomTranslate : 'Event Name' }}</label>\n <input type=\"text\" [ngModel]=\"btn.eventtoemit\" (ngModelChange)=\"onButtonPropertyChange(i, 'eventtoemit', $event)\" placeholder=\"Event to emit\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ACTION_DATA' | nxtCustomTranslate : 'Action Data' }}</label>\n <input type=\"text\" [ngModel]=\"btn.actionData\" (ngModelChange)=\"onButtonPropertyChange(i, 'actionData', $event)\" placeholder=\"Event to actionData\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'ALT' | nxtCustomTranslate : 'Alt' }}</label>\n <input type=\"text\" [ngModel]=\"btn.alt\" (ngModelChange)=\"onButtonPropertyChange(i, 'alt', $event)\" placeholder=\"Button alt text\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'END_POINT' | nxtCustomTranslate : 'Endpoint' }}</label>\n <input type=\"text\" [ngModel]=\"btn.endpoint\" (ngModelChange)=\"onButtonPropertyChange(i, 'endpoint', $event)\" placeholder=\"API endpoint\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'METHOD' | nxtCustomTranslate : 'Method' }}</label>\n <select [ngModel]=\"btn.method\" (ngModelChange)=\"onButtonPropertyChange(i, 'method', $event)\">\n <option value=\"GET\">GET</option>\n <option value=\"POST\">POST</option>\n <option value=\"PUT\">PUT</option>\n <option value=\"DELETE\">DELETE</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BACKGROUND_COLOR' | nxtCustomTranslate : 'Background Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.bgColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'bgColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_SIZE' | nxtCustomTranslate : 'Border Size' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderSize\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderSize', $event)\">\n <span>{{ btn.borderSize }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_COLOR' | nxtCustomTranslate : 'Border Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.borderColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'BORDER_RADIUS' | nxtCustomTranslate : 'Border Radius' }}</label>\n <input type=\"range\" min=\"0\" max=\"50\" [ngModel]=\"btn.borderRadius\" (ngModelChange)=\"onButtonPropertyChange(i, 'borderRadius', $event)\">\n <span>{{ btn.borderRadius }}px</span>\n </div>\n <div class=\"form-group\">\n <label>{{ 'BUTTON_WIDTH_PX' | nxtCustomTranslate : 'Button Width (px)' }}</label>\n <input type=\"number\" [ngModel]=\"btn.width\" (ngModelChange)=\"onButtonPropertyChange(i, 'width', $event)\" min=\"50\" placeholder=\"Enter width in px\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'TEXT_COLOR' | nxtCustomTranslate : 'Text Color' }}</label>\n <input type=\"color\" style=\"width: 100%;\" [ngModel]=\"btn.textColor\" (ngModelChange)=\"onButtonPropertyChange(i, 'textColor', $event)\">\n </div>\n <div class=\"form-group\">\n <label>{{ 'POSITION_PERCENT' | nxtCustomTranslate : 'Position (%)' }}</label>\n <input type=\"range\" min=\"0\" max=\"100\" [ngModel]=\"btn.positionPercent\" (ngModelChange)=\"onButtonPropertyChange(i, 'positionPercent', $event)\">\n <span>{{ btn.positionPercent }}%</span>\n </div>\n <div class=\"form-group\">\n <label>\n <input type=\"checkbox\" [ngModel]=\"btn.updateParentData\"\n (ngModelChange)=\"onButtonPropertyChange(i, 'updateParentData', $event)\"\n />\n {{ 'UPDATE_PARENTDATA' | nxtCustomTranslate : 'updateParentData' }}\n </label>\n </div>\n <button (click)=\"removeButton(btn)\" class=\"remove-button\">\u00D7 {{ 'REMOVE' | nxtCustomTranslate : 'Remove' }}</button>\n </div>\n }\n </div>\n }\n </div>\n }\n @if (selectedElement()?.type === 'Date' || selectedElement()?.type === 'DateTime') {\n <div>\n <div class=\"text-sm\">\n {{ 'DATE_RANGE' | nxtCustomTranslate : 'Date Range' }}\n </div>\n <div style=\"display: flex; gap: 2px; align-items: center;\">\n <!-- Minimum Date -->\n <div>\n <label class=\"text-sm\">Minimum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'minDate') === 'today'\"\n (change)=\"setValueByPath('minDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'minDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'minDate') \n : null\"\n (ngModelChange)=\"setValueByPath('minDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'minDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n <!-- Maximum Date -->\n <div>\n <label class=\"text-sm\">Maximum Date</label>\n <label class=\"text-sm\">\n <input\n type=\"checkbox\"\n [checked]=\"(selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n (change)=\"setValueByPath('maxDate', $event.target.checked ? 'today' : null)\"\n />\n Current Date\n </label>\n <input\n type=\"date\"\n [ngModel]=\"(selectedElement() | getValueByPath : 'maxDate') !== 'today' \n ? (selectedElement() | getValueByPath : 'maxDate') \n : null\"\n (ngModelChange)=\"setValueByPath('maxDate', $event)\"\n [readonly]=\"selectedElement()?.readOnly || \n (selectedElement() | getValueByPath : 'maxDate') === 'today'\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (activeTab() === 'property') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n <label>Id</label>\n <div style=\"font-size: 13px; padding: 11px; border-radius: 5px; background-color: #f8f8f8; border: 1px solid #ddd;\">\n {{ headerSelect() ? bookId() : selectedElement()?.id }}\n </div>\n @for (prop of getProperties()?.fieldProps; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n @if (prop.type !== 'subQuestion') {\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n }\n @if (prop.type === 'toggleGroup') {\n <div class=\"toggle-group\">\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', true) : (selectedElement() | getValueByPath : 'isOptional')) : (selectedElement() | getValueByPath : 'isOptional')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isOptional', $event, true, prop.isTranslate) : onToggleChange('isOptional', $event)) : onToggleChange('isOptional', $event)\"\n />\n {{ 'REQUIRED' | nxtCustomTranslate : 'Required' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', true) : (selectedElement() | getValueByPath : 'isReadOnly')) : (selectedElement() | getValueByPath : 'isReadOnly')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isReadOnly', $event, true, prop.isTranslate) : onToggleChange('isReadOnly', $event)) : onToggleChange('isReadOnly', $event)\"\n />\n {{ 'READ_ONLY' | nxtCustomTranslate : 'Read Only' }}\n </label>\n </div>\n <div class=\"toggle-item\">\n <label class=\"toggle-label\">\n <input type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', true) : (selectedElement() | getValueByPath : 'isHidden')) : (selectedElement() | getValueByPath : 'isHidden')\"\n (change)=\"selectedElement()?.type === 'Table' ? ((prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), 'isHidden', $event, true, prop.isTranslate) : onToggleChange('isHidden', $event)) : onToggleChange('isHidden', $event)\"\n />\n {{ 'IS_HIDE' | nxtCustomTranslate : 'Is Hide' }}\n </label>\n </div>\n </div>\n }\n <!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n @if ( prop.type === 'checkbox' || prop.type === 'radio' || prop.key === 'options') {\n <div class=\"options-sidebar-trigger-wrapper\">\n <div class=\"options-trigger-header\">\n <div class=\"options-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <line x1=\"8\" y1=\"6\" x2=\"21\" y2=\"6\"></line>\n <line x1=\"8\" y1=\"12\" x2=\"21\" y2=\"12\"></line>\n <line x1=\"8\" y1=\"18\" x2=\"21\" y2=\"18\"></line>\n <line x1=\"3\" y1=\"6\" x2=\"3.01\" y2=\"6\"></line>\n <line x1=\"3\" y1=\"12\" x2=\"3.01\" y2=\"12\"></line>\n <line x1=\"3\" y1=\"18\" x2=\"3.01\" y2=\"18\"></line>\n </svg>\n <span>{{ prop.labelPath | nxtCustomTranslate : prop.label || 'Options' }}</span>\n </div>\n <span class=\"options-status-badge\" [class.configured]=\"getOptionsCount(prop.key) > 0\">\n {{ getOptionsCount(prop.key) }} {{ getOptionsCount(prop.key) === 1 ? 'Option' : 'Options' }}\n </span>\n </div>\n <p class=\"options-trigger-hint\">Manage choices, display labels, stored values, and option ordering.</p>\n <button type=\"button\" class=\"options-modal-open-btn\" (click)=\"openOptionsModal(prop.key)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Options ({{ getOptionsCount(prop.key) }})</span>\n </button>\n </div>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"headerSelect() ? book().records[0].title : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"headerSelect() ? updateTitle($event) : (selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n [class.read-only]=\"selectedElement()?.readOnly\"\n [readonly]=\"selectedElement()?.readOnly\"\n />\n }\n @if (prop.type === 'subQuestion') {\n <!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n <div class=\"subtext-sidebar-trigger-wrapper\">\n <div class=\"subtext-trigger-header\">\n <div class=\"subtext-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path>\n </svg>\n <span>Sub Text (API & Layout)</span>\n </div>\n @if (hasSubTextConfigured()) {\n <span class=\"subtext-status-badge configured\">Configured</span>\n } @else {\n <span class=\"subtext-status-badge\">Not Set</span>\n }\n </div>\n <p class=\"subtext-trigger-hint\">Configure API endpoint, live search queries, dependent fields, and card layout.</p>\n <button type=\"button\" class=\"subtext-modal-open-btn\" (click)=\"openSubTextModal(prop)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"></path>\n <path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"></path>\n </svg>\n <span>Configure Sub Text</span>\n </button>\n </div>\n }\n @if (prop.type === 'checkbox') {\n <div>\n <span class=\"toggle-label\" style=\"padding-right: 10px;\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</span>\n <input\n type=\"checkbox\"\n [checked]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (change)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : onToggleChange(prop.key, $event)) : onToggleChange(prop.key, $event)\"\n />\n </div>\n }\n <!-- SKS16SEP25 formula -->\n @if (prop.type === 'formula') {\n <div>\n <!-- MR 19SEP26 Fix signal invocation selectedElement() for Angular 22 template type checking -->\n <app-formula-input\n [attributes]=\"selectedElement()?.['fieldsMeta']\"\n [initialFormula]=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key , prop.isTableColumn) : (selectedElement() | getValueByPath : prop.key)) : (selectedElement() | getValueByPath : prop.key)\"\n (formulaChange)=\"selectedElement()?.type === 'Table' ? (prop.targetArray || prop.isTableColumn ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) :setValueByPath(prop.key, $event, prop.isTranslate) ) : setValueByPath(prop.key, $event, prop.isTranslate)\">\n </app-formula-input>\n </div>\n }\n </div>\n }\n <!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n <div class=\"style-sidebar-trigger-wrapper\">\n <div class=\"style-trigger-header\">\n <div class=\"style-trigger-title\">\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <path d=\"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z\"></path>\n </svg>\n <span>{{ 'STYLE' | nxtCustomTranslate : 'Style' }}</span>\n </div>\n @if (hasStyleConfigured()) {\n <span class=\"style-status-badge configured\">Customized</span>\n } @else {\n <span class=\"style-status-badge\">Default</span>\n }\n </div>\n <p class=\"style-trigger-hint\">Configure CSS classes, inline styling, text direction, and label visibility.</p>\n <button type=\"button\" class=\"style-modal-open-btn\" (click)=\"openStyleModal()\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M12 20h9\"></path>\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z\"></path>\n </svg>\n <span>Configure Style</span>\n </button>\n </div>\n </div>\n }\n </div>\n}\n\n@if (activeTab() === 'appearance') {\n <div class=\"tab-content\">\n @defer (when getProperties()) {\n <div>\n @for (prop of getProperties()?.appearance; track trackByProp($index, prop)) {\n <div class=\"form-group\">\n <label class=\"text-sm\">{{ prop.labelPath | nxtCustomTranslate : prop.label }}</label>\n @if (prop.type === 'select') {\n <select\n [ngModel]=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? (getValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, prop.isTableColumn)) : (selectedElement() | getValueByPath : prop.key))\"\n (ngModelChange)=\"(selectedElement()?.type === 'Table' && (prop.targetArray || prop.isTableColumn) ? updateValueByArrayPath(prop.targetArray, prop.targetArrayKey, selectColumn(), prop.key, $event, prop.isTableColumn, prop.isTranslate) : setValueByPath(prop.key, $event, prop.isTranslate))\"\n >\n @for (option of prop.options; track option) {\n <option [value]=\"option.value\">{{ option.labelPath | nxtCustomTranslate : option.label }}</option>\n }\n </select>\n }\n @if (prop.type === 'text') {\n <input\n type=\"text\"\n [placeholder]=\"prop.placeholder\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n }\n <div class=\"flex-container\">\n @if (prop.type === 'color') {\n <div class=\"color-selector\">\n <input\n type=\"color\" style=\"width: 100%;\"\n [ngModel]=\"selectedElement()?.color\"\n (ngModelChange)=\"setValueByPath('color', $event, prop.isTranslate)\"\n >\n </div>\n }\n @if (prop.type === 'color') {\n <div class=\"hex-input-container\">\n <span>{{ 'HEX_CODE' | nxtCustomTranslate : 'HEX Code' }}</span>\n <input\n type=\"text\"\n [ngModel]=\"selectedElement() | getValueByPath : prop.key\"\n (ngModelChange)=\"setValueByPath(prop.key, $event, prop.isTranslate)\"\n />\n </div>\n }\n </div>\n @if (prop.type === 'button-toggle') {\n <div class=\"button-toggle-wrapper\">\n <button\n type=\"button\"\n class=\"toggle-button\"\n (click)=\"duplicateField(selectedElement())\"\n >\n {{ 'ADD_DUPLICATE' | nxtCustomTranslate : 'Add Duplicate' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n}\n\n@if (!templateSelected) {\n <div class=\"button-container\">\n <button class=\"save-btn\" (click)=\"handleButtonClick()\">{{ 'SAVE' | nxtCustomTranslate : 'Save' }}</button>\n <button class=\"cancel-btn\" (click)=\"onCancel()\">{{ 'CANCEL' | nxtCustomTranslate : 'Cancel' }}</button>\n </div>\n}\n\n@if (templateSelected) {\n <div class=\"button-container\" style=\"margin-top: 20px;\">\n <button class=\"save-btn\" (click)=\"handleTemplateSave()\">{{ 'SAVE_TEMPLATE' | nxtCustomTranslate : 'Save Template' }}</button>\n </div>\n}\n\n<!-- MR 23OCT26 Add CardConfig support across components and SubText Modal in FormBuilder -->\n@if (isSubTextModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeSubTextModal()\">\n <div class=\"subtext-modal-container\" (click)=\"$event.stopPropagation()\">\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Sub Text (API & Card Configuration)</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeSubTextModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'api'\" (click)=\"activeSubTextTab = 'api'\">\n API & Data Source\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'dependencies'\" (click)=\"activeSubTextTab = 'dependencies'\">\n Dependencies & Queries\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'card'\" (click)=\"activeSubTextTab = 'card'\">\n Card Presentation\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeSubTextTab === 'other'\" (click)=\"activeSubTextTab = 'other'\">\n Advanced / Files\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: API & Data Source -->\n @if (activeSubTextTab === 'api') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-row\">\n <label>End Point URL</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.endpoint\" placeholder=\"/services/apexrest/FusionApiData?type=...\" />\n <small class=\"field-hint\">Base or relative endpoint URL to fetch records from</small>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Variable (Response Key)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.variable\" placeholder=\"data or records (leave blank if root array)\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Default Field (Selected Value)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.defaultField\" placeholder=\"e.g. name, id\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Search & Display Fields (comma-separated)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextFieldsStr\" placeholder=\"e.g. name, code, city\" />\n <small class=\"field-hint\">Fields used for live searching and default two-line fallback display</small>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isObject\" />\n <span>Is Object (emit full record object instead of single scalar string)</span>\n </label>\n </div>\n </div>\n }\n\n <!-- Tab 2: Dependencies & Queries -->\n @if (activeSubTextTab === 'dependencies') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Source Question Id</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.sourceQuestionId\" placeholder=\"Parent question ID\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Dependent Value</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.dependentValue\" placeholder=\"e.g. true or specific value\" />\n </div>\n </div>\n <div class=\"subtext-form-row-checkbox\">\n <label>\n <input type=\"checkbox\" [(ngModel)]=\"modalSubText.isDependentField\" />\n <span>Is Dependent Field (conditional rendering based on parent value)</span>\n </label>\n </div>\n <hr class=\"subtext-divider\" />\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Live Search Query Parameter</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextQueryParamStr\" placeholder=\"e.g. search, q\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Field (in API URL)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryField\" placeholder=\"e.g. customerId\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value (Parent referenceField)</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValue\" placeholder=\"e.g. selectedCustomer\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Query Value Reference</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.queryValueReference\" placeholder=\"e.g. parentRef\" />\n </div>\n </div>\n <div class=\"subtext-form-row\">\n <label>Unique Cache Key</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.uniqueKey\" placeholder=\"Cache key for local storage\" />\n </div>\n </div>\n }\n\n <!-- Tab 3: Card Layout Presentation -->\n @if (activeSubTextTab === 'card') {\n <div class=\"subtext-tab-content\">\n <div class=\"card-config-header-row\">\n <label class=\"toggle-switch\">\n <input type=\"checkbox\" [(ngModel)]=\"isCardConfigEnabled\" (change)=\"toggleCardConfig(isCardConfigEnabled)\" />\n <span class=\"toggle-slider\"></span>\n </label>\n <div class=\"toggle-text\">\n <strong>Enable Card Layout</strong>\n <p>Render suggestions as rich cards with thumbnail, primary title, subtitle, and badges</p>\n </div>\n </div>\n\n @if (isCardConfigEnabled) {\n <div class=\"card-config-body\">\n <div class=\"card-config-fields\">\n <div class=\"subtext-form-row\">\n <label>Image Field Name</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.imageUrl\" placeholder=\"e.g. photoUrl, thumbnail, imageUrl\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Primary Title Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.primary\" placeholder=\"e.g. name, title, hotelName\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Subtitle Field</label>\n <input type=\"text\" [(ngModel)]=\"modalCardConfig.subTitle\" placeholder=\"e.g. summary, duration, description\" />\n </div>\n\n <!-- Badges Section -->\n <div class=\"badges-config-section\">\n <div class=\"badges-header\">\n <label>Badges (Pill Chips with Icons)</label>\n <button type=\"button\" class=\"add-badge-btn\" (click)=\"addModalBadge()\">+ Add Badge</button>\n </div>\n @for (badge of modalBadges; track $index; let bIdx = $index) {\n <div class=\"badge-item-row\">\n <input type=\"text\" [(ngModel)]=\"badge.field\" placeholder=\"Field name (e.g. city)\" class=\"badge-field-input\" />\n <select [(ngModel)]=\"badge.icon\" class=\"badge-icon-select\">\n <option value=\"\">No Icon</option>\n <option value=\"hotel\">Hotel</option>\n <option value=\"calendar\">Calendar</option>\n <option value=\"location\">Location</option>\n </select>\n <input type=\"text\" [(ngModel)]=\"badge.label\" placeholder=\"Prefix label (optional)\" class=\"badge-label-input\" />\n <button type=\"button\" class=\"remove-badge-btn\" (click)=\"removeModalBadge(bIdx)\">×</button>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Card Preview -->\n <div class=\"card-live-preview-box\">\n <span class=\"preview-tag\">LIVE PREVIEW</span>\n <div class=\"sample-card-container\">\n <div class=\"sample-card-image\">\n @if (modalCardConfig.imageUrl) {\n <div class=\"sample-img-placeholder has-img\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#2563eb\" stroke-width=\"2\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n </svg>\n <span class=\"img-field-label\">{{ modalCardConfig.imageUrl }}</span>\n </div>\n } @else {\n <div class=\"sample-img-placeholder\">Image</div>\n }\n </div>\n <div class=\"sample-card-content\">\n <div class=\"sample-card-title\">{{ modalCardConfig.primary || 'Hotel Booking' }}</div>\n <div class=\"sample-card-subtitle\">{{ modalCardConfig.subTitle || '3 nights at Atlantis, Dubai' }}</div>\n @if (modalBadges.length > 0) {\n <div class=\"sample-card-badges\">\n @for (badge of modalBadges; track $index) {\n @if (badge.field) {\n <span class=\"sample-badge-pill\">\n @if (badge.icon === 'hotel') { \uD83C\uDFE8 }\n @else if (badge.icon === 'calendar') { \uD83D\uDCC5 }\n @else if (badge.icon === 'location') { \uD83D\uDCCD }\n <span>{{ badge.label ? badge.label + ': ' : '' }}{{ badge.field }}</span>\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 4: Advanced / Files -->\n @if (activeSubTextTab === 'other') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.groupField\" placeholder=\"groupField\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Child Group Field</label>\n <input type=\"text\" [(ngModel)]=\"modalSubText.childGroupField\" placeholder=\"childGroupField\" />\n </div>\n </div>\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Allowed File Types</label>\n <input type=\"text\" [(ngModel)]=\"modalSubTextAllowedTypesStr\" placeholder=\".jpg,.png,.pdf\" />\n </div>\n <div class=\"subtext-form-row\">\n <label>Max File Size (MB)</label>\n <input type=\"number\" [(ngModel)]=\"modalSubText.maxFileSize\" placeholder=\"10\" />\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeSubTextModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveSubTextModal()\">Save Configuration</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Style configuration to pop-up modal in FormBuilder properties -->\n@if (isStyleModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeStyleModal()\">\n <div class=\"subtext-modal-container style-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Element Style Configuration</h2>\n <span class=\"subtext-modal-element-tag\">{{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Question' }}</span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeStyleModal()\">×</button>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"subtext-modal-tabs\">\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'classes'\" (click)=\"activeStyleTab = 'classes'\">\n Classes & Essentials\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'inline'\" (click)=\"activeStyleTab = 'inline'\">\n Inline Styles\n </button>\n <button type=\"button\" class=\"subtext-tab-btn\" [class.active]=\"activeStyleTab === 'custom'\" (click)=\"activeStyleTab = 'custom'\">\n Custom Keys & Live Preview\n </button>\n </div>\n\n <!-- Tab Body -->\n <div class=\"subtext-modal-body\">\n <!-- Tab 1: Classes & Essentials -->\n @if (activeStyleTab === 'classes') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputClass\"\n placeholder=\"e.g. form-control invoice-data custom-input\"\n />\n <span class=\"field-hint\">Classes applied directly to input/control element</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Class (CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelClass\"\n placeholder=\"e.g. form-label fw-bold text-primary\"\n />\n <span class=\"field-hint\">Classes applied to the question/field label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Text / Layout Direction</label>\n <select [(ngModel)]=\"modalStyle.direction\">\n <option value=\"ltr\">LTR (Left to Right)</option>\n <option value=\"rtl\">RTL (Right to Left)</option>\n </select>\n <span class=\"field-hint\">Direction attribute for text flow and control layout</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Visibility</label>\n <div style=\"display: flex; align-items: center; gap: 8px; margin-top: 8px;\">\n <input\n type=\"checkbox\"\n id=\"modalStyleShowLabel\"\n style=\"width: 18px; height: 18px; cursor: pointer;\"\n [(ngModel)]=\"modalStyle.showLabel\"\n />\n <label for=\"modalStyleShowLabel\" style=\"cursor: pointer; font-size: 13px; font-weight: 500; margin: 0;\">\n Show Label ({{ modalStyle.showLabel ? 'Enabled' : 'Hidden' }})\n </label>\n </div>\n </div>\n </div>\n </div>\n }\n\n <!-- Tab 2: Inline Styles -->\n @if (activeStyleTab === 'inline') {\n <div class=\"subtext-tab-content\">\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Input Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.inputStyle\"\n placeholder=\"e.g. background-color: #f8fafc; border-color: #3b82f6;\"\n />\n <span class=\"field-hint\">Inline styles applied to input control</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Label Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelStyle\"\n placeholder=\"e.g. font-size: 14px; color: #1e293b; font-weight: 600;\"\n />\n <span class=\"field-hint\">Inline styles applied to label</span>\n </div>\n </div>\n\n <div class=\"subtext-form-grid-2\">\n <div class=\"subtext-form-row\">\n <label>Label Value Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.labelValueStyle\"\n placeholder=\"e.g. color: #64748b; font-style: italic;\"\n />\n <span class=\"field-hint\">Inline styles applied to label value text</span>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Question Wrapper Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.questionStyle\"\n placeholder=\"e.g. margin-bottom: 16px; padding: 8px;\"\n />\n <span class=\"field-hint\">Inline styles applied to outer question wrapper</span>\n </div>\n </div>\n\n <div class=\"subtext-form-row\">\n <label>Book / Container Style (Inline CSS)</label>\n <input\n type=\"text\"\n [(ngModel)]=\"modalStyle.bookStyle\"\n placeholder=\"e.g. border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);\"\n />\n <span class=\"field-hint\">Inline styles applied to booklet / section wrapper</span>\n </div>\n </div>\n }\n\n <!-- Tab 3: Custom Keys & Live Preview -->\n @if (activeStyleTab === 'custom') {\n <div class=\"subtext-tab-content\">\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;\">\n <div>\n <h4 style=\"margin: 0; font-size: 14px; color: #0f172a;\">Dynamic / Custom Style Keys</h4>\n <p style=\"margin: 2px 0 0 0; font-size: 12px; color: #64748b;\">Add specialized style properties for custom rendering</p>\n </div>\n <button type=\"button\" class=\"btn-add-badge\" (click)=\"addCustomStyleKey()\">\n + Add Style Key\n </button>\n </div>\n\n @if (customStyleKeys.length === 0) {\n <div style=\"padding: 16px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 6px; text-align: center; font-size: 12px; color: #64748b; margin-bottom: 16px;\">\n No custom style keys added. All standard style properties are configured under Classes and Inline tabs.\n </div>\n } @else {\n <div style=\"display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;\">\n @for (item of customStyleKeys; track $index) {\n <div class=\"subtext-badge-row\">\n <input type=\"text\" [(ngModel)]=\"item.key\" placeholder=\"Key (e.g. helperStyle)\" style=\"flex: 1;\" />\n <input type=\"text\" [(ngModel)]=\"item.value\" placeholder=\"Value (e.g. font-size: 11px;)\" style=\"flex: 1;\" />\n <button type=\"button\" class=\"btn-remove-badge\" (click)=\"removeCustomStyleKey($index)\">×</button>\n </div>\n }\n </div>\n }\n\n <!-- Live Interactive Preview -->\n <div style=\"margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 16px;\">\n <div style=\"display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;\">\n <span style=\"font-size: 13px; font-weight: 600; color: #1e293b;\">Live Element Style Preview</span>\n <span style=\"font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #e0f2fe; color: #0369a1;\">Interactive</span>\n </div>\n <div [attr.dir]=\"modalStyle.direction\" style=\"background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 16px;\">\n @if (modalStyle.showLabel) {\n <div [class]=\"modalStyle.labelClass\" [style]=\"modalStyle.labelStyle\" style=\"font-weight: 600; margin-bottom: 6px; font-size: 13px;\">\n {{ selectedElement()?.questionText || selectedElement()?.label || 'Sample Question Label' }}\n </div>\n }\n <div [class]=\"modalStyle.inputClass\" [style]=\"modalStyle.inputStyle\" style=\"background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #475569;\">\n Sample Input Value / Preview\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <button type=\"button\" class=\"btn-cancel\" style=\"margin-right: auto; color: #dc2626; border-color: #fca5a5;\" (click)=\"resetStyleToDefault()\">\n Reset to Defaults\n </button>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeStyleModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveStyleModal()\">Save Styles</button>\n </div>\n </div>\n </div>\n}\n\n<!-- MR 23OCT26 Move Options configuration to pop-up modal in FormBuilder properties -->\n@if (isOptionsModalOpen) {\n <div class=\"subtext-modal-backdrop\" (click)=\"closeOptionsModal()\">\n <div class=\"subtext-modal-container options-modal-container\" (click)=\"$event.stopPropagation()\">\n <!-- Modal Header -->\n <div class=\"subtext-modal-header\">\n <div class=\"subtext-modal-title-group\">\n <h2 class=\"subtext-modal-title\">Options Configuration</h2>\n <span class=\"subtext-modal-element-tag\">\n {{ selectedElement()?.type }} • {{ selectedElement()?.questionText || selectedElement()?.label || 'Choice Field' }}\n ({{ modalOptions.length }} {{ modalOptions.length === 1 ? 'choice' : 'choices' }})\n </span>\n </div>\n <button type=\"button\" class=\"subtext-modal-close-btn\" (click)=\"closeOptionsModal()\">×</button>\n </div>\n\n <!-- Modal Toolbar -->\n <div class=\"options-modal-toolbar\">\n <div class=\"options-search-box\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#64748b\" stroke-width=\"2\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n <input\n type=\"text\"\n [(ngModel)]=\"optionsFilterQuery\"\n placeholder=\"Filter options by value or label...\"\n class=\"options-filter-input\"\n />\n </div>\n <button type=\"button\" class=\"options-add-btn\" (click)=\"addModalOption()\">\n <span style=\"font-size: 15px; font-weight: bold; line-height: 1;\">+</span>\n <span>Add Option</span>\n </button>\n </div>\n\n <!-- Modal Body -->\n <div class=\"options-modal-body\">\n @if (modalOptions.length === 0) {\n <div class=\"options-empty-state\">\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#94a3b8\" stroke-width=\"1.5\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"8\" y1=\"12\" x2=\"16\" y2=\"12\"></line>\n </svg>\n <p class=\"empty-title\">No Options Configured</p>\n <p class=\"empty-desc\">Click \"Add Option\" above to create your first choice for this field.</p>\n <button type=\"button\" class=\"options-add-btn\" style=\"margin-top: 8px;\" (click)=\"addModalOption()\">\n + Add First Option\n </button>\n </div>\n } @else {\n <div class=\"options-table-wrapper\" (dragover)=\"onModalOptionDragOver($event)\" (drop)=\"onModalOptionDrop($event)\">\n <div class=\"options-table-header\">\n <span class=\"col-num\">#</span>\n <span class=\"col-reorder\">Reorder</span>\n <span class=\"col-value\">Stored Value (value)</span>\n <span class=\"col-label\">Display Label (label)</span>\n <span class=\"col-actions\">Action</span>\n </div>\n\n <div class=\"options-table-body\">\n @for (opt of getFilteredModalOptions(); track opt.id; let idx = $index) {\n <div\n class=\"modal-option-table-row\"\n [attr.data-id]=\"opt.id\"\n draggable=\"true\"\n (dragstart)=\"onModalOptionDragStart($event, opt.id)\"\n >\n <span class=\"col-num index-pill\">{{ idx + 1 }}</span>\n \n <div class=\"col-reorder reorder-buttons\">\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === 0\"\n (click)=\"moveModalOption(idx, 'up')\"\n title=\"Move Up\"\n >\n ▲\n </button>\n <button\n type=\"button\"\n class=\"btn-arrow\"\n [disabled]=\"idx === modalOptions.length - 1\"\n (click)=\"moveModalOption(idx, 'down')\"\n title=\"Move Down\"\n >\n ▼\n </button>\n <span class=\"modal-drag-grip\" title=\"Drag to reorder\">☰</span>\n </div>\n\n <div class=\"col-value\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.value\"\n placeholder=\"e.g. choice_1 or 01\"\n />\n </div>\n\n <div class=\"col-label\">\n <input\n type=\"text\"\n class=\"options-input\"\n [(ngModel)]=\"opt.label\"\n placeholder=\"e.g. First Choice\"\n />\n </div>\n\n <div class=\"col-actions\">\n <button\n type=\"button\"\n class=\"btn-delete-option\"\n (click)=\"removeModalOption(idx)\"\n title=\"Delete Option\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <polyline points=\"3 6 5 6 21 6\"></polyline>\n <path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path>\n </svg>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Live Choices Preview -->\n <div class=\"options-live-preview-box\">\n <div class=\"preview-header\">\n <span class=\"preview-title\">Live Dropdown / Choice Preview</span>\n <span class=\"preview-tag\">{{ modalOptions.length }} Items</span>\n </div>\n <div class=\"preview-select-mock\">\n <select class=\"mock-dropdown-select\" disabled>\n <option value=\"\" selected disabled>--- Select an option ---</option>\n @for (opt of modalOptions; track opt.id) {\n <option [value]=\"opt.value\">{{ opt.label || opt.value }}</option>\n }\n </select>\n </div>\n </div>\n }\n </div>\n\n <!-- Modal Footer -->\n <div class=\"subtext-modal-footer\">\n <span style=\"font-size: 12px; color: #64748b; margin-right: auto; align-self: center;\">\n Total: <strong>{{ modalOptions.length }}</strong> {{ modalOptions.length === 1 ? 'choice' : 'choices' }}\n </span>\n <button type=\"button\" class=\"btn-cancel\" (click)=\"closeOptionsModal()\">Cancel</button>\n <button type=\"button\" class=\"btn-save\" (click)=\"saveOptionsModal()\">Save Options</button>\n </div>\n </div>\n </div>\n}\n</div>", styles: ["*{margin:0;padding:0;box-sizing:border-box;font-family:Roboto,sans-serif}.properties{height:calc(100vh - 20px);overflow-y:auto}.container{width:100%;max-width:500px;margin:0 auto;background:#fff;box-shadow:0 2px 10px #0000001a;overflow:hidden;font-family:Arial,sans-serif}.design-header{display:flex;justify-content:center;align-items:center;padding:15px 20px;background:#fff;border-radius:8px;box-shadow:0 2px 10px #0000001a;margin-bottom:20px}.header-title{font-size:20px;font-weight:400;color:#222}.toggle-header,.style-toggle-header{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px;background:#f8f8f8;border:1px solid #ddd;border-radius:6px;margin-bottom:6px}.tabs{display:flex;background:#f0f2f5;border-bottom:2px solid #0052cc}.tab{flex:1;padding:15px 10px;text-align:center;cursor:pointer}.tab.active{background:#0052cc;color:#fff;font-weight:700}.tab-content{padding:5px;max-height:80vh;overflow-y:auto;overflow-x:hidden}.form-group{margin-bottom:15px}label{display:block;font-size:14px;font-weight:500;color:#444;margin-bottom:8px}.required:before{content:\"*\";color:red;margin-right:3px}input[type=text],input[type=number],select,textarea{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:6px;outline:none;transition:all .3s;background:#f8f8f8}input:focus,select:focus,textarea:focus{border-color:#007bff;background:#fff;box-shadow:0 0 5px #007bff4d}textarea{min-height:55px;resize:vertical}button,.btn{padding:10px 15px;border:none;border-radius:6px;background:#007bff;color:#fff;font-size:15px;cursor:pointer;transition:all .3s}button:hover,.btn:hover{background:#0056b3;transform:translateY(-2px)}.add-button{padding:8px 14px;background:#0954c5;border-radius:8px}.remove-button{background:#e74c3c;padding:6px 12px;margin-top:10px}.remove-button:hover{background:#c0392b}.cancel-btn{background:#fff;color:#666;border:1px solid #ddd}.save-btn{background:#0052cc;margin-right:10px}.toggle-group{display:grid;grid-template-columns:1fr 1fr;gap:10px}.toggle-item{display:flex;align-items:center;gap:10px;padding:8px}.switch{position:relative;width:42px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background:#ccc;transition:.4s;border-radius:24px}.slider:before{position:absolute;content:\"\";height:20px;width:20px;left:1px;bottom:1px;background:#fff;transition:.4s;border-radius:50%}input:checked+.slider{background:#2196f3}input:checked+.slider:before{transform:translate(18px)}.radio-item{display:flex;align-items:center;gap:20px}.radio-item input{accent-color:#007bff}.checkbox-row{display:flex;margin-bottom:10px}.checkbox-group{display:flex;align-items:center;margin-right:20px;min-width:120px}.checkbox-group input[type=checkbox]{margin-right:5px}.color-picker-row,.color-picker-container{display:flex;align-items:center}.color-picker-container{border:1px solid #ddd;border-radius:4px;margin-right:10px}.color-box,.color-selector input[type=color]{width:78px!important;height:40px;border:none;border-radius:4px;cursor:pointer}.hex-input-container{display:flex;gap:20px;align-items:center;font-size:12px;color:#b0b0b0}.hex-input-container span{font-size:14px;margin-top:10px}.hex-input,.hex-input-container input[type=text]{width:120px;padding:10px 12px;border:1px solid #d1d1d1;color:#28343e}.hex-label{color:#999;margin-right:5px}.select-container,.input-box-field{position:relative;width:100%}.dropdown-arrow,.input-box-field:after{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:#666;font-size:12px}.input-box-field:after{content:\"\\25bc\";color:#1c1b1f;font-size:10px}.input-box-field select{background:#28343e;color:#fff;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}.input-box-field select::-ms-expand{display:none}.all-properties details{background:#fff;border:1px solid #ddd;border-radius:8px;margin-bottom:12px;padding:12px;box-shadow:0 2px 8px #0000000d}.all-properties summary{font-size:15px;font-weight:400;cursor:pointer;padding:6px;transition:color .3s}.all-properties summary:hover{color:#007bff}.inner-content{padding:12px 0}.head-elements{font-size:14px;font-weight:500;color:#444}.options-container{display:flex;flex-direction:column;gap:12px}.field-size-controls,.flex-container{display:flex;align-items:center;gap:12px}.flex-container{margin-bottom:1rem}.size-input{width:110px;text-align:center}.input-container{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%}.subtext-textarea{width:100%;margin-left:auto}.arrow-icon{width:19px;height:23px;transition:transform .3s ease}.icon{display:inline-block;width:18px;height:18px;border-radius:50%;text-align:center;line-height:18px;color:#fff;font-size:12px;margin-left:5px}.edit-icon{background:#4caf50}.view-icon{background:#2196f3}.delete-icon{background:#f44336}.logo-icon{width:20px;height:20px;width:35px;display:flex;justify-content:center;background:#d0d9ff;border-radius:4px}.link-icon{background:#e7f2ff;padding:5px;border-radius:5px;margin:5px;display:inline-block;cursor:pointer;position:relative;transition:all .3s}.link-icon:hover{background:#d0e5ff}.link-icon:active{background:#a8d0ff}.link-dropdown-menu{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ccc;padding:10px;width:200px;box-shadow:0 4px 6px #0000001a}.link-dropdown-menu input{width:100%;margin-bottom:5px;padding:5px;border:1px solid #ccc;border-radius:3px}.option-items{display:flex;align-items:center;padding:5px;gap:5px;border:1px solid #ccc;margin-bottom:10px;cursor:grab;background:#fff}.option-items:active{opacity:.5}.drag-handle{cursor:grab}.button-toggle-wrapper{margin-top:8px}.toggle-button{padding:8px 16px;border:1px solid #cbd2d9;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out}.toggle-button.active:hover{background:#2c6dd5}.button-config-card{background:#fff;padding:15px;border-radius:12px;border:1px solid #ccc;margin-top:20px;box-shadow:0 2px 8px #0000000d}.design-footer{display:flex;justify-content:space-between;margin-top:20px}.button-container{display:flex;padding:15px;background:#f9f9f9;border-top:1px solid #eee}.button-container .cancel-btn,.button-container .save-btn{flex:1;padding:12px;font-weight:700}.divider{border-top:1px dashed #ddd;margin:20px 0}input{width:auto}@media screen and (max-width:768px){.container{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.tabs{flex-direction:column}.tab{padding:1rem;font-size:.9rem}.form-group,.tab-content[aria-label=attributes] .form-group,.tab-content[aria-label=property] .form-group,.tab-content[aria-label=appearance] .form-group{flex-direction:column;grid-template-columns:1fr}.toggle-group{flex-direction:column;align-items:flex-start}}@media screen and (max-width:480px){.container{padding:0 10px}.tabs{flex-direction:column}.tab{padding:1rem;border-bottom:1px solid #dee2e6}input[type=text],input[type=number],select,textarea{font-size:.9rem}}.translation-fallback label,.translation-input-group label{font-weight:500;font-size:13px;margin-bottom:4px;display:block;color:#666}.readonly-box{font-size:14px;padding:4px;border:1px solid #ddd;border-radius:5px;-webkit-user-select:text;user-select:text;cursor:text;color:#7a7a7a;margin-bottom:3px}.copied-msg{font-size:12px;color:green;opacity:0;animation:fadeInOut 1.5s ease}@keyframes fadeInOut{0%{opacity:0;transform:translateY(-2px)}20%{opacity:1;transform:translateY(0)}80%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-2px)}}.subtext-sidebar-trigger-wrapper{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:10px 12px;margin:10px 0;box-shadow:0 1px 3px #0000000a}.subtext-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.subtext-trigger-title{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#1e293b}.subtext-status-badge{font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:#f1f5f9;color:#64748b}.subtext-status-badge.configured{background:#e0f2fe;color:#0369a1}.subtext-trigger-hint{font-size:11px;color:#64748b;margin:2px 0 8px;line-height:1.3}.subtext-modal-open-btn{width:100%;background:#2563eb;color:#fff;border:none;border-radius:5px;padding:7px 12px;font-size:12px;font-weight:500;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s ease}.subtext-modal-open-btn:hover{background:#1d4ed8}.subtext-modal-backdrop{position:fixed;inset:0;background:#0f172a99;backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;z-index:10000}.subtext-modal-container{background:#fff;border-radius:10px;box-shadow:0 20px 45px #00000040;width:90%;max-width:780px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;animation:modalFadeIn .2s ease-out}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.subtext-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.subtext-modal-title{font-size:16px;font-weight:700;color:#0f172a;margin:0}.subtext-modal-element-tag{font-size:11px;font-weight:500;color:#475569;background:#e2e8f0;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px}.subtext-modal-close-btn{background:none;border:none;font-size:24px;line-height:1;color:#64748b;cursor:pointer;padding:0 4px}.subtext-modal-close-btn:hover{color:#0f172a}.subtext-modal-tabs{display:flex;background:#f1f5f9;padding:4px 16px 0;border-bottom:1px solid #e2e8f0;gap:4px}.subtext-tab-btn{border:none;background:transparent;padding:9px 14px;font-size:13px;font-weight:500;color:#64748b;border-bottom:2px solid transparent;cursor:pointer;transition:all .15s ease}.subtext-tab-btn:hover{color:#0f172a}.subtext-tab-btn.active{color:#2563eb;border-bottom:2px solid #2563eb;font-weight:600;background:#fff;border-radius:6px 6px 0 0}.subtext-modal-body{padding:18px 20px;overflow-y:auto;flex:1}.subtext-form-row{margin-bottom:12px;display:flex;flex-direction:column;gap:4px}.subtext-form-row label{font-size:12px;font-weight:600;color:#334155}.subtext-form-row input,.subtext-form-row select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;width:100%;box-sizing:border-box}.subtext-form-row input:focus,.subtext-form-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.subtext-form-row-checkbox{margin:10px 0;display:flex;align-items:center}.subtext-form-row-checkbox label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer}.subtext-form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-hint{font-size:11px;color:#64748b}.subtext-divider{border:none;border-top:1px solid #e2e8f0;margin:14px 0}.card-config-header-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin-bottom:14px}.card-config-body{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.badges-config-section{border:1px solid #e2e8f0;border-radius:6px;padding:10px;background:#f8fafc;margin-top:8px}.badges-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.badges-header label{font-size:12px;font-weight:600;color:#334155}.add-badge-btn{background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0;padding:3px 8px;font-size:11px;border-radius:4px;font-weight:600;cursor:pointer}.add-badge-btn:hover{background:#dcfce7}.badge-item-row{display:flex;gap:6px;align-items:center;margin-bottom:6px}.badge-field-input{flex:1.2;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-icon-select{flex:.9;padding:5px 6px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.badge-label-input{flex:.9;padding:5px 8px!important;font-size:12px!important;border:1px solid #cbd5e1;border-radius:4px}.remove-badge-btn{background:none;border:none;color:#ef4444;font-size:18px;line-height:1;cursor:pointer;padding:0 4px}.card-live-preview-box{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#f8fafc;display:flex;flex-direction:column;gap:8px;align-self:flex-start}.preview-tag{font-size:10px;font-weight:700;letter-spacing:.5px;color:#64748b}.sample-card-container{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:10px;display:flex;gap:12px;box-shadow:0 2px 6px #0000000d}.sample-card-image{width:76px;height:52px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}.sample-img-placeholder{font-size:10px;color:#94a3b8;text-align:center}.sample-img-placeholder.has-img{display:flex;flex-direction:column;align-items:center;gap:2px}.img-field-label{font-size:9px;color:#2563eb;font-weight:600;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sample-card-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.sample-card-title{font-size:13px;font-weight:700;color:#0b1a48;line-height:1.2}.sample-card-subtitle{font-size:11px;color:#556987;line-height:1.2}.sample-card-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.sample-badge-pill{background:#f0f4f9;color:#27406b;font-size:9px;font-weight:600;padding:2px 5px;border-radius:3px;display:inline-flex;align-items:center;gap:2px}.subtext-modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:12px 20px;border-top:1px solid #e2e8f0;background:#f8fafc}.btn-cancel{background:#fff;border:1px solid #cbd5e1;padding:7px 16px;border-radius:6px;font-size:13px;font-weight:500;color:#475569;cursor:pointer}.btn-cancel:hover{background:#f1f5f9}.btn-save{background:#2563eb;border:1px solid #2563eb;padding:7px 18px;border-radius:6px;font-size:13px;font-weight:600;color:#fff;cursor:pointer}.btn-save:hover{background:#1d4ed8}.style-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0f7ff;border:1px solid #bfdbfe;border-radius:8px}.style-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.style-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#1e3a8a}.style-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.style-status-badge.configured{background:#dcfce7;color:#15803d}.style-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.style-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.style-modal-open-btn:hover{background:#1d4ed8}.style-modal-container{max-width:680px}.options-sidebar-trigger-wrapper{margin:10px 0;padding:10px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px}.options-trigger-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.options-trigger-title{display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;color:#166534}.options-status-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:12px;background:#e2e8f0;color:#64748b;text-transform:uppercase;letter-spacing:.5px}.options-status-badge.configured{background:#dcfce7;color:#15803d}.options-trigger-hint{font-size:11px;color:#475569;margin:0 0 10px;line-height:1.4}.options-modal-open-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:7px 12px;background:#16a34a;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease}.options-modal-open-btn:hover{background:#15803d}.options-modal-container{max-width:760px}.options-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.options-search-box{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 10px;flex:1;max-width:380px}.options-filter-input{border:none;outline:none;background:transparent;font-size:13px;color:#0f172a;width:100%}.options-add-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#2563eb;color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.options-add-btn:hover{background:#1d4ed8}.options-modal-body{padding:16px 20px;overflow-y:auto;max-height:520px}.options-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.empty-title{margin:12px 0 4px;font-size:15px;font-weight:600;color:#1e293b}.empty-desc{margin:0;font-size:13px;color:#64748b}.options-table-wrapper{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;background:#fff}.options-table-header{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:10px 14px;background:#f1f5f9;font-size:11px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #e2e8f0}.options-table-body{display:flex;flex-direction:column}.modal-option-table-row{display:grid;grid-template-columns:40px 90px 1fr 1fr 50px;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9;transition:background .12s ease}.modal-option-table-row:last-child{border-bottom:none}.modal-option-table-row:hover{background:#f8fafc}.index-pill{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#475569;font-size:11px;font-weight:600}.reorder-buttons{display:flex;align-items:center;gap:4px}.btn-arrow{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f8fafc;border:1px solid #cbd5e1;border-radius:4px;font-size:9px;color:#475569;cursor:pointer;transition:all .12s ease}.btn-arrow:hover:not(:disabled){background:#2563eb;color:#fff;border-color:#2563eb}.btn-arrow:disabled{opacity:.35;cursor:not-allowed}.modal-drag-grip{font-size:14px;color:#94a3b8;cursor:grab;padding:0 4px;-webkit-user-select:none;user-select:none}.modal-drag-grip:active{cursor:grabbing}.options-input{width:100%;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px;color:#0f172a;background:#fff;box-sizing:border-box}.options-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px #2563eb1a}.btn-delete-option{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:4px;color:#94a3b8;cursor:pointer;transition:all .12s ease}.btn-delete-option:hover{background:#fee2e2;color:#dc2626}.options-live-preview-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px}.preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.preview-title{font-size:12px;font-weight:600;color:#334155}.preview-tag{font-size:10px;font-weight:600;padding:2px 7px;border-radius:10px;background:#e2e8f0;color:#475569}.preview-select-mock{width:100%}.mock-dropdown-select{width:100%;padding:8px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;color:#334155;box-sizing:border-box}\n"] }]
|
|
68904
68940
|
}], ctorParameters: () => [{ type: FormBuilderService }, { type: TemplateService }, { type: TranslationService }, { type: i0.ChangeDetectorRef }, { type: DataService }], propDecorators: { templateSelected: [{
|
|
68905
68941
|
type: Input
|
|
68906
68942
|
}], selectedElementType: [{
|