@seniorsistemas/angular-components 14.14.0 → 14.14.1
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 +61 -7
- 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 +2 -0
- package/components/locale/options/index.d.ts +9 -0
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +49 -3
- package/esm2015/components/dynamic-form/configurations/fields/bignumber-field.js +3 -3
- package/esm2015/components/dynamic-form/configurations/fields/calendar-field.js +3 -3
- package/esm2015/components/dynamic-form/configurations/fields/currency-field.js +3 -3
- package/esm2015/components/dynamic-form/configurations/fields/decimal-field.js +3 -3
- package/esm2015/components/dynamic-form/configurations/fields/number-field.js +3 -3
- package/esm2015/components/locale/options/index.js +10 -1
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +49 -3
- package/esm5/components/dynamic-form/configurations/fields/bignumber-field.js +3 -3
- package/esm5/components/dynamic-form/configurations/fields/calendar-field.js +3 -3
- package/esm5/components/dynamic-form/configurations/fields/currency-field.js +3 -3
- package/esm5/components/dynamic-form/configurations/fields/decimal-field.js +3 -3
- package/esm5/components/dynamic-form/configurations/fields/number-field.js +3 -3
- package/esm5/components/locale/options/index.js +10 -1
- package/fesm2015/seniorsistemas-angular-components.js +61 -7
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +61 -7
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -1297,8 +1297,17 @@
|
|
|
1297
1297
|
}
|
|
1298
1298
|
return LocaleOptions;
|
|
1299
1299
|
}());
|
|
1300
|
+
/**
|
|
1301
|
+
* @deprecated
|
|
1302
|
+
*/
|
|
1300
1303
|
var DEFAULT_CALENDAR_LOCALE_OPTIONS = new CalendarLocaleOptions();
|
|
1304
|
+
/**
|
|
1305
|
+
* @deprecated
|
|
1306
|
+
*/
|
|
1301
1307
|
var DEFAULT_NUMBER_LOCALE_OPTIONS = new NumberLocaleOptions();
|
|
1308
|
+
/**
|
|
1309
|
+
* @deprecated
|
|
1310
|
+
*/
|
|
1302
1311
|
var DEFAULT_LOCALE_OPTIONS = new LocaleOptions();
|
|
1303
1312
|
|
|
1304
1313
|
var moment = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
@@ -1632,7 +1641,7 @@
|
|
|
1632
1641
|
function BignumberField(config) {
|
|
1633
1642
|
var _a;
|
|
1634
1643
|
var _this = _super.call(this, config) || this;
|
|
1635
|
-
_this.numberLocaleOptions = config.numberLocaleOptions ||
|
|
1644
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
|
|
1636
1645
|
_this.browserAutocomplete = config.browserAutocomplete;
|
|
1637
1646
|
_this.precision = config.precision;
|
|
1638
1647
|
_this.scale = (_a = config.scale) !== null && _a !== void 0 ? _a : 2;
|
|
@@ -1700,7 +1709,7 @@
|
|
|
1700
1709
|
_this.maxDate = config.maxDate;
|
|
1701
1710
|
_this.appendTo = config.appendTo;
|
|
1702
1711
|
_this.showOnFocus = typeof config.showOnFocus === "boolean" ? config.showOnFocus : true;
|
|
1703
|
-
_this.calendarLocaleOptions = config.calendarLocaleOptions ||
|
|
1712
|
+
_this.calendarLocaleOptions = config.calendarLocaleOptions || new CalendarLocaleOptions();
|
|
1704
1713
|
_this.onBlur = config.onBlur;
|
|
1705
1714
|
_this.onFocus = config.onFocus;
|
|
1706
1715
|
_this.onSelect = config.onSelect;
|
|
@@ -1879,7 +1888,7 @@
|
|
|
1879
1888
|
__extends(NumberField, _super);
|
|
1880
1889
|
function NumberField(config) {
|
|
1881
1890
|
var _this = _super.call(this, config) || this;
|
|
1882
|
-
_this.numberLocaleOptions = config.numberLocaleOptions ||
|
|
1891
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
|
|
1883
1892
|
_this.browserAutocomplete = config.browserAutocomplete;
|
|
1884
1893
|
_this.precision = config.precision;
|
|
1885
1894
|
_this.alignTo = config.alignTo || exports.NumberAlignmentOption.LEFT;
|
|
@@ -1902,7 +1911,7 @@
|
|
|
1902
1911
|
__extends(DecimalField, _super);
|
|
1903
1912
|
function DecimalField(config) {
|
|
1904
1913
|
var _this = _super.call(this, config) || this;
|
|
1905
|
-
_this.numberLocaleOptions = config.numberLocaleOptions ||
|
|
1914
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
|
|
1906
1915
|
_this.alignTo = config.alignTo || exports.NumberAlignmentOption.RIGHT;
|
|
1907
1916
|
_this.scale = config.scale || config.scale === 0 ? config.scale : 2;
|
|
1908
1917
|
return _this;
|
|
@@ -1917,7 +1926,7 @@
|
|
|
1917
1926
|
__extends(CurrencyField, _super);
|
|
1918
1927
|
function CurrencyField(config) {
|
|
1919
1928
|
var _this = _super.call(this, config) || this;
|
|
1920
|
-
_this.numberLocaleOptions = config.numberLocaleOptions ||
|
|
1929
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || new NumberLocaleOptions();
|
|
1921
1930
|
return _this;
|
|
1922
1931
|
}
|
|
1923
1932
|
return CurrencyField;
|
|
@@ -2138,9 +2147,24 @@
|
|
|
2138
2147
|
LookupComponent_1 = LookupComponent;
|
|
2139
2148
|
LookupComponent.prototype.ngOnInit = function () {
|
|
2140
2149
|
var _this = this;
|
|
2150
|
+
if (!this.searchGridFields) {
|
|
2151
|
+
this.searchGridFields = this.searchFields.map(function (item) { return new FormField(__assign({}, item)); });
|
|
2152
|
+
}
|
|
2141
2153
|
this.searchFields = this.searchFields.map(function (value) { return new FormField(__assign(__assign({}, value), { size: { sm: 12, md: 12, lg: 12, xl: 12 } })); });
|
|
2142
|
-
this.searchGridFields =
|
|
2154
|
+
this.searchGridFields = this.searchGridFields.map(function (gridField) {
|
|
2143
2155
|
gridField["width"] = _this.getColWidth(gridField.label);
|
|
2156
|
+
var calendarOptions = gridField.calendarLocaleOptions;
|
|
2157
|
+
if (calendarOptions === null || calendarOptions === void 0 ? void 0 : calendarOptions.dateFormat) {
|
|
2158
|
+
switch (gridField.type) {
|
|
2159
|
+
case exports.FieldType.Date:
|
|
2160
|
+
calendarOptions.dateFormat = _this._convertToMomentDateFormat(calendarOptions.dateFormat);
|
|
2161
|
+
break;
|
|
2162
|
+
case exports.FieldType.Time:
|
|
2163
|
+
calendarOptions.dateFormat = _this._convertToMomentHourFormat(calendarOptions.hourFormat, calendarOptions.dateFormat);
|
|
2164
|
+
break;
|
|
2165
|
+
}
|
|
2166
|
+
calendarOptions.dateFormat = calendarOptions.dateFormat;
|
|
2167
|
+
}
|
|
2144
2168
|
return gridField;
|
|
2145
2169
|
});
|
|
2146
2170
|
var formGroup = this.searchFields.reduce(function (result, field) {
|
|
@@ -2166,6 +2190,36 @@
|
|
|
2166
2190
|
_this.onChange(newValue);
|
|
2167
2191
|
});
|
|
2168
2192
|
};
|
|
2193
|
+
LookupComponent.prototype._convertToMomentHourFormat = function (hourFormat, format) {
|
|
2194
|
+
if (format === "dd/mm/yy") { // valor padrão para o format.
|
|
2195
|
+
return "LTS";
|
|
2196
|
+
}
|
|
2197
|
+
if (hourFormat === "12") {
|
|
2198
|
+
return format
|
|
2199
|
+
.replace(/\bH\b/, "h") // hour (12 hour time) (no leading zero)
|
|
2200
|
+
.replace(/\bHH\b/, "hh"); // hour (12 hour time)
|
|
2201
|
+
}
|
|
2202
|
+
if (hourFormat === "24") {
|
|
2203
|
+
return format
|
|
2204
|
+
.replace(/\bh\b/, "H") // hour (24 hour time) (no leading zero)
|
|
2205
|
+
.replace(/\bhh\b/, "HH"); // hour (24 hour time)
|
|
2206
|
+
}
|
|
2207
|
+
return format;
|
|
2208
|
+
};
|
|
2209
|
+
LookupComponent.prototype._convertToMomentDateFormat = function (format) {
|
|
2210
|
+
// A ordem dos replaces é importante.
|
|
2211
|
+
return format
|
|
2212
|
+
.replace(/\bd\b/, "D") // day of month (no leading zero)
|
|
2213
|
+
.replace(/\bdd\b/, "DD") // day of month
|
|
2214
|
+
.replace(/\bo\b/, "DDD") // day of the year (no leading zero)
|
|
2215
|
+
.replace(/\boo\b/, "DDDD") // day of the year
|
|
2216
|
+
.replace(/\bM\b/, "MMM") // month name short
|
|
2217
|
+
.replace(/\bMM\b/, "MMMM") // month name long
|
|
2218
|
+
.replace(/\bm\b/, "M") // month of year (no leading)
|
|
2219
|
+
.replace(/\bmm\b/, "MM") // month of year
|
|
2220
|
+
.replace(/\by\b/, "YY") // year (two digits)
|
|
2221
|
+
.replace(/\byy\b/, "YYYY"); // year (four digits)
|
|
2222
|
+
};
|
|
2169
2223
|
LookupComponent.prototype.ngAfterViewInit = function () {
|
|
2170
2224
|
this.autocomplete.onOverlayAnimationDone = function (event) { };
|
|
2171
2225
|
};
|
|
@@ -2484,7 +2538,7 @@
|
|
|
2484
2538
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
2485
2539
|
core.Component({
|
|
2486
2540
|
selector: "s-lookup",
|
|
2487
|
-
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n <ng-template let-item pTemplate=\"selectedItem\">\n <span class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\" \n [pTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\" \n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed ? {value: 'hidden', params: {transitionParams: transitionOptions }} : {value: 'visible', params: {transitionParams: transitionOptions}}\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed ? {value: ':leave', params: {transitionParams: transitionOptions }} : {value: ':enter', params: {transitionParams: transitionOptions}}\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\"\n >\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
|
|
2541
|
+
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n <ng-template let-item pTemplate=\"selectedItem\">\n <span class=\"ui-autocomplete-token-label ng-tns-c65-43 ng-star-inserted\" \n [pTooltip]=\"lookupDisplayFieldTooltip ? item[lookupDisplayField] : null\" \n tooltipPosition=\"top\">\n {{item[lookupDisplayField]}}\n </span>\n </ng-template>\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed \n ? { value: 'hidden', params: { transitionParams: transitionOptions } }\n : { value: 'visible', params: { transitionParams: transitionOptions } }\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed\n ? { value: ':leave', params: { transitionParams: transitionOptions } }\n : { value: ':enter', params: { transitionParams: transitionOptions } }\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr\n sNavigation\n [pSelectableRow]=\"rowData\"\n [pSelectableRowIndex]=\"rowIndex\"\n sDoubleClick (onDoubleClick)=\"onTableRowDoubleClick(rowData)\"\n >\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: col.calendarLocaleOptions?.dateFormat || \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime: col.calendarLocaleOptions?.dateFormat || \"LTS\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
|
|
2488
2542
|
providers: [
|
|
2489
2543
|
{
|
|
2490
2544
|
provide: forms.NG_VALUE_ACCESSOR,
|