@sankhyalabs/sankhyablocks 10.1.0-dev.2 → 10.1.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-5a73e979.js → ConfigStorage-b29e31be.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-ed9d97ea.js} +1 -1
- package/dist/cjs/{ISave-861e9d6d.js → ISave-81eb2fbc.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-6838389c.js} +2 -2
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-1e804147.js} +4 -4
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cc28d847.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-ab1cc071.js} +1 -1
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-f0897eb5.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +81 -69
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +90 -6
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-68992932.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +12 -9
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-8b841753.js} +6 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +17 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +8 -4
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
- package/dist/collection/components/snk-application/snk-application.js +87 -44
- package/dist/collection/components/snk-crud/snk-crud.js +106 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +26 -4
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +47 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +29 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +1 -1
- package/dist/components/ISave.js +3 -3
- package/dist/components/snk-application2.js +76 -63
- package/dist/components/snk-crud.js +88 -1
- package/dist/components/snk-detail-view2.js +1 -1
- package/dist/components/snk-grid2.js +8 -3
- package/dist/components/snk-pesquisa2.js +15 -2
- package/dist/components/snk-taskbar2.js +9 -4
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-13d80e36.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-f4ccd9f3.js} +1 -1
- package/dist/esm/{ISave-345481c1.js → ISave-288fa9df.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-3ee2937b.js} +2 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-5d3a93f2.js} +4 -4
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-59ab0c67.js} +1 -1
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4f9f222.js} +1 -1
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-6a00fe9e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_9.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +81 -69
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +90 -6
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-0edeb967.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +12 -9
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-9cd4d20f.js} +6 -6
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +17 -5
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +8 -4
- package/dist/sankhyablocks/{p-9fe91526.js → p-0e279e7a.js} +1 -1
- package/dist/sankhyablocks/{p-164c822d.entry.js → p-1858c023.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1d585081.js → p-1c2971e4.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-26e0f63c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-34df7eca.entry.js} +1 -1
- package/dist/sankhyablocks/p-34f447ba.entry.js +1 -0
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-38e56b68.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1649f51e.entry.js → p-3abeeefa.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-3d021bef.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e64958ba.entry.js → p-44939a0e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-88ed2793.js → p-5304753a.js} +2 -2
- package/dist/sankhyablocks/{p-e8c49c12.js → p-53599b26.js} +2 -2
- package/dist/sankhyablocks/p-557368df.entry.js +1 -0
- package/dist/sankhyablocks/p-583151c5.entry.js +1 -0
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-6180de07.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1788d191.js → p-78ff8734.js} +1 -1
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-80014119.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-9317942f.js} +1 -1
- package/dist/sankhyablocks/p-a2ed1ebd.entry.js +1 -0
- package/dist/sankhyablocks/{p-0cf9aa38.js → p-a644a956.js} +1 -1
- package/dist/sankhyablocks/p-ae108ffd.entry.js +11 -0
- package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-b4322b87.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6d241415.js → p-bb2f5f38.js} +1 -1
- package/dist/sankhyablocks/{p-626b7a17.js → p-d9c54991.js} +1 -1
- package/dist/sankhyablocks/p-dc851b6e.entry.js +1 -0
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-e9021f79.entry.js} +1 -1
- package/dist/sankhyablocks/{p-59b8f277.js → p-f15478a1.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +12 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +9 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -1
- package/dist/types/components.d.ts +39 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
- package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
- package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
@@ -16,6 +16,38 @@ export class SnkCrud {
|
|
16
16
|
this._viewHistory = [];
|
17
17
|
this._customEditors = new Map();
|
18
18
|
this._customRenders = new Map();
|
19
|
+
this.loadEntitySuggestions = async (argument) => {
|
20
|
+
var _a;
|
21
|
+
const value = (_a = argument === null || argument === void 0 ? void 0 : argument.argument) !== null && _a !== void 0 ? _a : '';
|
22
|
+
const mode = (argument === null || argument === void 0 ? void 0 : argument.mode) || "PREDICTIVE";
|
23
|
+
if (!value || value.trim().length === 0) {
|
24
|
+
return [];
|
25
|
+
}
|
26
|
+
try {
|
27
|
+
this._showMoreOnSearch = false;
|
28
|
+
const entityName = this._snkDataUnit.entityName;
|
29
|
+
if (mode === "PREDICTIVE") {
|
30
|
+
return await this.handlePredictiveSearch(value, entityName);
|
31
|
+
}
|
32
|
+
return await this._application.executePreparedSearch(mode, value, this.buildSearchOptions(entityName));
|
33
|
+
}
|
34
|
+
catch (error) {
|
35
|
+
console.error('Erro ao carregar sugestões de entidades:', error);
|
36
|
+
return [];
|
37
|
+
}
|
38
|
+
};
|
39
|
+
this.searchEntitySelect = async (item) => {
|
40
|
+
if (!this._entityPKField || !item) {
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
try {
|
44
|
+
const pk = [{ name: this._entityPKField, value: item.value }];
|
45
|
+
await this.refreshDataUnitByPk(pk);
|
46
|
+
}
|
47
|
+
catch (error) {
|
48
|
+
console.error('Erro ao selecionar entidade:', error);
|
49
|
+
}
|
50
|
+
};
|
19
51
|
this.dataUnitInterceptor = {
|
20
52
|
interceptAction: (action) => {
|
21
53
|
if (action.type === DUAction.DATA_SAVED) {
|
@@ -32,6 +64,8 @@ export class SnkCrud {
|
|
32
64
|
this._resourceID = undefined;
|
33
65
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
34
66
|
this.numberingConfig = undefined;
|
67
|
+
this._showMoreOnSearch = false;
|
68
|
+
this._entityPKField = undefined;
|
35
69
|
this.enableLockManagerLoadingComp = false;
|
36
70
|
this.enableLockManagerTaskbarClick = false;
|
37
71
|
this.configName = undefined;
|
@@ -60,6 +94,7 @@ export class SnkCrud {
|
|
60
94
|
this.layoutFormConfig = true;
|
61
95
|
this.multipleEditionEnabled = true;
|
62
96
|
this.paginationCounterMode = 'auto';
|
97
|
+
this.showEntitySearch = true;
|
63
98
|
this.disableNumberingConfig = false;
|
64
99
|
}
|
65
100
|
/**
|
@@ -356,6 +391,49 @@ export class SnkCrud {
|
|
356
391
|
var _a;
|
357
392
|
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
358
393
|
}
|
394
|
+
async handlePredictiveSearch(argument, entityName) {
|
395
|
+
var _a, _b;
|
396
|
+
const response = await this._application.executePreparedSearchWithFullResponse(argument, this.buildSearchOptions(entityName, 5));
|
397
|
+
this._showMoreOnSearch = (_a = response === null || response === void 0 ? void 0 : response.hasMore) !== null && _a !== void 0 ? _a : false;
|
398
|
+
this._entityPKField = response === null || response === void 0 ? void 0 : response.pkField;
|
399
|
+
return (_b = response === null || response === void 0 ? void 0 : response.data) !== null && _b !== void 0 ? _b : [];
|
400
|
+
}
|
401
|
+
async refreshDataUnitByPk(pks) {
|
402
|
+
try {
|
403
|
+
const pkField = pks[0].name;
|
404
|
+
const pkValue = pks[0].value;
|
405
|
+
// Criar filtro para a busca específica
|
406
|
+
const quickFilter = {
|
407
|
+
term: '',
|
408
|
+
filter: {
|
409
|
+
name: '',
|
410
|
+
params: [],
|
411
|
+
expression: `(${pkField} = ${pkValue})`
|
412
|
+
}
|
413
|
+
};
|
414
|
+
// Carregar dados com o filtro aplicado diretamente
|
415
|
+
await this._dataUnit.loadData(quickFilter);
|
416
|
+
// Navegar para o formulário se houver apenas um registro
|
417
|
+
if (this._dataUnit.records.length === 1) {
|
418
|
+
this._dataUnit.selectFirst();
|
419
|
+
this.gridToForm(true);
|
420
|
+
}
|
421
|
+
}
|
422
|
+
catch (error) {
|
423
|
+
console.error('Erro ao atualizar dataset:', error);
|
424
|
+
}
|
425
|
+
}
|
426
|
+
buildSearchOptions(entityName, limit) {
|
427
|
+
return {
|
428
|
+
entity: entityName,
|
429
|
+
entityDescription: entityName,
|
430
|
+
executeOnOpen: true,
|
431
|
+
searchOptions: {
|
432
|
+
localEntityName: entityName,
|
433
|
+
limit,
|
434
|
+
}
|
435
|
+
};
|
436
|
+
}
|
359
437
|
async toggleView() {
|
360
438
|
const currentView = await this._viewStack.getSelectedIndex();
|
361
439
|
this.setViewMode(VIEW_MODE.GRID === currentView ? VIEW_MODE.FORM : VIEW_MODE.GRID);
|
@@ -462,12 +540,18 @@ export class SnkCrud {
|
|
462
540
|
}
|
463
541
|
this.configuratorCancel.emit();
|
464
542
|
}
|
543
|
+
renderDynamicSearch(slotName) {
|
544
|
+
var _a;
|
545
|
+
if (!this.showEntitySearch || ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) === true)
|
546
|
+
return;
|
547
|
+
return (h("div", { slot: slotName, class: "entity-search-container", style: { position: 'relative', display: 'inline-block', marginLeft: '10px', minWidth: '200px' } }, h("ez-search", { label: "Buscar registros", optionLoader: this.loadEntitySuggestions, onEzChange: (evt) => this.searchEntitySelect(evt.detail), mode: "slim", showMore: this._showMoreOnSearch, suppressEmptyOption: true, suppressInputPersist: true })));
|
548
|
+
}
|
465
549
|
render() {
|
466
550
|
if (this._resourceID == undefined) {
|
467
551
|
return;
|
468
552
|
}
|
469
553
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
470
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
554
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }), this.renderDynamicSearch("GRID_HEADER_DYNAMIC_SEARCH"))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderDynamicSearch("GUIDES_VIEWER_DYNAMIC_SEARCH"), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", { tabIndex: "0" }, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
471
555
|
}
|
472
556
|
static get is() { return "snk-crud"; }
|
473
557
|
static get encapsulation() { return "scoped"; }
|
@@ -1004,6 +1088,24 @@ export class SnkCrud {
|
|
1004
1088
|
"reflect": false,
|
1005
1089
|
"defaultValue": "'auto'"
|
1006
1090
|
},
|
1091
|
+
"showEntitySearch": {
|
1092
|
+
"type": "boolean",
|
1093
|
+
"mutable": false,
|
1094
|
+
"complexType": {
|
1095
|
+
"original": "boolean",
|
1096
|
+
"resolved": "boolean",
|
1097
|
+
"references": {}
|
1098
|
+
},
|
1099
|
+
"required": false,
|
1100
|
+
"optional": true,
|
1101
|
+
"docs": {
|
1102
|
+
"tags": [],
|
1103
|
+
"text": "Define se o campo de busca de entidades ser\u00E1 exibido na barra superior."
|
1104
|
+
},
|
1105
|
+
"attribute": "show-entity-search",
|
1106
|
+
"reflect": false,
|
1107
|
+
"defaultValue": "true"
|
1108
|
+
},
|
1007
1109
|
"disableNumberingConfig": {
|
1008
1110
|
"type": "boolean",
|
1009
1111
|
"mutable": false,
|
@@ -1033,7 +1135,9 @@ export class SnkCrud {
|
|
1033
1135
|
"_canEdit": {},
|
1034
1136
|
"_resourceID": {},
|
1035
1137
|
"customContainerId": {},
|
1036
|
-
"numberingConfig": {}
|
1138
|
+
"numberingConfig": {},
|
1139
|
+
"_showMoreOnSearch": {},
|
1140
|
+
"_entityPKField": {}
|
1037
1141
|
};
|
1038
1142
|
}
|
1039
1143
|
static get events() {
|
@@ -457,7 +457,7 @@ export class SnkGuidesViewer {
|
|
457
457
|
}
|
458
458
|
buildTaskBar() {
|
459
459
|
var _a;
|
460
|
-
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
460
|
+
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), actionsSettingsList: this.getSettingsListForm(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? TaskbarElement.SAVE : TaskbarElement.INSERT, "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", additionalSlotId: "GUIDES_VIEWER_DYNAMIC_SEARCH", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GUIDES_VIEWER_DYNAMIC_SEARCH" })));
|
461
461
|
}
|
462
462
|
async dataUnitActionHandler(action) {
|
463
463
|
var _a;
|
@@ -55,6 +55,7 @@ export class SnkGrid {
|
|
55
55
|
this._popUpGridConfig = false;
|
56
56
|
this._showSnkFilterBar = true;
|
57
57
|
this._enableContinuousInsert = false;
|
58
|
+
this._filterMode = 'regular';
|
58
59
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
59
60
|
this.enableLockManagerLoadingComp = false;
|
60
61
|
this.enableLockManagerTaskbarClick = false;
|
@@ -74,6 +75,7 @@ export class SnkGrid {
|
|
74
75
|
this.canEdit = true;
|
75
76
|
this.taskbarCustomContainerId = undefined;
|
76
77
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
78
|
+
this.gridHeaderDynamicSearchSlotId = 'GRID_HEADER_DYNAMIC_SEARCH';
|
77
79
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
78
80
|
this.disablePersonalizedFilter = undefined;
|
79
81
|
this.gridLegacyConfigName = undefined;
|
@@ -572,7 +574,8 @@ export class SnkGrid {
|
|
572
574
|
return;
|
573
575
|
}
|
574
576
|
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
575
|
-
this._showSnkFilterBar =
|
577
|
+
this._showSnkFilterBar = true;
|
578
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
576
579
|
return;
|
577
580
|
}
|
578
581
|
this._showSnkFilterBar = true;
|
@@ -590,9 +593,9 @@ export class SnkGrid {
|
|
590
593
|
return undefined;
|
591
594
|
}
|
592
595
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
593
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
|
596
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor, mode: this._filterMode }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? 'snk-grid-container__without-shadow ' : '') + 'snk-grid__table', "data-element-id": "embedded", dataUnit: this._dataUnit, key: 'grid-' + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => {
|
594
597
|
this.gridConfigChangeHandler(evt);
|
595
|
-
}, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
598
|
+
}, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, additionalSlotId: this.gridHeaderDynamicSearchSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }), h("slot", { name: this.gridHeaderDynamicSearchSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
596
599
|
}
|
597
600
|
static get is() { return "snk-grid"; }
|
598
601
|
static get encapsulation() { return "scoped"; }
|
@@ -974,6 +977,24 @@ export class SnkGrid {
|
|
974
977
|
"reflect": false,
|
975
978
|
"defaultValue": "'GRID_HEADER_CUSTOM_ELEMENTS'"
|
976
979
|
},
|
980
|
+
"gridHeaderDynamicSearchSlotId": {
|
981
|
+
"type": "string",
|
982
|
+
"mutable": false,
|
983
|
+
"complexType": {
|
984
|
+
"original": "string",
|
985
|
+
"resolved": "string",
|
986
|
+
"references": {}
|
987
|
+
},
|
988
|
+
"required": false,
|
989
|
+
"optional": false,
|
990
|
+
"docs": {
|
991
|
+
"tags": [],
|
992
|
+
"text": "Define o nome do slot para a aba de pesquisa no cabe\u00E7alho da grade."
|
993
|
+
},
|
994
|
+
"attribute": "grid-header-dynamic-search-slot-id",
|
995
|
+
"reflect": false,
|
996
|
+
"defaultValue": "'GRID_HEADER_DYNAMIC_SEARCH'"
|
997
|
+
},
|
977
998
|
"topTaskbarCustomSlotId": {
|
978
999
|
"type": "string",
|
979
1000
|
"mutable": false,
|
@@ -1331,7 +1352,8 @@ export class SnkGrid {
|
|
1331
1352
|
"_gridConfig": {},
|
1332
1353
|
"_popUpGridConfig": {},
|
1333
1354
|
"_showSnkFilterBar": {},
|
1334
|
-
"_enableContinuousInsert": {}
|
1355
|
+
"_enableContinuousInsert": {},
|
1356
|
+
"_filterMode": {}
|
1335
1357
|
};
|
1336
1358
|
}
|
1337
1359
|
static get events() {
|
@@ -43,6 +43,10 @@
|
|
43
43
|
/*@doc Define a largura da barra de rolagem do componente.*/
|
44
44
|
--snk-pesquisa__scrollbar--width: var(--space--small, 6px);
|
45
45
|
|
46
|
+
/*@doc Define o tamanho do conteúdo scrollável do popup */
|
47
|
+
--snk-pesquisa__scrollable-content--height: calc(100vh - 300px);
|
48
|
+
|
49
|
+
|
46
50
|
height: 100%;
|
47
51
|
display: flex;
|
48
52
|
flex-direction: column;
|
@@ -79,7 +83,7 @@
|
|
79
83
|
/*public*/
|
80
84
|
scrollbar-color: var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);
|
81
85
|
padding-right: var(--snk-pesquisa__content--padding-right);
|
82
|
-
height:
|
86
|
+
height: var(--snk-pesquisa__scrollable-content--height);
|
83
87
|
}
|
84
88
|
|
85
89
|
.snk-pesquisa__content::-webkit-scrollbar {
|
@@ -33,6 +33,18 @@ export class SnkPesquisa {
|
|
33
33
|
this._textInput.value = this.argument;
|
34
34
|
}
|
35
35
|
}
|
36
|
+
/** * Executa uma pesquisa programaticamente.
|
37
|
+
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
38
|
+
*
|
39
|
+
* @param text Texto utilizado como argumento de pesquisa.
|
40
|
+
* @returns Promise<void>
|
41
|
+
* @example
|
42
|
+
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
43
|
+
*/
|
44
|
+
async executeSearch(text) {
|
45
|
+
this.argument = text;
|
46
|
+
this.onChangeValue({ detail: text });
|
47
|
+
}
|
36
48
|
clearSearch() {
|
37
49
|
this.argument = "";
|
38
50
|
this._itemList = undefined;
|
@@ -606,6 +618,41 @@ export class SnkPesquisa {
|
|
606
618
|
"_valideDataSource": {}
|
607
619
|
};
|
608
620
|
}
|
621
|
+
static get methods() {
|
622
|
+
return {
|
623
|
+
"executeSearch": {
|
624
|
+
"complexType": {
|
625
|
+
"signature": "(text: string) => Promise<void>",
|
626
|
+
"parameters": [{
|
627
|
+
"tags": [{
|
628
|
+
"name": "param",
|
629
|
+
"text": "text Texto utilizado como argumento de pesquisa."
|
630
|
+
}],
|
631
|
+
"text": "Texto utilizado como argumento de pesquisa."
|
632
|
+
}],
|
633
|
+
"references": {
|
634
|
+
"Promise": {
|
635
|
+
"location": "global"
|
636
|
+
}
|
637
|
+
},
|
638
|
+
"return": "Promise<void>"
|
639
|
+
},
|
640
|
+
"docs": {
|
641
|
+
"text": "* Executa uma pesquisa programaticamente.\n\u00DAtil para cen\u00E1rios onde a pesquisa precisa ser disparada sem intera\u00E7\u00E3o do usu\u00E1rio.",
|
642
|
+
"tags": [{
|
643
|
+
"name": "param",
|
644
|
+
"text": "text Texto utilizado como argumento de pesquisa."
|
645
|
+
}, {
|
646
|
+
"name": "returns",
|
647
|
+
"text": "Promise<void>"
|
648
|
+
}, {
|
649
|
+
"name": "example",
|
650
|
+
"text": "await pesquisaRef.executeSearch(\"Texto para pesquisa\");"
|
651
|
+
}]
|
652
|
+
}
|
653
|
+
}
|
654
|
+
};
|
655
|
+
}
|
609
656
|
static get elementRef() { return "_element"; }
|
610
657
|
static get watchers() {
|
611
658
|
return [{
|
@@ -7,9 +7,10 @@ export class SnkTaskbar {
|
|
7
7
|
constructor() {
|
8
8
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
9
9
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
10
|
-
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
11
10
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
12
11
|
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
12
|
+
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
13
|
+
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
13
14
|
this._titleKeyByElement = {
|
14
15
|
[TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
15
16
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
@@ -52,6 +53,7 @@ export class SnkTaskbar {
|
|
52
53
|
this._isWaitingForSave = false;
|
53
54
|
this.alignRigth = false;
|
54
55
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
56
|
+
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
55
57
|
this.customContainerId = undefined;
|
56
58
|
this.overflowStrategy = 'hiddenItems';
|
57
59
|
this.configName = undefined;
|
@@ -372,7 +374,8 @@ export class SnkTaskbar {
|
|
372
374
|
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
373
375
|
}
|
374
376
|
hasToIgnoreOverFlow(element) {
|
375
|
-
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME)
|
377
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
378
|
+
element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
|
376
379
|
}
|
377
380
|
handleOverFlowStrategy() {
|
378
381
|
if (this.overflowStrategy === 'hiddenItems') {
|
@@ -418,7 +421,7 @@ export class SnkTaskbar {
|
|
418
421
|
this._slotContainer.appendChild(customElement);
|
419
422
|
}
|
420
423
|
render() {
|
421
|
-
var _a;
|
424
|
+
var _a, _b;
|
422
425
|
if (this._definitions === undefined) {
|
423
426
|
return undefined;
|
424
427
|
}
|
@@ -438,7 +441,8 @@ export class SnkTaskbar {
|
|
438
441
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
439
442
|
return h("slot", { name: elem });
|
440
443
|
})), h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
441
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))))
|
444
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
445
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
442
446
|
}
|
443
447
|
getHostClasses() {
|
444
448
|
if (this.overflowStrategy !== 'hiddenItems')
|
@@ -501,6 +505,27 @@ export class SnkTaskbar {
|
|
501
505
|
"reflect": false,
|
502
506
|
"defaultValue": "\"TASKBAR_CUSTOM_ELEMENTS\""
|
503
507
|
},
|
508
|
+
"additionalSlotId": {
|
509
|
+
"type": "string",
|
510
|
+
"mutable": false,
|
511
|
+
"complexType": {
|
512
|
+
"original": "string",
|
513
|
+
"resolved": "string",
|
514
|
+
"references": {}
|
515
|
+
},
|
516
|
+
"required": false,
|
517
|
+
"optional": false,
|
518
|
+
"docs": {
|
519
|
+
"tags": [{
|
520
|
+
"name": "description",
|
521
|
+
"text": "Define o identificador do slot adicional."
|
522
|
+
}],
|
523
|
+
"text": ""
|
524
|
+
},
|
525
|
+
"attribute": "additional-slot-id",
|
526
|
+
"reflect": false,
|
527
|
+
"defaultValue": "\"TASKBAR_ADDITIONAL_SLOT\""
|
528
|
+
},
|
504
529
|
"customContainerId": {
|
505
530
|
"type": "string",
|
506
531
|
"mutable": false,
|
@@ -64,7 +64,7 @@ export class PesquisaFetcher {
|
|
64
64
|
return result;
|
65
65
|
}
|
66
66
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
|
67
|
-
var _a, _b, _c, _d, _e;
|
67
|
+
var _a, _b, _c, _d, _e, _f;
|
68
68
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
69
69
|
const values = {
|
70
70
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
@@ -103,11 +103,11 @@ export class PesquisaFetcher {
|
|
103
103
|
};
|
104
104
|
}
|
105
105
|
const options = searchOptions != undefined
|
106
|
-
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
106
|
+
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true, "limit": searchOptions.limit }) : undefined;
|
107
107
|
const reqBody = {
|
108
108
|
"serviceName": serviceName,
|
109
109
|
"requestBody": {
|
110
|
-
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (
|
110
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": (_e = options === null || options === void 0 ? void 0 : options.limit) !== null && _e !== void 0 ? _e : this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_f = values.searchOptions) === null || _f === void 0 ? void 0 : _f.rootEntity }, { options }),
|
111
111
|
"clientEventList": {
|
112
112
|
"clientEvent": []
|
113
113
|
}
|
@@ -8,7 +8,7 @@ export const snkPesquisaMessages = {
|
|
8
8
|
initialMessage: "Os resultados de sua pesquisa aparecerão aqui...",
|
9
9
|
resultsFoundSingular: "1 registro encontrado",
|
10
10
|
resultsFoundPlural: "{{COUNT}} registros encontrados",
|
11
|
-
limitMessage: "
|
11
|
+
limitMessage: "Esta pesquisa foi limitada, existem mais resultados."
|
12
12
|
},
|
13
13
|
viewMode: {
|
14
14
|
tableMode: "Modo grade",
|
@@ -7257,7 +7257,7 @@ const snkPesquisaMessages$2 = {
|
|
7257
7257
|
initialMessage: "Os resultados de sua pesquisa aparecerão aqui...",
|
7258
7258
|
resultsFoundSingular: "1 registro encontrado",
|
7259
7259
|
resultsFoundPlural: "{{COUNT}} registros encontrados",
|
7260
|
-
limitMessage: "
|
7260
|
+
limitMessage: "Esta pesquisa foi limitada, existem mais resultados."
|
7261
7261
|
},
|
7262
7262
|
viewMode: {
|
7263
7263
|
tableMode: "Modo grade",
|
package/dist/components/ISave.js
CHANGED
@@ -162,7 +162,7 @@ class PesquisaFetcher {
|
|
162
162
|
return result;
|
163
163
|
}
|
164
164
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
|
165
|
-
var _a, _b, _c, _d, _e;
|
165
|
+
var _a, _b, _c, _d, _e, _f;
|
166
166
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
167
167
|
const values = {
|
168
168
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
@@ -201,11 +201,11 @@ class PesquisaFetcher {
|
|
201
201
|
};
|
202
202
|
}
|
203
203
|
const options = searchOptions != undefined
|
204
|
-
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
204
|
+
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true, "limit": searchOptions.limit }) : undefined;
|
205
205
|
const reqBody = {
|
206
206
|
"serviceName": serviceName,
|
207
207
|
"requestBody": {
|
208
|
-
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (
|
208
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": (_e = options === null || options === void 0 ? void 0 : options.limit) !== null && _e !== void 0 ? _e : this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_f = values.searchOptions) === null || _f === void 0 ? void 0 : _f.rootEntity }, { options }),
|
209
209
|
"clientEventList": {
|
210
210
|
"clientEvent": []
|
211
211
|
}
|