@rangertechnologies/ngnxt 2.1.95 → 2.1.97
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.
- package/esm2022/lib/components/button/nxt-button.component.mjs +130 -0
- package/esm2022/lib/components/custom-table/custom-table.component.mjs +2 -2
- package/esm2022/lib/components/datatable/datatable.component.mjs +805 -0
- package/esm2022/lib/components/pagination/pagination.component.mjs +100 -0
- package/esm2022/lib/components/search-box/search-box.component.mjs +3 -3
- package/esm2022/lib/pages/questionbook/questionbook.component.mjs +3 -3
- package/esm2022/lib/pipe/date/date.pipe.mjs +28 -0
- package/esm2022/lib/pipe/editColumnCheck/edit-column-check.pipe.mjs +28 -0
- package/esm2022/lib/pipe/editColumnDropdown/edit-column-dropdown.pipe.mjs +20 -0
- package/esm2022/lib/pipe/editColumnType/edit-column-type.pipe.mjs +20 -0
- package/esm2022/lib/pipe/search-filter/search-filter.pipe.mjs +39 -0
- package/esm2022/lib/pipe/time/time.pipe.mjs +26 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/rangertechnologies-ngnxt.mjs +1165 -9
- package/fesm2022/rangertechnologies-ngnxt.mjs.map +1 -1
- package/lib/components/button/nxt-button.component.d.ts +38 -0
- package/lib/components/datatable/datatable.component.d.ts +130 -0
- package/lib/components/pagination/pagination.component.d.ts +36 -0
- package/lib/pipe/date/date.pipe.d.ts +7 -0
- package/lib/pipe/editColumnCheck/edit-column-check.pipe.d.ts +7 -0
- package/lib/pipe/editColumnDropdown/edit-column-dropdown.pipe.d.ts +7 -0
- package/lib/pipe/editColumnType/edit-column-type.pipe.d.ts +7 -0
- package/lib/pipe/search-filter/search-filter.pipe.d.ts +8 -0
- package/lib/pipe/time/time.pipe.d.ts +7 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/rangertechnologies-ngnxt-2.1.97.tgz +0 -0
- package/rangertechnologies-ngnxt-2.1.95.tgz +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export class NxtButtonComponent {
|
|
6
|
+
elementRef;
|
|
7
|
+
buttonValue = ''; //SKS24JAN25 button text
|
|
8
|
+
buttonType = 'primary'; //SKS24JAN25 If the button type is 'text-only', it should display only the text without a border or outline. For 'grey-text', the button should have a border and a background color, but the text color should be gray, similar to 'blue-text'
|
|
9
|
+
type = 'button'; //SKS24JAN25 The button types are "button," "group," and "dropdown."
|
|
10
|
+
buttonDisable = false; //SKS24JAN25 use this input to disable a button when needed.
|
|
11
|
+
fcBtnBgColor = ''; // Use this input to set a custom background color for the button.
|
|
12
|
+
fcBtnBorder = ''; // Use this input to set a custom border style for the button.
|
|
13
|
+
fcBtnTextColor = ''; // Use this input to set a custom text color for the button.
|
|
14
|
+
fcBtnHeight = ''; // Use this input to set a custom height for the button.
|
|
15
|
+
fcBtnWidth = ''; // Use this input to set a custom width for the button.
|
|
16
|
+
fcBtnIconLeftSrc = ''; // Use this input to set the source of the left-side icon for the button.
|
|
17
|
+
fcBtnIconRightSrc = ''; // Use this input to set the source of the right-side icon for the button.
|
|
18
|
+
fcBtnHoverBgColor = ''; // Use this input to set the background color of the button on hover.
|
|
19
|
+
fcBtnHoverTextColor = ''; // Use this input to set the text color of the button on hover.
|
|
20
|
+
fcBtnId = 'default'; // Use this input to set a custom ID for the button. Default is 'default'.
|
|
21
|
+
dataDismiss = ''; // Use this input to specify the dismiss action for the button (e.g., 'modal' to close a modal).
|
|
22
|
+
fcButtonBorder = '0px'; // Use this input to set the border size of the button. Default is '0px' for no border.
|
|
23
|
+
modalToTrigger = ''; // Use this input to specify the ID or target of the modal to be triggered.
|
|
24
|
+
isImageSvg = false; // Use this input to determine if the image is an SVG. Default is false (non-SVG).
|
|
25
|
+
tabIndex = ''; // Use this input to set the tab index for the element, controlling the focus order.
|
|
26
|
+
buttonConfig = ''; // Use this input to pass configuration settings for the group and dropdown buttons (e.g., styles, actions).
|
|
27
|
+
buttonClickEmit = new EventEmitter();
|
|
28
|
+
iconSrc = ''; // Ensure it's always a string
|
|
29
|
+
isDropdownOpen = false;
|
|
30
|
+
// SKS24JAN25 dropdown button config
|
|
31
|
+
// dropdownButton = {
|
|
32
|
+
// fcBtnBgColor: '#007bff',
|
|
33
|
+
// fcBtnBorder: '1px solid #0056b3',
|
|
34
|
+
// fcBtnTextColor: '#ffffff',
|
|
35
|
+
// fcBtnHeight: '40px',
|
|
36
|
+
// fcBtnWidth: '150px',
|
|
37
|
+
// fcBtnHoverBgColor: '#0056b3',
|
|
38
|
+
// fcBtnHoverTextColor: '#ffffff',
|
|
39
|
+
// label: 'Dropdown',
|
|
40
|
+
// iconSrc: '',
|
|
41
|
+
// items: [
|
|
42
|
+
// { label: 'Action 1',iconSrc: '', hover: false },
|
|
43
|
+
// { label: 'Action 2',iconSrc: '', hover: false },
|
|
44
|
+
// { label: 'Action 3',iconSrc: '', hover: false }
|
|
45
|
+
// ]
|
|
46
|
+
// };
|
|
47
|
+
constructor(elementRef) {
|
|
48
|
+
this.elementRef = elementRef;
|
|
49
|
+
}
|
|
50
|
+
ngOnInit() { }
|
|
51
|
+
//SKS24JAN25 Function to get styles for dropdown and group buttons based on the provided configuration.
|
|
52
|
+
getButtonStyles(config) {
|
|
53
|
+
return {
|
|
54
|
+
'--fc-button-custom-bg': config.fcBtnBgColor || '',
|
|
55
|
+
'--fc-button-custom-border': config.fcBtnBorder || '',
|
|
56
|
+
'--fc-button-custom-color': config.fcBtnTextColor || '',
|
|
57
|
+
'--fc-button-custom-height': config.fcBtnHeight || '',
|
|
58
|
+
'--fc-button-custom-width': config.fcBtnWidth || '',
|
|
59
|
+
'--fc-button-hover-bg': config.fcBtnHoverBgColor || '',
|
|
60
|
+
'--fc-button-hover-text-color': config.fcBtnHoverTextColor || ''
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
buttonClicked($event) {
|
|
64
|
+
this.buttonClickEmit.emit($event);
|
|
65
|
+
if (this.isDropdownOpen) {
|
|
66
|
+
this.isDropdownOpen = false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
toggleDropdown() {
|
|
70
|
+
this.isDropdownOpen = !this.isDropdownOpen;
|
|
71
|
+
}
|
|
72
|
+
//SKS24JAN25 Listener for clicks outside the dropdown button to close or manage its state.
|
|
73
|
+
onClickOutside(event) {
|
|
74
|
+
if (this.isDropdownOpen && !this.elementRef.nativeElement.contains(event.target)) {
|
|
75
|
+
this.isDropdownOpen = false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NxtButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NxtButtonComponent, isStandalone: true, selector: "nxt-button", inputs: { buttonValue: "buttonValue", buttonType: "buttonType", type: "type", buttonDisable: "buttonDisable", fcBtnBgColor: "fcBtnBgColor", fcBtnBorder: "fcBtnBorder", fcBtnTextColor: "fcBtnTextColor", fcBtnHeight: "fcBtnHeight", fcBtnWidth: "fcBtnWidth", fcBtnIconLeftSrc: "fcBtnIconLeftSrc", fcBtnIconRightSrc: "fcBtnIconRightSrc", fcBtnHoverBgColor: "fcBtnHoverBgColor", fcBtnHoverTextColor: "fcBtnHoverTextColor", fcBtnId: "fcBtnId", dataDismiss: "dataDismiss", fcButtonBorder: "fcButtonBorder", modalToTrigger: "modalToTrigger", isImageSvg: "isImageSvg", tabIndex: "tabIndex", buttonConfig: "buttonConfig" }, outputs: { buttonClickEmit: "buttonClickEmit" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, ngImport: i0, template: "<!-- SKS24JAN25 group button -->\n<div *ngIf=\"type === 'group'\" class=\"btn-group\" role=\"group\" aria-label=\"Button Group\">\n <button *ngFor=\"let btn of buttonConfig.buttons\"\n type=\"button\"\n class=\"btn btn-icon {{btn.buttonType}} tooltip-container\"\n [attr.tabindex]=\"btn.tabIndex\"\n [attr.data-bs-toggle]=\"btn.modalToTrigger ? 'modal' : null\"\n [attr.data-bs-target]=\"btn.modalToTrigger ? '#' + btn.modalToTrigger : null\"\n [ngStyle]=\"getButtonStyles(btn)\"\n [disabled]=\"btn.buttonDisable\"\n [attr.data-bs-dismiss]=\"btn.dataDismiss\"\n (click)=\"buttonClicked(btn)\"\n [attr.id]=\"btn.fcBtnId !== 'default' ? btn.fcBtnId : null\">\n <img *ngIf=\"btn.isImageSvg\" [src]=\"btn.iconSrc\">\n <span class=\"custom-tooltip\" \n style=\"background-color:{{btn.tooltipBcColor}};\n color:{{btn.tooltipColor}};\n font-size:{{btn.tooltipFSize}}\">\n {{ btn.tooltip }}\n <div class=\"tooltip-pointer\" style=\"background-color:{{btn.tooltipBcColor}};\"></div>\n </span>\n </button>\n</div>\n \n<!-- SKS24JAN25 single button -->\n<button type=\"button\" *ngIf=\"type !== 'group' && type !== 'dropdown'\" class=\"btn btn-primary fc-button {{buttonType}}\" [tabindex]=\"tabIndex\"\n [attr.data-bs-toggle]=\"modalToTrigger != '' ? 'modal' : ''\"\n [attr.data-bs-target]=\"modalToTrigger != '' ? '#'+modalToTrigger : ''\"\n style=\"--fc-button-custom-bg: {{fcBtnBgColor}};--fc-button-custom-border: {{fcBtnBorder}};--fc-button-custom-color: {{fcBtnTextColor}};--fc-button-custom-height: {{fcBtnHeight}};--fc-button-custom-width: {{fcBtnWidth}};--fc-button-hover-bg: {{fcBtnHoverBgColor}};--fc-button-hover-text-color: {{fcBtnHoverTextColor}};\"\n [disabled]=\"buttonDisable\" [attr.data-bs-dismiss]='dataDismiss' (click)=\"buttonClicked($event)\"\n [attr.id]=\"fcBtnId != 'default' ? fcBtnId : null\">\n <img *ngIf=\"fcBtnIconLeftSrc != '' && isImageSvg\" src=\"{{fcBtnIconLeftSrc}}\"\n class=\"fc-btn-icon left-icon\">\n <img *ngIf=\"fcBtnIconLeftSrc != '' && !isImageSvg\" src=\"{{fcBtnIconLeftSrc}}\" class=\"fc-btn-icon left-icon\">\n <span class=\"fc-btn-text\">{{buttonValue}}</span>\n <img *ngIf=\"fcBtnIconRightSrc != '' && isImageSvg\" src=\"{{fcBtnIconRightSrc}}\"\n class=\"fc-btn-icon right-icon\">\n <img *ngIf=\"fcBtnIconRightSrc != '' && !isImageSvg\" src=\"{{fcBtnIconRightSrc}}\" class=\"fc-btn-icon right-icon\">\n</button>\n\n<!-- SKS24JAN25 dropdown button -->\n<div *ngIf=\"type === 'dropdown'\" class=\"dropdown\">\n <svg class=\"clickable-img\" (click)=\"toggleDropdown()\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.3\" y=\"0.3\" width=\"39.4\" height=\"39.4\" rx=\"11.7\" fill=\"#FAFBFD\" stroke=\"#D5D5D5\" stroke-width=\"0.6\"/>\n <path d=\"M19.9999 25.6667C23.6818 25.6667 26.6666 22.6819 26.6666 19C26.6666 15.3181 23.6818 12.3334 19.9999 12.3334C16.318 12.3334 13.3333 15.3181 13.3333 19C13.3333 22.6819 16.318 25.6667 19.9999 25.6667Z\" fill=\"#292D32\" stroke=\"#292D32\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M17.6467 18.16L20.0001 20.5067L22.3534 18.16\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg> \n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\">\n <button *ngFor=\"let btn of buttonConfig.buttons\"\n type=\"button\"\n class=\"btn btn-icon {{btn.buttonType}} tooltip-container\"\n [attr.tabindex]=\"btn.tabIndex\"\n [attr.data-bs-toggle]=\"btn.modalToTrigger ? 'modal' : null\"\n [attr.data-bs-target]=\"btn.modalToTrigger ? '#' + btn.modalToTrigger : null\"\n [ngStyle]=\"getButtonStyles(btn)\"\n [disabled]=\"btn.buttonDisable\"\n [attr.data-bs-dismiss]=\"btn.dataDismiss\"\n (click)=\"buttonClicked(btn)\"\n [attr.id]=\"btn.fcBtnId !== 'default' ? btn.fcBtnId : null\">\n <img *ngIf=\"btn.isImageSvg\" [src]=\"btn.iconSrc\">\n <span class=\"fc-btn-text\" style=\"padding-left: 12px;\">{{btn.name}}</span>\n </button>\n </div>\n</div>\n", styles: [".fc-button,.fc-button:hover,.fc-button:active,.fc-button:focus{outline:none;border:none;box-shadow:none}.fc-button{padding:6.5px}.fc-button:active{transform:scale(1.02)}.text-only{background:transparent;color:var(--fc-primary-color);border:none;outline:none}.grey-text{color:var(--fc-text-color)}.blue-text{color:var(--fc-primary-color)}.grey-border{color:#272525;background:transparent;border:2px solid #dddddd}.grey-border:hover{color:#272525;background:#6a2aff0a;border:2px solid #6a2aff59}.grey-border:active,.grey-border:focus{background-color:#386bf6;border:2px solid #3268ff;color:#fff}.blue-border,.blue-border:hover,.blue-border:active,.blue-border:focus{border:1px solid var(--fc-primary-color)}.bg-transparent{background-color:transparent}.custom-btn{background-color:var(--fc-button-custom-bg);border-color:var(--fc-button-custom-border);color:var(--fc-button-custom-color);height:var(--fc-button-custom-height);width:var(--fc-button-custom-width)}.custom-btn:hover,.custom-btn:active,.custom-btn:focus{border-color:var(--fc-button-custom-border);background-color:var(--fc-button-hover-bg);color:var(--fc-button-hover-text-color)}.fc-btn-text{display:inline-flex;vertical-align:middle;font-size:14px;font-weight:400;padding-left:5px;padding-right:5px}.right-icon{margin-left:5px}.left-icon{margin-right:5px}.fc-button.side-save-component,.fc-button.side-cancel-component{border:1px solid transparent}.fc-button.side-save-component:focus,.fc-button.side-cancel-component:focus{box-shadow:0 0 0 .25rem #0d6efd40;border:1px solid #86b7fe}.btn-group{background-color:#fdfeff;border:1px solid #dddddd;border-radius:7px}.btn-icon{background-color:#fdfeff;border:1px solid #dddddd}.custom-tooltip{visibility:visible;position:absolute;background-color:#0773ff;color:#fff;text-align:center;padding:5px 10px;border-radius:4px;font-size:12px;white-space:nowrap;bottom:100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .2s;z-index:10;margin-bottom:10px}.tooltip-pointer{position:absolute;width:0;height:0;bottom:-5px;left:50%;transform:translate(-50%);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #0773ff}.tooltip-container:hover .custom-tooltip{visibility:visible;opacity:1}.clickable-img{position:relative;cursor:pointer;height:41px;transition:transform .3s ease,box-shadow .3s ease;border:2px solid #dddddd;border-radius:13px}.clickable-img:hover{transform:scale(.95);border:2px solid rgb(31,105,255);border-radius:14px}.dropdown{position:relative;display:inline-block}.dropdown-menu{right:0;top:45px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 4px 8px #0000001a;left:unset}.dropdown .dropdown-menu{display:block}.dropdown-menu .btn{display:block;padding:10px;width:100%;text-align:left;background:transparent;border:none;cursor:pointer}.dropdown-menu .btn:hover{background-color:#f1f1f1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NxtButtonComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 'nxt-button', standalone: true, imports: [CommonModule], template: "<!-- SKS24JAN25 group button -->\n<div *ngIf=\"type === 'group'\" class=\"btn-group\" role=\"group\" aria-label=\"Button Group\">\n <button *ngFor=\"let btn of buttonConfig.buttons\"\n type=\"button\"\n class=\"btn btn-icon {{btn.buttonType}} tooltip-container\"\n [attr.tabindex]=\"btn.tabIndex\"\n [attr.data-bs-toggle]=\"btn.modalToTrigger ? 'modal' : null\"\n [attr.data-bs-target]=\"btn.modalToTrigger ? '#' + btn.modalToTrigger : null\"\n [ngStyle]=\"getButtonStyles(btn)\"\n [disabled]=\"btn.buttonDisable\"\n [attr.data-bs-dismiss]=\"btn.dataDismiss\"\n (click)=\"buttonClicked(btn)\"\n [attr.id]=\"btn.fcBtnId !== 'default' ? btn.fcBtnId : null\">\n <img *ngIf=\"btn.isImageSvg\" [src]=\"btn.iconSrc\">\n <span class=\"custom-tooltip\" \n style=\"background-color:{{btn.tooltipBcColor}};\n color:{{btn.tooltipColor}};\n font-size:{{btn.tooltipFSize}}\">\n {{ btn.tooltip }}\n <div class=\"tooltip-pointer\" style=\"background-color:{{btn.tooltipBcColor}};\"></div>\n </span>\n </button>\n</div>\n \n<!-- SKS24JAN25 single button -->\n<button type=\"button\" *ngIf=\"type !== 'group' && type !== 'dropdown'\" class=\"btn btn-primary fc-button {{buttonType}}\" [tabindex]=\"tabIndex\"\n [attr.data-bs-toggle]=\"modalToTrigger != '' ? 'modal' : ''\"\n [attr.data-bs-target]=\"modalToTrigger != '' ? '#'+modalToTrigger : ''\"\n style=\"--fc-button-custom-bg: {{fcBtnBgColor}};--fc-button-custom-border: {{fcBtnBorder}};--fc-button-custom-color: {{fcBtnTextColor}};--fc-button-custom-height: {{fcBtnHeight}};--fc-button-custom-width: {{fcBtnWidth}};--fc-button-hover-bg: {{fcBtnHoverBgColor}};--fc-button-hover-text-color: {{fcBtnHoverTextColor}};\"\n [disabled]=\"buttonDisable\" [attr.data-bs-dismiss]='dataDismiss' (click)=\"buttonClicked($event)\"\n [attr.id]=\"fcBtnId != 'default' ? fcBtnId : null\">\n <img *ngIf=\"fcBtnIconLeftSrc != '' && isImageSvg\" src=\"{{fcBtnIconLeftSrc}}\"\n class=\"fc-btn-icon left-icon\">\n <img *ngIf=\"fcBtnIconLeftSrc != '' && !isImageSvg\" src=\"{{fcBtnIconLeftSrc}}\" class=\"fc-btn-icon left-icon\">\n <span class=\"fc-btn-text\">{{buttonValue}}</span>\n <img *ngIf=\"fcBtnIconRightSrc != '' && isImageSvg\" src=\"{{fcBtnIconRightSrc}}\"\n class=\"fc-btn-icon right-icon\">\n <img *ngIf=\"fcBtnIconRightSrc != '' && !isImageSvg\" src=\"{{fcBtnIconRightSrc}}\" class=\"fc-btn-icon right-icon\">\n</button>\n\n<!-- SKS24JAN25 dropdown button -->\n<div *ngIf=\"type === 'dropdown'\" class=\"dropdown\">\n <svg class=\"clickable-img\" (click)=\"toggleDropdown()\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.3\" y=\"0.3\" width=\"39.4\" height=\"39.4\" rx=\"11.7\" fill=\"#FAFBFD\" stroke=\"#D5D5D5\" stroke-width=\"0.6\"/>\n <path d=\"M19.9999 25.6667C23.6818 25.6667 26.6666 22.6819 26.6666 19C26.6666 15.3181 23.6818 12.3334 19.9999 12.3334C16.318 12.3334 13.3333 15.3181 13.3333 19C13.3333 22.6819 16.318 25.6667 19.9999 25.6667Z\" fill=\"#292D32\" stroke=\"#292D32\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M17.6467 18.16L20.0001 20.5067L22.3534 18.16\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg> \n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\">\n <button *ngFor=\"let btn of buttonConfig.buttons\"\n type=\"button\"\n class=\"btn btn-icon {{btn.buttonType}} tooltip-container\"\n [attr.tabindex]=\"btn.tabIndex\"\n [attr.data-bs-toggle]=\"btn.modalToTrigger ? 'modal' : null\"\n [attr.data-bs-target]=\"btn.modalToTrigger ? '#' + btn.modalToTrigger : null\"\n [ngStyle]=\"getButtonStyles(btn)\"\n [disabled]=\"btn.buttonDisable\"\n [attr.data-bs-dismiss]=\"btn.dataDismiss\"\n (click)=\"buttonClicked(btn)\"\n [attr.id]=\"btn.fcBtnId !== 'default' ? btn.fcBtnId : null\">\n <img *ngIf=\"btn.isImageSvg\" [src]=\"btn.iconSrc\">\n <span class=\"fc-btn-text\" style=\"padding-left: 12px;\">{{btn.name}}</span>\n </button>\n </div>\n</div>\n", styles: [".fc-button,.fc-button:hover,.fc-button:active,.fc-button:focus{outline:none;border:none;box-shadow:none}.fc-button{padding:6.5px}.fc-button:active{transform:scale(1.02)}.text-only{background:transparent;color:var(--fc-primary-color);border:none;outline:none}.grey-text{color:var(--fc-text-color)}.blue-text{color:var(--fc-primary-color)}.grey-border{color:#272525;background:transparent;border:2px solid #dddddd}.grey-border:hover{color:#272525;background:#6a2aff0a;border:2px solid #6a2aff59}.grey-border:active,.grey-border:focus{background-color:#386bf6;border:2px solid #3268ff;color:#fff}.blue-border,.blue-border:hover,.blue-border:active,.blue-border:focus{border:1px solid var(--fc-primary-color)}.bg-transparent{background-color:transparent}.custom-btn{background-color:var(--fc-button-custom-bg);border-color:var(--fc-button-custom-border);color:var(--fc-button-custom-color);height:var(--fc-button-custom-height);width:var(--fc-button-custom-width)}.custom-btn:hover,.custom-btn:active,.custom-btn:focus{border-color:var(--fc-button-custom-border);background-color:var(--fc-button-hover-bg);color:var(--fc-button-hover-text-color)}.fc-btn-text{display:inline-flex;vertical-align:middle;font-size:14px;font-weight:400;padding-left:5px;padding-right:5px}.right-icon{margin-left:5px}.left-icon{margin-right:5px}.fc-button.side-save-component,.fc-button.side-cancel-component{border:1px solid transparent}.fc-button.side-save-component:focus,.fc-button.side-cancel-component:focus{box-shadow:0 0 0 .25rem #0d6efd40;border:1px solid #86b7fe}.btn-group{background-color:#fdfeff;border:1px solid #dddddd;border-radius:7px}.btn-icon{background-color:#fdfeff;border:1px solid #dddddd}.custom-tooltip{visibility:visible;position:absolute;background-color:#0773ff;color:#fff;text-align:center;padding:5px 10px;border-radius:4px;font-size:12px;white-space:nowrap;bottom:100%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .2s;z-index:10;margin-bottom:10px}.tooltip-pointer{position:absolute;width:0;height:0;bottom:-5px;left:50%;transform:translate(-50%);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #0773ff}.tooltip-container:hover .custom-tooltip{visibility:visible;opacity:1}.clickable-img{position:relative;cursor:pointer;height:41px;transition:transform .3s ease,box-shadow .3s ease;border:2px solid #dddddd;border-radius:13px}.clickable-img:hover{transform:scale(.95);border:2px solid rgb(31,105,255);border-radius:14px}.dropdown{position:relative;display:inline-block}.dropdown-menu{right:0;top:45px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 4px 8px #0000001a;left:unset}.dropdown .dropdown-menu{display:block}.dropdown-menu .btn{display:block;padding:10px;width:100%;text-align:left;background:transparent;border:none;cursor:pointer}.dropdown-menu .btn:hover{background-color:#f1f1f1}\n"] }]
|
|
84
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonValue: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], buttonType: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], type: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], buttonDisable: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], fcBtnBgColor: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], fcBtnBorder: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], fcBtnTextColor: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], fcBtnHeight: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], fcBtnWidth: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], fcBtnIconLeftSrc: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], fcBtnIconRightSrc: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], fcBtnHoverBgColor: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], fcBtnHoverTextColor: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], fcBtnId: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], dataDismiss: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], fcButtonBorder: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], modalToTrigger: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], isImageSvg: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}], tabIndex: [{
|
|
121
|
+
type: Input
|
|
122
|
+
}], buttonConfig: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], buttonClickEmit: [{
|
|
125
|
+
type: Output
|
|
126
|
+
}], onClickOutside: [{
|
|
127
|
+
type: HostListener,
|
|
128
|
+
args: ['document:click', ['$event']]
|
|
129
|
+
}] } });
|
|
130
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnh0LWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9ueHQtYXBwL3NyYy9saWIvY29tcG9uZW50cy9idXR0b24vbnh0LWJ1dHRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9ueHQtYXBwL3NyYy9saWIvY29tcG9uZW50cy9idXR0b24vbnh0LWJ1dHRvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBYyxZQUFZLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7OztBQVF6RyxNQUFNLE9BQU8sa0JBQWtCO0lBK0NUO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cbiAgICAgICAgICAgIFthdHRyLnRhYmluZGV4XT1cImJ0bi50YWJJbmRleFwiXG4gICAgICAgICAgICBbYXR0ci5kYXRhLWJzLXRvZ2dsZV09XCJidG4ubW9kYWxUb1RyaWdnZXIgPyAnbW9kYWwnIDogbnVsbFwiXG4gICAgICAgICAgICBbYXR0ci5kYXRhLWJzLXRhcmdldF09XCJidG4ubW9kYWxUb1RyaWdnZXIgPyAnIycgKyBidG4ubW9kYWxUb1RyaWdnZXIgOiBudWxsXCJcbiAgICAgICAgICAgIFtuZ1N0eWxlXT1cImdldEJ1dHRvblN0eWxlcyhidG4pXCJcbiAgICAgICAgICAgIFtkaXNhYmxlZF09XCJidG4uYnV0dG9uRGlzYWJsZVwiXG4gICAgICAgICAgICBbYXR0ci5kYXRhLWJzLWRpc21pc3NdPVwiYnRuLmRhdGFEaXNtaXNzXCJcbiAgICAgICAgICAgIChjbGljayk9XCJidXR0b25DbGlja2VkKGJ0bilcIlxuICAgICAgICAgICAgW2F0dHIuaWRdPVwiYnRuLmZjQnRuSWQgIT09ICdkZWZhdWx0JyA/IGJ0bi5mY0J0bklkIDogbnVsbFwiPlxuICAgICAgICAgICAgPGltZyAqbmdJZj1cImJ0bi5pc0ltYWdlU3ZnXCIgW3NyY109XCJidG4uaWNvblNyY1wiPlxuICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJmYy1idG4tdGV4dFwiIHN0eWxlPVwicGFkZGluZy1sZWZ0OiAxMnB4O1wiPnt7YnRuLm5hbWV9fTwvc3Bhbj5cbiAgICAgICAgPC9idXR0b24+XG4gICAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -330,11 +330,11 @@ export class CustomTableComponent {
|
|
|
330
330
|
console.log('Component Destroyed');
|
|
331
331
|
}
|
|
332
332
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CustomTableComponent, deps: [{ token: i1.ChangeService }, { token: i2.I18nService }, { token: i3.SalesforceService }, { token: i4.DataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
333
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CustomTableComponent, selector: "app-custom-table", inputs: { question: "question", apiMeta: "apiMeta" }, outputs: { valueChange: "valueChange", saveTableData: "saveTableData" }, ngImport: i0, template: "<!-- RS 03FEB2025 -->\n<!-- Search Bar -->\n<!-- Search, Revert & Save in Same Line -->\n<div class=\"d-flex align-items-center justify-content-between mb-3\">\n <!-- Search Bar -->\n <div class=\"search-container me-auto\">\n <div class=\"input-group\">\n <input \n type=\"text\" \n class=\"form-control search-input\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"search()\"\n placeholder=\"Search...\"\n >\n <div class=\"search-icon\">\n <!-- RS 03FEB2025 -->\n <!-- Search icon for user input -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\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 </div>\n </div>\n </div>\n\n <!-- Buttons -->\n <div>\n <!-- RS 03FEB2025 --><!-- Cancel button (visible only when changes are unsaved) -->\n <button \n class=\"btn btn-secondary me-2\" \n *ngIf=\"hasUnsavedChanges\" \n (click)=\"revertChanges()\"\n >\n Cancel\n </button>\n <!-- Save button (disabled if no unsaved changes) --><!-- RS 03FEB2025 -->\n <button \n class=\"btn btn-primary\" \n [disabled]=\"!hasUnsavedChanges\"\n (click)=\"saveTable()\"\n >\n Save Table\n </button>\n </div>\n</div>\n<!-- Table Container -->\n<div class=\"table-container\">\n <table class=\"table table-striped table-bordered\">\n <thead>\n <!-- HA 28DEC23 changed table header values and changed table size logic to evenly visible -->\n <!-- <th><input type=\"checkbox\" (change)=\"selectAll($event.target.checked)\"></th> -->\n <tr>\n <th *ngFor=\"let header of tableHeader\" [style.width]=\"header.width || 'auto'\">\n {{ header.label }}\n </th>\n <!-- Actions column (only if showActions is true) --><!-- RS 03FEB2025 -->\n <th *ngIf=\"showActions\" style=\"width: 140px\" class=\"actions-columns\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of paginatedData; let i = index\">\n <td *ngFor=\"let header of tableHeader\">\n <!-- Image with text input -->\n <ng-container *ngIf=\"header.fldType === 'imagetext'\">\n <div class=\"d-flex align-items-center\">\n <img [src]=\"item.imageSrc\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px; margin-right: 5px;\">\n <input type=\"text\" \n [(ngModel)]=\"item[header.fieldName]\" \n (ngModelChange)=\"updateLabel(i, header.fieldName, item[header.fieldName])\" \n class=\"she-line-input table-input\">\n </div>\n </ng-container>\n\n <!-- Image only -->\n <ng-container *ngIf=\"header.fldType === 'image'\">\n <img [src]=\"item[header.fieldName]\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px;\">\n </ng-container>\n <!--VD 23Aug24 handle readOnly -->\n <!-- Text input -->\n <ng-container *ngIf=\"header.fldType === 'Text'\">\n <input type=\"text\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n <!--VD 23Aug24 handle Number Type -->\n <!-- Number input -->\n <!-- VD 26Jun24 - pipe change to handle multiple objects-->\n <ng-container *ngIf=\"header.fldType === 'Number'\">\n <input type=\"number\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n\n <!-- Radio input -->\n <ng-container *ngIf=\"header.fldType === 'radio'\">\n <input type=\"radio\" \n [name]=\"item.name\" \n [checked]=\"item.value == header.fieldName\" \n (click)=\"updateRadio(item, header.fieldName)\">\n </ng-container>\n </td>\n <!-- Actions column --><!-- RS 03FEB2025 -->\n <td *ngIf=\"showActions\" class=\"actions-column\">\n <div class=\"d-flex justify-content-around\">\n <button class=\"btn btn-link p-0\" (click)=\"editRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#03A9F4\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n <path d=\"m15 5 3 3\" />\n </svg>\n Edit\n </button>\n <button class=\"btn btn-link p-0\" (click)=\"deleteRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F44336\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n <path d=\"m10 11 1 6\" />\n <path d=\"m14 11-1 6\" />\n <path d=\"M4 6l1 14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2l1-14\" />\n </svg>\n \n Delete\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<!-- Pagination --><!-- RS 03FEB2025 -->\n<div *ngIf=\"showPagination\" class=\"pagination-container\">\n <div class=\"d-flex justify-content-end align-items-center\">\n <div class=\"items-per-page\">\n <span>Items per page:</span>\n <select [(ngModel)]=\"itemsPerPage\" (change)=\"updatePagination()\" class=\"form-select form-select-sm\">\n <option value=\"5\">5</option>\n <option value=\"10\">10</option>\n <option value=\"20\">20</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n <div class=\"page-info ms-3 me-3\">\n {{((currentPage - 1) * itemsPerPage + 1)}} - {{Math.min(currentPage * itemsPerPage, totalItems)}} of {{totalItems}}\n </div>\n <nav aria-label=\"Table pagination\">\n <!-- First page --><!-- RS 03FEB2025 -->\n <ul class=\"pagination mb-0\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(1)\">\u00AB</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(currentPage - 1)\">\u2039</a>\n </li>\n <!-- Dynamic pagination --><!-- RS 03FEB2025 -->\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"setPage(page)\">{{page}}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(currentPage + 1)\">\u203A</a>\n </li>\n <!-- Last page -->\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(pages.length)\">\u00BB</a>\n </li>\n </ul>\n </nav>\n </div>\n</div>\n<!-- RS 03FEB2025 -->\n<!-- Add Row Button -->\n<div *ngIf=\"showAddRow\" (click)=\"addRow()\" class=\"addRowClass\">\n <div class=\"circle-button\">+</div>\n</div>\n", styles: [".table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent;border-collapse:collapse}.table-container{max-height:400px;overflow-y:auto;overflow-x:auto;position:relative;margin-bottom:1rem}.table th,.table td{padding:3px 5px;line-height:1.2;vertical-align:middle;border:1px solid #dee2e6;white-space:nowrap}.table-bordered{border:1px solid #ddd}.table-striped tbody tr:nth-of-type(odd){background-color:#f9f9f9!important}thead{background-color:#03a9f4;position:sticky;top:0;z-index:10}thead th{color:#fff;font-size:14px;text-align:center;vertical-align:bottom;border-bottom:2px solid #dee2e6;padding:12px!important}thead .permission,.permission_yes,.permission_no,.permission_na{text-align:center}th{text-align:left}tbody{color:#797979}tbody td{font-size:12px}.none-border th{border:none}.actions-column{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#fff}.actions-columns{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#03a9f4}.actions-column .btn-link{font-size:11px;color:#797979;text-decoration:none}th.actions-column{background-color:#03a9f4}tr:nth-of-type(odd) .actions-column{background-color:#f9f9f9!important}tr:nth-of-type(2n) .actions-column{background-color:#fff!important}.table-input{width:100%;padding:.375rem .75rem;border:1px solid #ced4da;border-radius:.25rem}.editInput{background-color:#fff;border-bottom:1px solid red!important;border-color:#80bdff}.search-container{margin-bottom:1rem}.search-container .input-group{max-width:300px;position:relative}.search-input{padding-right:35px;border-radius:4px!important}.search-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);z-index:4;color:#666;pointer-events:none}.pagination-container{padding:.5rem 1rem;background-color:#f8f9fa;border-top:1px solid #dee2e6}.pagination-container .d-flex{justify-content:flex-end!important}.items-per-page{margin-right:20px;font-size:12px}.items-per-page select{width:60px;margin-left:8px}.page-info{margin-right:15px;font-size:12px;color:#6c757d}.pagination{margin:0}.page-link{padding:.25rem .5rem;font-size:12px}.page-item.disabled .page-link{cursor:not-allowed}.addRowClass{float:right;margin-top:1rem;margin-right:15%;text-align:center;cursor:pointer}.circle-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background-color:#007bff;color:#fff;cursor:pointer;font-size:24px;line-height:1;box-shadow:0 2px 4px #0003}.circle-button:hover{background-color:#0056b3}.small-icon{width:16px;height:16px;margin-right:4px}.action{min-width:80px;text-align:center;cursor:pointer}.action:hover{color:red}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[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: i7.GetValuePipe, name: "getValue" }] });
|
|
333
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CustomTableComponent, selector: "app-custom-table", inputs: { question: "question", apiMeta: "apiMeta" }, outputs: { valueChange: "valueChange", saveTableData: "saveTableData" }, ngImport: i0, template: "<!-- RS 03FEB2025 -->\n<!-- Search Bar -->\n<!-- Search, Revert & Save in Same Line -->\n<div class=\"d-flex align-items-center justify-content-between mb-3\">\n <!-- Search Bar -->\n <div class=\"search-container me-auto\">\n <div class=\"input-group\">\n <input \n type=\"text\" \n class=\"form-control search-input\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"search()\"\n placeholder=\"Search...\"\n >\n <div class=\"search-icon\">\n <!-- RS 03FEB2025 -->\n <!-- Search icon for user input -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\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 </div>\n </div>\n </div>\n\n <!-- Buttons -->\n <div>\n <!-- RS 03FEB2025 --><!-- Cancel button (visible only when changes are unsaved) -->\n <button \n class=\"btn btn-secondary me-2\" \n *ngIf=\"hasUnsavedChanges\" \n (click)=\"revertChanges()\"\n >\n Cancel\n </button>\n <!-- Save button (disabled if no unsaved changes) --><!-- RS 03FEB2025 -->\n <button \n class=\"btn btn-primary\" \n [disabled]=\"!hasUnsavedChanges\"\n (click)=\"saveTable()\"\n >\n Save Table\n </button>\n </div>\n</div>\n<!-- Table Container -->\n<div class=\"table-container\">\n <table class=\"table table-striped table-bordered\">\n <thead>\n <!-- HA 28DEC23 changed table header values and changed table size logic to evenly visible -->\n <!-- <th><input type=\"checkbox\" (change)=\"selectAll($event.target.checked)\"></th> -->\n <tr>\n <th *ngFor=\"let header of tableHeader\" [style.width]=\"header.width || 'auto'\">\n {{ header.label }}\n </th>\n <!-- Actions column (only if showActions is true) --><!-- RS 03FEB2025 -->\n <th *ngIf=\"showActions\" style=\"width: 140px\" class=\"actions-columns\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of paginatedData; let i = index\">\n <td *ngFor=\"let header of tableHeader\">\n <!-- Image with text input -->\n <ng-container *ngIf=\"header.fldType === 'imagetext'\">\n <div class=\"d-flex align-items-center\">\n <img [src]=\"item.imageSrc\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px; margin-right: 5px;\">\n <input type=\"text\" \n [(ngModel)]=\"item[header.fieldName]\" \n (ngModelChange)=\"updateLabel(i, header.fieldName, item[header.fieldName])\" \n class=\"she-line-input table-input\">\n </div>\n </ng-container>\n\n <!-- Image only -->\n <ng-container *ngIf=\"header.fldType === 'image'\">\n <img [src]=\"item[header.fieldName]\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px;\">\n </ng-container>\n <!--VD 23Aug24 handle readOnly -->\n <!-- Text input -->\n <ng-container *ngIf=\"header.fldType === 'Text'\">\n <input type=\"text\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n <!--VD 23Aug24 handle Number Type -->\n <!-- Number input -->\n <!-- VD 26Jun24 - pipe change to handle multiple objects-->\n <ng-container *ngIf=\"header.fldType === 'Number'\">\n <input type=\"number\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n\n <!-- Radio input -->\n <ng-container *ngIf=\"header.fldType === 'radio'\">\n <input type=\"radio\" \n [name]=\"item.name\" \n [checked]=\"item.value == header.fieldName\" \n (click)=\"updateRadio(item, header.fieldName)\">\n </ng-container>\n </td>\n <!-- Actions column --><!-- RS 03FEB2025 -->\n <td *ngIf=\"showActions\" class=\"actions-column\">\n <div class=\"d-flex justify-content-around\">\n <button class=\"btn btn-link p-0\" (click)=\"editRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#03A9F4\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n <path d=\"m15 5 3 3\" />\n </svg>\n Edit\n </button>\n <button class=\"btn btn-link p-0\" (click)=\"deleteRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F44336\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n <path d=\"m10 11 1 6\" />\n <path d=\"m14 11-1 6\" />\n <path d=\"M4 6l1 14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2l1-14\" />\n </svg>\n \n Delete\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<!-- Pagination --><!-- RS 03FEB2025 -->\n<div *ngIf=\"showPagination\" class=\"pagination-container\">\n <div class=\"d-flex justify-content-end align-items-center\">\n <div class=\"items-per-page\">\n <span>Items per page:</span>\n <select [(ngModel)]=\"itemsPerPage\" (change)=\"updatePagination()\" class=\"form-select form-select-sm\">\n <option value=\"5\">5</option>\n <option value=\"10\">10</option>\n <option value=\"20\">20</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n <div class=\"page-info ms-3 me-3\">\n {{((currentPage - 1) * itemsPerPage + 1)}} - {{Math.min(currentPage * itemsPerPage, totalItems)}} of {{totalItems}}\n </div>\n <nav aria-label=\"Table pagination\">\n <!-- First page --><!-- RS 03FEB2025 -->\n <ul class=\"pagination mb-0\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(1)\">\u00AB</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(currentPage - 1)\">\u2039</a>\n </li>\n <!-- Dynamic pagination --><!-- RS 03FEB2025 -->\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"setPage(page)\">{{page}}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(currentPage + 1)\">\u203A</a>\n </li>\n <!-- Last page -->\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(pages.length)\">\u00BB</a>\n </li>\n </ul>\n </nav>\n </div>\n</div>\n<!-- RS 03FEB2025 -->\n<!-- Add Row Button -->\n<div *ngIf=\"showAddRow\" (click)=\"addRow()\" class=\"addRowClass\">\n <div class=\"circle-button\">+</div>\n</div>\n", styles: [".table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent;border-collapse:collapse}.table-container{max-height:400px;overflow-y:auto;overflow-x:auto;position:relative;margin-bottom:1rem}.table th,.table td{padding:3px 5px;line-height:1.2;vertical-align:middle;border:1px solid #dee2e6;white-space:nowrap}.table-bordered{border:1px solid #ddd}.table-striped tbody tr:nth-of-type(odd){background-color:#f9f9f9!important}thead{background-color:#03a9f4;position:sticky;top:0;z-index:unset!important}thead th{color:#fff;font-size:14px;text-align:center;vertical-align:bottom;border-bottom:2px solid #dee2e6;padding:12px!important}thead .permission,.permission_yes,.permission_no,.permission_na{text-align:center}th{text-align:left}tbody{color:#797979}tbody td{font-size:12px}.none-border th{border:none}.actions-column{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#fff}.actions-columns{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#03a9f4}.actions-column .btn-link{font-size:11px;color:#797979;text-decoration:none}th.actions-column{background-color:#03a9f4}tr:nth-of-type(odd) .actions-column{background-color:#f9f9f9!important}tr:nth-of-type(2n) .actions-column{background-color:#fff!important}.table-input{width:100%;padding:.375rem .75rem;border:1px solid #ced4da;border-radius:.25rem}.editInput{background-color:#fff;border-bottom:1px solid red!important;border-color:#80bdff}.search-container{margin-bottom:1rem}.search-container .input-group{max-width:300px;position:relative}.search-input{padding-right:35px;border-radius:4px!important}.search-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none}.pagination-container{padding:.5rem 1rem;background-color:#f8f9fa;border-top:1px solid #dee2e6}.pagination-container .d-flex{justify-content:flex-end!important}.items-per-page{margin-right:20px;font-size:12px}.items-per-page select{width:60px;margin-left:8px}.page-info{margin-right:15px;font-size:12px;color:#6c757d}.pagination{margin:0}.page-link{padding:.25rem .5rem;font-size:12px}.page-item.disabled .page-link{cursor:not-allowed}.addRowClass{float:right;margin-top:1rem;margin-right:15%;text-align:center;cursor:pointer}.circle-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background-color:#007bff;color:#fff;cursor:pointer;font-size:24px;line-height:1;box-shadow:0 2px 4px #0003}.circle-button:hover{background-color:#0056b3}.small-icon{width:16px;height:16px;margin-right:4px}.action{min-width:80px;text-align:center;cursor:pointer}.action:hover{color:red}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[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: i7.GetValuePipe, name: "getValue" }] });
|
|
334
334
|
}
|
|
335
335
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CustomTableComponent, decorators: [{
|
|
336
336
|
type: Component,
|
|
337
|
-
args: [{ selector: 'app-custom-table', template: "<!-- RS 03FEB2025 -->\n<!-- Search Bar -->\n<!-- Search, Revert & Save in Same Line -->\n<div class=\"d-flex align-items-center justify-content-between mb-3\">\n <!-- Search Bar -->\n <div class=\"search-container me-auto\">\n <div class=\"input-group\">\n <input \n type=\"text\" \n class=\"form-control search-input\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"search()\"\n placeholder=\"Search...\"\n >\n <div class=\"search-icon\">\n <!-- RS 03FEB2025 -->\n <!-- Search icon for user input -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\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 </div>\n </div>\n </div>\n\n <!-- Buttons -->\n <div>\n <!-- RS 03FEB2025 --><!-- Cancel button (visible only when changes are unsaved) -->\n <button \n class=\"btn btn-secondary me-2\" \n *ngIf=\"hasUnsavedChanges\" \n (click)=\"revertChanges()\"\n >\n Cancel\n </button>\n <!-- Save button (disabled if no unsaved changes) --><!-- RS 03FEB2025 -->\n <button \n class=\"btn btn-primary\" \n [disabled]=\"!hasUnsavedChanges\"\n (click)=\"saveTable()\"\n >\n Save Table\n </button>\n </div>\n</div>\n<!-- Table Container -->\n<div class=\"table-container\">\n <table class=\"table table-striped table-bordered\">\n <thead>\n <!-- HA 28DEC23 changed table header values and changed table size logic to evenly visible -->\n <!-- <th><input type=\"checkbox\" (change)=\"selectAll($event.target.checked)\"></th> -->\n <tr>\n <th *ngFor=\"let header of tableHeader\" [style.width]=\"header.width || 'auto'\">\n {{ header.label }}\n </th>\n <!-- Actions column (only if showActions is true) --><!-- RS 03FEB2025 -->\n <th *ngIf=\"showActions\" style=\"width: 140px\" class=\"actions-columns\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of paginatedData; let i = index\">\n <td *ngFor=\"let header of tableHeader\">\n <!-- Image with text input -->\n <ng-container *ngIf=\"header.fldType === 'imagetext'\">\n <div class=\"d-flex align-items-center\">\n <img [src]=\"item.imageSrc\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px; margin-right: 5px;\">\n <input type=\"text\" \n [(ngModel)]=\"item[header.fieldName]\" \n (ngModelChange)=\"updateLabel(i, header.fieldName, item[header.fieldName])\" \n class=\"she-line-input table-input\">\n </div>\n </ng-container>\n\n <!-- Image only -->\n <ng-container *ngIf=\"header.fldType === 'image'\">\n <img [src]=\"item[header.fieldName]\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px;\">\n </ng-container>\n <!--VD 23Aug24 handle readOnly -->\n <!-- Text input -->\n <ng-container *ngIf=\"header.fldType === 'Text'\">\n <input type=\"text\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n <!--VD 23Aug24 handle Number Type -->\n <!-- Number input -->\n <!-- VD 26Jun24 - pipe change to handle multiple objects-->\n <ng-container *ngIf=\"header.fldType === 'Number'\">\n <input type=\"number\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n\n <!-- Radio input -->\n <ng-container *ngIf=\"header.fldType === 'radio'\">\n <input type=\"radio\" \n [name]=\"item.name\" \n [checked]=\"item.value == header.fieldName\" \n (click)=\"updateRadio(item, header.fieldName)\">\n </ng-container>\n </td>\n <!-- Actions column --><!-- RS 03FEB2025 -->\n <td *ngIf=\"showActions\" class=\"actions-column\">\n <div class=\"d-flex justify-content-around\">\n <button class=\"btn btn-link p-0\" (click)=\"editRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#03A9F4\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n <path d=\"m15 5 3 3\" />\n </svg>\n Edit\n </button>\n <button class=\"btn btn-link p-0\" (click)=\"deleteRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F44336\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n <path d=\"m10 11 1 6\" />\n <path d=\"m14 11-1 6\" />\n <path d=\"M4 6l1 14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2l1-14\" />\n </svg>\n \n Delete\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<!-- Pagination --><!-- RS 03FEB2025 -->\n<div *ngIf=\"showPagination\" class=\"pagination-container\">\n <div class=\"d-flex justify-content-end align-items-center\">\n <div class=\"items-per-page\">\n <span>Items per page:</span>\n <select [(ngModel)]=\"itemsPerPage\" (change)=\"updatePagination()\" class=\"form-select form-select-sm\">\n <option value=\"5\">5</option>\n <option value=\"10\">10</option>\n <option value=\"20\">20</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n <div class=\"page-info ms-3 me-3\">\n {{((currentPage - 1) * itemsPerPage + 1)}} - {{Math.min(currentPage * itemsPerPage, totalItems)}} of {{totalItems}}\n </div>\n <nav aria-label=\"Table pagination\">\n <!-- First page --><!-- RS 03FEB2025 -->\n <ul class=\"pagination mb-0\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(1)\">\u00AB</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(currentPage - 1)\">\u2039</a>\n </li>\n <!-- Dynamic pagination --><!-- RS 03FEB2025 -->\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"setPage(page)\">{{page}}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(currentPage + 1)\">\u203A</a>\n </li>\n <!-- Last page -->\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(pages.length)\">\u00BB</a>\n </li>\n </ul>\n </nav>\n </div>\n</div>\n<!-- RS 03FEB2025 -->\n<!-- Add Row Button -->\n<div *ngIf=\"showAddRow\" (click)=\"addRow()\" class=\"addRowClass\">\n <div class=\"circle-button\">+</div>\n</div>\n", styles: [".table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent;border-collapse:collapse}.table-container{max-height:400px;overflow-y:auto;overflow-x:auto;position:relative;margin-bottom:1rem}.table th,.table td{padding:3px 5px;line-height:1.2;vertical-align:middle;border:1px solid #dee2e6;white-space:nowrap}.table-bordered{border:1px solid #ddd}.table-striped tbody tr:nth-of-type(odd){background-color:#f9f9f9!important}thead{background-color:#03a9f4;position:sticky;top:0;z-index:10}thead th{color:#fff;font-size:14px;text-align:center;vertical-align:bottom;border-bottom:2px solid #dee2e6;padding:12px!important}thead .permission,.permission_yes,.permission_no,.permission_na{text-align:center}th{text-align:left}tbody{color:#797979}tbody td{font-size:12px}.none-border th{border:none}.actions-column{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#fff}.actions-columns{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#03a9f4}.actions-column .btn-link{font-size:11px;color:#797979;text-decoration:none}th.actions-column{background-color:#03a9f4}tr:nth-of-type(odd) .actions-column{background-color:#f9f9f9!important}tr:nth-of-type(2n) .actions-column{background-color:#fff!important}.table-input{width:100%;padding:.375rem .75rem;border:1px solid #ced4da;border-radius:.25rem}.editInput{background-color:#fff;border-bottom:1px solid red!important;border-color:#80bdff}.search-container{margin-bottom:1rem}.search-container .input-group{max-width:300px;position:relative}.search-input{padding-right:35px;border-radius:4px!important}.search-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);z-index:4;color:#666;pointer-events:none}.pagination-container{padding:.5rem 1rem;background-color:#f8f9fa;border-top:1px solid #dee2e6}.pagination-container .d-flex{justify-content:flex-end!important}.items-per-page{margin-right:20px;font-size:12px}.items-per-page select{width:60px;margin-left:8px}.page-info{margin-right:15px;font-size:12px;color:#6c757d}.pagination{margin:0}.page-link{padding:.25rem .5rem;font-size:12px}.page-item.disabled .page-link{cursor:not-allowed}.addRowClass{float:right;margin-top:1rem;margin-right:15%;text-align:center;cursor:pointer}.circle-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background-color:#007bff;color:#fff;cursor:pointer;font-size:24px;line-height:1;box-shadow:0 2px 4px #0003}.circle-button:hover{background-color:#0056b3}.small-icon{width:16px;height:16px;margin-right:4px}.action{min-width:80px;text-align:center;cursor:pointer}.action:hover{color:red}\n"] }]
|
|
337
|
+
args: [{ selector: 'app-custom-table', template: "<!-- RS 03FEB2025 -->\n<!-- Search Bar -->\n<!-- Search, Revert & Save in Same Line -->\n<div class=\"d-flex align-items-center justify-content-between mb-3\">\n <!-- Search Bar -->\n <div class=\"search-container me-auto\">\n <div class=\"input-group\">\n <input \n type=\"text\" \n class=\"form-control search-input\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"search()\"\n placeholder=\"Search...\"\n >\n <div class=\"search-icon\">\n <!-- RS 03FEB2025 -->\n <!-- Search icon for user input -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\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 </div>\n </div>\n </div>\n\n <!-- Buttons -->\n <div>\n <!-- RS 03FEB2025 --><!-- Cancel button (visible only when changes are unsaved) -->\n <button \n class=\"btn btn-secondary me-2\" \n *ngIf=\"hasUnsavedChanges\" \n (click)=\"revertChanges()\"\n >\n Cancel\n </button>\n <!-- Save button (disabled if no unsaved changes) --><!-- RS 03FEB2025 -->\n <button \n class=\"btn btn-primary\" \n [disabled]=\"!hasUnsavedChanges\"\n (click)=\"saveTable()\"\n >\n Save Table\n </button>\n </div>\n</div>\n<!-- Table Container -->\n<div class=\"table-container\">\n <table class=\"table table-striped table-bordered\">\n <thead>\n <!-- HA 28DEC23 changed table header values and changed table size logic to evenly visible -->\n <!-- <th><input type=\"checkbox\" (change)=\"selectAll($event.target.checked)\"></th> -->\n <tr>\n <th *ngFor=\"let header of tableHeader\" [style.width]=\"header.width || 'auto'\">\n {{ header.label }}\n </th>\n <!-- Actions column (only if showActions is true) --><!-- RS 03FEB2025 -->\n <th *ngIf=\"showActions\" style=\"width: 140px\" class=\"actions-columns\">Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of paginatedData; let i = index\">\n <td *ngFor=\"let header of tableHeader\">\n <!-- Image with text input -->\n <ng-container *ngIf=\"header.fldType === 'imagetext'\">\n <div class=\"d-flex align-items-center\">\n <img [src]=\"item.imageSrc\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px; margin-right: 5px;\">\n <input type=\"text\" \n [(ngModel)]=\"item[header.fieldName]\" \n (ngModelChange)=\"updateLabel(i, header.fieldName, item[header.fieldName])\" \n class=\"she-line-input table-input\">\n </div>\n </ng-container>\n\n <!-- Image only -->\n <ng-container *ngIf=\"header.fldType === 'image'\">\n <img [src]=\"item[header.fieldName]\" [alt]=\"item.altText\" style=\"width: 35px; height: 32px;\">\n </ng-container>\n <!--VD 23Aug24 handle readOnly -->\n <!-- Text input -->\n <ng-container *ngIf=\"header.fldType === 'Text'\">\n <input type=\"text\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n <!--VD 23Aug24 handle Number Type -->\n <!-- Number input -->\n <!-- VD 26Jun24 - pipe change to handle multiple objects-->\n <ng-container *ngIf=\"header.fldType === 'Number'\">\n <input type=\"number\" \n [readonly]=\"header.readOnly\" \n [disabled]=\"!item.edit\" \n [ngClass]=\"{'editInput': item.edit && !header.readOnly}\"\n [ngModel]=\"'' | getValue: item : header.apiName\" \n (ngModelChange)=\"updateLabel(i, header.apiName,$event)\" \n class=\"she-line-input table-input\">\n </ng-container>\n\n <!-- Radio input -->\n <ng-container *ngIf=\"header.fldType === 'radio'\">\n <input type=\"radio\" \n [name]=\"item.name\" \n [checked]=\"item.value == header.fieldName\" \n (click)=\"updateRadio(item, header.fieldName)\">\n </ng-container>\n </td>\n <!-- Actions column --><!-- RS 03FEB2025 -->\n <td *ngIf=\"showActions\" class=\"actions-column\">\n <div class=\"d-flex justify-content-around\">\n <button class=\"btn btn-link p-0\" (click)=\"editRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#03A9F4\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M12 20h9\" />\n <path d=\"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z\" />\n <path d=\"m15 5 3 3\" />\n </svg>\n Edit\n </button>\n <button class=\"btn btn-link p-0\" (click)=\"deleteRow(i)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F44336\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M3 6h18\" />\n <path d=\"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" />\n <path d=\"m10 11 1 6\" />\n <path d=\"m14 11-1 6\" />\n <path d=\"M4 6l1 14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2l1-14\" />\n </svg>\n \n Delete\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<!-- Pagination --><!-- RS 03FEB2025 -->\n<div *ngIf=\"showPagination\" class=\"pagination-container\">\n <div class=\"d-flex justify-content-end align-items-center\">\n <div class=\"items-per-page\">\n <span>Items per page:</span>\n <select [(ngModel)]=\"itemsPerPage\" (change)=\"updatePagination()\" class=\"form-select form-select-sm\">\n <option value=\"5\">5</option>\n <option value=\"10\">10</option>\n <option value=\"20\">20</option>\n <option value=\"50\">50</option>\n </select>\n </div>\n <div class=\"page-info ms-3 me-3\">\n {{((currentPage - 1) * itemsPerPage + 1)}} - {{Math.min(currentPage * itemsPerPage, totalItems)}} of {{totalItems}}\n </div>\n <nav aria-label=\"Table pagination\">\n <!-- First page --><!-- RS 03FEB2025 -->\n <ul class=\"pagination mb-0\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(1)\">\u00AB</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"setPage(currentPage - 1)\">\u2039</a>\n </li>\n <!-- Dynamic pagination --><!-- RS 03FEB2025 -->\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"setPage(page)\">{{page}}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(currentPage + 1)\">\u203A</a>\n </li>\n <!-- Last page -->\n <li class=\"page-item\" [class.disabled]=\"currentPage === pages.length\">\n <a class=\"page-link\" (click)=\"setPage(pages.length)\">\u00BB</a>\n </li>\n </ul>\n </nav>\n </div>\n</div>\n<!-- RS 03FEB2025 -->\n<!-- Add Row Button -->\n<div *ngIf=\"showAddRow\" (click)=\"addRow()\" class=\"addRowClass\">\n <div class=\"circle-button\">+</div>\n</div>\n", styles: [".table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent;border-collapse:collapse}.table-container{max-height:400px;overflow-y:auto;overflow-x:auto;position:relative;margin-bottom:1rem}.table th,.table td{padding:3px 5px;line-height:1.2;vertical-align:middle;border:1px solid #dee2e6;white-space:nowrap}.table-bordered{border:1px solid #ddd}.table-striped tbody tr:nth-of-type(odd){background-color:#f9f9f9!important}thead{background-color:#03a9f4;position:sticky;top:0;z-index:unset!important}thead th{color:#fff;font-size:14px;text-align:center;vertical-align:bottom;border-bottom:2px solid #dee2e6;padding:12px!important}thead .permission,.permission_yes,.permission_no,.permission_na{text-align:center}th{text-align:left}tbody{color:#797979}tbody td{font-size:12px}.none-border th{border:none}.actions-column{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#fff}.actions-columns{width:140px;white-space:nowrap;position:sticky;right:0;z-index:10;background-color:#03a9f4}.actions-column .btn-link{font-size:11px;color:#797979;text-decoration:none}th.actions-column{background-color:#03a9f4}tr:nth-of-type(odd) .actions-column{background-color:#f9f9f9!important}tr:nth-of-type(2n) .actions-column{background-color:#fff!important}.table-input{width:100%;padding:.375rem .75rem;border:1px solid #ced4da;border-radius:.25rem}.editInput{background-color:#fff;border-bottom:1px solid red!important;border-color:#80bdff}.search-container{margin-bottom:1rem}.search-container .input-group{max-width:300px;position:relative}.search-input{padding-right:35px;border-radius:4px!important}.search-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#666;pointer-events:none}.pagination-container{padding:.5rem 1rem;background-color:#f8f9fa;border-top:1px solid #dee2e6}.pagination-container .d-flex{justify-content:flex-end!important}.items-per-page{margin-right:20px;font-size:12px}.items-per-page select{width:60px;margin-left:8px}.page-info{margin-right:15px;font-size:12px;color:#6c757d}.pagination{margin:0}.page-link{padding:.25rem .5rem;font-size:12px}.page-item.disabled .page-link{cursor:not-allowed}.addRowClass{float:right;margin-top:1rem;margin-right:15%;text-align:center;cursor:pointer}.circle-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background-color:#007bff;color:#fff;cursor:pointer;font-size:24px;line-height:1;box-shadow:0 2px 4px #0003}.circle-button:hover{background-color:#0056b3}.small-icon{width:16px;height:16px;margin-right:4px}.action{min-width:80px;text-align:center;cursor:pointer}.action:hover{color:red}\n"] }]
|
|
338
338
|
}], ctorParameters: () => [{ type: i1.ChangeService }, { type: i2.I18nService }, { type: i3.SalesforceService }, { type: i4.DataService }], propDecorators: { question: [{
|
|
339
339
|
type: Input
|
|
340
340
|
}], valueChange: [{
|