@sankhyalabs/sankhyablocks 10.1.0-dev.24 → 10.1.0-dev.26
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-f61eedd2.js → ConfigStorage-d9d24844.js} +2 -2
- package/dist/cjs/{DataFetcher-0c830777.js → DataFetcher-3a8ea521.js} +1 -1
- package/dist/cjs/{ISave-e1e8ec96.js → ISave-a66bb65e.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-421f3581.js → SnkFormConfigManager-c88cf1e9.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-32950342.js → SnkMessageBuilder-d9558dba.js} +32 -8
- package/dist/cjs/{SnkMultiSelectionListDataSource-d30a96ef.js → SnkMultiSelectionListDataSource-a891430e.js} +4 -4
- package/dist/cjs/{auth-fetcher-761d54c4.js → auth-fetcher-faa61f64.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-86e286bb.js → dataunit-fetcher-4320f7ec.js} +2 -2
- package/dist/cjs/{form-config-fetcher-227b2db2.js → form-config-fetcher-72cf0e3d.js} +1 -1
- package/dist/cjs/index-1894343a.js +6 -2
- 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_9.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +7 -57
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +6 -6
- package/dist/cjs/snk-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-c06263da.js → snk-data-unit-b54fdf9a.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +12 -9
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +4 -4
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
- package/dist/cjs/snk-form-view.cjs.entry.js +17 -6
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +10 -8
- package/dist/cjs/{snk-guides-viewer-92dadfa6.js → snk-guides-viewer-c252149f.js} +8 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-image-input.cjs.entry.js +1 -1
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +72 -0
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +8 -8
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/snk-crud/snk-crud.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +19 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +3 -1
- package/dist/collection/components/snk-grid/snk-grid.js +3 -1
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/components/SnkMessageBuilder.js +32 -8
- package/dist/components/snk-crud.js +1 -1
- package/dist/components/snk-detail-view2.js +7 -2
- package/dist/components/snk-form-view2.js +18 -6
- package/dist/components/snk-grid2.js +3 -1
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/esm/{ConfigStorage-175813dc.js → ConfigStorage-d15d2014.js} +2 -2
- package/dist/esm/{DataFetcher-49594174.js → DataFetcher-1dd7e8c0.js} +1 -1
- package/dist/esm/{ISave-4bdffce4.js → ISave-498c4831.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-0bda2ef5.js → SnkFormConfigManager-86befa68.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-1c0fada0.js → SnkMessageBuilder-c0bc4424.js} +32 -8
- package/dist/esm/{SnkMultiSelectionListDataSource-e13b72f7.js → SnkMultiSelectionListDataSource-14633bf6.js} +4 -4
- package/dist/esm/{auth-fetcher-62c5abf1.js → auth-fetcher-69cbda8d.js} +1 -1
- package/dist/esm/{dataunit-fetcher-b7a9ef67.js → dataunit-fetcher-3d5c4ae4.js} +2 -2
- package/dist/esm/{form-config-fetcher-5e29a152.js → form-config-fetcher-fcc7b62f.js} +1 -1
- package/dist/esm/index-04f73a26.js +6 -2
- 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_9.entry.js → snk-actions-button_8.entry.js} +8 -57
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +6 -6
- package/dist/esm/snk-crud.entry.js +7 -7
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-865a1e27.js → snk-data-unit-363c3551.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +12 -9
- package/dist/esm/snk-filter-bar_4.entry.js +4 -4
- package/dist/esm/snk-filter-modal-item.entry.js +4 -4
- package/dist/esm/snk-form-view.entry.js +17 -6
- package/dist/esm/snk-form_2.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +10 -8
- package/dist/esm/{snk-guides-viewer-2e2f48af.js → snk-guides-viewer-988e7e1a.js} +8 -6
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-image-input.entry.js +1 -1
- package/dist/esm/snk-layout-form-config.entry.js +68 -0
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +5 -5
- package/dist/esm/snk-simple-crud.entry.js +8 -8
- package/dist/sankhyablocks/{p-36a82166.entry.js → p-10cad767.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ddb20d9e.entry.js → p-18cc9111.entry.js} +1 -1
- package/dist/sankhyablocks/{p-71ea8d08.entry.js → p-1df34264.entry.js} +1 -1
- package/dist/sankhyablocks/p-27d6590e.js +1 -0
- package/dist/sankhyablocks/p-2a356340.entry.js +1 -0
- package/dist/sankhyablocks/{p-f63e1093.js → p-2ccbbeec.js} +1 -1
- package/dist/sankhyablocks/{p-f21109d6.entry.js → p-30641d55.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bf37b0e2.js → p-32ad76cc.js} +1 -1
- package/dist/sankhyablocks/{p-f455a553.entry.js → p-3b07c117.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8bf2a358.entry.js → p-43d84207.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0fbd3f2f.entry.js → p-48c580b9.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d2f5708.entry.js +1 -0
- package/dist/sankhyablocks/{p-3448ebdc.js → p-685bc841.js} +2 -2
- package/dist/sankhyablocks/{p-8e5f4851.js → p-7c4f4851.js} +1 -1
- package/dist/sankhyablocks/{p-1d0e4e8f.js → p-7e9f8fa4.js} +1 -1
- package/dist/sankhyablocks/{p-93f4104a.js → p-9114e869.js} +1 -1
- package/dist/sankhyablocks/{p-abcfff93.entry.js → p-a65559fe.entry.js} +1 -1
- package/dist/sankhyablocks/{p-34d56802.js → p-a9839628.js} +1 -1
- package/dist/sankhyablocks/p-adc59e2c.entry.js +1 -0
- package/dist/sankhyablocks/p-b16322aa.js +1 -0
- package/dist/sankhyablocks/{p-f61fef9a.entry.js → p-bb81a356.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e9bbd66b.js → p-bdf0077f.js} +1 -1
- package/dist/sankhyablocks/p-c6a97fda.entry.js +1 -0
- package/dist/sankhyablocks/{p-c5d6717d.entry.js → p-c860552e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e19a65a2.js → p-e0a6818c.js} +1 -1
- package/dist/sankhyablocks/{p-e892ae6c.entry.js → p-e0e3914e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3f762af3.entry.js → p-e973a5d4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fc0736ad.entry.js → p-ebce5394.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d2581c6b.entry.js → p-fc5e95f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e9e9ff1c.entry.js → p-fce86770.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-164721f4.entry.js +0 -1
- package/dist/sankhyablocks/p-4005bd63.entry.js +0 -1
- package/dist/sankhyablocks/p-b10e79bb.js +0 -1
- package/dist/sankhyablocks/p-bafeda2d.entry.js +0 -1
- package/dist/sankhyablocks/p-d4e3e549.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, g as getElement, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { ApplicationContext, Action, ObjectUtils, DataUnitAction, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
5
|
-
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-
|
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-c0bc4424.js';
|
|
5
|
+
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-3d5c4ae4.js';
|
|
6
6
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
7
7
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-363c3551.js';
|
|
2
2
|
import './index-04f73a26.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import './SnkMessageBuilder-
|
|
6
|
-
import './dataunit-fetcher-
|
|
7
|
-
import './DataFetcher-
|
|
5
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
6
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
7
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, i as forceUpdate, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { Action, StringUtils, KeyboardManager } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-86befa68.js';
|
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
|
-
import './DataFetcher-
|
|
6
|
-
import './ISave-
|
|
5
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
6
|
+
import './ISave-498c4831.js';
|
|
7
7
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
|
-
import './dataunit-fetcher-
|
|
10
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
|
-
import './form-config-fetcher-
|
|
12
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
13
13
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
14
14
|
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
15
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
|
16
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
15
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-988e7e1a.js';
|
|
16
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-c0bc4424.js';
|
|
17
17
|
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
18
|
-
import './ConfigStorage-
|
|
18
|
+
import './ConfigStorage-d15d2014.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';
|
|
@@ -67,7 +67,7 @@ class GuideBuilder {
|
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
69
|
const newGuideItem = children.shift();
|
|
70
|
-
newGuideItem.label = isNewRecord ? this.getMessage("snkCrud.
|
|
70
|
+
newGuideItem.label = isNewRecord ? this.getMessage("snkCrud.newRecord") : currentRecord.__record__label__;
|
|
71
71
|
newGuideItem.children = children;
|
|
72
72
|
item.children = [newGuideItem];
|
|
73
73
|
return item;
|
|
@@ -316,6 +316,9 @@ const SnkDetailView = class {
|
|
|
316
316
|
if (action.type === Action.FIELD_INVALIDATED) {
|
|
317
317
|
this.addErrorBadgeToBranchGuide();
|
|
318
318
|
}
|
|
319
|
+
else if (action.type === Action.DATA_LOADED) {
|
|
320
|
+
this.dataUnit.selectFirst();
|
|
321
|
+
}
|
|
319
322
|
}
|
|
320
323
|
addErrorBadgeToBranchGuide() {
|
|
321
324
|
this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement, i as forceUpdate } from './index-04f73a26.js';
|
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, DateUtils, MaskFormatter, KeyboardManager, FloatingManager, 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-d15d2014.js';
|
|
5
5
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-d2439a9a.js';
|
|
6
6
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
7
7
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
@@ -12,10 +12,10 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
12
12
|
import { A as ActionDefaultFilter } from './default-filters-50105e43.js';
|
|
13
13
|
import { F as FilterType } from './filter-type.enum-f6a8fe23.js';
|
|
14
14
|
import { g as getInvalidFilters } from './filter-validate-faf51fa9.js';
|
|
15
|
-
import './form-config-fetcher-
|
|
16
|
-
import './DataFetcher-
|
|
15
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
16
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
17
17
|
import './PrintUtils-3e4ff0f5.js';
|
|
18
|
-
import './SnkMessageBuilder-
|
|
18
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
19
19
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
20
20
|
|
|
21
21
|
const buildFilter = (item) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
3
|
+
import { C as ConfigStorage } from './ConfigStorage-d15d2014.js';
|
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
|
5
5
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
6
6
|
import { F as FilterType } from './filter-type.enum-f6a8fe23.js';
|
|
7
|
-
import './form-config-fetcher-
|
|
8
|
-
import './DataFetcher-
|
|
7
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
8
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
|
10
|
-
import './SnkMessageBuilder-
|
|
10
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
12
|
|
|
13
13
|
const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
|
|
@@ -42,6 +42,7 @@ const SnkFormView = class {
|
|
|
42
42
|
]
|
|
43
43
|
]);
|
|
44
44
|
this._singleColumn = false;
|
|
45
|
+
this._currentFormLayout = undefined;
|
|
45
46
|
this.levelPath = undefined;
|
|
46
47
|
this.fieldSearch = undefined;
|
|
47
48
|
this.label = undefined;
|
|
@@ -174,27 +175,37 @@ const SnkFormView = class {
|
|
|
174
175
|
this.dataUnit.unsubscribe(this.dataUnitObserver);
|
|
175
176
|
}
|
|
176
177
|
}
|
|
178
|
+
async componentWillLoad() {
|
|
179
|
+
await this.initLayoutFormConfig();
|
|
180
|
+
}
|
|
181
|
+
async componentWillLoad() {
|
|
182
|
+
await this.initLayoutFormConfig();
|
|
183
|
+
}
|
|
177
184
|
componentDidLoad() {
|
|
178
185
|
this.observePropsCustomEditor(this.customEditors);
|
|
179
186
|
this.observeFieldsProps(this.fieldsProps);
|
|
180
|
-
this.initLayoutFormConfig();
|
|
181
187
|
}
|
|
182
188
|
async initLayoutFormConfig() {
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
var _a;
|
|
190
|
+
if (!this._application) {
|
|
191
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
192
|
+
}
|
|
193
|
+
const layoutFormConfig = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getLayoutFormConfig());
|
|
185
194
|
if (layoutFormConfig) {
|
|
186
195
|
this.setSingleColumn(layoutFormConfig);
|
|
187
196
|
this.registerNotifyListeners(layoutFormConfig);
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
setSingleColumn(layoutFormConfig) {
|
|
191
|
-
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE;
|
|
200
|
+
this._singleColumn = (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CASCADE || (layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config) === FormLayout.CLASSIC_CASCADE;
|
|
201
|
+
this._currentFormLayout = layoutFormConfig === null || layoutFormConfig === void 0 ? void 0 : layoutFormConfig.config;
|
|
192
202
|
}
|
|
193
203
|
registerNotifyListeners(layoutFormConfig) {
|
|
194
204
|
if (!layoutFormConfig)
|
|
195
205
|
return;
|
|
196
206
|
layoutFormConfig.onConfigChange((config) => {
|
|
197
|
-
this._singleColumn = (config === FormLayout.CASCADE);
|
|
207
|
+
this._singleColumn = (config === FormLayout.CASCADE || config === FormLayout.CLASSIC_CASCADE);
|
|
208
|
+
this._currentFormLayout = config;
|
|
198
209
|
});
|
|
199
210
|
}
|
|
200
211
|
componentDidRender() {
|
|
@@ -254,7 +265,7 @@ const SnkFormView = class {
|
|
|
254
265
|
?
|
|
255
266
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
|
256
267
|
:
|
|
257
|
-
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn, customUiBuilders: this.customUiBuilders }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
268
|
+
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event), singleColumn: this._singleColumn, customUiBuilders: this.customUiBuilders, formLayout: this._currentFormLayout }), this.fieldSearch && h("ez-popover", { ref: elem => (this._ezPopoverFieldColumn = elem), overlayType: "none" }, this.fieldSearch)));
|
|
258
269
|
}
|
|
259
270
|
static get watchers() { return {
|
|
260
271
|
"customEditors": ["observePropsCustomEditor"],
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, g as getElement, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { ElementIDUtils, ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-86befa68.js';
|
|
4
4
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
5
5
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
6
6
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
7
|
-
import { U as UserConfigType } from './form-config-fetcher-
|
|
7
|
+
import { U as UserConfigType } from './form-config-fetcher-fcc7b62f.js';
|
|
8
8
|
import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
|
|
9
9
|
import { b as buildGuides, a as buildChildrenGuides, c as buildCustomGuides, d as buildGuidesMap, g as getFieldsToSave, u as updateTabInFieldsFromGroupList, e as buildNewGuideName } from './FormConfigHelper-d09669f3.js';
|
|
10
|
-
import './ConfigStorage-
|
|
11
|
-
import './DataFetcher-
|
|
10
|
+
import './ConfigStorage-d15d2014.js';
|
|
11
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
|
-
import './SnkMessageBuilder-
|
|
13
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
14
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
15
15
|
import './filter-item-type.enum-d45e026f.js';
|
|
16
16
|
|
|
@@ -2,24 +2,24 @@ import { r as registerInstance, e as createEvent, h, F as Fragment, g as getElem
|
|
|
2
2
|
import { KeyboardManager, Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
4
|
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import './DataFetcher-
|
|
6
|
-
import './ISave-
|
|
7
|
-
import { C as CommonsExporter, a as CrudUtils, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-
|
|
5
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
6
|
+
import './ISave-498c4831.js';
|
|
7
|
+
import { C as CommonsExporter, a as CrudUtils, S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-14633bf6.js';
|
|
8
8
|
import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
|
-
import './dataunit-fetcher-
|
|
11
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
14
14
|
import './constants-7b422de0.js';
|
|
15
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
15
|
+
import { C as ConfigStorage } from './ConfigStorage-d15d2014.js';
|
|
16
16
|
import { s as store } from './index-ea250be6.js';
|
|
17
17
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
18
18
|
import { v as validateFilters } from './filter-validate-faf51fa9.js';
|
|
19
19
|
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
20
20
|
import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
|
|
21
21
|
import './PrintUtils-3e4ff0f5.js';
|
|
22
|
-
import './SnkMessageBuilder-
|
|
22
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
23
23
|
import './IFetchDataExporterParams-d73bed3d.js';
|
|
24
24
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
25
25
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
@@ -551,7 +551,7 @@ const SnkGrid = class {
|
|
|
551
551
|
return disabledButtons;
|
|
552
552
|
}
|
|
553
553
|
getInvisibleButtons() {
|
|
554
|
-
var _a, _b;
|
|
554
|
+
var _a, _b, _c;
|
|
555
555
|
let invisibleButtons = [];
|
|
556
556
|
if (!this._dataUnit || this._dataUnit.records.length === 0)
|
|
557
557
|
invisibleButtons.push(TaskbarElement.DATA_EXPORTER);
|
|
@@ -559,6 +559,8 @@ const SnkGrid = class {
|
|
|
559
559
|
invisibleButtons.push(TaskbarElement.ACTIONS_BUTTON);
|
|
560
560
|
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo.length) === 1)
|
|
561
561
|
invisibleButtons.push(TaskbarElement.UPDATE_MULTIPLE);
|
|
562
|
+
if (!((_c = this._dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo.length))
|
|
563
|
+
invisibleButtons.push(TaskbarElement.FORM_MODE);
|
|
562
564
|
return invisibleButtons;
|
|
563
565
|
}
|
|
564
566
|
componentWillRender() {
|
|
@@ -3,16 +3,16 @@ import { ObjectUtils, StringUtils, Action, KeyboardManager, ElementIDUtils } fro
|
|
|
3
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
4
|
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
6
|
-
import './DataFetcher-
|
|
7
|
-
import './ISave-
|
|
6
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
7
|
+
import './ISave-498c4831.js';
|
|
8
8
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
|
-
import './dataunit-fetcher-
|
|
11
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
|
13
|
-
import './form-config-fetcher-
|
|
13
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
14
14
|
import { V as VIEW_MODE } from './constants-7b422de0.js';
|
|
15
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
15
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-86befa68.js';
|
|
16
16
|
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
17
17
|
import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
|
|
18
18
|
|
|
@@ -391,6 +391,8 @@ const SnkGuidesViewer = class {
|
|
|
391
391
|
}
|
|
392
392
|
resetGuideBadge(selectedGuide) {
|
|
393
393
|
var _a;
|
|
394
|
+
if (!selectedGuide)
|
|
395
|
+
return;
|
|
394
396
|
this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
|
|
395
397
|
if (this.canClearGuideBadge(guide, selectedGuide.id)) {
|
|
396
398
|
return Object.assign(Object.assign({}, guide), { badge: null });
|
|
@@ -619,7 +621,7 @@ const SnkGuidesViewer = class {
|
|
|
619
621
|
propsCustomEditor: this._customEditors,
|
|
620
622
|
fieldsProps: this._fieldsProps,
|
|
621
623
|
entityPath: this.entityPath
|
|
622
|
-
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
624
|
+
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID, layoutFormConfig: false, disableNumberingConfig: true })));
|
|
623
625
|
}
|
|
624
626
|
render() {
|
|
625
627
|
if (!this.dataUnit || !this._configManager.isLoaded) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-988e7e1a.js';
|
|
2
2
|
import './index-04f73a26.js';
|
|
3
3
|
import '@sankhyalabs/core';
|
|
4
4
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
7
|
-
import './DataFetcher-
|
|
7
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
|
9
|
-
import './SnkMessageBuilder-
|
|
9
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
11
|
-
import './ISave-
|
|
11
|
+
import './ISave-498c4831.js';
|
|
12
12
|
import './index-b40568ff.js';
|
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
14
|
-
import './dataunit-fetcher-
|
|
14
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
15
15
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
16
16
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
17
17
|
import './ResourceIDUtils-a114189a.js';
|
|
18
18
|
import './filter-item-type.enum-d45e026f.js';
|
|
19
|
-
import './form-config-fetcher-
|
|
19
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
20
20
|
import './constants-7b422de0.js';
|
|
21
|
-
import './SnkFormConfigManager-
|
|
22
|
-
import './ConfigStorage-
|
|
21
|
+
import './SnkFormConfigManager-86befa68.js';
|
|
22
|
+
import './ConfigStorage-d15d2014.js';
|
|
23
23
|
import './taskbar-elements-d1e63fb2.js';
|
|
24
24
|
import './index-ea250be6.js';
|
|
25
25
|
import './taskbar-processor-3436124c.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
3
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-c0bc4424.js';
|
|
4
4
|
import { b as base64ToBlob, s as sessionFileUpload, a as buildFileKey, g as getPKs, d as downloadImage } from './ImageUtils-8fc8d905.js';
|
|
5
5
|
|
|
6
6
|
const snkImageInputCss = ":host{display:block}";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-04f73a26.js';
|
|
2
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
3
|
+
import './ISave-498c4831.js';
|
|
4
|
+
import { ApplicationContext } from '@sankhyalabs/core';
|
|
5
|
+
import './index-b40568ff.js';
|
|
6
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
9
|
+
import './filter-item-type.enum-d45e026f.js';
|
|
10
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-fcc7b62f.js';
|
|
11
|
+
import './constants-7b422de0.js';
|
|
12
|
+
import { FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
13
|
+
import './PrintUtils-3e4ff0f5.js';
|
|
14
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
15
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
16
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
17
|
+
import './ResourceIDUtils-a114189a.js';
|
|
18
|
+
|
|
19
|
+
const snkLayoutFormConfigCss = ".sc-snk-layout-form-config-h{display:block}";
|
|
20
|
+
|
|
21
|
+
const FORM_COL_CONFIG_PREFIX = 'formColCfg.';
|
|
22
|
+
const SnkLayoutFormConfig = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
registerInstance(this, hostRef);
|
|
25
|
+
this._formConfigFetcher = new FormConfigFetcher();
|
|
26
|
+
this.messagesBuilder = undefined;
|
|
27
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Salva o tipo de layout escolhido. Sem retorno.
|
|
31
|
+
*/
|
|
32
|
+
async save() {
|
|
33
|
+
this._LayoutFormConfigSingleton.setConfig(this.layoutType);
|
|
34
|
+
this._formConfigFetcher.saveLayoutFormConfig(FORM_COL_CONFIG_PREFIX + this._resourceID, { config: this.layoutType, newConfig: true });
|
|
35
|
+
}
|
|
36
|
+
async componentWillLoad() {
|
|
37
|
+
const _application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
38
|
+
this._LayoutFormConfigSingleton = await (_application === null || _application === void 0 ? void 0 : _application.getLayoutFormConfig());
|
|
39
|
+
this._resourceID = await (_application === null || _application === void 0 ? void 0 : _application.getResourceID());
|
|
40
|
+
this.setLayoutInit();
|
|
41
|
+
}
|
|
42
|
+
setLayoutInit() {
|
|
43
|
+
if (!this._LayoutFormConfigSingleton)
|
|
44
|
+
return;
|
|
45
|
+
const { config } = this._LayoutFormConfigSingleton;
|
|
46
|
+
if (config == null) {
|
|
47
|
+
this.layoutType = FormLayout.SIDE_BY_SIDE;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const configAsNumber = Number(config);
|
|
51
|
+
this.layoutType = Object.values(FormLayout).includes(configAsNumber)
|
|
52
|
+
? configAsNumber
|
|
53
|
+
: FormLayout.SIDE_BY_SIDE;
|
|
54
|
+
}
|
|
55
|
+
toggleLayout(key) {
|
|
56
|
+
this.layoutType = key;
|
|
57
|
+
}
|
|
58
|
+
getMessage(key, params) {
|
|
59
|
+
var _a;
|
|
60
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicCascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_CASCADE), value: this.layoutType === FormLayout.CLASSIC_CASCADE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicCascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.sideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.sideBySideLayout.description'))), h("div", null, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_SIDE_BY_SIDE), value: this.layoutType === FormLayout.CLASSIC_SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.description')))));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
SnkLayoutFormConfig.style = snkLayoutFormConfigCss;
|
|
67
|
+
|
|
68
|
+
export { SnkLayoutFormConfig as snk_layout_form_config };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, F as Fragment, f as Host } from './index-04f73a26.js';
|
|
2
2
|
import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-d2439a9a.js';
|
|
4
|
-
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-
|
|
4
|
+
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-d15d2014.js';
|
|
5
5
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
6
|
import { a as FilterGroupCondition, D as DefaultFilter } from './index-8acbae97.js';
|
|
7
7
|
import { s as store } from './index-ea250be6.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
10
|
-
import './DataFetcher-
|
|
9
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
10
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
|
12
|
-
import './SnkMessageBuilder-
|
|
12
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
14
14
|
|
|
15
15
|
const snkPersonalizedFilterCss = ".sc-snk-personalized-filter-h{display:flex;height:100%;padding:var(--space--large, 24px);--snk-personalized-filter--width:100%;--snk-personalized-filter--height:100%;--snk-personalized-filter--background-color-line:var(--color--disable-secondary);--snk-personalized-filter--margin-line:var(--border--radius-medium, 12px)}.snk-personalized-filter.sc-snk-personalized-filter{height:var(--snk-personalized-filter--width);width:var(--snk-personalized-filter--height)}.snk-personalized-filter__header-actions.sc-snk-personalized-filter{display:flex;gap:var(--space--medium)}.snk-personalized-filter__group.sc-snk-personalized-filter{flex:1}.snk-personalized-filter__expression-input--line.sc-snk-personalized-filter{width:100%;height:2px;background-color:var(--snk-personalized-filter--background-color-line);margin-top:var(--snk-personalized-filter--margin-line);margin-bottom:var(--snk-personalized-filter--margin-line)}.ez-box__main.sc-snk-personalized-filter{height:90%}.snk-personalized-filter__button-mode.sc-snk-personalized-filter{height:35px}";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as registerInstance, h, f as Host, g as getElement } from './index-04f73a26.js';
|
|
2
2
|
import { ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './ISave-
|
|
4
|
-
import './DataFetcher-
|
|
3
|
+
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './ISave-498c4831.js';
|
|
4
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
5
5
|
import './index-b40568ff.js';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
7
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
-
import './dataunit-fetcher-
|
|
8
|
+
import './dataunit-fetcher-3d5c4ae4.js';
|
|
9
9
|
import './filter-item-type.enum-d45e026f.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
10
|
+
import './form-config-fetcher-fcc7b62f.js';
|
|
11
11
|
import './constants-7b422de0.js';
|
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
|
13
|
-
import './SnkMessageBuilder-
|
|
13
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
14
14
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
15
15
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
16
16
|
import './ResourceIDUtils-a114189a.js';
|
|
@@ -3,21 +3,21 @@ import { StringUtils, ApplicationContext, ObjectUtils, Action, DataType, UserInt
|
|
|
3
3
|
import { CSSVarsUtils, buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-7b422de0.js';
|
|
5
5
|
import { T as TaskbarElement } from './taskbar-elements-d1e63fb2.js';
|
|
6
|
-
import './DataFetcher-
|
|
7
|
-
import './ISave-
|
|
8
|
-
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-
|
|
6
|
+
import './DataFetcher-1dd7e8c0.js';
|
|
7
|
+
import './ISave-498c4831.js';
|
|
8
|
+
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './SnkMultiSelectionListDataSource-14633bf6.js';
|
|
9
9
|
import { P as PresentationMode } from './index-b40568ff.js';
|
|
10
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
11
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
12
|
-
import { I as InMemoryLoader } from './dataunit-fetcher-
|
|
12
|
+
import { I as InMemoryLoader } from './dataunit-fetcher-3d5c4ae4.js';
|
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
|
14
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
|
14
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-fcc7b62f.js';
|
|
15
15
|
import { T as TaskbarProcessor } from './taskbar-processor-3436124c.js';
|
|
16
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
17
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
|
16
|
+
import { C as ConfigStorage } from './ConfigStorage-d15d2014.js';
|
|
17
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-86befa68.js';
|
|
18
18
|
import { s as store } from './index-ea250be6.js';
|
|
19
19
|
import './PrintUtils-3e4ff0f5.js';
|
|
20
|
-
import './SnkMessageBuilder-
|
|
20
|
+
import './SnkMessageBuilder-c0bc4424.js';
|
|
21
21
|
import './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
22
22
|
import './IFetchDataExporterParams-d73bed3d.js';
|
|
23
23
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,e as t,h as s,f as a}from"./p-2c9d0870.js";import{Action as h,ApplicationContext as e}from"@sankhyalabs/core";import{S as n}from"./p-
|
|
1
|
+
import{r as i,e as t,h as s,f as a}from"./p-2c9d0870.js";import{Action as h,ApplicationContext as e}from"@sankhyalabs/core";import{S as n}from"./p-27d6590e.js";import{b as o,s as r,a as d,g as l,d as c}from"./p-4ff3b494.js";const m=class{constructor(s){i(this,s),this.imageError=t(this,"imageError",7),this.dataUnitObserver=async i=>{var t;if([h.NEXT_SELECTED,h.PREVIOUS_SELECTED].includes(i.type))return void await this.loadImage();const s=(null===(t=i.payload)||void 0===t?void 0:t.selection)||[];i.type===h.SELECTION_CHANGED&&s.length>0?await this.loadImage():i.type!==h.RECORDS_ADDED||await this.clearImage()},this.dataUnit=void 0,this.fieldName=void 0,this.entityName=void 0,this.enabled=!0,this.acceptType=void 0,this.maxSize=void 0,this.label=void 0,this.imageValue=void 0,this.loading=!0}async reloadImage(i){await this.loadImage(i)}getMessage(i,t){return this.messagesBuilder||(this.messagesBuilder=new n),this.messagesBuilder.getMessage(i,t)}async clearImage(){this.imageValue=void 0}async handleImageChange(i){const t=i.detail;if(!t)return await this.clearImage(),void await this.updatedataUnitField(!0);const s=await o(t);if(this.maxSize&&s.size>1024*this.maxSize){const i=this.getMessage("snkImageInput.errorImageSize")+this.maxSize+"(KB)";return this.imageError.emit(i),void(this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i))}this.imageValue=t,await r(s,this.entityName,this.fieldName),await this.updatedataUnitField()}async updatedataUnitField(i=!1){this.dataUnit&&this.dataUnit.getSelectedRecord()&&(i?await this.dataUnit.setFieldValue(this.fieldName,"deletado"):await this.dataUnit.setFieldValue(this.fieldName,`$file.session.key{${d(this.entityName,this.fieldName)}}`))}async handleImageError(i){this.imageError.emit(i.detail),this.application&&await this.application.error(this.getMessage("snkImageInput.errorTitle"),i.detail)}getPksFromDataUnit(){if(!this.dataUnit)return;const i=this.dataUnit.getSelectedRecord();if(!i)return;const t=i[this.fieldName];if(t)try{return JSON.parse(t)}catch(i){return void console.error("Error parsing PK from data unit field:",i)}}async loadImage(i){var t;this.loading=!0,this.dataUnit&&this.entityName&&(i=null!==(t=null!=i?i:this.getPksFromDataUnit())&&void 0!==t?t:l(this.dataUnit),this.imageValue=await c(i,this.fieldName,this.entityName)),this.loading=!1}async componentWillLoad(){this.application=e.getContextValue("__SNK__APPLICATION__"),this.messagesBuilder||(this.messagesBuilder=new n),this.dataUnit&&this.dataUnit.subscribe(this.dataUnitObserver)}disconnectedCallback(){this.dataUnit&&this.dataUnit.unsubscribe(this.dataUnitObserver)}async componentDidLoad(){await this.loadImage()}render(){return s(a,null,s("ez-image-input",{enabled:this.enabled,label:this.label,name:this.fieldName,value:this.imageValue,maxFileSize:this.maxSize?1024*this.maxSize:void 0,accept:this.acceptType||"image/png,image/jpeg,image/gif",onEzChange:i=>this.handleImageChange(i),onEzError:i=>this.handleImageError(i),loading:this.loading}))}};m.style=":host{display:block}";export{m as snk_image_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,e as s,h as i,f as e,F as a}from"./p-2c9d0870.js";import{I as o}from"./p-
|
|
1
|
+
import{r as t,e as s,h as i,f as e,F as a}from"./p-2c9d0870.js";import{I as o}from"./p-685bc841.js";import"./p-bdf0077f.js";import{P as r}from"./p-32ad76cc.js";import"@sankhyalabs/core";import"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-a9839628.js";import"./p-9019a32f.js";import{ApplicationUtils as n}from"@sankhyalabs/ezui/dist/collection/utils";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"./p-27d6590e.js";import"./p-8d884fab.js";const h=class{constructor(i){t(this,i),this.pesquisaGridSelectItem=s(this,"pesquisaGridSelectItem",7),this._pesquisaFetcher=new r,this.metadata=void 0,this.dataSource=[],this.pkField=void 0,this.descriptionField=void 0,this.entityName=void 0,this.shouldLoadConfig=!1,this._gridConfig=void 0,this._inMemoryLoader=void 0,this._dataunit=void 0}observeDataSource(t){this._inMemoryLoader&&this._dataunit&&t&&(this._inMemoryLoader.records=[...t])}observeMetadata(){this.initializeDataUnit()}async observeShouldLoadConfig(t){t&&!this._gridConfig&&await this.loadGridConfig()}async loadGridConfig(){this._gridConfig=await this._pesquisaFetcher.loadPesquisaGridConfig(this.entityName)}initializeDataUnit(){var t;this.metadata&&!this._dataunit&&(this._inMemoryLoader=new o(this.metadata,null!==(t=this.dataSource)&&void 0!==t?t:[]),this._dataunit=this._inMemoryLoader.dataUnit,this._dataunit.pageSize=0)}handleDbClick(t){this.pesquisaGridSelectItem.emit({value:t[this.pkField],label:t[this.descriptionField]})}async handleConfigChanged({detail:t}){var s;const i=null!==(s=null==t?void 0:t.columns)&&void 0!==s?s:[];await this._pesquisaFetcher.savePesquisaGridConfig(this.entityName,i)}render(){if(this.metadata&&this._dataunit)return i(e,null,i("ez-grid",{dataUnit:this._dataunit,config:this._gridConfig,mode:"simple",autoFocus:!1,onEzDoubleClick:({detail:t})=>this.handleDbClick(t),onConfigChange:async t=>this.handleConfigChanged(t)}))}static get watchers(){return{dataSource:["observeDataSource"],metadata:["observeMetadata"],shouldLoadConfig:["observeShouldLoadConfig"]}}};h.style=".sc-pesquisa-grid-h{background:var(--background--xlight, #FFF);overflow-x:auto}ez-grid.sc-pesquisa-grid{--ez-grid__container--shadow:none;--ez-grid__header--shadow:none}";const l=class{constructor(i){t(this,i),this.pesquisaTreeSelectItem=s(this,"pesquisaTreeSelectItem",7),this.treeLoader=void 0,this.argument=void 0,this.allowsNonAnalytic=!1,this.shouldLoadTree=!1,this.messagesBuilder=void 0,this.items=[]}async applyFilter(){await this._tree.applyFilter(this.argument)}async observeShouldLoadTree(t){!t||this.items.length>0||await this.loadTree()}async loadTree(){if(!this.shouldLoadTree)return;if(!this.treeLoader||"function"!=typeof this.treeLoader)return;const t=await this.treeLoader((this.argument||"").trim());this.items=[...t]}expandOrCloseAllItems(t,s){return t.map((t=>Object.assign(Object.assign({},t),{expanded:s,children:t.children?this.expandOrCloseAllItems(t.children,s):void 0})))}handleExpandAll(){this.items=[...this.expandOrCloseAllItems(this.items,!0)]}handleCloseAll(){this.items=[...this.expandOrCloseAllItems(this.items,!1)]}handleDbClick(t){var s;if(this.allowsNonAnalytic||(null===(s=t.props)||void 0===s?void 0:s.analitico))this.pesquisaTreeSelectItem.emit({value:t.id,label:t.label});else{const t=this.getMessage("snkPesquisa.tree.errorTitle"),s=this.getMessage("snkPesquisa.tree.nonAnalyticError");n.error(t,s)}}renderEmptyMessage(){return i("div",{class:"ez-flex ez-flex--justify-center ez-flex--align-items-center ez-margin--large ez-text ez-text--xlarge ez-text--secondary"},i("span",null,this.getMessage("snkPesquisa.tree.emptyMessage")))}getMessage(t,s){return this.messagesBuilder.getMessage(t,s)}render(){var t;return i(e,null,(null===(t=this.items)||void 0===t?void 0:t.length)?i(a,null,i("div",{class:"actions-container"},i("ez-button",{size:"small",mode:"icon",class:"ez-margin-right--small",iconName:"show-list",title:this.getMessage("snkPesquisa.tree.expandButton"),onClick:()=>this.handleExpandAll()}),i("ez-button",{size:"small",mode:"icon",iconName:"hide-list",title:this.getMessage("snkPesquisa.tree.collapseButton"),onClick:()=>this.handleCloseAll()})),i("ez-tree",{ref:t=>this._tree=t,onEzDbClickItem:({detail:t})=>this.handleDbClick(t),items:this.items})):this.renderEmptyMessage())}static get watchers(){return{shouldLoadTree:["observeShouldLoadTree"]}}};l.style=".sc-pesquisa-tree-h{--snk-pesquisa--tree__action-container--top:var(--space--sm);--snk-pesquisa--tree__action-container--right:var(--space--small);--snk-pesquisa--tree__min-height:var(--space--extra-large);background:var(--background--xlight, #FFF);position:relative;min-height:var(--snk-pesquisa--tree__min-height);height:100%;display:block;overflow-y:auto}.sc-pesquisa-tree-h:hover .actions-container.sc-pesquisa-tree{display:flex}.actions-container.sc-pesquisa-tree{flex-direction:row;position:absolute;top:var(--snk-pesquisa--tree__action-container--top);right:var(--snk-pesquisa--tree__action-container--right);display:none}";export{h as pesquisa_grid,l as pesquisa_tree}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,e,h as i,f as s,g as n}from"./p-2c9d0870.js";import{DateUtils as r,StringUtils as a,ObjectUtils as o,WaitingChangeException as h,SilentException as l,WarningException as c,ErrorException as d,ElementIDUtils as u,SearchUtils as p,ArrayUtils as m,KeyboardManager as g,OnboardingUtils as w,DependencyType as y,DataType as v,ApplicationContext as f,ErrorTracking as P,UserAgentUtils as k,LockManager as z,LockManagerOperation as _}from"@sankhyalabs/core";import{ApplicationUtils as x}from"@sankhyalabs/ezui/dist/collection/utils";import{C as A}from"./p-
|
|
1
|
+
import{r as t,e,h as i,f as s,g as n}from"./p-2c9d0870.js";import{DateUtils as r,StringUtils as a,ObjectUtils as o,WaitingChangeException as h,SilentException as l,WarningException as c,ErrorException as d,ElementIDUtils as u,SearchUtils as p,ArrayUtils as m,KeyboardManager as g,OnboardingUtils as w,DependencyType as y,DataType as v,ApplicationContext as f,ErrorTracking as P,UserAgentUtils as k,LockManager as z,LockManagerOperation as _}from"@sankhyalabs/core";import{ApplicationUtils as x}from"@sankhyalabs/ezui/dist/collection/utils";import{C as A}from"./p-9114e869.js";import{d as S,D as b,U as I}from"./p-bdf0077f.js";import{A as T,a as O}from"./p-e0a6818c.js";import{P as L,D as N}from"./p-685bc841.js";import{P as E}from"./p-32ad76cc.js";import{S as C}from"./p-27d6590e.js";import{T as D}from"./p-9019a32f.js";import"./p-0f3698af.js";import"./p-ff1990ad.js";import{F as R}from"./p-a9839628.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class F{static webConnectionCaller(t,e,i){var s;null===(s=window.AppletCaller)||void 0===s||s.webConnectionCaller(t,e,i)}}const M=U;function U(t,e){const i=j();return(U=function(t){return i[t-=378]})(t,e)}function j(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(j=function(){return t})()}!function(){const t=U,e=j();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class ${[M(397)](t){const e=M;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const i=new H("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>i.putAccess(t[e(382)],String(t.status)==e(398)))),i}}class H{constructor(t){const e=M;this.isSup=t,this[e(384)]={}}[M(378)](t,e){this[M(384)][t]=e}[M(393)](t){const e=M;if(this[e(402)])return!0;let i=!0;return this[e(384)][e(380)](t)&&(i=this.actions[t]),i}isUserSup(){return this.isSup}}class B{constructor(){this._embeddedParams=new Map,this._cachedParams=new Map,this.templateByQuery=new Map;try{if(null!=window.MGE_PARAMS){atob(window.MGE_PARAMS).split("__;__").forEach((t=>{const[e,i]=t.split("__=__");this._embeddedParams.set(e,i)}))}}catch(t){console.error("Problemas ao obter parâmetros embarcados"),console.error(t)}this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",S.gql`query($name: String!) {
|
|
2
2
|
$queryAlias$: fetchResource(name: $name){
|
|
3
3
|
name
|
|
4
4
|
resource
|