@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.11
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 +9 -17
- 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 +3 -11
- 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 +3 -11
- 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 +9 -17
- 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-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-82a3d522.entry.js +1 -0
- 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-simple-crud/snk-simple-crud.d.ts +0 -1
- 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-9f2cdaab.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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-479e1293.js';
|
|
2
2
|
import { ElementIDUtils, ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-437e98bb.js';
|
|
4
4
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
5
5
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
6
|
-
import { b as buildGuides, a as buildGuidesMap, g as getFieldsToSave, u as updateTabInFieldsFromGroupList, c as buildNewGuideName } from './FormConfigHelper-4e42f0b6.js';
|
|
7
|
-
import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
|
|
8
6
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
9
|
-
import { U as UserConfigType } from './form-config-fetcher-
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
7
|
+
import { U as UserConfigType } from './form-config-fetcher-d0536a71.js';
|
|
8
|
+
import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
|
|
9
|
+
import { b as buildGuides, a as buildChildrenGuides, c as buildCustomGuides, d as buildGuidesMap, g as getFieldsToSave, u as updateTabInFieldsFromGroupList, e as buildNewGuideName } from './FormConfigHelper-d09669f3.js';
|
|
10
|
+
import './ConfigStorage-bd096633.js';
|
|
11
|
+
import './DataFetcher-5780ad39.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
14
14
|
import './filter-item-type.enum-d45e026f.js';
|
|
@@ -188,6 +188,7 @@ const SnkFormConfig = class {
|
|
|
188
188
|
this.configManager = undefined;
|
|
189
189
|
this.ignoreReadOnlyFormFields = undefined;
|
|
190
190
|
this.messagesBuilder = undefined;
|
|
191
|
+
this.customGuidesConfig = [];
|
|
191
192
|
}
|
|
192
193
|
handleFieldConfigChanged() {
|
|
193
194
|
this.hasChanges = true;
|
|
@@ -207,6 +208,10 @@ const SnkFormConfig = class {
|
|
|
207
208
|
this.showNoGuideSelectedDialog();
|
|
208
209
|
return;
|
|
209
210
|
}
|
|
211
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
212
|
+
this.showCanNotAddFieldToGuideDialog();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
210
215
|
this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
|
|
211
216
|
await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
|
|
212
217
|
}
|
|
@@ -232,6 +237,11 @@ const SnkFormConfig = class {
|
|
|
232
237
|
const message = this.getMessage('snkFormConfig.noGuideSelected.message');
|
|
233
238
|
ApplicationUtils.alert(title, message);
|
|
234
239
|
}
|
|
240
|
+
showCanNotAddFieldToGuideDialog() {
|
|
241
|
+
const title = this.getMessage('snkFormConfig.canNotAddFieldToGuide.title');
|
|
242
|
+
const message = this.getMessage('snkFormConfig.canNotAddFieldToGuide.message');
|
|
243
|
+
ApplicationUtils.alert(title, message);
|
|
244
|
+
}
|
|
235
245
|
/**
|
|
236
246
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
237
247
|
* através de um pequeno modulo na estrutura da aplicação:
|
|
@@ -249,8 +259,8 @@ const SnkFormConfig = class {
|
|
|
249
259
|
this.configOptions = userConfig;
|
|
250
260
|
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
251
261
|
const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
|
252
|
-
this.configSelected = userConfig.find((config) => config.origin === origin);
|
|
253
|
-
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
|
262
|
+
this.configSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
263
|
+
this.originalConfigSelected = userConfig === null || userConfig === void 0 ? void 0 : userConfig.find((config) => config.origin === origin);
|
|
254
264
|
}
|
|
255
265
|
catch (error) {
|
|
256
266
|
console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
|
|
@@ -303,9 +313,22 @@ const SnkFormConfig = class {
|
|
|
303
313
|
return fieldVisible === true && hasCfg === false;
|
|
304
314
|
});
|
|
305
315
|
}
|
|
316
|
+
getInitialOrder(guidesList) {
|
|
317
|
+
var _a, _b;
|
|
318
|
+
if (Array.isArray((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs)) {
|
|
319
|
+
return (_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.length;
|
|
320
|
+
}
|
|
321
|
+
if (guidesList.length > 0) {
|
|
322
|
+
return Math.max(...guidesList.map(g => g.order));
|
|
323
|
+
}
|
|
324
|
+
return 0;
|
|
325
|
+
}
|
|
306
326
|
loadGuides() {
|
|
307
327
|
var _a;
|
|
308
|
-
this.guidesList = [
|
|
328
|
+
this.guidesList = [];
|
|
329
|
+
this.guidesList.push(...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea')));
|
|
330
|
+
this.guidesList.push(...buildChildrenGuides(this.dataUnit, this.getInitialOrder(this.guidesList), this.guidesList));
|
|
331
|
+
this.guidesList.push(...buildCustomGuides(this.customGuidesConfig, this.guidesList));
|
|
309
332
|
this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
|
310
333
|
}
|
|
311
334
|
getConfig() {
|
|
@@ -2,17 +2,17 @@ import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElem
|
|
|
2
2
|
import { KeyboardManager, Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
4
|
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import './DataFetcher-
|
|
6
|
-
import './ISave-
|
|
7
|
-
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-
|
|
5
|
+
import './DataFetcher-5780ad39.js';
|
|
6
|
+
import './ISave-8a22ec18.js';
|
|
7
|
+
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-42125ef4.js';
|
|
8
8
|
import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
|
-
import './dataunit-fetcher-
|
|
11
|
+
import './dataunit-fetcher-c4251d80.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-d0536a71.js';
|
|
14
14
|
import './constants-7b422de0.js';
|
|
15
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
15
|
+
import { C as ConfigStorage } from './ConfigStorage-bd096633.js';
|
|
16
16
|
import { s as store } from './index-446f9341.js';
|
|
17
17
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
18
18
|
import { v as validateFilters } from './filter-validate-faf51fa9.js';
|
|
@@ -79,7 +79,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
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
|
|
82
|
+
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)}";
|
|
83
83
|
|
|
84
84
|
const SnkGrid = class {
|
|
85
85
|
constructor(hostRef) {
|
|
@@ -126,6 +126,7 @@ const SnkGrid = class {
|
|
|
126
126
|
this._popUpGridConfig = false;
|
|
127
127
|
this._showSnkFilterBar = true;
|
|
128
128
|
this._enableContinuousInsert = false;
|
|
129
|
+
this._filterMode = 'regular';
|
|
129
130
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
130
131
|
this.enableLockManagerLoadingComp = false;
|
|
131
132
|
this.enableLockManagerTaskbarClick = false;
|
|
@@ -145,6 +146,7 @@ const SnkGrid = class {
|
|
|
145
146
|
this.canEdit = true;
|
|
146
147
|
this.taskbarCustomContainerId = undefined;
|
|
147
148
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
|
149
|
+
this.gridHeaderDynamicSearchSlotId = 'GRID_HEADER_DYNAMIC_SEARCH';
|
|
148
150
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
|
149
151
|
this.disablePersonalizedFilter = undefined;
|
|
150
152
|
this.gridLegacyConfigName = undefined;
|
|
@@ -643,7 +645,8 @@ const SnkGrid = class {
|
|
|
643
645
|
return;
|
|
644
646
|
}
|
|
645
647
|
if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
|
|
646
|
-
this._showSnkFilterBar =
|
|
648
|
+
this._showSnkFilterBar = true;
|
|
649
|
+
this._filterMode = filterConfig[0].groupedItems.length > 0 ? 'regular' : 'button';
|
|
647
650
|
return;
|
|
648
651
|
}
|
|
649
652
|
this._showSnkFilterBar = true;
|
|
@@ -661,9 +664,9 @@ const SnkGrid = class {
|
|
|
661
664
|
return undefined;
|
|
662
665
|
}
|
|
663
666
|
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 &&
|
|
664
|
-
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) => {
|
|
667
|
+
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) => {
|
|
665
668
|
this.gridConfigChangeHandler(evt);
|
|
666
|
-
}, 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 }))));
|
|
669
|
+
}, 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 }))));
|
|
667
670
|
}
|
|
668
671
|
get _element() { return getElement(this); }
|
|
669
672
|
static get watchers() { return {
|
|
@@ -3,16 +3,16 @@ import { ObjectUtils, StringUtils, Action, KeyboardManager, ElementIDUtils } fro
|
|
|
3
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
4
|
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
6
|
-
import './DataFetcher-
|
|
7
|
-
import './ISave-
|
|
6
|
+
import './DataFetcher-5780ad39.js';
|
|
7
|
+
import './ISave-8a22ec18.js';
|
|
8
8
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
|
-
import './dataunit-fetcher-
|
|
11
|
+
import './dataunit-fetcher-c4251d80.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-d0536a71.js';
|
|
14
14
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
15
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
15
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-437e98bb.js';
|
|
16
16
|
import { T as TaskbarElement } from './taskbar-elements-faaf5d8f.js';
|
|
17
17
|
import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
|
|
18
18
|
|
|
@@ -22,7 +22,9 @@ const FORM_NAME_PREFIX = "__FORM:";
|
|
|
22
22
|
const SnkGuidesViewer = class {
|
|
23
23
|
constructor(hostRef) {
|
|
24
24
|
registerInstance(this, hostRef);
|
|
25
|
+
this.snkShowGuide = createEvent(this, "snkShowGuide", 7);
|
|
25
26
|
this.snkMasterFormConfigChange = createEvent(this, "snkMasterFormConfigChange", 7);
|
|
27
|
+
this.formConfigVisibilityChanged = createEvent(this, "formConfigVisibilityChanged", 7);
|
|
26
28
|
this.exit = createEvent(this, "exit", 7);
|
|
27
29
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
28
30
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
@@ -45,6 +47,7 @@ const SnkGuidesViewer = class {
|
|
|
45
47
|
this.enableGridInsert = false;
|
|
46
48
|
this.ignoreReadOnlyFormFields = undefined;
|
|
47
49
|
this.getCustomTitle = undefined;
|
|
50
|
+
this.customGuidesConfig = [];
|
|
48
51
|
this._hasToCreateFieldSearch = true;
|
|
49
52
|
this._breadcrumbItems = [];
|
|
50
53
|
this._guides = undefined;
|
|
@@ -59,6 +62,13 @@ const SnkGuidesViewer = class {
|
|
|
59
62
|
observeDataUnit() {
|
|
60
63
|
this.loadGuides(true);
|
|
61
64
|
}
|
|
65
|
+
async observeFormConfigManager(value) {
|
|
66
|
+
const showFormConfig = !!value;
|
|
67
|
+
await this._viewStack.show(showFormConfig ?
|
|
68
|
+
GUIDES_VIEWER_VIEW_MODE.CONFIG :
|
|
69
|
+
GUIDES_VIEWER_VIEW_MODE.GUIDES);
|
|
70
|
+
this.formConfigVisibilityChanged.emit(showFormConfig);
|
|
71
|
+
}
|
|
62
72
|
observeDataState(newValue, oldValue) {
|
|
63
73
|
var _a, _b, _c, _d, _e, _f;
|
|
64
74
|
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__'];
|
|
@@ -107,7 +117,8 @@ const SnkGuidesViewer = class {
|
|
|
107
117
|
* Atribui o foco para o componente.
|
|
108
118
|
*/
|
|
109
119
|
async setFocus() {
|
|
110
|
-
|
|
120
|
+
var _a;
|
|
121
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus();
|
|
111
122
|
}
|
|
112
123
|
/**
|
|
113
124
|
* Recarrega os guias baseada nos metadados atuais.
|
|
@@ -157,7 +168,7 @@ const SnkGuidesViewer = class {
|
|
|
157
168
|
if (!this._configManager.isLoaded) {
|
|
158
169
|
return;
|
|
159
170
|
}
|
|
160
|
-
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true);
|
|
171
|
+
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
|
|
161
172
|
const allSheets = this._masterFormMetadata.getAllSheets();
|
|
162
173
|
const currentRecord = this.dataUnit.getSelectedRecord();
|
|
163
174
|
const disableDetails = this.hasToDisableDetails(currentRecord);
|
|
@@ -168,6 +179,13 @@ const SnkGuidesViewer = class {
|
|
|
168
179
|
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
169
180
|
item.disabled = true;
|
|
170
181
|
}
|
|
182
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
183
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
184
|
+
if (value !== undefined) {
|
|
185
|
+
item[key] = value;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
171
189
|
guides.push(item);
|
|
172
190
|
});
|
|
173
191
|
this._guides = guides;
|
|
@@ -303,38 +321,52 @@ const SnkGuidesViewer = class {
|
|
|
303
321
|
return `${this.entityPath}/${entityName}`;
|
|
304
322
|
}
|
|
305
323
|
getContent() {
|
|
306
|
-
var _a, _b, _c, _d, _e;
|
|
307
324
|
if (!this.selectedGuide) {
|
|
325
|
+
this.snkShowGuide.emit(undefined);
|
|
308
326
|
return;
|
|
309
327
|
}
|
|
310
328
|
const guideId = this.selectedGuide.id;
|
|
311
|
-
|
|
329
|
+
this.snkShowGuide.emit(guideId);
|
|
330
|
+
if (this.isCustomGuide(guideId)) {
|
|
331
|
+
return h("slot", { name: guideId });
|
|
332
|
+
}
|
|
312
333
|
const levels = guideId.split("::");
|
|
313
334
|
const currentLevel = levels.pop();
|
|
314
335
|
const childEntityName = FormMetadata.getDetailName(currentLevel);
|
|
315
336
|
let detailId = guideId;
|
|
316
|
-
if (childEntityName
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
337
|
+
if (this.isDetailGuide(childEntityName, levels)) {
|
|
338
|
+
return this.buildDetailGuideContent(guideId, detailId, levels, childEntityName);
|
|
339
|
+
}
|
|
340
|
+
return this.buildFormViewGuideContent(guideId);
|
|
341
|
+
}
|
|
342
|
+
buildFormViewGuideContent(cardId) {
|
|
343
|
+
var _a, _b, _c, _d;
|
|
344
|
+
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
345
|
+
if (!sheet)
|
|
346
|
+
return;
|
|
347
|
+
const cardConfig = (_b = (_a = this.masterFormConfig) === null || _a === void 0 ? void 0 : _a.cardsState) === null || _b === void 0 ? void 0 : _b.get(cardId);
|
|
348
|
+
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()));
|
|
349
|
+
}
|
|
350
|
+
isDetailGuide(childEntityName, levels) {
|
|
351
|
+
return childEntityName || levels.length > 0;
|
|
352
|
+
}
|
|
353
|
+
buildDetailGuideContent(guideId, detailId, levels, childEntityName) {
|
|
354
|
+
var _a;
|
|
355
|
+
let formName;
|
|
356
|
+
let detailBranch;
|
|
357
|
+
if (guideId.includes(FORM_NAME_PREFIX)) {
|
|
358
|
+
[detailId, formName] = guideId.split(FORM_NAME_PREFIX);
|
|
359
|
+
const pathSize = ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
360
|
+
detailBranch = pathSize > 1 ? this._breadcrumbItems[pathSize - 2] : this.selectedGuide;
|
|
328
361
|
}
|
|
329
362
|
else {
|
|
330
|
-
|
|
331
|
-
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
332
|
-
if (sheet) {
|
|
333
|
-
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
334
|
-
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());
|
|
335
|
-
}
|
|
363
|
+
detailBranch = this.selectedGuide;
|
|
336
364
|
}
|
|
337
|
-
return
|
|
365
|
+
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 }));
|
|
366
|
+
}
|
|
367
|
+
isCustomGuide(guideId) {
|
|
368
|
+
var _a;
|
|
369
|
+
return (_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.map(g => g.id).includes(guideId);
|
|
338
370
|
}
|
|
339
371
|
onBreadcrumbClickHandler(item) {
|
|
340
372
|
if ((item === null || item === void 0 ? void 0 : item.id) == undefined) {
|
|
@@ -472,7 +504,7 @@ const SnkGuidesViewer = class {
|
|
|
472
504
|
}
|
|
473
505
|
buildTaskBar() {
|
|
474
506
|
var _a;
|
|
475
|
-
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" })));
|
|
507
|
+
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" })));
|
|
476
508
|
}
|
|
477
509
|
async dataUnitActionHandler(action) {
|
|
478
510
|
var _a;
|
|
@@ -546,6 +578,9 @@ const SnkGuidesViewer = class {
|
|
|
546
578
|
const labels = selectedRecords.map(record => this.messagesBuilder.getMessage("snkCrud.title", record));
|
|
547
579
|
return `[${labels.join(", ")}]`;
|
|
548
580
|
}
|
|
581
|
+
getCustomGuidesConfig() {
|
|
582
|
+
return this._currentDetail ? [] : this.customGuidesConfig;
|
|
583
|
+
}
|
|
549
584
|
componentDidLoad() {
|
|
550
585
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
551
586
|
this.initKeyboardManager();
|
|
@@ -562,17 +597,14 @@ const SnkGuidesViewer = class {
|
|
|
562
597
|
await this._mainForm.showSearchField();
|
|
563
598
|
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
564
599
|
}
|
|
565
|
-
|
|
566
|
-
var _a, _b;
|
|
600
|
+
renderFormConfig() {
|
|
567
601
|
if (this._formEditorConfigManager != undefined) {
|
|
568
|
-
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 }));
|
|
602
|
+
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() }));
|
|
569
603
|
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
this.
|
|
574
|
-
const showGuides = this._guides && (this._guides.length > 1);
|
|
575
|
-
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 &&
|
|
604
|
+
}
|
|
605
|
+
renderGuidesNavigator(showGuides) {
|
|
606
|
+
var _a, _b;
|
|
607
|
+
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 &&
|
|
576
608
|
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 ?
|
|
577
609
|
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) })
|
|
578
610
|
:
|
|
@@ -588,9 +620,18 @@ const SnkGuidesViewer = class {
|
|
|
588
620
|
fieldsProps: this._fieldsProps
|
|
589
621
|
}), 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 })));
|
|
590
622
|
}
|
|
623
|
+
render() {
|
|
624
|
+
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
this.loadTaskbarProcessor();
|
|
628
|
+
const showGuides = this._guides && (this._guides.length > 1);
|
|
629
|
+
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())));
|
|
630
|
+
}
|
|
591
631
|
get _element() { return getElement(this); }
|
|
592
632
|
static get watchers() { return {
|
|
593
633
|
"dataUnit": ["observeDataUnit"],
|
|
634
|
+
"_formEditorConfigManager": ["observeFormConfigManager"],
|
|
594
635
|
"dataState": ["observeDataState"],
|
|
595
636
|
"masterFormConfig": ["observeMasterFormConfig"]
|
|
596
637
|
}; }
|
|
@@ -601,6 +642,11 @@ var TASKBAR_ID;
|
|
|
601
642
|
TASKBAR_ID["MUTIPLE_EDITION"] = "snkGuideViewer.multiple_edition";
|
|
602
643
|
TASKBAR_ID["REGULAR"] = "snkGuideViewer.regular";
|
|
603
644
|
})(TASKBAR_ID || (TASKBAR_ID = {}));
|
|
645
|
+
var GUIDES_VIEWER_VIEW_MODE;
|
|
646
|
+
(function (GUIDES_VIEWER_VIEW_MODE) {
|
|
647
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["GUIDES"] = 0] = "GUIDES";
|
|
648
|
+
GUIDES_VIEWER_VIEW_MODE[GUIDES_VIEWER_VIEW_MODE["CONFIG"] = 1] = "CONFIG";
|
|
649
|
+
})(GUIDES_VIEWER_VIEW_MODE || (GUIDES_VIEWER_VIEW_MODE = {}));
|
|
604
650
|
SnkGuidesViewer.style = snkGuidesViewerCss;
|
|
605
651
|
|
|
606
652
|
export { SnkGuidesViewer as S };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-c182d058.js';
|
|
2
2
|
import './index-479e1293.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
7
|
-
import './DataFetcher-
|
|
7
|
+
import './DataFetcher-5780ad39.js';
|
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
|
-
import './ISave-
|
|
10
|
+
import './ISave-8a22ec18.js';
|
|
11
11
|
import './index-b40568ff.js';
|
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
13
|
-
import './dataunit-fetcher-
|
|
13
|
+
import './dataunit-fetcher-c4251d80.js';
|
|
14
14
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
15
15
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
16
16
|
import './ResourceIDUtils-a114189a.js';
|
|
17
17
|
import './filter-item-type.enum-d45e026f.js';
|
|
18
|
-
import './form-config-fetcher-
|
|
18
|
+
import './form-config-fetcher-d0536a71.js';
|
|
19
19
|
import './constants-7b422de0.js';
|
|
20
|
-
import './SnkFormConfigManager-
|
|
21
|
-
import './ConfigStorage-
|
|
20
|
+
import './SnkFormConfigManager-437e98bb.js';
|
|
21
|
+
import './ConfigStorage-bd096633.js';
|
|
22
22
|
import './taskbar-elements-faaf5d8f.js';
|
|
23
23
|
import './index-446f9341.js';
|
|
24
24
|
import './taskbar-processor-3436124c.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-479e1293.js';
|
|
2
2
|
import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-2db38ff2.js';
|
|
4
|
-
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-bd096633.js';
|
|
5
5
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
6
|
import { a as FilterGroupCondition, D as DefaultFilter } from './index-8acbae97.js';
|
|
7
7
|
import { s as store } from './index-446f9341.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
10
|
-
import './DataFetcher-
|
|
9
|
+
import './form-config-fetcher-d0536a71.js';
|
|
10
|
+
import './DataFetcher-5780ad39.js';
|
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
|
12
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
13
13
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-479e1293.js';
|
|
2
2
|
import { ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './ISave-
|
|
4
|
-
import './DataFetcher-
|
|
3
|
+
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './ISave-8a22ec18.js';
|
|
4
|
+
import './DataFetcher-5780ad39.js';
|
|
5
5
|
import './index-b40568ff.js';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
7
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
-
import './dataunit-fetcher-
|
|
8
|
+
import './dataunit-fetcher-c4251d80.js';
|
|
9
9
|
import './filter-item-type.enum-d45e026f.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
10
|
+
import './form-config-fetcher-d0536a71.js';
|
|
11
11
|
import './constants-7b422de0.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
14
14
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
15
15
|
import './ResourceIDUtils-a114189a.js';
|
|
16
16
|
|
|
17
|
-
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:
|
|
17
|
+
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}";
|
|
18
18
|
|
|
19
19
|
const SnkPesquisa = class {
|
|
20
20
|
constructor(hostRef) {
|
|
@@ -48,6 +48,17 @@ const SnkPesquisa = class {
|
|
|
48
48
|
this._textInput.value = this.argument;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
/** * Executa uma pesquisa programaticamente.
|
|
52
|
+
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
|
53
|
+
*
|
|
54
|
+
* @param text Texto utilizado como argumento de pesquisa.
|
|
55
|
+
* @example
|
|
56
|
+
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
|
57
|
+
*/
|
|
58
|
+
async executeSearch(text) {
|
|
59
|
+
this.argument = text;
|
|
60
|
+
this.onChangeValue({ detail: text });
|
|
61
|
+
}
|
|
51
62
|
clearSearch() {
|
|
52
63
|
this.argument = "";
|
|
53
64
|
this._itemList = undefined;
|
|
@@ -3,18 +3,18 @@ import { StringUtils, ApplicationContext, ObjectUtils, Action, DataType, UserInt
|
|
|
3
3
|
import { CSSVarsUtils, buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-7b422de0.js';
|
|
5
5
|
import { T as TaskbarElement } from './taskbar-elements-faaf5d8f.js';
|
|
6
|
-
import './DataFetcher-
|
|
7
|
-
import './ISave-
|
|
8
|
-
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-
|
|
6
|
+
import './DataFetcher-5780ad39.js';
|
|
7
|
+
import './ISave-8a22ec18.js';
|
|
8
|
+
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-42125ef4.js';
|
|
9
9
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
|
-
import { I as InMemoryLoader } from './dataunit-fetcher-
|
|
12
|
+
import { I as InMemoryLoader } from './dataunit-fetcher-c4251d80.js';
|
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
|
14
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
|
14
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-d0536a71.js';
|
|
15
15
|
import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
|
|
16
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
17
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
16
|
+
import { C as ConfigStorage } from './ConfigStorage-bd096633.js';
|
|
17
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-437e98bb.js';
|
|
18
18
|
import { s as store } from './index-446f9341.js';
|
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
|
20
20
|
import './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
@@ -178,11 +178,10 @@ const SnkSimpleCrud = class {
|
|
|
178
178
|
}
|
|
179
179
|
getButtons(selected, extraButtons, removeRefresh) {
|
|
180
180
|
let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
|
|
181
|
-
if (removeRefresh) {
|
|
181
|
+
if (removeRefresh || this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
182
182
|
btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
|
|
183
183
|
}
|
|
184
|
-
return this.addConfigButton(
|
|
185
|
-
.concat(extraButtons));
|
|
184
|
+
return this.addConfigButton(btnList.concat(extraButtons));
|
|
186
185
|
}
|
|
187
186
|
addConfigButton(buttons) {
|
|
188
187
|
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
|
@@ -193,13 +192,6 @@ const SnkSimpleCrud = class {
|
|
|
193
192
|
get application() {
|
|
194
193
|
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
195
194
|
}
|
|
196
|
-
resolveInMemoryBtns(taskbarButtons) {
|
|
197
|
-
const newTaskBarConfig = [...taskbarButtons];
|
|
198
|
-
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
199
|
-
newTaskBarConfig.splice(1, 1);
|
|
200
|
-
}
|
|
201
|
-
return newTaskBarConfig;
|
|
202
|
-
}
|
|
203
195
|
/**
|
|
204
196
|
* @description Usado para alternar a visão entre GRID e FORM externamente.
|
|
205
197
|
* @param {VIEW_MODE} view - A visão para a qual navegar.
|