@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-83517.0 → 0.0.0-bugfix-dev-KB-87855.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ClientSideExporterProvider-cc82b68a.js → ClientSideExporterProvider-a2753c93.js} +30 -28
- package/dist/cjs/{ConfigStorage-2235f35e.js → ConfigStorage-df09fb78.js} +2 -2
- package/dist/cjs/{DataFetcher-875371e9.js → DataFetcher-1afdb18e.js} +14 -2
- package/dist/cjs/{ISave-62fbb1dd.js → ISave-c76e2c51.js} +27 -3
- package/dist/cjs/{SnkFormConfigManager-6637cd6b.js → SnkFormConfigManager-45a8d7b7.js} +3 -3
- package/dist/cjs/{auth-fetcher-abad589f.js → auth-fetcher-1687ac0a.js} +1 -1
- package/dist/cjs/{constants-241934b3.js → constants-77c1b8bd.js} +1 -0
- package/dist/cjs/{dataunit-fetcher-b95768e8.js → dataunit-fetcher-a723f0dc.js} +12 -8
- package/dist/cjs/{form-config-fetcher-db332748.js → form-config-fetcher-40d3f752.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_7.cjs.entry.js +8 -6
- package/dist/cjs/snk-application.cjs.entry.js +133 -16
- package/dist/cjs/snk-attach.cjs.entry.js +6 -6
- package/dist/cjs/snk-config-options_3.cjs.entry.js +10 -8
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +27 -39
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-33937ffe.js → snk-data-unit-bab0b78a.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- 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-filter-search.cjs.entry.js +18 -5
- package/dist/cjs/snk-grid.cjs.entry.js +7 -7
- package/dist/cjs/{snk-guides-viewer-0e4f3b1a.js → snk-guides-viewer-b9a97db8.js} +6 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -11
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +5 -2
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +107 -0
- package/dist/collection/components/snk-application/snk-application.js +86 -8
- package/dist/collection/components/snk-crud/snk-crud.js +22 -34
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +15 -19
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +18 -5
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +5 -3
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +2 -2
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +2 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +6 -3
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +8 -2
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +14 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +5 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +6 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +26 -2
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/ContinuousInsertUtils.js +25 -23
- package/dist/components/DataFetcher.js +14 -2
- package/dist/components/ISave.js +26 -2
- package/dist/components/constants.js +1 -0
- package/dist/components/dataunit-fetcher.js +11 -7
- package/dist/components/snk-application2.js +130 -10
- package/dist/components/snk-config-options2.js +5 -3
- package/dist/components/snk-crud.js +23 -35
- package/dist/components/snk-filter-search.js +18 -5
- package/dist/components/snk-grid-config2.js +2 -0
- package/dist/components/snk-simple-crud2.js +6 -3
- package/dist/esm/{ClientSideExporterProvider-8191676b.js → ClientSideExporterProvider-b3871edb.js} +30 -28
- package/dist/esm/{ConfigStorage-9bd805d6.js → ConfigStorage-71e6766f.js} +2 -2
- package/dist/esm/{DataFetcher-ecf5f903.js → DataFetcher-88e56266.js} +14 -2
- package/dist/esm/{ISave-7d546dce.js → ISave-5efafc97.js} +27 -3
- package/dist/esm/{SnkFormConfigManager-fbc6a9a8.js → SnkFormConfigManager-be490a33.js} +3 -3
- package/dist/esm/{auth-fetcher-07d33333.js → auth-fetcher-3510520e.js} +1 -1
- package/dist/esm/{constants-75abb876.js → constants-7db1128a.js} +1 -0
- package/dist/esm/{dataunit-fetcher-ed6e65ef.js → dataunit-fetcher-0e025732.js} +12 -8
- package/dist/esm/{form-config-fetcher-ac17cff4.js → form-config-fetcher-fa208a6c.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_7.entry.js +8 -6
- package/dist/esm/snk-application.entry.js +134 -17
- package/dist/esm/snk-attach.entry.js +6 -6
- package/dist/esm/snk-config-options_3.entry.js +10 -8
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +28 -40
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-6258b8ae.js → snk-data-unit-0cb53554.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-field-config.entry.js +1 -1
- 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-filter-search.entry.js +18 -5
- package/dist/esm/snk-grid.entry.js +7 -7
- package/dist/esm/{snk-guides-viewer-80a8709c.js → snk-guides-viewer-83eecbd7.js} +6 -6
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +5 -5
- package/dist/esm/snk-simple-crud.entry.js +14 -11
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/sankhyablocks/{p-13f17dab.js → p-03b68a74.js} +1 -1
- package/dist/sankhyablocks/{p-d1f04e2c.js → p-15784f66.js} +1 -1
- package/dist/sankhyablocks/p-15f67e59.entry.js +11 -0
- package/dist/sankhyablocks/{p-340e2447.entry.js → p-165cde3b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-abd9681c.js → p-18c460f2.js} +1 -1
- package/dist/sankhyablocks/{p-2746d606.entry.js → p-1bdc7355.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c7c6eab7.entry.js → p-33e99371.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2953c481.entry.js → p-3749dffb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-950e3cbe.entry.js → p-475df998.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0bcd4757.entry.js → p-490b75b5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f467153c.entry.js → p-5ffa0493.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5fea0816.entry.js → p-60137b7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-01512409.js → p-601b252b.js} +1 -1
- package/dist/sankhyablocks/p-6a0c8ce0.entry.js +1 -0
- package/dist/sankhyablocks/p-6dd38d7b.js +6 -0
- package/dist/sankhyablocks/{p-48729c8c.js → p-73285a8a.js} +1 -1
- package/dist/sankhyablocks/p-7993b2e3.js +60 -0
- package/dist/sankhyablocks/p-841d3c3e.entry.js +1 -0
- package/dist/sankhyablocks/p-885802c3.js +1 -0
- package/dist/sankhyablocks/{p-3a36d4b3.entry.js → p-90684a75.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1d19a5b0.js → p-9261d8a0.js} +1 -1
- package/dist/sankhyablocks/{p-dc617b0c.entry.js → p-9a7f7ca3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f861bfcb.entry.js → p-9b4c5dae.entry.js} +1 -1
- package/dist/sankhyablocks/p-b6200d32.entry.js +1 -0
- package/dist/sankhyablocks/{p-23cd6abf.entry.js → p-c0eb761b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-02c6dc9f.entry.js → p-d31a701e.entry.js} +1 -1
- package/dist/sankhyablocks/p-d4752c92.entry.js +1 -0
- package/dist/sankhyablocks/{p-d2065bb4.entry.js → p-dc6ad9a6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cb9d725a.js → p-ebdb9d89.js} +1 -1
- package/dist/sankhyablocks/p-edd2f941.entry.js +1 -0
- package/dist/sankhyablocks/{p-5a7e18f4.js → p-fbba7e3d.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +7 -2
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +5 -3
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +1 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
- package/dist/types/components.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +4 -1
- package/dist/types/lib/utils/constants.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-07afb345.entry.js +0 -1
- package/dist/sankhyablocks/p-108fee57.js +0 -6
- package/dist/sankhyablocks/p-35fcf37e.js +0 -1
- package/dist/sankhyablocks/p-513af002.entry.js +0 -1
- package/dist/sankhyablocks/p-7e0a0aae.js +0 -60
- package/dist/sankhyablocks/p-9907cf67.entry.js +0 -1
- package/dist/sankhyablocks/p-c5acb7ba.entry.js +0 -11
- package/dist/sankhyablocks/p-c8622597.entry.js +0 -1
- package/dist/sankhyablocks/p-e5d8891d.entry.js +0 -1
|
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-1afdb18e.js');
|
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
|
9
|
-
require('./ISave-
|
|
9
|
+
require('./ISave-c76e2c51.js');
|
|
10
10
|
require('./index-e3e39724.js');
|
|
11
11
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
-
require('./dataunit-fetcher-
|
|
13
|
+
require('./dataunit-fetcher-a723f0dc.js');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
16
|
-
const constants = require('./constants-
|
|
15
|
+
const formConfigFetcher = require('./form-config-fetcher-40d3f752.js');
|
|
16
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
17
17
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
18
18
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
19
19
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
20
20
|
const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
|
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
21
|
+
const ConfigStorage = require('./ConfigStorage-df09fb78.js');
|
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
24
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -985,6 +985,7 @@ const SnkGridConfig = class {
|
|
|
985
985
|
delete _newColumnConfig.ascending;
|
|
986
986
|
_newColumnConfig.orderIndex = 0;
|
|
987
987
|
}
|
|
988
|
+
_newColumnConfig.configVersion = SnkGridConfig.CURRENT_CONFIG_VERSION;
|
|
988
989
|
_newColumnConfigList.push(_newColumnConfig);
|
|
989
990
|
}
|
|
990
991
|
});
|
|
@@ -1217,6 +1218,7 @@ const SnkGridConfig = class {
|
|
|
1217
1218
|
static get assetsDirs() { return ["../assets"]; }
|
|
1218
1219
|
get _element() { return index.getElement(this); }
|
|
1219
1220
|
};
|
|
1221
|
+
SnkGridConfig.CURRENT_CONFIG_VERSION = 1;
|
|
1220
1222
|
SnkGridConfig.style = snkGridConfigCss;
|
|
1221
1223
|
|
|
1222
1224
|
const snkLayoutFormConfigCss = ".sc-snk-layout-form-config-h{display:block}";
|
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
-
const DataFetcher = require('./DataFetcher-
|
|
10
|
-
const authFetcher = require('./auth-fetcher-
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
12
|
-
const ISave = require('./ISave-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-df09fb78.js');
|
|
9
|
+
const DataFetcher = require('./DataFetcher-1afdb18e.js');
|
|
10
|
+
const authFetcher = require('./auth-fetcher-1687ac0a.js');
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-a723f0dc.js');
|
|
12
|
+
const ISave = require('./ISave-c76e2c51.js');
|
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
14
|
-
const constants = require('./constants-
|
|
14
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
15
15
|
require('./index-e3e39724.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
17
|
+
const formConfigFetcher = require('./form-config-fetcher-40d3f752.js');
|
|
18
18
|
require('./PrintUtils-bcaeb82f.js');
|
|
19
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
20
20
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -267,7 +267,10 @@ class SnkErrorHandler {
|
|
|
267
267
|
if (exception.errorCode) {
|
|
268
268
|
exception.message += this.buildErrorCodeHTML(exception.errorCode);
|
|
269
269
|
}
|
|
270
|
-
if (exception instanceof core.
|
|
270
|
+
if (exception instanceof core.SilentException) {
|
|
271
|
+
console.warn("SilentException ignorada", exception);
|
|
272
|
+
}
|
|
273
|
+
else if (exception instanceof core.WaitingChangeException) {
|
|
271
274
|
this._app.alert(exception.title, exception.message);
|
|
272
275
|
}
|
|
273
276
|
else if (exception instanceof core.WarningException) {
|
|
@@ -387,6 +390,110 @@ class RequestListenerFactory {
|
|
|
387
390
|
}
|
|
388
391
|
}
|
|
389
392
|
|
|
393
|
+
const QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH = 6;
|
|
394
|
+
const INVALID_CONTENT_PATTERNS = ['<img', '<svg'];
|
|
395
|
+
const executePreparedSearchPlus = async (mode, argument, options, app, pesquisaFetcher) => {
|
|
396
|
+
var _a;
|
|
397
|
+
const mdByName = {};
|
|
398
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
|
399
|
+
if (mode === "ADVANCED") {
|
|
400
|
+
return new Promise((accept, reject) => {
|
|
401
|
+
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
402
|
+
pesquisaContent[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
403
|
+
pesquisaContent.entityName = entity;
|
|
404
|
+
pesquisaContent.argument = argument;
|
|
405
|
+
pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
406
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
407
|
+
if (isHierarchyEntity) {
|
|
408
|
+
pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
409
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
410
|
+
}
|
|
411
|
+
pesquisaContent.selectItem = (option) => {
|
|
412
|
+
accept(option);
|
|
413
|
+
app.clearPopUpTitle();
|
|
414
|
+
app.closePopUp();
|
|
415
|
+
};
|
|
416
|
+
app.setPopUpTitle(entityDescription);
|
|
417
|
+
app.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
else if (mode === "LOAD_DESCRIPTION") {
|
|
421
|
+
let result = await pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
|
|
422
|
+
result = core.ObjectUtils.stringToObject(result.json.$);
|
|
423
|
+
let descriptionField = result.descriptionField;
|
|
424
|
+
const option = (_a = result.data) === null || _a === void 0 ? void 0 : _a[0];
|
|
425
|
+
if (!option) {
|
|
426
|
+
return {
|
|
427
|
+
value: argument,
|
|
428
|
+
label: ""
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
return {
|
|
432
|
+
value: argument,
|
|
433
|
+
label: option[descriptionField]
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
let codeValue;
|
|
438
|
+
let result = await pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions, codeValue);
|
|
439
|
+
result = core.ObjectUtils.stringToObject(result.json.$);
|
|
440
|
+
let descriptionField = result.descriptionField;
|
|
441
|
+
let pkField = result.pkField;
|
|
442
|
+
const list = result.data.map((item) => {
|
|
443
|
+
let fieldsMetadata = filterInvalidFields(result, item, mdByName);
|
|
444
|
+
let fields = filterMathFields(item['__matchFields'], fieldsMetadata, QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH, mdByName);
|
|
445
|
+
return buildOptionItem(argument, item, fields, descriptionField, pkField);
|
|
446
|
+
});
|
|
447
|
+
return list;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
const buildOptionItem = (argument, item, fields, descriptionField, pkField) => {
|
|
451
|
+
var _a;
|
|
452
|
+
const matchFields = item['__matchFields'];
|
|
453
|
+
const descriptionValue = (_a = item[descriptionField]) !== null && _a !== void 0 ? _a : "";
|
|
454
|
+
const pkValue = item[pkField];
|
|
455
|
+
let searchOption = {
|
|
456
|
+
value: pkValue,
|
|
457
|
+
label: descriptionValue,
|
|
458
|
+
presentationValue: core.StringUtils.highlightValue(argument, matchFields, pkValue, fields, true),
|
|
459
|
+
presentationLabel: descriptionField ? core.StringUtils.highlightValue(argument, matchFields, descriptionValue, fields, true) : "",
|
|
460
|
+
details: core.SearchUtils.buildDetails(argument, fields, item)
|
|
461
|
+
};
|
|
462
|
+
return searchOption;
|
|
463
|
+
};
|
|
464
|
+
const filterInvalidFields = (resp, item, mdByName) => {
|
|
465
|
+
let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
|
|
466
|
+
let accept = !core.StringUtils.isEmpty(item[field.fieldName]) &&
|
|
467
|
+
field.visible !== false &&
|
|
468
|
+
field.type !== 'B' &&
|
|
469
|
+
resp.pkField !== field.fieldName &&
|
|
470
|
+
resp.descriptionField !== field.fieldName &&
|
|
471
|
+
(field.isPrimaryKey || !field.isLinkField) &&
|
|
472
|
+
!(field.type === 'S' && field.presentationType === 'H');
|
|
473
|
+
if (accept) {
|
|
474
|
+
mdByName[field.fieldName] = field;
|
|
475
|
+
}
|
|
476
|
+
//Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
|
|
477
|
+
if (typeof item[field.fieldName] === 'string' && INVALID_CONTENT_PATTERNS.some(pattern => item[field.fieldName].includes(pattern))) {
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
return accept;
|
|
481
|
+
});
|
|
482
|
+
return fieldsMetadata;
|
|
483
|
+
};
|
|
484
|
+
const filterMathFields = (matchFields, fields, qtyFields, mdByName) => {
|
|
485
|
+
if (matchFields && Array.isArray(matchFields)) {
|
|
486
|
+
matchFields.forEach((matchField) => {
|
|
487
|
+
let fieldMD = core.ArrayUtils.removeReference(fields, mdByName[matchField]);
|
|
488
|
+
if (fieldMD) {
|
|
489
|
+
fields.unshift(fieldMD);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
fields = fields.slice(0, qtyFields);
|
|
494
|
+
return fields;
|
|
495
|
+
};
|
|
496
|
+
|
|
390
497
|
class LayoutFormConfig {
|
|
391
498
|
constructor() {
|
|
392
499
|
this._config = null;
|
|
@@ -1046,7 +1153,7 @@ const SnkApplication = class {
|
|
|
1046
1153
|
searchOptions,
|
|
1047
1154
|
allowsNonAnalytic
|
|
1048
1155
|
};
|
|
1049
|
-
return this.executePreparedSearch(mode, argument, options);
|
|
1156
|
+
return (ctxOptions === null || ctxOptions === void 0 ? void 0 : ctxOptions.useSearchPlus) ? this.executePreparedSearchPlus(mode, argument, options) : this.executePreparedSearch(mode, argument, options);
|
|
1050
1157
|
}
|
|
1051
1158
|
}
|
|
1052
1159
|
filterInvalidFields(resp, item, mdByName) {
|
|
@@ -1090,13 +1197,23 @@ const SnkApplication = class {
|
|
|
1090
1197
|
};
|
|
1091
1198
|
return exibitionItem;
|
|
1092
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Realiza a pesquisa de registros
|
|
1202
|
+
* Ex.: snk-config-options
|
|
1203
|
+
*/
|
|
1204
|
+
async executePreparedSearchPlus(mode, argument, options) {
|
|
1205
|
+
return await this.executePreparedSearch(mode, argument, Object.assign(Object.assign({}, options), { useSearchPlus: true }));
|
|
1206
|
+
}
|
|
1093
1207
|
/**
|
|
1094
1208
|
* Obtém as opções em componentes de pesquisa
|
|
1095
1209
|
* Ex.: snk-config-options
|
|
1096
1210
|
*/
|
|
1097
1211
|
async executePreparedSearch(mode, argument, options) {
|
|
1098
1212
|
const mdByName = {};
|
|
1099
|
-
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic } = options;
|
|
1213
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, useSearchPlus } = options;
|
|
1214
|
+
if (useSearchPlus) {
|
|
1215
|
+
return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
|
|
1216
|
+
}
|
|
1100
1217
|
if (mode === "ADVANCED") {
|
|
1101
1218
|
return new Promise((accept, reject) => {
|
|
1102
1219
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
@@ -1246,10 +1363,10 @@ const SnkApplication = class {
|
|
|
1246
1363
|
});
|
|
1247
1364
|
}
|
|
1248
1365
|
}
|
|
1249
|
-
clearPopUpTitle() {
|
|
1366
|
+
async clearPopUpTitle() {
|
|
1250
1367
|
this._popUp.ezTitle = "";
|
|
1251
1368
|
}
|
|
1252
|
-
setPopUpTitle(title) {
|
|
1369
|
+
async setPopUpTitle(title) {
|
|
1253
1370
|
this._popUp.ezTitle = title;
|
|
1254
1371
|
}
|
|
1255
1372
|
async pkChangeListener() {
|
|
@@ -1419,6 +1536,9 @@ const SnkApplication = class {
|
|
|
1419
1536
|
core.ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
|
1420
1537
|
return this.executeSearch(searchArgument, fieldName, dataUnit, ctxOptions);
|
|
1421
1538
|
});
|
|
1539
|
+
core.ApplicationContext.setContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__", (searchArgument, fieldName, dataUnit, ctxOptions) => {
|
|
1540
|
+
return this.executeSearch(searchArgument, fieldName, dataUnit, Object.assign(Object.assign({}, ctxOptions), { useSearchPlus: true }));
|
|
1541
|
+
});
|
|
1422
1542
|
core.ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
|
1423
1543
|
this.registerPkChangeListener();
|
|
1424
1544
|
core.ErrorTracking.init();
|
|
@@ -1545,10 +1665,7 @@ const SnkApplication = class {
|
|
|
1545
1665
|
.bind("F1", Workspace.openHelp.bind(this), { description: "Abrir ajuda" });
|
|
1546
1666
|
}
|
|
1547
1667
|
removeShortcuts() {
|
|
1548
|
-
this._keyboardManager
|
|
1549
|
-
.unbind("ctrl + g")
|
|
1550
|
-
.unbind("ctrl + d")
|
|
1551
|
-
.unbind("F1");
|
|
1668
|
+
this._keyboardManager.unbindAllShortcutKeys();
|
|
1552
1669
|
}
|
|
1553
1670
|
renderLoadingSkeleton() {
|
|
1554
1671
|
if (!this.enableLockManagerLoadingApp)
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
|
8
|
-
const ISave = require('./ISave-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-1afdb18e.js');
|
|
8
|
+
const ISave = require('./ISave-c76e2c51.js');
|
|
9
9
|
require('./index-e3e39724.js');
|
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-a723f0dc.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
|
-
require('./form-config-fetcher-
|
|
13
|
-
const constants = require('./constants-
|
|
14
|
-
const authFetcher = require('./auth-fetcher-
|
|
12
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
13
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
14
|
+
const authFetcher = require('./auth-fetcher-1687ac0a.js');
|
|
15
15
|
const taskbarElements = require('./taskbar-elements-7e19882d.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -6,15 +6,15 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const constants = require('./constants-
|
|
10
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
9
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
10
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-45a8d7b7.js');
|
|
11
11
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
12
12
|
const Sortable = require('./Sortable-fb1c4cbb.js');
|
|
13
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
13
|
+
const formConfigFetcher = require('./form-config-fetcher-40d3f752.js');
|
|
14
14
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
15
|
-
require('./ConfigStorage-
|
|
15
|
+
require('./ConfigStorage-df09fb78.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./DataFetcher-
|
|
17
|
+
require('./DataFetcher-1afdb18e.js');
|
|
18
18
|
require('./PrintUtils-bcaeb82f.js');
|
|
19
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
20
20
|
|
|
@@ -155,11 +155,13 @@ const SnkConfigOptions = class {
|
|
|
155
155
|
return index.h(TagName, Object.assign({ value: value, enabled: enabled, label: label, "data-field-name": name, key: name, onEzChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail) }, (this.getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode))));
|
|
156
156
|
}
|
|
157
157
|
getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode) {
|
|
158
|
+
const useSearchPlus = userInterface == core.UserInterface.SEARCHPLUS;
|
|
158
159
|
switch (userInterface) {
|
|
159
160
|
case core.UserInterface.SEARCH:
|
|
161
|
+
case core.UserInterface.SEARCHPLUS:
|
|
160
162
|
return {
|
|
161
163
|
suppressEmptyOption: required,
|
|
162
|
-
optionLoader: (searchArgument) => this.onSearch(searchArgument)
|
|
164
|
+
optionLoader: (searchArgument) => this.onSearch(searchArgument, { useSearchPlus })
|
|
163
165
|
};
|
|
164
166
|
case core.UserInterface.OPTIONSELECTOR:
|
|
165
167
|
return {
|
|
@@ -192,9 +194,9 @@ const SnkConfigOptions = class {
|
|
|
192
194
|
this.fieldConfig.defaultValue.value = this.getValidatedValue(fieldValue);
|
|
193
195
|
this.configOptionsChanged.emit(this.fieldConfig);
|
|
194
196
|
}
|
|
195
|
-
onSearch(searchArgument) {
|
|
197
|
+
onSearch(searchArgument, ctxOptions) {
|
|
196
198
|
if (this._application != undefined && this.fieldConfig != undefined) {
|
|
197
|
-
return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit);
|
|
199
|
+
return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit, ctxOptions);
|
|
198
200
|
}
|
|
199
201
|
}
|
|
200
202
|
buildField(descriptor, config) {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const constants = require('./constants-
|
|
7
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
9
|
|
|
10
10
|
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--small, 6px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:column;gap:var(--space--small);margin-top:var(--space--small);margin-bottom:var(--space--large)}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;margin:var(--space--medium) 0;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}";
|
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-7e19882d.js');
|
|
8
|
-
require('./DataFetcher-
|
|
9
|
-
require('./ISave-
|
|
8
|
+
require('./DataFetcher-1afdb18e.js');
|
|
9
|
+
require('./ISave-c76e2c51.js');
|
|
10
10
|
const index$1 = require('./index-e3e39724.js');
|
|
11
11
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
12
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
13
|
-
require('./dataunit-fetcher-
|
|
13
|
+
require('./dataunit-fetcher-a723f0dc.js');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
15
|
-
require('./form-config-fetcher-
|
|
16
|
-
const constants = require('./constants-
|
|
17
|
-
const authFetcher = require('./auth-fetcher-
|
|
15
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
16
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
17
|
+
const authFetcher = require('./auth-fetcher-1687ac0a.js');
|
|
18
18
|
require('./index-102ba62d.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -289,29 +289,28 @@ const SnkCrud = class {
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
async initKeyboardManager() {
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
element.setFocus();
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
if (!isDocumentBody)
|
|
307
|
-
element.focus();
|
|
292
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element });
|
|
293
|
+
const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
|
|
294
|
+
async function saveDataUnitHandlingFocus() {
|
|
295
|
+
const element = document.activeElement;
|
|
296
|
+
const isDocumentBody = (element == document.body);
|
|
297
|
+
if (!isDocumentBody)
|
|
298
|
+
element.blur();
|
|
299
|
+
await dataUnit.saveData();
|
|
300
|
+
if (!isDocumentBody && element.setFocus != undefined) {
|
|
301
|
+
element.setFocus();
|
|
302
|
+
return;
|
|
308
303
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
304
|
+
if (!isDocumentBody)
|
|
305
|
+
element.focus();
|
|
306
|
+
}
|
|
307
|
+
async function handleAddRecord() {
|
|
308
|
+
if (!dataUnit.hasNewRecord()) {
|
|
309
|
+
dataUnit.addRecord();
|
|
313
310
|
}
|
|
314
|
-
|
|
311
|
+
}
|
|
312
|
+
if (this._keyboardManager) {
|
|
313
|
+
this._keyboardManager
|
|
315
314
|
.bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
|
|
316
315
|
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
|
317
316
|
.bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
|
@@ -336,18 +335,7 @@ const SnkCrud = class {
|
|
|
336
335
|
}
|
|
337
336
|
async removeShortcuts() {
|
|
338
337
|
var _a;
|
|
339
|
-
|
|
340
|
-
if (keyboardManager) {
|
|
341
|
-
keyboardManager
|
|
342
|
-
.unbind("F6")
|
|
343
|
-
.unbind("F7")
|
|
344
|
-
.unbind("ctrl + \\")
|
|
345
|
-
.unbind("F8")
|
|
346
|
-
.unbind("F9")
|
|
347
|
-
.unbind("ctrl + F9")
|
|
348
|
-
.unbind("F5")
|
|
349
|
-
.unbind("Escape");
|
|
350
|
-
}
|
|
338
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
351
339
|
}
|
|
352
340
|
async toggleView() {
|
|
353
341
|
const currentView = await this._viewStack.getSelectedIndex();
|
|
@@ -7,15 +7,15 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
|
|
9
9
|
const index = require('./index-e3e39724.js');
|
|
10
|
-
const constants = require('./constants-
|
|
11
|
-
const DataFetcher = require('./DataFetcher-
|
|
12
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
13
|
-
require('./ISave-
|
|
10
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
11
|
+
const DataFetcher = require('./DataFetcher-1afdb18e.js');
|
|
12
|
+
const snkDataUnit = require('./snk-data-unit-bab0b78a.js');
|
|
13
|
+
require('./ISave-c76e2c51.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-a723f0dc.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('./SnkMessageBuilder-bae64d0d.js');
|
|
21
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
@@ -4,7 +4,7 @@ const index = require('./index-f9e81701.js');
|
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
6
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-a723f0dc.js');
|
|
8
8
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
9
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
10
10
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
5
|
+
const snkDataUnit = require('./snk-data-unit-bab0b78a.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
require('./SnkMessageBuilder-bae64d0d.js');
|
|
10
|
-
require('./dataunit-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
10
|
+
require('./dataunit-fetcher-a723f0dc.js');
|
|
11
|
+
require('./DataFetcher-1afdb18e.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-45a8d7b7.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./ISave-
|
|
9
|
+
require('./DataFetcher-1afdb18e.js');
|
|
10
|
+
require('./ISave-c76e2c51.js');
|
|
11
11
|
const index$1 = require('./index-e3e39724.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-a723f0dc.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
require('./form-config-fetcher-
|
|
17
|
-
const constants = require('./constants-
|
|
16
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
17
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-7e19882d.js');
|
|
19
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
19
|
+
const snkGuidesViewer = require('./snk-guides-viewer-b9a97db8.js');
|
|
20
20
|
const SnkMessageBuilder = require('./SnkMessageBuilder-bae64d0d.js');
|
|
21
|
-
require('./ConfigStorage-
|
|
21
|
+
require('./ConfigStorage-df09fb78.js');
|
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
24
24
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const constants = require('./constants-
|
|
7
|
+
const constants = require('./constants-77c1b8bd.js');
|
|
8
8
|
|
|
9
9
|
const snkFieldConfigCss = ".sc-snk-field-config-h{--snk-field-config--height:42px;--snk-field-config--width:100%;--snk-field-config__icon--width:48px;--snk-field-config-slim--height:32px;--snk-field-config--border-radius:var(--border--radius-medium, 12px);--snk-field-config--font-size:var(--text--medium, 14px);--snk-field-config--font-family:var(--font-pattern, Arial);--snk-field-config--font-weight:var(--text-weight--medium, 400);--snk-field-config--color:var(--title--primary, #000);--snk-field-config--padding-left:var(--space--medium, 6px);--snk-field-config__input--background-color:var(--background--medium, #e0e0e0);--snk-field-config__input--border:var(--border--medium, 2px solid);--snk-field-config__input--border-color:var(--background--xlight, #fff);--snk-field-config__required--color:var(--color--error, #FF0000);--snk-field-config__label--gap:var(--space--extra-small, 3px);--snk-field-config__transition--visibility:var(--transition, 0.2s linear);--snk-field-config__transition--opacity:var(--transition, 0.15s linear);--snk-field-config__config-popover--z-index:var(--more-visible, 2);--snk-field-config__config-outer-arrow--background-color:var(--color--secondary-200, #D2D3DA);--snk-field-config__draggable--padding-right:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--snk-field-config--width)}.field-config.sc-snk-field-config{width:100%;box-sizing:border-box;display:flex;align-items:center;padding-left:var(--snk-field-config--padding-left);font-weight:var(--snk-field-config--font-weight);height:var(--snk-field-config--height);border-radius:var(--snk-field-config--border-radius);font-family:var(--snk-field-config--font-family);font-size:var(--snk-field-config--font-size);border:var(--snk-field-config__input--border);border-color:var(--snk-field-config__input--border-color);background-color:var(--snk-field-config__input--background-color);color:var(--snk-field-config--color)}.field-config__config-popover.sc-snk-field-config{width:40px;margin-left:auto;z-index:var(--snk-field-config__config-popover--z-index)}.field-config__label.sc-snk-field-config{display:flex;flex-direction:row-reverse;line-height:calc(var(--snk-field-config--font-size) + 2px);gap:var(--snk-field-config__label--gap)}.field-config__label-text.sc-snk-field-config{overflow:hidden;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box;-o-text-overflow:ellipsis;text-overflow:ellipsis;word-break:break-word}.field-config__label-required.sc-snk-field-config{color:var(--snk-field-config__required--color)}.field-config__add.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options--is-active.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config__remove-icon.sc-snk-field-config{margin-right:-15px}.field-config.sc-snk-field-config:hover .field-config__options.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config.sc-snk-field-config:hover .field-config__add.sc-snk-field-config{visibility:visible;opacity:1}.field-config__draggable.sc-snk-field-config{padding-right:var(--snk-field-config__draggable--padding-right)}.field-config__config-outer-arrow.sc-snk-field-config{clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px;padding-top:3px;border-bottom:1px solid #FFFFFF;background-color:var(--snk-field-config__config-outer-arrow--background-color)}.field-config__config-inner-arrow.sc-snk-field-config{background-color:#FFFFFF;clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px}.ez-box__container.sc-snk-field-config ez-collapsible-box.sc-snk-field-config{--snk-collapsible-box__header--padding-left:6px}ez-icon.sc-snk-field-config{--snk-icon--color:var(--snk-field-config--color)}ez-popover.sc-snk-field-config{--snk-popover__box--background-color:transparent;--snk-popover__box--box-shadow:none}.field-config__options.sc-snk-field-config ez-button.sc-snk-field-config{--snk-button--background-color:transparent;--snk-button--focus--border:none;--snk-button--focus--box-shadow:none}@media screen and (min-width: 1200px){.field-config__label.sc-snk-field-config{flex-direction:row}}";
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$1 = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-df09fb78.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
11
|
const index = require('./index-c5771aba.js');
|
|
@@ -14,8 +14,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
14
14
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
15
15
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
16
16
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
18
|
-
require('./DataFetcher-
|
|
17
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
18
|
+
require('./DataFetcher-1afdb18e.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
21
21
|
|
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-df09fb78.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-40d3f752.js');
|
|
12
|
+
require('./DataFetcher-1afdb18e.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -10,14 +10,20 @@ const SnkFilterSearch = class {
|
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
13
|
+
this._isSearchPlus = false;
|
|
13
14
|
this.config = undefined;
|
|
14
15
|
this.value = undefined;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Emitido quando acontece a alteração de valor do componente snk-filter-search
|
|
18
19
|
*/
|
|
19
|
-
ezChangeListener(_evt) {
|
|
20
|
-
this.
|
|
20
|
+
async ezChangeListener(_evt) {
|
|
21
|
+
if (this._isSearchPlus) {
|
|
22
|
+
this.value = await this._searchInput.getValueAsync();
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.value = this._searchInput.value;
|
|
26
|
+
}
|
|
21
27
|
this.valueChanged.emit(this.value);
|
|
22
28
|
}
|
|
23
29
|
componentDidLoad() {
|
|
@@ -25,10 +31,11 @@ const SnkFilterSearch = class {
|
|
|
25
31
|
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
|
-
doSearch(mode, argument) {
|
|
34
|
+
doSearch(mode, argument, isSearchPlus = false) {
|
|
29
35
|
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
36
|
+
const loader = isSearchPlus ? application.executePreparedSearchPlus : application.executePreparedSearch;
|
|
30
37
|
return new Promise((resolve, reject) => {
|
|
31
|
-
|
|
38
|
+
loader.bind(application)(mode, argument, this.config.props.searchContext)
|
|
32
39
|
.then(result => {
|
|
33
40
|
resolve(result);
|
|
34
41
|
}).catch(reason => {
|
|
@@ -42,11 +49,17 @@ const SnkFilterSearch = class {
|
|
|
42
49
|
async show() {
|
|
43
50
|
this._searchInput.setFocus();
|
|
44
51
|
}
|
|
52
|
+
getInputItem() {
|
|
53
|
+
var _a;
|
|
54
|
+
this._isSearchPlus = ((_a = this.config.props) === null || _a === void 0 ? void 0 : _a["useSearchPlus"]) == true;
|
|
55
|
+
const TagName = this._isSearchPlus ? "ez-search-plus" : "ez-search";
|
|
56
|
+
return (index.h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus) }));
|
|
57
|
+
}
|
|
45
58
|
render() {
|
|
46
59
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.SEARCH) {
|
|
47
60
|
return undefined;
|
|
48
61
|
}
|
|
49
|
-
return
|
|
62
|
+
return this.getInputItem();
|
|
50
63
|
}
|
|
51
64
|
get _element() { return index.getElement(this); }
|
|
52
65
|
};
|