@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.10
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-5c0590b3.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-5181a917.js} +23 -2
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-861e9d6d.js → ISave-0f98a457.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-1907ffed.js} +7 -7
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-e4e38139.js} +4 -4
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cff55b1f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-1ba5e2cc.js} +1 -1
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +6 -3
- package/dist/cjs/fields-selector.cjs.entry.js +1 -1
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-4a679e23.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +5 -3
- package/dist/cjs/index-1cf293c1.js +4 -0
- 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 +14 -7
- 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 +97 -6
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-061487a8.js} +4 -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-view.cjs.entry.js +2 -6
- package/dist/cjs/snk-form_2.cjs.entry.js +32 -9
- package/dist/cjs/snk-grid.cjs.entry.js +13 -10
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-2efe60a7.js} +84 -38
- 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 +16 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +64 -48
- package/dist/collection/collection-manifest.json +2 -1
- 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-attach/snk-attach.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +151 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +2 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +14 -0
- package/dist/collection/components/snk-grid/snk-grid.js +26 -4
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +9 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +23 -2
- package/dist/components/ISave.js +3 -3
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/field-config2.js +43 -1
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +76 -63
- package/dist/components/snk-attach2.js +1 -1
- package/dist/components/snk-crud.js +96 -1
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-unit2.js +2 -0
- package/dist/components/snk-detail-view2.js +81 -34
- package/dist/components/snk-filter-number.js +1 -1
- package/dist/components/snk-form-config2.js +29 -5
- package/dist/components/snk-form-view2.js +2 -6
- package/dist/components/snk-grid2.js +9 -4
- package/dist/components/snk-layout-form-config2.js +9 -2
- package/dist/components/snk-pesquisa2.js +14 -2
- package/dist/components/snk-simple-crud2.js +1 -1
- package/dist/components/snk-taskbar2.js +66 -49
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-bd096633.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-5780ad39.js} +23 -2
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-345481c1.js → ISave-8a22ec18.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-437e98bb.js} +7 -7
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-42125ef4.js} +4 -4
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-28b9d0db.js} +1 -1
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4251d80.js} +1 -1
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +6 -3
- package/dist/esm/fields-selector.entry.js +1 -1
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-d0536a71.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +5 -3
- package/dist/esm/index-479e1293.js +4 -0
- 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 +14 -7
- 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 +97 -6
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-4a1ef77f.js} +4 -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-view.entry.js +2 -6
- package/dist/esm/snk-form_2.entry.js +32 -9
- package/dist/esm/snk-grid.entry.js +13 -10
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-c182d058.js} +84 -38
- 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 +16 -5
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +65 -49
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-01ca59fc.entry.js} +1 -1
- package/dist/sankhyablocks/p-028fb380.entry.js +11 -0
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-03f02b12.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1788d191.js → p-0e4f8b86.js} +1 -1
- package/dist/sankhyablocks/p-1037ea7b.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d241415.js → p-1b1373b6.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-2e882241.entry.js} +1 -1
- package/dist/sankhyablocks/p-30a58e29.entry.js +1 -0
- package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-35974f5f.entry.js} +1 -1
- package/dist/sankhyablocks/p-3b167a03.entry.js +1 -0
- package/dist/sankhyablocks/{p-e8c49c12.js → p-3c046287.js} +2 -2
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-42272de8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-11346b8d.entry.js → p-4c2e2767.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-4db9dbf8.js} +1 -1
- package/dist/sankhyablocks/{p-626b7a17.js → p-55d7abe7.js} +1 -1
- package/dist/sankhyablocks/p-5d408e7e.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b6d4950.entry.js → p-6e5af618.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-78d4b3e3.entry.js} +1 -1
- package/dist/sankhyablocks/p-8b4d6719.js +1 -0
- package/dist/sankhyablocks/{p-e64958ba.entry.js → p-903fa0b4.entry.js} +1 -1
- package/dist/sankhyablocks/p-987cd79d.entry.js +1 -0
- package/dist/sankhyablocks/{p-88ed2793.js → p-9ab6ae1e.js} +2 -2
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-9f16d33e.entry.js} +1 -1
- package/dist/sankhyablocks/p-a1d23fef.js +1 -0
- package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-a64ffe30.entry.js} +1 -1
- package/dist/sankhyablocks/p-aca74b21.js +1 -0
- package/dist/sankhyablocks/p-b7e891cc.entry.js +1 -0
- package/dist/sankhyablocks/{p-1d585081.js → p-b9699067.js} +1 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +1 -0
- package/dist/sankhyablocks/p-d2ec9a24.entry.js +1 -0
- package/dist/sankhyablocks/{p-59b8f277.js → p-d3534985.js} +1 -1
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-f3027bc9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f8f29e1a.entry.js → p-f35f2eb3.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd05e31d.entry.js +1 -0
- 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 +22 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +2 -2
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
- package/dist/types/components.d.ts +105 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
- package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
- package/dist/sankhyablocks/p-2c86cfab.entry.js +0 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-9fe91526.js +0 -1
- package/dist/sankhyablocks/p-a5108625.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
|
@@ -62,7 +62,9 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
62
62
|
constructor() {
|
|
63
63
|
super();
|
|
64
64
|
this.__registerHost();
|
|
65
|
+
this.snkShowGuide = createEvent(this, "snkShowGuide", 7);
|
|
65
66
|
this.snkMasterFormConfigChange = createEvent(this, "snkMasterFormConfigChange", 7);
|
|
67
|
+
this.formConfigVisibilityChanged = createEvent(this, "formConfigVisibilityChanged", 7);
|
|
66
68
|
this.exit = createEvent(this, "exit", 7);
|
|
67
69
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
68
70
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
@@ -85,6 +87,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
85
87
|
this.enableGridInsert = false;
|
|
86
88
|
this.ignoreReadOnlyFormFields = undefined;
|
|
87
89
|
this.getCustomTitle = undefined;
|
|
90
|
+
this.customGuidesConfig = [];
|
|
88
91
|
this._hasToCreateFieldSearch = true;
|
|
89
92
|
this._breadcrumbItems = [];
|
|
90
93
|
this._guides = undefined;
|
|
@@ -99,6 +102,13 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
99
102
|
observeDataUnit() {
|
|
100
103
|
this.loadGuides(true);
|
|
101
104
|
}
|
|
105
|
+
async observeFormConfigManager(value) {
|
|
106
|
+
const showFormConfig = !!value;
|
|
107
|
+
await this._viewStack.show(showFormConfig ?
|
|
108
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
109
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
110
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
111
|
+
}
|
|
102
112
|
observeDataState(newValue, oldValue) {
|
|
103
113
|
var _a, _b, _c, _d, _e, _f;
|
|
104
114
|
const newRecordsIds = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.selectionInfo) === null || _a === void 0 ? void 0 : _a.recordIds) !== null && _b !== void 0 ? _b : (_c = newValue === null || newValue === void 0 ? void 0 : newValue.selectedRecord) === null || _c === void 0 ? void 0 : _c['__record__id__'];
|
|
@@ -147,7 +157,8 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
147
157
|
* Atribui o foco para o componente.
|
|
148
158
|
*/
|
|
149
159
|
async setFocus() {
|
|
150
|
-
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
|
|
151
162
|
}
|
|
152
163
|
/**
|
|
153
164
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -197,7 +208,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
197
208
|
if (!this._configManager.isLoaded) {
|
|
198
209
|
return;
|
|
199
210
|
}
|
|
200
|
-
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true);
|
|
211
|
+
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
|
|
201
212
|
const allSheets = this._masterFormMetadata.getAllSheets();
|
|
202
213
|
const currentRecord = this.dataUnit.getSelectedRecord();
|
|
203
214
|
const disableDetails = this.hasToDisableDetails(currentRecord);
|
|
@@ -208,6 +219,13 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
208
219
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
209
220
|
item.disabled = true;
|
|
210
221
|
}
|
|
222
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
223
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
224
|
+
if (value !== undefined) {
|
|
225
|
+
item[key] = value;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
211
229
|
guides.push(item);
|
|
212
230
|
});
|
|
213
231
|
this._guides = guides;
|
|
@@ -343,38 +361,52 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
343
361
|
return `${this.entityPath}/${entityName}`;
|
|
344
362
|
}
|
|
345
363
|
getContent() {
|
|
346
|
-
var _a, _b, _c, _d, _e;
|
|
347
364
|
if (!this.selectedGuide) {
|
|
365
|
+
this.snkShowGuide.emit(undefined);
|
|
348
366
|
return;
|
|
349
367
|
}
|
|
350
368
|
const guideId = this.selectedGuide.id;
|
|
351
|
-
|
|
369
|
+
this.snkShowGuide.emit(guideId);
|
|
370
|
+
if (this.isCustomGuide(guideId)) {
|
|
371
|
+
return h("slot", { name: guideId });
|
|
372
|
+
}
|
|
352
373
|
const levels = guideId.split("::");
|
|
353
374
|
const currentLevel = levels.pop();
|
|
354
375
|
const childEntityName = FormMetadata.getDetailName(currentLevel);
|
|
355
376
|
let detailId = guideId;
|
|
356
|
-
if (childEntityName
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
377
|
+
if (this.isDetailGuide(childEntityName, levels)) {
|
|
378
|
+
return this.buildDetailGuideContent(guideId, detailId, levels, childEntityName);
|
|
379
|
+
}
|
|
380
|
+
return this.buildFormViewGuideContent(guideId);
|
|
381
|
+
}
|
|
382
|
+
buildFormViewGuideContent(cardId) {
|
|
383
|
+
var _a, _b, _c, _d;
|
|
384
|
+
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
385
|
+
if (!sheet)
|
|
386
|
+
return;
|
|
387
|
+
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
388
|
+
return (h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_d = (_c = this.masterFormConfig) === null || _c === void 0 ? void 0 : _c.summary) === null || _d === void 0 ? void 0 : _d.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: cardId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar()));
|
|
389
|
+
}
|
|
390
|
+
isDetailGuide(childEntityName, levels) {
|
|
391
|
+
return childEntityName || levels.length > 0;
|
|
392
|
+
}
|
|
393
|
+
buildDetailGuideContent(guideId, detailId, levels, childEntityName) {
|
|
394
|
+
var _a;
|
|
395
|
+
let formName;
|
|
396
|
+
let detailBranch;
|
|
397
|
+
if (guideId.includes(FORM_NAME_PREFIX)) {
|
|
398
|
+
[detailId, formName] = guideId.split(FORM_NAME_PREFIX);
|
|
399
|
+
const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
400
|
+
detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
|
|
368
401
|
}
|
|
369
402
|
else {
|
|
370
|
-
|
|
371
|
-
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
372
|
-
if (sheet) {
|
|
373
|
-
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
374
|
-
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
375
|
-
}
|
|
403
|
+
detailBranch = this.selectedGuide;
|
|
376
404
|
}
|
|
377
|
-
return
|
|
405
|
+
return this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
|
|
406
|
+
}
|
|
407
|
+
isCustomGuide(guideId) {
|
|
408
|
+
var _a;
|
|
409
|
+
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
378
410
|
}
|
|
379
411
|
onBreadcrumbClickHandler(item) {
|
|
380
412
|
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
@@ -512,7 +544,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
512
544
|
}
|
|
513
545
|
buildTaskBar() {
|
|
514
546
|
var _a;
|
|
515
|
-
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" })));
|
|
547
|
+
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" })));
|
|
516
548
|
}
|
|
517
549
|
async dataUnitActionHandler(action) {
|
|
518
550
|
var _a;
|
|
@@ -586,6 +618,9 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
586
618
|
const labels = selectedRecords.map(record => this.messagesBuilder.getMessage("snkCrud.title", record));
|
|
587
619
|
return `[${labels.join(", ")}]`;
|
|
588
620
|
}
|
|
621
|
+
getCustomGuidesConfig() {
|
|
622
|
+
return this._currentDetail ? [] : this.customGuidesConfig;
|
|
623
|
+
}
|
|
589
624
|
componentDidLoad() {
|
|
590
625
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
591
626
|
this.initKeyboardManager();
|
|
@@ -602,17 +637,14 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
602
637
|
await this._mainForm.showSearchField();
|
|
603
638
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
604
639
|
}
|
|
605
|
-
|
|
606
|
-
var _a, _b;
|
|
640
|
+
renderFormConfig() {
|
|
607
641
|
if (this._formEditorConfigManager != undefined) {
|
|
608
|
-
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
|
|
642
|
+
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, customGuidesConfig: this.getCustomGuidesConfig() }));
|
|
609
643
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
this.
|
|
614
|
-
const showGuides = this._guides && (this._guides.length > 1);
|
|
615
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
644
|
+
}
|
|
645
|
+
renderGuidesNavigator(showGuides) {
|
|
646
|
+
var _a, _b;
|
|
647
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabIndex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
616
648
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
617
649
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
618
650
|
:
|
|
@@ -628,9 +660,18 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
628
660
|
fieldsProps: this._fieldsProps
|
|
629
661
|
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
630
662
|
}
|
|
663
|
+
render() {
|
|
664
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
this.loadTaskbarProcessor();
|
|
668
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
669
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "guides-viewer-stack" }, h("stack-item", null, this.renderGuidesNavigator(showGuides)), h("stack-item", null, this.renderFormConfig())));
|
|
670
|
+
}
|
|
631
671
|
get _element() { return this; }
|
|
632
672
|
static get watchers() { return {
|
|
633
673
|
"dataUnit": ["observeDataUnit"],
|
|
674
|
+
"_formEditorConfigManager": ["observeFormConfigManager"],
|
|
634
675
|
"dataState": ["observeDataState"],
|
|
635
676
|
"masterFormConfig": ["observeMasterFormConfig"]
|
|
636
677
|
}; }
|
|
@@ -643,7 +684,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
643
684
|
"actionsList": [16],
|
|
644
685
|
"recordsValidator": [16],
|
|
645
686
|
"masterFormConfig": [1040],
|
|
646
|
-
"selectedGuide": [
|
|
687
|
+
"selectedGuide": [1040],
|
|
647
688
|
"taskbarManager": [16],
|
|
648
689
|
"messagesBuilder": [1040],
|
|
649
690
|
"canEdit": [4, "can-edit"],
|
|
@@ -654,6 +695,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
654
695
|
"enableGridInsert": [4, "enable-grid-insert"],
|
|
655
696
|
"ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
|
|
656
697
|
"getCustomTitle": [16],
|
|
698
|
+
"customGuidesConfig": [16],
|
|
657
699
|
"_hasToCreateFieldSearch": [32],
|
|
658
700
|
"_breadcrumbItems": [32],
|
|
659
701
|
"_guides": [32],
|
|
@@ -677,6 +719,11 @@ var TASKBAR_ID;
|
|
|
677
719
|
TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
|
|
678
720
|
TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
|
|
679
721
|
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
722
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
723
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
724
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
725
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
726
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
680
727
|
function defineCustomElement$1() {
|
|
681
728
|
if (typeof customElements === "undefined") {
|
|
682
729
|
return;
|
|
@@ -111,7 +111,7 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
111
111
|
}, [0, "snk-filter-number", {
|
|
112
112
|
"config": [16],
|
|
113
113
|
"getMessage": [16],
|
|
114
|
-
"value": [
|
|
114
|
+
"value": [1026],
|
|
115
115
|
"presentationMode": [2, "presentation-mode"],
|
|
116
116
|
"errorMessage": [1537, "error-message"],
|
|
117
117
|
"show": [64],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
4
|
-
import { b as buildGuides, c as buildGuidesMap, e as getFieldsToSave, u as updateTabInFieldsFromGroupList, f as buildNewGuideName, d as defineCustomElement$5 } from './field-config2.js';
|
|
5
|
-
import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
6
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
7
5
|
import { U as UserConfigType } from './form-config-fetcher.js';
|
|
6
|
+
import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
7
|
+
import { b as buildGuides, c as buildChildrenGuides, e as buildCustomGuides, f as buildGuidesMap, h as getFieldsToSave, u as updateTabInFieldsFromGroupList, i as buildNewGuideName, d as defineCustomElement$5 } from './field-config2.js';
|
|
8
8
|
import { d as defineCustomElement$7 } from './config-header2.js';
|
|
9
9
|
import { d as defineCustomElement$6 } from './configs-button2.js';
|
|
10
10
|
import { d as defineCustomElement$4 } from './field-item2.js';
|
|
@@ -35,6 +35,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
35
35
|
this.configManager = undefined;
|
|
36
36
|
this.ignoreReadOnlyFormFields = undefined;
|
|
37
37
|
this.messagesBuilder = undefined;
|
|
38
|
+
this.customGuidesConfig = [];
|
|
38
39
|
}
|
|
39
40
|
handleFieldConfigChanged() {
|
|
40
41
|
this.hasChanges = true;
|
|
@@ -54,6 +55,10 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
54
55
|
this.showNoGuideSelectedDialog();
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
58
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
59
|
+
this.showCanNotAddFieldToGuideDialog();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
57
62
|
this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
|
|
58
63
|
await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
|
|
59
64
|
}
|
|
@@ -79,6 +84,11 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
79
84
|
const message = this.getMessage('snkFormConfig.noGuideSelected.message');
|
|
80
85
|
ApplicationUtils.alert(title, message);
|
|
81
86
|
}
|
|
87
|
+
showCanNotAddFieldToGuideDialog() {
|
|
88
|
+
const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
|
|
89
|
+
const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
|
|
90
|
+
ApplicationUtils.alert(title, message);
|
|
91
|
+
}
|
|
82
92
|
/**
|
|
83
93
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
84
94
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
@@ -96,8 +106,8 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
96
106
|
this.configOptions = userConfig;
|
|
97
107
|
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
98
108
|
const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
|
99
|
-
this.configSelected = userConfig.find((config) => config.origin === origin);
|
|
100
|
-
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
|
109
|
+
this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
110
|
+
this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
101
111
|
}
|
|
102
112
|
catch (error) {
|
|
103
113
|
console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
|
|
@@ -150,9 +160,22 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
150
160
|
return fieldVisible === true && hasCfg === false;
|
|
151
161
|
});
|
|
152
162
|
}
|
|
163
|
+
getInitialOrder(guidesList) {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
|
|
166
|
+
return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
|
|
167
|
+
}
|
|
168
|
+
if (guidesList.length > 0) {
|
|
169
|
+
return Math.max(...guidesList.map(g => g.order));
|
|
170
|
+
}
|
|
171
|
+
return 0;
|
|
172
|
+
}
|
|
153
173
|
loadGuides() {
|
|
154
174
|
var _a;
|
|
155
|
-
this.guidesList = [
|
|
175
|
+
this.guidesList = [];
|
|
176
|
+
this.guidesList.push(...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
|
|
177
|
+
this.guidesList.push(...buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
|
|
178
|
+
this.guidesList.push(...buildCustomGuides(this.customGuidesConfig, this.guidesList));
|
|
156
179
|
this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
|
157
180
|
}
|
|
158
181
|
getConfig() {
|
|
@@ -301,6 +324,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
301
324
|
"configManager": [16],
|
|
302
325
|
"ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
|
|
303
326
|
"messagesBuilder": [1040],
|
|
327
|
+
"customGuidesConfig": [16],
|
|
304
328
|
"availableFields": [32],
|
|
305
329
|
"guidesList": [32],
|
|
306
330
|
"groupsList": [32],
|
|
@@ -15,7 +15,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
15
15
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
16
16
|
this._customEditors = new Map();
|
|
17
17
|
this._fieldProps = new Map();
|
|
18
|
-
this._singleColumn =
|
|
18
|
+
this._singleColumn = false;
|
|
19
19
|
this.levelPath = undefined;
|
|
20
20
|
this.fieldSearch = undefined;
|
|
21
21
|
this.label = undefined;
|
|
@@ -153,11 +153,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
setSingleColumn(layoutFormConfig) {
|
|
156
|
-
|
|
157
|
-
this._singleColumn = true;
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
this._singleColumn = (layoutFormConfig.config === FormLayout.CASCADE);
|
|
156
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
|
161
157
|
}
|
|
162
158
|
registerNotifyListeners(layoutFormConfig) {
|
|
163
159
|
if (!layoutFormConfig)
|
|
@@ -91,7 +91,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100
|
|
94
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none;--snk-grid-header--min-height:40px}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__filter-bar.sc-snk-grid{width:100%;display:flex;align-items:flex-start}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium);margin-top:var(--space--small);align-self:stretch}.snk-grid__header.sc-snk-grid snk-taskbar.sc-snk-grid{display:flex;align-items:flex-start;min-height:var(--snk-grid-header--min-height)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
|
95
95
|
|
|
96
96
|
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
97
97
|
constructor() {
|
|
@@ -139,6 +139,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
139
139
|
this._popUpGridConfig = false;
|
|
140
140
|
this._showSnkFilterBar = true;
|
|
141
141
|
this._enableContinuousInsert = false;
|
|
142
|
+
this._filterMode = 'regular';
|
|
142
143
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
143
144
|
this.enableLockManagerLoadingComp = false;
|
|
144
145
|
this.enableLockManagerTaskbarClick = false;
|
|
@@ -158,6 +159,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
158
159
|
this.canEdit = true;
|
|
159
160
|
this.taskbarCustomContainerId = undefined;
|
|
160
161
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
|
162
|
+
this.gridHeaderDynamicSearchSlotId = 'GRID_HEADER_DYNAMIC_SEARCH';
|
|
161
163
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
|
162
164
|
this.disablePersonalizedFilter = undefined;
|
|
163
165
|
this.gridLegacyConfigName = undefined;
|
|
@@ -656,7 +658,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
656
658
|
return;
|
|
657
659
|
}
|
|
658
660
|
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
659
|
-
this._showSnkFilterBar =
|
|
661
|
+
this._showSnkFilterBar = true;
|
|
662
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
|
660
663
|
return;
|
|
661
664
|
}
|
|
662
665
|
this._showSnkFilterBar = true;
|
|
@@ -674,9 +677,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
674
677
|
return undefined;
|
|
675
678
|
}
|
|
676
679
|
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 &&
|
|
677
|
-
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) => {
|
|
680
|
+
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) => {
|
|
678
681
|
this.gridConfigChangeHandler(evt);
|
|
679
|
-
}, 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 }))));
|
|
682
|
+
}, 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 }))));
|
|
680
683
|
}
|
|
681
684
|
get _element() { return this; }
|
|
682
685
|
static get watchers() { return {
|
|
@@ -703,6 +706,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
703
706
|
"canEdit": [4, "can-edit"],
|
|
704
707
|
"taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
|
|
705
708
|
"gridHeaderCustomSlotId": [1, "grid-header-custom-slot-id"],
|
|
709
|
+
"gridHeaderDynamicSearchSlotId": [1, "grid-header-dynamic-search-slot-id"],
|
|
706
710
|
"topTaskbarCustomSlotId": [1, "top-taskbar-custom-slot-id"],
|
|
707
711
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
|
708
712
|
"gridLegacyConfigName": [1, "grid-legacy-config-name"],
|
|
@@ -727,6 +731,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
727
731
|
"_popUpGridConfig": [32],
|
|
728
732
|
"_showSnkFilterBar": [32],
|
|
729
733
|
"_enableContinuousInsert": [32],
|
|
734
|
+
"_filterMode": [32],
|
|
730
735
|
"refreshColumnFilterDataSource": [64],
|
|
731
736
|
"reloadConfig": [64],
|
|
732
737
|
"showConfig": [64],
|
|
@@ -20,7 +20,7 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
20
20
|
this.__registerHost();
|
|
21
21
|
this._formConfigFetcher = new FormConfigFetcher();
|
|
22
22
|
this.messagesBuilder = undefined;
|
|
23
|
-
this.layoutType = FormLayout.
|
|
23
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Salva o tipo de layout escolhido. Sem retorno.
|
|
@@ -39,7 +39,14 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
39
39
|
if (!this._LayoutFormConfigSingleton)
|
|
40
40
|
return;
|
|
41
41
|
const { config } = this._LayoutFormConfigSingleton;
|
|
42
|
-
|
|
42
|
+
if (config == null) {
|
|
43
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const configAsNumber = Number(config);
|
|
47
|
+
this.layoutType = Object.values(FormLayout).includes(configAsNumber)
|
|
48
|
+
? configAsNumber
|
|
49
|
+
: FormLayout.SIDE_BY_SIDE;
|
|
43
50
|
}
|
|
44
51
|
toggleLayout(key) {
|
|
45
52
|
this.layoutType = key;
|
|
@@ -11,7 +11,7 @@ import './constants.js';
|
|
|
11
11
|
import { d as defineCustomElement$2 } from './pesquisa-grid2.js';
|
|
12
12
|
import { d as defineCustomElement$1 } from './pesquisa-tree2.js';
|
|
13
13
|
|
|
14
|
-
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:
|
|
14
|
+
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);--snk-pesquisa__scrollable-content--height:calc(100vh - 300px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:var(--snk-pesquisa__scrollable-content--height)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";
|
|
15
15
|
|
|
16
16
|
const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
17
17
|
constructor() {
|
|
@@ -46,6 +46,17 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
46
46
|
this._textInput.value = this.argument;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
+
/** * Executa uma pesquisa programaticamente.
|
|
50
|
+
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
|
51
|
+
*
|
|
52
|
+
* @param text Texto utilizado como argumento de pesquisa.
|
|
53
|
+
* @example
|
|
54
|
+
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
|
55
|
+
*/
|
|
56
|
+
async executeSearch(text) {
|
|
57
|
+
this.argument = text;
|
|
58
|
+
this.onChangeValue({ detail: text });
|
|
59
|
+
}
|
|
49
60
|
clearSearch() {
|
|
50
61
|
this.argument = "";
|
|
51
62
|
this._itemList = undefined;
|
|
@@ -417,7 +428,8 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
417
428
|
"_startLoading": [32],
|
|
418
429
|
"_presentationMode": [32],
|
|
419
430
|
"_currentView": [32],
|
|
420
|
-
"_valideDataSource": [32]
|
|
431
|
+
"_valideDataSource": [32],
|
|
432
|
+
"executeSearch": [64]
|
|
421
433
|
}]);
|
|
422
434
|
function defineCustomElement() {
|
|
423
435
|
if (typeof customElements === "undefined") {
|
|
@@ -860,7 +860,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
860
860
|
}, [6, "snk-simple-crud", {
|
|
861
861
|
"enableLockManagerLoadingComp": [4, "enable-lock-manager-loading-comp"],
|
|
862
862
|
"enableLockManagerTaskbarClick": [4, "enable-lock-manager-taskbar-click"],
|
|
863
|
-
"dataState": [
|
|
863
|
+
"dataState": [1040],
|
|
864
864
|
"dataUnit": [16],
|
|
865
865
|
"entityName": [1, "entity-name"],
|
|
866
866
|
"mode": [2],
|