carriera-intern-components 1.1.165 → 1.1.166

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.
@@ -0,0 +1,20 @@
1
+ import { eAlignment } from '../../enums';
2
+ import { eGeneralActions } from '../../enums/general-actions.enum';
3
+ import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
4
+ import { Clipboard } from '@angular/cdk/clipboard';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CopyComponent {
7
+ private clipboard;
8
+ value: import("@angular/core").InputSignal<string | undefined>;
9
+ alignment: import("@angular/core").InputSignal<eAlignment>;
10
+ copyTooltip: import("@angular/core").InputSignal<string | undefined>;
11
+ copied: import("@angular/core").WritableSignal<boolean>;
12
+ eGeneralActions: typeof eGeneralActions;
13
+ eAlignment: typeof eAlignment;
14
+ constructor(clipboard: Clipboard);
15
+ tooltip: NgbTooltip;
16
+ onCopy(): void;
17
+ resetCopied(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<CopyComponent, "cai-copy", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; "copyTooltip": { "alias": "copyTooltip"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
20
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum eAlignment {
2
+ LEFT = "left",
3
+ RIGHT = "right"
4
+ }
@@ -0,0 +1,3 @@
1
+ export * from './string-placeholder.enum';
2
+ export * from './general-actions.enum';
3
+ export * from './alignment.enum';
@@ -0,0 +1,3 @@
1
+ export declare enum eStringPlaceholder {
2
+ EMPTY = ""
3
+ }
@@ -16,6 +16,7 @@ import { Subject, takeUntil } from 'rxjs';
16
16
  import { distinctUntilChanged } from 'rxjs/operators';
17
17
  import * as i3 from '@angular/cdk/scrolling';
18
18
  import { ScrollingModule, VIRTUAL_SCROLL_STRATEGY } from '@angular/cdk/scrolling';
19
+ import * as i1$2 from '@angular/cdk/clipboard';
19
20
 
20
21
  /**
21
22
  * Creates a validator that ignores validation rules when the control is autofilled.
@@ -6201,13 +6202,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
6201
6202
  args: ['holder1', { static: true }]
6202
6203
  }] } });
6203
6204
 
6205
+ var eStringPlaceholder;
6206
+ (function (eStringPlaceholder) {
6207
+ eStringPlaceholder["EMPTY"] = "";
6208
+ })(eStringPlaceholder || (eStringPlaceholder = {}));
6209
+
6210
+ var eAlignment;
6211
+ (function (eAlignment) {
6212
+ eAlignment["LEFT"] = "left";
6213
+ eAlignment["RIGHT"] = "right";
6214
+ })(eAlignment || (eAlignment = {}));
6215
+
6216
+ class CopyComponent {
6217
+ clipboard;
6218
+ value = input();
6219
+ alignment = input(eAlignment.RIGHT);
6220
+ copyTooltip = input();
6221
+ copied = signal(false);
6222
+ // Enums
6223
+ eGeneralActions = eGeneralActions;
6224
+ eAlignment = eAlignment;
6225
+ constructor(clipboard) {
6226
+ this.clipboard = clipboard;
6227
+ }
6228
+ tooltip;
6229
+ onCopy() {
6230
+ this.clipboard.copy(this.value() ?? '');
6231
+ this.copied.set(true);
6232
+ }
6233
+ resetCopied() {
6234
+ this.copied.set(false);
6235
+ }
6236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CopyComponent, deps: [{ token: i1$2.Clipboard }], target: i0.ɵɵFactoryTarget.Component });
6237
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: CopyComponent, isStandalone: true, selector: "cai-copy", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, copyTooltip: { classPropertyName: "copyTooltip", publicName: "copyTooltip", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: NgbTooltip, descendants: true }], ngImport: i0, template: "@let isCopied = !!copied();\n<div\n class=\"copy-container d-flex align-items-center gap-1\"\n (mouseleave)=\"resetCopied()\"\n>\n <div\n class=\"copy-content\"\n [class]=\"{\n 'order-1': alignment() === eAlignment.LEFT,\n 'order-0': alignment() === eAlignment.RIGHT,\n }\"\n >\n <ng-content></ng-content>\n </div>\n <div\n (click)=\"onCopy()\"\n [ngbTooltip]=\"tooltipTemplate\"\n [container]=\"'body'\"\n [tooltipClass]=\"isCopied ? 'tooltip-bg-blue-500' : ''\"\n placement=\"bottom\"\n #tooltip=\"ngbTooltip\"\n class=\"copy-icon\"\n [class]=\"{\n 'text-black-100': !isCopied,\n 'hover:text-black-300': !isCopied,\n 'text-blue-700': isCopied,\n }\"\n >\n <svg-icon [name]=\"'cai-copy'\" class=\"icon transition\"></svg-icon>\n </div>\n</div>\n\n@let copyText = isCopied ? eGeneralActions.COPIED : copyTooltip() ??\neGeneralActions.COPY;\n<ng-template #tooltipTemplate>\n {{ copyText }}\n</ng-template>\n", styles: [".copy-container .copy-content{max-width:calc(100% - 16px)}.copy-container .copy-icon{opacity:0;transition:opacity .1s ease-in-out}.copy-container .copy-icon .icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:12px;height:12px}.copy-container:hover .copy-icon{opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type:
6238
+ // Components
6239
+ SvgIconComponent, selector: "svg-icon", inputs: ["src", "name", "stretch", "applyClass", "svgClass", "class", "viewBox", "svgAriaLabel", "onSVGLoaded", "svgStyle"] }] });
6240
+ }
6241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CopyComponent, decorators: [{
6242
+ type: Component,
6243
+ args: [{ selector: 'cai-copy', imports: [
6244
+ CommonModule,
6245
+ NgbTooltip,
6246
+ // Components
6247
+ SvgIconComponent,
6248
+ ], template: "@let isCopied = !!copied();\n<div\n class=\"copy-container d-flex align-items-center gap-1\"\n (mouseleave)=\"resetCopied()\"\n>\n <div\n class=\"copy-content\"\n [class]=\"{\n 'order-1': alignment() === eAlignment.LEFT,\n 'order-0': alignment() === eAlignment.RIGHT,\n }\"\n >\n <ng-content></ng-content>\n </div>\n <div\n (click)=\"onCopy()\"\n [ngbTooltip]=\"tooltipTemplate\"\n [container]=\"'body'\"\n [tooltipClass]=\"isCopied ? 'tooltip-bg-blue-500' : ''\"\n placement=\"bottom\"\n #tooltip=\"ngbTooltip\"\n class=\"copy-icon\"\n [class]=\"{\n 'text-black-100': !isCopied,\n 'hover:text-black-300': !isCopied,\n 'text-blue-700': isCopied,\n }\"\n >\n <svg-icon [name]=\"'cai-copy'\" class=\"icon transition\"></svg-icon>\n </div>\n</div>\n\n@let copyText = isCopied ? eGeneralActions.COPIED : copyTooltip() ??\neGeneralActions.COPY;\n<ng-template #tooltipTemplate>\n {{ copyText }}\n</ng-template>\n", styles: [".copy-container .copy-content{max-width:calc(100% - 16px)}.copy-container .copy-icon{opacity:0;transition:opacity .1s ease-in-out}.copy-container .copy-icon .icon{display:flex;align-items:center;justify-content:center;cursor:pointer;width:12px;height:12px}.copy-container:hover .copy-icon{opacity:1}\n"] }]
6249
+ }], ctorParameters: () => [{ type: i1$2.Clipboard }], propDecorators: { tooltip: [{
6250
+ type: ViewChild,
6251
+ args: [NgbTooltip]
6252
+ }] } });
6253
+
6204
6254
  /*
6205
- * Public API Surface of ca-components
6255
+ * Public API Surface of carriera-intern-components
6206
6256
  */
6207
6257
 
6208
6258
  /**
6209
6259
  * Generated bundle index. Do not edit.
6210
6260
  */
6211
6261
 
6212
- export { AvatarComponent, CaiInputDatetimePickerComponent, DropZoneComponent, DropdownTypes, InputComponent, PmComponent, ignoreWhenAutofilled };
6262
+ export { AvatarComponent, CaiInputDatetimePickerComponent, CopyComponent, DropZoneComponent, DropdownTypes, InputComponent, PmComponent, ignoreWhenAutofilled };
6213
6263
  //# sourceMappingURL=carriera-intern-components.mjs.map