@grapecity/inputman.angular
Version:
このパッケージには、Angular用の[InputManJS](https://developer.mescius.jp/inputmanjs)コンポーネントが含まれます。
1,122 lines (1,114 loc) • 121 kB
JavaScript
import * as i0 from '@angular/core';
import { forwardRef, EventEmitter, Component, Input, Output, ContentChildren, Optional, NgModule } from '@angular/core';
import * as GC from '@grapecity/inputman';
import { __decorate, __metadata } from 'tslib';
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
const IMCtrl = "__imctrl";
function Property(setter, getter, isPramArr, supportWithinConfig, order) {
var saveToTargetProDic = function (target, propertyName) {
var methods = {
setter: setter,
getter: getter,
isPramArr: isPramArr,
supportWithinConfig: (typeof supportWithinConfig === "boolean") ? supportWithinConfig : true,
order: (typeof order === "number") ? order : -1
};
if (!target.propDic) {
target.propDic = {};
}
target.propDic[propertyName] = methods;
};
return saveToTargetProDic;
}
const isEmpty = function (value) {
return value === undefined || value === null || value === "";
};
const getMethodPrefix = function (type) {
if (type === MethodType.getter) {
return "get";
}
else if (type === MethodType.setter) {
return "set";
}
};
var MethodType;
(function (MethodType) {
MethodType[MethodType["getter"] = 0] = "getter";
MethodType[MethodType["setter"] = 1] = "setter";
})(MethodType || (MethodType = {}));
function provideParent(component) {
return { provide: GcComponents, useExisting: forwardRef(() => component) };
}
class GcComponents {
constructor(ref) {
this.onInitialized = new EventEmitter();
this._container = ref.nativeElement;
}
ngOnChanges(changes) {
if (!this._imCtrl) {
return;
}
Object.keys(changes).forEach((key) => {
var currentValue = changes[key].currentValue;
this.setValueToIMControl(key, currentValue);
});
}
setValueToIMControl(key, value) {
if (value === undefined) {
return;
}
if (this.isSetAccessor(key)) {
this._imCtrl[key] = value;
return;
}
var setter = this.tryGetPropertyOperator(key, MethodType.setter);
if (this.hasRealMethod(setter)) {
if (this.propDic && this.propDic[key] && this.propDic[key].isPramArr === true) {
this._imCtrl[setter].apply(this._imCtrl, value);
}
else {
this._imCtrl[setter](value);
}
}
}
isSetAccessor(key, prototype = Object.getPrototypeOf(this._imCtrl)) {
let descriptor = Object.getOwnPropertyDescriptor(prototype, key);
if (descriptor && descriptor.set) {
return true;
}
else {
prototype = Object.getPrototypeOf(prototype);
if (prototype) {
return this.isSetAccessor(key, prototype);
}
}
return false;
}
ngOnDestroy() {
if (this._container != null) {
if ((this._imCtrl).destroy) {
(this._imCtrl).destroy();
}
this._container.remove();
}
}
ngAfterContentInit() {
this.initGcComponent();
if (typeof this._imCtrl === 'object') {
this.onInitialized.emit(this._imCtrl);
}
this.bindEvent();
if (this.propDic) {
var unSupportWithinConfigProps = Object.keys(this.propDic).filter(p => this.propDic[p] && this.propDic[p].supportWithinConfig === false);
unSupportWithinConfigProps.sort((p1, p2) => {
return this.propDic[p1].order - this.propDic[p2].order;
});
unSupportWithinConfigProps.forEach(p => {
this.setValueToIMControl(p, this[p]);
});
}
this._container[IMCtrl] = this._imCtrl;
}
tryGetPropertyOperator(propertyName, methodType) {
var method = "";
if (this.propDic && this.propDic[propertyName]) {
method = methodType === MethodType.getter ? this.propDic[propertyName].getter : this.propDic[propertyName].setter;
if (!isEmpty(method)) {
return method;
}
}
return getMethodPrefix(methodType) + propertyName[0].toUpperCase() + propertyName.slice(1);
}
hasRealMethod(methodName) {
return this._imCtrl && typeof this._imCtrl[methodName] === "function";
}
getNestedIMControl() {
return this._imCtrl;
}
createTemplate(element) {
this._container.appendChild(element);
if (element && this.name) {
element.setAttribute('name', this.name);
}
}
}
GcComponents.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComponents, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcComponents.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcComponents, selector: "ng-component", inputs: { name: "name" }, outputs: { onInitialized: "onInitialized" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComponents, decorators: [{
type: Component,
args: [{
template: ''
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { name: [{
type: Input
}], onInitialized: [{
type: Output
}] } });
class GcCalculatorComponent extends GcComponents {
constructor(ref) {
super(ref);
}
initGcComponent() {
var element = document.createElement('div');
this.createTemplate(element);
this._imCtrl = new GC.InputMan.GcCalculator(element, this);
}
bindEvent() { }
}
GcCalculatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcCalculatorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcCalculatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcCalculatorComponent, selector: "gc-calculator", inputs: { value: "value", showOutput: "showOutput", visible: "visible", enabled: "enabled", buttonText: "buttonText" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcCalculatorComponent, decorators: [{
type: Component,
args: [{
selector: 'gc-calculator',
template: ``
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { value: [{
type: Input
}], showOutput: [{
type: Input
}], visible: [{
type: Input
}], enabled: [{
type: Input
}], buttonText: [{
type: Input
}] } });
class GcCalendarComponent extends GcComponents {
constructor(ref) {
super(ref);
this.onChange = () => { };
this.onTouched = () => { };
this.onClickDate = new EventEmitter();
this.onScrolled = new EventEmitter();
this.onFocusDateChanged = new EventEmitter();
this.onSelectedDateChanged = new EventEmitter();
// For V2.1 Compatibility, we have to keep this property or event
this.focusDateChange = new EventEmitter();
this.selectedDateChange = new EventEmitter();
}
writeValue(value) {
if (this.selectionMode == undefined || this.selectionMode == GC.InputMan.CalendarSelectionMode.One) {
this.selectedDate = value;
if (this._imCtrl) {
this._imCtrl.selectedDate = this.selectedDate;
}
}
else {
if (this._imCtrl) {
if (value instanceof Array) {
this._imCtrl.setSelections(value);
}
else {
this._imCtrl.setSelections([value]);
}
}
}
}
registerOnChange(onChange) {
this.onChange = onChange;
}
registerOnTouched(onTouched) {
this.onTouched = onTouched;
}
setDisabledState(isDisabled) {
this.enabled = !isDisabled;
if (this._imCtrl) {
this._imCtrl.enabled = this.enabled;
}
}
initGcComponent() {
var element = document.createElement('div');
this.createTemplate(element);
if (Array.isArray(this.calendarDimensions)) {
this.calendarDimensions = {
width: this.calendarDimensions[0],
height: this.calendarDimensions[1]
};
}
this._imCtrl = new GC.InputMan.GcCalendar(element, this);
}
bindEvent() {
if (!this._imCtrl) {
return;
}
this._imCtrl.onClickDate((s) => { this.onClickDate.emit(s); });
this._imCtrl.onScrolled((s) => { this.onScrolled.emit(s); });
this._imCtrl.onFocusDateChanged((s) => {
this.onFocusDateChanged.emit(s);
this.focusDateChange.emit(s.getFocusDate());
});
this._imCtrl.onSelectedDateChanged((s) => {
this.onSelectedDateChanged.emit(s);
if (this._imCtrl.selectionMode == GC.InputMan.CalendarSelectionMode.One) {
this.onChange(s.getSelectedDate());
}
else {
this.onChange(s.getSelections());
}
this.onTouched();
this.selectedDateChange.emit(s.getSelectedDate());
});
}
}
GcCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcCalendarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcCalendarComponent, selector: "gc-calendar", inputs: { visible: "visible", calendarZoomRange: "calendarZoomRange", maxSelectionCount: "maxSelectionCount", selectionMode: "selectionMode", selectedDate: "selectedDate", enabled: "enabled", weekTitleSelect: "weekTitleSelect", weekNumberSelect: "weekNumberSelect", focusDate: "focusDate", maxDate: "maxDate", minDate: "minDate", allowSelection: "allowSelection", emptyRows: "emptyRows", firstDayOfWeek: "firstDayOfWeek", firstFiscalMonth: "firstFiscalMonth", firstMonthInView: "firstMonthInView", yearMonthFormat: "yearMonthFormat", headerFormat: "headerFormat", showZoomButton: "showZoomButton", showRokuyou: "showRokuyou", showHeader: "showHeader", showToday: "showToday", showWeekNumber: "showWeekNumber", showTrailing: "showTrailing", calendarYear: "calendarYear", showNavigator: "showNavigator", navigatorOrientation: "navigatorOrientation", overrideTipText: "overrideTipText", calendarType: "calendarType", calendarDimensions: "calendarDimensions", scrollRate: "scrollRate", autoSwitch: "autoSwitch", showAnimation: "showAnimation", width: "width", height: "height", minWidth: "minWidth", minHeight: "minHeight", maxWidth: "maxWidth", maxHeight: "maxHeight", allowResize: "allowResize" }, outputs: { onClickDate: "onClickDate", onScrolled: "onScrolled", onFocusDateChanged: "onFocusDateChanged", onSelectedDateChanged: "onSelectedDateChanged", focusDateChange: "focusDateChange", selectedDateChange: "selectedDateChange" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcCalendarComponent),
}
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
__decorate([
Property("setCalendarDimensions", "", true),
__metadata("design:type", Array)
], GcCalendarComponent.prototype, "calendarDimensions", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcCalendarComponent, decorators: [{
type: Component,
args: [{
selector: 'gc-calendar',
template: ``,
providers: [
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcCalendarComponent),
}
]
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { visible: [{
type: Input
}], calendarZoomRange: [{
type: Input
}], maxSelectionCount: [{
type: Input
}], selectionMode: [{
type: Input
}], selectedDate: [{
type: Input
}], enabled: [{
type: Input
}], weekTitleSelect: [{
type: Input
}], weekNumberSelect: [{
type: Input
}], focusDate: [{
type: Input
}], maxDate: [{
type: Input
}], minDate: [{
type: Input
}], allowSelection: [{
type: Input
}], emptyRows: [{
type: Input
}], firstDayOfWeek: [{
type: Input
}], firstFiscalMonth: [{
type: Input
}], firstMonthInView: [{
type: Input
}], yearMonthFormat: [{
type: Input
}], headerFormat: [{
type: Input
}], showZoomButton: [{
type: Input
}], showRokuyou: [{
type: Input
}], showHeader: [{
type: Input
}], showToday: [{
type: Input
}], showWeekNumber: [{
type: Input
}], showTrailing: [{
type: Input
}], calendarYear: [{
type: Input
}], showNavigator: [{
type: Input
}], navigatorOrientation: [{
type: Input
}], overrideTipText: [{
type: Input
}], calendarType: [{
type: Input
}], calendarDimensions: [{
type: Input
}], scrollRate: [{
type: Input
}], autoSwitch: [{
type: Input
}], showAnimation: [{
type: Input
}], width: [{
type: Input
}], height: [{
type: Input
}], minWidth: [{
type: Input
}], minHeight: [{
type: Input
}], maxWidth: [{
type: Input
}], maxHeight: [{
type: Input
}], allowResize: [{
type: Input
}], onClickDate: [{
type: Output
}], onScrolled: [{
type: Output
}], onFocusDateChanged: [{
type: Output
}], onSelectedDateChanged: [{
type: Output
}], focusDateChange: [{
type: Output
}], selectedDateChange: [{
type: Output
}] } });
class GcComboBoxColumnComponent {
}
GcComboBoxColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComboBoxColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
GcComboBoxColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcComboBoxColumnComponent, selector: "gc-combo-box-column", inputs: { name: "name", label: "label", width: "width", isValuePath: "isValuePath", visible: "visible", clickSort: "clickSort", contentAlignment: "contentAlignment", headerAlignment: "headerAlignment", showTip: "showTip" }, ngImport: i0, template: ``, isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComboBoxColumnComponent, decorators: [{
type: Component,
args: [{
selector: 'gc-combo-box-column',
template: ``
}]
}], propDecorators: { name: [{
type: Input
}], label: [{
type: Input
}], width: [{
type: Input
}], isValuePath: [{
type: Input
}], visible: [{
type: Input
}], clickSort: [{
type: Input
}], contentAlignment: [{
type: Input
}], headerAlignment: [{
type: Input
}], showTip: [{
type: Input
}] } });
class GcComboBoxComponent extends GcComponents {
constructor(ref) {
super(ref);
this.onChange = () => { };
this.onTouched = () => { };
this.selectedChanged = new EventEmitter();
this.checkedChanged = new EventEmitter();
this.dropDownClosed = new EventEmitter();
this.dropDownOpened = new EventEmitter();
this.textChanged = new EventEmitter();
this.spinDown = new EventEmitter();
this.spinUp = new EventEmitter();
this.itemsChanged = new EventEmitter();
this.itemsChange = new EventEmitter();
this.selectedValueChange = new EventEmitter();
this.selectedIndexChange = new EventEmitter();
this.checkedValuesChange = new EventEmitter();
this.selectedItemChange = new EventEmitter();
this.checkedItemsChange = new EventEmitter();
this.checkedIndicesChange = new EventEmitter();
}
writeValue(value) {
this.text = value;
if (this._imCtrl) {
this._imCtrl.text = this.text;
}
}
registerOnChange(onChange) {
this.onChange = onChange;
}
registerOnTouched(onTouched) {
this.onTouched = onTouched;
}
setDisabledState(isDisabled) {
this.enabled = !isDisabled;
if (this._imCtrl) {
this._imCtrl.enabled = this.enabled;
}
}
initGcComponent() {
if (this.columnComponents && this.columnComponents.length > 0) {
this.columns = [];
this.columnComponents.forEach((column) => {
this.columns.push({
name: column.name,
label: column.label,
width: column.width,
isValuePath: column.isValuePath,
visible: column.visible,
clickSort: column.clickSort,
contentAlignment: column.contentAlignment,
headerAlignment: column.headerAlignment,
showTip: column.showTip
});
});
}
var element = document.createElement('select');
this.createTemplate(element);
this._imCtrl = new GC.InputMan.GcComboBox(element, this);
}
bindEvent() {
if (!this._imCtrl) {
return;
}
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.SelectedChanged, (eventArgs) => {
this.selectedChanged.emit(eventArgs);
this.selectedValueChange.emit(this._imCtrl.getSelectedValue());
this.selectedIndexChange.emit(this._imCtrl.getSelectedIndex());
this.selectedItemChange.emit(this._imCtrl.getSelectedItem());
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.CheckedChanged, (eventArgs) => {
this.checkedChanged.emit(eventArgs);
this.checkedValuesChange.emit(this._imCtrl.getCheckedValues());
this.checkedItemsChange.emit(this._imCtrl.getCheckedItems());
this.checkedIndicesChange.emit(this._imCtrl.getCheckedIndices());
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.DropDownClosed, (eventArgs) => {
this.dropDownClosed.emit(eventArgs);
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.DropDownOpened, (eventArgs) => {
this.dropDownOpened.emit(eventArgs);
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.TextChanged, (eventArgs) => {
this.textChanged.emit(eventArgs);
this.onChange(this._imCtrl.text);
this.onTouched();
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.SpinDown, (eventArgs) => {
this.spinDown.emit(eventArgs);
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.SpinUp, (eventArgs) => {
this.spinUp.emit(eventArgs);
});
this._imCtrl.addEventListener(GC.InputMan.GcComboBoxEvent.ItemsChanged, (eventArgs) => {
this.itemsChanged.emit(eventArgs);
this.itemsChange.emit(this._imCtrl.getItems());
});
}
}
GcComboBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComboBoxComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcComboBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcComboBoxComponent, selector: "gc-combo-box", inputs: { items: "items", selectedValue: "selectedValue", allowDropDownResize: "allowDropDownResize", width: "width", height: "height", minWidth: "minWidth", minHeight: "minHeight", maxWidth: "maxWidth", maxHeight: "maxHeight", fontSize: "fontSize", readOnly: "readOnly", autoSelect: "autoSelect", selectedIndex: "selectedIndex", autoFilter: "autoFilter", visible: "visible", enabled: "enabled", showTip: "showTip", isEditable: "isEditable", watermarkDisplayNullText: "watermarkDisplayNullText", watermarkNullText: "watermarkNullText", highlightText: "highlightText", exitOnEnterKey: "exitOnEnterKey", useClipboard: "useClipboard", acceptsCrlf: "acceptsCrlf", acceptsTabChar: "acceptsTabChar", ellipsis: "ellipsis", ellipsisString: "ellipsisString", exitOnLeftRightKey: "exitOnLeftRightKey", tabIndex: "tabIndex", showHelpButton: "showHelpButton", autoCompleteMode: "autoCompleteMode", autoCompleteMatchMode: "autoCompleteMatchMode", showCopyButton: "showCopyButton", helpContent: "helpContent", copyMessage: "copyMessage", copiedMessage: "copiedMessage", floatingLabelText: "floatingLabelText", floatingLabelType: "floatingLabelType", floatingLabelDirection: "floatingLabelDirection", editMode: "editMode", checkedValues: "checkedValues", selectedItem: "selectedItem", checkedItems: "checkedItems", checkedIndices: "checkedIndices", showDropDownButton: "showDropDownButton", dropDownButtonPosition: "dropDownButtonPosition", showSpinButton: "showSpinButton", spinButtonPosition: "spinButtonPosition", dropDownWidth: "dropDownWidth", dropDownHeight: "dropDownHeight", minPrefixLength: "minPrefixLength", isMultiSelect: "isMultiSelect", dropDownOverflow: "dropDownOverflow", visibleItems: "visibleItems", itemHeight: "itemHeight", columns: "columns", showHeader: "showHeader", valueMemberPath: "valueMemberPath", displayMemberPath: "displayMemberPath", checkOnClick: "checkOnClick", itemTemplate: "itemTemplate", headerTemplate: "headerTemplate", footerTemplate: "footerTemplate", spinWheel: "spinWheel", emptyTemplate: "emptyTemplate", load: "load", pageSize: "pageSize", virtualMode: "virtualMode", generatingItem: "generatingItem", selectTemplate: "selectTemplate", formatItem: "formatItem", allowColumnResize: "allowColumnResize", colHeaderHeight: "colHeaderHeight", container: "container", autoDropDown: "autoDropDown", dropDownButtonVisible: "dropDownButtonVisible", showClearButton: "showClearButton", autoScale: "autoScale", minScaleFactor: "minScaleFactor", multipleItemSeparator: "multipleItemSeparator", dropDownType: "dropDownType", dropDownTreeConfig: "dropDownTreeConfig", checkBySpace: "checkBySpace" }, outputs: { selectedChanged: "selectedChanged", checkedChanged: "checkedChanged", dropDownClosed: "dropDownClosed", dropDownOpened: "dropDownOpened", textChanged: "textChanged", spinDown: "spinDown", spinUp: "spinUp", itemsChanged: "itemsChanged", itemsChange: "itemsChange", selectedValueChange: "selectedValueChange", selectedIndexChange: "selectedIndexChange", checkedValuesChange: "checkedValuesChange", selectedItemChange: "selectedItemChange", checkedItemsChange: "checkedItemsChange", checkedIndicesChange: "checkedIndicesChange" }, providers: [
provideParent(GcComboBoxComponent),
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcComboBoxComponent),
}
], queries: [{ propertyName: "columnComponents", predicate: GcComboBoxColumnComponent }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
__decorate([
Property("", "", false, false),
__metadata("design:type", Object)
], GcComboBoxComponent.prototype, "selectedValue", void 0);
__decorate([
Property("", "", false, false),
__metadata("design:type", Number)
], GcComboBoxComponent.prototype, "selectedIndex", void 0);
__decorate([
Property("setEditable"),
__metadata("design:type", Boolean)
], GcComboBoxComponent.prototype, "isEditable", void 0);
__decorate([
Property("", "", false, false),
__metadata("design:type", Object)
], GcComboBoxComponent.prototype, "checkedValues", void 0);
__decorate([
Property("", "", false, false),
__metadata("design:type", Object)
], GcComboBoxComponent.prototype, "selectedItem", void 0);
__decorate([
Property("", "", false, false),
__metadata("design:type", Object)
], GcComboBoxComponent.prototype, "checkedItems", void 0);
__decorate([
Property("", "", false, false),
__metadata("design:type", Array)
], GcComboBoxComponent.prototype, "checkedIndices", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcComboBoxComponent, decorators: [{
type: Component,
args: [{
selector: 'gc-combo-box',
template: ``,
providers: [
provideParent(GcComboBoxComponent),
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcComboBoxComponent),
}
]
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { items: [{
type: Input
}], selectedValue: [{
type: Input
}], allowDropDownResize: [{
type: Input
}], width: [{
type: Input
}], height: [{
type: Input
}], minWidth: [{
type: Input
}], minHeight: [{
type: Input
}], maxWidth: [{
type: Input
}], maxHeight: [{
type: Input
}], fontSize: [{
type: Input
}], readOnly: [{
type: Input
}], autoSelect: [{
type: Input
}], selectedIndex: [{
type: Input
}], autoFilter: [{
type: Input
}], visible: [{
type: Input
}], enabled: [{
type: Input
}], showTip: [{
type: Input
}], isEditable: [{
type: Input
}], watermarkDisplayNullText: [{
type: Input
}], watermarkNullText: [{
type: Input
}], highlightText: [{
type: Input
}], exitOnEnterKey: [{
type: Input
}], useClipboard: [{
type: Input
}], acceptsCrlf: [{
type: Input
}], acceptsTabChar: [{
type: Input
}], ellipsis: [{
type: Input
}], ellipsisString: [{
type: Input
}], exitOnLeftRightKey: [{
type: Input
}], tabIndex: [{
type: Input
}], showHelpButton: [{
type: Input
}], autoCompleteMode: [{
type: Input
}], autoCompleteMatchMode: [{
type: Input
}], showCopyButton: [{
type: Input
}], helpContent: [{
type: Input
}], copyMessage: [{
type: Input
}], copiedMessage: [{
type: Input
}], floatingLabelText: [{
type: Input
}], floatingLabelType: [{
type: Input
}], floatingLabelDirection: [{
type: Input
}], editMode: [{
type: Input
}], checkedValues: [{
type: Input
}], selectedItem: [{
type: Input
}], checkedItems: [{
type: Input
}], checkedIndices: [{
type: Input
}], showDropDownButton: [{
type: Input
}], dropDownButtonPosition: [{
type: Input
}], showSpinButton: [{
type: Input
}], spinButtonPosition: [{
type: Input
}], dropDownWidth: [{
type: Input
}], dropDownHeight: [{
type: Input
}], minPrefixLength: [{
type: Input
}], isMultiSelect: [{
type: Input
}], dropDownOverflow: [{
type: Input
}], visibleItems: [{
type: Input
}], itemHeight: [{
type: Input
}], columns: [{
type: Input
}], showHeader: [{
type: Input
}], valueMemberPath: [{
type: Input
}], displayMemberPath: [{
type: Input
}], checkOnClick: [{
type: Input
}], itemTemplate: [{
type: Input
}], headerTemplate: [{
type: Input
}], footerTemplate: [{
type: Input
}], spinWheel: [{
type: Input
}], emptyTemplate: [{
type: Input
}], load: [{
type: Input
}], pageSize: [{
type: Input
}], virtualMode: [{
type: Input
}], generatingItem: [{
type: Input
}], selectTemplate: [{
type: Input
}], formatItem: [{
type: Input
}], allowColumnResize: [{
type: Input
}], colHeaderHeight: [{
type: Input
}], container: [{
type: Input
}], autoDropDown: [{
type: Input
}], dropDownButtonVisible: [{
type: Input
}], showClearButton: [{
type: Input
}], autoScale: [{
type: Input
}], minScaleFactor: [{
type: Input
}], multipleItemSeparator: [{
type: Input
}], dropDownType: [{
type: Input
}], dropDownTreeConfig: [{
type: Input
}], checkBySpace: [{
type: Input
}], selectedChanged: [{
type: Output
}], checkedChanged: [{
type: Output
}], dropDownClosed: [{
type: Output
}], dropDownOpened: [{
type: Output
}], textChanged: [{
type: Output
}], spinDown: [{
type: Output
}], spinUp: [{
type: Output
}], itemsChanged: [{
type: Output
}], itemsChange: [{
type: Output
}], selectedValueChange: [{
type: Output
}], selectedIndexChange: [{
type: Output
}], checkedValuesChange: [{
type: Output
}], selectedItemChange: [{
type: Output
}], checkedItemsChange: [{
type: Output
}], checkedIndicesChange: [{
type: Output
}], columnComponents: [{
type: ContentChildren,
args: [GcComboBoxColumnComponent]
}] } });
class GcInputManBaseComponent extends GcComponents {
constructor(ref) {
super(ref);
this.onEditStatusChanged = new EventEmitter();
this.onInvalidInput = new EventEmitter();
this.onKeyExit = new EventEmitter();
this.onTextChanged = new EventEmitter();
this.onInput = new EventEmitter();
this.onFocusOut = new EventEmitter();
this.onKeyDown = new EventEmitter();
this.onKeyUp = new EventEmitter();
this.onSyncValueToOriginalInput = new EventEmitter();
// For V2.1 Compatibility, we have to keep this property or event
this.textChange = new EventEmitter();
}
bindEvent() {
if (!this._imCtrl) {
return;
}
this._imCtrl.onEditStatusChanged((s) => { this.onEditStatusChanged.emit(s); });
this._imCtrl.onInvalidInput((s) => { this.onInvalidInput.emit(s); });
this._imCtrl.onKeyExit((s) => { this.onKeyExit.emit(s); });
this._imCtrl.onTextChanged((s) => { this.onTextChanged.emit(s); this.textChange.emit(s.getText()); });
this._imCtrl.onInput((s) => { this.onInput.emit(s); });
this._imCtrl.onFocusOut((s) => { this.onFocusOut.emit({ sender: s }); });
this._imCtrl.onKeyDown((s) => { this.onKeyDown.emit({ sender: s }); });
this._imCtrl.onKeyUp((s) => { this.onKeyUp.emit({ sender: s }); });
this._imCtrl.onSyncValueToOriginalInput((v, e) => { this.onSyncValueToOriginalInput.emit({ value: v, element: e }); });
}
}
GcInputManBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcInputManBaseComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcInputManBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcInputManBaseComponent, selector: "ng-component", inputs: { visible: "visible", width: "width", height: "height", minWidth: "minWidth", minHeight: "minHeight", maxWidth: "maxWidth", maxHeight: "maxHeight", fontSize: "fontSize", enabled: "enabled", readOnly: "readOnly", exitOnLeftRightKey: "exitOnLeftRightKey", editMode: "editMode", watermarkDisplayNullText: "watermarkDisplayNullText", watermarkNullText: "watermarkNullText", useClipboard: "useClipboard", exitOnEnterKey: "exitOnEnterKey", container: "container", autoDropDown: "autoDropDown", dropDownButtonVisible: "dropDownButtonVisible", autoScale: "autoScale", minScaleFactor: "minScaleFactor", tabIndex: "tabIndex", showHelpButton: "showHelpButton", showCopyButton: "showCopyButton", helpContent: "helpContent", copyMessage: "copyMessage", copiedMessage: "copiedMessage", floatingLabelText: "floatingLabelText", floatingLabelType: "floatingLabelType", floatingLabelDirection: "floatingLabelDirection", showClearButton: "showClearButton" }, outputs: { onEditStatusChanged: "onEditStatusChanged", onInvalidInput: "onInvalidInput", onKeyExit: "onKeyExit", onTextChanged: "onTextChanged", onInput: "onInput", onFocusOut: "onFocusOut", onKeyDown: "onKeyDown", onKeyUp: "onKeyUp", onSyncValueToOriginalInput: "onSyncValueToOriginalInput", textChange: "textChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcInputManBaseComponent, decorators: [{
type: Component,
args: [{
template: ''
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { visible: [{
type: Input
}], width: [{
type: Input
}], height: [{
type: Input
}], minWidth: [{
type: Input
}], minHeight: [{
type: Input
}], maxWidth: [{
type: Input
}], maxHeight: [{
type: Input
}], fontSize: [{
type: Input
}], enabled: [{
type: Input
}], readOnly: [{
type: Input
}], exitOnLeftRightKey: [{
type: Input
}], editMode: [{
type: Input
}], watermarkDisplayNullText: [{
type: Input
}], watermarkNullText: [{
type: Input
}], useClipboard: [{
type: Input
}], exitOnEnterKey: [{
type: Input
}], container: [{
type: Input
}], autoDropDown: [{
type: Input
}], dropDownButtonVisible: [{
type: Input
}], autoScale: [{
type: Input
}], minScaleFactor: [{
type: Input
}], tabIndex: [{
type: Input
}], showHelpButton: [{
type: Input
}], showCopyButton: [{
type: Input
}], helpContent: [{
type: Input
}], copyMessage: [{
type: Input
}], copiedMessage: [{
type: Input
}], floatingLabelText: [{
type: Input
}], floatingLabelType: [{
type: Input
}], floatingLabelDirection: [{
type: Input
}], showClearButton: [{
type: Input
}], onEditStatusChanged: [{
type: Output
}], onInvalidInput: [{
type: Output
}], onKeyExit: [{
type: Output
}], onTextChanged: [{
type: Output
}], onInput: [{
type: Output
}], onFocusOut: [{
type: Output
}], onKeyDown: [{
type: Output
}], onKeyUp: [{
type: Output
}], onSyncValueToOriginalInput: [{
type: Output
}], textChange: [{
type: Output
}] } });
class GcDateTimeComponent extends GcInputManBaseComponent {
constructor(ref) {
super(ref);
this.onChange = () => { };
this.onTouched = () => { };
this.onSpinDown = new EventEmitter();
this.onSpinUp = new EventEmitter();
this.onInvalidRange = new EventEmitter();
this.onInvalidValue = new EventEmitter();
this.onNumberChanged = new EventEmitter();
this.onValueChanged = new EventEmitter();
// For V2.1 Compatibility, we have to keep this property or event
this.numberChange = new EventEmitter();
this.valueChange = new EventEmitter();
}
writeValue(value) {
this.value = value;
if (this._imCtrl) {
this._imCtrl.value = this.value;
}
}
registerOnChange(onChange) {
this.onChange = onChange;
}
registerOnTouched(onTouched) {
this.onTouched = onTouched;
}
setDisabledState(isDisabled) {
this.enabled = !isDisabled;
if (this._imCtrl) {
this._imCtrl.enabled = this.enabled;
}
}
initGcComponent() {
var element = document.createElement('input');
this.createTemplate(element);
this._imCtrl = new GC.InputMan.GcDateTime(element, this);
}
bindEvent() {
if (!this._imCtrl) {
return;
}
super.bindEvent();
this._imCtrl.onSpinDown((s) => { this.onSpinDown.emit(s); });
this._imCtrl.onSpinUp((s) => { this.onSpinUp.emit(s); });
this._imCtrl.onInvalidRange((s) => { this.onInvalidRange.emit(s); });
this._imCtrl.onInvalidValue((s) => { this.onInvalidValue.emit(s); });
this._imCtrl.onNumberChanged((s) => {
this.onNumberChanged.emit(s);
this.numberChange.emit(s.getNumber());
});
this._imCtrl.onValueChanged((s) => {
this.onValueChanged.emit(s);
this.onChange(s.getValue());
this.onTouched();
this.valueChange.emit(s.getValue());
});
}
}
GcDateTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcDateTimeComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcDateTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcDateTimeComponent, selector: "gc-datetime", inputs: { acceptsCrlf: "acceptsCrlf", autoConvert: "autoConvert", text: "text", number: "number", maxDate: "maxDate", minDate: "minDate", formatPattern: "formatPattern", spinIncrement: "spinIncrement", spinOnKeys: "spinOnKeys", spinWrap: "spinWrap", allowSpin: "allowSpin", spinWheel: "spinWheel", displayFormatPattern: "displayFormatPattern", watermarkEmptyEraText: "watermarkEmptyEraText", promptChar: "promptChar", AMDesignator: "AMDesignator", PMDesignator: "PMDesignator", twoDigitYearMax: "twoDigitYearMax", hour12Mode: "hour12Mode", tabAction: "tabAction", maxMinBehavior: "maxMinBehavior", midnightAs24: "midnightAs24", showLiterals: "showLiterals", adjustValueOnFocus: "adjustValueOnFocus", useTwoDigitYearMax: "useTwoDigitYearMax", validateMode: "validateMode", clipContent: "clipContent", value: "value", watermarkDisplayEmptyEraText: "watermarkDisplayEmptyEraText", dropDownConfig: "dropDownConfig", exitOnLastChar: "exitOnLastChar", highlightText: "highlightText", showSpinButton: "showSpinButton", spinButtonPosition: "spinButtonPosition", showDropDownButton: "showDropDownButton", dropDownButtonAlignment: "dropDownButtonAlignment" }, outputs: { onSpinDown: "onSpinDown", onSpinUp: "onSpinUp", onInvalidRange: "onInvalidRange", onInvalidValue: "onInvalidValue", onNumberChanged: "onNumberChanged", onValueChanged: "onValueChanged", numberChange: "numberChange", valueChange: "valueChange" }, providers: [
provideParent(GcDateTimeComponent),
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcDateTimeComponent),
}
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
__decorate([
Property("", "", false, false),
__metadata("design:type", Number)
], GcDateTimeComponent.prototype, "number", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcDateTimeComponent, decorators: [{
type: Component,
args: [{
selector: 'gc-datetime',
template: ``,
providers: [
provideParent(GcDateTimeComponent),
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcDateTimeComponent),
}
]
}]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { acceptsCrlf: [{
type: Input
}], autoConvert: [{
type: Input
}], text: [{
type: Input
}], number: [{
type: Input
}], maxDate: [{
type: Input
}], minDate: [{
type: Input
}], formatPattern: [{
type: Input
}], spinIncrement: [{
type: Input
}], spinOnKeys: [{
type: Input
}], spinWrap: [{
type: Input
}], allowSpin: [{
type: Input
}], spinWheel: [{
type: Input
}], displayFormatPattern: [{
type: Input
}], watermarkEmptyEraText: [{
type: Input
}], promptChar: [{
type: Input
}], AMDesignator: [{
type: Input
}], PMDesignator: [{
type: Input
}], twoDigitYearMax: [{
type: Input
}], hour12Mode: [{
type: Input
}], tabAction: [{
type: Input
}], maxMinBehavior: [{
type: Input
}], midnightAs24: [{
type: Input
}], showLiterals: [{
type: Input
}], adjustValueOnFocus: [{
type: Input
}], useTwoDigitYearMax: [{
type: Input
}], validateMode: [{
type: Input
}], clipContent: [{
type: Input
}], value: [{
type: Input
}], watermarkDisplayEmptyEraText: [{
type: Input
}], dropDownConfig: [{
type: Input
}], exitOnLastChar: [{
type: Input
}], highlightText: [{
type: Input
}], showSpinButton: [{
type: Input
}], spinButtonPosition: [{
type: Input
}], showDropDownButton: [{
type: Input
}], dropDownButtonAlignment: [{
type: Input
}], onSpinDown: [{
type: Output
}], onSpinUp: [{
type: Output
}], onInvalidRange: [{
type: Output
}], onInvalidValue: [{
type: Output
}], onNumberChanged: [{
type: Output
}], onValueChanged: [{
type: Output
}], numberChange: [{
type: Output
}], valueChange: [{
type: Output
}] } });
class GcDateTimePickerComponent extends GcComponents {
constructor(ref) {
super(ref);
this.onChange = () => { };
this.onTouched = () => { };
this.selectedDateChanged = new EventEmitter();
this.selectedValueChange = new EventEmitter();
}
writeValue(value) {
this.selectedValue = value;
if (this._imCtrl) {
this._imCtrl.value = this.selectedValue;
}
}
registerOnChange(onChange) {
this.onChange = onChange;
}
registerOnTouched(onTouched) {
this.onTouched = onTouched;
}
setDisabledState(isDisabled) {
this.enabled = !isDisabled;
if (this._imCtrl) {
this._imCtrl.enabled = this.enabled;
}
}
initGcComponent() {
var element = document.createElement('div');
this.createTemplate(element);
this._imCtrl = new GC.InputMan.GcDateTimePicker(element, this);
}
bindEvent() {
if (!this._imCtrl) {
return;
}
this._imCtrl.addEventListener(GC.InputMan.GcDateTimePickerEvent.SelectedDateChanged, (sender, eventArgs) => {
this.selectedDateChanged.emit({ sender: sender, eArgs: eventArgs });
this.selectedValueChange.emit(this._imCtrl.getValue());
this.onChange(this._imCtrl.getValue());
this.onTouched();
});
}
}
GcDateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GcDateTimePickerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GcDateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GcDateTimePickerComponent, selector: "gc-datetime-picker", inputs: { selectedValue: "selectedValue", maxDate: "maxDate", minDate: "minDate", type: "type", minuteInterval: "minuteInterval", secondsInterval: "secondsInterval", enabled: "enabled", visible: "visible", hasSeconds: "hasSeconds", showMidnightAs24: "showMidnightAs24", yearFormat: "yearFormat", monthFormat: "monthFormat", dayFormat: "dayFormat" }, outputs: { selectedDateChanged: "selectedDateChanged", selectedValueChange: "selectedValueChange" }, providers: [
{
provide: NG_VALUE_ACCESSOR,
multi: true,
useExisting: forwardRef(() => GcDateTimePickerComponent),
}
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
__decorate([
Property("setValue"),
__metadata("design:type", Date)
], GcDateTimePickerComponent.prototype, "selectedValue", void 0);
__decorate([
Property('setPickerType'),
__metadata("design:type", String)
], GcDateTimePickerComponent.prototype, "type", void 0);
__decorate([
Property('showSeconds', "", false, false),
__metadata("design:type", Boolean)
], GcDateTimePickerComponent.prototype, "hasSeconds", void 0);
__decorate([
Property('showMidnightAs24', "", false, false),
__metadata("design:type", Boolean)
], GcDateTimePickerComponent.prototype, "showMidnightAs24", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: