@sankhyalabs/ezui 0.0.0-feat-dev-KB-31007.2 → 0.0.0-feat-dev-KB-63197.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/dist/cjs/{RecordValidationProcessor-4c893e04.js → RecordValidationProcessor-1e1a3636.js} +1 -0
- package/dist/cjs/ez-form.cjs.entry.js +3 -2
- package/dist/cjs/ez-grid.cjs.entry.js +147 -5
- package/dist/cjs/{ez-tree.cjs.entry.js → ez-scroller_3.cjs.entry.js} +215 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +60 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +57 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +25 -1
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +21 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +2 -6
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/utils/form/DataBinder.js +2 -1
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +1 -0
- package/dist/custom-elements/index.d.ts +0 -6
- package/dist/custom-elements/index.js +153 -96
- package/dist/esm/{RecordValidationProcessor-b00b8b77.js → RecordValidationProcessor-fe49693a.js} +1 -0
- package/dist/esm/ez-form.entry.js +3 -2
- package/dist/esm/ez-grid.entry.js +147 -5
- package/dist/esm/{ez-tree.entry.js → ez-scroller_3.entry.js} +216 -3
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-31aa45fc.entry.js +1 -0
- package/dist/ezui/{p-e252a728.entry.js → p-403f9553.entry.js} +2 -2
- package/dist/ezui/p-91f626d3.entry.js +1 -0
- package/dist/ezui/{p-04f24913.js → p-922c1ca3.js} +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +21 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +4 -0
- package/dist/types/components.d.ts +8 -90
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +0 -1
- package/react/components.js +0 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +0 -222
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +0 -92
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +0 -180
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +0 -293
- package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js +0 -5
- package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js +0 -6
- package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js +0 -6
- package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js +0 -3
- package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +0 -5
- package/dist/esm/ez-scroller_2.entry.js +0 -217
- package/dist/esm/ez-sidebar-navigator.entry.js +0 -88
- package/dist/ezui/p-5056284a.entry.js +0 -1
- package/dist/ezui/p-8888d9ed.entry.js +0 -1
- package/dist/ezui/p-a31b9c90.entry.js +0 -1
- package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
- package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +0 -57
- package/dist/types/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.d.ts +0 -4
- package/dist/types/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.d.ts +0 -5
- package/dist/types/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.d.ts +0 -5
- package/dist/types/components/ez-sidebar-navigator/interfaces/index.d.ts +0 -3
- package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +0 -5
package/dist/cjs/{RecordValidationProcessor-4c893e04.js → RecordValidationProcessor-1e1a3636.js}
RENAMED
|
@@ -79,6 +79,7 @@ class RecordValidationProcessor {
|
|
|
79
79
|
validationResult.forEach(invalidResult => {
|
|
80
80
|
const invalidFields = invalidResult.invalidFields;
|
|
81
81
|
if (invalidFields) {
|
|
82
|
+
this._validationSource.getInvalidFields(invalidFields, recordId);
|
|
82
83
|
invalidFields.forEach(field => {
|
|
83
84
|
this.markAsInvalid(field, recordId);
|
|
84
85
|
});
|
|
@@ -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 RecordValidationProcessor = require('./RecordValidationProcessor-
|
|
7
|
+
const RecordValidationProcessor = require('./RecordValidationProcessor-1e1a3636.js');
|
|
8
8
|
require('./ApplicationUtils-c9d1205c.js');
|
|
9
9
|
require('./DialogType-2114c337.js');
|
|
10
10
|
|
|
@@ -248,7 +248,8 @@ class DataBinder {
|
|
|
248
248
|
this._recordValidatorProcessor = new RecordValidationProcessor.RecordValidationProcessor(this._dataUnit, {
|
|
249
249
|
getRequiredFields: () => this._formMetadata.getRequiredFields(),
|
|
250
250
|
markAsInvalid: field => this.markInvalid(field),
|
|
251
|
-
getMessageForField: field => this.getErrorMessage(field)
|
|
251
|
+
getMessageForField: field => this.getErrorMessage(field),
|
|
252
|
+
getInvalidFields: () => { },
|
|
252
253
|
}, recordsValidator);
|
|
253
254
|
}
|
|
254
255
|
disconnectDataUnit() {
|
|
@@ -10,7 +10,7 @@ require('./DialogType-2114c337.js');
|
|
|
10
10
|
require('./CheckMode-ecb90b87.js');
|
|
11
11
|
const ICustomRender = require('./ICustomRender-6fafffce.js');
|
|
12
12
|
const constants = require('./constants-2714478b.js');
|
|
13
|
-
const RecordValidationProcessor = require('./RecordValidationProcessor-
|
|
13
|
+
const RecordValidationProcessor = require('./RecordValidationProcessor-1e1a3636.js');
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
|
|
@@ -118853,6 +118853,48 @@ class DataSourceInterceptor {
|
|
|
118853
118853
|
}
|
|
118854
118854
|
|
|
118855
118855
|
class DataSource {
|
|
118856
|
+
/**
|
|
118857
|
+
* Em caso de necessidade de reload (isWaitingToReload), eh preciso chamar o dataUnit.gotoPage, pois ele aplica tambem a ordenacao dos registros,
|
|
118858
|
+
* enquanto que o _controller.refresh apenas recarrega os dados na ordem que atua.
|
|
118859
|
+
*/
|
|
118860
|
+
handleRefreshOrReload(action) {
|
|
118861
|
+
if (this._dataUnit.isWaitingToReload()) {
|
|
118862
|
+
this.handleReload();
|
|
118863
|
+
return;
|
|
118864
|
+
}
|
|
118865
|
+
this.handleRefresh(action);
|
|
118866
|
+
}
|
|
118867
|
+
handleReload() {
|
|
118868
|
+
this._dataUnit.setWaitingToReload(false);
|
|
118869
|
+
this._dataUnit.gotoPage(0);
|
|
118870
|
+
}
|
|
118871
|
+
handleRefresh(action) {
|
|
118872
|
+
if (this.isSilentChange(action)) {
|
|
118873
|
+
return;
|
|
118874
|
+
}
|
|
118875
|
+
this._controller.refresh();
|
|
118876
|
+
}
|
|
118877
|
+
handleRecordsAdded() {
|
|
118878
|
+
if (this._options.enableGridInsert) {
|
|
118879
|
+
this._controller.refresh();
|
|
118880
|
+
this.focusOnNewRecord();
|
|
118881
|
+
}
|
|
118882
|
+
}
|
|
118883
|
+
focusOnNewRecord() {
|
|
118884
|
+
/**
|
|
118885
|
+
* O SetTimeout eh utilizado pois é preciso aguardar que o novo registro seja renderizado na grade.
|
|
118886
|
+
* Tentamos utilizar a api da grade para adicionar um event listener, porém na versão que utilizamos, não existe
|
|
118887
|
+
* algo que resolva nosso cenário.
|
|
118888
|
+
*
|
|
118889
|
+
* Sugiro no futuro utilizar algo como o applyServerSideTransaction, porém será preciso lidar com os handlers
|
|
118890
|
+
* e callbacks implementados no AgGridController e GridEditionManager.
|
|
118891
|
+
*/
|
|
118892
|
+
setTimeout(() => {
|
|
118893
|
+
var _a;
|
|
118894
|
+
const newRowIndex = ((_a = this._dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) - 1;
|
|
118895
|
+
this._controller.startEditionOnRowByIndex(newRowIndex);
|
|
118896
|
+
}, 500);
|
|
118897
|
+
}
|
|
118856
118898
|
updateLoadedRecords(action) {
|
|
118857
118899
|
const records = action.payload;
|
|
118858
118900
|
if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
|
|
@@ -118898,26 +118940,37 @@ class DataSource {
|
|
|
118898
118940
|
}
|
|
118899
118941
|
this.updateSelection();
|
|
118900
118942
|
this.handleFocusFirstRow();
|
|
118943
|
+
this._controller.refreshCells();
|
|
118901
118944
|
break;
|
|
118902
118945
|
case core.Action.PAGINATION_UPDATED:
|
|
118903
118946
|
if (this._options) {
|
|
118904
118947
|
this._options.onPaginationUpdate(this._dataUnit.getPaginationInfo());
|
|
118905
118948
|
}
|
|
118906
118949
|
break;
|
|
118907
|
-
case core.Action.
|
|
118950
|
+
case core.Action.RECORDS_ADDED:
|
|
118951
|
+
this.handleRecordsAdded();
|
|
118952
|
+
this._controller.refreshCells();
|
|
118953
|
+
break;
|
|
118908
118954
|
case core.Action.DATA_SAVED:
|
|
118909
118955
|
case core.Action.EDITION_CANCELED:
|
|
118956
|
+
this._controller.clearInvalidCells();
|
|
118957
|
+
this.handleRefreshOrReload(action);
|
|
118958
|
+
break;
|
|
118959
|
+
case core.Action.RECORDS_REMOVED:
|
|
118910
118960
|
case core.Action.DATA_CHANGED:
|
|
118911
118961
|
case core.Action.DATA_RESOLVED:
|
|
118912
118962
|
if (this.isSilentChange(action)) {
|
|
118913
118963
|
return;
|
|
118914
118964
|
}
|
|
118915
118965
|
this._controller.refresh();
|
|
118966
|
+
this._controller.refreshCells();
|
|
118967
|
+
this.handleRefresh(action);
|
|
118916
118968
|
break;
|
|
118917
118969
|
case core.Action.SELECTION_CHANGED:
|
|
118918
118970
|
case core.Action.NEXT_SELECTED:
|
|
118919
118971
|
case core.Action.PREVIOUS_SELECTED:
|
|
118920
118972
|
this.updateSelection();
|
|
118973
|
+
this._controller.refreshCells();
|
|
118921
118974
|
break;
|
|
118922
118975
|
case core.Action.RECORD_LOADED:
|
|
118923
118976
|
this.updateLoadedRecords(action);
|
|
@@ -118943,6 +118996,9 @@ class DataSource {
|
|
|
118943
118996
|
setAutoFocus(autoFocus) {
|
|
118944
118997
|
this._options.autoFocus = autoFocus;
|
|
118945
118998
|
}
|
|
118999
|
+
setEnableGridInsert(enable) {
|
|
119000
|
+
this._options.enableGridInsert = enable;
|
|
119001
|
+
}
|
|
118946
119002
|
getRows(params) {
|
|
118947
119003
|
if (this.needReload(params)) {
|
|
118948
119004
|
this._lastLoadingParams = params;
|
|
@@ -119601,7 +119657,8 @@ class GridEditionManager {
|
|
|
119601
119657
|
this._recordValidationProcessor = new RecordValidationProcessor.RecordValidationProcessor(this._dataUnit, {
|
|
119602
119658
|
getRequiredFields: () => this.getRequiredFields(),
|
|
119603
119659
|
markAsInvalid: () => { },
|
|
119604
|
-
getMessageForField: () => null
|
|
119660
|
+
getMessageForField: () => null,
|
|
119661
|
+
getInvalidFields: (fields, recordId) => this.setInvalidCells(fields, recordId),
|
|
119605
119662
|
}, recordsValidator);
|
|
119606
119663
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
119607
119664
|
this._editionIsDisabled = editionIsDisabled;
|
|
@@ -119640,6 +119697,20 @@ class GridEditionManager {
|
|
|
119640
119697
|
})
|
|
119641
119698
|
.catch(reason => this.saveFail(reason));
|
|
119642
119699
|
}
|
|
119700
|
+
recordValidate() {
|
|
119701
|
+
try {
|
|
119702
|
+
if (this._dataUnit.isDirty()) {
|
|
119703
|
+
this._recordValidationProcessor.validate().then(() => this._gridOptions.api.refreshCells({ force: true })).catch(() => {
|
|
119704
|
+
const rowNode = this._gridOptions.api.getRowNode(this.getInvalidCells().recordId);
|
|
119705
|
+
if (rowNode && this.getInvalidCells().fields.length > 0) {
|
|
119706
|
+
this._gridOptions.api.setFocusedCell(rowNode.rowIndex, this.getInvalidCells().fields[0].name);
|
|
119707
|
+
}
|
|
119708
|
+
});
|
|
119709
|
+
}
|
|
119710
|
+
}
|
|
119711
|
+
catch (error) {
|
|
119712
|
+
}
|
|
119713
|
+
}
|
|
119643
119714
|
navigateByEnterKey(keyboardEvent) {
|
|
119644
119715
|
const backwards = keyboardEvent.shiftKey;
|
|
119645
119716
|
if (this._useEnterLikeTab) {
|
|
@@ -119844,6 +119915,15 @@ class GridEditionManager {
|
|
|
119844
119915
|
setCellRenders(customRenders) {
|
|
119845
119916
|
this._customRenders = customRenders;
|
|
119846
119917
|
}
|
|
119918
|
+
setInvalidCells(invalidCells, recordId) {
|
|
119919
|
+
this._invalidCells = { fields: invalidCells, recordId };
|
|
119920
|
+
}
|
|
119921
|
+
getInvalidCells() {
|
|
119922
|
+
return this._invalidCells;
|
|
119923
|
+
}
|
|
119924
|
+
clearInvalidCells() {
|
|
119925
|
+
this._invalidCells = undefined;
|
|
119926
|
+
}
|
|
119847
119927
|
}
|
|
119848
119928
|
class TargetEdition {
|
|
119849
119929
|
constructor(rowIndex, column, backwards) {
|
|
@@ -119992,6 +120072,14 @@ class AgGridController {
|
|
|
119992
120072
|
defaultColDef: {
|
|
119993
120073
|
headerClass: 'ez-grid__cell-header',
|
|
119994
120074
|
cellClass: 'ez-grid__cell-body',
|
|
120075
|
+
cellClassRules: {
|
|
120076
|
+
'grid-body__invalidValue sc-ez-grid': (params) => {
|
|
120077
|
+
if (this._editionManager.getInvalidCells()) {
|
|
120078
|
+
return params.data["__record__id__"] === this._editionManager.getInvalidCells().recordId && this._editionManager.getInvalidCells().fields.map(field => field.name).includes(params.colDef.field);
|
|
120079
|
+
}
|
|
120080
|
+
return false;
|
|
120081
|
+
},
|
|
120082
|
+
},
|
|
119995
120083
|
cellStyle: {
|
|
119996
120084
|
height: '100%'
|
|
119997
120085
|
}
|
|
@@ -120311,6 +120399,7 @@ class AgGridController {
|
|
|
120311
120399
|
});
|
|
120312
120400
|
r.setData(data);
|
|
120313
120401
|
});
|
|
120402
|
+
this.refreshCells();
|
|
120314
120403
|
}
|
|
120315
120404
|
}
|
|
120316
120405
|
refresh() {
|
|
@@ -120320,6 +120409,15 @@ class AgGridController {
|
|
|
120320
120409
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
120321
120410
|
this._options.onRefresh();
|
|
120322
120411
|
}
|
|
120412
|
+
refreshCells() {
|
|
120413
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
120414
|
+
if (this._editionManager.getInvalidCells()) {
|
|
120415
|
+
const rowNode = this._gridOptions.api.getRowNode(this._editionManager.getInvalidCells().recordId);
|
|
120416
|
+
if (rowNode && this._editionManager.getInvalidCells().fields.length > 0) {
|
|
120417
|
+
this._gridOptions.api.setFocusedCell(rowNode.rowIndex, this._editionManager.getInvalidCells().fields[0].name);
|
|
120418
|
+
}
|
|
120419
|
+
}
|
|
120420
|
+
}
|
|
120323
120421
|
focusOnGridContainer() {
|
|
120324
120422
|
this._container.setAttribute('tabindex', '-1');
|
|
120325
120423
|
this._container.focus();
|
|
@@ -120337,6 +120435,10 @@ class AgGridController {
|
|
|
120337
120435
|
var _a;
|
|
120338
120436
|
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setAutoFocus(autoFocus);
|
|
120339
120437
|
}
|
|
120438
|
+
setEnableGridInsert(enable) {
|
|
120439
|
+
var _a;
|
|
120440
|
+
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setEnableGridInsert(enable);
|
|
120441
|
+
}
|
|
120340
120442
|
setFocusFirstRow() {
|
|
120341
120443
|
const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
|
|
120342
120444
|
if (firstRow) {
|
|
@@ -120352,9 +120454,38 @@ class AgGridController {
|
|
|
120352
120454
|
this.setFocusOnRow(lastRow.rowIndex);
|
|
120353
120455
|
}
|
|
120354
120456
|
}
|
|
120457
|
+
startEditionOnRowByIndex(rowIndex) {
|
|
120458
|
+
const firstCol = this.getFirstEditableColl(rowIndex);
|
|
120459
|
+
this.focusByCollAndRow(firstCol, rowIndex);
|
|
120460
|
+
this.startEdition(rowIndex, firstCol);
|
|
120461
|
+
}
|
|
120462
|
+
startEdition(rowIndex, firstCol) {
|
|
120463
|
+
this._gridOptions.api.clearRangeSelection();
|
|
120464
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
120465
|
+
this._gridOptions.api.setFocusedCell(rowIndex, firstCol);
|
|
120466
|
+
this._gridOptions.api.startEditingCell({ rowIndex, colKey: firstCol });
|
|
120467
|
+
const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
|
|
120468
|
+
if (cellEditor) {
|
|
120469
|
+
cellEditor.focusIn();
|
|
120470
|
+
}
|
|
120471
|
+
}
|
|
120472
|
+
getFirstEditableColl(rowIndex) {
|
|
120473
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
120474
|
+
return displayedColumns.find(column => this.isColumnEditable(rowIndex, column));
|
|
120475
|
+
}
|
|
120476
|
+
isColumnEditable(rowIndex, column) {
|
|
120477
|
+
if (column.getColDef().headerName === '')
|
|
120478
|
+
return false;
|
|
120479
|
+
const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
|
|
120480
|
+
const rowNode = this._gridOptions.api.getRowNode(rowId);
|
|
120481
|
+
return column.isCellEditable(rowNode);
|
|
120482
|
+
}
|
|
120355
120483
|
setFocusOnRow(rowIndex) {
|
|
120356
120484
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
120357
|
-
let
|
|
120485
|
+
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
120486
|
+
this.focusByCollAndRow(firstColl, rowIndex);
|
|
120487
|
+
}
|
|
120488
|
+
focusByCollAndRow(firstCell, rowIndex) {
|
|
120358
120489
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
120359
120490
|
this._gridOptions.api.ensureIndexVisible(rowIndex);
|
|
120360
120491
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
@@ -120554,6 +120685,7 @@ class AgGridController {
|
|
|
120554
120685
|
refreshSelectedRows() {
|
|
120555
120686
|
const selectedNodes = this._gridOptions.api.getSelectedNodes();
|
|
120556
120687
|
this._gridOptions.api.redrawRows({ rowNodes: selectedNodes });
|
|
120688
|
+
this.refreshCells();
|
|
120557
120689
|
}
|
|
120558
120690
|
getInitCellStyle() {
|
|
120559
120691
|
return {
|
|
@@ -120660,6 +120792,7 @@ class AgGridController {
|
|
|
120660
120792
|
column: event.column,
|
|
120661
120793
|
rowPinned: undefined
|
|
120662
120794
|
});
|
|
120795
|
+
this._editionManager.recordValidate();
|
|
120663
120796
|
}
|
|
120664
120797
|
isElementResize(e) {
|
|
120665
120798
|
return e['target'] && e['target'].getAttribute('ref') === 'eResize';
|
|
@@ -120733,6 +120866,12 @@ class AgGridController {
|
|
|
120733
120866
|
this._editionManager.setCellRenders(customRenders);
|
|
120734
120867
|
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
120735
120868
|
}
|
|
120869
|
+
clearInvalidCells() {
|
|
120870
|
+
if (this._editionManager) {
|
|
120871
|
+
this._editionManager.clearInvalidCells();
|
|
120872
|
+
this.refreshCells();
|
|
120873
|
+
}
|
|
120874
|
+
}
|
|
120736
120875
|
}
|
|
120737
120876
|
|
|
120738
120877
|
function enableSelectAll(total) {
|
|
@@ -120940,7 +121079,7 @@ class InMemoryFilterColumnDataSource {
|
|
|
120940
121079
|
}
|
|
120941
121080
|
}
|
|
120942
121081
|
|
|
120943
|
-
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;outline:none;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}";
|
|
121082
|
+
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;outline:none;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}.grid-body__invalidValue.sc-ez-grid{border:2px var(--color-alert--error-800) solid !important}";
|
|
120944
121083
|
|
|
120945
121084
|
const windowInstace = window;
|
|
120946
121085
|
const matches = (text, filter) => {
|
|
@@ -120979,6 +121118,7 @@ const EzGrid = class {
|
|
|
120979
121118
|
this.recordsValidator = undefined;
|
|
120980
121119
|
this.canEdit = true;
|
|
120981
121120
|
this.autoFocus = true;
|
|
121121
|
+
this.enableGridInsert = false;
|
|
120982
121122
|
}
|
|
120983
121123
|
/**
|
|
120984
121124
|
* Aplica a definição de colunas.
|
|
@@ -121305,6 +121445,7 @@ const EzGrid = class {
|
|
|
121305
121445
|
editionIsDisabled: () => !this.canEdit,
|
|
121306
121446
|
customFormatters: this._customFormatters,
|
|
121307
121447
|
autoFocus: this.autoFocus,
|
|
121448
|
+
enableGridInsert: this.enableGridInsert,
|
|
121308
121449
|
onRefresh: () => {
|
|
121309
121450
|
if (this.dataUnit) {
|
|
121310
121451
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
@@ -121397,6 +121538,7 @@ const EzGrid = class {
|
|
|
121397
121538
|
}
|
|
121398
121539
|
componentDidUpdate() {
|
|
121399
121540
|
this._gridController.setAutoFocus(this.autoFocus);
|
|
121541
|
+
this._gridController.setEnableGridInsert(this.enableGridInsert);
|
|
121400
121542
|
}
|
|
121401
121543
|
getDataSource() {
|
|
121402
121544
|
var _a;
|
|
@@ -4,6 +4,219 @@ 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 EzScrollDirection = require('./EzScrollDirection-b2c99895.js');
|
|
8
|
+
|
|
9
|
+
const ezScrollerCss = ":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);--ez-scroller__max-height:unset;display:flex;cursor:grab;width:100%;overflow:hidden}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked),.ez-scroller__container:not(.ez-scroller__container--locked):hover{scrollbar-color:var(--ez-scroller__scrollbar--color-clicked) var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container--both{overflow-y:scroll;overflow-x:scroll;flex-wrap:wrap}.ez-scroller__container--horizontal{overflow-x:scroll;flex-direction:row}.ez-scroller__container--vertical{overflow-y:scroll;flex-direction:column;max-height:var(--ez-scroller__max-height)}.ez-scroller__container::-webkit-scrollbar{background-color:transparent;width:var(--ez-scroller__scrollbar--width);height:var(--ez-scroller__scrollbar--width);max-width:var(--ez-scroller__scrollbar--width);min-width:var(--ez-scroller__scrollbar--width)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-track{visibility:hidden;background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-track,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-track{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb{background-color:var(--ez-scroller__scrollbar--color-default)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-scroller__scrollbar--color-hover)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:active{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-scroller__scrollbar--color-clicked)}.ez-scroller__wrapper{display:flex;position:relative;width:100%;height:auto}.ez-scroller__wrapper--horizontal{flex-direction:row}.ez-scroller__wrapper--vertical{flex-direction:column}.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--shadow-end::after{content:\"\";display:flex;position:absolute;z-index:1}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{width:24px;min-height:calc(100% - 10px)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before{left:0;background:linear-gradient(to right, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{right:0;background:linear-gradient(to left, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{min-width:calc(100% - 10px);height:24px}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before{top:0;background:linear-gradient(to bottom, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{bottom:0;background:linear-gradient(to top, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}";
|
|
10
|
+
|
|
11
|
+
const EzScroller = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this._shadowStart = "ez-scroller__wrapper--shadow-start";
|
|
15
|
+
this._shadowEnd = "ez-scroller__wrapper--shadow-end";
|
|
16
|
+
this.isActive = false;
|
|
17
|
+
this.direction = undefined;
|
|
18
|
+
this.locked = false;
|
|
19
|
+
this.activeShadow = false;
|
|
20
|
+
}
|
|
21
|
+
//---------------------------------------------
|
|
22
|
+
// Private methods
|
|
23
|
+
//---------------------------------------------
|
|
24
|
+
getContainerClass() {
|
|
25
|
+
return `ez-scroller__container ez-scroller__container--${this.direction}
|
|
26
|
+
${this.locked || !this.isActive ? " ez-scroller__container--locked" : ""}
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
getWrapperClass() {
|
|
30
|
+
return `ez-scroller__wrapper ez-scroller__wrapper--${this.direction}`;
|
|
31
|
+
}
|
|
32
|
+
finishDrag() {
|
|
33
|
+
if (this._controller) {
|
|
34
|
+
this._container.classList.remove("dragging");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
updateScroller() {
|
|
38
|
+
const container = this._container;
|
|
39
|
+
if (container == undefined) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
let remainingScroll;
|
|
43
|
+
if (this.direction === EzScrollDirection.EzScrollDirection.HORIZONTAL) {
|
|
44
|
+
const { scrollWidth, clientWidth, scrollLeft } = container;
|
|
45
|
+
remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
|
|
46
|
+
this._startHidden = container.scrollLeft > 0;
|
|
47
|
+
}
|
|
48
|
+
else if (this.direction === EzScrollDirection.EzScrollDirection.VERTICAL) {
|
|
49
|
+
const { scrollHeight, clientHeight, scrollTop } = container;
|
|
50
|
+
remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
|
|
51
|
+
this._startHidden = container.scrollTop > 0;
|
|
52
|
+
}
|
|
53
|
+
this._endHidden = remainingScroll > 0;
|
|
54
|
+
this.isActive = this._startHidden || this._endHidden || this.isActiveScroller();
|
|
55
|
+
this.updateShadow();
|
|
56
|
+
}
|
|
57
|
+
updateShadow() {
|
|
58
|
+
const wrapper = this._wrapper;
|
|
59
|
+
if (!this.activeShadow || wrapper == undefined) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const shadowPositions = ["", "start", "end", "middle"];
|
|
63
|
+
const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
|
|
64
|
+
if (currentPosition === "start") {
|
|
65
|
+
wrapper.classList.add(this._shadowStart);
|
|
66
|
+
wrapper.classList.remove(this._shadowEnd);
|
|
67
|
+
}
|
|
68
|
+
else if (currentPosition === "end") {
|
|
69
|
+
wrapper.classList.remove(this._shadowStart);
|
|
70
|
+
wrapper.classList.add(this._shadowEnd);
|
|
71
|
+
}
|
|
72
|
+
else if (currentPosition === "middle") {
|
|
73
|
+
wrapper.classList.add(this._shadowStart);
|
|
74
|
+
wrapper.classList.add(this._shadowEnd);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
wrapper.classList.remove(this._shadowStart);
|
|
78
|
+
wrapper.classList.remove(this._shadowEnd);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
configResize() {
|
|
82
|
+
const container = this._container;
|
|
83
|
+
if (container == undefined) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (this._resizeObserver != undefined) {
|
|
87
|
+
this._resizeObserver.unobserve(container);
|
|
88
|
+
}
|
|
89
|
+
this._resizeObserver = new ResizeObserver(core.JSUtils.debounce(this.updateScroller.bind(this), 200));
|
|
90
|
+
this._resizeObserver.observe(container);
|
|
91
|
+
}
|
|
92
|
+
getContainerElement() {
|
|
93
|
+
return index.h("div", { ref: ref => this._container = ref, class: this.getContainerClass() }, index.h("slot", null));
|
|
94
|
+
}
|
|
95
|
+
isActiveScroller() {
|
|
96
|
+
if (this._container == undefined) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
return this._container.scrollWidth > this._container.clientWidth
|
|
100
|
+
|| this._container.scrollHeight > this._container.clientHeight;
|
|
101
|
+
}
|
|
102
|
+
//---------------------------------------------
|
|
103
|
+
// Event handlers
|
|
104
|
+
//---------------------------------------------
|
|
105
|
+
clickListener(evt) {
|
|
106
|
+
if (this._controller && this._controller.didScroll()) {
|
|
107
|
+
evt.preventDefault();
|
|
108
|
+
evt.stopPropagation();
|
|
109
|
+
evt.stopImmediatePropagation();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
mouseDownHandler(evt) {
|
|
113
|
+
if (this.locked) {
|
|
114
|
+
this.finishDrag();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (!this._controller) {
|
|
118
|
+
this._controller = new ScrollCtrl(this._container);
|
|
119
|
+
}
|
|
120
|
+
this._controller.startDragg(evt);
|
|
121
|
+
this._container.classList.add("dragging");
|
|
122
|
+
}
|
|
123
|
+
mouseUpHandler() {
|
|
124
|
+
this.finishDrag();
|
|
125
|
+
}
|
|
126
|
+
mouseMoveHandler(evt) {
|
|
127
|
+
if (this.locked) {
|
|
128
|
+
this.finishDrag();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (this._controller) {
|
|
132
|
+
if (evt.buttons === 0) {
|
|
133
|
+
this.finishDrag();
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
this._controller.doScroll(evt);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
componentDidRender() {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
if (this._container == undefined) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (this.direction === EzScrollDirection.EzScrollDirection.BOTH) {
|
|
146
|
+
(_a = this._wrapper) === null || _a === void 0 ? void 0 : _a.classList.remove(this._shadowStart);
|
|
147
|
+
(_b = this._wrapper) === null || _b === void 0 ? void 0 : _b.classList.remove(this._shadowEnd);
|
|
148
|
+
this.isActive = this.isActiveScroller();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
this._container.onscroll = this.updateScroller.bind(this);
|
|
152
|
+
this.configResize();
|
|
153
|
+
this.updateScroller();
|
|
154
|
+
}
|
|
155
|
+
render() {
|
|
156
|
+
return (index.h(index.Host, null, this.activeShadow
|
|
157
|
+
? index.h("div", { ref: ref => this._wrapper = ref, class: this.getWrapperClass() }, this.getContainerElement())
|
|
158
|
+
: this.getContainerElement()));
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
class ScrollCtrl {
|
|
162
|
+
constructor(scrollablePanel) {
|
|
163
|
+
this.scrollablePanel = scrollablePanel;
|
|
164
|
+
}
|
|
165
|
+
startDragg(evt) {
|
|
166
|
+
this.startX = this.measureX(evt);
|
|
167
|
+
this.startY = this.measureY(evt);
|
|
168
|
+
this.scrollWidth = 0;
|
|
169
|
+
this.scrollHeight = 0;
|
|
170
|
+
}
|
|
171
|
+
measureX(e) {
|
|
172
|
+
return e.pageX - this.scrollablePanel.offsetLeft;
|
|
173
|
+
}
|
|
174
|
+
measureY(e) {
|
|
175
|
+
return e.pageY - this.scrollablePanel.offsetTop;
|
|
176
|
+
}
|
|
177
|
+
doScroll(e) {
|
|
178
|
+
const x = this.measureX(e);
|
|
179
|
+
const y = this.measureY(e);
|
|
180
|
+
if (x != this.startX || y != this.startY) {
|
|
181
|
+
const scrollX = x - this.startX;
|
|
182
|
+
const scrollY = y - this.startY;
|
|
183
|
+
this.startX += scrollX;
|
|
184
|
+
this.startY += scrollY;
|
|
185
|
+
this.scrollWidth += Math.abs(scrollX);
|
|
186
|
+
this.scrollHeight += Math.abs(scrollY);
|
|
187
|
+
this.scrollablePanel.scrollLeft = Math.max(0, this.scrollablePanel.scrollLeft - scrollX);
|
|
188
|
+
this.scrollablePanel.scrollTop = Math.max(0, this.scrollablePanel.scrollTop - scrollY);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
didScroll() {
|
|
192
|
+
const tollerance = 5;
|
|
193
|
+
return this.scrollHeight > tollerance || this.scrollWidth > tollerance;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
EzScroller.style = ezScrollerCss;
|
|
197
|
+
|
|
198
|
+
const ezSidebarButtonCss = ":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{position:absolute;display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--small) var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) 0}";
|
|
199
|
+
|
|
200
|
+
const EzSidebarButton = class {
|
|
201
|
+
constructor(hostRef) {
|
|
202
|
+
index.registerInstance(this, hostRef);
|
|
203
|
+
this.ezClick = index.createEvent(this, "ezClick", 7);
|
|
204
|
+
}
|
|
205
|
+
componentDidLoad() {
|
|
206
|
+
if (this._element) {
|
|
207
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
208
|
+
}
|
|
209
|
+
if (this._button) {
|
|
210
|
+
const dataInfo = { id: 'embedded' };
|
|
211
|
+
core.ElementIDUtils.addIDInfo(this._button, 'button', dataInfo);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
render() {
|
|
215
|
+
return (index.h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, index.h("span", null)));
|
|
216
|
+
}
|
|
217
|
+
get _element() { return index.getElement(this); }
|
|
218
|
+
};
|
|
219
|
+
EzSidebarButton.style = ezSidebarButtonCss;
|
|
7
220
|
|
|
8
221
|
const ICON_EXPANDED = "chevron-down";
|
|
9
222
|
const ICON_COLAPSED = "chevron-right";
|
|
@@ -590,4 +803,6 @@ const EzTree = class {
|
|
|
590
803
|
};
|
|
591
804
|
EzTree.style = ezTreeCss;
|
|
592
805
|
|
|
806
|
+
exports.ez_scroller = EzScroller;
|
|
807
|
+
exports.ez_sidebar_button = EzSidebarButton;
|
|
593
808
|
exports.ez_tree = EzTree;
|