@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-78242.2 → 0.0.0-bugfix-dev-KB-74246.2
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-f079f5fd.js → ConfigStorage-9b965af9.js} +1 -1
- package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-42636ac1.js} +2 -2
- package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-46e90d8d.js} +8 -6
- package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-a78242d1.js} +1 -1
- package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-91fba2b1.js} +37 -0
- package/dist/cjs/index-f9e81701.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-2ec4811b.js} +3 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +91 -3
- package/dist/cjs/snk-application.cjs.entry.js +4 -4
- package/dist/cjs/snk-attach.cjs.entry.js +11 -7
- package/dist/cjs/snk-config-options_3.cjs.entry.js +3 -3
- package/dist/cjs/snk-crud.cjs.entry.js +3 -3
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -8
- package/dist/cjs/snk-detail-view.cjs.entry.js +5 -5
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid.cjs.entry.js +4 -4
- package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-7d85e2fb.js} +3 -3
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -5
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +18 -25
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +3 -3
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +13 -21
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +179 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -1
- package/dist/components/SnkFormConfigManager.js +6 -4
- package/dist/components/form-config-fetcher.js +37 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/pesquisa-fetcher.js +4 -1
- package/dist/components/snk-attach2.js +20 -34
- package/dist/components/snk-crud.js +61 -55
- package/dist/components/snk-data-exporter2.js +4 -6
- package/dist/components/snk-detail-view2.js +84 -93
- package/dist/components/snk-filter-modal.js +3 -1
- package/dist/components/snk-simple-crud2.js +25 -51
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +119 -0
- package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-ff99377a.js} +1 -1
- package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-071e0b6a.js} +2 -2
- package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-035f2975.js} +8 -6
- package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-0b78ca31.js} +1 -1
- package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-0c2620ef.js} +37 -0
- package/dist/esm/index-a7d3d3f1.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-6bc2e41a.js → pesquisa-fetcher-24e5bba0.js} +4 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +91 -4
- package/dist/esm/snk-application.entry.js +4 -4
- package/dist/esm/snk-attach.entry.js +11 -7
- package/dist/esm/snk-config-options_3.entry.js +3 -3
- package/dist/esm/snk-crud.entry.js +3 -3
- package/dist/esm/snk-data-exporter.entry.js +6 -8
- package/dist/esm/snk-detail-view.entry.js +5 -5
- package/dist/esm/snk-filter-bar_4.entry.js +5 -3
- package/dist/esm/snk-filter-modal-item.entry.js +2 -2
- package/dist/esm/snk-grid.entry.js +4 -4
- package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-2fd50f6b.js} +3 -3
- package/dist/esm/snk-guides-viewer.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +18 -25
- package/dist/sankhyablocks/{p-4138da61.entry.js → p-262583c6.entry.js} +1 -1
- package/dist/sankhyablocks/p-29643bef.entry.js +1 -0
- package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-35882caf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7075b789.entry.js → p-365d8ed4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5d9788b3.entry.js → p-399e1b74.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e97be1c8.js → p-4c5fde50.js} +1 -1
- package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-5136d9f0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1d3ce0d9.entry.js → p-65650e05.entry.js} +1 -1
- package/dist/sankhyablocks/p-70ed0b0f.js +1 -0
- package/dist/sankhyablocks/{p-9ffd9fc7.js → p-763edad2.js} +1 -1
- package/dist/sankhyablocks/p-82274cb0.js +1 -0
- package/dist/sankhyablocks/{p-0387d9d7.entry.js → p-8cf0a9fe.entry.js} +1 -1
- package/dist/sankhyablocks/p-acca8a69.js +26 -0
- package/dist/sankhyablocks/{p-e4391e16.js → p-c271fbf1.js} +1 -1
- package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-c629c07a.entry.js} +1 -1
- package/dist/sankhyablocks/p-e6683406.js +6 -0
- package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-e7067256.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-e9432f45.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3728d2aa.entry.js → p-eda55eef.entry.js} +3 -3
- package/dist/sankhyablocks/p-ff6c8f52.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +2 -3
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +33 -0
- package/dist/types/components.d.ts +38 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
- 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-0e206e62.js +0 -1
- package/dist/sankhyablocks/p-126c58ea.js +0 -26
- package/dist/sankhyablocks/p-341465ce.js +0 -6
- package/dist/sankhyablocks/p-aaf94476.js +0 -1
- package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
- package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
|
@@ -2,19 +2,19 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
|
2
2
|
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ServiceUtils, StorageType, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { D as DataFetcher } from './DataFetcher-5034df59.js';
|
|
4
4
|
import { P as ParamType } from './ParamType-d5152b06.js';
|
|
5
|
-
import './pesquisa-fetcher-
|
|
5
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
6
6
|
import './index-3aa4977a.js';
|
|
7
7
|
import './ISave-d8c8bc59.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './dataunit-fetcher-56cb648b.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
|
-
import './form-config-fetcher-
|
|
12
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-0c2620ef.js';
|
|
13
13
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
14
14
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
15
15
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
16
16
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
|
17
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
17
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
18
18
|
import { O as ORDER_VALUES } from './constants-7302ee87.js';
|
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
|
20
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
@@ -1233,6 +1233,93 @@ const SelectBox = class {
|
|
|
1233
1233
|
};
|
|
1234
1234
|
SelectBox.style = snkSelectBoxCss;
|
|
1235
1235
|
|
|
1236
|
+
const snkSimpleFormConfigCss = ":host{display:block}.config-container{display:flex;flex-direction:column;align-items:center;justify-content:space-between}.config-lists{margin-bottom:12px}.config-actions{display:flex;flex-direction:row;justify-content:flex-end;width:100%;gap:12px}";
|
|
1237
|
+
|
|
1238
|
+
const SnkSimpleFormConfig = class {
|
|
1239
|
+
constructor(hostRef) {
|
|
1240
|
+
registerInstance(this, hostRef);
|
|
1241
|
+
this.snkConfigSaved = createEvent(this, "snkConfigSaved", 7);
|
|
1242
|
+
this._formConfigFetcher = new FormConfigFetcher();
|
|
1243
|
+
this.fieldsToSave = [];
|
|
1244
|
+
this.dataUnit = undefined;
|
|
1245
|
+
this.configName = undefined;
|
|
1246
|
+
this.avaliableFields = [];
|
|
1247
|
+
this.selectedFields = [];
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Responsável por abrir o configurador.
|
|
1251
|
+
*/
|
|
1252
|
+
async show() {
|
|
1253
|
+
await this.initializeFormConfig();
|
|
1254
|
+
this.ezPopupRef.opened = true;
|
|
1255
|
+
}
|
|
1256
|
+
;
|
|
1257
|
+
async initializeFormConfig() {
|
|
1258
|
+
if (!this.configName)
|
|
1259
|
+
return;
|
|
1260
|
+
const allFields = this.getAllVisibleFieldsFromDataUnit();
|
|
1261
|
+
const displayedFieldNameList = await this.getConfig();
|
|
1262
|
+
//Quando não retorna dados, é por quê não existe configuração do usuário salva.
|
|
1263
|
+
if (displayedFieldNameList.length === 0) {
|
|
1264
|
+
this.avaliableFields = [];
|
|
1265
|
+
this.selectedFields = [...allFields];
|
|
1266
|
+
this.fieldsToSave = [...this.selectedFields];
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
const selectedFieldsAux = this.sortDisplayedFields(displayedFieldNameList, allFields);
|
|
1270
|
+
const avaliableFieldsAux = allFields.filter(field => !displayedFieldNameList.includes(field.id));
|
|
1271
|
+
this.avaliableFields = [...avaliableFieldsAux];
|
|
1272
|
+
this.selectedFields = [...selectedFieldsAux];
|
|
1273
|
+
this.fieldsToSave = [...this.selectedFields];
|
|
1274
|
+
}
|
|
1275
|
+
async getConfig() {
|
|
1276
|
+
const fieldList = await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);
|
|
1277
|
+
return [...this.removeDuplicates(fieldList)];
|
|
1278
|
+
}
|
|
1279
|
+
removeDuplicates(strings) {
|
|
1280
|
+
return strings.filter((item, index) => strings.indexOf(item) === index);
|
|
1281
|
+
}
|
|
1282
|
+
sortDisplayedFields(displayedFieldNameList, allFields) {
|
|
1283
|
+
const selectedFieldsAux = [];
|
|
1284
|
+
//É preciso garantir a ordem na qual os campos vieram na resposta do fetchSimpleFormConfig.
|
|
1285
|
+
displayedFieldNameList.forEach(fieldName => {
|
|
1286
|
+
const field = allFields.find(field => field.id === fieldName);
|
|
1287
|
+
if (!field)
|
|
1288
|
+
return;
|
|
1289
|
+
selectedFieldsAux.push(field);
|
|
1290
|
+
});
|
|
1291
|
+
return selectedFieldsAux;
|
|
1292
|
+
}
|
|
1293
|
+
getAllVisibleFieldsFromDataUnit() {
|
|
1294
|
+
var _a, _b, _c;
|
|
1295
|
+
const visibleFields = ((_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields) !== null && _c !== void 0 ? _c : []).filter(field => field.visible);
|
|
1296
|
+
return visibleFields.map(field => {
|
|
1297
|
+
return { id: field.name, label: field.label };
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
close() {
|
|
1301
|
+
this.ezPopupRef.opened = false;
|
|
1302
|
+
}
|
|
1303
|
+
async handleResetConfigs() {
|
|
1304
|
+
await this._formConfigFetcher.restoreFormConfig(this.configName);
|
|
1305
|
+
await this.initializeFormConfig();
|
|
1306
|
+
await this.handleSave();
|
|
1307
|
+
}
|
|
1308
|
+
handleCancel() {
|
|
1309
|
+
this.close();
|
|
1310
|
+
}
|
|
1311
|
+
async handleSave() {
|
|
1312
|
+
const saveList = this.fieldsToSave.map(field => field.id);
|
|
1313
|
+
await this._formConfigFetcher.saveSimpleFormConfig(this.configName, saveList);
|
|
1314
|
+
this.close();
|
|
1315
|
+
this.snkConfigSaved.emit();
|
|
1316
|
+
}
|
|
1317
|
+
render() {
|
|
1318
|
+
return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), h("div", { class: 'config-actions' }, h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
SnkSimpleFormConfig.style = snkSimpleFormConfigCss;
|
|
1322
|
+
|
|
1236
1323
|
const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
|
|
1237
1324
|
|
|
1238
1325
|
const TaskbarActionsButton = class {
|
|
@@ -1364,4 +1451,4 @@ const TaskbarActionsButton = class {
|
|
|
1364
1451
|
};
|
|
1365
1452
|
TaskbarActionsButton.style = taskbarActionsButtonCss;
|
|
1366
1453
|
|
|
1367
|
-
export { SnkActionsButton as snk_actions_button, SnkGridConfig as snk_grid_config, SelectBox as snk_select_box, TaskbarActionsButton as taskbar_actions_button };
|
|
1454
|
+
export { SnkActionsButton as snk_actions_button, SnkGridConfig as snk_grid_config, SelectBox as snk_select_box, SnkSimpleFormConfig as snk_simple_form_config, TaskbarActionsButton as taskbar_actions_button };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-5034df59.js';
|
|
6
|
-
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-
|
|
6
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-0b78ca31.js';
|
|
7
7
|
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-56cb648b.js';
|
|
8
|
-
import { P as PesquisaFetcher } from './pesquisa-fetcher-
|
|
8
|
+
import { P as PesquisaFetcher } from './pesquisa-fetcher-24e5bba0.js';
|
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
10
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
|
3
3
|
import { D as DataFetcher } from './DataFetcher-5034df59.js';
|
|
4
|
-
import './pesquisa-fetcher-
|
|
4
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
5
5
|
import './index-3aa4977a.js';
|
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
|
7
7
|
import { P as PreloadManager, b as buildLoadDataResponse, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-56cb648b.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
10
10
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
11
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
11
|
+
import { A as AutorizationType } from './auth-fetcher-0b78ca31.js';
|
|
12
12
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
13
13
|
import './PrintUtils-3e4ff0f5.js';
|
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -551,14 +551,18 @@ const buildTaskBarManager = () => {
|
|
|
551
551
|
];
|
|
552
552
|
return {
|
|
553
553
|
getButtons: (_, dataState, currentButtons) => {
|
|
554
|
-
|
|
554
|
+
const refreshBtnIndex = currentButtons.indexOf(TaskbarElement.REFRESH);
|
|
555
|
+
if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty)) {
|
|
555
556
|
return currentButtons.reverse();
|
|
556
|
-
|
|
557
|
-
|
|
557
|
+
}
|
|
558
|
+
else if (refreshBtnIndex !== -1) {
|
|
559
|
+
currentButtons.splice(refreshBtnIndex, 1);
|
|
560
|
+
}
|
|
558
561
|
const { selectedRecord } = dataState || {};
|
|
559
562
|
const taskbarTobeAdded = !!(selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.LINK) ? TaskbarAttachButtons.LINK : TaskbarAttachButtons.DOWNLOAD;
|
|
560
563
|
currentButtons.splice(currentButtons.indexOf(TaskbarElement.DIVIDER) + 1, 0, TaskbarElement.REMOVE, taskbarTobeAdded, TaskbarElement.DIVIDER);
|
|
561
|
-
const
|
|
564
|
+
const buttonsToRemove = [TaskbarElement.CLONE, TaskbarElement.DATA_EXPORTER];
|
|
565
|
+
const updatedButtons = Array.from(new Set(currentButtons.filter((button) => !buttonsToRemove.includes(button))));
|
|
562
566
|
updatedButtons.splice(updatedButtons.indexOf(taskbarTobeAdded) + 1, 0, TaskbarElement.DIVIDER);
|
|
563
567
|
return updatedButtons;
|
|
564
568
|
},
|
|
@@ -3,12 +3,12 @@ import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDU
|
|
|
3
3
|
import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode, ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { c as VARS_BY_TYPE, D as DEFAULT_TYPE, d as TAGS_BY_TYPE, C as CONFIG_EVENTS, a as CONFIG_SORTABLE_EVENTS, b as TAB_NAMES, A as ACTION_CONFIG } from './constants-7302ee87.js';
|
|
6
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
6
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-035f2975.js';
|
|
7
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
8
8
|
import { S as Sortable } from './Sortable-83960219.js';
|
|
9
|
-
import { U as UserConfigType } from './form-config-fetcher-
|
|
9
|
+
import { U as UserConfigType } from './form-config-fetcher-0c2620ef.js';
|
|
10
10
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
11
|
-
import './ConfigStorage-
|
|
11
|
+
import './ConfigStorage-ff99377a.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
13
|
import './DataFetcher-5034df59.js';
|
|
14
14
|
import './PrintUtils-3e4ff0f5.js';
|
|
@@ -2,16 +2,16 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
4
4
|
import './DataFetcher-5034df59.js';
|
|
5
|
-
import './pesquisa-fetcher-
|
|
5
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
6
6
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
7
7
|
import './ISave-d8c8bc59.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './dataunit-fetcher-56cb648b.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
|
-
import './form-config-fetcher-
|
|
12
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
13
13
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
14
|
-
import { A as AutorizationType } from './auth-fetcher-
|
|
14
|
+
import { A as AutorizationType } from './auth-fetcher-0b78ca31.js';
|
|
15
15
|
import './index-bdf75557.js';
|
|
16
16
|
import './PrintUtils-3e4ff0f5.js';
|
|
17
17
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
@@ -5,13 +5,13 @@ import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat
|
|
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-7302ee87.js';
|
|
6
6
|
import { D as DataFetcher } from './DataFetcher-5034df59.js';
|
|
7
7
|
import { S as SnkDataUnit } from './snk-data-unit-9fa7d2b9.js';
|
|
8
|
-
import './pesquisa-fetcher-
|
|
8
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
9
9
|
import './ISave-d8c8bc59.js';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
12
|
import './dataunit-fetcher-56cb648b.js';
|
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
|
14
|
-
import './form-config-fetcher-
|
|
14
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import './SnkMessageBuilder-6fff4a4c.js';
|
|
17
17
|
import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
@@ -390,10 +390,10 @@ class ClientSideExporterStrategy {
|
|
|
390
390
|
"GridXLSBuilderSP.buildXLSFromJson",
|
|
391
391
|
responseBody => ({
|
|
392
392
|
fileSessionKey: responseBody.chaveXLS.valor,
|
|
393
|
-
canPrint:
|
|
394
|
-
canExport:
|
|
393
|
+
canPrint: true,
|
|
394
|
+
canExport: true,
|
|
395
|
+
canSendEmail: true,
|
|
395
396
|
useAppPrint: false,
|
|
396
|
-
canSendEmail: false
|
|
397
397
|
})
|
|
398
398
|
];
|
|
399
399
|
}
|
|
@@ -553,7 +553,6 @@ const SnkDataExporter = class {
|
|
|
553
553
|
var _a, _b, _c;
|
|
554
554
|
const optionKey = this.getOptionKey(option);
|
|
555
555
|
const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
|
|
556
|
-
const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
|
|
557
556
|
const params = {
|
|
558
557
|
methodName: DataExporterOption[`EXPORT_TO_${fileType}`],
|
|
559
558
|
fileName: this._appLabel,
|
|
@@ -564,8 +563,7 @@ const SnkDataExporter = class {
|
|
|
564
563
|
};
|
|
565
564
|
await this.resolveExporter(params, (response) => {
|
|
566
565
|
if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
|
|
567
|
-
fileViewer(Object.assign(Object.assign({}, response), { fileType
|
|
568
|
-
isDownload }));
|
|
566
|
+
fileViewer(Object.assign(Object.assign({}, response), { fileType }));
|
|
569
567
|
}
|
|
570
568
|
else {
|
|
571
569
|
ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-035f2975.js';
|
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
5
|
import './DataFetcher-5034df59.js';
|
|
6
|
-
import './pesquisa-fetcher-
|
|
6
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
7
7
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
8
8
|
import './ISave-d8c8bc59.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
11
|
import './dataunit-fetcher-56cb648b.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
14
14
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
15
15
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
16
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-2fd50f6b.js';
|
|
17
17
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
|
18
|
-
import './ConfigStorage-
|
|
18
|
+
import './ConfigStorage-ff99377a.js';
|
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
|
20
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
21
21
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
|
@@ -10,7 +10,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
10
10
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
|
11
11
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
12
12
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
14
14
|
import './DataFetcher-5034df59.js';
|
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
|
16
16
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -1315,7 +1315,9 @@ const SnkFilterModal = class {
|
|
|
1315
1315
|
this.filters = ObjectUtils.copy(filterListCopy);
|
|
1316
1316
|
return;
|
|
1317
1317
|
}
|
|
1318
|
-
this.filters.find(filter => filter.id === filterItem.id)
|
|
1318
|
+
const filter = this.filters.find(filter => filter.id === filterItem.id);
|
|
1319
|
+
filter.value = undefined;
|
|
1320
|
+
this.filters = ObjectUtils.copy(this.filters);
|
|
1319
1321
|
}
|
|
1320
1322
|
uncheckFilterValues(valueList) {
|
|
1321
1323
|
valueList.forEach(value => {
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
6
6
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
|
7
|
-
import './form-config-fetcher-
|
|
7
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
8
8
|
import './DataFetcher-5034df59.js';
|
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
|
|
2
2
|
import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
5
5
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
6
6
|
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-f8b1d91e.js';
|
|
7
7
|
import { s as store } from './index-bdf75557.js';
|
|
8
|
-
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils } from './ContinuousInsertUtils-
|
|
8
|
+
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils } from './ContinuousInsertUtils-071e0b6a.js';
|
|
9
9
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
10
10
|
import './DataFetcher-5034df59.js';
|
|
11
|
-
import './pesquisa-fetcher-
|
|
11
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
12
12
|
import './ISave-d8c8bc59.js';
|
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
15
15
|
import './dataunit-fetcher-56cb648b.js';
|
|
16
16
|
import './filter-item-type.enum-d45e026f.js';
|
|
17
|
-
import './form-config-fetcher-
|
|
17
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
18
18
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
20
20
|
import './PrintUtils-3e4ff0f5.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-a7d3d3f1.js';
|
|
2
2
|
import { Action, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-035f2975.js';
|
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
5
|
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-f8b1d91e.js';
|
|
6
6
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
7
7
|
import { V as VIEW_MODE } from './constants-7302ee87.js';
|
|
8
8
|
import './DataFetcher-5034df59.js';
|
|
9
|
-
import './pesquisa-fetcher-
|
|
9
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
10
10
|
import { P as PresentationMode } from './index-3aa4977a.js';
|
|
11
11
|
import './ISave-d8c8bc59.js';
|
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
14
14
|
import './dataunit-fetcher-56cb648b.js';
|
|
15
15
|
import './filter-item-type.enum-d45e026f.js';
|
|
16
|
-
import './form-config-fetcher-
|
|
16
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
17
17
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
18
18
|
|
|
19
19
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-2fd50f6b.js';
|
|
2
2
|
import './index-a7d3d3f1.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
|
-
import './SnkFormConfigManager-
|
|
5
|
-
import './ConfigStorage-
|
|
6
|
-
import './form-config-fetcher-
|
|
4
|
+
import './SnkFormConfigManager-035f2975.js';
|
|
5
|
+
import './ConfigStorage-ff99377a.js';
|
|
6
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
7
7
|
import './DataFetcher-5034df59.js';
|
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -14,7 +14,7 @@ import './field-search-f8b1d91e.js';
|
|
|
14
14
|
import './taskbar-elements-d59867f1.js';
|
|
15
15
|
import './index-3aa4977a.js';
|
|
16
16
|
import './index-bdf75557.js';
|
|
17
|
-
import './pesquisa-fetcher-
|
|
17
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
18
18
|
import './ISave-d8c8bc59.js';
|
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
20
20
|
import './dataunit-fetcher-56cb648b.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-a7d3d3f1.js';
|
|
2
2
|
import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
|
4
|
-
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
5
5
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
6
|
import { a as FilterGroupCondition } from './index-ae591a44.js';
|
|
7
7
|
import { s as store } from './index-bdf75557.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-0c2620ef.js';
|
|
10
10
|
import './DataFetcher-5034df59.js';
|
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
|
12
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
@@ -4,18 +4,18 @@ import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
4
4
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-7302ee87.js';
|
|
5
5
|
import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
|
|
6
6
|
import './DataFetcher-5034df59.js';
|
|
7
|
-
import './pesquisa-fetcher-
|
|
8
|
-
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils } from './ContinuousInsertUtils-
|
|
7
|
+
import './pesquisa-fetcher-24e5bba0.js';
|
|
8
|
+
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils } from './ContinuousInsertUtils-071e0b6a.js';
|
|
9
9
|
import { D as DataExporterOption, P as PresentationMode } from './index-3aa4977a.js';
|
|
10
10
|
import './ISave-d8c8bc59.js';
|
|
11
11
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
12
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
13
13
|
import { I as InMemoryLoader } from './dataunit-fetcher-56cb648b.js';
|
|
14
14
|
import './filter-item-type.enum-d45e026f.js';
|
|
15
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
|
15
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-0c2620ef.js';
|
|
16
16
|
import { T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch } from './field-search-f8b1d91e.js';
|
|
17
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
18
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
17
|
+
import { C as ConfigStorage } from './ConfigStorage-ff99377a.js';
|
|
18
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-035f2975.js';
|
|
19
19
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
20
20
|
import { s as store } from './index-bdf75557.js';
|
|
21
21
|
import './PrintUtils-3e4ff0f5.js';
|
|
@@ -106,7 +106,6 @@ const SnkSimpleCrud = class {
|
|
|
106
106
|
"snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
|
|
107
107
|
});
|
|
108
108
|
this._showPopUpGridConfig = false;
|
|
109
|
-
this._showFormConfig = false;
|
|
110
109
|
this._currentViewMode = VIEW_MODE.GRID;
|
|
111
110
|
this._config = undefined;
|
|
112
111
|
this._fieldToGetFocus = undefined;
|
|
@@ -327,15 +326,9 @@ const SnkSimpleCrud = class {
|
|
|
327
326
|
});
|
|
328
327
|
}
|
|
329
328
|
async openFormConfig() {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (this.formLegacyConfigName) {
|
|
333
|
-
const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
|
|
334
|
-
const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
|
|
335
|
-
await this.application.alert(title, message);
|
|
336
|
-
return;
|
|
329
|
+
if (this.formLegacyConfigName || this.configName) {
|
|
330
|
+
await this._snkSimpleFormConfig.show();
|
|
337
331
|
}
|
|
338
|
-
this._showFormConfig = true;
|
|
339
332
|
}
|
|
340
333
|
addGridLegacyConfigName() {
|
|
341
334
|
if (this.gridLegacyConfigName && this.configName) {
|
|
@@ -365,7 +358,7 @@ const SnkSimpleCrud = class {
|
|
|
365
358
|
formConfigIsLoaded() {
|
|
366
359
|
return this.formConfig != undefined || this._formConfigAlreadyLoaded;
|
|
367
360
|
}
|
|
368
|
-
async loadFormConfig(forceLoad = false) {
|
|
361
|
+
async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
|
|
369
362
|
if (this.configName === undefined) {
|
|
370
363
|
return;
|
|
371
364
|
}
|
|
@@ -380,7 +373,7 @@ const SnkSimpleCrud = class {
|
|
|
380
373
|
let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
|
|
381
374
|
if (loadedLegacyConfig != undefined) {
|
|
382
375
|
this._formConfigManager.setConfig(loadedLegacyConfig);
|
|
383
|
-
this.setFormConfig(loadedLegacyConfig);
|
|
376
|
+
this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
|
|
384
377
|
return;
|
|
385
378
|
}
|
|
386
379
|
this.setFormConfig(await this._formConfigManager.loadConfig());
|
|
@@ -764,9 +757,6 @@ const SnkSimpleCrud = class {
|
|
|
764
757
|
closeGridConfig() {
|
|
765
758
|
this._showPopUpGridConfig = false;
|
|
766
759
|
}
|
|
767
|
-
closeFormConfig() {
|
|
768
|
-
this._showFormConfig = false;
|
|
769
|
-
}
|
|
770
760
|
getPageSize() {
|
|
771
761
|
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
772
762
|
return 0;
|
|
@@ -776,10 +766,6 @@ const SnkSimpleCrud = class {
|
|
|
776
766
|
}
|
|
777
767
|
return this.pageSize;
|
|
778
768
|
}
|
|
779
|
-
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
|
780
|
-
handleShowFormConfig() {
|
|
781
|
-
return this._showFormConfig && !this.formLegacyConfigName;
|
|
782
|
-
}
|
|
783
769
|
resolveResourceID() {
|
|
784
770
|
return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
|
785
771
|
}
|
|
@@ -792,7 +778,10 @@ const SnkSimpleCrud = class {
|
|
|
792
778
|
return configFromManager;
|
|
793
779
|
}
|
|
794
780
|
updateFormConfig() {
|
|
795
|
-
|
|
781
|
+
let newConfig = this.formConfig;
|
|
782
|
+
if (this.formLegacyConfigName == undefined) {
|
|
783
|
+
newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
|
|
784
|
+
}
|
|
796
785
|
this.setFormConfig(newConfig, true);
|
|
797
786
|
if (this._formConfigManager == undefined) {
|
|
798
787
|
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
|
@@ -820,18 +809,22 @@ const SnkSimpleCrud = class {
|
|
|
820
809
|
description: "Cancela uma ação.", element: this._element
|
|
821
810
|
});
|
|
822
811
|
}
|
|
812
|
+
async handleFormConfigSaved() {
|
|
813
|
+
await this.loadFormConfig(true, true);
|
|
814
|
+
}
|
|
823
815
|
renderTaskbarContent() {
|
|
824
816
|
var _a;
|
|
825
817
|
return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} ez-padding--small`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
|
826
818
|
}
|
|
827
819
|
/* istanbul ignore next */
|
|
828
820
|
render() {
|
|
821
|
+
var _a;
|
|
829
822
|
if (this.dataUnit == undefined) {
|
|
830
823
|
return;
|
|
831
824
|
}
|
|
832
825
|
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
833
826
|
? undefined
|
|
834
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large
|
|
827
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => 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.resolveResourceID() }))));
|
|
835
828
|
}
|
|
836
829
|
get _element() { return getElement(this); }
|
|
837
830
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as snk_guides_viewer}from"./p-
|
|
1
|
+
export{S as snk_guides_viewer}from"./p-4c5fde50.js";import"./p-d2d301a6.js";import"@sankhyalabs/core";import"./p-70ed0b0f.js";import"./p-763edad2.js";import"./p-acca8a69.js";import"./p-00278e07.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-95ce311a.js";import"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-23736d75.js";import"./p-7e7a7473.js";import"./p-30cf616e.js";import"./p-6dc031de.js";import"./p-e6683406.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"./p-47d24ac8.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";
|