Skip to content

Commit

Permalink
feat(ref: no-ref): release
Browse files Browse the repository at this point in the history
release
  • Loading branch information
andriikamaldinov1 authored Nov 11, 2024
2 parents 8043f3f + 23e1ee0 commit 7d8696b
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 18.0.4(2024-11-11)

### Fix

- Fix ([#1449](https://github.com/JsDaddy/ngx-mask/issues/1449))


# 18.0.3(2024-11-05)

### Fix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mask",
"version": "18.0.3",
"version": "18.0.4",
"description": "Awesome ngx mask",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mask-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-mask",
"version": "18.0.3",
"version": "18.0.4",
"description": "awesome ngx mask",
"keywords": [
"ng2-mask",
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-mask-lib/src/lib/ngx-mask.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type NgxMaskConfig = {
shownMaskExpression: string;
specialCharacters: string[] | readonly string[];
dropSpecialCharacters: boolean | string[] | readonly string[];
hiddenInput: boolean;
hiddenInput: boolean | null;
validation: boolean;
separatorLimit: string;
apm: boolean;
Expand Down Expand Up @@ -54,7 +54,7 @@ export const initialConfig: NgxMaskConfig = {
showMaskTyped: false,
placeHolderCharacter: '_',
dropSpecialCharacters: true,
hiddenInput: false,
hiddenInput: null,
shownMaskExpression: '',
separatorLimit: '',
allowNegativeNumbers: false,
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mask-lib/src/lib/ngx-mask.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class NgxMaskService extends NgxMaskApplierService {
: MaskExpression.EMPTY_STRING;
let newInputValue = '';
let newPosition = position;
if (this.hiddenInput && !this.writingValue) {
if (this.hiddenInput !== null && !this.writingValue) {
let actualResult: string[] =
inputValue && inputValue.length === 1
? inputValue.split(MaskExpression.EMPTY_STRING)
Expand Down
15 changes: 15 additions & 0 deletions projects/ngx-mask-lib/src/test/secure-mask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,19 @@ describe('Directive: Mask (Secure)', () => {
component.hiddenInput = false;
equal(inputTarget.value, '123-45-6', fixture, true);
});

it('change hiddenInput to false when mask is full', async () => {
const debug: DebugElement = fixture.debugElement.query(By.css('input'));
const inputTarget: HTMLInputElement = debug.nativeElement as HTMLInputElement;
spyOnProperty(document, 'activeElement').and.returnValue(inputTarget);
fixture.detectChanges();
component.mask = 'XXX/XX/XXXX';
component.hiddenInput = true;
equal('123456789', '***/**/****', fixture);
expect(component.form.value).toBe('123456789');
fixture.detectChanges();
component.hiddenInput = false;
equal(inputTarget.value, '123/45/6789', fixture, true);
expect(component.form.value).toBe('123456789');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class CypressTestMaskComponent {
protected _config = inject<NgxMaskConfig>(NGX_MASK_CONFIG);
@Input() public mask = '';

@Input() public hiddenInput = false;
@Input() public hiddenInput = null;

@Input() public allowNegativeNumbers = false;

Expand Down
2 changes: 1 addition & 1 deletion src/app/options/options.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
[validation]="ex._validation || false"
[showMaskTyped]="ex._showMaskTyped || false"
[clearIfNotMatch]="ex._clearIfNotMatch"
[hiddenInput]="ex._hiddenInput || undefined"
[hiddenInput]="ex._hiddenInput || null"
[outputTransformFn]="ex._outputTransformFn || outputTransformFn"
[inputTransformFn]="ex._inputTransformFn || inputTransformFn"
class="w-full h-[51px] placeholder:text-white/25 text-full-white py-3 px-5 outline-none bg-black border-b-2px border-b-white rounded-10px focus:border-b-yellow hover:border-b-yellow hover:bg-full-white/25 focus:bg-full-white/25" />
Expand Down
15 changes: 11 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"esModuleInterop": true,
"declaration": false,
"module": "esnext",
"module": "ES2022",
"experimentalDecorators": true,
"strict": true,
"target": "ES2022",
"lib": ["es2020", "dom"],
"lib": ["ES2022", "dom"],
"paths": {
"ngx-mask": ["projects/ngx-mask-lib/src"],
"ngx-mask/*": ["projects/ngx-mask-lib/src"],
Expand All @@ -25,11 +26,17 @@
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"useUnknownInCatchVariables": true,
"exactOptionalPropertyTypes": true,
"removeComments": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"useDefineForClassFields": false,
"skipLibCheck": true,
"noImplicitAny": true
"noImplicitAny": true,
"useDefineForClassFields": true,
"isolatedModules": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down

0 comments on commit 7d8696b

Please sign in to comment.