<commit_before>import { Component, ViewChild, ViewContainerRef } from '@angular/core';
import { FieldWrapper, FormlyFieldConfig, FormlyConfig, FieldType } from 'ng-formly';

// wrapper component
@Component({
	selector: 'lu-formly-wrapper-suffix',
	styleUrls: ['flex-layout.scss'],
	templateUrl: './suffix.html',
})
export class LuFormlyWrapperSuffix extends FieldWrapper {
	@ViewChild('fieldComponent', {read: ViewContainerRef}) fieldComponent: ViewContainerRef;
}
// run to know when to add said wrapper
export class TemplateSuffix {
	run(fc: FormlyConfig) {
		fc.templateManipulators.postWrapper.push((field: FormlyFieldConfig) => {
			if (field && field.templateOptions && field.templateOptions.suffix) {
				return 'suffix';
			}
		});
	}
}<commit_msg>formly [add] auto add calendar suffix on date input<commit_after>import { Component, ViewChild, ViewContainerRef } from '@angular/core';
import { FieldWrapper, FormlyFieldConfig, FormlyConfig, FieldType } from 'ng-formly';

// wrapper component
@Component({
	selector: 'lu-formly-wrapper-suffix',
	styleUrls: ['flex-layout.scss'],
	templateUrl: './suffix.html',
})
export class LuFormlyWrapperSuffix extends FieldWrapper {
	@ViewChild('fieldComponent', {read: ViewContainerRef}) fieldComponent: ViewContainerRef;
}
// run to know when to add said wrapper
export class TemplateSuffix {
	run(fc: FormlyConfig) {
		fc.templateManipulators.postWrapper.push((field: FormlyFieldConfig) => {
			if (field && field.type === 'date') {
				field.templateOptions.suffix = 'calendar';
				return 'suffix';
			}
			if (field && field.templateOptions && field.templateOptions.suffix) {
				return 'suffix';
			}
		});
	}
}
{'fraction_non_alphanumeric': 0.1328125, 'fraction_numerical': 0.0, 'mean_word_length': 5.283018867924528, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6531597', 'n_tokens_mistral': 535, 'n_tokens_neox': 493, 'n_words': 122}