@seniorsistemas/angular-components 17.2.6 → 17.2.7
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/bundles/seniorsistemas-angular-components.umd.js +35 -7
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/fields/chips/chips-field.component.d.ts +6 -0
- package/components/dynamic-form/configurations/fields/chips-field.d.ts +6 -0
- package/esm2015/components/dynamic-form/components/fields/chips/chips-field.component.js +27 -3
- package/esm2015/components/dynamic-form/configurations/fields/chips-field.js +5 -1
- package/esm2015/locale/fallback.js +3 -1
- package/esm5/components/dynamic-form/components/fields/chips/chips-field.component.js +27 -4
- package/esm5/components/dynamic-form/configurations/fields/chips-field.js +5 -1
- package/esm5/locale/fallback.js +3 -1
- package/fesm2015/seniorsistemas-angular-components.js +32 -2
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +32 -3
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -39,6 +39,7 @@ import { RadioButtonModule } from 'primeng/radiobutton';
|
|
|
39
39
|
import { SliderModule } from 'primeng/slider';
|
|
40
40
|
import { ProgressBarModule as ProgressBarModule$1 } from 'primeng/progressbar';
|
|
41
41
|
import { DomSanitizer, BrowserModule } from '@angular/platform-browser';
|
|
42
|
+
import { Clipboard } from '@angular/cdk/clipboard';
|
|
42
43
|
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
43
44
|
import Cropper from 'cropperjs';
|
|
44
45
|
import * as elementResizeDetectorMaker_ from 'element-resize-detector';
|
|
@@ -2970,12 +2971,16 @@ var ChipsField = /** @class */ (function (_super) {
|
|
|
2970
2971
|
__extends(ChipsField, _super);
|
|
2971
2972
|
function ChipsField(config) {
|
|
2972
2973
|
var _this = _super.call(this, config) || this;
|
|
2974
|
+
_this.showCopyButton = false;
|
|
2973
2975
|
_this.keyFilter = config.keyFilter;
|
|
2976
|
+
_this.showCopyButton = config.showCopyButton;
|
|
2977
|
+
_this.separator = config.separator;
|
|
2974
2978
|
_this.onAdd = config.onAdd;
|
|
2975
2979
|
_this.onRemove = config.onRemove;
|
|
2976
2980
|
_this.onChipClick = config.onChipClick;
|
|
2977
2981
|
_this.onFocus = config.onFocus;
|
|
2978
2982
|
_this.onBlur = config.onBlur;
|
|
2983
|
+
_this.onCopy = config.onCopy;
|
|
2979
2984
|
return _this;
|
|
2980
2985
|
}
|
|
2981
2986
|
return ChipsField;
|
|
@@ -6611,8 +6616,30 @@ var CalendarFieldComponent = /** @class */ (function () {
|
|
|
6611
6616
|
}());
|
|
6612
6617
|
|
|
6613
6618
|
var ChipsFieldComponent = /** @class */ (function () {
|
|
6614
|
-
function ChipsFieldComponent() {
|
|
6619
|
+
function ChipsFieldComponent(clipboard) {
|
|
6620
|
+
this.clipboard = clipboard;
|
|
6621
|
+
this.feedbackMessageVisible = false;
|
|
6622
|
+
this.copyButtonVisible = true;
|
|
6615
6623
|
}
|
|
6624
|
+
ChipsFieldComponent.prototype.onCopyFieldContent = function () {
|
|
6625
|
+
var _this = this;
|
|
6626
|
+
if (this.formControl.value) {
|
|
6627
|
+
this.copyButtonVisible = false;
|
|
6628
|
+
this.feedbackMessageVisible = true;
|
|
6629
|
+
setTimeout(function () {
|
|
6630
|
+
_this.feedbackMessageVisible = false;
|
|
6631
|
+
_this.copyButtonVisible = true;
|
|
6632
|
+
}, 3000);
|
|
6633
|
+
var content = this.formControl.value.join(this.field.separator || "\n");
|
|
6634
|
+
this.clipboard.copy(content);
|
|
6635
|
+
if (this.field.onCopy) {
|
|
6636
|
+
this.field.onCopy(content);
|
|
6637
|
+
}
|
|
6638
|
+
}
|
|
6639
|
+
};
|
|
6640
|
+
ChipsFieldComponent.ctorParameters = function () { return [
|
|
6641
|
+
{ type: Clipboard }
|
|
6642
|
+
]; };
|
|
6616
6643
|
__decorate([
|
|
6617
6644
|
Input()
|
|
6618
6645
|
], ChipsFieldComponent.prototype, "field", void 0);
|
|
@@ -6621,8 +6648,8 @@ var ChipsFieldComponent = /** @class */ (function () {
|
|
|
6621
6648
|
], ChipsFieldComponent.prototype, "formControl", void 0);
|
|
6622
6649
|
ChipsFieldComponent = __decorate([
|
|
6623
6650
|
Component({
|
|
6624
|
-
template: "<p-chips\n
|
|
6625
|
-
styles: [".chip-content{display:block;overflow:hidden;padding-right:1rem;text-overflow:ellipsis}"]
|
|
6651
|
+
template: "<div class=\"chips-field-wrapper\">\n <div style=\"width: 100%;\">\n <p-chips\n *ngIf=\"field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [pKeyFilter]=\"field.keyFilter\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n \n <p-chips\n *ngIf=\"!field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n </div>\n \n <button\n *ngIf=\"field.showCopyButton && formControl.value?.length > 0 && copyButtonVisible\"\n class=\"copy-content-button\"\n (click)=\"onCopyFieldContent()\">\n {{ \"platform.angular_components.copy_field_content\" | translate }}\n </button>\n \n <span\n *ngIf=\"feedbackMessageVisible\"\n class=\"feedback-message\">\n {{ \"platform.angular_components.copied_to_clipboard\" | translate }}\n </span>\n</div>\n",
|
|
6652
|
+
styles: [".chips-field-wrapper{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.chips-field-wrapper .chip-content{display:block;overflow:hidden;padding-right:1rem;text-overflow:ellipsis}.chips-field-wrapper .copy-content-button{background-color:transparent;border:none;color:#2a6496;cursor:pointer;margin-top:8px}.chips-field-wrapper .feedback-message{color:#0c9348;display:block;margin-top:8px;-webkit-user-select:none;-ms-user-select:none;user-select:none}"]
|
|
6626
6653
|
})
|
|
6627
6654
|
], ChipsFieldComponent);
|
|
6628
6655
|
return ChipsFieldComponent;
|
|
@@ -15451,6 +15478,8 @@ var PanelModule = /** @class */ (function () {
|
|
|
15451
15478
|
}());
|
|
15452
15479
|
|
|
15453
15480
|
var fallback = {
|
|
15481
|
+
"platform.angular_components.copied_to_clipboard": "Copiado para área de transferência",
|
|
15482
|
+
"platform.angular_components.copy_field_content": "Copiar conteúdo preenchido",
|
|
15454
15483
|
"platform.angular_components.ia_text_generator": "Gerador de texto por IA",
|
|
15455
15484
|
"platform.angular_components.generate_text": "Gerar texto",
|
|
15456
15485
|
"platform.angular_components.context": "Contexto",
|