@gettrx/core-components-angular 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/atoms/input/gtr-input.component.mjs +9 -3
- package/esm2022/lib/atoms/textarea/gtr-textarea.component.mjs +1 -15
- package/esm2022/lib/atoms/toaster/gtr-toaster.component.mjs +3 -3
- package/esm2022/lib/directives/autosize/autosize.directive.mjs +183 -0
- package/esm2022/lib/directives/autosize/index.mjs +2 -0
- package/esm2022/lib/directives/autosize/public-api.mjs +2 -0
- package/esm2022/lib/molecules/input-color/gtr-input-color.component.mjs +1 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/gettrx-core-components-angular.mjs +193 -20
- package/fesm2022/gettrx-core-components-angular.mjs.map +1 -1
- package/lib/atoms/input/gtr-input.component.d.ts +5 -1
- package/lib/atoms/textarea/gtr-textarea.component.d.ts +0 -1
- package/lib/directives/autosize/autosize.directive.d.ts +32 -0
- package/lib/directives/autosize/index.d.ts +1 -0
- package/lib/directives/autosize/public-api.d.ts +1 -0
- package/package.json +2 -2
- package/public-api.d.ts +1 -0
|
@@ -846,6 +846,10 @@ class GtrInputComponent {
|
|
|
846
846
|
* The input valid boolean
|
|
847
847
|
*/
|
|
848
848
|
this.isValid = true;
|
|
849
|
+
/**
|
|
850
|
+
* The input valid boolean
|
|
851
|
+
*/
|
|
852
|
+
this.crop = false;
|
|
849
853
|
/**
|
|
850
854
|
* The error state
|
|
851
855
|
*/
|
|
@@ -1078,11 +1082,11 @@ class GtrInputComponent {
|
|
|
1078
1082
|
: false;
|
|
1079
1083
|
}
|
|
1080
1084
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrInputComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1081
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: GtrInputComponent, selector: "gtr-input", inputs: { inputWrapperId: "inputWrapperId", loading: "loading", type: "type", name: "name", dataTransactionName: "dataTransactionName", value: "value", placeholder: "placeholder", inputIcon: "inputIcon", iconSize: "iconSize", iconColor: "iconColor", iconPosition: "iconPosition", iconFontWeight: "iconFontWeight", inputLabel: "inputLabel", disabled: "disabled", validateLabel: "validateLabel", isNumber: "isNumber", readonly: "readonly", isOnlyView: "isOnlyView", defaultValidation: "defaultValidation", required: "required", isValid: "isValid", inputId: "inputId", setFocus: "setFocus" }, outputs: { inputChanged: "inputChanged", handleError: "handleError" }, ngImport: i0, template: "<div class=\"gtr-form-element-wrapper gtr-have-icon gtr-relative-element gtr-have-error\" [id]=\"inputWrapperId+'-wrapper'\"\n [attr.data-testid]=\"inputWrapperId+'-wrapper'\" *ngIf=\"this.isDesiredInput()\">\n <label *ngIf=\"inputLabel\" for={{this.inputId}} class=\"gtr-form-element-label\" [id]=\"inputWrapperId+'-label'\"\n [attr.data-testid]=\"inputWrapperId+'-label'\" [class.isonlyview]=\"isOnlyView\">\n {{inputLabel}}\n </label>\n <ng-container *skeleton=\"loading; repeat: 1; className:'skeleton-margin-bottom'; height: '16px'; width: '150px';\">\n <input *ngIf=\"!isOnlyView\" [id]=\"this.inputId\" [class]=\"'gtr-form-element-input ' + iconPosition\"\n [class.gtr-input-width-icon]=\"inputIcon\" [class.gtr-invalid]=\"isInputInvalid\"\n [type]=\"this.isDesiredInput() ? this.inputType : ''\" [value]=\"this.value\" [placeholder]=\"this.placeholder\"\n [disabled]=\"this.disabled\" [readOnly]=\"this.readonly\" [required]=\"this.required\"\n [tabIndex]=\"this.disabled || this.readonly ? -1 : 0\" (focus)=\"this.handleOnfocus()\" (blur)=\"this.handleOnBlur()\"\n (input)=\"this.handleInput($event)\" (keypress)=\"this.handledKeyPressed($event)\"\n [name]=\"name + '-input'\" [attr.data-transaction-name]=\"(dataTransactionName || name) + '-input'\"\n [style.padding-left]=\"this.isOnlyView && this.inputIcon && this.iconPosition === 'start' ? (this.iconSize + 'px') : ''\" />\n <div class=\"input-icon\">\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'start'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n\n <span [class]=\"'gtr-form-element-input ' + (inputIcon && iconPosition)\" [id]=\"inputWrapperId+'-readonly'\"\n [attr.data-testid]=\"inputWrapperId+'-readonly'\" [class.isonlyview]=\"isOnlyView\" *ngIf=\"isOnlyView\">\n {{value ? value : placeholder}}\n </span>\n\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'end'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowDefaultError\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n {{this.errorMsg}}\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowCustomError\">\n <ng-content select=\"[slot='custom-error']\"></ng-content>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";margin:0;--gtr-border-radius-6: 6px;--gtr-padding-24: 24px;--gtr-padding-32: 32px;--gtr-font-size-13: 13px;--gtr-background-transparent: transparent;--gtr-input-height: 38px;--gtr-input-readonly-height: 21px;--gray-shades-40: rgba(0, 0, 0, .4);--gtr-color-base-black-10: rgba(0, 0, 0, .1);--gtr-color-base-black-80: rgba(0, 0, 0, .8);--gtr-color-base-black-40: rgba(0, 0, 0, .4);--gtr-color-base-primary-80: rgba(0, 89, 156, .8);--gtr-color-base-black-5: rgba(0, 0, 0, .05);--gtr-color-base-danger-100: #ea5455;--gtr-color-base-label-100: var(--default) }label{position:relative;left:auto;top:auto}.gtr-form-element-wrapper *,.gtr-form-element-wrapper *:before,.gtr-form-element-wrapper *:after{box-sizing:border-box;margin:0;width:auto;transform:all .4s ease}.gtr-relative-element{position:relative}.gtr-disabled,:disabled{opacity:.7;cursor:default!important}.gtr-form-element-label{display:block;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;color:var(--gtr-color-base-label-100)}.gtr-error-wrap{font-weight:500;font-size:11px;display:flex;color:var(--gtr-color-base-danger-100);align-items:center;padding-top:5px}.gtr-form-element-input{height:var(--gtr-input-height);border:1px solid var(--gtr-color-base-black-10);width:100%!important;padding:8px 10px;display:flex;align-items:center;color:var(--gtr-color-base-black-80);outline:0;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;border-radius:var(--gtr-border-radius-6)}.gtr-form-element-input::placeholder{color:var(--gtr-color-base-black-40);font-size:13px;line-height:21px}.gtr-form-element-input:focus{border-color:var(--gtr-color-base-primary-80)}.gtr-form-element-input:disabled{background:var(--gtr-color-base-black-5);opacity:.5}.gtr-form-element-input.gtr-error{color:var(--gtr-color-base-danger-100)}.gtr-form-element-input.isonlyview{border:none;height:auto;padding:0;margin:0;color:var(--gtr-color-base-black-80);font-size:15px;font-style:normal;font-weight:600;line-height:normal;min-height:21px;pointer-events:none;width:auto!important;word-break:break-all}.input-icon{display:flex;align-items:center}span.gtr-input-icon.isonlyview{position:absolute;margin:-20px 0 0 -1px;pointer-events:none}.gtr-form-element-input.gtr-input-width-icon.isonlyview{padding-left:1px}.gtr-form-element-label.isonlyview{margin:0;pointer-events:none}.gtr-error-wrap gtr-icon{margin:-3px 6px 0 0}.gtr-input-icon.start{position:absolute;margin:-30px 0 0 7px}.gtr-input-icon.start.isOnlyView{position:relative;line-height:0;margin:0 0 0 -5px}.gtr-input-icon.end.isOnlyView{position:relative;margin:0;right:auto;line-height:0}.gtr-input-icon.end{position:absolute;margin:-30px 7px 0 0;right:0}.gtr-form-element-input.gtr-input-width-icon.start{padding-left:var(--gtr-padding-32)}.gtr-form-element-input.gtr-input-width-icon.end{padding-right:var(--gtr-padding-32)}.gtr-form-element-input.gtr-invalid{border-color:var(--gtr-color-base-danger-100)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input:-moz-read-only,input:read-only{height:var(--gtr-input-readonly-height)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GtrSkeletonDirective, selector: "[skeleton]", inputs: ["skeleton", "skeletonRepeat", "skeletonWidth", "skeletonHeight", "skeletonClassName"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
1085
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: GtrInputComponent, selector: "gtr-input", inputs: { inputWrapperId: "inputWrapperId", loading: "loading", type: "type", name: "name", dataTransactionName: "dataTransactionName", value: "value", placeholder: "placeholder", inputIcon: "inputIcon", iconSize: "iconSize", iconColor: "iconColor", iconPosition: "iconPosition", iconFontWeight: "iconFontWeight", inputLabel: "inputLabel", disabled: "disabled", validateLabel: "validateLabel", isNumber: "isNumber", readonly: "readonly", isOnlyView: "isOnlyView", defaultValidation: "defaultValidation", required: "required", isValid: "isValid", crop: "crop", inputId: "inputId", setFocus: "setFocus" }, outputs: { inputChanged: "inputChanged", handleError: "handleError" }, ngImport: i0, template: "<div class=\"gtr-form-element-wrapper gtr-have-icon gtr-relative-element gtr-have-error\" [id]=\"inputWrapperId+'-wrapper'\"\n [attr.data-testid]=\"inputWrapperId+'-wrapper'\" *ngIf=\"this.isDesiredInput()\">\n <label *ngIf=\"inputLabel\" for={{this.inputId}} class=\"gtr-form-element-label\" [id]=\"inputWrapperId+'-label'\"\n [attr.data-testid]=\"inputWrapperId+'-label'\" [class.isonlyview]=\"isOnlyView\">\n {{inputLabel}}\n </label>\n <ng-container *skeleton=\"loading; repeat: 1; className:'skeleton-margin-bottom'; height: '16px'; width: '150px';\">\n <input *ngIf=\"!isOnlyView\" [id]=\"this.inputId\" [class]=\"'gtr-form-element-input ' + iconPosition\"\n [class.gtr-input-width-icon]=\"inputIcon\" [class.gtr-invalid]=\"isInputInvalid\"\n [type]=\"this.isDesiredInput() ? this.inputType : ''\" [value]=\"this.value\" [placeholder]=\"this.placeholder\"\n [disabled]=\"this.disabled\" [readOnly]=\"this.readonly\" [required]=\"this.required\"\n [tabIndex]=\"this.disabled || this.readonly ? -1 : 0\" (focus)=\"this.handleOnfocus()\" (blur)=\"this.handleOnBlur()\"\n (input)=\"this.handleInput($event)\" (keypress)=\"this.handledKeyPressed($event)\"\n [name]=\"name + '-input'\" [attr.data-transaction-name]=\"(dataTransactionName || name) + '-input'\"\n [style.padding-left]=\"this.isOnlyView && this.inputIcon && this.iconPosition === 'start' ? (this.iconSize + 'px') : ''\" />\n <div class=\"input-icon\">\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'start'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n\n <span [class]=\"'gtr-form-element-input ' + (inputIcon && iconPosition) + (crop ? ' crop':'')\" [id]=\"inputWrapperId+'-readonly'\"\n [attr.data-testid]=\"inputWrapperId+'-readonly'\" [class.isonlyview]=\"isOnlyView\" *ngIf=\"isOnlyView\" [title]=\"(crop ? value:'')\">\n {{value ? value : placeholder}}\n </span>\n\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'end'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowDefaultError\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n {{this.errorMsg}}\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowCustomError\">\n <ng-content select=\"[slot='custom-error']\"></ng-content>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";margin:0;--gtr-border-radius-6: 6px;--gtr-padding-24: 24px;--gtr-padding-32: 32px;--gtr-font-size-13: 13px;--gtr-background-transparent: transparent;--gtr-input-height: 38px;--gtr-input-readonly-height: 21px;--gray-shades-40: rgba(0, 0, 0, .4);--gtr-color-base-black-10: rgba(0, 0, 0, .1);--gtr-color-base-black-80: rgba(0, 0, 0, .8);--gtr-color-base-black-40: rgba(0, 0, 0, .4);--gtr-color-base-primary-80: rgba(0, 89, 156, .8);--gtr-color-base-black-5: rgba(0, 0, 0, .05);--gtr-color-base-danger-100: #ea5455;--gtr-color-base-label-100: var(--default) }label{position:relative;left:auto;top:auto}.gtr-form-element-wrapper *,.gtr-form-element-wrapper *:before,.gtr-form-element-wrapper *:after{box-sizing:border-box;margin:0;width:auto;transform:all .4s ease}.gtr-relative-element{position:relative}.gtr-disabled,:disabled{opacity:.7;cursor:default!important}.gtr-form-element-label{display:block;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;color:var(--gtr-color-base-label-100)}.gtr-error-wrap{font-weight:500;font-size:11px;display:flex;color:var(--gtr-color-base-danger-100);align-items:center;padding-top:5px}.gtr-form-element-input{height:var(--gtr-input-height);border:1px solid var(--gtr-color-base-black-10);width:100%!important;padding:8px 10px;display:flex;align-items:center;color:var(--gtr-color-base-black-80);outline:0;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;border-radius:var(--gtr-border-radius-6)}.gtr-form-element-input::placeholder{color:var(--gtr-color-base-black-40);font-size:13px;line-height:21px}.gtr-form-element-input:focus{border-color:var(--gtr-color-base-primary-80)}.gtr-form-element-input:disabled{background:var(--gtr-color-base-black-5);opacity:.5}.gtr-form-element-input.gtr-error{color:var(--gtr-color-base-danger-100)}.gtr-form-element-input.isonlyview{border:none;height:auto;padding:0;margin:0;color:var(--gtr-color-base-black-80);font-size:15px;font-style:normal;font-weight:600;line-height:normal;min-height:21px;pointer-events:none;width:auto!important;word-break:break-all}.input-icon{display:flex;align-items:center}.gtr-form-element-input.crop.isonlyview{display:block;pointer-events:all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span.gtr-input-icon.isonlyview{position:absolute;margin:-20px 0 0 -1px;pointer-events:none}.gtr-form-element-input.gtr-input-width-icon.isonlyview{padding-left:1px}.gtr-form-element-label.isonlyview{margin:0;pointer-events:none}.gtr-error-wrap gtr-icon{margin:-3px 6px 0 0}.gtr-input-icon.start{position:absolute;margin:-30px 0 0 7px}.gtr-input-icon.start.isOnlyView{position:relative;line-height:0;margin:0 0 0 -5px}.gtr-input-icon.end.isOnlyView{position:relative;margin:0;right:auto;line-height:0}.gtr-input-icon.end{position:absolute;margin:-30px 7px 0 0;right:0}.gtr-form-element-input.gtr-input-width-icon.start{padding-left:var(--gtr-padding-32)}.gtr-form-element-input.gtr-input-width-icon.end{padding-right:var(--gtr-padding-32)}.gtr-form-element-input.gtr-invalid{border-color:var(--gtr-color-base-danger-100)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input:-moz-read-only,input:read-only{height:var(--gtr-input-readonly-height)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GtrSkeletonDirective, selector: "[skeleton]", inputs: ["skeleton", "skeletonRepeat", "skeletonWidth", "skeletonHeight", "skeletonClassName"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
1082
1086
|
}
|
|
1083
1087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrInputComponent, decorators: [{
|
|
1084
1088
|
type: Component,
|
|
1085
|
-
args: [{ selector: 'gtr-input', template: "<div class=\"gtr-form-element-wrapper gtr-have-icon gtr-relative-element gtr-have-error\" [id]=\"inputWrapperId+'-wrapper'\"\n [attr.data-testid]=\"inputWrapperId+'-wrapper'\" *ngIf=\"this.isDesiredInput()\">\n <label *ngIf=\"inputLabel\" for={{this.inputId}} class=\"gtr-form-element-label\" [id]=\"inputWrapperId+'-label'\"\n [attr.data-testid]=\"inputWrapperId+'-label'\" [class.isonlyview]=\"isOnlyView\">\n {{inputLabel}}\n </label>\n <ng-container *skeleton=\"loading; repeat: 1; className:'skeleton-margin-bottom'; height: '16px'; width: '150px';\">\n <input *ngIf=\"!isOnlyView\" [id]=\"this.inputId\" [class]=\"'gtr-form-element-input ' + iconPosition\"\n [class.gtr-input-width-icon]=\"inputIcon\" [class.gtr-invalid]=\"isInputInvalid\"\n [type]=\"this.isDesiredInput() ? this.inputType : ''\" [value]=\"this.value\" [placeholder]=\"this.placeholder\"\n [disabled]=\"this.disabled\" [readOnly]=\"this.readonly\" [required]=\"this.required\"\n [tabIndex]=\"this.disabled || this.readonly ? -1 : 0\" (focus)=\"this.handleOnfocus()\" (blur)=\"this.handleOnBlur()\"\n (input)=\"this.handleInput($event)\" (keypress)=\"this.handledKeyPressed($event)\"\n [name]=\"name + '-input'\" [attr.data-transaction-name]=\"(dataTransactionName || name) + '-input'\"\n [style.padding-left]=\"this.isOnlyView && this.inputIcon && this.iconPosition === 'start' ? (this.iconSize + 'px') : ''\" />\n <div class=\"input-icon\">\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'start'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n\n <span [class]=\"'gtr-form-element-input ' + (inputIcon && iconPosition)\" [id]=\"inputWrapperId+'-readonly'\"\n [attr.data-testid]=\"inputWrapperId+'-readonly'\" [class.isonlyview]=\"isOnlyView\" *ngIf=\"isOnlyView\">\n {{value ? value : placeholder}}\n </span>\n\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'end'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowDefaultError\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n {{this.errorMsg}}\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowCustomError\">\n <ng-content select=\"[slot='custom-error']\"></ng-content>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";margin:0;--gtr-border-radius-6: 6px;--gtr-padding-24: 24px;--gtr-padding-32: 32px;--gtr-font-size-13: 13px;--gtr-background-transparent: transparent;--gtr-input-height: 38px;--gtr-input-readonly-height: 21px;--gray-shades-40: rgba(0, 0, 0, .4);--gtr-color-base-black-10: rgba(0, 0, 0, .1);--gtr-color-base-black-80: rgba(0, 0, 0, .8);--gtr-color-base-black-40: rgba(0, 0, 0, .4);--gtr-color-base-primary-80: rgba(0, 89, 156, .8);--gtr-color-base-black-5: rgba(0, 0, 0, .05);--gtr-color-base-danger-100: #ea5455;--gtr-color-base-label-100: var(--default) }label{position:relative;left:auto;top:auto}.gtr-form-element-wrapper *,.gtr-form-element-wrapper *:before,.gtr-form-element-wrapper *:after{box-sizing:border-box;margin:0;width:auto;transform:all .4s ease}.gtr-relative-element{position:relative}.gtr-disabled,:disabled{opacity:.7;cursor:default!important}.gtr-form-element-label{display:block;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;color:var(--gtr-color-base-label-100)}.gtr-error-wrap{font-weight:500;font-size:11px;display:flex;color:var(--gtr-color-base-danger-100);align-items:center;padding-top:5px}.gtr-form-element-input{height:var(--gtr-input-height);border:1px solid var(--gtr-color-base-black-10);width:100%!important;padding:8px 10px;display:flex;align-items:center;color:var(--gtr-color-base-black-80);outline:0;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;border-radius:var(--gtr-border-radius-6)}.gtr-form-element-input::placeholder{color:var(--gtr-color-base-black-40);font-size:13px;line-height:21px}.gtr-form-element-input:focus{border-color:var(--gtr-color-base-primary-80)}.gtr-form-element-input:disabled{background:var(--gtr-color-base-black-5);opacity:.5}.gtr-form-element-input.gtr-error{color:var(--gtr-color-base-danger-100)}.gtr-form-element-input.isonlyview{border:none;height:auto;padding:0;margin:0;color:var(--gtr-color-base-black-80);font-size:15px;font-style:normal;font-weight:600;line-height:normal;min-height:21px;pointer-events:none;width:auto!important;word-break:break-all}.input-icon{display:flex;align-items:center}span.gtr-input-icon.isonlyview{position:absolute;margin:-20px 0 0 -1px;pointer-events:none}.gtr-form-element-input.gtr-input-width-icon.isonlyview{padding-left:1px}.gtr-form-element-label.isonlyview{margin:0;pointer-events:none}.gtr-error-wrap gtr-icon{margin:-3px 6px 0 0}.gtr-input-icon.start{position:absolute;margin:-30px 0 0 7px}.gtr-input-icon.start.isOnlyView{position:relative;line-height:0;margin:0 0 0 -5px}.gtr-input-icon.end.isOnlyView{position:relative;margin:0;right:auto;line-height:0}.gtr-input-icon.end{position:absolute;margin:-30px 7px 0 0;right:0}.gtr-form-element-input.gtr-input-width-icon.start{padding-left:var(--gtr-padding-32)}.gtr-form-element-input.gtr-input-width-icon.end{padding-right:var(--gtr-padding-32)}.gtr-form-element-input.gtr-invalid{border-color:var(--gtr-color-base-danger-100)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input:-moz-read-only,input:read-only{height:var(--gtr-input-readonly-height)}\n"] }]
|
|
1089
|
+
args: [{ selector: 'gtr-input', template: "<div class=\"gtr-form-element-wrapper gtr-have-icon gtr-relative-element gtr-have-error\" [id]=\"inputWrapperId+'-wrapper'\"\n [attr.data-testid]=\"inputWrapperId+'-wrapper'\" *ngIf=\"this.isDesiredInput()\">\n <label *ngIf=\"inputLabel\" for={{this.inputId}} class=\"gtr-form-element-label\" [id]=\"inputWrapperId+'-label'\"\n [attr.data-testid]=\"inputWrapperId+'-label'\" [class.isonlyview]=\"isOnlyView\">\n {{inputLabel}}\n </label>\n <ng-container *skeleton=\"loading; repeat: 1; className:'skeleton-margin-bottom'; height: '16px'; width: '150px';\">\n <input *ngIf=\"!isOnlyView\" [id]=\"this.inputId\" [class]=\"'gtr-form-element-input ' + iconPosition\"\n [class.gtr-input-width-icon]=\"inputIcon\" [class.gtr-invalid]=\"isInputInvalid\"\n [type]=\"this.isDesiredInput() ? this.inputType : ''\" [value]=\"this.value\" [placeholder]=\"this.placeholder\"\n [disabled]=\"this.disabled\" [readOnly]=\"this.readonly\" [required]=\"this.required\"\n [tabIndex]=\"this.disabled || this.readonly ? -1 : 0\" (focus)=\"this.handleOnfocus()\" (blur)=\"this.handleOnBlur()\"\n (input)=\"this.handleInput($event)\" (keypress)=\"this.handledKeyPressed($event)\"\n [name]=\"name + '-input'\" [attr.data-transaction-name]=\"(dataTransactionName || name) + '-input'\"\n [style.padding-left]=\"this.isOnlyView && this.inputIcon && this.iconPosition === 'start' ? (this.iconSize + 'px') : ''\" />\n <div class=\"input-icon\">\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'start'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n\n <span [class]=\"'gtr-form-element-input ' + (inputIcon && iconPosition) + (crop ? ' crop':'')\" [id]=\"inputWrapperId+'-readonly'\"\n [attr.data-testid]=\"inputWrapperId+'-readonly'\" [class.isonlyview]=\"isOnlyView\" *ngIf=\"isOnlyView\" [title]=\"(crop ? value:'')\">\n {{value ? value : placeholder}}\n </span>\n\n <span [class]=\"'gtr-input-icon ' + iconPosition\" [id]=\"inputWrapperId+'-icon'\"\n [attr.data-testid]=\"inputWrapperId+'-icon'\" [class.isOnlyView]=\"isOnlyView\"\n *ngIf=\"inputIcon && iconPosition == 'end'\">\n <gtr-icon [name]=\"this.inputIcon\" [size]=\"this.iconSize\" [color]=\"this.iconColor\"\n [weight]=\"this.iconFontWeight\"></gtr-icon>\n </span>\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowDefaultError\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n {{this.errorMsg}}\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowCustomError\">\n <ng-content select=\"[slot='custom-error']\"></ng-content>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";margin:0;--gtr-border-radius-6: 6px;--gtr-padding-24: 24px;--gtr-padding-32: 32px;--gtr-font-size-13: 13px;--gtr-background-transparent: transparent;--gtr-input-height: 38px;--gtr-input-readonly-height: 21px;--gray-shades-40: rgba(0, 0, 0, .4);--gtr-color-base-black-10: rgba(0, 0, 0, .1);--gtr-color-base-black-80: rgba(0, 0, 0, .8);--gtr-color-base-black-40: rgba(0, 0, 0, .4);--gtr-color-base-primary-80: rgba(0, 89, 156, .8);--gtr-color-base-black-5: rgba(0, 0, 0, .05);--gtr-color-base-danger-100: #ea5455;--gtr-color-base-label-100: var(--default) }label{position:relative;left:auto;top:auto}.gtr-form-element-wrapper *,.gtr-form-element-wrapper *:before,.gtr-form-element-wrapper *:after{box-sizing:border-box;margin:0;width:auto;transform:all .4s ease}.gtr-relative-element{position:relative}.gtr-disabled,:disabled{opacity:.7;cursor:default!important}.gtr-form-element-label{display:block;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;color:var(--gtr-color-base-label-100)}.gtr-error-wrap{font-weight:500;font-size:11px;display:flex;color:var(--gtr-color-base-danger-100);align-items:center;padding-top:5px}.gtr-form-element-input{height:var(--gtr-input-height);border:1px solid var(--gtr-color-base-black-10);width:100%!important;padding:8px 10px;display:flex;align-items:center;color:var(--gtr-color-base-black-80);outline:0;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;border-radius:var(--gtr-border-radius-6)}.gtr-form-element-input::placeholder{color:var(--gtr-color-base-black-40);font-size:13px;line-height:21px}.gtr-form-element-input:focus{border-color:var(--gtr-color-base-primary-80)}.gtr-form-element-input:disabled{background:var(--gtr-color-base-black-5);opacity:.5}.gtr-form-element-input.gtr-error{color:var(--gtr-color-base-danger-100)}.gtr-form-element-input.isonlyview{border:none;height:auto;padding:0;margin:0;color:var(--gtr-color-base-black-80);font-size:15px;font-style:normal;font-weight:600;line-height:normal;min-height:21px;pointer-events:none;width:auto!important;word-break:break-all}.input-icon{display:flex;align-items:center}.gtr-form-element-input.crop.isonlyview{display:block;pointer-events:all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}span.gtr-input-icon.isonlyview{position:absolute;margin:-20px 0 0 -1px;pointer-events:none}.gtr-form-element-input.gtr-input-width-icon.isonlyview{padding-left:1px}.gtr-form-element-label.isonlyview{margin:0;pointer-events:none}.gtr-error-wrap gtr-icon{margin:-3px 6px 0 0}.gtr-input-icon.start{position:absolute;margin:-30px 0 0 7px}.gtr-input-icon.start.isOnlyView{position:relative;line-height:0;margin:0 0 0 -5px}.gtr-input-icon.end.isOnlyView{position:relative;margin:0;right:auto;line-height:0}.gtr-input-icon.end{position:absolute;margin:-30px 7px 0 0;right:0}.gtr-form-element-input.gtr-input-width-icon.start{padding-left:var(--gtr-padding-32)}.gtr-form-element-input.gtr-input-width-icon.end{padding-right:var(--gtr-padding-32)}.gtr-form-element-input.gtr-invalid{border-color:var(--gtr-color-base-danger-100)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input:-moz-read-only,input:read-only{height:var(--gtr-input-readonly-height)}\n"] }]
|
|
1086
1090
|
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
1087
1091
|
type: Optional
|
|
1088
1092
|
}, {
|
|
@@ -1129,6 +1133,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
1129
1133
|
type: Input
|
|
1130
1134
|
}], isValid: [{
|
|
1131
1135
|
type: Input
|
|
1136
|
+
}], crop: [{
|
|
1137
|
+
type: Input
|
|
1132
1138
|
}], inputChanged: [{
|
|
1133
1139
|
type: Output
|
|
1134
1140
|
}], handleError: [{
|
|
@@ -1350,20 +1356,6 @@ class GtrTextareaComponent {
|
|
|
1350
1356
|
? this.hasError || (!this.defaultValidation ? !this.isValid : false)
|
|
1351
1357
|
: false;
|
|
1352
1358
|
}
|
|
1353
|
-
/*
|
|
1354
|
-
render function to show tsx template
|
|
1355
|
-
*/
|
|
1356
|
-
render() {
|
|
1357
|
-
const textareaClasses = {
|
|
1358
|
-
'gtr-form-element-textarea': true,
|
|
1359
|
-
'gtr-invalid': this.isInputInvalid,
|
|
1360
|
-
isonlyview: this.isOnlyView,
|
|
1361
|
-
};
|
|
1362
|
-
const labelClasses = {
|
|
1363
|
-
'gtr-form-element-label': true,
|
|
1364
|
-
isonlyview: this.isOnlyView,
|
|
1365
|
-
};
|
|
1366
|
-
}
|
|
1367
1359
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrTextareaComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1368
1360
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: GtrTextareaComponent, selector: "gtr-textarea", inputs: { name: "name", dataTransactionName: "dataTransactionName", value: "value", placeholder: "placeholder", loading: "loading", textareaLabel: "textareaLabel", disabled: "disabled", textAreaWrapperId: "textAreaWrapperId", readonly: "readonly", isValid: "isValid", isOnlyView: "isOnlyView", defaultValidation: "defaultValidation" }, outputs: { textareaChanged: "textareaChanged", handleError: "handleError" }, ngImport: i0, template: "<div class=\"gtr-form-element-wrapper gtr-have-icon gtr-relative-element gtr-have-error\"\n [id]=\"textAreaWrapperId+'-wrapper'\" [attr.data-testid]=\"textAreaWrapperId+'-wrapper'\">\n <label for={{this.textareaId}} [class]=\"'gtr-form-element-label'\" [id]=\"textAreaWrapperId+'-label'\"\n [attr.data-testid]=\"textAreaWrapperId+'-label'\" [class.isonlyview]=\"isOnlyView\">{{this.textareaLabel}}</label>\n <ng-container *skeleton=\"loading; repeat: 1; className:'skeleton-margin-bottom'; height: '16px'; width: '150px';\">\n <textarea *ngIf=\"!isOnlyView\" [id]=\"this.textareaId\" [attr.data-testid]=\"this.textareaId\"\n class=\"gtr-form-element-textarea\" [class.gtr-invalid]=\"isInputInvalid\" [class.isonlyview]=\"isOnlyView\"\n [value]=\"this.value\" [placeholder]=\"this.placeholder\" [disabled]=\"this.disabled\" [readOnly]=\"this.readonly\"\n [attr.name]=\"name\" [attr.data-transaction-name]=\"dataTransactionName || name\"\n [tabIndex]=\"this.disabled || this.readonly ? -1 : 0\" (focus)=\"this.handleOnfocus()\" (blur)=\"this.handleOnBlur()\"\n (input)=\"this.handleTextarea($event)\"></textarea>\n\n <span [class]=\"'gtr-form-element-textarea'\" [id]=\"textAreaWrapperId+'-readonly'\"\n [attr.data-testid]=\"textAreaWrapperId+'-readonly'\" [class.isonlyview]=\"isOnlyView\" *ngIf=\"isOnlyView\">\n {{value}}\n </span>\n\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowDefaultError\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n {{this.errorMsg}}\n </div>\n <div class=\"gtr-error-wrap\" *ngIf=\"isShowCustomError\">\n <ng-content select=\"[slot='custom-error']\"></ng-content>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Noto Sans,Liberation Sans,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";margin:0;--gtr-border-radius-6: 6px;--gtr-padding-24: 24px;--gtr-padding-32: 32px;--gtr-font-size-13: 13px;--gtr-background-transparent: transparent;--gtr-input-height: 38px;--gtr-input-readonly-height: 21px;--gray-shades-40: rgba(0, 0, 0, .4);--gtr-color-base-black-10: rgba(0, 0, 0, .1);--gtr-color-base-black-80: rgba(0, 0, 0, .8);--gtr-color-base-black-40: rgba(0, 0, 0, .4);--gtr-color-base-primary-80: rgba(0, 89, 156, .8);--gtr-color-base-black-5: rgba(0, 0, 0, .05);--gtr-color-base-danger-100: #ea5455;--gtr-color-base-label-100: var(--default) }textarea[readonly=readonly],textarea[readonly]{height:var(--gtr-textarea-readonly-height)!important}textarea{resize:none}.gtr-form-element-wrapper *,.gtr-form-element-wrapper *:before,.gtr-form-element-wrapper *:after{box-sizing:border-box;margin:0;width:100%}.gtr-relative-element{position:relative}.gtr-disabled,:disabled{opacity:.7;cursor:default!important}label{position:relative;left:auto;top:auto}.gtr-form-element-label{display:block;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;color:var(--gtr-color-base-label-100)}.gtr-error-wrap{font-weight:500;font-size:11px;display:flex;color:var(--gtr-color-base-danger-100);align-items:center;padding-top:5px}.gtr-form-element-textarea{height:var(--gtr-textarea-height);border:1px solid var(--gtr-color-base-black-10);width:100%;align-items:center;color:var(--gtr-color-base-black-80);outline:0;font-size:var(--gtr-font-size-13);font-weight:400;line-height:21px;border-radius:var(--gtr-border-radius-6);display:flex;height:85px;padding:8px 10px;align-items:flex-start;gap:10px;flex-shrink:0}.gtr-form-element-textarea::placeholder{color:var(--gtr-color-base-black-40);font-size:13px;line-height:21px;font-style:normal;font-weight:400}.gtr-form-element-textarea:focus{border-color:var(--gtr-color-base-primary-80)}.gtr-form-element-textarea:disabled{background:var(--gtr-color-base-black-5);opacity:.5}.gtr-form-element-textarea.gtr-error{color:var(--gtr-color-base-danger-100)}.gtr-form-element-textarea.isonlyview{border:none;padding:0;margin:0;color:var(--gtr-color-base-black-80);font-size:15px;font-style:normal;font-weight:600;line-height:23px;pointer-events:none;height:auto;word-break:break-all}.gtr-form-element-label.isonlyview{line-height:27px;margin:0;pointer-events:none}.gtr-error-wrap gtr-icon{margin:-3px 6px 0 0}.gtr-textarea-icon{position:absolute;margin:-30px 0 0 7px}.gtr-form-element-textarea.gtr-textarea-width-icon{padding-left:var(--gtr-padding-32)}.gtr-form-element-textarea.gtr-invalid{border-color:var(--gtr-color-base-danger-100)}.gtr-form-element-textarea::-webkit-scrollbar{background:var(--gtr-color-base-black-10)}::-webkit-scrollbar{width:5px;background:var(--gtr-color-base-black-10)}::-webkit-scrollbar-thumb{background:var(--gtr-color-base-black-10)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: GtrSkeletonDirective, selector: "[skeleton]", inputs: ["skeleton", "skeletonRepeat", "skeletonWidth", "skeletonHeight", "skeletonClassName"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
1369
1361
|
}
|
|
@@ -1920,11 +1912,11 @@ class GtrToasterComponent {
|
|
|
1920
1912
|
}
|
|
1921
1913
|
}
|
|
1922
1914
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrToasterComponent, deps: [{ token: GtrToasterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1923
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: GtrToasterComponent, selector: "gtr-toaster", inputs: { id: "id", testId: "testId" }, viewQueries: [{ propertyName: "toasterElement", first: true, predicate: ["toasterElement"], descendants: true, static: true }], ngImport: i0, template: "<!--
|
|
1915
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: GtrToasterComponent, selector: "gtr-toaster", inputs: { id: "id", testId: "testId" }, viewQueries: [{ propertyName: "toasterElement", first: true, predicate: ["toasterElement"], descendants: true, static: true }], ngImport: i0, template: "<!-- gtr-toaster.component.html -->\n\n<div\n tabindex=\"0\"\n #toasterElement\n class=\"gtr-toaster-wrapper\"\n [ngClass]=\"{\n 'show': open,\n 'hide': !open,\n 'top-right': toasterData && toasterData.position ? toasterData.position : 'top-right'\n }\"\n (keydown)=\"handleKeyDown($event)\"\n [id]=\"id\" [attr.data-test-id]=\"testId\"\n>\n <div\n *ngIf=\"open\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n class=\"gtr-toaster-content-wrapper\"\n [ngStyle]=\"{ 'background-color': toasterData.backgroundColor }\"\n >\n <div class=\"gtr-toaster-icon\">\n <gtr-badge\n [shape]=\"'default'\"\n [type]=\"'icon'\"\n [color]=\"\n toasterData.type === 'success'\n ? 'success'\n : toasterData.type === 'error'\n ? 'danger'\n : toasterData.type === 'info'\n ? 'info'\n : toasterData.type === 'warning'\n ? 'warning'\n : 'default'\n \"\n >\n <gtr-icon\n [name]=\"\n toasterData.type === 'success'\n ? 'check'\n : toasterData.type === 'error'\n ? 'x'\n : toasterData.type === 'info'\n ? 'info-circle'\n : toasterData.type === 'warning'\n ? 'alert-triangle'\n : 'message'\n \"\n [size]=\"18\"\n ></gtr-icon>\n </gtr-badge>\n </div>\n <div class=\"gtr-toaster-content\">\n <h5 [style.color]=\"toasterData.color\"><b>{{ (toasterData.heading || toasterData.type) | titlecase }}</b></h5>\n <p *ngIf=\"toasterData.message\" [style.color]=\"toasterData.messageColor\">{{ toasterData.message }}</p>\n </div>\n <div class=\"close\" (click)=\"hideToast()\">\n <gtr-icon name=\"x\" [size]=\"20\"></gtr-icon>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.gtr-toaster-wrapper *,.gtr-toaster-wrapper *:after,.gtr-toaster-wrapper *:before{box-sizing:border-box}.gtr-toaster-wrapper{position:fixed;z-index:9999;transition:.6s ease-in-out;display:none}.gtr-toaster-wrapper.top-right{right:12px;top:12px}.gtr-toaster-wrapper.top-left{top:12px;left:12px}.gtr-toaster-wrapper.bottom-left{bottom:12px;left:12px}.gtr-toaster-wrapper.bottom-right{bottom:12px;right:12px}.gtr-toaster-wrapper.center-left{left:12px;top:50%}.gtr-toaster-wrapper.center-right{right:12px;top:50%}.gtr-toaster-wrapper.show{animation:fade-in .4s linear;display:block}.gtr-toaster-wrapper.hide{animation:fade-out .4s linear;display:none}.gtr-toaster-wrapper .gtr-toaster-content-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;width:380px;max-width:380px;border-radius:6px;box-shadow:0 4px 16px #a5a3ae73;background:#fff;padding:20px;align-items:flex-start;box-sizing:border-box}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-icon{margin-right:12px}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content{flex-grow:1;padding:0;margin:0}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content h5{font-family:var(--gtr-component-font-family-base);font-style:normal;font-weight:var(--gtr-size-font-weight-bold);font-size:15px;line-height:22px;padding:0;margin:0;color:var(--gtr-color-base-black-100)}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content p{margin:2px 0 0;padding:0;font-size:13px!important;line-height:20px;color:var(--gtr-color-base-black-60);color:var(--Light-Typography-Color-Body-Text, #4b465c);font-weight:400}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .close{cursor:pointer;color:var(--gtr-color-base-black-60)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@media only screen and (max-width: 480px){.gtr-toaster-content-wrapper{width:100%!important}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }, { kind: "component", type: GtrBadgeComponent, selector: "gtr-badge", inputs: ["name", "dataTransactionName", "shape", "type", "color", "aria-label", "hidden", "position", "id", "testid", "positionProperty", "background-color", "icon-name"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] }); }
|
|
1924
1916
|
}
|
|
1925
1917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrToasterComponent, decorators: [{
|
|
1926
1918
|
type: Component,
|
|
1927
|
-
args: [{ selector: 'gtr-toaster', template: "<!--
|
|
1919
|
+
args: [{ selector: 'gtr-toaster', template: "<!-- gtr-toaster.component.html -->\n\n<div\n tabindex=\"0\"\n #toasterElement\n class=\"gtr-toaster-wrapper\"\n [ngClass]=\"{\n 'show': open,\n 'hide': !open,\n 'top-right': toasterData && toasterData.position ? toasterData.position : 'top-right'\n }\"\n (keydown)=\"handleKeyDown($event)\"\n [id]=\"id\" [attr.data-test-id]=\"testId\"\n>\n <div\n *ngIf=\"open\"\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n class=\"gtr-toaster-content-wrapper\"\n [ngStyle]=\"{ 'background-color': toasterData.backgroundColor }\"\n >\n <div class=\"gtr-toaster-icon\">\n <gtr-badge\n [shape]=\"'default'\"\n [type]=\"'icon'\"\n [color]=\"\n toasterData.type === 'success'\n ? 'success'\n : toasterData.type === 'error'\n ? 'danger'\n : toasterData.type === 'info'\n ? 'info'\n : toasterData.type === 'warning'\n ? 'warning'\n : 'default'\n \"\n >\n <gtr-icon\n [name]=\"\n toasterData.type === 'success'\n ? 'check'\n : toasterData.type === 'error'\n ? 'x'\n : toasterData.type === 'info'\n ? 'info-circle'\n : toasterData.type === 'warning'\n ? 'alert-triangle'\n : 'message'\n \"\n [size]=\"18\"\n ></gtr-icon>\n </gtr-badge>\n </div>\n <div class=\"gtr-toaster-content\">\n <h5 [style.color]=\"toasterData.color\"><b>{{ (toasterData.heading || toasterData.type) | titlecase }}</b></h5>\n <p *ngIf=\"toasterData.message\" [style.color]=\"toasterData.messageColor\">{{ toasterData.message }}</p>\n </div>\n <div class=\"close\" (click)=\"hideToast()\">\n <gtr-icon name=\"x\" [size]=\"20\"></gtr-icon>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}.gtr-toaster-wrapper *,.gtr-toaster-wrapper *:after,.gtr-toaster-wrapper *:before{box-sizing:border-box}.gtr-toaster-wrapper{position:fixed;z-index:9999;transition:.6s ease-in-out;display:none}.gtr-toaster-wrapper.top-right{right:12px;top:12px}.gtr-toaster-wrapper.top-left{top:12px;left:12px}.gtr-toaster-wrapper.bottom-left{bottom:12px;left:12px}.gtr-toaster-wrapper.bottom-right{bottom:12px;right:12px}.gtr-toaster-wrapper.center-left{left:12px;top:50%}.gtr-toaster-wrapper.center-right{right:12px;top:50%}.gtr-toaster-wrapper.show{animation:fade-in .4s linear;display:block}.gtr-toaster-wrapper.hide{animation:fade-out .4s linear;display:none}.gtr-toaster-wrapper .gtr-toaster-content-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;width:380px;max-width:380px;border-radius:6px;box-shadow:0 4px 16px #a5a3ae73;background:#fff;padding:20px;align-items:flex-start;box-sizing:border-box}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-icon{margin-right:12px}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content{flex-grow:1;padding:0;margin:0}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content h5{font-family:var(--gtr-component-font-family-base);font-style:normal;font-weight:var(--gtr-size-font-weight-bold);font-size:15px;line-height:22px;padding:0;margin:0;color:var(--gtr-color-base-black-100)}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .gtr-toaster-content p{margin:2px 0 0;padding:0;font-size:13px!important;line-height:20px;color:var(--gtr-color-base-black-60);color:var(--Light-Typography-Color-Body-Text, #4b465c);font-weight:400}.gtr-toaster-wrapper .gtr-toaster-content-wrapper .close{cursor:pointer;color:var(--gtr-color-base-black-60)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@media only screen and (max-width: 480px){.gtr-toaster-content-wrapper{width:100%!important}}\n"] }]
|
|
1928
1920
|
}], ctorParameters: () => [{ type: GtrToasterService }], propDecorators: { id: [{
|
|
1929
1921
|
type: Input
|
|
1930
1922
|
}], testId: [{
|
|
@@ -8786,7 +8778,7 @@ class GtrInputColorComponent {
|
|
|
8786
8778
|
useExisting: forwardRef((() => GtrInputColorComponent)),
|
|
8787
8779
|
multi: true,
|
|
8788
8780
|
},
|
|
8789
|
-
], ngImport: i0, template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && invalid\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName || name\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n\n <ng-container *ngIf=\"!disabled && invalid && inputControl?.errors && !hideErrorMessage\">\n <div class=\"custom-error\" *ngIf=\"inputControl?.invalid && (inputControl?.dirty || inputControl?.touched)\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n <span *ngIf=\"inputControl?.errors?.['invalidColor']\">The color is invalid.</span>\n </div>\n </ng-container>\n</div>\n", styles: [".input-color-container .gtr-custom-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-color-container ::ng-deep ngx-colors{display:inline-block;margin-left:5px}.input-color-container ::ng-deep ngx-colors .preview{border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.input-color-container ::ng-deep ngx-colors .preview-background{border-radius:6px!important}.input-color-container ::ng-deep ngx-colors .circle{border:1px solid transparent!important;border-radius:6px!important;width:42px!important;height:100%!important;min-height:38px!important}.input-color-container .input-color.has-border ::ng-deep ngx-colors .circle{border-color:var(--gtr-color-base-black-10)!important}::ng-deep ngx-colors-panel .opened button{letter-spacing:.43px!important;padding:8px 12px 8px 10px!important;line-height:18px!important;font-size:15px!important;font-weight:400!important;border:1px solid transparent!important;border-radius:6px!important}\n"], dependencies: [{ kind: "component", type: GtrInputComponent, selector: "gtr-input", inputs: ["inputWrapperId", "loading", "type", "name", "dataTransactionName", "value", "placeholder", "inputIcon", "iconSize", "iconColor", "iconPosition", "iconFontWeight", "inputLabel", "disabled", "validateLabel", "isNumber", "readonly", "isOnlyView", "defaultValidation", "required", "isValid", "inputId", "setFocus"], outputs: ["inputChanged", "handleError"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.NgxColorsComponent, selector: "ngx-colors" }, { kind: "directive", type: i4.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
8781
|
+
], ngImport: i0, template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && invalid\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName || name\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n\n <ng-container *ngIf=\"!disabled && invalid && inputControl?.errors && !hideErrorMessage\">\n <div class=\"custom-error\" *ngIf=\"inputControl?.invalid && (inputControl?.dirty || inputControl?.touched)\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n <span *ngIf=\"inputControl?.errors?.['invalidColor']\">The color is invalid.</span>\n </div>\n </ng-container>\n</div>\n", styles: [".input-color-container .gtr-custom-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-color-container ::ng-deep ngx-colors{display:inline-block;margin-left:5px}.input-color-container ::ng-deep ngx-colors .preview{border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.input-color-container ::ng-deep ngx-colors .preview-background{border-radius:6px!important}.input-color-container ::ng-deep ngx-colors .circle{border:1px solid transparent!important;border-radius:6px!important;width:42px!important;height:100%!important;min-height:38px!important}.input-color-container .input-color.has-border ::ng-deep ngx-colors .circle{border-color:var(--gtr-color-base-black-10)!important}::ng-deep ngx-colors-panel .opened button{letter-spacing:.43px!important;padding:8px 12px 8px 10px!important;line-height:18px!important;font-size:15px!important;font-weight:400!important;border:1px solid transparent!important;border-radius:6px!important}\n"], dependencies: [{ kind: "component", type: GtrInputComponent, selector: "gtr-input", inputs: ["inputWrapperId", "loading", "type", "name", "dataTransactionName", "value", "placeholder", "inputIcon", "iconSize", "iconColor", "iconPosition", "iconFontWeight", "inputLabel", "disabled", "validateLabel", "isNumber", "readonly", "isOnlyView", "defaultValidation", "required", "isValid", "crop", "inputId", "setFocus"], outputs: ["inputChanged", "handleError"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.NgxColorsComponent, selector: "ngx-colors" }, { kind: "directive", type: i4.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
8790
8782
|
}
|
|
8791
8783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: GtrInputColorComponent, decorators: [{
|
|
8792
8784
|
type: Component,
|
|
@@ -10309,6 +10301,187 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
10309
10301
|
}]
|
|
10310
10302
|
}] });
|
|
10311
10303
|
|
|
10304
|
+
const MAX_LOOKUP_RETRIES = 3;
|
|
10305
|
+
class AutosizeDirective {
|
|
10306
|
+
set minRows(value) {
|
|
10307
|
+
this._minRows = +value;
|
|
10308
|
+
if (this.textAreaEl) {
|
|
10309
|
+
this.textAreaEl.rows = this._minRows;
|
|
10310
|
+
}
|
|
10311
|
+
}
|
|
10312
|
+
set _autosize(autosize) {
|
|
10313
|
+
this.autosize = typeof autosize === 'boolean' ? autosize : true;
|
|
10314
|
+
}
|
|
10315
|
+
onInput(textArea) {
|
|
10316
|
+
this.adjust();
|
|
10317
|
+
}
|
|
10318
|
+
constructor(element, _zone) {
|
|
10319
|
+
this.element = element;
|
|
10320
|
+
this._zone = _zone;
|
|
10321
|
+
this.onlyGrow = false;
|
|
10322
|
+
this.useImportant = false;
|
|
10323
|
+
this.resized = new EventEmitter();
|
|
10324
|
+
this.autosize = true;
|
|
10325
|
+
this.retries = 0;
|
|
10326
|
+
this._destroyed = false;
|
|
10327
|
+
if (this.element.nativeElement.tagName !== 'TEXTAREA') {
|
|
10328
|
+
this._findNestedTextArea();
|
|
10329
|
+
}
|
|
10330
|
+
else {
|
|
10331
|
+
this.textAreaEl = this.element.nativeElement;
|
|
10332
|
+
this.textAreaEl.style['overflow-y'] = 'hidden';
|
|
10333
|
+
this._onTextAreaFound();
|
|
10334
|
+
}
|
|
10335
|
+
}
|
|
10336
|
+
ngOnDestroy() {
|
|
10337
|
+
this._destroyed = true;
|
|
10338
|
+
if (this._windowResizeHandler) {
|
|
10339
|
+
window.removeEventListener('resize', this._windowResizeHandler, false);
|
|
10340
|
+
}
|
|
10341
|
+
}
|
|
10342
|
+
ngAfterContentChecked() {
|
|
10343
|
+
this.adjust();
|
|
10344
|
+
}
|
|
10345
|
+
ngOnChanges(changes) {
|
|
10346
|
+
this.adjust(true);
|
|
10347
|
+
}
|
|
10348
|
+
_findNestedTextArea() {
|
|
10349
|
+
this.textAreaEl = this.element.nativeElement.querySelector('TEXTAREA');
|
|
10350
|
+
if (!this.textAreaEl && this.element.nativeElement.shadowRoot) {
|
|
10351
|
+
this.textAreaEl = this.element.nativeElement.shadowRoot.querySelector('TEXTAREA');
|
|
10352
|
+
}
|
|
10353
|
+
if (!this.textAreaEl) {
|
|
10354
|
+
if (this.retries >= MAX_LOOKUP_RETRIES) {
|
|
10355
|
+
console.warn('autosize: textarea not found');
|
|
10356
|
+
}
|
|
10357
|
+
else {
|
|
10358
|
+
this.retries++;
|
|
10359
|
+
setTimeout(() => {
|
|
10360
|
+
this._findNestedTextArea();
|
|
10361
|
+
}, 100);
|
|
10362
|
+
}
|
|
10363
|
+
return;
|
|
10364
|
+
}
|
|
10365
|
+
this.textAreaEl.style['overflow-y'] = 'hidden';
|
|
10366
|
+
this._onTextAreaFound();
|
|
10367
|
+
}
|
|
10368
|
+
_onTextAreaFound() {
|
|
10369
|
+
this._addWindowResizeHandler();
|
|
10370
|
+
setTimeout(() => {
|
|
10371
|
+
this.adjust();
|
|
10372
|
+
});
|
|
10373
|
+
}
|
|
10374
|
+
_addWindowResizeHandler() {
|
|
10375
|
+
this._windowResizeHandler = debounce(() => {
|
|
10376
|
+
this._zone.run(() => {
|
|
10377
|
+
this.adjust();
|
|
10378
|
+
});
|
|
10379
|
+
}, 200);
|
|
10380
|
+
this._zone.runOutsideAngular(() => {
|
|
10381
|
+
window.addEventListener('resize', this._windowResizeHandler, false);
|
|
10382
|
+
});
|
|
10383
|
+
}
|
|
10384
|
+
adjust(inputsChanged = false) {
|
|
10385
|
+
if (this.autosize && !this._destroyed && this.textAreaEl && this.textAreaEl.parentNode) {
|
|
10386
|
+
const currentText = this.textAreaEl.value;
|
|
10387
|
+
if (inputsChanged === false &&
|
|
10388
|
+
currentText === this._oldContent &&
|
|
10389
|
+
this.textAreaEl.offsetWidth === this._oldWidth) {
|
|
10390
|
+
return;
|
|
10391
|
+
}
|
|
10392
|
+
this._oldContent = currentText;
|
|
10393
|
+
this._oldWidth = this.textAreaEl.offsetWidth;
|
|
10394
|
+
const clone = this.textAreaEl.cloneNode(true);
|
|
10395
|
+
const parent = this.textAreaEl.parentNode;
|
|
10396
|
+
clone.style.width = this.textAreaEl.offsetWidth + 'px';
|
|
10397
|
+
clone.style.visibility = 'hidden';
|
|
10398
|
+
clone.style.position = 'absolute';
|
|
10399
|
+
clone.textContent = currentText;
|
|
10400
|
+
parent.appendChild(clone);
|
|
10401
|
+
clone.style['overflow-y'] = 'hidden';
|
|
10402
|
+
clone.style.height = 'auto';
|
|
10403
|
+
let height = clone.scrollHeight;
|
|
10404
|
+
// add into height top and bottom borders' width
|
|
10405
|
+
let computedStyle = window.getComputedStyle(clone, null);
|
|
10406
|
+
height += parseInt(computedStyle.getPropertyValue('border-top-width'));
|
|
10407
|
+
height += parseInt(computedStyle.getPropertyValue('border-bottom-width'));
|
|
10408
|
+
if (computedStyle.getPropertyValue('box-sizing') === 'content-box') {
|
|
10409
|
+
height -= parseInt(computedStyle.getPropertyValue('padding-top'));
|
|
10410
|
+
height -= parseInt(computedStyle.getPropertyValue('padding-bottom'));
|
|
10411
|
+
}
|
|
10412
|
+
const oldHeight = this.textAreaEl.offsetHeight;
|
|
10413
|
+
const willGrow = height > oldHeight;
|
|
10414
|
+
if (this.onlyGrow === false || willGrow) {
|
|
10415
|
+
const lineHeight = this._getLineHeight();
|
|
10416
|
+
const rowsCount = height / lineHeight;
|
|
10417
|
+
if (this._minRows && this._minRows >= rowsCount) {
|
|
10418
|
+
height = this._minRows * lineHeight;
|
|
10419
|
+
}
|
|
10420
|
+
else if (this.maxRows && this.maxRows <= rowsCount) {
|
|
10421
|
+
// never shrink the textarea if onlyGrow is true
|
|
10422
|
+
const maxHeight = this.maxRows * lineHeight;
|
|
10423
|
+
height = this.onlyGrow ? Math.max(maxHeight, oldHeight) : maxHeight;
|
|
10424
|
+
this.textAreaEl.style['overflow-y'] = 'auto';
|
|
10425
|
+
}
|
|
10426
|
+
else {
|
|
10427
|
+
this.textAreaEl.style['overflow-y'] = 'hidden';
|
|
10428
|
+
}
|
|
10429
|
+
const heightStyle = height + 'px';
|
|
10430
|
+
const important = this.useImportant ? 'important' : '';
|
|
10431
|
+
this.textAreaEl.style.setProperty('height', heightStyle, important);
|
|
10432
|
+
this.resized.emit(height);
|
|
10433
|
+
}
|
|
10434
|
+
parent.removeChild(clone);
|
|
10435
|
+
}
|
|
10436
|
+
}
|
|
10437
|
+
_getLineHeight() {
|
|
10438
|
+
let lineHeight = parseInt(this.textAreaEl.style.lineHeight, 10);
|
|
10439
|
+
if (isNaN(lineHeight) && window.getComputedStyle) {
|
|
10440
|
+
const styles = window.getComputedStyle(this.textAreaEl);
|
|
10441
|
+
lineHeight = parseInt(styles.lineHeight, 10);
|
|
10442
|
+
}
|
|
10443
|
+
if (isNaN(lineHeight)) {
|
|
10444
|
+
const fontSize = window.getComputedStyle(this.textAreaEl, null).getPropertyValue('font-size');
|
|
10445
|
+
lineHeight = Math.floor(parseInt(fontSize.replace('px', ''), 10) * 1.5);
|
|
10446
|
+
}
|
|
10447
|
+
return lineHeight;
|
|
10448
|
+
}
|
|
10449
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AutosizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10450
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AutosizeDirective, isStandalone: true, selector: "[autosize]", inputs: { minRows: "minRows", _autosize: ["autosize", "_autosize"], maxRows: "maxRows", onlyGrow: "onlyGrow", useImportant: "useImportant" }, outputs: { resized: "resized" }, host: { listeners: { "input": "onInput($event.target)" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
10451
|
+
}
|
|
10452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AutosizeDirective, decorators: [{
|
|
10453
|
+
type: Directive,
|
|
10454
|
+
args: [{
|
|
10455
|
+
selector: '[autosize]',
|
|
10456
|
+
standalone: true,
|
|
10457
|
+
}]
|
|
10458
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { minRows: [{
|
|
10459
|
+
type: Input
|
|
10460
|
+
}], _autosize: [{
|
|
10461
|
+
type: Input,
|
|
10462
|
+
args: ['autosize']
|
|
10463
|
+
}], maxRows: [{
|
|
10464
|
+
type: Input
|
|
10465
|
+
}], onlyGrow: [{
|
|
10466
|
+
type: Input
|
|
10467
|
+
}], useImportant: [{
|
|
10468
|
+
type: Input
|
|
10469
|
+
}], resized: [{
|
|
10470
|
+
type: Output
|
|
10471
|
+
}], onInput: [{
|
|
10472
|
+
type: HostListener,
|
|
10473
|
+
args: ['input', ['$event.target']]
|
|
10474
|
+
}] } });
|
|
10475
|
+
function debounce(func, timeout) {
|
|
10476
|
+
let timer;
|
|
10477
|
+
return (...args) => {
|
|
10478
|
+
clearTimeout(timer);
|
|
10479
|
+
timer = setTimeout(() => {
|
|
10480
|
+
func(...args);
|
|
10481
|
+
}, timeout);
|
|
10482
|
+
};
|
|
10483
|
+
}
|
|
10484
|
+
|
|
10312
10485
|
/*
|
|
10313
10486
|
* Public API Surface of core-components-angular
|
|
10314
10487
|
*/
|
|
@@ -10317,5 +10490,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
10317
10490
|
* Generated bundle index. Do not edit.
|
|
10318
10491
|
*/
|
|
10319
10492
|
|
|
10320
|
-
export { BreakpointInfix, CContrastBorderColorVariable, ColorHelper, EContrastColor, GtrAccordionComponent, GtrAccordionModule, GtrAccordionWrapperComponent, GtrBadgeComponent, GtrBadgeModule, GtrButtonCloseDirective, GtrButtonComponent, GtrButtonDirective, GtrButtonDirectiveModule, GtrButtonModule, GtrCalendarComponent, GtrCalendarModule, GtrCalendarMonthComponent, GtrCalendarNavigationComponent, GtrCheckboxComponent, GtrCheckboxModule, GtrComponentName, GtrDatePickerComponent, GtrDatePickerModule, GtrDateRangePickerComponent, GtrDateRangePickerModule, GtrDisplayValueComponent, GtrDisplayValueModule, GtrDropdownCloseDirective, GtrDropdownComponent, GtrDropdownDividerDirective, GtrDropdownHeaderDirective, GtrDropdownItemDirective, GtrDropdownItemPlainDirective, GtrDropdownMenuDirective, GtrDropdownModule, GtrDropdownService, GtrDropdownToggleDirective, GtrFileInputComponent, GtrFileInputModule, GtrFormCheckComponent, GtrFormCheckInputDirective, GtrFormCheckLabelDirective, GtrFormControlDirective, GtrFormDirective, GtrFormFeedbackComponent, GtrFormFloatingDirective, GtrFormLabelDirective, GtrFormModule, GtrFormSelectDirective, GtrFormTextDirective, GtrFormatSelectedValuePipe, GtrHtmlAttributesDirective, GtrIconComponent, GtrIconModule, GtrInputColorComponent, GtrInputColorModule, GtrInputComponent, GtrInputGroupComponent, GtrInputGroupTextDirective, GtrInputModule, GtrModalComponent, GtrModalModule, GtrNumericCounterComponent, GtrNumericCounterModule, GtrPaginationComponent, GtrPaginationModule, GtrPopoverComponent, GtrPopoverModule, GtrRadioButtonComponent, GtrRadioButtonModule, GtrSelectComponent, GtrSelectListLoaderVariation, GtrSelectModule, GtrSharedModule, GtrSkeletonComponent, GtrSkeletonDirective, GtrSkeletonModule, GtrStatCardComponent, GtrStatCardModule, GtrSwitchComponent, GtrSwitchModule, GtrTabComponent, GtrTableComponent, GtrTableMainComponent, GtrTableModule, GtrTableResponsiveComponent, GtrTabsModule, GtrTabsWrapperComponent, GtrTemplateIdDirective, GtrTextareaComponent, GtrTextareaModule, GtrTimePickerComponent, GtrTimePickerModule, GtrToasterComponent, GtrToasterModule, GtrToasterService, GtrTooltipComponent, GtrTooltipModule, GtrTrimTextPipe, GtrValidatePagePipe, convert12hTo24h, convert24hTo12h, convertTimeToDate, getAmPm, getDayPeriods, getListOfHours, getListOfMinutes, getListOfSeconds, getSelectedHour, getSelectedMinutes, getSelectedSeconds, getSupportedLocale, isAm, isAmPm, isHour12, isPm, isValidTime, isValidTimeZone };
|
|
10493
|
+
export { AutosizeDirective, BreakpointInfix, CContrastBorderColorVariable, ColorHelper, EContrastColor, GtrAccordionComponent, GtrAccordionModule, GtrAccordionWrapperComponent, GtrBadgeComponent, GtrBadgeModule, GtrButtonCloseDirective, GtrButtonComponent, GtrButtonDirective, GtrButtonDirectiveModule, GtrButtonModule, GtrCalendarComponent, GtrCalendarModule, GtrCalendarMonthComponent, GtrCalendarNavigationComponent, GtrCheckboxComponent, GtrCheckboxModule, GtrComponentName, GtrDatePickerComponent, GtrDatePickerModule, GtrDateRangePickerComponent, GtrDateRangePickerModule, GtrDisplayValueComponent, GtrDisplayValueModule, GtrDropdownCloseDirective, GtrDropdownComponent, GtrDropdownDividerDirective, GtrDropdownHeaderDirective, GtrDropdownItemDirective, GtrDropdownItemPlainDirective, GtrDropdownMenuDirective, GtrDropdownModule, GtrDropdownService, GtrDropdownToggleDirective, GtrFileInputComponent, GtrFileInputModule, GtrFormCheckComponent, GtrFormCheckInputDirective, GtrFormCheckLabelDirective, GtrFormControlDirective, GtrFormDirective, GtrFormFeedbackComponent, GtrFormFloatingDirective, GtrFormLabelDirective, GtrFormModule, GtrFormSelectDirective, GtrFormTextDirective, GtrFormatSelectedValuePipe, GtrHtmlAttributesDirective, GtrIconComponent, GtrIconModule, GtrInputColorComponent, GtrInputColorModule, GtrInputComponent, GtrInputGroupComponent, GtrInputGroupTextDirective, GtrInputModule, GtrModalComponent, GtrModalModule, GtrNumericCounterComponent, GtrNumericCounterModule, GtrPaginationComponent, GtrPaginationModule, GtrPopoverComponent, GtrPopoverModule, GtrRadioButtonComponent, GtrRadioButtonModule, GtrSelectComponent, GtrSelectListLoaderVariation, GtrSelectModule, GtrSharedModule, GtrSkeletonComponent, GtrSkeletonDirective, GtrSkeletonModule, GtrStatCardComponent, GtrStatCardModule, GtrSwitchComponent, GtrSwitchModule, GtrTabComponent, GtrTableComponent, GtrTableMainComponent, GtrTableModule, GtrTableResponsiveComponent, GtrTabsModule, GtrTabsWrapperComponent, GtrTemplateIdDirective, GtrTextareaComponent, GtrTextareaModule, GtrTimePickerComponent, GtrTimePickerModule, GtrToasterComponent, GtrToasterModule, GtrToasterService, GtrTooltipComponent, GtrTooltipModule, GtrTrimTextPipe, GtrValidatePagePipe, convert12hTo24h, convert24hTo12h, convertTimeToDate, getAmPm, getDayPeriods, getListOfHours, getListOfMinutes, getListOfSeconds, getSelectedHour, getSelectedMinutes, getSelectedSeconds, getSupportedLocale, isAm, isAmPm, isHour12, isPm, isValidTime, isValidTimeZone };
|
|
10321
10494
|
//# sourceMappingURL=gettrx-core-components-angular.mjs.map
|