@seniorsistemas/angular-components 14.13.3 → 14.13.4
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.
- package/bundles/seniorsistemas-angular-components.umd.js +0 -41
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +0 -2
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +1 -43
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +1 -43
- package/fesm2015/seniorsistemas-angular-components.js +0 -41
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +0 -41
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1963,17 +1963,6 @@ var LookupComponent = /** @class */ (function () {
|
|
|
1963
1963
|
this.searchFields = this.searchFields.map(function (value) { return new FormField(__assign(__assign({}, value), { size: { sm: 12, md: 12, lg: 12, xl: 12 } })); });
|
|
1964
1964
|
this.searchGridFields = (this.searchGridFields || this.searchFields).map(function (gridField) {
|
|
1965
1965
|
gridField["width"] = _this.getColWidth(gridField.label);
|
|
1966
|
-
var calendarOptions = gridField.calendarLocaleOptions;
|
|
1967
|
-
if (calendarOptions === null || calendarOptions === void 0 ? void 0 : calendarOptions.dateFormat) {
|
|
1968
|
-
switch (gridField.type) {
|
|
1969
|
-
case FieldType.Date:
|
|
1970
|
-
calendarOptions.dateFormat = _this._convertToMomentDateFormat(calendarOptions.dateFormat);
|
|
1971
|
-
break;
|
|
1972
|
-
case FieldType.Time:
|
|
1973
|
-
calendarOptions.dateFormat = _this._convertToMomentHourFormat(calendarOptions.hourFormat, calendarOptions.dateFormat);
|
|
1974
|
-
break;
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
1966
|
return gridField;
|
|
1978
1967
|
});
|
|
1979
1968
|
var formGroup = this.searchFields.reduce(function (result, field) {
|
|
@@ -1999,36 +1988,6 @@ var LookupComponent = /** @class */ (function () {
|
|
|
1999
1988
|
_this.onChange(newValue);
|
|
2000
1989
|
});
|
|
2001
1990
|
};
|
|
2002
|
-
LookupComponent.prototype._convertToMomentHourFormat = function (hourFormat, format) {
|
|
2003
|
-
if (format === "dd/mm/yy") { // valor padrão para o format.
|
|
2004
|
-
return "LTS";
|
|
2005
|
-
}
|
|
2006
|
-
if (hourFormat === "12") {
|
|
2007
|
-
return format
|
|
2008
|
-
.replace(/\bH\b/, "h") // hour (12 hour time) (no leading zero)
|
|
2009
|
-
.replace(/\bHH\b/, "hh"); // hour (12 hour time)
|
|
2010
|
-
}
|
|
2011
|
-
if (hourFormat === "24") {
|
|
2012
|
-
return format
|
|
2013
|
-
.replace(/\bh\b/, "H") // hour (24 hour time) (no leading zero)
|
|
2014
|
-
.replace(/\bhh\b/, "HH"); // hour (24 hour time)
|
|
2015
|
-
}
|
|
2016
|
-
return format;
|
|
2017
|
-
};
|
|
2018
|
-
LookupComponent.prototype._convertToMomentDateFormat = function (format) {
|
|
2019
|
-
// A ordem dos replaces é importante.
|
|
2020
|
-
return format
|
|
2021
|
-
.replace(/\bd\b/, "D") // day of month (no leading zero)
|
|
2022
|
-
.replace(/\bdd\b/, "DD") // day of month
|
|
2023
|
-
.replace(/\bo\b/, "DDD") // day of the year (no leading zero)
|
|
2024
|
-
.replace(/\boo\b/, "DDDD") // day of the year
|
|
2025
|
-
.replace(/\bM\b/, "MMM") // month name short
|
|
2026
|
-
.replace(/\bMM\b/, "MMMM") // month name long
|
|
2027
|
-
.replace(/\bm\b/, "M") // month of year (no leading)
|
|
2028
|
-
.replace(/\bmm\b/, "MM") // month of year
|
|
2029
|
-
.replace(/\by\b/, "YY") // year (two digits)
|
|
2030
|
-
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
2031
|
-
};
|
|
2032
1991
|
LookupComponent.prototype.ngAfterViewInit = function () {
|
|
2033
1992
|
this.autocomplete.onOverlayAnimationDone = function (event) { };
|
|
2034
1993
|
};
|