@fuentis/phoenix-ui 0.0.9-alpha.577 → 0.0.9-alpha.579
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/fesm2022/fuentis-phoenix-ui.mjs +210 -215
- package/fesm2022/fuentis-phoenix-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5744,207 +5744,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5744
5744
|
] }]
|
|
5745
5745
|
}], ctorParameters: () => [] });
|
|
5746
5746
|
|
|
5747
|
-
class MetaStartDueDateComponent {
|
|
5748
|
-
control;
|
|
5749
|
-
parentForm;
|
|
5750
|
-
ctrl;
|
|
5751
|
-
dr = inject(DestroyRef);
|
|
5752
|
-
startDate = null;
|
|
5753
|
-
endDate = null;
|
|
5754
|
-
onChanged = () => { };
|
|
5755
|
-
onTouched = () => { };
|
|
5756
|
-
ngOnInit() {
|
|
5757
|
-
this.ctrl = this.parentForm.get(this.control.configuration.key);
|
|
5758
|
-
if (this.control.mandatory)
|
|
5759
|
-
this.ctrl?.setValidators(this.ctrl?.validator);
|
|
5760
|
-
this.parentForm
|
|
5761
|
-
.get(this.control.configuration.key)
|
|
5762
|
-
?.valueChanges.pipe(takeUntilDestroyed(this.dr))
|
|
5763
|
-
.subscribe(() => this.validateDates());
|
|
5764
|
-
this.validateDates();
|
|
5765
|
-
}
|
|
5766
|
-
normalizeDateOnly(v) {
|
|
5767
|
-
if (!v)
|
|
5768
|
-
return null;
|
|
5769
|
-
const d = v instanceof Date ? v : new Date(v);
|
|
5770
|
-
if (isNaN(d.getTime()))
|
|
5771
|
-
return null;
|
|
5772
|
-
return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
|
|
5773
|
-
}
|
|
5774
|
-
writeValue(obj) {
|
|
5775
|
-
if (obj) {
|
|
5776
|
-
this.startDate = this.normalizeDateOnly(obj.startDate);
|
|
5777
|
-
this.endDate = this.normalizeDateOnly(obj.endDate);
|
|
5778
|
-
}
|
|
5779
|
-
else {
|
|
5780
|
-
this.startDate = null;
|
|
5781
|
-
this.endDate = null;
|
|
5782
|
-
}
|
|
5783
|
-
this.validateDates();
|
|
5784
|
-
}
|
|
5785
|
-
// Handle start date selection
|
|
5786
|
-
onStartDateSelect(event) {
|
|
5787
|
-
this.startDate = this.normalizeDateOnly(event);
|
|
5788
|
-
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
5789
|
-
this.validateDates();
|
|
5790
|
-
}
|
|
5791
|
-
// Handle end date selection
|
|
5792
|
-
onEndDateSelect(event) {
|
|
5793
|
-
this.endDate = this.normalizeDateOnly(event);
|
|
5794
|
-
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
5795
|
-
this.validateDates();
|
|
5796
|
-
}
|
|
5797
|
-
// Handle start date clear value
|
|
5798
|
-
onStartDateClear() {
|
|
5799
|
-
this.startDate = null;
|
|
5800
|
-
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
5801
|
-
this.validateDates();
|
|
5802
|
-
}
|
|
5803
|
-
// Handle end date clear value
|
|
5804
|
-
onEndDateClear() {
|
|
5805
|
-
this.endDate = null;
|
|
5806
|
-
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
5807
|
-
this.validateDates();
|
|
5808
|
-
}
|
|
5809
|
-
validateDates() {
|
|
5810
|
-
const c = this.parentForm.get(this.control.configuration.key);
|
|
5811
|
-
if (!c)
|
|
5812
|
-
return;
|
|
5813
|
-
// clear previous errors
|
|
5814
|
-
c.setErrors(null);
|
|
5815
|
-
// Both dates are mandatory
|
|
5816
|
-
if (this.control.mandatory && (!this.startDate || !this.endDate)) {
|
|
5817
|
-
c.setErrors({ required: true });
|
|
5818
|
-
return;
|
|
5819
|
-
}
|
|
5820
|
-
if (this.startDate && this.endDate) {
|
|
5821
|
-
const s = new Date(this.startDate.getFullYear(), this.startDate.getMonth(), this.startDate.getDate(), 12, 0, 0, 0).getTime();
|
|
5822
|
-
const e = new Date(this.endDate.getFullYear(), this.endDate.getMonth(), this.endDate.getDate(), 12, 0, 0, 0).getTime();
|
|
5823
|
-
if (s > e) {
|
|
5824
|
-
c.setErrors({ dueDate: true });
|
|
5825
|
-
return;
|
|
5826
|
-
}
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
registerOnChange(fn) {
|
|
5830
|
-
this.onChanged = fn;
|
|
5831
|
-
}
|
|
5832
|
-
registerOnTouched(fn) {
|
|
5833
|
-
this.onTouched = fn;
|
|
5834
|
-
}
|
|
5835
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5836
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateComponent, isStandalone: true, selector: "phoenix-meta-start-due-date", inputs: { control: "control", parentForm: "parentForm" }, providers: [
|
|
5837
|
-
{
|
|
5838
|
-
provide: NG_VALUE_ACCESSOR,
|
|
5839
|
-
useExisting: forwardRef(() => MetaStartDueDateComponent),
|
|
5840
|
-
multi: true,
|
|
5841
|
-
},
|
|
5842
|
-
], ngImport: i0, template: `
|
|
5843
|
-
<div [hidden]="control?.hidden">
|
|
5844
|
-
<phoenix-meta-label [control]="control"></phoenix-meta-label>
|
|
5845
|
-
<div class="flex">
|
|
5846
|
-
<div class="flex-grow-1">
|
|
5847
|
-
<p-datepicker
|
|
5848
|
-
[attr.data-cy]="'start-date-' + control?.id"
|
|
5849
|
-
(onSelect)="onStartDateSelect($event)"
|
|
5850
|
-
(onClearClick)="onStartDateClear()"
|
|
5851
|
-
[style]="{ width: '100%' }"
|
|
5852
|
-
[(ngModel)]="startDate"
|
|
5853
|
-
[readonlyInput]="true"
|
|
5854
|
-
[showButtonBar]="true"
|
|
5855
|
-
[showIcon]="true"
|
|
5856
|
-
[placeholder]="'LABELS.PLANNED_START' | translate"
|
|
5857
|
-
appendTo="body"
|
|
5858
|
-
></p-datepicker>
|
|
5859
|
-
</div>
|
|
5860
|
-
<div class=" flex align-items-center p-2 ">
|
|
5861
|
-
<i
|
|
5862
|
-
class="pi pi-arrow-right text-sm"
|
|
5863
|
-
style="color: 'var(--surface-600)'"
|
|
5864
|
-
></i>
|
|
5865
|
-
</div>
|
|
5866
|
-
<div class="flex-grow-1">
|
|
5867
|
-
<p-datepicker
|
|
5868
|
-
[attr.data-cy]="'due-date-' + control?.id"
|
|
5869
|
-
(onSelect)="onEndDateSelect($event)"
|
|
5870
|
-
(onClearClick)="onEndDateClear()"
|
|
5871
|
-
[style]="{ width: '100%' }"
|
|
5872
|
-
[(ngModel)]="endDate"
|
|
5873
|
-
[readonlyInput]="true"
|
|
5874
|
-
[showButtonBar]="true"
|
|
5875
|
-
[showIcon]="true"
|
|
5876
|
-
[placeholder]="'LABELS.PLANNED_END' | translate"
|
|
5877
|
-
appendTo="body"
|
|
5878
|
-
></p-datepicker>
|
|
5879
|
-
</div>
|
|
5880
|
-
</div>
|
|
5881
|
-
<phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
|
|
5882
|
-
</div>
|
|
5883
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: InlineFieldError, selector: "phoenix-inline-field-error", inputs: ["ctrl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MetaLabelComponent, selector: "phoenix-meta-label", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
5884
|
-
}
|
|
5885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, decorators: [{
|
|
5886
|
-
type: Component,
|
|
5887
|
-
args: [{ selector: 'phoenix-meta-start-due-date', standalone: true, imports: [
|
|
5888
|
-
DatePickerModule,
|
|
5889
|
-
InlineFieldError,
|
|
5890
|
-
ReactiveFormsModule,
|
|
5891
|
-
FormsModule,
|
|
5892
|
-
MetaLabelComponent,
|
|
5893
|
-
TranslateModule,
|
|
5894
|
-
], template: `
|
|
5895
|
-
<div [hidden]="control?.hidden">
|
|
5896
|
-
<phoenix-meta-label [control]="control"></phoenix-meta-label>
|
|
5897
|
-
<div class="flex">
|
|
5898
|
-
<div class="flex-grow-1">
|
|
5899
|
-
<p-datepicker
|
|
5900
|
-
[attr.data-cy]="'start-date-' + control?.id"
|
|
5901
|
-
(onSelect)="onStartDateSelect($event)"
|
|
5902
|
-
(onClearClick)="onStartDateClear()"
|
|
5903
|
-
[style]="{ width: '100%' }"
|
|
5904
|
-
[(ngModel)]="startDate"
|
|
5905
|
-
[readonlyInput]="true"
|
|
5906
|
-
[showButtonBar]="true"
|
|
5907
|
-
[showIcon]="true"
|
|
5908
|
-
[placeholder]="'LABELS.PLANNED_START' | translate"
|
|
5909
|
-
appendTo="body"
|
|
5910
|
-
></p-datepicker>
|
|
5911
|
-
</div>
|
|
5912
|
-
<div class=" flex align-items-center p-2 ">
|
|
5913
|
-
<i
|
|
5914
|
-
class="pi pi-arrow-right text-sm"
|
|
5915
|
-
style="color: 'var(--surface-600)'"
|
|
5916
|
-
></i>
|
|
5917
|
-
</div>
|
|
5918
|
-
<div class="flex-grow-1">
|
|
5919
|
-
<p-datepicker
|
|
5920
|
-
[attr.data-cy]="'due-date-' + control?.id"
|
|
5921
|
-
(onSelect)="onEndDateSelect($event)"
|
|
5922
|
-
(onClearClick)="onEndDateClear()"
|
|
5923
|
-
[style]="{ width: '100%' }"
|
|
5924
|
-
[(ngModel)]="endDate"
|
|
5925
|
-
[readonlyInput]="true"
|
|
5926
|
-
[showButtonBar]="true"
|
|
5927
|
-
[showIcon]="true"
|
|
5928
|
-
[placeholder]="'LABELS.PLANNED_END' | translate"
|
|
5929
|
-
appendTo="body"
|
|
5930
|
-
></p-datepicker>
|
|
5931
|
-
</div>
|
|
5932
|
-
</div>
|
|
5933
|
-
<phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
|
|
5934
|
-
</div>
|
|
5935
|
-
`, providers: [
|
|
5936
|
-
{
|
|
5937
|
-
provide: NG_VALUE_ACCESSOR,
|
|
5938
|
-
useExisting: forwardRef(() => MetaStartDueDateComponent),
|
|
5939
|
-
multi: true,
|
|
5940
|
-
},
|
|
5941
|
-
] }]
|
|
5942
|
-
}], propDecorators: { control: [{
|
|
5943
|
-
type: Input
|
|
5944
|
-
}], parentForm: [{
|
|
5945
|
-
type: Input
|
|
5946
|
-
}] } });
|
|
5947
|
-
|
|
5948
5747
|
class MetaSwitchComponent extends BaseMetaField {
|
|
5949
5748
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5950
5749
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaSwitchComponent, isStandalone: true, selector: "phoenix-meta-switch", providers: [
|
|
@@ -7424,6 +7223,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7424
7223
|
args: ['fileInput']
|
|
7425
7224
|
}] } });
|
|
7426
7225
|
|
|
7226
|
+
class MetaStartDueDateComponent {
|
|
7227
|
+
control;
|
|
7228
|
+
parentForm;
|
|
7229
|
+
ctrl;
|
|
7230
|
+
dr = inject(DestroyRef);
|
|
7231
|
+
startDate;
|
|
7232
|
+
endDate;
|
|
7233
|
+
onChanged;
|
|
7234
|
+
onTouched;
|
|
7235
|
+
constructor() { }
|
|
7236
|
+
ngOnInit() {
|
|
7237
|
+
this.ctrl = this.parentForm.get(this.control.configuration.key);
|
|
7238
|
+
this.ctrl = this.parentForm.get(this.control.configuration.key);
|
|
7239
|
+
if (this.control.mandatory)
|
|
7240
|
+
this.ctrl.setValidators(this.ctrl.validator);
|
|
7241
|
+
this.parentForm
|
|
7242
|
+
.get(this.control.configuration.key)
|
|
7243
|
+
?.valueChanges.pipe(takeUntilDestroyed(this.dr))
|
|
7244
|
+
.subscribe((r) => {
|
|
7245
|
+
this.validateDates();
|
|
7246
|
+
});
|
|
7247
|
+
this.validateDates();
|
|
7248
|
+
}
|
|
7249
|
+
writeValue(obj) {
|
|
7250
|
+
if (obj) {
|
|
7251
|
+
this.startDate = obj.startDate;
|
|
7252
|
+
this.endDate = obj.endDate;
|
|
7253
|
+
}
|
|
7254
|
+
else {
|
|
7255
|
+
this.startDate = null;
|
|
7256
|
+
this.endDate = null;
|
|
7257
|
+
}
|
|
7258
|
+
}
|
|
7259
|
+
// Handle start date selection
|
|
7260
|
+
onStartDateSelect(event) {
|
|
7261
|
+
this.startDate = event;
|
|
7262
|
+
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
7263
|
+
this.validateDates();
|
|
7264
|
+
}
|
|
7265
|
+
// Handle end date selection
|
|
7266
|
+
onEndDateSelect(event) {
|
|
7267
|
+
this.endDate = event;
|
|
7268
|
+
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
7269
|
+
this.validateDates();
|
|
7270
|
+
}
|
|
7271
|
+
// Handle start date clear value
|
|
7272
|
+
onStartDateClear() {
|
|
7273
|
+
this.startDate = null;
|
|
7274
|
+
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
7275
|
+
this.validateDates();
|
|
7276
|
+
}
|
|
7277
|
+
// Handle end date clear value
|
|
7278
|
+
onEndDateClear() {
|
|
7279
|
+
this.endDate = null;
|
|
7280
|
+
this.onChanged({ startDate: this.startDate, endDate: this.endDate });
|
|
7281
|
+
this.validateDates();
|
|
7282
|
+
}
|
|
7283
|
+
validateDates() {
|
|
7284
|
+
//Both dates are mandatory
|
|
7285
|
+
if (this.control.mandatory && (!this.startDate || !this.endDate)) {
|
|
7286
|
+
this.parentForm
|
|
7287
|
+
.get(this.control.configuration.key)
|
|
7288
|
+
?.setErrors({ required: true });
|
|
7289
|
+
}
|
|
7290
|
+
else {
|
|
7291
|
+
this.parentForm.get(this.control.configuration.key)?.setErrors(null);
|
|
7292
|
+
}
|
|
7293
|
+
// End date must be after start date
|
|
7294
|
+
if (this.startDate &&
|
|
7295
|
+
this.endDate &&
|
|
7296
|
+
this.startDate.setHours(0, 0, 0, 0) > this.endDate.setHours(0, 0, 0, 0)) {
|
|
7297
|
+
this.parentForm
|
|
7298
|
+
.get(this.control.configuration.key)
|
|
7299
|
+
?.setErrors({ dueDate: true });
|
|
7300
|
+
}
|
|
7301
|
+
//TBD: Scenario if only one date is mandatory
|
|
7302
|
+
}
|
|
7303
|
+
registerOnChange(fn) {
|
|
7304
|
+
this.onChanged = fn;
|
|
7305
|
+
}
|
|
7306
|
+
registerOnTouched(fn) {
|
|
7307
|
+
this.onTouched = fn;
|
|
7308
|
+
}
|
|
7309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateComponent, isStandalone: true, selector: "phoenix-meta-start-due-date", inputs: { control: "control", parentForm: "parentForm" }, providers: [
|
|
7311
|
+
{
|
|
7312
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7313
|
+
useExisting: forwardRef(() => MetaStartDueDateComponent),
|
|
7314
|
+
multi: true,
|
|
7315
|
+
},
|
|
7316
|
+
], ngImport: i0, template: `
|
|
7317
|
+
<div [hidden]="control?.hidden">
|
|
7318
|
+
<phoenix-meta-label [control]="control"></phoenix-meta-label>
|
|
7319
|
+
|
|
7320
|
+
<div class="flex align-items-center gap-2">
|
|
7321
|
+
<div class="flex-1">
|
|
7322
|
+
<p-datepicker
|
|
7323
|
+
[attr.data-cy]="'start-date-' + control?.id"
|
|
7324
|
+
(onSelect)="onStartDateSelect($event)"
|
|
7325
|
+
(onClearClick)="onStartDateClear()"
|
|
7326
|
+
[style]="{ width: '100%' }"
|
|
7327
|
+
[(ngModel)]="startDate"
|
|
7328
|
+
[ngModelOptions]="{ standalone: true }"
|
|
7329
|
+
[readonlyInput]="true"
|
|
7330
|
+
[showButtonBar]="true"
|
|
7331
|
+
[showIcon]="true"
|
|
7332
|
+
[placeholder]="'LABELS.PLANNED_START' | translate"
|
|
7333
|
+
appendTo="body"
|
|
7334
|
+
></p-datepicker>
|
|
7335
|
+
</div>
|
|
7336
|
+
|
|
7337
|
+
<div class="flex align-items-center justify-content-center px-2" style="flex: 0 0 24px;">
|
|
7338
|
+
<i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
|
|
7339
|
+
</div>
|
|
7340
|
+
|
|
7341
|
+
<div class="flex-1">
|
|
7342
|
+
<p-datepicker
|
|
7343
|
+
[attr.data-cy]="'due-date-' + control?.id"
|
|
7344
|
+
(onSelect)="onEndDateSelect($event)"
|
|
7345
|
+
(onClearClick)="onEndDateClear()"
|
|
7346
|
+
[style]="{ width: '100%' }"
|
|
7347
|
+
[(ngModel)]="endDate"
|
|
7348
|
+
[ngModelOptions]="{ standalone: true }"
|
|
7349
|
+
[readonlyInput]="true"
|
|
7350
|
+
[showButtonBar]="true"
|
|
7351
|
+
[showIcon]="true"
|
|
7352
|
+
[placeholder]="'LABELS.PLANNED_END' | translate"
|
|
7353
|
+
appendTo="body"
|
|
7354
|
+
></p-datepicker>
|
|
7355
|
+
</div>
|
|
7356
|
+
</div>
|
|
7357
|
+
|
|
7358
|
+
<phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
|
|
7359
|
+
</div>
|
|
7360
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: InlineFieldError, selector: "phoenix-inline-field-error", inputs: ["ctrl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MetaLabelComponent, selector: "phoenix-meta-label", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
7361
|
+
}
|
|
7362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, decorators: [{
|
|
7363
|
+
type: Component,
|
|
7364
|
+
args: [{ selector: 'phoenix-meta-start-due-date', standalone: true, imports: [
|
|
7365
|
+
DatePickerModule,
|
|
7366
|
+
InlineFieldError,
|
|
7367
|
+
ReactiveFormsModule,
|
|
7368
|
+
FormsModule,
|
|
7369
|
+
MetaLabelComponent,
|
|
7370
|
+
TranslateModule,
|
|
7371
|
+
], template: `
|
|
7372
|
+
<div [hidden]="control?.hidden">
|
|
7373
|
+
<phoenix-meta-label [control]="control"></phoenix-meta-label>
|
|
7374
|
+
|
|
7375
|
+
<div class="flex align-items-center gap-2">
|
|
7376
|
+
<div class="flex-1">
|
|
7377
|
+
<p-datepicker
|
|
7378
|
+
[attr.data-cy]="'start-date-' + control?.id"
|
|
7379
|
+
(onSelect)="onStartDateSelect($event)"
|
|
7380
|
+
(onClearClick)="onStartDateClear()"
|
|
7381
|
+
[style]="{ width: '100%' }"
|
|
7382
|
+
[(ngModel)]="startDate"
|
|
7383
|
+
[ngModelOptions]="{ standalone: true }"
|
|
7384
|
+
[readonlyInput]="true"
|
|
7385
|
+
[showButtonBar]="true"
|
|
7386
|
+
[showIcon]="true"
|
|
7387
|
+
[placeholder]="'LABELS.PLANNED_START' | translate"
|
|
7388
|
+
appendTo="body"
|
|
7389
|
+
></p-datepicker>
|
|
7390
|
+
</div>
|
|
7391
|
+
|
|
7392
|
+
<div class="flex align-items-center justify-content-center px-2" style="flex: 0 0 24px;">
|
|
7393
|
+
<i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
|
|
7394
|
+
</div>
|
|
7395
|
+
|
|
7396
|
+
<div class="flex-1">
|
|
7397
|
+
<p-datepicker
|
|
7398
|
+
[attr.data-cy]="'due-date-' + control?.id"
|
|
7399
|
+
(onSelect)="onEndDateSelect($event)"
|
|
7400
|
+
(onClearClick)="onEndDateClear()"
|
|
7401
|
+
[style]="{ width: '100%' }"
|
|
7402
|
+
[(ngModel)]="endDate"
|
|
7403
|
+
[ngModelOptions]="{ standalone: true }"
|
|
7404
|
+
[readonlyInput]="true"
|
|
7405
|
+
[showButtonBar]="true"
|
|
7406
|
+
[showIcon]="true"
|
|
7407
|
+
[placeholder]="'LABELS.PLANNED_END' | translate"
|
|
7408
|
+
appendTo="body"
|
|
7409
|
+
></p-datepicker>
|
|
7410
|
+
</div>
|
|
7411
|
+
</div>
|
|
7412
|
+
|
|
7413
|
+
<phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
|
|
7414
|
+
</div>
|
|
7415
|
+
`, providers: [
|
|
7416
|
+
{
|
|
7417
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7418
|
+
useExisting: forwardRef(() => MetaStartDueDateComponent),
|
|
7419
|
+
multi: true,
|
|
7420
|
+
},
|
|
7421
|
+
] }]
|
|
7422
|
+
}], ctorParameters: () => [], propDecorators: { control: [{
|
|
7423
|
+
type: Input
|
|
7424
|
+
}], parentForm: [{
|
|
7425
|
+
type: Input
|
|
7426
|
+
}] } });
|
|
7427
|
+
|
|
7427
7428
|
class MetaFormComponent extends MetaFormAbstract {
|
|
7428
7429
|
constructor(fb, metaService, translateService, http
|
|
7429
7430
|
// env: EnvService
|
|
@@ -7643,6 +7644,7 @@ var StatusColType;
|
|
|
7643
7644
|
StatusColType["PERSON"] = "PERSON";
|
|
7644
7645
|
StatusColType["LINK"] = "LINK";
|
|
7645
7646
|
StatusColType["DATE"] = "DATE";
|
|
7647
|
+
StatusColType["DATE_ONLY"] = "DATE_ONLY";
|
|
7646
7648
|
StatusColType["LIST"] = "LIST";
|
|
7647
7649
|
StatusColType["COUNTRY"] = "COUNTRY";
|
|
7648
7650
|
})(StatusColType || (StatusColType = {}));
|
|
@@ -7677,7 +7679,7 @@ class StatusAttributeDisplayComponent {
|
|
|
7677
7679
|
return (attr?.value?.charAt(0) || '-').toUpperCase();
|
|
7678
7680
|
}
|
|
7679
7681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: StatusAttributeDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7680
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: StatusAttributeDisplayComponent, isStandalone: true, selector: "phoenix-status-attribute-display", inputs: { attr: "attr", dateFormat: "dateFormat" }, outputs: { listItemClick: "listItemClick" }, ngImport: i0, template: "<div class=\"attribute flex justify-content-start align-items-start\">\n <div class=\"flex flex-column\">\n <!-- LABEL + ICON -->\n <div class=\"flex align-items-start gap-1\">\n <label\n class=\"font-semibold text-500\"\n [ngClass]=\"{\n 'wrap-label': isMultiWordLabel(attr.label | translate),\n 'nowrap-label': !isMultiWordLabel(attr.label | translate)\n }\"\n >\n {{ attr.label | translate }}\n </label>\n <i\n [attr.data-cy]=\"'status-togg-button-item'\"\n *ngIf=\"attr?.tooltip?.length\"\n class=\"pi pi-info-circle text-blue-500 cursor-pointer\"\n style=\"font-size: 0.875rem; line-height: 1\"\n (mouseenter)=\"popover.toggle($event)\"\n (mouseleave)=\"popover.toggle($event)\"\n >\n </i>\n </div>\n\n <!-- VALUE -->\n <div\n *ngIf=\"attr?.value; else empty\"\n [ngSwitch]=\"attr.type\"\n style=\"white-space: nowrap\"\n >\n <!-- STRING -->\n <ng-container *ngSwitchCase=\"'STRING'\">\n <!-- If URL exist, render as link -->\n <a\n *ngIf=\"attr.url; else plainText\"\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\"\n >\n {{ attr.value | textLength : 20 }}\n <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n <!-- Pnly text if url doesn't exist -->\n <ng-template #plainText>\n <span [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\">\n {{ attr.value | textLength : 20 }}\n </span>\n </ng-template>\n </ng-container>\n\n <!-- DATE -->\n <span *ngSwitchCase=\"'DATE'\">\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : attr.dateFormat ?? dateFormat)\n : \"--\"\n }}\n </span>\n\n <!-- LINK -->\n\n <a\n *ngSwitchCase=\"'LINK'\"\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ attr.value || \"--\" }} <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n\n <!-- PERSON -->\n <div\n class=\"person-wrap flex align-items-center gap-2\"\n *ngSwitchCase=\"'PERSON'\"\n >\n <div class=\"person-avatar\">\n {{ getPersonInitial(attr) }}\n </div>\n\n <div\n class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\"\n [pTooltip]=\"getPersonTooltip(attr)\"\n >\n {{ getPersonDisplayName(attr) }}\n </div>\n </div>\n\n <!-- COUNTRY -->\n <span *ngSwitchCase=\"'COUNTRY'\">\n <span class=\"flex align-items-center gap-2\">\n <img\n src=\"https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png\"\n [class]=\"'flag flag-' + attr.value?.code.toLowerCase()\"\n style=\"width: 22px\"\n />\n <span\n [pTooltip]=\"attr.value?.name?.length > 20 ? attr.value?.name : null\"\n >\n {{ attr.value?.name || attr.value?.code || \"--\" }}\n </span>\n </span>\n </span>\n\n <!-- LIST -->\n <ul\n *ngSwitchCase=\"'LIST'\"\n class=\"list overflow-x-hidden\"\n style=\"margin-top: 0.25rem\"\n >\n <li\n *ngFor=\"let item of attr.value\"\n [ngClass]=\"item?.disabled ? 'disableLinks' : ''\"\n class=\"white-space-nowrap mb-1 cursor-pointer\"\n (click)=\"!item?.disabled ? listItemClick.emit(item) : null\"\n >\n <span [pTooltip]=\"item?.name?.length > 20 ? item.name : null\">\n {{ item.name | textLength : 20 }}\n </span>\n <i class=\"pi pi-link ml-1 text-sm\"></i>\n </li>\n </ul>\n\n <!-- DEFAULT -->\n <span *ngSwitchDefault [style.color]=\"attr.color\" class=\"text-xl\">\n {{ attr.value || \"--\" }}\n </span>\n </div>\n\n <ng-template #empty>\n <span>--</span>\n </ng-template>\n </div>\n</div>\n\n<p-popover #popover [style]=\"{ maxWidth: '400px' }\">\n <!-- GRID layout for all tooltip items except DATE_PERSON -->\n <div\n style=\"\n display: grid;\n grid-template-columns: max-content 1fr;\n column-gap: 1rem;\n row-gap: 0.5rem;\n align-items: start;\n width: 100%;\n \"\n >\n <ng-container *ngFor=\"let item of attr?.tooltip\">\n <ng-container *ngIf=\"item.type !== statusTooltipType.DATE_PERSON\">\n <!-- Tooltip label -->\n <div class=\"text-sm text-600 text-left\">{{ item.label }}:</div>\n\n <!-- Tooltip value rendering -->\n <div class=\"text-sm text-left break-words\">\n <ng-container [ngSwitch]=\"item?.type || statusTooltipType.TAG\">\n <!-- LINK type: renders as a clickable hyperlink if value exists -->\n <ng-container *ngSwitchCase=\"'LINK'\">\n <a\n *ngIf=\"item.value; else empty\"\n [href]=\"getFullUrl(item.value)\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ item.label || \"Open\" }}\n </a>\n </ng-container>\n\n <!-- STRING type: renders text with truncation and tooltip if too long -->\n <ng-container *ngSwitchCase=\"statusTooltipType.STRING\">\n <div\n *ngIf=\"item.value; else empty\"\n class=\"text-sm\"\n style=\"\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n </ng-container>\n\n <!-- DATE type: formatted date or fallback -->\n <ng-container *ngSwitchCase=\"statusTooltipType.DATE\">\n <span *ngIf=\"item.value; else empty\">\n {{ item.value | date : dateFormat }}\n </span>\n </ng-container>\n\n <!-- PERSON type: shows initial avatar and name if value exists -->\n <ng-container *ngSwitchCase=\"statusTooltipType.PERSON\">\n <ng-container *ngIf=\"item.value; else empty\">\n <span class=\"person-wrap flex items-center gap-1 truncate\">\n <div\n class=\"person-avatar small\"\n style=\"font-size: 0.875rem; line-height: 1\"\n >\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <span class=\"truncate\">\n {{ item.value }} {{ item.value1 }}\n </span>\n </span>\n </ng-container>\n </ng-container>\n\n <!-- TAG or unknown type: uses phoenix-tag if value exists -->\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"item.value; else empty\">\n <div class=\"flex gap-2\">\n <span> {{ item.value }} </span>\n <phoenix-tag\n [customColor]=\"item.value2 || ''\"\n [content]=\"item.value1 || ''\"\n >\n </phoenix-tag>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </div>\n\n <!-- Separate layout for DATE_PERSON entries (includes avatar and date) -->\n <ng-container *ngFor=\"let item of attr?.tooltip\">\n <ng-container *ngIf=\"item.type === statusTooltipType.DATE_PERSON\">\n <ng-container *ngIf=\"item.value; else emptyDatePerson\">\n <div>\n <!-- Label -->\n <div\n class=\"font-sm text-600 truncate mb-1\"\n [pTooltip]=\"item.label.length > 20 ? item.label : undefined\"\n >\n {{ item.label }}\n </div>\n <!-- Avatar and person name/date -->\n <div class=\"flex items-center gap-2 person-wrap\">\n <div class=\"person-avatar\">\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <div>\n <div\n class=\"text-blue-800 font-sm\"\n style=\"\n word-break: break-word;\n white-space: normal;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n <div class=\"text-sm\">{{ item.value1 | date : dateFormat }}</div>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- Fallback for empty DATE_PERSON -->\n <ng-template #emptyDatePerson>\n <div class=\"text-sm\">--</div>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- Shared fallback for missing or empty values -->\n <ng-template #empty>\n <span>--</span>\n </ng-template>\n</p-popover>\n\n<ng-template #empty><span>--</span></ng-template>\n", styles: [".description{flex-grow:1;min-width:300px;max-width:350px}.status-bar-attributes{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.status-bar-attribute-item{flex-shrink:0}.attribute{margin-left:10px;margin-right:10px;max-width:250px;min-width:100px}.attribute:last-child{margin-right:0}ul{list-style:none;padding:0;margin:0}.type-icon{background-color:#e94260;border-radius:3px}label{display:inline-block;margin-right:5px;margin-bottom:5px}.wrap-label{white-space:normal;word-break:break-word;max-width:10rem;line-height:1.2}.nowrap-label{white-space:nowrap}.list{overflow:auto;height:57px}.list li{cursor:pointer;color:var(--blue-500)}.list li:hover{color:#e94260}.toggler{position:relative}.toggler button{padding:2px 7px 0}.toggler button .pi{padding:0!important;font-size:.8rem}.toggler:after{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);opacity:.4;position:absolute;top:50%;left:40px}.toggler:before{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);position:absolute;opacity:.4;top:50%;left:-37px}.disableLinks{color:#77787b!important;cursor:not-allowed!important;opacity:.5;text-decoration:none}.collapsed{height:0px;padding:0;transition:.4s cubic-bezier(.86,0,.07,1)}.person-wrap{display:flex;align-items:center;padding:0;width:150px}.person-wrap p{margin:0}.person-wrap .person-avatar{display:flex;justify-content:center;align-items:center;width:22px;height:22px;min-width:22px;min-height:22px;margin-right:5px;background-color:#e94260;color:#fff;border-radius:50%;font-size:.8rem}.person-wrap .person-avatar.small{width:16px;height:16px;min-width:16px;min-height:16px;margin-right:4px;padding:0;font-size:.65rem;line-height:1}.person-wrap .person-name :first-child{font-size:1.2rem}::ng-deep .wide-popover .p-popover-panel{max-width:400px!important;width:auto!important;word-break:break-word;white-space:normal}.flag-emoji{font-size:1.5rem;line-height:1;display:inline-block;transform:translateY(2px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: TagComponent, selector: "phoenix-tag", inputs: ["key", "content", "customColor"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: TextLength, name: "textLength" }] });
|
|
7682
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: StatusAttributeDisplayComponent, isStandalone: true, selector: "phoenix-status-attribute-display", inputs: { attr: "attr", dateFormat: "dateFormat" }, outputs: { listItemClick: "listItemClick" }, ngImport: i0, template: "<div class=\"attribute flex justify-content-start align-items-start\">\n <div class=\"flex flex-column\">\n <!-- LABEL + ICON -->\n <div class=\"flex align-items-start gap-1\">\n <label\n class=\"font-semibold text-500\"\n [ngClass]=\"{\n 'wrap-label': isMultiWordLabel(attr.label | translate),\n 'nowrap-label': !isMultiWordLabel(attr.label | translate)\n }\"\n >\n {{ attr.label | translate }}\n </label>\n\n @if (attr?.tooltip?.length) {\n <i\n [attr.data-cy]=\"'status-togg-button-item'\"\n class=\"pi pi-info-circle text-blue-500 cursor-pointer\"\n style=\"font-size: 0.875rem; line-height: 1\"\n (mouseenter)=\"popover.toggle($event)\"\n (mouseleave)=\"popover.toggle($event)\"\n ></i>\n }\n </div>\n\n <!-- VALUE -->\n @if (attr?.value) {\n <!-- removed [ngSwitch]=\"attr.type\" because @switch handles it -->\n <div style=\"white-space: nowrap\">\n @switch (attr.type) {\n\n @case ('STRING') {\n @if (attr.url) {\n <a\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\"\n >\n {{ attr.value | textLength : 20 }}\n <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n } @else {\n <span [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\">\n {{ attr.value | textLength : 20 }}\n </span>\n }\n }\n\n @case ('DATE') {\n <span>\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : attr.dateFormat ?? dateFormat)\n : \"--\"\n }}\n </span>\n }\n\n @case ('DATE_ONLY') {\n <span>\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : 'dd.MM.yyyy')\n : \"--\"\n }}\n </span>\n }\n\n @case ('LINK') {\n <a\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ attr.value || \"--\" }} <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n }\n\n @case ('PERSON') {\n <div class=\"person-wrap flex align-items-center gap-2\">\n <div class=\"person-avatar\">\n {{ getPersonInitial(attr) }}\n </div>\n\n <div\n class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\"\n [pTooltip]=\"getPersonTooltip(attr)\"\n >\n {{ getPersonDisplayName(attr) }}\n </div>\n </div>\n }\n\n @case ('COUNTRY') {\n <span>\n <span class=\"flex align-items-center gap-2\">\n <img\n src=\"https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png\"\n [class]=\"'flag flag-' + attr.value?.code.toLowerCase()\"\n style=\"width: 22px\"\n />\n <span\n [pTooltip]=\"attr.value?.name?.length > 20 ? attr.value?.name : null\"\n >\n {{ attr.value?.name || attr.value?.code || \"--\" }}\n </span>\n </span>\n </span>\n }\n\n @case ('LIST') {\n <ul class=\"list overflow-x-hidden\" style=\"margin-top: 0.25rem\">\n @for (item of attr.value; track $index) {\n <li\n [ngClass]=\"item?.disabled ? 'disableLinks' : ''\"\n class=\"white-space-nowrap mb-1 cursor-pointer\"\n (click)=\"!item?.disabled ? listItemClick.emit(item) : null\"\n >\n <span [pTooltip]=\"item?.name?.length > 20 ? item.name : null\">\n {{ item.name | textLength : 20 }}\n </span>\n <i class=\"pi pi-link ml-1 text-sm\"></i>\n </li>\n }\n </ul>\n }\n\n @default {\n <span [style.color]=\"attr.color\" class=\"text-xl\">\n {{ attr.value || \"--\" }}\n </span>\n }\n }\n </div>\n } @else {\n <span>--</span>\n }\n </div>\n</div>\n\n<p-popover #popover [style]=\"{ maxWidth: '400px' }\">\n <div\n style=\"\n display: grid;\n grid-template-columns: max-content 1fr;\n column-gap: 1rem;\n row-gap: 0.5rem;\n align-items: start;\n width: 100%;\n \"\n >\n @for (item of attr?.tooltip; track $index) {\n @if (item.type !== statusTooltipType.DATE_PERSON) {\n <div class=\"text-sm text-600 text-left\">{{ item.label }}:</div>\n\n <div class=\"text-sm text-left break-words\">\n @switch (item?.type || statusTooltipType.TAG) {\n\n @case ('LINK') {\n @if (item.value) {\n <a\n [href]=\"getFullUrl(item.value)\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ item.label || \"Open\" }}\n </a>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.STRING) {\n @if (item.value) {\n <div\n class=\"text-sm\"\n style=\"\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.DATE) {\n @if (item.value) {\n <span>{{ item.value | date : dateFormat }}</span>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.PERSON) {\n @if (item.value) {\n <span class=\"person-wrap flex items-center gap-1 truncate\">\n <div\n class=\"person-avatar small\"\n style=\"font-size: 0.875rem; line-height: 1\"\n >\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <span class=\"truncate\">\n {{ item.value }} {{ item.value1 }}\n </span>\n </span>\n } @else {\n <span>--</span>\n }\n }\n\n @default {\n @if (item.value) {\n <div class=\"flex gap-2\">\n <span>{{ item.value }}</span>\n <phoenix-tag\n [customColor]=\"item.value2 || ''\"\n [content]=\"item.value1 || ''\"\n ></phoenix-tag>\n </div>\n } @else {\n <span>--</span>\n }\n }\n }\n </div>\n }\n }\n </div>\n\n @for (item of attr?.tooltip; track $index) {\n @if (item.type === statusTooltipType.DATE_PERSON) {\n @if (item.value) {\n <div>\n <div\n class=\"font-sm text-600 truncate mb-1\"\n [pTooltip]=\"item.label.length > 20 ? item.label : undefined\"\n >\n {{ item.label }}\n </div>\n\n <div class=\"flex items-center gap-2 person-wrap\">\n <div class=\"person-avatar\">\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n\n <div>\n <div\n class=\"text-blue-800 font-sm\"\n style=\"\n word-break: break-word;\n white-space: normal;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n <div class=\"text-sm\">{{ item.value1 | date : dateFormat }}</div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"text-sm\">--</div>\n }\n }\n }\n</p-popover>", styles: [".description{flex-grow:1;min-width:300px;max-width:350px}.status-bar-attributes{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.status-bar-attribute-item{flex-shrink:0}.attribute{margin-left:10px;margin-right:10px;max-width:250px;min-width:100px}.attribute:last-child{margin-right:0}ul{list-style:none;padding:0;margin:0}.type-icon{background-color:#e94260;border-radius:3px}label{display:inline-block;margin-right:5px;margin-bottom:5px}.wrap-label{white-space:normal;word-break:break-word;max-width:10rem;line-height:1.2}.nowrap-label{white-space:nowrap}.list{overflow:auto;height:57px}.list li{cursor:pointer;color:var(--blue-500)}.list li:hover{color:#e94260}.toggler{position:relative}.toggler button{padding:2px 7px 0}.toggler button .pi{padding:0!important;font-size:.8rem}.toggler:after{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);opacity:.4;position:absolute;top:50%;left:40px}.toggler:before{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);position:absolute;opacity:.4;top:50%;left:-37px}.disableLinks{color:#77787b!important;cursor:not-allowed!important;opacity:.5;text-decoration:none}.collapsed{height:0px;padding:0;transition:.4s cubic-bezier(.86,0,.07,1)}.person-wrap{display:flex;align-items:center;padding:0;width:150px}.person-wrap p{margin:0}.person-wrap .person-avatar{display:flex;justify-content:center;align-items:center;width:22px;height:22px;min-width:22px;min-height:22px;margin-right:5px;background-color:#e94260;color:#fff;border-radius:50%;font-size:.8rem}.person-wrap .person-avatar.small{width:16px;height:16px;min-width:16px;min-height:16px;margin-right:4px;padding:0;font-size:.65rem;line-height:1}.person-wrap .person-name :first-child{font-size:1.2rem}::ng-deep .wide-popover .p-popover-panel{max-width:400px!important;width:auto!important;word-break:break-word;white-space:normal}.flag-emoji{font-size:1.5rem;line-height:1;display:inline-block;transform:translateY(2px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$3.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: TagComponent, selector: "phoenix-tag", inputs: ["key", "content", "customColor"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: TextLength, name: "textLength" }] });
|
|
7681
7683
|
}
|
|
7682
7684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: StatusAttributeDisplayComponent, decorators: [{
|
|
7683
7685
|
type: Component,
|
|
@@ -7689,7 +7691,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7689
7691
|
TranslateModule,
|
|
7690
7692
|
AvatarModule,
|
|
7691
7693
|
TextLength,
|
|
7692
|
-
], template: "<div class=\"attribute flex justify-content-start align-items-start\">\n <div class=\"flex flex-column\">\n <!-- LABEL + ICON -->\n <div class=\"flex align-items-start gap-1\">\n <label\n class=\"font-semibold text-500\"\n [ngClass]=\"{\n 'wrap-label': isMultiWordLabel(attr.label | translate),\n 'nowrap-label': !isMultiWordLabel(attr.label | translate)\n }\"\n >\n {{ attr.label | translate }}\n </label>\n <i\n [attr.data-cy]=\"'status-togg-button-item'\"\n *ngIf=\"attr?.tooltip?.length\"\n class=\"pi pi-info-circle text-blue-500 cursor-pointer\"\n style=\"font-size: 0.875rem; line-height: 1\"\n (mouseenter)=\"popover.toggle($event)\"\n (mouseleave)=\"popover.toggle($event)\"\n >\n </i>\n </div>\n\n <!-- VALUE -->\n <div\n *ngIf=\"attr?.value; else empty\"\n [ngSwitch]=\"attr.type\"\n style=\"white-space: nowrap\"\n >\n <!-- STRING -->\n <ng-container *ngSwitchCase=\"'STRING'\">\n <!-- If URL exist, render as link -->\n <a\n *ngIf=\"attr.url; else plainText\"\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\"\n >\n {{ attr.value | textLength : 20 }}\n <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n <!-- Pnly text if url doesn't exist -->\n <ng-template #plainText>\n <span [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\">\n {{ attr.value | textLength : 20 }}\n </span>\n </ng-template>\n </ng-container>\n\n <!-- DATE -->\n <span *ngSwitchCase=\"'DATE'\">\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : attr.dateFormat ?? dateFormat)\n : \"--\"\n }}\n </span>\n\n <!-- LINK -->\n\n <a\n *ngSwitchCase=\"'LINK'\"\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ attr.value || \"--\" }} <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n\n <!-- PERSON -->\n <div\n class=\"person-wrap flex align-items-center gap-2\"\n *ngSwitchCase=\"'PERSON'\"\n >\n <div class=\"person-avatar\">\n {{ getPersonInitial(attr) }}\n </div>\n\n <div\n class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\"\n [pTooltip]=\"getPersonTooltip(attr)\"\n >\n {{ getPersonDisplayName(attr) }}\n </div>\n </div>\n\n <!-- COUNTRY -->\n <span *ngSwitchCase=\"'COUNTRY'\">\n <span class=\"flex align-items-center gap-2\">\n <img\n src=\"https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png\"\n [class]=\"'flag flag-' + attr.value?.code.toLowerCase()\"\n style=\"width: 22px\"\n />\n <span\n [pTooltip]=\"attr.value?.name?.length > 20 ? attr.value?.name : null\"\n >\n {{ attr.value?.name || attr.value?.code || \"--\" }}\n </span>\n </span>\n </span>\n\n <!-- LIST -->\n <ul\n *ngSwitchCase=\"'LIST'\"\n class=\"list overflow-x-hidden\"\n style=\"margin-top: 0.25rem\"\n >\n <li\n *ngFor=\"let item of attr.value\"\n [ngClass]=\"item?.disabled ? 'disableLinks' : ''\"\n class=\"white-space-nowrap mb-1 cursor-pointer\"\n (click)=\"!item?.disabled ? listItemClick.emit(item) : null\"\n >\n <span [pTooltip]=\"item?.name?.length > 20 ? item.name : null\">\n {{ item.name | textLength : 20 }}\n </span>\n <i class=\"pi pi-link ml-1 text-sm\"></i>\n </li>\n </ul>\n\n <!-- DEFAULT -->\n <span *ngSwitchDefault [style.color]=\"attr.color\" class=\"text-xl\">\n {{ attr.value || \"--\" }}\n </span>\n </div>\n\n <ng-template #empty>\n <span>--</span>\n </ng-template>\n </div>\n</div>\n\n<p-popover #popover [style]=\"{ maxWidth: '400px' }\">\n <!-- GRID layout for all tooltip items except DATE_PERSON -->\n <div\n style=\"\n display: grid;\n grid-template-columns: max-content 1fr;\n column-gap: 1rem;\n row-gap: 0.5rem;\n align-items: start;\n width: 100%;\n \"\n >\n <ng-container *ngFor=\"let item of attr?.tooltip\">\n <ng-container *ngIf=\"item.type !== statusTooltipType.DATE_PERSON\">\n <!-- Tooltip label -->\n <div class=\"text-sm text-600 text-left\">{{ item.label }}:</div>\n\n <!-- Tooltip value rendering -->\n <div class=\"text-sm text-left break-words\">\n <ng-container [ngSwitch]=\"item?.type || statusTooltipType.TAG\">\n <!-- LINK type: renders as a clickable hyperlink if value exists -->\n <ng-container *ngSwitchCase=\"'LINK'\">\n <a\n *ngIf=\"item.value; else empty\"\n [href]=\"getFullUrl(item.value)\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ item.label || \"Open\" }}\n </a>\n </ng-container>\n\n <!-- STRING type: renders text with truncation and tooltip if too long -->\n <ng-container *ngSwitchCase=\"statusTooltipType.STRING\">\n <div\n *ngIf=\"item.value; else empty\"\n class=\"text-sm\"\n style=\"\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n </ng-container>\n\n <!-- DATE type: formatted date or fallback -->\n <ng-container *ngSwitchCase=\"statusTooltipType.DATE\">\n <span *ngIf=\"item.value; else empty\">\n {{ item.value | date : dateFormat }}\n </span>\n </ng-container>\n\n <!-- PERSON type: shows initial avatar and name if value exists -->\n <ng-container *ngSwitchCase=\"statusTooltipType.PERSON\">\n <ng-container *ngIf=\"item.value; else empty\">\n <span class=\"person-wrap flex items-center gap-1 truncate\">\n <div\n class=\"person-avatar small\"\n style=\"font-size: 0.875rem; line-height: 1\"\n >\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <span class=\"truncate\">\n {{ item.value }} {{ item.value1 }}\n </span>\n </span>\n </ng-container>\n </ng-container>\n\n <!-- TAG or unknown type: uses phoenix-tag if value exists -->\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"item.value; else empty\">\n <div class=\"flex gap-2\">\n <span> {{ item.value }} </span>\n <phoenix-tag\n [customColor]=\"item.value2 || ''\"\n [content]=\"item.value1 || ''\"\n >\n </phoenix-tag>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </div>\n\n <!-- Separate layout for DATE_PERSON entries (includes avatar and date) -->\n <ng-container *ngFor=\"let item of attr?.tooltip\">\n <ng-container *ngIf=\"item.type === statusTooltipType.DATE_PERSON\">\n <ng-container *ngIf=\"item.value; else emptyDatePerson\">\n <div>\n <!-- Label -->\n <div\n class=\"font-sm text-600 truncate mb-1\"\n [pTooltip]=\"item.label.length > 20 ? item.label : undefined\"\n >\n {{ item.label }}\n </div>\n <!-- Avatar and person name/date -->\n <div class=\"flex items-center gap-2 person-wrap\">\n <div class=\"person-avatar\">\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <div>\n <div\n class=\"text-blue-800 font-sm\"\n style=\"\n word-break: break-word;\n white-space: normal;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n <div class=\"text-sm\">{{ item.value1 | date : dateFormat }}</div>\n </div>\n </div>\n </div>\n </ng-container>\n <!-- Fallback for empty DATE_PERSON -->\n <ng-template #emptyDatePerson>\n <div class=\"text-sm\">--</div>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <!-- Shared fallback for missing or empty values -->\n <ng-template #empty>\n <span>--</span>\n </ng-template>\n</p-popover>\n\n<ng-template #empty><span>--</span></ng-template>\n", styles: [".description{flex-grow:1;min-width:300px;max-width:350px}.status-bar-attributes{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.status-bar-attribute-item{flex-shrink:0}.attribute{margin-left:10px;margin-right:10px;max-width:250px;min-width:100px}.attribute:last-child{margin-right:0}ul{list-style:none;padding:0;margin:0}.type-icon{background-color:#e94260;border-radius:3px}label{display:inline-block;margin-right:5px;margin-bottom:5px}.wrap-label{white-space:normal;word-break:break-word;max-width:10rem;line-height:1.2}.nowrap-label{white-space:nowrap}.list{overflow:auto;height:57px}.list li{cursor:pointer;color:var(--blue-500)}.list li:hover{color:#e94260}.toggler{position:relative}.toggler button{padding:2px 7px 0}.toggler button .pi{padding:0!important;font-size:.8rem}.toggler:after{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);opacity:.4;position:absolute;top:50%;left:40px}.toggler:before{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);position:absolute;opacity:.4;top:50%;left:-37px}.disableLinks{color:#77787b!important;cursor:not-allowed!important;opacity:.5;text-decoration:none}.collapsed{height:0px;padding:0;transition:.4s cubic-bezier(.86,0,.07,1)}.person-wrap{display:flex;align-items:center;padding:0;width:150px}.person-wrap p{margin:0}.person-wrap .person-avatar{display:flex;justify-content:center;align-items:center;width:22px;height:22px;min-width:22px;min-height:22px;margin-right:5px;background-color:#e94260;color:#fff;border-radius:50%;font-size:.8rem}.person-wrap .person-avatar.small{width:16px;height:16px;min-width:16px;min-height:16px;margin-right:4px;padding:0;font-size:.65rem;line-height:1}.person-wrap .person-name :first-child{font-size:1.2rem}::ng-deep .wide-popover .p-popover-panel{max-width:400px!important;width:auto!important;word-break:break-word;white-space:normal}.flag-emoji{font-size:1.5rem;line-height:1;display:inline-block;transform:translateY(2px)}\n"] }]
|
|
7694
|
+
], template: "<div class=\"attribute flex justify-content-start align-items-start\">\n <div class=\"flex flex-column\">\n <!-- LABEL + ICON -->\n <div class=\"flex align-items-start gap-1\">\n <label\n class=\"font-semibold text-500\"\n [ngClass]=\"{\n 'wrap-label': isMultiWordLabel(attr.label | translate),\n 'nowrap-label': !isMultiWordLabel(attr.label | translate)\n }\"\n >\n {{ attr.label | translate }}\n </label>\n\n @if (attr?.tooltip?.length) {\n <i\n [attr.data-cy]=\"'status-togg-button-item'\"\n class=\"pi pi-info-circle text-blue-500 cursor-pointer\"\n style=\"font-size: 0.875rem; line-height: 1\"\n (mouseenter)=\"popover.toggle($event)\"\n (mouseleave)=\"popover.toggle($event)\"\n ></i>\n }\n </div>\n\n <!-- VALUE -->\n @if (attr?.value) {\n <!-- removed [ngSwitch]=\"attr.type\" because @switch handles it -->\n <div style=\"white-space: nowrap\">\n @switch (attr.type) {\n\n @case ('STRING') {\n @if (attr.url) {\n <a\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\"\n >\n {{ attr.value | textLength : 20 }}\n <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n } @else {\n <span [pTooltip]=\"attr.value?.length > 20 ? attr.value : null\">\n {{ attr.value | textLength : 20 }}\n </span>\n }\n }\n\n @case ('DATE') {\n <span>\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : attr.dateFormat ?? dateFormat)\n : \"--\"\n }}\n </span>\n }\n\n @case ('DATE_ONLY') {\n <span>\n <i class=\"pi pi-calendar text-blue-900\"></i>\n {{\n attr.value\n ? (attr.value | date : 'dd.MM.yyyy')\n : \"--\"\n }}\n </span>\n }\n\n @case ('LINK') {\n <a\n [href]=\"attr.url\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ attr.value || \"--\" }} <i class=\"ml-1\" [class]=\"attr.icon\"></i>\n </a>\n }\n\n @case ('PERSON') {\n <div class=\"person-wrap flex align-items-center gap-2\">\n <div class=\"person-avatar\">\n {{ getPersonInitial(attr) }}\n </div>\n\n <div\n class=\"white-space-nowrap overflow-hidden text-overflow-ellipsis\"\n [pTooltip]=\"getPersonTooltip(attr)\"\n >\n {{ getPersonDisplayName(attr) }}\n </div>\n </div>\n }\n\n @case ('COUNTRY') {\n <span>\n <span class=\"flex align-items-center gap-2\">\n <img\n src=\"https://primefaces.org/cdn/primeng/images/demo/flag/flag_placeholder.png\"\n [class]=\"'flag flag-' + attr.value?.code.toLowerCase()\"\n style=\"width: 22px\"\n />\n <span\n [pTooltip]=\"attr.value?.name?.length > 20 ? attr.value?.name : null\"\n >\n {{ attr.value?.name || attr.value?.code || \"--\" }}\n </span>\n </span>\n </span>\n }\n\n @case ('LIST') {\n <ul class=\"list overflow-x-hidden\" style=\"margin-top: 0.25rem\">\n @for (item of attr.value; track $index) {\n <li\n [ngClass]=\"item?.disabled ? 'disableLinks' : ''\"\n class=\"white-space-nowrap mb-1 cursor-pointer\"\n (click)=\"!item?.disabled ? listItemClick.emit(item) : null\"\n >\n <span [pTooltip]=\"item?.name?.length > 20 ? item.name : null\">\n {{ item.name | textLength : 20 }}\n </span>\n <i class=\"pi pi-link ml-1 text-sm\"></i>\n </li>\n }\n </ul>\n }\n\n @default {\n <span [style.color]=\"attr.color\" class=\"text-xl\">\n {{ attr.value || \"--\" }}\n </span>\n }\n }\n </div>\n } @else {\n <span>--</span>\n }\n </div>\n</div>\n\n<p-popover #popover [style]=\"{ maxWidth: '400px' }\">\n <div\n style=\"\n display: grid;\n grid-template-columns: max-content 1fr;\n column-gap: 1rem;\n row-gap: 0.5rem;\n align-items: start;\n width: 100%;\n \"\n >\n @for (item of attr?.tooltip; track $index) {\n @if (item.type !== statusTooltipType.DATE_PERSON) {\n <div class=\"text-sm text-600 text-left\">{{ item.label }}:</div>\n\n <div class=\"text-sm text-left break-words\">\n @switch (item?.type || statusTooltipType.TAG) {\n\n @case ('LINK') {\n @if (item.value) {\n <a\n [href]=\"getFullUrl(item.value)\"\n target=\"_blank\"\n rel=\"noopener\"\n class=\"text-blue-500 underline\"\n >\n {{ item.label || \"Open\" }}\n </a>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.STRING) {\n @if (item.value) {\n <div\n class=\"text-sm\"\n style=\"\n white-space: normal;\n word-break: break-word;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.DATE) {\n @if (item.value) {\n <span>{{ item.value | date : dateFormat }}</span>\n } @else {\n <span>--</span>\n }\n }\n\n @case (statusTooltipType.PERSON) {\n @if (item.value) {\n <span class=\"person-wrap flex items-center gap-1 truncate\">\n <div\n class=\"person-avatar small\"\n style=\"font-size: 0.875rem; line-height: 1\"\n >\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n <span class=\"truncate\">\n {{ item.value }} {{ item.value1 }}\n </span>\n </span>\n } @else {\n <span>--</span>\n }\n }\n\n @default {\n @if (item.value) {\n <div class=\"flex gap-2\">\n <span>{{ item.value }}</span>\n <phoenix-tag\n [customColor]=\"item.value2 || ''\"\n [content]=\"item.value1 || ''\"\n ></phoenix-tag>\n </div>\n } @else {\n <span>--</span>\n }\n }\n }\n </div>\n }\n }\n </div>\n\n @for (item of attr?.tooltip; track $index) {\n @if (item.type === statusTooltipType.DATE_PERSON) {\n @if (item.value) {\n <div>\n <div\n class=\"font-sm text-600 truncate mb-1\"\n [pTooltip]=\"item.label.length > 20 ? item.label : undefined\"\n >\n {{ item.label }}\n </div>\n\n <div class=\"flex items-center gap-2 person-wrap\">\n <div class=\"person-avatar\">\n {{ item?.value?.charAt(0)?.toUpperCase() }}\n </div>\n\n <div>\n <div\n class=\"text-blue-800 font-sm\"\n style=\"\n word-break: break-word;\n white-space: normal;\n overflow-wrap: break-word;\n \"\n >\n {{ item.value }}\n </div>\n <div class=\"text-sm\">{{ item.value1 | date : dateFormat }}</div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"text-sm\">--</div>\n }\n }\n }\n</p-popover>", styles: [".description{flex-grow:1;min-width:300px;max-width:350px}.status-bar-attributes{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.status-bar-attribute-item{flex-shrink:0}.attribute{margin-left:10px;margin-right:10px;max-width:250px;min-width:100px}.attribute:last-child{margin-right:0}ul{list-style:none;padding:0;margin:0}.type-icon{background-color:#e94260;border-radius:3px}label{display:inline-block;margin-right:5px;margin-bottom:5px}.wrap-label{white-space:normal;word-break:break-word;max-width:10rem;line-height:1.2}.nowrap-label{white-space:nowrap}.list{overflow:auto;height:57px}.list li{cursor:pointer;color:var(--blue-500)}.list li:hover{color:#e94260}.toggler{position:relative}.toggler button{padding:2px 7px 0}.toggler button .pi{padding:0!important;font-size:.8rem}.toggler:after{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);opacity:.4;position:absolute;top:50%;left:40px}.toggler:before{content:\"\";display:block;height:1px;width:30px;background:var(--gray-400);position:absolute;opacity:.4;top:50%;left:-37px}.disableLinks{color:#77787b!important;cursor:not-allowed!important;opacity:.5;text-decoration:none}.collapsed{height:0px;padding:0;transition:.4s cubic-bezier(.86,0,.07,1)}.person-wrap{display:flex;align-items:center;padding:0;width:150px}.person-wrap p{margin:0}.person-wrap .person-avatar{display:flex;justify-content:center;align-items:center;width:22px;height:22px;min-width:22px;min-height:22px;margin-right:5px;background-color:#e94260;color:#fff;border-radius:50%;font-size:.8rem}.person-wrap .person-avatar.small{width:16px;height:16px;min-width:16px;min-height:16px;margin-right:4px;padding:0;font-size:.65rem;line-height:1}.person-wrap .person-name :first-child{font-size:1.2rem}::ng-deep .wide-popover .p-popover-panel{max-width:400px!important;width:auto!important;word-break:break-word;white-space:normal}.flag-emoji{font-size:1.5rem;line-height:1;display:inline-block;transform:translateY(2px)}\n"] }]
|
|
7693
7695
|
}], propDecorators: { attr: [{
|
|
7694
7696
|
type: Input
|
|
7695
7697
|
}], dateFormat: [{
|
|
@@ -8752,8 +8754,8 @@ class MetaStartDueDateV2Component {
|
|
|
8752
8754
|
* NOTE: "YYYY-MM-DD" strings are parsed as local dates to avoid timezone day-shifts.
|
|
8753
8755
|
*/
|
|
8754
8756
|
writeValue(v) {
|
|
8755
|
-
this.startDate = this.
|
|
8756
|
-
this.endDate = this.
|
|
8757
|
+
this.startDate = this.parseToDate(v?.startDate ?? null);
|
|
8758
|
+
this.endDate = this.parseToDate(v?.endDate ?? null);
|
|
8757
8759
|
// OnPush: ensure UI reflects external value writes (patchValue/setValue)
|
|
8758
8760
|
this.cdr.markForCheck();
|
|
8759
8761
|
}
|
|
@@ -8793,7 +8795,7 @@ class MetaStartDueDateV2Component {
|
|
|
8793
8795
|
onStartChange(d) {
|
|
8794
8796
|
if (this.disabled)
|
|
8795
8797
|
return;
|
|
8796
|
-
this.startDate =
|
|
8798
|
+
this.startDate = d ?? null;
|
|
8797
8799
|
this.emitChange();
|
|
8798
8800
|
}
|
|
8799
8801
|
/**
|
|
@@ -8803,7 +8805,7 @@ class MetaStartDueDateV2Component {
|
|
|
8803
8805
|
onEndChange(d) {
|
|
8804
8806
|
if (this.disabled)
|
|
8805
8807
|
return;
|
|
8806
|
-
this.endDate =
|
|
8808
|
+
this.endDate = d ?? null;
|
|
8807
8809
|
this.emitChange();
|
|
8808
8810
|
}
|
|
8809
8811
|
/**
|
|
@@ -8842,20 +8844,13 @@ class MetaStartDueDateV2Component {
|
|
|
8842
8844
|
const y = Number(m[1]);
|
|
8843
8845
|
const mo = Number(m[2]) - 1;
|
|
8844
8846
|
const d = Number(m[3]);
|
|
8845
|
-
const local = new Date(y, mo, d
|
|
8847
|
+
const local = new Date(y, mo, d);
|
|
8846
8848
|
return isNaN(local.getTime()) ? null : local;
|
|
8847
8849
|
}
|
|
8848
8850
|
// ISO / other -> fallback
|
|
8849
8851
|
const dt = new Date(s);
|
|
8850
8852
|
return isNaN(dt.getTime()) ? null : dt;
|
|
8851
8853
|
}
|
|
8852
|
-
normalizeDateOnly(d) {
|
|
8853
|
-
if (!d)
|
|
8854
|
-
return null;
|
|
8855
|
-
if (isNaN(d.getTime()))
|
|
8856
|
-
return null;
|
|
8857
|
-
return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
|
|
8858
|
-
}
|
|
8859
8854
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8860
8855
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateV2Component, isStandalone: true, selector: "phoenix-meta-start-due-date-v2", inputs: { dataCy: "dataCy", disable: "disable" }, providers: [
|
|
8861
8856
|
{
|