quang 19.3.2 → 19.3.3
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.
|
@@ -21,7 +21,7 @@ class QuangInputComponent extends QuangBaseComponent {
|
|
|
21
21
|
this.componentStep = input(1);
|
|
22
22
|
this.resizable = input(true);
|
|
23
23
|
this.buttonClass = input('');
|
|
24
|
-
this.showHidePasswordButton = input(
|
|
24
|
+
this.showHidePasswordButton = input(false);
|
|
25
25
|
this.showPassword = signal(false);
|
|
26
26
|
this.componentInputType = computed(() => this.componentType() === 'password' && this.showPassword() ? 'text' : this.componentType());
|
|
27
27
|
toObservable(this.componentType)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quang-components-input.mjs","sources":["../../../projects/quang/components/input/input.component.ts","../../../projects/quang/components/input/input.component.html","../../../projects/quang/components/input/quang-components-input.ts"],"sourcesContent":["import { NgClass } from '@angular/common'\nimport { ChangeDetectionStrategy, Component, computed, forwardRef, input, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\n\nimport { QuangBaseComponent } from 'quang/components/shared'\n\nexport type InputType = 'text' | 'textarea' | 'password' | 'email' | 'number' | 'url' | 'search' | 'tel' | 'color'\n\n@Component({\n selector: 'quang-input',\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => QuangInputComponent),\n multi: true,\n },\n ],\n imports: [TranslocoPipe, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Input component that handles all the types declared in {@link InputType}\n * @property {boolean} resizable just for textarea {@link InputType}\n */\nexport class QuangInputComponent extends QuangBaseComponent<string | number> {\n componentType = input.required<InputType>()\n\n maxLengthText = input<number | null>(null)\n\n minLengthText = input<number | null>(null)\n\n minNumber = input<number | undefined>(undefined)\n\n maxNumber = input<number | undefined>(undefined)\n\n componentStep = input<number>(1)\n\n resizable = input(true)\n\n buttonClass = input<string>('')\n\n showHidePasswordButton = input(
|
|
1
|
+
{"version":3,"file":"quang-components-input.mjs","sources":["../../../projects/quang/components/input/input.component.ts","../../../projects/quang/components/input/input.component.html","../../../projects/quang/components/input/quang-components-input.ts"],"sourcesContent":["import { NgClass } from '@angular/common'\nimport { ChangeDetectionStrategy, Component, computed, forwardRef, input, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\n\nimport { QuangBaseComponent } from 'quang/components/shared'\n\nexport type InputType = 'text' | 'textarea' | 'password' | 'email' | 'number' | 'url' | 'search' | 'tel' | 'color'\n\n@Component({\n selector: 'quang-input',\n templateUrl: './input.component.html',\n styleUrl: './input.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => QuangInputComponent),\n multi: true,\n },\n ],\n imports: [TranslocoPipe, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Input component that handles all the types declared in {@link InputType}\n * @property {boolean} resizable just for textarea {@link InputType}\n */\nexport class QuangInputComponent extends QuangBaseComponent<string | number> {\n componentType = input.required<InputType>()\n\n maxLengthText = input<number | null>(null)\n\n minLengthText = input<number | null>(null)\n\n minNumber = input<number | undefined>(undefined)\n\n maxNumber = input<number | undefined>(undefined)\n\n componentStep = input<number>(1)\n\n resizable = input(true)\n\n buttonClass = input<string>('')\n\n showHidePasswordButton = input(false)\n\n showPassword = signal<boolean>(false)\n\n componentInputType = computed<InputType>(() =>\n this.componentType() === 'password' && this.showPassword() ? 'text' : this.componentType()\n )\n\n constructor() {\n super()\n toObservable(this.componentType)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.setupFormControl()\n })\n }\n\n onTogglePasswordVisibility(): void {\n this.showPassword.update((current) => !current)\n }\n}\n","@if (componentType()) {\n <div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n @if (componentType() !== 'textarea') {\n <div class=\"input-container\">\n <input\n [attr.maxLength]=\"maxLengthText()\"\n [attr.minLength]=\"minLengthText()\"\n [attr.required]=\"getIsRequiredControl()\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.with-button-password]=\"showHidePasswordButton()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [max]=\"maxNumber()\"\n [min]=\"minNumber()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [step]=\"componentStep()\"\n [tabIndex]=\"componentTabIndex()\"\n [type]=\"componentInputType()\"\n [value]=\"_value()\"\n (blur)=\"onBlurHandler()\"\n (input)=\"onChangedEventHandler($event)\"\n autocomplete=\"off\"\n class=\"form-control\"\n />\n @if (componentType() === 'password' && showHidePasswordButton()) {\n <button\n [class.border-danger]=\"_showErrors()\"\n [class.border-success]=\"_showSuccess()\"\n [ngClass]=\"buttonClass()\"\n (click)=\"_ngControl()?.disabled ? null : onTogglePasswordVisibility()\"\n #calendarButton\n aria-label=\"calendar-button\"\n class=\"btn btn-outline-secondary btn-outline-password\"\n type=\"button\"\n >\n @if (showPassword()) {\n <ng-content select=\"[hide-password]\"></ng-content>\n } @else {\n <ng-content select=\"[show-password]\"></ng-content>\n }\n </button>\n }\n </div>\n }\n @if (componentType() === 'textarea') {\n <textarea\n [attr.maxLength]=\"maxLengthText()\"\n [attr.minLength]=\"minLengthText()\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.no-resize]=\"!resizable()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"_value()\"\n (blur)=\"onBlurHandler()\"\n (input)=\"onChangedEventHandler($event)\"\n class=\"form-control\"\n ></textarea>\n }\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAyBA;;;AAGG;AACG,MAAO,mBAAoB,SAAQ,kBAAmC,CAAA;AAyB1E,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAzBT,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAa;AAE3C,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAgB,IAAI,CAAC;AAE1C,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAgB,IAAI,CAAC;AAE1C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,SAAS,CAAC;AAEhD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAqB,SAAS,CAAC;AAEhD,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,CAAC,CAAC;AAEhC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;AAEvB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;AAE/B,QAAA,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAC,KAAK,CAAC;AAErC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAU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IAAA,EDtEY,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAOrB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAlB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAGZ,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACQ,OAAA,EAAA,CAAC,aAAa,EAAE,OAAO,CAAC,EAChB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,stGAAA,EAAA,MAAA,EAAA,CAAA,olCAAA,CAAA,EAAA;;;AEvBjD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quang",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "19.3.
|
|
4
|
+
"version": "19.3.3",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.3.0"
|
|
7
7
|
},
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"types": "./auth/index.d.ts",
|
|
68
68
|
"default": "./fesm2022/quang-auth.mjs"
|
|
69
69
|
},
|
|
70
|
-
"./data-handling": {
|
|
71
|
-
"types": "./data-handling/index.d.ts",
|
|
72
|
-
"default": "./fesm2022/quang-data-handling.mjs"
|
|
73
|
-
},
|
|
74
70
|
"./forms": {
|
|
75
71
|
"types": "./forms/index.d.ts",
|
|
76
72
|
"default": "./fesm2022/quang-forms.mjs"
|
|
77
73
|
},
|
|
74
|
+
"./data-handling": {
|
|
75
|
+
"types": "./data-handling/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/quang-data-handling.mjs"
|
|
77
|
+
},
|
|
78
78
|
"./device": {
|
|
79
79
|
"types": "./device/index.d.ts",
|
|
80
80
|
"default": "./fesm2022/quang-device.mjs"
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
"types": "./components/input/index.d.ts",
|
|
112
112
|
"default": "./fesm2022/quang-components-input.mjs"
|
|
113
113
|
},
|
|
114
|
-
"./components/select": {
|
|
115
|
-
"types": "./components/select/index.d.ts",
|
|
116
|
-
"default": "./fesm2022/quang-components-select.mjs"
|
|
117
|
-
},
|
|
118
114
|
"./components/paginator": {
|
|
119
115
|
"types": "./components/paginator/index.d.ts",
|
|
120
116
|
"default": "./fesm2022/quang-components-paginator.mjs"
|
|
121
117
|
},
|
|
118
|
+
"./components/select": {
|
|
119
|
+
"types": "./components/select/index.d.ts",
|
|
120
|
+
"default": "./fesm2022/quang-components-select.mjs"
|
|
121
|
+
},
|
|
122
122
|
"./components/shared": {
|
|
123
123
|
"types": "./components/shared/index.d.ts",
|
|
124
124
|
"default": "./fesm2022/quang-components-shared.mjs"
|
|
@@ -127,6 +127,10 @@
|
|
|
127
127
|
"types": "./components/table/index.d.ts",
|
|
128
128
|
"default": "./fesm2022/quang-components-table.mjs"
|
|
129
129
|
},
|
|
130
|
+
"./components/wysiwyg": {
|
|
131
|
+
"types": "./components/wysiwyg/index.d.ts",
|
|
132
|
+
"default": "./fesm2022/quang-components-wysiwyg.mjs"
|
|
133
|
+
},
|
|
130
134
|
"./overlay/modal": {
|
|
131
135
|
"types": "./overlay/modal/index.d.ts",
|
|
132
136
|
"default": "./fesm2022/quang-overlay-modal.mjs"
|
|
@@ -139,17 +143,13 @@
|
|
|
139
143
|
"types": "./overlay/shared/index.d.ts",
|
|
140
144
|
"default": "./fesm2022/quang-overlay-shared.mjs"
|
|
141
145
|
},
|
|
142
|
-
"./
|
|
143
|
-
"types": "./
|
|
144
|
-
"default": "./fesm2022/quang-
|
|
146
|
+
"./overlay/toast": {
|
|
147
|
+
"types": "./overlay/toast/index.d.ts",
|
|
148
|
+
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
145
149
|
},
|
|
146
150
|
"./overlay/tooltip": {
|
|
147
151
|
"types": "./overlay/tooltip/index.d.ts",
|
|
148
152
|
"default": "./fesm2022/quang-overlay-tooltip.mjs"
|
|
149
|
-
},
|
|
150
|
-
"./overlay/toast": {
|
|
151
|
-
"types": "./overlay/toast/index.d.ts",
|
|
152
|
-
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|