@sankhyalabs/ezui 5.20.0-dev.3 → 5.20.0-dev.31
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/README.md +4 -5
- package/dist/cjs/{CSSVarsUtils-b136a156.js → CSSVarsUtils-10c9d5b4.js} +13 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +34 -29
- package/dist/cjs/ez-card-item_3.cjs.entry.js +6 -5
- package/dist/cjs/ez-combo-box.cjs.entry.js +9 -8
- package/dist/cjs/ez-date-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +34 -15
- package/dist/cjs/ez-grid.cjs.entry.js +130 -36
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
- package/dist/cjs/ez-number-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +7 -8
- package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
- package/dist/cjs/ez-split-item.cjs.entry.js +20 -2
- package/dist/cjs/ez-split-panel.cjs.entry.js +51 -13
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +16 -5
- package/dist/cjs/index-a7b0c73d.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.css +1 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
- package/dist/collection/components/ez-card-item/ez-card-item.css +39 -6
- package/dist/collection/components/ez-card-item/ez-card-item.js +22 -3
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +8 -7
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +33 -17
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +14 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +21 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
- package/dist/collection/components/ez-grid/ez-grid.css +25 -1
- package/dist/collection/components/ez-grid/ez-grid.js +67 -10
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
- package/dist/collection/components/ez-icon/ez-icon.css +119 -117
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
- package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
- package/dist/collection/components/ez-popup/ez-popup.css +2 -5
- package/dist/collection/components/ez-search/ez-search.css +2 -1
- package/dist/collection/components/ez-search/ez-search.js +5 -6
- package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +6 -7
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +87 -15
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +62 -12
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +82 -2
- package/dist/collection/utils/CSSVarsUtils.js +13 -0
- package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +471 -133
- package/dist/esm/{CSSVarsUtils-a97cfa29.js → CSSVarsUtils-71ce76be.js} +13 -0
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +34 -29
- package/dist/esm/ez-card-item_3.entry.js +6 -5
- package/dist/esm/ez-combo-box.entry.js +9 -8
- package/dist/esm/ez-date-input.entry.js +4 -1
- package/dist/esm/ez-date-time-input.entry.js +4 -1
- package/dist/esm/ez-form-view.entry.js +35 -16
- package/dist/esm/ez-grid.entry.js +131 -37
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +2 -10
- package/dist/esm/ez-number-input.entry.js +4 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +7 -8
- package/dist/esm/ez-split-button.entry.js +143 -0
- package/dist/esm/ez-split-item.entry.js +20 -2
- package/dist/esm/ez-split-panel.entry.js +51 -13
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +16 -5
- package/dist/esm/index-baa5e267.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-6e2f8e6b.entry.js → p-1e367a93.entry.js} +2 -2
- package/dist/ezui/p-2eb8f73b.entry.js +1 -0
- package/dist/ezui/p-3376ad44.entry.js +1 -0
- package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
- package/dist/ezui/p-7af81663.entry.js +1 -0
- package/dist/ezui/p-7bc07c31.entry.js +1 -0
- package/dist/ezui/p-8e7031a0.entry.js +1 -0
- package/dist/ezui/{p-eb36f072.entry.js → p-99ead599.entry.js} +1 -1
- package/dist/ezui/{p-7eb3e1a5.js → p-9e11fc7b.js} +1 -1
- package/dist/ezui/p-9f1e89c9.entry.js +1 -0
- package/dist/ezui/{p-51c5e071.entry.js → p-abc23d6f.entry.js} +1 -1
- package/dist/ezui/p-af95cd16.entry.js +1 -0
- package/dist/ezui/{p-c0f1715f.entry.js → p-b567fa8c.entry.js} +1 -1
- package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
- package/dist/ezui/p-bae3d0aa.entry.js +1 -0
- package/dist/ezui/p-baf80b13.entry.js +1 -0
- package/dist/ezui/{p-f56dd1da.entry.js → p-d7d7423a.entry.js} +1 -1
- package/dist/ezui/p-db77a984.entry.js +1 -0
- package/dist/ezui/{p-9cad9b6e.entry.js → p-e85c48d7.entry.js} +1 -1
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +4 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/DataSourceInterceptor.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +15 -2
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
- package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +28 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +27 -0
- package/dist/types/components.d.ts +156 -0
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
- package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
- package/package.json +13 -5
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
- package/dist/ezui/p-133fae4a.entry.js +0 -1
- package/dist/ezui/p-24d3fede.entry.js +0 -1
- package/dist/ezui/p-43b03119.entry.js +0 -1
- package/dist/ezui/p-4a7f113d.entry.js +0 -1
- package/dist/ezui/p-596634e9.entry.js +0 -1
- package/dist/ezui/p-76ba9d67.entry.js +0 -1
- package/dist/ezui/p-796c1a88.entry.js +0 -1
- package/dist/ezui/p-af15c277.entry.js +0 -1
- package/dist/ezui/p-ba875f37.entry.js +0 -1
- package/dist/ezui/p-d6ffe679.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
8
|
-
const constants = require('./constants-2714478b.js');
|
|
9
|
-
const RecordValidationProcessor = require('./RecordValidationProcessor-4c893e04.js');
|
|
10
8
|
const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
|
|
11
9
|
require('./DialogType-2114c337.js');
|
|
12
10
|
require('./CheckMode-ecb90b87.js');
|
|
11
|
+
const constants = require('./constants-2714478b.js');
|
|
12
|
+
const RecordValidationProcessor = require('./RecordValidationProcessor-4c893e04.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
|
|
@@ -118831,7 +118831,35 @@ var AllEnterpriseModules = [
|
|
|
118831
118831
|
|
|
118832
118832
|
ModuleRegistry.registerModules(AllEnterpriseModules);
|
|
118833
118833
|
|
|
118834
|
+
class DataSourceInterceptor {
|
|
118835
|
+
constructor(controller) {
|
|
118836
|
+
this._controller = controller;
|
|
118837
|
+
}
|
|
118838
|
+
clearColumnFilter(filters) {
|
|
118839
|
+
var _a;
|
|
118840
|
+
return (_a = filters.filter(filter => !filter.name.startsWith(constants.DISTINCT_FILTER_NAME_PREFIX))) !== null && _a !== void 0 ? _a : [];
|
|
118841
|
+
}
|
|
118842
|
+
interceptAction(action) {
|
|
118843
|
+
var _a;
|
|
118844
|
+
if (action.type === core.Action.LOADING_DATA) {
|
|
118845
|
+
if (constants.EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
118846
|
+
action.payload.filters = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.filters) !== undefined ? this.clearColumnFilter(action.payload.filters) : action.payload.filters;
|
|
118847
|
+
this._controller.clearFilter();
|
|
118848
|
+
}
|
|
118849
|
+
}
|
|
118850
|
+
return action;
|
|
118851
|
+
}
|
|
118852
|
+
}
|
|
118853
|
+
|
|
118834
118854
|
class DataSource {
|
|
118855
|
+
updateLoadedRecords(action) {
|
|
118856
|
+
const records = action.payload;
|
|
118857
|
+
if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
|
|
118858
|
+
records.forEach(record => {
|
|
118859
|
+
this._controller.changeValues(record, [record.__record__id__]);
|
|
118860
|
+
});
|
|
118861
|
+
}
|
|
118862
|
+
}
|
|
118835
118863
|
isSilentChange(action) {
|
|
118836
118864
|
//TODO: Provisorio p/ não atualizar a grade quando a alteração for apenas de campos transisntes
|
|
118837
118865
|
var _a, _b;
|
|
@@ -118884,6 +118912,9 @@ class DataSource {
|
|
|
118884
118912
|
case core.Action.PREVIOUS_SELECTED:
|
|
118885
118913
|
this.updateSelection();
|
|
118886
118914
|
break;
|
|
118915
|
+
case core.Action.RECORD_LOADED:
|
|
118916
|
+
this.updateLoadedRecords(action);
|
|
118917
|
+
break;
|
|
118887
118918
|
}
|
|
118888
118919
|
};
|
|
118889
118920
|
this._dataUnit = dataUnit;
|
|
@@ -118891,6 +118922,7 @@ class DataSource {
|
|
|
118891
118922
|
this._controller.setColumnsDef(this.buildColumnDefs());
|
|
118892
118923
|
this._options = options;
|
|
118893
118924
|
this._dataUnit.subscribe(this.duObserver);
|
|
118925
|
+
this._dataUnit.addInterceptor(new DataSourceInterceptor(this._controller));
|
|
118894
118926
|
}
|
|
118895
118927
|
updateSelection() {
|
|
118896
118928
|
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
@@ -118953,15 +118985,6 @@ class DataSource {
|
|
|
118953
118985
|
}
|
|
118954
118986
|
}
|
|
118955
118987
|
|
|
118956
|
-
function calcFilterColumnLeftPosition(leftReference) {
|
|
118957
|
-
const FIX_MARGIN = 60;
|
|
118958
|
-
const FILTER_COLUMN_WIDTH = 330;
|
|
118959
|
-
const screenWidth = window.innerWidth;
|
|
118960
|
-
const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
|
|
118961
|
-
const leftInt = leftReference - FIX_MARGIN;
|
|
118962
|
-
return leftInt > maxLeft ? maxLeft : leftInt;
|
|
118963
|
-
}
|
|
118964
|
-
|
|
118965
118988
|
class EzGridCustomHeader {
|
|
118966
118989
|
init(agParams) {
|
|
118967
118990
|
var _a;
|
|
@@ -118998,8 +119021,7 @@ class EzGridCustomHeader {
|
|
|
118998
119021
|
}
|
|
118999
119022
|
onClickFilter() {
|
|
119000
119023
|
var _a;
|
|
119001
|
-
|
|
119002
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
119024
|
+
this.params.showColumnFilter((_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left);
|
|
119003
119025
|
}
|
|
119004
119026
|
configSortIcon() {
|
|
119005
119027
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -119658,6 +119680,10 @@ class AgGridController {
|
|
|
119658
119680
|
this._gridOptions.api.refreshHeader();
|
|
119659
119681
|
this._dataUnit.loadData(undefined, undefined, undefined, constants.EZ_GRID_LOADING_SOURCE);
|
|
119660
119682
|
}
|
|
119683
|
+
clearFilter() {
|
|
119684
|
+
this._filteredColumns.clear();
|
|
119685
|
+
this._gridOptions.api.refreshHeader();
|
|
119686
|
+
}
|
|
119661
119687
|
showFilterColumn(configs) {
|
|
119662
119688
|
var _a;
|
|
119663
119689
|
(_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
|
|
@@ -119676,7 +119702,7 @@ class AgGridController {
|
|
|
119676
119702
|
this._idAttribName = '__record__id__';
|
|
119677
119703
|
this._gridConfig = [];
|
|
119678
119704
|
this._filteredColumns = new Map();
|
|
119679
|
-
this._filterColumnleftPosition =
|
|
119705
|
+
this._filterColumnleftPosition = 0;
|
|
119680
119706
|
this._enterprise = enterprise;
|
|
119681
119707
|
}
|
|
119682
119708
|
getGridConfig() {
|
|
@@ -119713,22 +119739,27 @@ class AgGridController {
|
|
|
119713
119739
|
const dataType = (_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.dataType) !== null && _a !== void 0 ? _a : core.DataType.TEXT;
|
|
119714
119740
|
let placeholders = '';
|
|
119715
119741
|
const params = [];
|
|
119742
|
+
let isNullIncluded;
|
|
119716
119743
|
checkedOptions.forEach(option => {
|
|
119717
|
-
if (placeholders.length > 0) {
|
|
119718
|
-
placeholders = placeholders + ',';
|
|
119719
|
-
}
|
|
119720
119744
|
const paramName = `PARAM_${column}_${params.length + 1}`;
|
|
119721
|
-
placeholders = `${placeholders}:${paramName}`; //FIXME: trocar por ? quando o backend estiver funcionando
|
|
119722
119745
|
params.push({
|
|
119723
119746
|
dataType: dataType === core.DataType.OBJECT ? core.DataType.TEXT : dataType,
|
|
119724
119747
|
name: paramName,
|
|
119725
119748
|
value: option.value,
|
|
119726
119749
|
});
|
|
119750
|
+
if (option.value == undefined) {
|
|
119751
|
+
isNullIncluded = true;
|
|
119752
|
+
}
|
|
119753
|
+
else {
|
|
119754
|
+
if (placeholders.length > 0) {
|
|
119755
|
+
placeholders = placeholders + ',';
|
|
119756
|
+
}
|
|
119757
|
+
placeholders = `${placeholders}:${paramName}`;
|
|
119758
|
+
}
|
|
119727
119759
|
});
|
|
119728
|
-
const columnExpression = dataType === core.DataType.DATE ? `onlydate(this.${column})` : `this.${column}`;
|
|
119729
119760
|
return {
|
|
119730
119761
|
name: `${constants.DISTINCT_FILTER_NAME_PREFIX}${column}`,
|
|
119731
|
-
expression:
|
|
119762
|
+
expression: this.getExpression(dataType, column, placeholders, isNullIncluded),
|
|
119732
119763
|
params,
|
|
119733
119764
|
};
|
|
119734
119765
|
}
|
|
@@ -119736,6 +119767,16 @@ class AgGridController {
|
|
|
119736
119767
|
})
|
|
119737
119768
|
.filter(item => item != undefined);
|
|
119738
119769
|
}
|
|
119770
|
+
getExpression(dataType, columnName, placeholders, isNullIncluded) {
|
|
119771
|
+
const columnExpression = dataType === core.DataType.DATE ? `onlydate(this.${columnName})` : `this.${columnName}`;
|
|
119772
|
+
if (placeholders.length > 0 && isNullIncluded) {
|
|
119773
|
+
return `(${columnExpression} in (${placeholders}) OR ${columnName} IS NULL)`;
|
|
119774
|
+
}
|
|
119775
|
+
if (isNullIncluded) {
|
|
119776
|
+
return `${columnName} IS NULL`;
|
|
119777
|
+
}
|
|
119778
|
+
return `${columnExpression} in (${placeholders})`;
|
|
119779
|
+
}
|
|
119739
119780
|
initDatagrid(container, options) {
|
|
119740
119781
|
var _a;
|
|
119741
119782
|
if (this._grid === undefined) {
|
|
@@ -119802,11 +119843,9 @@ class AgGridController {
|
|
|
119802
119843
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
119803
119844
|
}
|
|
119804
119845
|
}
|
|
119805
|
-
setFilterColumnLeftPosition(
|
|
119806
|
-
if (
|
|
119807
|
-
|
|
119808
|
-
const leftString = ePopup.style.left.replace('px', '');
|
|
119809
|
-
this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
|
|
119846
|
+
setFilterColumnLeftPosition({ type, ePopup }) {
|
|
119847
|
+
if (type === 'columnMenu') {
|
|
119848
|
+
this._filterColumnleftPosition = ePopup.getBoundingClientRect().left;
|
|
119810
119849
|
return;
|
|
119811
119850
|
}
|
|
119812
119851
|
}
|
|
@@ -120246,10 +120285,10 @@ class AgGridController {
|
|
|
120246
120285
|
tooltip: tooltip,
|
|
120247
120286
|
isSortable: propSortable,
|
|
120248
120287
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
120249
|
-
showColumnFilter: (leftPosition
|
|
120288
|
+
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
|
|
120250
120289
|
},
|
|
120251
120290
|
valueFormatter: params => {
|
|
120252
|
-
if (params.value
|
|
120291
|
+
if (params.value === undefined) {
|
|
120253
120292
|
return "";
|
|
120254
120293
|
}
|
|
120255
120294
|
if (params.value instanceof Promise) {
|
|
@@ -120631,13 +120670,13 @@ class InMemoryFilterColumnDataSource {
|
|
|
120631
120670
|
}
|
|
120632
120671
|
}
|
|
120633
120672
|
|
|
120634
|
-
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}";
|
|
120673
|
+
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%);--ez-grid--min-height:300px;min-height:var(--ez-grid--min-height)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.grid-header__pagination.sc-ez-grid{width:30%;min-width:100px;justify-content:flex-end;flex-wrap:wrap}.grid-header__left-container.sc-ez-grid{width:70%}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}.overflowed.sc-ez-grid{display:none}";
|
|
120635
120674
|
|
|
120636
120675
|
const windowInstace = window;
|
|
120637
120676
|
const matches = (text, filter) => {
|
|
120638
|
-
const normalizedText = core.StringUtils.replaceAccentuatedCharsLower(text.toLocaleLowerCase());
|
|
120677
|
+
const normalizedText = core.StringUtils.replaceAccentuatedCharsLower(text === null || text === void 0 ? void 0 : text.toLocaleLowerCase());
|
|
120639
120678
|
const normalizedFilter = core.StringUtils.replaceAccentuatedCharsLower(filter.toLocaleLowerCase());
|
|
120640
|
-
return normalizedText.includes(normalizedFilter);
|
|
120679
|
+
return normalizedText === null || normalizedText === void 0 ? void 0 : normalizedText.includes(normalizedFilter);
|
|
120641
120680
|
};
|
|
120642
120681
|
const EzGrid = class {
|
|
120643
120682
|
constructor(hostRef) {
|
|
@@ -120730,6 +120769,14 @@ const EzGrid = class {
|
|
|
120730
120769
|
observeConfig(config) {
|
|
120731
120770
|
this._gridController.setColumnsState(config.columns);
|
|
120732
120771
|
}
|
|
120772
|
+
updatePaginationTooltip() {
|
|
120773
|
+
if (!this._refPaginationLabelTooltip)
|
|
120774
|
+
return;
|
|
120775
|
+
const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
|
|
120776
|
+
if (alreadyDefined) {
|
|
120777
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
120778
|
+
}
|
|
120779
|
+
}
|
|
120733
120780
|
onSelectionChange(evt) {
|
|
120734
120781
|
this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
|
|
120735
120782
|
if (this.dataUnit) {
|
|
@@ -120885,11 +120932,10 @@ const EzGrid = class {
|
|
|
120885
120932
|
}
|
|
120886
120933
|
getPaginationControl() {
|
|
120887
120934
|
if (this._paginationInfo) {
|
|
120888
|
-
const {
|
|
120935
|
+
const { currentPage, hasMore } = this._paginationInfo;
|
|
120889
120936
|
return [
|
|
120890
|
-
index.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium" }, index.h("strong", { class: "ez-text ez-text--primary ez-text--medium" },
|
|
120891
|
-
index.h("
|
|
120892
|
-
index.h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }),
|
|
120937
|
+
index.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, index.h("span", { class: "grid-header__pagination-label" }, index.h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())),
|
|
120938
|
+
index.h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, index.h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), index.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
|
|
120893
120939
|
];
|
|
120894
120940
|
}
|
|
120895
120941
|
return null;
|
|
@@ -120933,6 +120979,53 @@ const EzGrid = class {
|
|
|
120933
120979
|
this.setEvents();
|
|
120934
120980
|
this.componentReady.emit();
|
|
120935
120981
|
this._gridController.configFilterColumn(this._filterColumn);
|
|
120982
|
+
this._initHeaderOverflowWatcher();
|
|
120983
|
+
}
|
|
120984
|
+
_getActualPageLabel() {
|
|
120985
|
+
const { firstRecord, lastRecord } = this._paginationInfo;
|
|
120986
|
+
return `${firstRecord}-${lastRecord}`;
|
|
120987
|
+
}
|
|
120988
|
+
_getRemainingPageLabel() {
|
|
120989
|
+
const { total, count } = this._paginationInfo;
|
|
120990
|
+
return `${total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`}`;
|
|
120991
|
+
}
|
|
120992
|
+
_getPaginationTooltip() {
|
|
120993
|
+
return this._getActualPageLabel() + this._getRemainingPageLabel();
|
|
120994
|
+
}
|
|
120995
|
+
_initHeaderOverflowWatcher() {
|
|
120996
|
+
this._headerOverflowWatcher = new core.OverflowWatcher(this.buildOverFlowWatcherParams());
|
|
120997
|
+
}
|
|
120998
|
+
buildOverFlowWatcherParams() {
|
|
120999
|
+
return {
|
|
121000
|
+
element: this._refPaginationControl,
|
|
121001
|
+
callback: this.handleOverFlow.bind(this),
|
|
121002
|
+
notOverFlow: ["grid-pagination-tooltip"]
|
|
121003
|
+
};
|
|
121004
|
+
}
|
|
121005
|
+
handleOverFlow(elementsOverflow) {
|
|
121006
|
+
if (!this._refPaginationLabel)
|
|
121007
|
+
return;
|
|
121008
|
+
if (elementsOverflow.length > 0) {
|
|
121009
|
+
this._hidePaginationDescription();
|
|
121010
|
+
}
|
|
121011
|
+
else {
|
|
121012
|
+
this._showPaginationDescription();
|
|
121013
|
+
}
|
|
121014
|
+
}
|
|
121015
|
+
_hidePaginationDescription() {
|
|
121016
|
+
this._refPaginationLabel.classList.add(core.OVERFLOWED_CLASS_NAME);
|
|
121017
|
+
this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
|
|
121018
|
+
this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
|
|
121019
|
+
}
|
|
121020
|
+
;
|
|
121021
|
+
_showPaginationDescription() {
|
|
121022
|
+
this._refPaginationLabel.classList.remove(core.OVERFLOWED_CLASS_NAME);
|
|
121023
|
+
this._refPaginationLabelTooltip.removeAttribute('data-flow');
|
|
121024
|
+
this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
|
|
121025
|
+
}
|
|
121026
|
+
disconnectedCallback() {
|
|
121027
|
+
var _a;
|
|
121028
|
+
(_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
120936
121029
|
}
|
|
120937
121030
|
componentWillRender() {
|
|
120938
121031
|
this.configSelectionCounter();
|
|
@@ -120956,14 +121049,15 @@ const EzGrid = class {
|
|
|
120956
121049
|
}
|
|
120957
121050
|
render() {
|
|
120958
121051
|
var _a;
|
|
120959
|
-
return (index.h(index.Host, { "no-header": this.hideHeader() }, index.h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
121052
|
+
return (index.h(index.Host, { "no-header": this.hideHeader() }, index.h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), index.h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: "grid-header__container grid-header__left-container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
120960
121053
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
120961
121054
|
` }, index.h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), index.h("div", { class: "grid__footer" }, index.h("slot", { name: "footer" }))));
|
|
120962
121055
|
}
|
|
120963
121056
|
static get assetsDirs() { return ["../assets"]; }
|
|
120964
121057
|
get _element() { return index.getElement(this); }
|
|
120965
121058
|
static get watchers() { return {
|
|
120966
|
-
"config": ["observeConfig"]
|
|
121059
|
+
"config": ["observeConfig"],
|
|
121060
|
+
"_paginationInfo": ["updatePaginationTooltip"]
|
|
120967
121061
|
}; }
|
|
120968
121062
|
};
|
|
120969
121063
|
EzGrid.style = ezGridCss;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea06\"}.ez-icon-alert-circle:before{content:\"\\ea07\"}.ez-icon-alert-mail:before{content:\"\\ea08\"}.ez-icon-alert-popup:before{content:\"\\ea09\"}.ez-icon-anexo:before{content:\"\\ea0a\"}.ez-icon-
|
|
8
|
+
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea06\"}.ez-icon-alert-circle:before{content:\"\\ea07\"}.ez-icon-alert-mail:before{content:\"\\ea08\"}.ez-icon-alert-popup:before{content:\"\\ea09\"}.ez-icon-anexo:before{content:\"\\ea0a\"}.ez-icon-antecipacao:before{content:\"\\ea0b\"}.ez-icon-apps:before{content:\"\\ea0c\"}.ez-icon-arrow-forward:before{content:\"\\ea0d\"}.ez-icon-arrow-upward:before{content:\"\\ea0e\"}.ez-icon-arrow_back:before{content:\"\\ea0f\"}.ez-icon-arrow_downward:before{content:\"\\ea10\"}.ez-icon-baixa:before{content:\"\\ea11\"}.ez-icon-balance:before{content:\"\\ea12\"}.ez-icon-bell-inverted:before{content:\"\\ea13\"}.ez-icon-bell:before{content:\"\\ea14\"}.ez-icon-boleto:before{content:\"\\ea15\"}.ez-icon-boolean:before{content:\"\\ea16\"}.ez-icon-business-center:before{content:\"\\ea17\"}.ez-icon-calendar-clock:before{content:\"\\ea18\"}.ez-icon-calendar:before{content:\"\\ea19\"}.ez-icon-cash-remove:before{content:\"\\ea1a\"}.ez-icon-check-circle-inverted:before{content:\"\\ea1b\"}.ez-icon-check-circle:before{content:\"\\ea1c\"}.ez-icon-check:before{content:\"\\ea1d\"}.ez-icon-chevron-down:before{content:\"\\ea1e\"}.ez-icon-chevron-left:before{content:\"\\ea1f\"}.ez-icon-chevron-right:before{content:\"\\ea20\"}.ez-icon-chevron-up:before{content:\"\\ea21\"}.ez-icon-circle--medium:before{content:\"\\ea22\"}.ez-icon-circle:before{content:\"\\ea23\"}.ez-icon-cleaning:before{content:\"\\ea24\"}.ez-icon-clipboard:before{content:\"\\ea25\"}.ez-icon-clock-rotate-left:before{content:\"\\ea26\"}.ez-icon-close:before{content:\"\\ea27\"}.ez-icon-cobrar:before{content:\"\\ea28\"}.ez-icon-code:before{content:\"\\ea29\"}.ez-icon-configuration:before{content:\"\\ea2a\"}.ez-icon-content-cut:before{content:\"\\ea2b\"}.ez-icon-copy:before{content:\"\\ea2c\"}.ez-icon-credit_card:before{content:\"\\ea2d\"}.ez-icon-crop:before{content:\"\\ea2e\"}.ez-icon-custom:before{content:\"\\ea2f\"}.ez-icon-delete-file:before{content:\"\\ea30\"}.ez-icon-delete:before{content:\"\\ea31\"}.ez-icon-description:before{content:\"\\ea32\"}.ez-icon-dividir:before{content:\"\\ea33\"}.ez-icon-docx:before{content:\"\\ea34\"}.ez-icon-dot-notification:before{content:\"\\ea35\"}.ez-icon-dots-horizontal:before{content:\"\\ea36\"}.ez-icon-dots-vertical:before{content:\"\\ea37\"}.ez-icon-drag-indicator:before{content:\"\\ea38\"}.ez-icon-dual-chevron-down:before{content:\"\\ea39\"}.ez-icon-dual-chevron-left:before{content:\"\\ea3a\"}.ez-icon-dual-chevron-right:before{content:\"\\ea3b\"}.ez-icon-dual-chevron-up:before{content:\"\\ea3c\"}.ez-icon-edit-file:before{content:\"\\ea3d\"}.ez-icon-edit-table:before{content:\"\\ea3e\"}.ez-icon-edit-time:before{content:\"\\ea3f\"}.ez-icon-edit-value:before{content:\"\\ea40\"}.ez-icon-edit:before{content:\"\\ea41\"}.ez-icon-email:before{content:\"\\ea42\"}.ez-icon-estorno:before{content:\"\\ea43\"}.ez-icon-exe:before{content:\"\\ea44\"}.ez-icon-expand:before{content:\"\\ea45\"}.ez-icon-expandir_card:before{content:\"\\ea46\"}.ez-icon-extrato:before{content:\"\\ea47\"}.ez-icon-eye-off:before{content:\"\\ea48\"}.ez-icon-eye:before{content:\"\\ea49\"}.ez-icon-favorite:before{content:\"\\ea4a\"}.ez-icon-figma:before{content:\"\\ea4b\"}.ez-icon-file-download:before{content:\"\\ea4c\"}.ez-icon-file-upload:before{content:\"\\ea4d\"}.ez-icon-filter:before{content:\"\\ea4e\"}.ez-icon-find-file:before{content:\"\\ea4f\"}.ez-icon-find-page:before{content:\"\\ea50\"}.ez-icon-format-color-fill:before{content:\"\\ea51\"}.ez-icon-generic:before{content:\"\\ea52\"}.ez-icon-gif:before{content:\"\\ea53\"}.ez-icon-graph_bar:before{content:\"\\ea54\"}.ez-icon-handshake:before{content:\"\\ea55\"}.ez-icon-help-inverted:before{content:\"\\ea56\"}.ez-icon-help:before{content:\"\\ea57\"}.ez-icon-hide_menu:before{content:\"\\ea58\"}.ez-icon-home:before{content:\"\\ea59\"}.ez-icon-icons104:before{content:\"\\ea5a\"}.ez-icon-language:before{content:\"\\ea5b\"}.ez-icon-launch:before{content:\"\\ea5c\"}.ez-icon-lightbulb:before{content:\"\\ea5d\"}.ez-icon-list:before{content:\"\\ea5e\"}.ez-icon-location:before{content:\"\\ea5f\"}.ez-icon-lock-outline:before{content:\"\\ea60\"}.ez-icon-lock:before{content:\"\\ea61\"}.ez-icon-menu:before{content:\"\\ea62\"}.ez-icon-mid:before{content:\"\\ea63\"}.ez-icon-minus:before{content:\"\\ea64\"}.ez-icon-money-off:before{content:\"\\ea65\"}.ez-icon-money:before{content:\"\\ea66\"}.ez-icon-more:before{content:\"\\ea67\"}.ez-icon-mp3:before{content:\"\\ea68\"}.ez-icon-mp4:before{content:\"\\ea69\"}.ez-icon-multiple-files:before{content:\"\\ea6a\"}.ez-icon-north-west:before{content:\"\\ea6b\"}.ez-icon-number:before{content:\"\\ea6c\"}.ez-icon-ordem-ascendente:before{content:\"\\ea6d\"}.ez-icon-ordem-descendente:before{content:\"\\ea6e\"}.ez-icon-parcelar:before{content:\"\\ea6f\"}.ez-icon-pause:before{content:\"\\ea70\"}.ez-icon-payments:before{content:\"\\ea71\"}.ez-icon-pdf:before{content:\"\\ea72\"}.ez-icon-play:before{content:\"\\ea73\"}.ez-icon-plus:before{content:\"\\ea74\"}.ez-icon-png:before{content:\"\\ea75\"}.ez-icon-power:before{content:\"\\ea76\"}.ez-icon-pptx:before{content:\"\\ea77\"}.ez-icon-preview:before{content:\"\\ea78\"}.ez-icon-print:before{content:\"\\ea79\"}.ez-icon-push-pin:before{content:\"\\ea7a\"}.ez-icon-rateio:before{content:\"\\ea7b\"}.ez-icon-receipt:before{content:\"\\ea7c\"}.ez-icon-recolher_card:before{content:\"\\ea7d\"}.ez-icon-restore:before{content:\"\\ea7e\"}.ez-icon-return:before{content:\"\\ea7f\"}.ez-icon-sankhya-place:before{content:\"\\ea80\"}.ez-icon-save:before{content:\"\\ea81\"}.ez-icon-search:before{content:\"\\ea82\"}.ez-icon-settings-inverted:before{content:\"\\ea83\"}.ez-icon-settings:before{content:\"\\ea84\"}.ez-icon-share:before{content:\"\\ea85\"}.ez-icon-shield:before{content:\"\\ea86\"}.ez-icon-show_menu:before{content:\"\\ea87\"}.ez-icon-south-east:before{content:\"\\ea88\"}.ez-icon-sync:before{content:\"\\ea89\"}.ez-icon-table:before{content:\"\\ea8a\"}.ez-icon-tag_code:before{content:\"\\ea8b\"}.ez-icon-text:before{content:\"\\ea8c\"}.ez-icon-timeline:before{content:\"\\ea8d\"}.ez-icon-timer-outline:before{content:\"\\ea8e\"}.ez-icon-trending-up:before{content:\"\\ea8f\"}.ez-icon-tune:before{content:\"\\ea90\"}.ez-icon-txt:before{content:\"\\ea91\"}.ez-icon-un-pin:before{content:\"\\ea92\"}.ez-icon-unfold_less:before{content:\"\\ea93\"}.ez-icon-unfold_more:before{content:\"\\ea94\"}.ez-icon-user-circle:before{content:\"\\ea95\"}.ez-icon-warning-outline:before{content:\"\\ea96\"}.ez-icon-warning_triangle:before{content:\"\\ea97\"}.ez-icon-whatshot:before{content:\"\\ea98\"}.ez-icon-xlsx:before{content:\"\\ea99\"}.ez-icon-zip:before{content:\"\\ea9a\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
9
9
|
|
|
10
10
|
const EzIcon = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -146,16 +146,8 @@ const EzMuiltiSelectionList = class {
|
|
|
146
146
|
}
|
|
147
147
|
handleChangeSelectedItem(event) {
|
|
148
148
|
const { detail: itemCheckSelected } = event;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
|
|
152
|
-
}
|
|
153
|
-
return item;
|
|
154
|
-
});
|
|
155
|
-
this.clearInputs();
|
|
156
|
-
}
|
|
157
|
-
clearInputs() {
|
|
158
|
-
this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
|
|
149
|
+
const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
|
|
150
|
+
itemSelected.check = itemCheckSelected.check;
|
|
159
151
|
}
|
|
160
152
|
buildViewList(hasDelete) {
|
|
161
153
|
return (index.h(index.Fragment, null, this.displayOptionToCheckAllItems && (index.h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), index.h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const CSSVarsUtils = require('./CSSVarsUtils-
|
|
7
|
+
const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
|
|
8
8
|
|
|
9
9
|
const ezNumberInputCss = ":host{display:block;width:100%}.number__input{height:100%}";
|
|
10
10
|
|
|
@@ -118,6 +118,9 @@ const EzNumberInput = class {
|
|
|
118
118
|
this.ezCancelWaitingChange.emit();
|
|
119
119
|
}
|
|
120
120
|
handleBlur() {
|
|
121
|
+
if (!this._changePending) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
121
124
|
try {
|
|
122
125
|
const parsedNumber = this.getParsedNumber();
|
|
123
126
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;
|
|
8
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
9
9
|
|
|
10
10
|
const EzPopup = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
|
-
const CSSVarsUtils = require('./CSSVarsUtils-
|
|
6
|
+
const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
|
|
9
9
|
require('./DialogType-2114c337.js');
|
|
10
10
|
require('./CheckMode-ecb90b87.js');
|
|
11
11
|
const constants = require('./constants-2714478b.js');
|
|
12
12
|
|
|
13
|
-
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-search--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-search__scrollbar--color-background);width:var(--ez-search__scrollbar--width);max-width:var(--ez-search__scrollbar--width);min-width:var(--ez-search__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);padding:var(--ez-search--space--small);
|
|
13
|
+
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-search--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-search__scrollbar--color-background);width:var(--ez-search__scrollbar--width);max-width:var(--ez-search__scrollbar--width);min-width:var(--ez-search__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);padding:var(--ez-search--space--small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
14
14
|
|
|
15
15
|
const EzSearch = class {
|
|
16
16
|
constructor(hostRef) {
|
|
@@ -198,10 +198,9 @@ const EzSearch = class {
|
|
|
198
198
|
if (currentValue == undefined) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
201
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : `${currentValue.value} - ${currentValue.label}`;
|
|
202
|
+
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
203
|
+
return text;
|
|
205
204
|
}
|
|
206
205
|
getText() {
|
|
207
206
|
const currentValue = this.getSelectedOption(this.value);
|
|
@@ -273,7 +272,7 @@ const EzSearch = class {
|
|
|
273
272
|
title: opt.label,
|
|
274
273
|
details: opt.details
|
|
275
274
|
};
|
|
276
|
-
return index.h("div", { style: { "height": "100%" }, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index$1 }, index.h("ez-card-item", { item: card }));
|
|
275
|
+
return index.h("div", { style: { "height": "100%" }, class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index$1 }, index.h("ez-card-item", { item: card }));
|
|
277
276
|
}
|
|
278
277
|
showOptions() {
|
|
279
278
|
if (!this.enabled)
|
|
@@ -317,7 +316,7 @@ const EzSearch = class {
|
|
|
317
316
|
}
|
|
318
317
|
scrollToOption(opt) {
|
|
319
318
|
window.requestAnimationFrame(() => {
|
|
320
|
-
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`
|
|
319
|
+
const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
|
|
321
320
|
if (liElem)
|
|
322
321
|
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
323
322
|
});
|