axidio-styleguide-library1-v2 0.2.10 → 0.2.12
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/ax-table/ax-table.component.mjs +104 -171
- package/esm2022/lib/guage-chart/guage-chart.component.mjs +296 -192
- package/fesm2022/axidio-styleguide-library1-v2.mjs +399 -362
- package/fesm2022/axidio-styleguide-library1-v2.mjs.map +1 -1
- package/lib/ax-table/ax-table.component.d.ts +26 -68
- package/lib/guage-chart/guage-chart.component.d.ts +11 -40
- package/package.json +1 -1
|
@@ -3019,233 +3019,337 @@ class GuageChartComponent extends ComponentUniqueId {
|
|
|
3019
3019
|
pointerTailLength: 5,
|
|
3020
3020
|
pointerHeadLengthPercent: 0.7,
|
|
3021
3021
|
labelInset: 10,
|
|
3022
|
+
legendJustified: false,
|
|
3022
3023
|
backgroundColor: '#FFFFFF',
|
|
3023
|
-
|
|
3024
|
+
isDrilldownChart: undefined,
|
|
3025
|
+
ringScaleFactor: 0,
|
|
3026
|
+
textsAtCenterScaleFactor: 0,
|
|
3024
3027
|
currentValueWidthScaleFactor: 60,
|
|
3025
3028
|
currentValueHeightScaleFactor: 30,
|
|
3026
|
-
|
|
3029
|
+
pointerColor: '#686868',
|
|
3030
|
+
isToggleVisible: undefined,
|
|
3031
|
+
selectedKpiTooltop: undefined,
|
|
3032
|
+
isValueLableAdjust: undefined,
|
|
3033
|
+
isTitleHidden: undefined,
|
|
3027
3034
|
headerMenuOptions: HeaderConfigHelper.headerConfig.headerMenuOptions,
|
|
3028
3035
|
};
|
|
3029
3036
|
}
|
|
3030
|
-
// Computed property to check if alert menu is enabled
|
|
3031
3037
|
get isAlertEnabled() {
|
|
3032
|
-
return this.chartConfiguration?.headerMenuOptions?.some(
|
|
3033
|
-
}
|
|
3034
|
-
ngOnInit() {
|
|
3035
|
-
this.mergeConfigurations();
|
|
3038
|
+
return this.chartConfiguration?.headerMenuOptions?.some(option => option.id === 'editAlert');
|
|
3036
3039
|
}
|
|
3037
|
-
ngOnChanges(
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3040
|
+
ngOnChanges() {
|
|
3041
|
+
let self = this;
|
|
3042
|
+
d3.select('#' + self.uniqueId).remove();
|
|
3043
|
+
this.initializeLineChart();
|
|
3041
3044
|
}
|
|
3042
3045
|
onResized(event) {
|
|
3043
|
-
this
|
|
3046
|
+
let self = this;
|
|
3047
|
+
d3.select('#' + self.uniqueId).remove();
|
|
3048
|
+
this.initializeLineChart();
|
|
3044
3049
|
}
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
this.
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3050
|
+
ngOnInit() { }
|
|
3051
|
+
initializeLineChart() {
|
|
3052
|
+
var self = this;
|
|
3053
|
+
let data = [];
|
|
3054
|
+
let metaData = null;
|
|
3055
|
+
let colorMaps = [];
|
|
3056
|
+
let angleValue = [];
|
|
3057
|
+
let data_ready = [];
|
|
3058
|
+
let labelArray = [];
|
|
3059
|
+
let colorType = null;
|
|
3060
|
+
let isria = this.customChartConfiguration.isRia;
|
|
3061
|
+
for (var i in this.defaultConfiguration) {
|
|
3062
|
+
this.chartConfiguration[i] = ChartHelper.getValueByConfigurationType(i, this.defaultConfiguration, this.customChartConfiguration);
|
|
3063
|
+
}
|
|
3064
|
+
data = this.chartData.data;
|
|
3065
|
+
metaData = this.chartData.metaData;
|
|
3066
|
+
colorType = metaData.colorType;
|
|
3067
|
+
if (colorType == 'low') {
|
|
3068
|
+
colorMaps = this.chartConfiguration.low_colorMap;
|
|
3069
|
+
}
|
|
3070
|
+
else {
|
|
3071
|
+
colorMaps = this.chartConfiguration.high_colorMap;
|
|
3072
|
+
}
|
|
3073
|
+
if (metaData.dataType) {
|
|
3074
|
+
this.dataType = metaData.dataType;
|
|
3075
|
+
if (this.dataType == 'USD') {
|
|
3076
|
+
this.datatype_status = true;
|
|
3077
|
+
this.dataType = '$ ';
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
data.map(function (dataUnit, i) {
|
|
3081
|
+
if (i < data.length - 1) {
|
|
3082
|
+
let diff = data[i + 1] - data[i];
|
|
3083
|
+
data_ready.push(diff);
|
|
3084
|
+
}
|
|
3078
3085
|
});
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
? this.chartConfiguration.low_colorMap
|
|
3091
|
-
: this.chartConfiguration.high_colorMap;
|
|
3092
|
-
}
|
|
3093
|
-
/** Compute difference between consecutive data points */
|
|
3094
|
-
computeDataDiffs(data) {
|
|
3095
|
-
return data.slice(0, -1).map((val, i) => data[i + 1] - val);
|
|
3096
|
-
}
|
|
3097
|
-
/** Convert data differences into cumulative angles */
|
|
3098
|
-
computeAngles(dataDiffs) {
|
|
3099
|
-
const total = dataDiffs.reduce((sum, val) => sum + val, 0);
|
|
3100
|
-
return dataDiffs.map((unit, i, arr) => i === 0 ? (unit / total) * 180 : arr.slice(0, i + 1).reduce((sum, x) => sum + (x / total) * 180, 0));
|
|
3101
|
-
}
|
|
3102
|
-
/** D3 utility methods */
|
|
3103
|
-
deg2rad(deg) {
|
|
3104
|
-
return (deg * Math.PI) / 180;
|
|
3105
|
-
}
|
|
3106
|
-
getChartWidth() {
|
|
3107
|
-
const container = d3.select(this.chartContainer.nativeElement);
|
|
3108
|
-
return parseInt(container.style('width')) - this.chartConfiguration.margin.left - this.chartConfiguration.margin.right;
|
|
3109
|
-
}
|
|
3110
|
-
getChartHeight() {
|
|
3111
|
-
const wrapper = d3.select(this.gaugeWrapper.nativeElement);
|
|
3112
|
-
return (parseInt(wrapper.style('height')) -
|
|
3113
|
-
this.chartConfiguration.margin.top -
|
|
3114
|
-
this.chartConfiguration.margin.bottom -
|
|
3115
|
-
56);
|
|
3116
|
-
}
|
|
3117
|
-
createSvgContainer(width, height) {
|
|
3118
|
-
return d3
|
|
3119
|
-
.select(this.chartContainer.nativeElement)
|
|
3086
|
+
var chartContainer = d3.select(this.containerElt.nativeElement);
|
|
3087
|
+
var guagecontainer = d3.select(this.guagecontainerElt.nativeElement);
|
|
3088
|
+
var margin = this.chartConfiguration.margin;
|
|
3089
|
+
var width = parseInt(chartContainer.style('width')) - margin.left - margin.right;
|
|
3090
|
+
var height = parseInt(guagecontainer.style('height')) -
|
|
3091
|
+
margin.top -
|
|
3092
|
+
margin.bottom -
|
|
3093
|
+
56; //chart header height
|
|
3094
|
+
if (this.chartConfiguration.isHeaderVisible != undefined)
|
|
3095
|
+
this.isHeaderVisible = this.chartConfiguration.isHeaderVisible;
|
|
3096
|
+
var svg = chartContainer
|
|
3120
3097
|
.append('svg')
|
|
3121
|
-
.attr('id',
|
|
3122
|
-
.attr('width', width +
|
|
3123
|
-
.attr('height', height +
|
|
3098
|
+
.attr('id', self.uniqueId)
|
|
3099
|
+
.attr('width', width + margin.left + margin.right)
|
|
3100
|
+
.attr('height', height + margin.top + margin.bottom)
|
|
3124
3101
|
.call(ChartHelper.responsivefy)
|
|
3125
3102
|
.append('g');
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
cfg.currentValueWidthScaleFactor += 40;
|
|
3131
|
-
cfg.currentValueHeightScaleFactor += 20;
|
|
3132
|
-
}
|
|
3133
|
-
else if (window.innerWidth > 1400) {
|
|
3134
|
-
cfg.currentValueHeightScaleFactor += 15;
|
|
3135
|
-
cfg.currentValueWidthScaleFactor *= 2;
|
|
3103
|
+
var radius = Math.min(width, height) / 2;
|
|
3104
|
+
if (this.chartConfiguration.isDrilldownChart) {
|
|
3105
|
+
this.chartConfiguration.currentValueWidthScaleFactor += 40;
|
|
3106
|
+
this.chartConfiguration.currentValueHeightScaleFactor += 20;
|
|
3136
3107
|
}
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3108
|
+
else {
|
|
3109
|
+
if (window.innerWidth > 1400) {
|
|
3110
|
+
this.chartConfiguration.currentValueHeightScaleFactor += 15;
|
|
3111
|
+
this.chartConfiguration.currentValueWidthScaleFactor *= 2;
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
let topTextPosition = radius / 2 - 10;
|
|
3115
|
+
let midTextPosition = topTextPosition + this.chartConfiguration.currentValueHeightScaleFactor;
|
|
3116
|
+
let bottomTextPosition = midTextPosition + this.chartConfiguration.currentValueHeightScaleFactor;
|
|
3117
|
+
var data_length = data.length;
|
|
3118
|
+
function deg2rad(deg) {
|
|
3119
|
+
return (deg * Math.PI) / 180;
|
|
3120
|
+
}
|
|
3121
|
+
let tempArray = [];
|
|
3122
|
+
let total = 0;
|
|
3123
|
+
data_ready.map(function (unit) {
|
|
3124
|
+
total += unit;
|
|
3125
|
+
});
|
|
3126
|
+
data_ready.map(function (unit, i) {
|
|
3127
|
+
var angle = (unit / total) * 180;
|
|
3128
|
+
if (i === 0) {
|
|
3129
|
+
tempArray.push(angle);
|
|
3130
|
+
}
|
|
3131
|
+
else {
|
|
3132
|
+
let currentAngle = tempArray[i - 1] + angle;
|
|
3133
|
+
tempArray.push(currentAngle);
|
|
3134
|
+
}
|
|
3135
|
+
});
|
|
3136
|
+
angleValue = tempArray;
|
|
3137
|
+
var arc = d3
|
|
3138
|
+
.arc()
|
|
3139
|
+
.innerRadius(radius -
|
|
3140
|
+
self.chartConfiguration.ringWidth -
|
|
3141
|
+
self.chartConfiguration.ringInset)
|
|
3143
3142
|
.outerRadius(radius)
|
|
3144
|
-
.startAngle((
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3143
|
+
.startAngle(function (d, i) {
|
|
3144
|
+
var ratio;
|
|
3145
|
+
if (i === 0) {
|
|
3146
|
+
ratio = self.chartConfiguration.minAngle;
|
|
3147
|
+
}
|
|
3148
|
+
else {
|
|
3149
|
+
ratio = self.chartConfiguration.minAngle + angleValue[i - 1];
|
|
3150
|
+
}
|
|
3151
|
+
return deg2rad(ratio);
|
|
3152
|
+
})
|
|
3153
|
+
.endAngle(function (d, i) {
|
|
3154
|
+
var ratio;
|
|
3155
|
+
if (i === data_ready.length - 1) {
|
|
3156
|
+
ratio = self.chartConfiguration.maxAngle;
|
|
3157
|
+
}
|
|
3158
|
+
else {
|
|
3159
|
+
ratio = self.chartConfiguration.minAngle + angleValue[i];
|
|
3160
|
+
}
|
|
3161
|
+
return deg2rad(ratio);
|
|
3162
|
+
});
|
|
3163
|
+
function centerTranslation() {
|
|
3164
|
+
return 'translate(' + radius + ',' + radius + ')';
|
|
3165
|
+
}
|
|
3166
|
+
var centerTx = centerTranslation();
|
|
3167
|
+
var tickData = d3
|
|
3168
|
+
.range(self.chartConfiguration.majorTicks)
|
|
3169
|
+
.map(function (i) {
|
|
3170
|
+
return 1 / self.chartConfiguration.majorTicks;
|
|
3171
|
+
});
|
|
3172
|
+
var arcs = svg.append('g').attr('class', 'arc').attr('transform', centerTx);
|
|
3173
|
+
arcs
|
|
3150
3174
|
.selectAll('path')
|
|
3151
|
-
.data(
|
|
3175
|
+
.data(data_ready)
|
|
3152
3176
|
.enter()
|
|
3153
3177
|
.append('path')
|
|
3154
|
-
.
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
.on('click', (event, d) => {
|
|
3158
|
-
if (metaData.hasDrillDown && metaData.currentValue > 0) {
|
|
3159
|
-
this.handleClick(`${data[0]} - ${data[data.length - 1]}`);
|
|
3178
|
+
.on('click', function (d) {
|
|
3179
|
+
if (!metaData.hasDrillDown || metaData.currentValue == 0) {
|
|
3180
|
+
return;
|
|
3160
3181
|
}
|
|
3182
|
+
let range = getRange(d);
|
|
3183
|
+
self.handleClick(range);
|
|
3184
|
+
})
|
|
3185
|
+
.attr('fill', function (d, i) {
|
|
3186
|
+
return colorMaps[i];
|
|
3187
|
+
})
|
|
3188
|
+
.attr('id', function (d, i) {
|
|
3189
|
+
return colorMaps[i];
|
|
3190
|
+
})
|
|
3191
|
+
.attr('d', arc)
|
|
3192
|
+
// .style('cursor', 'pointer');
|
|
3193
|
+
.style('cursor', function (d) {
|
|
3194
|
+
if (metaData.currentValue > 0 && metaData.hasDrillDown && !isria)
|
|
3195
|
+
return 'pointer';
|
|
3196
|
+
else
|
|
3197
|
+
return 'default';
|
|
3161
3198
|
});
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
[
|
|
3169
|
-
[0, -
|
|
3170
|
-
[-(
|
|
3171
|
-
[0,
|
|
3172
|
-
[
|
|
3199
|
+
let getRange = function (d) {
|
|
3200
|
+
let index = data_ready.indexOf(d);
|
|
3201
|
+
return data[0] + ' and ' + data[data.length - 1];
|
|
3202
|
+
};
|
|
3203
|
+
let pointerHeadLength = Math.round(radius * self.chartConfiguration.pointerHeadLengthPercent);
|
|
3204
|
+
var lineData = [
|
|
3205
|
+
[self.chartConfiguration.pointerWidth / 2, 0],
|
|
3206
|
+
[0, -pointerHeadLength],
|
|
3207
|
+
[-(self.chartConfiguration.pointerWidth / 2), 0],
|
|
3208
|
+
[0, self.chartConfiguration.pointerTailLength],
|
|
3209
|
+
[self.chartConfiguration.pointerWidth / 2, 0],
|
|
3173
3210
|
];
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3211
|
+
var pointerLine = d3.line();
|
|
3212
|
+
var pg = svg
|
|
3213
|
+
.append('g')
|
|
3214
|
+
.data([lineData])
|
|
3215
|
+
.attr('class', 'pointer')
|
|
3216
|
+
.attr('transform', centerTx);
|
|
3217
|
+
var pointerValue = metaData.currentValue - data[0];
|
|
3218
|
+
var range = data[data_length - 1] - data[0];
|
|
3219
|
+
var pointerAngle = self.chartConfiguration.minAngle + (pointerValue / range) * 180;
|
|
3179
3220
|
pg.append('path')
|
|
3180
|
-
.attr('d', pointerLine
|
|
3181
|
-
.attr('fill',
|
|
3182
|
-
.attr('transform',
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
let
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3221
|
+
.attr('d', pointerLine)
|
|
3222
|
+
.attr('fill', self.chartConfiguration.pointerColor)
|
|
3223
|
+
.attr('transform', 'rotate(' +
|
|
3224
|
+
pointerAngle +
|
|
3225
|
+
') translate(0,' +
|
|
3226
|
+
(-radius + self.chartConfiguration.ringWidth + pointerHeadLength) +
|
|
3227
|
+
')');
|
|
3228
|
+
var lg = svg.append('g').attr('class', 'label').attr('transform', centerTx);
|
|
3229
|
+
let labelArrayTemp = [{ name: data[0], value: 0 }];
|
|
3230
|
+
let count = 0;
|
|
3231
|
+
data_ready.map(function (dataUnit, i) {
|
|
3232
|
+
count += dataUnit;
|
|
3233
|
+
let temp = { name: data[i + 1], value: count };
|
|
3234
|
+
labelArrayTemp.push(temp);
|
|
3193
3235
|
});
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
.data(
|
|
3236
|
+
labelArray = labelArrayTemp;
|
|
3237
|
+
lg.selectAll('.bubble')
|
|
3238
|
+
.data(labelArray)
|
|
3197
3239
|
.enter()
|
|
3240
|
+
.append('g')
|
|
3241
|
+
.attr('transform', function (d) {
|
|
3242
|
+
var newAngle = self.chartConfiguration.minAngle + (d.value / range) * 180;
|
|
3243
|
+
return ('rotate(' +
|
|
3244
|
+
newAngle +
|
|
3245
|
+
') translate(0,' +
|
|
3246
|
+
(self.chartConfiguration.labelInset - radius - 20) +
|
|
3247
|
+
')');
|
|
3248
|
+
})
|
|
3249
|
+
.append('g')
|
|
3250
|
+
.attr('transform', function (d, i) {
|
|
3251
|
+
var newAngle = self.chartConfiguration.minAngle + (d.value / range) * 180;
|
|
3252
|
+
if (i == 0 && self.chartConfiguration.isValueLableAdjust) {
|
|
3253
|
+
return 'rotate(' + (0 - newAngle) + ') translate(-27,0)';
|
|
3254
|
+
}
|
|
3255
|
+
if (i == labelArray.length - 1 &&
|
|
3256
|
+
self.chartConfiguration.isValueLableAdjust) {
|
|
3257
|
+
return 'rotate(' + (0 - newAngle) + ') translate(-15,0)';
|
|
3258
|
+
}
|
|
3259
|
+
return 'rotate(' + (0 - newAngle) + ') translate(-17,0)';
|
|
3260
|
+
})
|
|
3198
3261
|
.append('text')
|
|
3199
|
-
.attr('
|
|
3200
|
-
|
|
3201
|
-
|
|
3262
|
+
.attr('style', function (d) {
|
|
3263
|
+
if (window.innerWidth < 1400)
|
|
3264
|
+
return 'font-size: ' + '12px' + '; font-weight:' + '600;';
|
|
3265
|
+
else
|
|
3266
|
+
return 'font-size: ' + '14px' + '; font-weight:' + '600;';
|
|
3202
3267
|
})
|
|
3203
3268
|
.attr('fill', 'var(--chart-text-color)')
|
|
3204
|
-
.
|
|
3205
|
-
.
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
.attr('width',
|
|
3218
|
-
.attr('height',
|
|
3269
|
+
.text(function (d) {
|
|
3270
|
+
if (metaData.dataType) {
|
|
3271
|
+
return d.name + metaData.dataType;
|
|
3272
|
+
}
|
|
3273
|
+
return d.name;
|
|
3274
|
+
});
|
|
3275
|
+
svg
|
|
3276
|
+
.append('foreignObject')
|
|
3277
|
+
.attr('transform', 'translate(' +
|
|
3278
|
+
(radius - this.chartConfiguration.currentValueWidthScaleFactor / 2) +
|
|
3279
|
+
',' +
|
|
3280
|
+
topTextPosition +
|
|
3281
|
+
')')
|
|
3282
|
+
.attr('width', this.chartConfiguration.currentValueWidthScaleFactor + 8)
|
|
3283
|
+
.attr('height', this.chartConfiguration.currentValueHeightScaleFactor)
|
|
3219
3284
|
.append('xhtml:div')
|
|
3220
3285
|
.attr('class', 'value-display')
|
|
3221
|
-
.
|
|
3222
|
-
|
|
3286
|
+
.style('height', this.chartConfiguration.currentValueHeightScaleFactor + 10 + 'px')
|
|
3287
|
+
.style('font-size', function () {
|
|
3288
|
+
if (window.innerWidth > 1500) {
|
|
3289
|
+
self.chartConfiguration.currentValueHeightScaleFactor - 25 + 'px';
|
|
3290
|
+
}
|
|
3291
|
+
else {
|
|
3292
|
+
self.chartConfiguration.currentValueHeightScaleFactor - 15 + 'px';
|
|
3293
|
+
}
|
|
3294
|
+
})
|
|
3295
|
+
.html(metaData.currentValue + metaData.dataType);
|
|
3223
3296
|
if (metaData.status) {
|
|
3224
|
-
|
|
3225
|
-
svg
|
|
3226
|
-
.
|
|
3297
|
+
let widthTemp = metaData.status.length > 4 ? 210 : 120;
|
|
3298
|
+
svg
|
|
3299
|
+
.append('foreignObject')
|
|
3300
|
+
.attr('transform', 'translate(' + (radius - widthTemp / 2) + ',' + midTextPosition + ')')
|
|
3227
3301
|
.attr('width', widthTemp)
|
|
3302
|
+
.attr('height', this.chartConfiguration.currentValueHeightScaleFactor + 10)
|
|
3228
3303
|
.append('xhtml:div')
|
|
3229
3304
|
.attr('class', 'status-display')
|
|
3305
|
+
.style('font-size', this.chartConfiguration.currentValueHeightScaleFactor - 25 + 'px')
|
|
3230
3306
|
.html(metaData.status);
|
|
3231
3307
|
}
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3308
|
+
svg
|
|
3309
|
+
.append('foreignObject')
|
|
3310
|
+
.attr('transform', 'translate(' + (radius - 105) + ',' + bottomTextPosition + ')')
|
|
3311
|
+
.attr('width', 210)
|
|
3312
|
+
.attr('height', this.chartConfiguration.currentValueHeightScaleFactor)
|
|
3313
|
+
.append('xhtml:div')
|
|
3314
|
+
.attr('class', 'daterange-display')
|
|
3315
|
+
.style('font-size', function () {
|
|
3316
|
+
if (self.chartConfiguration.isDrilldownChart) {
|
|
3317
|
+
{
|
|
3318
|
+
if (window.innerWidth < 1400)
|
|
3319
|
+
return '14px';
|
|
3320
|
+
else
|
|
3321
|
+
return '18px';
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
else {
|
|
3325
|
+
if (window.innerWidth < 1400)
|
|
3326
|
+
return '14px';
|
|
3327
|
+
else
|
|
3328
|
+
return '18px';
|
|
3329
|
+
}
|
|
3330
|
+
})
|
|
3331
|
+
.html(function () {
|
|
3332
|
+
var desiredSize;
|
|
3333
|
+
if (window.innerWidth < 1400)
|
|
3334
|
+
desiredSize = '14px';
|
|
3335
|
+
else
|
|
3336
|
+
desiredSize = '18px';
|
|
3337
|
+
if (metaData.dateRange)
|
|
3338
|
+
return ('<span class="marginright-3"><i class="fa fa-calendar"></i></span><span> ' +
|
|
3339
|
+
metaData.dateRange +
|
|
3340
|
+
'</span>');
|
|
3341
|
+
else
|
|
3342
|
+
return '';
|
|
3343
|
+
});
|
|
3344
|
+
var containerMidWidth = parseInt(chartContainer.style('width')) / 2;
|
|
3345
|
+
var nodeHalfWidth = svg.node().getBoundingClientRect().width / 2;
|
|
3346
|
+
var updatedStartingPoint = containerMidWidth - nodeHalfWidth;
|
|
3347
|
+
svg.attr('transform', 'translate(' +
|
|
3348
|
+
(updatedStartingPoint + margin.left) +
|
|
3349
|
+
',' +
|
|
3350
|
+
margin.top +
|
|
3351
|
+
')');
|
|
3247
3352
|
}
|
|
3248
|
-
/** Event Emitters */
|
|
3249
3353
|
handleClick(d) {
|
|
3250
3354
|
this.clickEvent.emit(d);
|
|
3251
3355
|
}
|
|
@@ -3253,15 +3357,15 @@ class GuageChartComponent extends ComponentUniqueId {
|
|
|
3253
3357
|
this.headerMenuclickEvent.emit(id);
|
|
3254
3358
|
}
|
|
3255
3359
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GuageChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3256
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GuageChartComponent, selector: "lib-guage-chart", inputs: { chartData: "chartData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent", headerMenuclickEvent: "headerMenuclickEvent" }, viewQueries: [{ propertyName: "chartContainer", first: true, predicate: ["guagechartcontainer"], descendants: true, static: true }, { propertyName: "gaugeWrapper", first: true, predicate: ["guagecontainer"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #guagecontainer class=\"lib-chart-wrapper\" style=\"background-color: var(--card-bg);\"\r\n (resized)=\"onResized($event)\">\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2 [chartData]=\"chartData\" [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"></lib-chart-header-v2>\r\n </div>\r\n <lib-chart-header-v1 [title]=\"chartData.metaData.title\" [hasDrillDown]=\"chartData.metaData.hasDrillDown\"\r\n [isEditEnabled]=\"chartData.metaData.isEditEnabled\" [isria]=\"customChartConfiguration.isRia\" [menuOptions]=\"chartConfiguration.headerMenuOptions\"\r\n [selectedKpiTooltop]=\"chartConfiguration.selectedKpiTooltop\" (menuOptionClickEvent)=\"handleHeaderMenuClick($event)\"\r\n [isAlertEnabled]=\"isAlertEnabled\" *ngIf=\"isHeaderVisible\"></lib-chart-header-v1>\r\n <div [style.height]=\"chartConfiguration.svgHeight\" id=\"guagechartcontainer\" #guagechartcontainer\r\n class=\"lib-chart-svg guagecontainer\"></div>\r\n</div>", styles: [".lib-guage-label-wrapper{width:100%;display:inline-block;text-align:center}.lib-guage-label-style{width:63%;display:inline-block;text-align:left}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.bc-gauge-chart{background-color:#000!important}.guagecontainer{margin-top:3%;height:53%}.gauge-currentvalue-value{font-weight:700;color:#000;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px}.guage-label-item{font-size:.85em;display:flex;flex-direction:column}.gauge-daterange{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:12px;letter-spacing:0px;color:#374068;opacity:1}.gauge-daterange-value{font-weight:700}.gauge-currentvalue{margin-bottom:5px}.value-display{color:var(--font-color);font-weight:700;border-radius:3px;display:flex;align-items:center;justify-content:center}.status-display{display:flex;align-items:center;justify-content:center}.calendar-icon{border:1px solid #000000;border-top:3px solid;height:10px;margin-right:5px}.calendar-icon>:first-child{visibility:hidden}.daterange-display{display:flex;align-items:center;justify-content:center;height:100%}.marginright-3{margin-right:3px}.hidden-text,.hidden{visibility:hidden}@media screen and (min-width: 1024px) and (min-height: 400px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}.switch1{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch1 input{opacity:0;width:0;height:0}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.marginLeft-40{margin-left:40px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}@media (min-height: 550px){.value-display{font-size:14px}}@media (min-height: 900px){.guagecontainer{margin-top:6%}.value-display{font-size:25px}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: ChartHeaderV1Component, selector: "lib-chart-header-v1", inputs: ["isAlertEnabled", "title", "menuOptions", "isEditEnabled", "isria", "hasDrillDown", "selectedKpiTooltop"], outputs: ["menuOptionClickEvent"] }, { kind: "component", type: ChartHeaderV2Component, selector: "lib-chart-header-v2", inputs: ["chartData", "chartConfiguration"], outputs: ["clickEvent", "zoomInZoomOutClick"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3360
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GuageChartComponent, selector: "lib-guage-chart", inputs: { chartData: "chartData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent", headerMenuclickEvent: "headerMenuclickEvent" }, viewQueries: [{ propertyName: "containerElt", first: true, predicate: ["guagechartcontainer"], descendants: true, static: true }, { propertyName: "guagecontainerElt", first: true, predicate: ["guagecontainer"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #guagecontainer class=\"lib-chart-wrapper\" style=\"background-color: var(--card-bg);\"\r\n (resized)=\"onResized($event)\">\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2 [chartData]=\"chartData\" [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"></lib-chart-header-v2>\r\n </div>\r\n <lib-chart-header-v1 [title]=\"chartData.metaData.title\" [hasDrillDown]=\"chartData.metaData.hasDrillDown\"\r\n [isEditEnabled]=\"chartData.metaData.isEditEnabled\" [isria]=\"customChartConfiguration.isRia\" [menuOptions]=\"chartConfiguration.headerMenuOptions\"\r\n [selectedKpiTooltop]=\"chartConfiguration.selectedKpiTooltop\" (menuOptionClickEvent)=\"handleHeaderMenuClick($event)\"\r\n [isAlertEnabled]=\"isAlertEnabled\" *ngIf=\"isHeaderVisible\"></lib-chart-header-v1>\r\n <div [style.height]=\"chartConfiguration.svgHeight\" id=\"guagechartcontainer\" #guagechartcontainer\r\n class=\"lib-chart-svg guagecontainer\"></div>\r\n</div>", styles: [".lib-guage-label-wrapper{width:100%;display:inline-block;text-align:center}.lib-guage-label-style{width:63%;display:inline-block;text-align:left}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.bc-gauge-chart{background-color:#000!important}.guagecontainer{margin-top:3%;height:53%}.gauge-currentvalue-value{font-weight:700;color:#000;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px}.guage-label-item{font-size:.85em;display:flex;flex-direction:column}.gauge-daterange{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:12px;letter-spacing:0px;color:#374068;opacity:1}.gauge-daterange-value{font-weight:700}.gauge-currentvalue{margin-bottom:5px}.value-display{color:var(--font-color);font-weight:700;border-radius:3px;display:flex;align-items:center;justify-content:center}.status-display{display:flex;align-items:center;justify-content:center}.calendar-icon{border:1px solid #000000;border-top:3px solid;height:10px;margin-right:5px}.calendar-icon>:first-child{visibility:hidden}.daterange-display{display:flex;align-items:center;justify-content:center;height:100%}.marginright-3{margin-right:3px}.hidden-text,.hidden{visibility:hidden}@media screen and (min-width: 1024px) and (min-height: 400px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}.switch1{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch1 input{opacity:0;width:0;height:0}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.marginLeft-40{margin-left:40px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}@media (min-height: 550px){.value-display{font-size:14px}}@media (min-height: 900px){.guagecontainer{margin-top:6%}.value-display{font-size:25px}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: ChartHeaderV1Component, selector: "lib-chart-header-v1", inputs: ["isAlertEnabled", "title", "menuOptions", "isEditEnabled", "isria", "hasDrillDown", "selectedKpiTooltop"], outputs: ["menuOptionClickEvent"] }, { kind: "component", type: ChartHeaderV2Component, selector: "lib-chart-header-v2", inputs: ["chartData", "chartConfiguration"], outputs: ["clickEvent", "zoomInZoomOutClick"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3257
3361
|
}
|
|
3258
3362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GuageChartComponent, decorators: [{
|
|
3259
3363
|
type: Component,
|
|
3260
3364
|
args: [{ selector: 'lib-guage-chart', encapsulation: ViewEncapsulation.None, template: "<div #guagecontainer class=\"lib-chart-wrapper\" style=\"background-color: var(--card-bg);\"\r\n (resized)=\"onResized($event)\">\r\n <div class=\"header-alt\" *ngIf=\"!isHeaderVisible\">\r\n <lib-chart-header-v2 [chartData]=\"chartData\" [chartConfiguration]=\"chartConfiguration\"\r\n (clickEvent)=\"handleClick($event)\"></lib-chart-header-v2>\r\n </div>\r\n <lib-chart-header-v1 [title]=\"chartData.metaData.title\" [hasDrillDown]=\"chartData.metaData.hasDrillDown\"\r\n [isEditEnabled]=\"chartData.metaData.isEditEnabled\" [isria]=\"customChartConfiguration.isRia\" [menuOptions]=\"chartConfiguration.headerMenuOptions\"\r\n [selectedKpiTooltop]=\"chartConfiguration.selectedKpiTooltop\" (menuOptionClickEvent)=\"handleHeaderMenuClick($event)\"\r\n [isAlertEnabled]=\"isAlertEnabled\" *ngIf=\"isHeaderVisible\"></lib-chart-header-v1>\r\n <div [style.height]=\"chartConfiguration.svgHeight\" id=\"guagechartcontainer\" #guagechartcontainer\r\n class=\"lib-chart-svg guagecontainer\"></div>\r\n</div>", styles: [".lib-guage-label-wrapper{width:100%;display:inline-block;text-align:center}.lib-guage-label-style{width:63%;display:inline-block;text-align:left}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.bc-gauge-chart{background-color:#000!important}.guagecontainer{margin-top:3%;height:53%}.gauge-currentvalue-value{font-weight:700;color:#000;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px}.guage-label-item{font-size:.85em;display:flex;flex-direction:column}.gauge-daterange{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:12px;letter-spacing:0px;color:#374068;opacity:1}.gauge-daterange-value{font-weight:700}.gauge-currentvalue{margin-bottom:5px}.value-display{color:var(--font-color);font-weight:700;border-radius:3px;display:flex;align-items:center;justify-content:center}.status-display{display:flex;align-items:center;justify-content:center}.calendar-icon{border:1px solid #000000;border-top:3px solid;height:10px;margin-right:5px}.calendar-icon>:first-child{visibility:hidden}.daterange-display{display:flex;align-items:center;justify-content:center;height:100%}.marginright-3{margin-right:3px}.hidden-text,.hidden{visibility:hidden}@media screen and (min-width: 1024px) and (min-height: 400px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1000px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1024px) and (min-height: 1500px){.guage-label-item{font-size:14px!important}.guage-item-text{font-size:16px!important}}@media screen and (min-width: 1366px) and (min-height: 400px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1000px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1366px) and (min-height: 1500px){.guage-label-item{font-size:16px!important}.guage-item-text{font-size:18px!important}}@media screen and (min-width: 1920px) and (min-height: 400px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1000px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 1920px) and (min-height: 1500px){.guage-label-item{font-size:18px!important}.guage-item-text{font-size:20px!important}}@media screen and (min-width: 2560px) and (min-height: 500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1000px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}@media screen and (min-width: 2560px) and (min-height: 1500px){.guage-label-item{font-size:20px!important}.guage-item-text{font-size:22px!important}}.switch1{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch1 input{opacity:0;width:0;height:0}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.marginLeft-40{margin-left:40px}.flex-inline{display:flex;justify-content:center;align-items:center;font-size:14px}@media (min-height: 550px){.value-display{font-size:14px}}@media (min-height: 900px){.guagecontainer{margin-top:6%}.value-display{font-size:25px}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"] }]
|
|
3261
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
3365
|
+
}], ctorParameters: () => [], propDecorators: { containerElt: [{
|
|
3262
3366
|
type: ViewChild,
|
|
3263
3367
|
args: ['guagechartcontainer', { static: true }]
|
|
3264
|
-
}],
|
|
3368
|
+
}], guagecontainerElt: [{
|
|
3265
3369
|
type: ViewChild,
|
|
3266
3370
|
args: ['guagecontainer', { static: true }]
|
|
3267
3371
|
}], chartData: [{
|
|
@@ -4567,249 +4671,182 @@ class AxTableComponent {
|
|
|
4567
4671
|
this.clickEvent = new EventEmitter();
|
|
4568
4672
|
this.isHeaderVisible = true;
|
|
4569
4673
|
this.isUserSort = false;
|
|
4570
|
-
this.
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
this.currentPage = 1;
|
|
4575
|
-
/**
|
|
4576
|
-
* Number of stores that can be displayed in each page
|
|
4577
|
-
*/
|
|
4674
|
+
this.tableHeadList = [];
|
|
4675
|
+
this.masterList = [];
|
|
4676
|
+
this.itemList = [];
|
|
4677
|
+
this.currentList = [];
|
|
4578
4678
|
this.pageSize = 10;
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
this.
|
|
4583
|
-
|
|
4584
|
-
* Selected column for sorting
|
|
4585
|
-
*/
|
|
4679
|
+
this.currentPage = 1;
|
|
4680
|
+
this.totalItems = 0;
|
|
4681
|
+
this.totalPages = 1;
|
|
4682
|
+
this.goToPageNumber = 1;
|
|
4683
|
+
this.pagesToShow = [];
|
|
4586
4684
|
this.sortColumn = '';
|
|
4587
|
-
|
|
4588
|
-
* Master store list for the selected state
|
|
4589
|
-
*/
|
|
4590
|
-
this.masterList = [];
|
|
4685
|
+
this.sortDirection = '';
|
|
4591
4686
|
this.chartConfiguration = {};
|
|
4592
4687
|
this.defaultConfiguration = {};
|
|
4593
|
-
this.totalPages = 1;
|
|
4594
|
-
this.goToPageNumber = 1; // Fixed: renamed from goToPageValue to match template
|
|
4595
|
-
// Add pagesToShow property for pagination display
|
|
4596
|
-
this.pagesToShow = [];
|
|
4597
4688
|
}
|
|
4598
4689
|
ngOnInit() {
|
|
4599
|
-
|
|
4690
|
+
if (!this.tableData || !this.tableData.data?.length)
|
|
4691
|
+
return;
|
|
4692
|
+
this.initializeTable();
|
|
4693
|
+
}
|
|
4694
|
+
initializeTable() {
|
|
4600
4695
|
this.tableHeadList = Object.keys(this.tableData.data[0]);
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
}
|
|
4604
|
-
this.masterList = [...self.tableData.data];
|
|
4696
|
+
this.setupChartConfiguration();
|
|
4697
|
+
this.masterList = [...this.tableData.data];
|
|
4605
4698
|
this.itemList = [...this.masterList];
|
|
4606
4699
|
this.totalItems = this.itemList.length;
|
|
4607
4700
|
this.calculateTotalPages();
|
|
4608
|
-
this.generatePagesToShow();
|
|
4609
|
-
|
|
4610
|
-
|
|
4701
|
+
this.generatePagesToShow();
|
|
4702
|
+
this.setHeaderVisibility();
|
|
4703
|
+
this.loadPage();
|
|
4704
|
+
}
|
|
4705
|
+
setupChartConfiguration() {
|
|
4706
|
+
for (const key in this.defaultConfiguration) {
|
|
4707
|
+
this.chartConfiguration[key] = ChartHelper.getValueByConfigurationType(key, this.defaultConfiguration, this.customChartConfiguration);
|
|
4611
4708
|
}
|
|
4612
|
-
|
|
4613
|
-
|
|
4709
|
+
}
|
|
4710
|
+
setHeaderVisibility() {
|
|
4711
|
+
const meta = this.tableData.metaData;
|
|
4712
|
+
if (meta.isHeaderVisible !== undefined) {
|
|
4713
|
+
this.isHeaderVisible = meta.isHeaderVisible;
|
|
4614
4714
|
}
|
|
4615
|
-
if (this.tableData.metaData.isHeaderVisible != undefined)
|
|
4616
|
-
this.isHeaderVisible = this.tableData.metaData.isHeaderVisible;
|
|
4617
4715
|
}
|
|
4618
4716
|
loadPage() {
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4717
|
+
if (this.tableData.metaData.isPaginationHidden) {
|
|
4718
|
+
this.currentList = this.itemList;
|
|
4719
|
+
return;
|
|
4720
|
+
}
|
|
4721
|
+
const start = (this.currentPage - 1) * this.pageSize;
|
|
4722
|
+
const end = start + this.pageSize;
|
|
4723
|
+
this.currentList = this.itemList.slice(start, end);
|
|
4622
4724
|
}
|
|
4623
4725
|
calculateTotalPages() {
|
|
4624
4726
|
this.totalPages = Math.ceil(this.totalItems / this.pageSize);
|
|
4625
4727
|
this.goToPageNumber = this.currentPage;
|
|
4626
4728
|
}
|
|
4627
|
-
preventNegative(event) {
|
|
4628
|
-
// Block characters: -, +, e (all invalid for page number)
|
|
4629
|
-
if (event.key === '-' || event.key === '+' || event.key.toLowerCase() === 'e') {
|
|
4630
|
-
event.preventDefault();
|
|
4631
|
-
}
|
|
4632
|
-
}
|
|
4633
|
-
// Generate array of page numbers to show in pagination
|
|
4634
4729
|
generatePagesToShow() {
|
|
4635
|
-
this.pagesToShow = [];
|
|
4636
4730
|
const maxPagesToShow = 5;
|
|
4637
|
-
let
|
|
4638
|
-
let
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
startPage = Math.max(1, endPage - maxPagesToShow + 1);
|
|
4642
|
-
}
|
|
4643
|
-
for (let i = startPage; i <= endPage; i++) {
|
|
4644
|
-
this.pagesToShow.push(i);
|
|
4731
|
+
let start = Math.max(1, this.currentPage - Math.floor(maxPagesToShow / 2));
|
|
4732
|
+
let end = Math.min(this.totalPages, start + maxPagesToShow - 1);
|
|
4733
|
+
if (end - start + 1 < maxPagesToShow) {
|
|
4734
|
+
start = Math.max(1, end - maxPagesToShow + 1);
|
|
4645
4735
|
}
|
|
4736
|
+
this.pagesToShow = Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
4646
4737
|
}
|
|
4647
|
-
|
|
4738
|
+
refreshPagination() {
|
|
4648
4739
|
this.loadPage();
|
|
4649
4740
|
this.goToPageNumber = this.currentPage;
|
|
4650
4741
|
this.generatePagesToShow();
|
|
4651
4742
|
}
|
|
4652
|
-
// Navigation methods for pagination buttons
|
|
4653
4743
|
goToFirstPage() {
|
|
4654
4744
|
if (this.currentPage !== 1) {
|
|
4655
4745
|
this.currentPage = 1;
|
|
4656
|
-
this.
|
|
4746
|
+
this.refreshPagination();
|
|
4657
4747
|
}
|
|
4658
4748
|
}
|
|
4659
4749
|
goToPreviousPage() {
|
|
4660
4750
|
if (this.currentPage > 1) {
|
|
4661
4751
|
this.currentPage--;
|
|
4662
|
-
this.
|
|
4752
|
+
this.refreshPagination();
|
|
4663
4753
|
}
|
|
4664
4754
|
}
|
|
4665
4755
|
goToNextPage() {
|
|
4666
4756
|
if (this.currentPage < this.totalPages) {
|
|
4667
4757
|
this.currentPage++;
|
|
4668
|
-
this.
|
|
4758
|
+
this.refreshPagination();
|
|
4669
4759
|
}
|
|
4670
4760
|
}
|
|
4671
4761
|
goToLastPage() {
|
|
4672
4762
|
if (this.currentPage !== this.totalPages) {
|
|
4673
4763
|
this.currentPage = this.totalPages;
|
|
4674
|
-
this.
|
|
4675
|
-
}
|
|
4676
|
-
}
|
|
4677
|
-
goToPage(page) {
|
|
4678
|
-
if (page >= 1 && page <= this.totalPages && page !== this.currentPage) {
|
|
4679
|
-
this.currentPage = page;
|
|
4680
|
-
this.onPaginationChange();
|
|
4764
|
+
this.refreshPagination();
|
|
4681
4765
|
}
|
|
4682
4766
|
}
|
|
4683
|
-
// Fixed: renamed method to match template
|
|
4684
4767
|
goToSpecificPage() {
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
}
|
|
4693
|
-
else if (pageNum > this.totalPages) {
|
|
4694
|
-
this.goToPageNumber = this.totalPages;
|
|
4695
|
-
}
|
|
4696
|
-
// Update current page and load data
|
|
4697
|
-
this.currentPage = this.goToPageNumber;
|
|
4698
|
-
this.onPaginationChange();
|
|
4699
|
-
}
|
|
4700
|
-
validateNumberInput(event) {
|
|
4701
|
-
const charCode = event.which ? event.which : event.keyCode;
|
|
4702
|
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
|
4703
|
-
return false;
|
|
4704
|
-
}
|
|
4705
|
-
return true;
|
|
4768
|
+
let pageNum = Number(this.goToPageNumber);
|
|
4769
|
+
if (isNaN(pageNum) || pageNum < 1)
|
|
4770
|
+
pageNum = 1;
|
|
4771
|
+
if (pageNum > this.totalPages)
|
|
4772
|
+
pageNum = this.totalPages;
|
|
4773
|
+
this.currentPage = pageNum;
|
|
4774
|
+
this.refreshPagination();
|
|
4706
4775
|
}
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
getWidthById(id, index) {
|
|
4712
|
-
if (this.tableHeadList.length == 3) {
|
|
4713
|
-
if (index == 1)
|
|
4714
|
-
return '60%';
|
|
4715
|
-
else
|
|
4716
|
-
return '20%';
|
|
4776
|
+
preventNegative(event) {
|
|
4777
|
+
const invalidKeys = ['-', '+', 'e'];
|
|
4778
|
+
if (invalidKeys.includes(event.key.toLowerCase())) {
|
|
4779
|
+
event.preventDefault();
|
|
4717
4780
|
}
|
|
4718
|
-
var width = 100 / this.tableHeadList.length;
|
|
4719
|
-
return width + '%';
|
|
4720
4781
|
}
|
|
4721
|
-
/**
|
|
4722
|
-
* Sorts the column that is being passed as the param
|
|
4723
|
-
* @param id - Column id
|
|
4724
|
-
*/
|
|
4725
4782
|
sortByColumn(id) {
|
|
4726
|
-
|
|
4783
|
+
const meta = this.tableData.metaData;
|
|
4784
|
+
if (id === 'viewDetails' || meta.isHeaderSortHidden)
|
|
4727
4785
|
return;
|
|
4728
|
-
|
|
4729
|
-
if (!this.isUserSort)
|
|
4730
|
-
this.isUserSort = true;
|
|
4786
|
+
this.isUserSort = true;
|
|
4731
4787
|
if (id !== this.sortColumn) {
|
|
4732
4788
|
this.sortColumn = id;
|
|
4733
|
-
this.sortDirection = 'asc';
|
|
4789
|
+
this.sortDirection = 'asc';
|
|
4734
4790
|
}
|
|
4735
|
-
else {
|
|
4736
|
-
|
|
4737
|
-
this.sortDirection = 'desc';
|
|
4738
|
-
}
|
|
4739
|
-
else {
|
|
4740
|
-
this.sortDirection = 'asc';
|
|
4741
|
-
}
|
|
4791
|
+
else if (this.sortDirection === 'asc') {
|
|
4792
|
+
this.sortDirection = 'desc';
|
|
4742
4793
|
}
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
if (!isNaN(num1) && !isNaN(num2)) {
|
|
4747
|
-
return num1 - num2;
|
|
4748
|
-
}
|
|
4749
|
-
return v1 < v2 ? -1 : v1 > v2 ? 1 : 0;
|
|
4794
|
+
else {
|
|
4795
|
+
this.resetSort();
|
|
4796
|
+
return;
|
|
4750
4797
|
}
|
|
4798
|
+
this.sortItemList();
|
|
4799
|
+
this.currentPage = 1;
|
|
4800
|
+
this.refreshPagination();
|
|
4801
|
+
}
|
|
4802
|
+
sortItemList() {
|
|
4803
|
+
const compare = (a, b) => {
|
|
4804
|
+
const numA = parseFloat(a);
|
|
4805
|
+
const numB = parseFloat(b);
|
|
4806
|
+
if (!isNaN(numA) && !isNaN(numB))
|
|
4807
|
+
return numA - numB;
|
|
4808
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
4809
|
+
};
|
|
4751
4810
|
this.itemList.sort((a, b) => {
|
|
4752
|
-
const
|
|
4753
|
-
return this.sortDirection === 'asc' ?
|
|
4811
|
+
const result = compare(a[this.sortColumn], b[this.sortColumn]);
|
|
4812
|
+
return this.sortDirection === 'asc' ? result : -result;
|
|
4754
4813
|
});
|
|
4755
|
-
|
|
4814
|
+
}
|
|
4815
|
+
resetSort() {
|
|
4816
|
+
this.sortColumn = '';
|
|
4817
|
+
this.sortDirection = '';
|
|
4818
|
+
this.itemList = [...this.masterList];
|
|
4756
4819
|
this.currentPage = 1;
|
|
4757
|
-
this.
|
|
4758
|
-
this.calculateTotalPages();
|
|
4759
|
-
this.generatePagesToShow();
|
|
4760
|
-
this.loadPage();
|
|
4820
|
+
this.refreshPagination();
|
|
4761
4821
|
}
|
|
4762
|
-
/**
|
|
4763
|
-
* Returns whether column being passed as the param is currently being sorted or not
|
|
4764
|
-
* @param id column id
|
|
4765
|
-
*/
|
|
4766
4822
|
checkIfColumnCurrentlyBeingSorted(id) {
|
|
4767
4823
|
return this.sortColumn === id;
|
|
4768
4824
|
}
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4825
|
+
onSearch(event) {
|
|
4826
|
+
const searchText = (event.target.value || '').trim().toLowerCase();
|
|
4827
|
+
this.itemList = searchText
|
|
4828
|
+
? this.masterList.filter(row => this.tableHeadList.some(col => row[col]?.toString().toLowerCase().includes(searchText)))
|
|
4829
|
+
: [...this.masterList];
|
|
4830
|
+
this.currentPage = 1;
|
|
4831
|
+
this.totalItems = this.itemList.length;
|
|
4832
|
+
this.calculateTotalPages();
|
|
4833
|
+
this.refreshPagination();
|
|
4774
4834
|
}
|
|
4775
|
-
|
|
4776
|
-
this.
|
|
4777
|
-
|
|
4778
|
-
var self = this;
|
|
4779
|
-
if (this.itemList) {
|
|
4780
|
-
if (searchText) {
|
|
4781
|
-
this.itemList = this.itemList.filter(function matches(store) {
|
|
4782
|
-
let match = false;
|
|
4783
|
-
self.tableHeadList.map(function (tableHead) {
|
|
4784
|
-
if (store[tableHead]) {
|
|
4785
|
-
let searchableString = store[tableHead] + '';
|
|
4786
|
-
if (searchableString
|
|
4787
|
-
.toLowerCase()
|
|
4788
|
-
.includes(searchText.toLowerCase())) {
|
|
4789
|
-
match = true;
|
|
4790
|
-
}
|
|
4791
|
-
}
|
|
4792
|
-
});
|
|
4793
|
-
return match;
|
|
4794
|
-
});
|
|
4795
|
-
}
|
|
4796
|
-
// Reset pagination after search
|
|
4797
|
-
this.currentPage = 1;
|
|
4798
|
-
this.totalItems = this.itemList.length;
|
|
4799
|
-
this.calculateTotalPages();
|
|
4800
|
-
this.generatePagesToShow();
|
|
4801
|
-
this.loadPage();
|
|
4835
|
+
getWidthById(_, index) {
|
|
4836
|
+
if (this.tableHeadList.length === 3) {
|
|
4837
|
+
return index === 1 ? '60%' : '20%';
|
|
4802
4838
|
}
|
|
4839
|
+
return `${100 / this.tableHeadList.length}%`;
|
|
4803
4840
|
}
|
|
4804
|
-
handleClick(
|
|
4805
|
-
this.clickEvent.emit(
|
|
4841
|
+
handleClick(row) {
|
|
4842
|
+
this.clickEvent.emit(row);
|
|
4806
4843
|
}
|
|
4807
4844
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AxTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4808
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AxTableComponent, selector: "lib-ax-table", inputs: { tableData: "tableData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<!-- <div class=\"header-alt lib-display-flex lib-justify-content-space-between\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n <input type=\"text\" *ngIf=\"!tableData.metaData.isSearchHidden\" class=\"float-right padding-5 input-style\"\r\n id=\"exampleInputEmail1\" autocomplete=\"off\" placeholder=\" Search \" aria-describedby=\"emailHelp\"\r\n (keyup)=\"onEnter($event)\" />\r\n</div>\r\n<div class=\"table-header\"></div>\r\n<div class=\"table-wrapper\">\r\n <table class=\"table table-bordered table-hover\">\r\n <thead class=\"table-thead\">\r\n <tr class=\"table-header\">\r\n <th *ngFor=\"let header of tableHeadList; index as i\" class=\"header-cell\" [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \" [style.width]=\"getWidthById(header, i)\" [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\" (click)=\"sortByColumn(header)\">\r\n <span *ngIf=\"\r\n (!tableData.metaData.isFirstColumnHeaderHidden && i == 0) || i > 0\r\n \" [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden\r\n ? 'cursor-pointer'\r\n : 'cursor-default'\r\n \">{{ header }}</span>\r\n <i *ngIf=\"\r\n (!isUserSort || checkIfColumnCurrentlyBeingSorted(header)) &&\r\n !tableData.metaData.isHeaderSortHidden\r\n \" class=\"sort-icons fa\" [ngClass]=\"\r\n !isUserSort\r\n ? 'fa-sort'\r\n : sortDirection == 'asc'\r\n ? 'fa-sort-asc'\r\n : 'fa-sort-desc'\r\n \"></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let store of currentList\" [ngClass]=\"\r\n tableData?.highlightedTexts?.includes(store[tableHeadList[0]])\r\n ? 'font-weight-bold'\r\n : ''\r\n \">\r\n <td (click)=\"handleClick(store)\" class=\"table-cell\" *ngFor=\"let header of tableHeadList; index as i\"\r\n [style.width]=\"getWidthById(header, i)\" [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \" [style.cursor]=\"\r\n tableData.metaData.hasDrillDown ? 'pointer' : 'default'\r\n \">\r\n <span>{{ store[header] }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"pagination-container\" *ngIf=\"itemList && itemList.length && !tableData.metaData.isPaginationHidden\">\r\n <div class=\"results-summary\">\r\n Showing <b>{{ (currentPage - 1) * pageSize + 1 }}</b> to\r\n <b>{{ currentPage * pageSize > totalItems ? totalItems : currentPage * pageSize }}</b>\r\n of <b>{{ totalItems }}</b> entries\r\n </div>\r\n\r\n <ngb-pagination \r\n [collectionSize]=\"totalItems\" \r\n [(page)]=\"currentPage\" \r\n [pageSize]=\"pageSize\" \r\n [maxSize]=\"5\"\r\n [rotate]=\"true\" \r\n [boundaryLinks]=\"true\" \r\n (pageChange)=\"onPaginationChange()\" \r\n class=\"sb-pagination\">\r\n </ngb-pagination>\r\n\r\n <div class=\"go-to-page\">\r\n <label for=\"gotoPageInput\">Go to page</label>\r\n <input \r\n id=\"gotoPageInput\" \r\n type=\"number\" \r\n [min]=\"1\" \r\n [max]=\"totalPages\" \r\n [ngModel]=\"goToPageValue\"\r\n (ngModelChange)=\"goToPageValue = $event; goToPage()\"\r\n (keypress)=\"validateNumberInput($event)\">\r\n </div>\r\n</div> -->\r\n\r\n\r\n\r\n<div class=\"d-flex align-items-center justify-content-between w-100\">\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n </div>\r\n\r\n <input type=\"text\" *ngIf=\"!tableData.metaData.isSearchHidden\"\r\n class=\"form-control custom-input medium-font-size textbox-ax-common\" id=\"exampleInputEmail1\" autocomplete=\"off\"\r\n placeholder=\" Search \" aria-describedby=\"emailHelp\" (keyup)=\"onEnter($event)\" />\r\n</div>\r\n\r\n<div class=\"popup-body-for-scroll\">\r\n <div class=\"table-wrapper\">\r\n\r\n <div class=\"table-responsive border\">\r\n <table class=\"table table-bordered table-hover align-middle mb-0\">\r\n <thead class=\"table-dark\">\r\n <tr class=\"table-header\">\r\n <th *ngFor=\"let header of tableHeadList; index as i\" [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \" [style.width]=\"getWidthById(header, i)\" [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\" (click)=\"sortByColumn(header)\">\r\n <span *ngIf=\"\r\n (!tableData.metaData.isFirstColumnHeaderHidden && i == 0) || i > 0\r\n \" [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden\r\n ? 'cursor-pointer'\r\n : 'cursor-default'\r\n \">{{ header }}</span>\r\n <i *ngIf=\"\r\n (!isUserSort || checkIfColumnCurrentlyBeingSorted(header)) &&\r\n !tableData.metaData.isHeaderSortHidden\r\n \" class=\"sort-icons fa\" [ngClass]=\"\r\n !isUserSort\r\n ? 'fa-sort'\r\n : sortDirection == 'asc'\r\n ? 'fa-sort-asc'\r\n : 'fa-sort-desc'\r\n \"></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr *ngFor=\"let store of currentList\" [ngClass]=\"\r\n tableData?.highlightedTexts?.includes(store[tableHeadList[0]])\r\n ? 'font-weight-bold'\r\n : ''\r\n \">\r\n <td (click)=\"handleClick(store)\" class=\"table-cell\" *ngFor=\"let header of tableHeadList; index as i\"\r\n [style.width]=\"getWidthById(header, i)\" [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \" [style.cursor]=\"\r\n tableData.metaData.hasDrillDown ? 'pointer' : 'default'\r\n \">\r\n <span>{{ store[header] }}</span>\r\n </td>\r\n </tr>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"pagination-bar mt-0\">\r\n <span>Go To</span>\r\n <input type=\"number\" class=\"page-input\" min=\"1\" [max]=\"totalPages\" (keyup.enter)=\"goToSpecificPage()\" [(ngModel)]=\"goToPageNumber\"\r\n (keypress)=\"preventNegative($event)\"\r\n >\r\n\r\n <span> {{ (currentList.length > 0 ? ((currentPage - 1) * pageSize + 1) : 0) }} -\r\n {{ ((currentPage - 1) * pageSize + currentList.length) }} of\r\n {{ totalItems | number }}</span>\r\n\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToFirstPage()\" class=\"pagination-btn\" title=\"First Page\">\r\n <i class=\"bi bi-chevron-double-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToPreviousPage()\" class=\"pagination-btn\" title=\"Previous Page\">\r\n <i class=\"bi bi-chevron-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === totalPages\" (click)=\"goToNextPage()\" class=\"pagination-btn\" title=\"Next Page\">\r\n <i class=\"bi bi-chevron-right\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === totalPages\" (click)=\"goToLastPage()\" class=\"pagination-btn\" title=\"Last Page\">\r\n <i class=\"bi bi-chevron-double-right\"></i>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".modal-dialog{max-height:90vh;height:90vh;margin:5vh auto;display:flex;flex-direction:column}.modal-content{height:100%;display:flex;flex-direction:column;max-height:100%;overflow:hidden}.modal-header{flex-shrink:0;border-bottom:1px solid #dee2e6;padding:1rem}.modal-body{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;min-height:0}.modal-footer{flex-shrink:0;border-top:1px solid #dee2e6;padding:1rem}.pagination-bar{display:flex;align-items:center;justify-content:flex-end;font-size:15px;gap:10px;width:100%;border:var(--table-border);border-top:0;background:var(--table-bg);color:var(--font-color);padding:12px 4px}.page-input::placeholder{color:var(--font-color)}.pagination-btn{background:none;border:none;color:var(--font-color, #444);border-radius:5px;transition:background .15s,color .15s;font-size:1.14rem;display:inline-flex;align-items:center;justify-content:center}.pagination-btn[disabled]{color:#c3c3c3!important;cursor:not-allowed}.pagination-btn:not([disabled]):hover,.pagination-btn:not([disabled]):focus{background:#e6f0ff!important;color:#1976d2!important;outline:none}.page-input{width:45px;text-align:center;font-size:15px;border:var(--table-border);height:32px;background:var(--table-bg);color:var(--font-color)}.popup-body-for-scroll{overflow:hidden;display:flex;flex-direction:column;flex:1;min-height:0;max-height:90%;gap:.5rem}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:0;flex-shrink:0}.table-wrapper{background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);box-shadow:0 0 8px #0000000f;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin-bottom:0}.table-responsive{width:100%;overflow:auto;flex:1;min-height:0}table{width:100%;background-color:var(--background-color, #ffffff);margin-bottom:0}table th,table td{vertical-align:middle;white-space:nowrap;background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);border:var(--border, 1px solid #dee2e6);padding:8px 12px}thead th{background-color:var(--bs-tertiary-bg, #f8f9fa);color:var(--bs-body-color, #212529);font-weight:600;position:sticky;top:0;z-index:2}.table-responsive::-webkit-scrollbar{width:6px;height:6px}.table-responsive::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.sort-icons{margin-left:5px;color:var(--bs-body-color, #212529)}.textalign-left{text-align:left}.textalign-right{text-align:right}.textalign-center{text-align:center}.last-column-color{color:var(--link-menu, #2b6ecf)}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-bold{font-weight:700}.pagination-section{flex-shrink:0;background-color:var(--background-color, #ffffff);border:1px solid #dee2e6;border-radius:8px;margin-top:0;margin-bottom:0;padding:.5rem;min-height:60px;max-height:70px;overflow:visible;position:relative;z-index:1}@media (max-width: 575.98px){.modal-dialog{margin:0;max-height:100vh;height:100vh;width:100%;max-width:100%}.modal-content{max-height:100vh;border-radius:0;height:100vh}.modal-body{padding:.75rem}table th,table td{padding:6px 8px;font-size:.875rem}.pagination-section{margin-top:.25rem;padding:.5rem;max-height:118px}}@media (min-width: 576px) and (max-width: 767.98px){.modal-dialog{max-width:95%;margin:2.5vh auto;max-height:95vh;height:95vh}.modal-content{max-height:95vh;height:100%}}@media (min-width: 768px) and (max-width: 991.98px){.modal-dialog{max-width:90%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 992px){.modal-dialog{max-width:85%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 1200px){.modal-dialog{max-width:1140px}}.custom-input{max-width:300px;margin-left:auto}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:.5rem;flex-shrink:0}.modal-backdrop{z-index:1040}.modal{z-index:1050}.modal.show .modal-dialog{transform:none}.modal-dialog{position:relative;width:auto;pointer-events:none}.modal-dialog .modal-content{pointer-events:auto}.pagination-section .btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.2}.page-gap{gap:5px}.pagination-section .form-control{height:30px;font-size:.875rem}.pagination-section span{font-size:.875rem;line-height:1.2}@media (max-width: 480px){.table-responsive{font-size:.8rem}table th,table td{min-width:80px;padding:4px 6px}.pagination-section .btn{padding:.25rem .5rem;font-size:.8rem}.page-gap{gap:0}}@media (max-width: 576px){.page-gap{gap:0}}@media print{.modal-dialog{max-height:none;height:auto}.table-responsive{overflow:visible}.pagination-section{display:none}}@media screen and (max-width: 768px) and (max-height: 900px){.popup-body-for-scroll{max-height:85%}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2$1.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: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: HeaderAltComponent, selector: "lib-header-alt", inputs: ["title"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
|
|
4845
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AxTableComponent, selector: "lib-ax-table", inputs: { tableData: "tableData", customChartConfiguration: "customChartConfiguration" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<div class=\"d-flex align-items-center justify-content-between w-100\">\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n </div>\r\n\r\n <input\r\n *ngIf=\"!tableData.metaData.isSearchHidden\"\r\n type=\"text\"\r\n class=\"form-control custom-input medium-font-size textbox-ax-common\"\r\n placeholder=\"Search\"\r\n autocomplete=\"off\"\r\n (keyup)=\"onSearch($event)\"\r\n />\r\n</div>\r\n\r\n<div class=\"popup-body-for-scroll\">\r\n <div class=\"table-wrapper\">\r\n <div class=\"table-responsive border\">\r\n <table class=\"table table-bordered table-hover align-middle mb-0\">\r\n <thead class=\"table-dark\">\r\n <tr class=\"table-header\">\r\n <th\r\n *ngFor=\"let header of tableHeadList; index as i\"\r\n (click)=\"sortByColumn(header)\"\r\n [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i === tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \"\r\n [style.width]=\"getWidthById(header, i)\"\r\n [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\"\r\n >\r\n <span\r\n *ngIf=\"(!tableData.metaData.isFirstColumnHeaderHidden && i === 0) || i > 0\"\r\n [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden ? 'cursor-pointer' : 'cursor-default'\r\n \"\r\n >\r\n {{ header }}\r\n </span>\r\n\r\n <i\r\n *ngIf=\"checkIfColumnCurrentlyBeingSorted(header) || !isUserSort\"\r\n class=\"sort-icons fa\"\r\n [ngClass]=\"\r\n !isUserSort || sortColumn !== header\r\n ? 'fa-sort'\r\n : sortDirection === 'asc'\r\n ? 'fa-sort-asc'\r\n : sortDirection === 'desc'\r\n ? 'fa-sort-desc'\r\n : 'fa-sort'\r\n \"\r\n ></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr\r\n *ngFor=\"let row of currentList\"\r\n [ngClass]=\"tableData?.highlightedTexts?.includes(row[tableHeadList[0]]) ? 'font-weight-bold' : ''\"\r\n >\r\n <td\r\n *ngFor=\"let header of tableHeadList; index as i\"\r\n (click)=\"handleClick(row)\"\r\n class=\"table-cell\"\r\n [style.width]=\"getWidthById(header, i)\"\r\n [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i === tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \"\r\n [style.cursor]=\"tableData.metaData.hasDrillDown ? 'pointer' : 'default'\"\r\n >\r\n <span>{{ row[header] }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"pagination-bar mt-0\">\r\n <span>Go To</span>\r\n <input\r\n type=\"number\"\r\n class=\"page-input\"\r\n min=\"1\"\r\n [max]=\"totalPages\"\r\n [(ngModel)]=\"goToPageNumber\"\r\n (keypress)=\"preventNegative($event)\"\r\n (keyup.enter)=\"goToSpecificPage()\"\r\n />\r\n\r\n <span>\r\n {{ currentList.length > 0 ? (currentPage - 1) * pageSize + 1 : 0 }} -\r\n {{ (currentPage - 1) * pageSize + currentList.length }} of {{ totalItems | number }}\r\n </span>\r\n\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToFirstPage()\" class=\"pagination-btn\" title=\"First Page\">\r\n <i class=\"bi bi-chevron-double-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToPreviousPage()\" class=\"pagination-btn\" title=\"Previous Page\">\r\n <i class=\"bi bi-chevron-left\"></i>\r\n </button>\r\n <button\r\n [disabled]=\"currentPage === totalPages\"\r\n (click)=\"goToNextPage()\"\r\n class=\"pagination-btn\"\r\n title=\"Next Page\"\r\n >\r\n <i class=\"bi bi-chevron-right\"></i>\r\n </button>\r\n <button\r\n [disabled]=\"currentPage === totalPages\"\r\n (click)=\"goToLastPage()\"\r\n class=\"pagination-btn\"\r\n title=\"Last Page\"\r\n >\r\n <i class=\"bi bi-chevron-double-right\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n</div>", styles: [".modal-dialog{max-height:90vh;height:90vh;margin:5vh auto;display:flex;flex-direction:column}.modal-content{height:100%;display:flex;flex-direction:column;max-height:100%;overflow:hidden}.modal-header{flex-shrink:0;border-bottom:1px solid #dee2e6;padding:1rem}.modal-body{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;min-height:0}.modal-footer{flex-shrink:0;border-top:1px solid #dee2e6;padding:1rem}.pagination-bar{display:flex;align-items:center;justify-content:flex-end;font-size:15px;gap:10px;width:100%;border:var(--table-border);border-top:0;background:var(--table-bg);color:var(--font-color);padding:12px 4px}.page-input::placeholder{color:var(--font-color)}.pagination-btn{background:none;border:none;color:var(--font-color, #444);border-radius:5px;transition:background .15s,color .15s;font-size:1.14rem;display:inline-flex;align-items:center;justify-content:center}.pagination-btn[disabled]{color:#c3c3c3!important;cursor:not-allowed}.pagination-btn:not([disabled]):hover,.pagination-btn:not([disabled]):focus{background:#e6f0ff!important;color:#1976d2!important;outline:none}.page-input{width:45px;text-align:center;font-size:15px;border:var(--table-border);height:32px;background:var(--table-bg);color:var(--font-color)}.popup-body-for-scroll{overflow:hidden;display:flex;flex-direction:column;flex:1;min-height:0;max-height:90%;gap:.5rem}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:0;flex-shrink:0}.table-wrapper{background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);box-shadow:0 0 8px #0000000f;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin-bottom:0}.table-responsive{width:100%;overflow:auto;flex:1;min-height:0}table{width:100%;background-color:var(--background-color, #ffffff);margin-bottom:0}table th,table td{vertical-align:middle;white-space:nowrap;background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);border:var(--border, 1px solid #dee2e6);padding:8px 12px}thead th{background-color:var(--bs-tertiary-bg, #f8f9fa);color:var(--bs-body-color, #212529);font-weight:600;position:sticky;top:0;z-index:2}.table-responsive::-webkit-scrollbar{width:6px;height:6px}.table-responsive::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.sort-icons{margin-left:5px;color:var(--bs-body-color, #212529)}.textalign-left{text-align:left}.textalign-right{text-align:right}.textalign-center{text-align:center}.last-column-color{color:var(--link-menu, #2b6ecf)}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-bold{font-weight:700}.pagination-section{flex-shrink:0;background-color:var(--background-color, #ffffff);border:1px solid #dee2e6;border-radius:8px;margin-top:0;margin-bottom:0;padding:.5rem;min-height:60px;max-height:70px;overflow:visible;position:relative;z-index:1}@media (max-width: 575.98px){.modal-dialog{margin:0;max-height:100vh;height:100vh;width:100%;max-width:100%}.modal-content{max-height:100vh;border-radius:0;height:100vh}.modal-body{padding:.75rem}table th,table td{padding:6px 8px;font-size:.875rem}.pagination-section{margin-top:.25rem;padding:.5rem;max-height:118px}}@media (min-width: 576px) and (max-width: 767.98px){.modal-dialog{max-width:95%;margin:2.5vh auto;max-height:95vh;height:95vh}.modal-content{max-height:95vh;height:100%}}@media (min-width: 768px) and (max-width: 991.98px){.modal-dialog{max-width:90%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 992px){.modal-dialog{max-width:85%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 1200px){.modal-dialog{max-width:1140px}}.custom-input{max-width:300px;margin-left:auto}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:.5rem;flex-shrink:0}.modal-backdrop{z-index:1040}.modal{z-index:1050}.modal.show .modal-dialog{transform:none}.modal-dialog{position:relative;width:auto;pointer-events:none}.modal-dialog .modal-content{pointer-events:auto}.pagination-section .btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.2}.page-gap{gap:5px}.pagination-section .form-control{height:30px;font-size:.875rem}.pagination-section span{font-size:.875rem;line-height:1.2}@media (max-width: 480px){.table-responsive{font-size:.8rem}table th,table td{min-width:80px;padding:4px 6px}.pagination-section .btn{padding:.25rem .5rem;font-size:.8rem}.page-gap{gap:0}}@media (max-width: 576px){.page-gap{gap:0}}@media print{.modal-dialog{max-height:none;height:auto}.table-responsive{overflow:visible}.pagination-section{display:none}}@media screen and (max-width: 768px) and (max-height: 900px){.popup-body-for-scroll{max-height:85%}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2$1.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: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2$1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: HeaderAltComponent, selector: "lib-header-alt", inputs: ["title"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
|
|
4809
4846
|
}
|
|
4810
4847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AxTableComponent, decorators: [{
|
|
4811
4848
|
type: Component,
|
|
4812
|
-
args: [{ selector: 'lib-ax-table', template: "<!-- <div class=\"header-alt lib-display-flex lib-justify-content-space-between\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n <input type=\"text\" *ngIf=\"!tableData.metaData.isSearchHidden\" class=\"float-right padding-5 input-style\"\r\n id=\"exampleInputEmail1\" autocomplete=\"off\" placeholder=\" Search \" aria-describedby=\"emailHelp\"\r\n (keyup)=\"onEnter($event)\" />\r\n</div>\r\n<div class=\"table-header\"></div>\r\n<div class=\"table-wrapper\">\r\n <table class=\"table table-bordered table-hover\">\r\n <thead class=\"table-thead\">\r\n <tr class=\"table-header\">\r\n <th *ngFor=\"let header of tableHeadList; index as i\" class=\"header-cell\" [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \" [style.width]=\"getWidthById(header, i)\" [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\" (click)=\"sortByColumn(header)\">\r\n <span *ngIf=\"\r\n (!tableData.metaData.isFirstColumnHeaderHidden && i == 0) || i > 0\r\n \" [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden\r\n ? 'cursor-pointer'\r\n : 'cursor-default'\r\n \">{{ header }}</span>\r\n <i *ngIf=\"\r\n (!isUserSort || checkIfColumnCurrentlyBeingSorted(header)) &&\r\n !tableData.metaData.isHeaderSortHidden\r\n \" class=\"sort-icons fa\" [ngClass]=\"\r\n !isUserSort\r\n ? 'fa-sort'\r\n : sortDirection == 'asc'\r\n ? 'fa-sort-asc'\r\n : 'fa-sort-desc'\r\n \"></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"table-body\">\r\n <tr *ngFor=\"let store of currentList\" [ngClass]=\"\r\n tableData?.highlightedTexts?.includes(store[tableHeadList[0]])\r\n ? 'font-weight-bold'\r\n : ''\r\n \">\r\n <td (click)=\"handleClick(store)\" class=\"table-cell\" *ngFor=\"let header of tableHeadList; index as i\"\r\n [style.width]=\"getWidthById(header, i)\" [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \" [style.cursor]=\"\r\n tableData.metaData.hasDrillDown ? 'pointer' : 'default'\r\n \">\r\n <span>{{ store[header] }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"pagination-container\" *ngIf=\"itemList && itemList.length && !tableData.metaData.isPaginationHidden\">\r\n <div class=\"results-summary\">\r\n Showing <b>{{ (currentPage - 1) * pageSize + 1 }}</b> to\r\n <b>{{ currentPage * pageSize > totalItems ? totalItems : currentPage * pageSize }}</b>\r\n of <b>{{ totalItems }}</b> entries\r\n </div>\r\n\r\n <ngb-pagination \r\n [collectionSize]=\"totalItems\" \r\n [(page)]=\"currentPage\" \r\n [pageSize]=\"pageSize\" \r\n [maxSize]=\"5\"\r\n [rotate]=\"true\" \r\n [boundaryLinks]=\"true\" \r\n (pageChange)=\"onPaginationChange()\" \r\n class=\"sb-pagination\">\r\n </ngb-pagination>\r\n\r\n <div class=\"go-to-page\">\r\n <label for=\"gotoPageInput\">Go to page</label>\r\n <input \r\n id=\"gotoPageInput\" \r\n type=\"number\" \r\n [min]=\"1\" \r\n [max]=\"totalPages\" \r\n [ngModel]=\"goToPageValue\"\r\n (ngModelChange)=\"goToPageValue = $event; goToPage()\"\r\n (keypress)=\"validateNumberInput($event)\">\r\n </div>\r\n</div> -->\r\n\r\n\r\n\r\n<div class=\"d-flex align-items-center justify-content-between w-100\">\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n </div>\r\n\r\n <input type=\"text\" *ngIf=\"!tableData.metaData.isSearchHidden\"\r\n class=\"form-control custom-input medium-font-size textbox-ax-common\" id=\"exampleInputEmail1\" autocomplete=\"off\"\r\n placeholder=\" Search \" aria-describedby=\"emailHelp\" (keyup)=\"onEnter($event)\" />\r\n</div>\r\n\r\n<div class=\"popup-body-for-scroll\">\r\n <div class=\"table-wrapper\">\r\n\r\n <div class=\"table-responsive border\">\r\n <table class=\"table table-bordered table-hover align-middle mb-0\">\r\n <thead class=\"table-dark\">\r\n <tr class=\"table-header\">\r\n <th *ngFor=\"let header of tableHeadList; index as i\" [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \" [style.width]=\"getWidthById(header, i)\" [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\" (click)=\"sortByColumn(header)\">\r\n <span *ngIf=\"\r\n (!tableData.metaData.isFirstColumnHeaderHidden && i == 0) || i > 0\r\n \" [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden\r\n ? 'cursor-pointer'\r\n : 'cursor-default'\r\n \">{{ header }}</span>\r\n <i *ngIf=\"\r\n (!isUserSort || checkIfColumnCurrentlyBeingSorted(header)) &&\r\n !tableData.metaData.isHeaderSortHidden\r\n \" class=\"sort-icons fa\" [ngClass]=\"\r\n !isUserSort\r\n ? 'fa-sort'\r\n : sortDirection == 'asc'\r\n ? 'fa-sort-asc'\r\n : 'fa-sort-desc'\r\n \"></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr *ngFor=\"let store of currentList\" [ngClass]=\"\r\n tableData?.highlightedTexts?.includes(store[tableHeadList[0]])\r\n ? 'font-weight-bold'\r\n : ''\r\n \">\r\n <td (click)=\"handleClick(store)\" class=\"table-cell\" *ngFor=\"let header of tableHeadList; index as i\"\r\n [style.width]=\"getWidthById(header, i)\" [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i == tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \" [style.cursor]=\"\r\n tableData.metaData.hasDrillDown ? 'pointer' : 'default'\r\n \">\r\n <span>{{ store[header] }}</span>\r\n </td>\r\n </tr>\r\n\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"pagination-bar mt-0\">\r\n <span>Go To</span>\r\n <input type=\"number\" class=\"page-input\" min=\"1\" [max]=\"totalPages\" (keyup.enter)=\"goToSpecificPage()\" [(ngModel)]=\"goToPageNumber\"\r\n (keypress)=\"preventNegative($event)\"\r\n >\r\n\r\n <span> {{ (currentList.length > 0 ? ((currentPage - 1) * pageSize + 1) : 0) }} -\r\n {{ ((currentPage - 1) * pageSize + currentList.length) }} of\r\n {{ totalItems | number }}</span>\r\n\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToFirstPage()\" class=\"pagination-btn\" title=\"First Page\">\r\n <i class=\"bi bi-chevron-double-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToPreviousPage()\" class=\"pagination-btn\" title=\"Previous Page\">\r\n <i class=\"bi bi-chevron-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === totalPages\" (click)=\"goToNextPage()\" class=\"pagination-btn\" title=\"Next Page\">\r\n <i class=\"bi bi-chevron-right\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === totalPages\" (click)=\"goToLastPage()\" class=\"pagination-btn\" title=\"Last Page\">\r\n <i class=\"bi bi-chevron-double-right\"></i>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n</div>", styles: [".modal-dialog{max-height:90vh;height:90vh;margin:5vh auto;display:flex;flex-direction:column}.modal-content{height:100%;display:flex;flex-direction:column;max-height:100%;overflow:hidden}.modal-header{flex-shrink:0;border-bottom:1px solid #dee2e6;padding:1rem}.modal-body{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;min-height:0}.modal-footer{flex-shrink:0;border-top:1px solid #dee2e6;padding:1rem}.pagination-bar{display:flex;align-items:center;justify-content:flex-end;font-size:15px;gap:10px;width:100%;border:var(--table-border);border-top:0;background:var(--table-bg);color:var(--font-color);padding:12px 4px}.page-input::placeholder{color:var(--font-color)}.pagination-btn{background:none;border:none;color:var(--font-color, #444);border-radius:5px;transition:background .15s,color .15s;font-size:1.14rem;display:inline-flex;align-items:center;justify-content:center}.pagination-btn[disabled]{color:#c3c3c3!important;cursor:not-allowed}.pagination-btn:not([disabled]):hover,.pagination-btn:not([disabled]):focus{background:#e6f0ff!important;color:#1976d2!important;outline:none}.page-input{width:45px;text-align:center;font-size:15px;border:var(--table-border);height:32px;background:var(--table-bg);color:var(--font-color)}.popup-body-for-scroll{overflow:hidden;display:flex;flex-direction:column;flex:1;min-height:0;max-height:90%;gap:.5rem}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:0;flex-shrink:0}.table-wrapper{background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);box-shadow:0 0 8px #0000000f;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin-bottom:0}.table-responsive{width:100%;overflow:auto;flex:1;min-height:0}table{width:100%;background-color:var(--background-color, #ffffff);margin-bottom:0}table th,table td{vertical-align:middle;white-space:nowrap;background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);border:var(--border, 1px solid #dee2e6);padding:8px 12px}thead th{background-color:var(--bs-tertiary-bg, #f8f9fa);color:var(--bs-body-color, #212529);font-weight:600;position:sticky;top:0;z-index:2}.table-responsive::-webkit-scrollbar{width:6px;height:6px}.table-responsive::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.sort-icons{margin-left:5px;color:var(--bs-body-color, #212529)}.textalign-left{text-align:left}.textalign-right{text-align:right}.textalign-center{text-align:center}.last-column-color{color:var(--link-menu, #2b6ecf)}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-bold{font-weight:700}.pagination-section{flex-shrink:0;background-color:var(--background-color, #ffffff);border:1px solid #dee2e6;border-radius:8px;margin-top:0;margin-bottom:0;padding:.5rem;min-height:60px;max-height:70px;overflow:visible;position:relative;z-index:1}@media (max-width: 575.98px){.modal-dialog{margin:0;max-height:100vh;height:100vh;width:100%;max-width:100%}.modal-content{max-height:100vh;border-radius:0;height:100vh}.modal-body{padding:.75rem}table th,table td{padding:6px 8px;font-size:.875rem}.pagination-section{margin-top:.25rem;padding:.5rem;max-height:118px}}@media (min-width: 576px) and (max-width: 767.98px){.modal-dialog{max-width:95%;margin:2.5vh auto;max-height:95vh;height:95vh}.modal-content{max-height:95vh;height:100%}}@media (min-width: 768px) and (max-width: 991.98px){.modal-dialog{max-width:90%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 992px){.modal-dialog{max-width:85%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 1200px){.modal-dialog{max-width:1140px}}.custom-input{max-width:300px;margin-left:auto}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:.5rem;flex-shrink:0}.modal-backdrop{z-index:1040}.modal{z-index:1050}.modal.show .modal-dialog{transform:none}.modal-dialog{position:relative;width:auto;pointer-events:none}.modal-dialog .modal-content{pointer-events:auto}.pagination-section .btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.2}.page-gap{gap:5px}.pagination-section .form-control{height:30px;font-size:.875rem}.pagination-section span{font-size:.875rem;line-height:1.2}@media (max-width: 480px){.table-responsive{font-size:.8rem}table th,table td{min-width:80px;padding:4px 6px}.pagination-section .btn{padding:.25rem .5rem;font-size:.8rem}.page-gap{gap:0}}@media (max-width: 576px){.page-gap{gap:0}}@media print{.modal-dialog{max-height:none;height:auto}.table-responsive{overflow:visible}.pagination-section{display:none}}@media screen and (max-width: 768px) and (max-height: 900px){.popup-body-for-scroll{max-height:85%}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"] }]
|
|
4849
|
+
args: [{ selector: 'lib-ax-table', template: "<div class=\"d-flex align-items-center justify-content-between w-100\">\r\n <div class=\"d-flex align-items-center gap-2\">\r\n <lib-header-alt [title]=\"tableData.metaData.title\" *ngIf=\"!isHeaderVisible\"></lib-header-alt>\r\n </div>\r\n\r\n <input\r\n *ngIf=\"!tableData.metaData.isSearchHidden\"\r\n type=\"text\"\r\n class=\"form-control custom-input medium-font-size textbox-ax-common\"\r\n placeholder=\"Search\"\r\n autocomplete=\"off\"\r\n (keyup)=\"onSearch($event)\"\r\n />\r\n</div>\r\n\r\n<div class=\"popup-body-for-scroll\">\r\n <div class=\"table-wrapper\">\r\n <div class=\"table-responsive border\">\r\n <table class=\"table table-bordered table-hover align-middle mb-0\">\r\n <thead class=\"table-dark\">\r\n <tr class=\"table-header\">\r\n <th\r\n *ngFor=\"let header of tableHeadList; index as i\"\r\n (click)=\"sortByColumn(header)\"\r\n [ngClass]=\"\r\n !tableData.metaData.isHeaderAlignedToCenter\r\n ? i === tableHeadList.length - 1\r\n ? 'textalign-right'\r\n : 'textalign-left'\r\n : 'textalign-center'\r\n \"\r\n [style.width]=\"getWidthById(header, i)\"\r\n [style.backgroundColor]=\"tableData.metaData.headerColor\"\r\n [style.color]=\"tableData.metaData.headerTextColor\"\r\n >\r\n <span\r\n *ngIf=\"(!tableData.metaData.isFirstColumnHeaderHidden && i === 0) || i > 0\"\r\n [ngClass]=\"\r\n !tableData.metaData.isHeaderSortHidden ? 'cursor-pointer' : 'cursor-default'\r\n \"\r\n >\r\n {{ header }}\r\n </span>\r\n\r\n <i\r\n *ngIf=\"checkIfColumnCurrentlyBeingSorted(header) || !isUserSort\"\r\n class=\"sort-icons fa\"\r\n [ngClass]=\"\r\n !isUserSort || sortColumn !== header\r\n ? 'fa-sort'\r\n : sortDirection === 'asc'\r\n ? 'fa-sort-asc'\r\n : sortDirection === 'desc'\r\n ? 'fa-sort-desc'\r\n : 'fa-sort'\r\n \"\r\n ></i>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <tr\r\n *ngFor=\"let row of currentList\"\r\n [ngClass]=\"tableData?.highlightedTexts?.includes(row[tableHeadList[0]]) ? 'font-weight-bold' : ''\"\r\n >\r\n <td\r\n *ngFor=\"let header of tableHeadList; index as i\"\r\n (click)=\"handleClick(row)\"\r\n class=\"table-cell\"\r\n [style.width]=\"getWidthById(header, i)\"\r\n [ngClass]=\"\r\n !tableData.metaData.isAllAlignedToRight\r\n ? i === tableHeadList.length - 1\r\n ? 'textalign-right last-column-color'\r\n : 'textalign-left'\r\n : 'textalign-right'\r\n \"\r\n [style.cursor]=\"tableData.metaData.hasDrillDown ? 'pointer' : 'default'\"\r\n >\r\n <span>{{ row[header] }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"pagination-bar mt-0\">\r\n <span>Go To</span>\r\n <input\r\n type=\"number\"\r\n class=\"page-input\"\r\n min=\"1\"\r\n [max]=\"totalPages\"\r\n [(ngModel)]=\"goToPageNumber\"\r\n (keypress)=\"preventNegative($event)\"\r\n (keyup.enter)=\"goToSpecificPage()\"\r\n />\r\n\r\n <span>\r\n {{ currentList.length > 0 ? (currentPage - 1) * pageSize + 1 : 0 }} -\r\n {{ (currentPage - 1) * pageSize + currentList.length }} of {{ totalItems | number }}\r\n </span>\r\n\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToFirstPage()\" class=\"pagination-btn\" title=\"First Page\">\r\n <i class=\"bi bi-chevron-double-left\"></i>\r\n </button>\r\n <button [disabled]=\"currentPage === 1\" (click)=\"goToPreviousPage()\" class=\"pagination-btn\" title=\"Previous Page\">\r\n <i class=\"bi bi-chevron-left\"></i>\r\n </button>\r\n <button\r\n [disabled]=\"currentPage === totalPages\"\r\n (click)=\"goToNextPage()\"\r\n class=\"pagination-btn\"\r\n title=\"Next Page\"\r\n >\r\n <i class=\"bi bi-chevron-right\"></i>\r\n </button>\r\n <button\r\n [disabled]=\"currentPage === totalPages\"\r\n (click)=\"goToLastPage()\"\r\n class=\"pagination-btn\"\r\n title=\"Last Page\"\r\n >\r\n <i class=\"bi bi-chevron-double-right\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n</div>", styles: [".modal-dialog{max-height:90vh;height:90vh;margin:5vh auto;display:flex;flex-direction:column}.modal-content{height:100%;display:flex;flex-direction:column;max-height:100%;overflow:hidden}.modal-header{flex-shrink:0;border-bottom:1px solid #dee2e6;padding:1rem}.modal-body{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;min-height:0}.modal-footer{flex-shrink:0;border-top:1px solid #dee2e6;padding:1rem}.pagination-bar{display:flex;align-items:center;justify-content:flex-end;font-size:15px;gap:10px;width:100%;border:var(--table-border);border-top:0;background:var(--table-bg);color:var(--font-color);padding:12px 4px}.page-input::placeholder{color:var(--font-color)}.pagination-btn{background:none;border:none;color:var(--font-color, #444);border-radius:5px;transition:background .15s,color .15s;font-size:1.14rem;display:inline-flex;align-items:center;justify-content:center}.pagination-btn[disabled]{color:#c3c3c3!important;cursor:not-allowed}.pagination-btn:not([disabled]):hover,.pagination-btn:not([disabled]):focus{background:#e6f0ff!important;color:#1976d2!important;outline:none}.page-input{width:45px;text-align:center;font-size:15px;border:var(--table-border);height:32px;background:var(--table-bg);color:var(--font-color)}.popup-body-for-scroll{overflow:hidden;display:flex;flex-direction:column;flex:1;min-height:0;max-height:90%;gap:.5rem}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:0;flex-shrink:0}.table-wrapper{background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);box-shadow:0 0 8px #0000000f;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;margin-bottom:0}.table-responsive{width:100%;overflow:auto;flex:1;min-height:0}table{width:100%;background-color:var(--background-color, #ffffff);margin-bottom:0}table th,table td{vertical-align:middle;white-space:nowrap;background-color:var(--background-color, #ffffff);color:var(--bs-body-color, #212529);border:var(--border, 1px solid #dee2e6);padding:8px 12px}thead th{background-color:var(--bs-tertiary-bg, #f8f9fa);color:var(--bs-body-color, #212529);font-weight:600;position:sticky;top:0;z-index:2}.table-responsive::-webkit-scrollbar{width:6px;height:6px}.table-responsive::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.table-responsive::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.sort-icons{margin-left:5px;color:var(--bs-body-color, #212529)}.textalign-left{text-align:left}.textalign-right{text-align:right}.textalign-center{text-align:center}.last-column-color{color:var(--link-menu, #2b6ecf)}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-bold{font-weight:700}.pagination-section{flex-shrink:0;background-color:var(--background-color, #ffffff);border:1px solid #dee2e6;border-radius:8px;margin-top:0;margin-bottom:0;padding:.5rem;min-height:60px;max-height:70px;overflow:visible;position:relative;z-index:1}@media (max-width: 575.98px){.modal-dialog{margin:0;max-height:100vh;height:100vh;width:100%;max-width:100%}.modal-content{max-height:100vh;border-radius:0;height:100vh}.modal-body{padding:.75rem}table th,table td{padding:6px 8px;font-size:.875rem}.pagination-section{margin-top:.25rem;padding:.5rem;max-height:118px}}@media (min-width: 576px) and (max-width: 767.98px){.modal-dialog{max-width:95%;margin:2.5vh auto;max-height:95vh;height:95vh}.modal-content{max-height:95vh;height:100%}}@media (min-width: 768px) and (max-width: 991.98px){.modal-dialog{max-width:90%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 992px){.modal-dialog{max-width:85%;margin:5vh auto;max-height:90vh;height:90vh}.modal-content{max-height:90vh;height:100%}}@media (min-width: 1200px){.modal-dialog{max-width:1140px}}.custom-input{max-width:300px;margin-left:auto}.d-flex.align-items-center.justify-content-between.w-100{margin-bottom:.5rem;flex-shrink:0}.modal-backdrop{z-index:1040}.modal{z-index:1050}.modal.show .modal-dialog{transform:none}.modal-dialog{position:relative;width:auto;pointer-events:none}.modal-dialog .modal-content{pointer-events:auto}.pagination-section .btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.2}.page-gap{gap:5px}.pagination-section .form-control{height:30px;font-size:.875rem}.pagination-section span{font-size:.875rem;line-height:1.2}@media (max-width: 480px){.table-responsive{font-size:.8rem}table th,table td{min-width:80px;padding:4px 6px}.pagination-section .btn{padding:.25rem .5rem;font-size:.8rem}.page-gap{gap:0}}@media (max-width: 576px){.page-gap{gap:0}}@media print{.modal-dialog{max-height:none;height:auto}.table-responsive{overflow:visible}.pagination-section{display:none}}@media screen and (max-width: 768px) and (max-height: 900px){.popup-body-for-scroll{max-height:85%}}\n", ".lib-chart-wrapper{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;background:#fff 0% 0% no-repeat padding-box;position:relative}.lib-chart-wrapper-wo-shadow{width:100%;height:100%;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background){background-color:#2e3640}.lib-chart-wrapper:hover .chart-header-v1:not(.header-no-background) .chart-title{color:#fff}.lib-chart-svg{width:100%}.lib-chart-header{text-align:center;background-color:#052340;color:#fff;width:100%;height:17%;word-spacing:.5px;line-height:1.8;font-weight:700;padding-top:2%;letter-spacing:0;font-size:1.2em}.lib-donut-chart-footer{width:100%;text-align:right}.lib-donut-label-text{font-size:.9em;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-weight:400;letter-spacing:0px;color:#000;opacity:1}.lib-donut-label-icon{display:inline-block;width:10px;height:10px;margin-right:20px;border-radius:3px}.lib-donut-label-item{font-weight:400;font-size:.85em;color:#2f2f2f}.lib-donut-justified-label-wrapper{width:100%;display:inline-block;text-align:center;list-style-type:none}.lib-donut-justified-label-item{font-weight:400;font-size:.85em;color:#2f2f2f;display:inline-block;text-align:left;padding:0 10px}.lib-donut-justified-label-icon{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:3px}.lib-no-background{background:none!important}.lib-display-hidden{display:none}.lib-ylabel-weeklyCharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:12px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.07px;text-transform:capitalize;color:#000}.lib-data-labels-weeklycharts{font-style:normal;font-variant:normal;font-weight:400;font-size:12px;line-height:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:-.06px;color:#000}.lib-data-labels-angled-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:9.5px;line-height:11px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:.4px;text-anchor:start}.lib-xaxis-labels-texts-weeklycharts{font-style:normal;font-variant:normal;font-weight:800;font-size:10px;line-height:11px;letter-spacing:-.05px;fill:#000}.lib-xaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:-1px;color:#000;opacity:1;text-transform:capitalize}.lib-white-space-nowrap{white-space:nowrap}.lib-xaxis-labels-texts-drilldown-alt{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:10px;letter-spacing:0px;color:#000;opacity:1;text-transform:capitalize}.lib-yaxis-labels-texts-drilldown{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:14px;letter-spacing:0px;color:#000!important;opacity:1}.lib-ylabel-drilldowncharts,.lib-xlabel-drilldowncharts{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;font-size:16px;letter-spacing:-.1px;color:#000!important;opacity:1}.lib-donut-justified-label-icon-drilldown{display:inline-block;width:14px;height:14px;margin-right:10px;border-radius:50%}.marginright-2{margin-right:2%}.margintop-5{margin-top:5%}.width-100{width:100%}.float-right{float:right}.marginBottom-10{margin-bottom:10px}.header-alt{align-items:center;margin-bottom:10px}input::placeholder{font-size:20px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto;letter-spacing:0px;color:#000;opacity:1}.padding-5{padding:5px}.hidden{visibility:hidden}.font-weight-bold{font-weight:900}.textalign-center{text-align:center}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.font-weight-600{font-weight:600}.marginRight-15{margin-right:15px}.marginRight-20{margin-right:20px}.switch{position:relative;display:inline-block;width:46px;height:24px;margin-left:5px;margin-right:5px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#2d5ca0;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:\"\";height:18px;width:18px;right:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider.round{border-radius:18px}.slider.round:before{border-radius:50%}.slider1{position:absolute;cursor:pointer;inset:0;background-color:#015ba2cf;-webkit-transition:.4s;transition:.4s}.slider1:before{position:absolute;content:\"\";height:18px;width:18px;left:3px;bottom:3px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.slider1.round1{border-radius:18px}.slider1.round1:before{border-radius:50%}.lib-display-flex{display:flex}.lib-align-items-center{align-items:center}.lib-flex-direction-column{flex-direction:column}.lib-justify-content-space-between{justify-content:space-between}.lib-justify-content-space-around{justify-content:space-around}.lib-justify-content-center{justify-content:center}.lib-justify-content-start{justify-content:start}.lib-justify-content-end{justify-content:end}.lib-ml-20{margin-left:20px}.lib-position-absolute{position:absolute}.lib-z-index-9{z-index:9}.marginright-3{margin-right:3px}@media (min-height: 900px){.lib-chart-wrapper{border-radius:8px}.header-font-size-1{font-size:18px!important}.font-size-1{font-size:14px!important}.font-size-2{font-size:16px!important}.font-size-3{font-size:14px!important}.font-size-4{font-size:22px!important}.font-size-5{font-size:24px!important}}\n"] }]
|
|
4813
4850
|
}], ctorParameters: () => [], propDecorators: { tableData: [{
|
|
4814
4851
|
type: Input
|
|
4815
4852
|
}], customChartConfiguration: [{
|