UNPKG

@umbraco/json-models-builders

Version:
44 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NumericDataTypeBuilder = void 0; const dataTypeBuilder_1 = require("./dataTypeBuilder"); class NumericDataTypeBuilder extends dataTypeBuilder_1.DataTypeBuilder { min; max; step; constructor() { super(); this.editorAlias = "Umbraco.Integer"; this.editorUiAlias = "Umb.PropertyEditorUi.Integer"; } withMin(min) { this.min = min; return this; } withMax(max) { this.max = max; return this; } withStep(step) { this.step = step; return this; } getValues() { let values = []; values.push({ alias: "min", value: this.min || 0 }); values.push({ alias: "max", value: this.max || 0 }); values.push({ alias: "step", value: this.step || 0 }); return values; } } exports.NumericDataTypeBuilder = NumericDataTypeBuilder; //# sourceMappingURL=numericDataTypeBuilder.js.map