@fluxhub/fluxhub-lib 19.0.194 → 19.0.196
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.
|
@@ -14873,6 +14873,8 @@ const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3 = {
|
|
|
14873
14873
|
class FHColorPickerComponent {
|
|
14874
14874
|
hidden = false;
|
|
14875
14875
|
enabled = true;
|
|
14876
|
+
/** Larghezza della dialog del color picker (ngx-color-picker cpWidth). */
|
|
14877
|
+
cpWidth = '260px';
|
|
14876
14878
|
change = new EventEmitter();
|
|
14877
14879
|
_color = '#2196F3';
|
|
14878
14880
|
// Colori predefiniti
|
|
@@ -14935,7 +14937,7 @@ class FHColorPickerComponent {
|
|
|
14935
14937
|
return this._color;
|
|
14936
14938
|
}
|
|
14937
14939
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14938
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHColorPickerComponent, isStandalone: true, selector: "FHColorPicker", inputs: { hidden: "hidden", enabled: "enabled", color: "color" }, outputs: { change: "change", colorChange: "colorChange" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3], ngImport: i0, template: `
|
|
14940
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHColorPickerComponent, isStandalone: true, selector: "FHColorPicker", inputs: { hidden: "hidden", enabled: "enabled", cpWidth: "cpWidth", color: "color" }, outputs: { change: "change", colorChange: "colorChange" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$3], ngImport: i0, template: `
|
|
14939
14941
|
<div
|
|
14940
14942
|
*ngIf="!hidden"
|
|
14941
14943
|
class="color-picker-circle"
|
|
@@ -14944,6 +14946,7 @@ class FHColorPickerComponent {
|
|
|
14944
14946
|
[(colorPicker)]="_color"
|
|
14945
14947
|
[cpPosition]="'bottom'"
|
|
14946
14948
|
[cpPositionRelativeToArrow]="true"
|
|
14949
|
+
[cpWidth]="cpWidth"
|
|
14947
14950
|
[cpPresetColors]="presetColors"
|
|
14948
14951
|
[cpPresetLabel]="'Colori predefiniti'"
|
|
14949
14952
|
[cpOKButton]="true"
|
|
@@ -14957,7 +14960,7 @@ class FHColorPickerComponent {
|
|
|
14957
14960
|
(colorPickerChange)="onColorChange($event)"
|
|
14958
14961
|
(colorPickerSelect)="onColorSelect($event)">
|
|
14959
14962
|
</div>
|
|
14960
|
-
`, isInline: true, styles: [":host{display:inline-block}.color-picker-circle{width:35px;height:35px;border:1px solid #333;border-radius:50%;cursor:pointer;transition:all .2s ease}.color-picker-circle:hover:not(.disabled){transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.color-picker-circle.disabled{cursor:not-allowed;opacity:.6}::ng-deep .color-picker .button-area{display:flex!important;flex-direction:row!important;justify-content:
|
|
14963
|
+
`, isInline: true, styles: [":host{display:inline-block}.color-picker-circle{width:35px;height:35px;border:1px solid #333;border-radius:50%;cursor:pointer;transition:all .2s ease}.color-picker-circle:hover:not(.disabled){transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.color-picker-circle.disabled{cursor:not-allowed;opacity:.6}::ng-deep .color-picker .button-area{display:flex!important;flex-direction:row!important;justify-content:stretch!important;align-items:center!important;gap:10px!important;padding:14px 16px 16px!important;box-sizing:border-box!important}::ng-deep .custom-ok-button{background-color:#1976d2!important;color:#fff!important;border:none!important;padding:9px 12px!important;border-radius:6px!important;font-weight:600!important;font-size:13px!important;letter-spacing:.02em!important;line-height:1.2!important;white-space:nowrap!important;cursor:pointer!important;transition:background-color .2s ease!important;flex:1 1 0!important;min-width:0!important}::ng-deep .custom-ok-button:hover{background-color:#1565c0!important;box-shadow:0 2px 4px #0003!important}::ng-deep .custom-cancel-button{background-color:#f5f5f5!important;color:#424242!important;border:1px solid #ddd!important;padding:9px 12px!important;border-radius:6px!important;font-weight:600!important;font-size:13px!important;letter-spacing:.02em!important;line-height:1.2!important;white-space:nowrap!important;cursor:pointer!important;transition:all .2s ease!important;flex:1 1 0!important;min-width:0!important}::ng-deep .custom-cancel-button:hover{background-color:#eee!important;border-color:#ccc!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ColorPickerDirective, selector: "[colorPicker]", inputs: ["colorPicker", "cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpEyeDropper", "cpPresetLabel", "cpPresetColors", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "cpArrowPosition", "cpExtraTemplate"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
14961
14964
|
}
|
|
14962
14965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHColorPickerComponent, decorators: [{
|
|
14963
14966
|
type: Component,
|
|
@@ -14974,6 +14977,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
14974
14977
|
[(colorPicker)]="_color"
|
|
14975
14978
|
[cpPosition]="'bottom'"
|
|
14976
14979
|
[cpPositionRelativeToArrow]="true"
|
|
14980
|
+
[cpWidth]="cpWidth"
|
|
14977
14981
|
[cpPresetColors]="presetColors"
|
|
14978
14982
|
[cpPresetLabel]="'Colori predefiniti'"
|
|
14979
14983
|
[cpOKButton]="true"
|
|
@@ -14987,11 +14991,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
14987
14991
|
(colorPickerChange)="onColorChange($event)"
|
|
14988
14992
|
(colorPickerSelect)="onColorSelect($event)">
|
|
14989
14993
|
</div>
|
|
14990
|
-
`, styles: [":host{display:inline-block}.color-picker-circle{width:35px;height:35px;border:1px solid #333;border-radius:50%;cursor:pointer;transition:all .2s ease}.color-picker-circle:hover:not(.disabled){transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.color-picker-circle.disabled{cursor:not-allowed;opacity:.6}::ng-deep .color-picker .button-area{display:flex!important;flex-direction:row!important;justify-content:
|
|
14994
|
+
`, styles: [":host{display:inline-block}.color-picker-circle{width:35px;height:35px;border:1px solid #333;border-radius:50%;cursor:pointer;transition:all .2s ease}.color-picker-circle:hover:not(.disabled){transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.color-picker-circle.disabled{cursor:not-allowed;opacity:.6}::ng-deep .color-picker .button-area{display:flex!important;flex-direction:row!important;justify-content:stretch!important;align-items:center!important;gap:10px!important;padding:14px 16px 16px!important;box-sizing:border-box!important}::ng-deep .custom-ok-button{background-color:#1976d2!important;color:#fff!important;border:none!important;padding:9px 12px!important;border-radius:6px!important;font-weight:600!important;font-size:13px!important;letter-spacing:.02em!important;line-height:1.2!important;white-space:nowrap!important;cursor:pointer!important;transition:background-color .2s ease!important;flex:1 1 0!important;min-width:0!important}::ng-deep .custom-ok-button:hover{background-color:#1565c0!important;box-shadow:0 2px 4px #0003!important}::ng-deep .custom-cancel-button{background-color:#f5f5f5!important;color:#424242!important;border:1px solid #ddd!important;padding:9px 12px!important;border-radius:6px!important;font-weight:600!important;font-size:13px!important;letter-spacing:.02em!important;line-height:1.2!important;white-space:nowrap!important;cursor:pointer!important;transition:all .2s ease!important;flex:1 1 0!important;min-width:0!important}::ng-deep .custom-cancel-button:hover{background-color:#eee!important;border-color:#ccc!important}\n"] }]
|
|
14991
14995
|
}], ctorParameters: () => [], propDecorators: { hidden: [{
|
|
14992
14996
|
type: Input
|
|
14993
14997
|
}], enabled: [{
|
|
14994
14998
|
type: Input
|
|
14999
|
+
}], cpWidth: [{
|
|
15000
|
+
type: Input
|
|
14995
15001
|
}], change: [{
|
|
14996
15002
|
type: Output
|
|
14997
15003
|
}], color: [{
|
|
@@ -33521,7 +33527,7 @@ class FHWorkflowForm {
|
|
|
33521
33527
|
this.livs[i].username = this.user_idp;
|
|
33522
33528
|
}
|
|
33523
33529
|
}
|
|
33524
|
-
if (this.
|
|
33530
|
+
if (this._edit_load_mode && !this.btnprocedi) {
|
|
33525
33531
|
this.return_edit();
|
|
33526
33532
|
return;
|
|
33527
33533
|
}
|
|
@@ -34012,12 +34018,41 @@ class FHWorkflowForm {
|
|
|
34012
34018
|
this.livs[i].context == '*ALLUSERS') {
|
|
34013
34019
|
// if (this.livs[i].abilita_indietro == 1) this.respingi_enabled = true;
|
|
34014
34020
|
// else this.respingi_enabled = false;
|
|
34021
|
+
this.b_edit = true;
|
|
34015
34022
|
this.update_status(true, this.respingi_enabled, null, null, 15);
|
|
34016
34023
|
break;
|
|
34017
34024
|
}
|
|
34018
34025
|
}
|
|
34019
34026
|
}
|
|
34020
34027
|
b_edit = false;
|
|
34028
|
+
/**
|
|
34029
|
+
* Modalità di caricamento (edit vs nuovo documento), congelata all'init.
|
|
34030
|
+
* Serve a NON far dipendere il routing del load (ok_livelli_doc) dal valore di
|
|
34031
|
+
* `b_edit`, che i componenti possono sovrascrivere nei loro update_status: il
|
|
34032
|
+
* routing deve restare deterministico a prescindere da cosa fa il componente.
|
|
34033
|
+
*/
|
|
34034
|
+
_edit_load_mode = false;
|
|
34035
|
+
/**
|
|
34036
|
+
* L'utente corrente è tra gli `autori` (= ha in carico) del documento.
|
|
34037
|
+
* Logica di autorizzazione CENTRALIZZATA nella lib: i componenti non devono
|
|
34038
|
+
* leggere `m_obj.autori`/`lettori` per conto loro.
|
|
34039
|
+
*/
|
|
34040
|
+
isCurrentUserAuthor() {
|
|
34041
|
+
const autori = (this.m_obj?.autori ?? '').toString().toLowerCase();
|
|
34042
|
+
const me = (this.user_idp ?? '').toLowerCase();
|
|
34043
|
+
return me !== '' && (',' + autori + ',').indexOf(',' + me + ',') !== -1;
|
|
34044
|
+
}
|
|
34045
|
+
/**
|
|
34046
|
+
* Editabilità "ufficiale" del documento decisa dalla lib: in carico (autore) e
|
|
34047
|
+
* documento non in uno stato finale (>=900). I componenti possono leggere questo
|
|
34048
|
+
* getter invece di ricalcolare l'autorizzazione.
|
|
34049
|
+
*/
|
|
34050
|
+
get canEdit() {
|
|
34051
|
+
const stato = Number(this.m_obj?.stato);
|
|
34052
|
+
if (!isNaN(stato) && stato >= 900)
|
|
34053
|
+
return false;
|
|
34054
|
+
return this.isCurrentUserAuthor();
|
|
34055
|
+
}
|
|
34021
34056
|
b_valid = true;
|
|
34022
34057
|
reassigned_to(op) { }
|
|
34023
34058
|
after_save() { }
|
|
@@ -34049,18 +34084,25 @@ class FHWorkflowForm {
|
|
|
34049
34084
|
this.respingi_enabled = this.b_respingi_button;
|
|
34050
34085
|
if (this.m_obj.autori == null)
|
|
34051
34086
|
this.m_obj.autori = '';
|
|
34052
|
-
|
|
34087
|
+
// Autorizzazione decisa QUI dalla lib e comunicata SEMPRE al componente
|
|
34088
|
+
// via update_status (true se autore, false altrimenti). La lib mantiene
|
|
34089
|
+
// lei il valore corretto di `b_edit`: il componente deve solo reagire,
|
|
34090
|
+
// senza leggere autori/lettori né scrivere `b_edit`.
|
|
34091
|
+
const _authorized = this.isCurrentUserAuthor();
|
|
34092
|
+
this.b_edit = _authorized;
|
|
34093
|
+
if (_authorized) {
|
|
34053
34094
|
if (this.m_obj.autori != null)
|
|
34054
34095
|
if (this.m_obj.autori.split(',').length != 1)
|
|
34055
34096
|
this.in_carico = true;
|
|
34056
|
-
// if(!this.in_carico){
|
|
34057
34097
|
if (this.m_obj.assegnati_paralleli != null)
|
|
34058
34098
|
if (this.m_obj.assegnati_paralleli.split(',').length != 1)
|
|
34059
34099
|
if (this.m_obj.assegnati_paralleli.indexOf(this.app_s.user) > -1)
|
|
34060
34100
|
this.b_assengna_a = true;
|
|
34061
|
-
// }
|
|
34062
34101
|
this.update_status(true, this.respingi_enabled, this.in_carico, this.b_assengna_a, 16);
|
|
34063
34102
|
}
|
|
34103
|
+
else {
|
|
34104
|
+
this.update_status(false, this.respingi_enabled, false, false, 16);
|
|
34105
|
+
}
|
|
34064
34106
|
let p = new QParam();
|
|
34065
34107
|
p.sql = 'SELECT_WKF_PROC_CONFIG';
|
|
34066
34108
|
p.values = [this.id_applicativo, this.id_documento];
|
|
@@ -34189,6 +34231,10 @@ class FHWorkflowForm {
|
|
|
34189
34231
|
});
|
|
34190
34232
|
}
|
|
34191
34233
|
init_app_wkf() {
|
|
34234
|
+
// `b_edit` all'init = modalità di caricamento (edit vs nuovo). La congelo qui
|
|
34235
|
+
// così il routing del load (ok_livelli_doc) non dipende da ciò che il
|
|
34236
|
+
// componente scriverà su `b_edit` nei suoi update_status.
|
|
34237
|
+
this._edit_load_mode = this.b_edit;
|
|
34192
34238
|
if (!this.b_edit)
|
|
34193
34239
|
this.insert_doc();
|
|
34194
34240
|
else
|