@sankhyalabs/sankhyablocks 9.1.0-dev.3 → 9.1.0-dev.5
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/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +1 -1
- package/dist/cjs/fields-selector.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +28 -11
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/collection/components/snk-attach/snk-attach.js +45 -11
- package/dist/collection/components/snk-form-config/field-item/field-item.css +3 -23
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +4 -12
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +4 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +8 -8
- package/dist/components/field-item2.js +1 -1
- package/dist/components/fields-layout2.js +1 -1
- package/dist/components/fields-selector2.js +2 -2
- package/dist/components/snk-attach2.js +29 -11
- package/dist/components/snk-simple-crud2.js +7 -7
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +1 -1
- package/dist/esm/fields-selector.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-attach.entry.js +28 -11
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/sankhyablocks/p-0d72d9c3.entry.js +1 -0
- package/dist/sankhyablocks/{p-349d1968.entry.js → p-23b20add.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd665460.entry.js → p-33a44ca7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a06bf7b9.entry.js → p-7ced2cf4.entry.js} +1 -1
- package/dist/sankhyablocks/p-cfc219f6.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-50b68b68.entry.js +0 -1
- package/dist/sankhyablocks/p-c3324d79.entry.js +0 -1
- /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
- /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
@@ -7,6 +7,8 @@ import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
7
7
|
import { SaveErrorsEnum } from '../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces';
|
8
8
|
const RESOURCE_ID = 'AnexoSistema';
|
9
9
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
10
|
+
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
11
|
+
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
10
12
|
export class SnkAttach {
|
11
13
|
constructor() {
|
12
14
|
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
@@ -33,6 +35,7 @@ export class SnkAttach {
|
|
33
35
|
this.back.emit();
|
34
36
|
});
|
35
37
|
};
|
38
|
+
this.gridLegacyConfigName = undefined;
|
36
39
|
this.fetcherType = undefined;
|
37
40
|
this.fetcher = undefined;
|
38
41
|
this.dataUnit = undefined;
|
@@ -144,9 +147,11 @@ export class SnkAttach {
|
|
144
147
|
var _a, _b;
|
145
148
|
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
146
149
|
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
150
|
+
let gridValidateForm;
|
147
151
|
if (!this._currentDataUnit.metadata) {
|
148
152
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
149
|
-
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
153
|
+
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
154
|
+
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
150
155
|
}
|
151
156
|
this.initDataUnitLoaders();
|
152
157
|
this._currentDataUnit.addFilterProvider({
|
@@ -156,19 +161,21 @@ export class SnkAttach {
|
|
156
161
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
157
162
|
});
|
158
163
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
159
|
-
this.disableEditFieldsNotInForm();
|
164
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
160
165
|
}
|
161
166
|
async loadAttach() {
|
162
167
|
var _a, _b;
|
163
168
|
this._currentFetcher = new AttachFetcher();
|
164
169
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
165
170
|
this._currentDataUnit.pageSize = 150;
|
171
|
+
let gridValidateForm;
|
166
172
|
this.initDataUnitLoaders();
|
167
173
|
this._currentDataUnit.addInterceptor({
|
168
174
|
interceptAction: (action) => {
|
169
175
|
var _a;
|
170
176
|
if (action.type === Action.METADATA_LOADED) {
|
171
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
177
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
178
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
172
179
|
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
173
180
|
}
|
174
181
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
@@ -176,9 +183,10 @@ export class SnkAttach {
|
|
176
183
|
});
|
177
184
|
if (!this._currentDataUnit.metadata) {
|
178
185
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
179
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
186
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
187
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
180
188
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
181
|
-
this.disableEditFieldsNotInForm();
|
189
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
182
190
|
}
|
183
191
|
}
|
184
192
|
initDataUnitLoaders() {
|
@@ -197,12 +205,16 @@ export class SnkAttach {
|
|
197
205
|
});
|
198
206
|
}
|
199
207
|
}
|
200
|
-
disableEditFieldsNotInForm() {
|
201
|
-
var _a;
|
202
|
-
(_a = this.
|
203
|
-
|
208
|
+
disableEditFieldsNotInForm(gridValidateForm) {
|
209
|
+
var _a, _b, _c, _d, _e;
|
210
|
+
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
211
|
+
if (!!this.getGridLegacyConfigName()) {
|
212
|
+
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
213
|
+
}
|
214
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
215
|
+
var _a, _b;
|
204
216
|
const fieldName = column.name;
|
205
|
-
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
217
|
+
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
206
218
|
this._currentDataUnit.disableField(fieldName);
|
207
219
|
}
|
208
220
|
});
|
@@ -252,11 +264,16 @@ export class SnkAttach {
|
|
252
264
|
await this._currentDataUnit.loadMetadata();
|
253
265
|
}
|
254
266
|
;
|
267
|
+
getGridLegacyConfigName() {
|
268
|
+
if (this.gridLegacyConfigName)
|
269
|
+
return this.gridLegacyConfigName;
|
270
|
+
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
271
|
+
}
|
255
272
|
render() {
|
256
273
|
var _a, _b;
|
257
274
|
if (!this._currentDataUnit)
|
258
275
|
return null;
|
259
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
276
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
260
277
|
}
|
261
278
|
static get is() { return "snk-attach"; }
|
262
279
|
static get encapsulation() { return "scoped"; }
|
@@ -272,6 +289,23 @@ export class SnkAttach {
|
|
272
289
|
}
|
273
290
|
static get properties() {
|
274
291
|
return {
|
292
|
+
"gridLegacyConfigName": {
|
293
|
+
"type": "string",
|
294
|
+
"mutable": false,
|
295
|
+
"complexType": {
|
296
|
+
"original": "string",
|
297
|
+
"resolved": "string",
|
298
|
+
"references": {}
|
299
|
+
},
|
300
|
+
"required": false,
|
301
|
+
"optional": false,
|
302
|
+
"docs": {
|
303
|
+
"tags": [],
|
304
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grid."
|
305
|
+
},
|
306
|
+
"attribute": "grid-legacy-config-name",
|
307
|
+
"reflect": false
|
308
|
+
},
|
275
309
|
"fetcherType": {
|
276
310
|
"type": "string",
|
277
311
|
"mutable": false,
|
@@ -1,6 +1,5 @@
|
|
1
1
|
:host {
|
2
|
-
width:
|
3
|
-
min-width: 200px;
|
2
|
+
width: 100%;
|
4
3
|
display: flex;
|
5
4
|
padding: 12px 8px;
|
6
5
|
border-radius: var(--border--radius-small, 4px);
|
@@ -12,25 +11,7 @@
|
|
12
11
|
background: #FAFCFF;
|
13
12
|
}
|
14
13
|
|
15
|
-
:host.
|
16
|
-
width: 32% !important;
|
17
|
-
}
|
18
|
-
|
19
|
-
@container (max-width: 430px) {
|
20
|
-
:host,
|
21
|
-
:host.ghost{
|
22
|
-
width: 100% !important;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
@container (min-width: 431px) and (max-width: 632px) {
|
27
|
-
:host,
|
28
|
-
:host.ghost {
|
29
|
-
width: 48% !important;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
:host.full-width{
|
14
|
+
:host.full-width {
|
34
15
|
width: 100%;
|
35
16
|
}
|
36
17
|
|
@@ -81,7 +62,6 @@ ez-icon {
|
|
81
62
|
align-self: self-start;
|
82
63
|
}
|
83
64
|
|
84
|
-
|
85
65
|
.actions {
|
86
66
|
display: flex;
|
87
67
|
flex-direction: row;
|
@@ -105,4 +85,4 @@ ez-button {
|
|
105
85
|
:host:hover .hiddeble {
|
106
86
|
visibility: visible;
|
107
87
|
opacity: 1;
|
108
|
-
}
|
88
|
+
}
|
@@ -15,9 +15,6 @@
|
|
15
15
|
height: calc(100vh - 225px);
|
16
16
|
}
|
17
17
|
|
18
|
-
.groups-container {
|
19
|
-
}
|
20
|
-
|
21
18
|
.guide-header {
|
22
19
|
display: flex;
|
23
20
|
width: 100%;
|
@@ -51,15 +48,13 @@
|
|
51
48
|
width: 100%;
|
52
49
|
}
|
53
50
|
|
54
|
-
|
55
51
|
.group-content {
|
56
|
-
display:
|
57
|
-
flex-direction: row;
|
58
|
-
flex-wrap: wrap;
|
52
|
+
display: grid;
|
59
53
|
gap: 12px;
|
60
54
|
min-height: 65px;
|
61
55
|
width: 100%;
|
62
56
|
padding: 6px 0;
|
57
|
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
63
58
|
}
|
64
59
|
|
65
60
|
.group-content.empty-content {
|
@@ -79,7 +74,6 @@
|
|
79
74
|
justify-content: center;
|
80
75
|
pointer-events: none;
|
81
76
|
transition: opacity 0.3s;
|
82
|
-
width: 100%;
|
83
77
|
height: 100%;
|
84
78
|
box-sizing: border-box;
|
85
79
|
padding: 10px;
|
@@ -94,7 +88,7 @@
|
|
94
88
|
border-bottom: 1px solid #dce0e8;
|
95
89
|
}
|
96
90
|
|
97
|
-
.no-group-container::before{
|
91
|
+
.no-group-container::before {
|
98
92
|
content: "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário";
|
99
93
|
width: 100%;
|
100
94
|
display: block;
|
@@ -117,7 +111,6 @@
|
|
117
111
|
height: 55px;
|
118
112
|
}
|
119
113
|
|
120
|
-
|
121
114
|
.no-guide-selected {
|
122
115
|
display: block;
|
123
116
|
margin: auto;
|
@@ -129,5 +122,4 @@
|
|
129
122
|
.ghost {
|
130
123
|
opacity: .5;
|
131
124
|
background: #c8fbe2;
|
132
|
-
}
|
133
|
-
|
125
|
+
}
|
@@ -55,7 +55,7 @@ export class FieldsSelector {
|
|
55
55
|
this.initializeDraggableContainer();
|
56
56
|
}
|
57
57
|
render() {
|
58
|
-
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
58
|
+
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
59
59
|
}
|
60
60
|
static get is() { return "fields-selector"; }
|
61
61
|
static get encapsulation() { return "scoped"; }
|
@@ -9,7 +9,7 @@ import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
9
9
|
import SnkMultiSelectionListDataSource from '../snk-grid/filtercolumn/SnkMultiSelectionListDataSource';
|
10
10
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
11
11
|
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
12
|
-
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './
|
12
|
+
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './snk-simple-crud.constants';
|
13
13
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
14
14
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
15
15
|
import store from '../../lib/store';
|
@@ -85,15 +85,15 @@ export class SnkSimpleCrud {
|
|
85
85
|
newCustomRenders.set(fieldName, customRender);
|
86
86
|
this._customRenders = newCustomRenders;
|
87
87
|
}
|
88
|
-
handleResourceIDChanged(newValue, oldValue) {
|
88
|
+
async handleResourceIDChanged(newValue, oldValue) {
|
89
89
|
if (StringUtils.isEmpty(newValue)) {
|
90
90
|
return;
|
91
91
|
}
|
92
92
|
if (newValue === oldValue) {
|
93
93
|
return;
|
94
94
|
}
|
95
|
-
this.loadFormConfig(true);
|
96
|
-
this.loadGridConfig(true);
|
95
|
+
await this.loadFormConfig(true);
|
96
|
+
await this.loadGridConfig(true);
|
97
97
|
}
|
98
98
|
/**
|
99
99
|
* Registra um formatador de valores para uma coluna da grid.
|
@@ -149,7 +149,7 @@ export class SnkSimpleCrud {
|
|
149
149
|
.concat(extraButtons));
|
150
150
|
}
|
151
151
|
addConfigButton(buttons) {
|
152
|
-
if (this.configName === undefined) {
|
152
|
+
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
153
153
|
return buttons;
|
154
154
|
}
|
155
155
|
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
@@ -260,7 +260,7 @@ export class SnkSimpleCrud {
|
|
260
260
|
if (!this._formConfigAlreadyLoaded) {
|
261
261
|
return;
|
262
262
|
}
|
263
|
-
this.loadFormConfig(true);
|
263
|
+
await this.loadFormConfig(true);
|
264
264
|
}
|
265
265
|
openConfig(viewMode) {
|
266
266
|
this._snkConfigurator.close();
|
@@ -345,8 +345,8 @@ export class SnkSimpleCrud {
|
|
345
345
|
return;
|
346
346
|
}
|
347
347
|
await this.addGridLegacyConfigName();
|
348
|
-
this.loadGridConfig();
|
349
|
-
this.loadFormConfig();
|
348
|
+
await this.loadGridConfig();
|
349
|
+
await this.loadFormConfig();
|
350
350
|
}
|
351
351
|
componentDidRender() {
|
352
352
|
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, forceUpdate, Host } from '@stencil/core/internal/client';
|
2
2
|
import { g as getIconName, d as defineCustomElement$1 } from './field-config2.js';
|
3
3
|
|
4
|
-
const fieldItemCss = ".sc-field-item-h
|
4
|
+
const fieldItemCss = ".sc-field-item-h{width:100%;display:flex;padding:12px 8px;border-radius:var(--border--radius-small, 4px);border:1px solid #dce0e8;cursor:grab;align-items:center;height:42px;max-height:42px;background:#FAFCFF}.full-width.sc-field-item-h{width:100%}ez-icon.sc-field-item{--ez-icon--color:#A2ABB9}.icons.sc-field-item{display:flex}.label.sc-field-item{display:flex;flex-grow:1;padding-left:8px;font-size:14px;align-items:center;gap:4px;height:22px}.label-text.sc-field-item{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}.required-mark.sc-field-item{color:#cf3105;background:#F7E0E5;width:12px;height:12px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding-top:5px;font-size:16px;align-self:self-start}.actions.sc-field-item{display:flex;flex-direction:row;align-content:center;gap:4px}ez-button.sc-field-item{width:24px;align-items:center;justify-content:center;display:flex}.sc-field-item-h .hiddeble.sc-field-item{transition:0.2s ease-in-out;visibility:hidden;opacity:0}.sc-field-item-h:hover .hiddeble.sc-field-item{visibility:visible;opacity:1}";
|
5
5
|
|
6
6
|
const FieldItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
7
7
|
constructor() {
|
@@ -6,7 +6,7 @@ import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
6
6
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
7
7
|
import { d as defineCustomElement$1 } from './field-item2.js';
|
8
8
|
|
9
|
-
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:
|
9
|
+
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:grid;gap:12px;min-height:65px;width:100%;padding:6px 0;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}.group-content.empty-content.sc-fields-layout{position:relative}.group-content.empty-content.sc-fields-layout::before{content:\"Arraste e solte um campo aqui\";color:#cbcfd7;font-size:16px;font-weight:500;text-align:center;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity 0.3s;height:100%;box-sizing:border-box;padding:10px;background:#f9f9f9;border:1px dashed #dce0e8;border-radius:6px}.no-group-container.sc-fields-layout{padding:12px 0;width:100%;border-bottom:1px solid #dce0e8}.no-group-container.sc-fields-layout::before{content:\"Inclua estes campos nos grupos ou deixe-os separados no topo do formulário\";width:100%;display:block;font-size:16px;font-weight:400;color:#AFB6C0;padding-bottom:12px}.add-group-container.sc-fields-layout{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;padding-bottom:12px;gap:6px;cursor:pointer;justify-content:center;width:100%;height:55px}.no-guide-selected.sc-fields-layout{display:block;margin:auto;font-size:24px;color:#AFB6C0;font-weight:500}.ghost.sc-fields-layout{opacity:.5;background:#c8fbe2}";
|
10
10
|
|
11
11
|
const FieldLayoutComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
12
12
|
constructor() {
|
@@ -4,7 +4,7 @@ import { I as ID_AVAILABLE_FIELDS, d as defineCustomElement$2 } from './field-co
|
|
4
4
|
import { ArrayUtils } from '@sankhyalabs/core';
|
5
5
|
import { d as defineCustomElement$1 } from './field-item2.js';
|
6
6
|
|
7
|
-
const fieldsSelectorCss = ".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}";
|
7
|
+
const fieldsSelectorCss = ".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}.filter-input.sc-fields-selector{padding-right:var(--space--2xs, 8px)}";
|
8
8
|
|
9
9
|
const FieldsSelector = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
10
10
|
constructor() {
|
@@ -62,7 +62,7 @@ const FieldsSelector = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
62
62
|
this.initializeDraggableContainer();
|
63
63
|
}
|
64
64
|
render() {
|
65
|
-
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
65
|
+
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
66
66
|
}
|
67
67
|
get el() { return this; }
|
68
68
|
static get style() { return fieldsSelectorCss; }
|
@@ -627,6 +627,8 @@ const snkAttachCss = ".snk-attach__header.sc-snk-attach,.snk-attach__crud-sectio
|
|
627
627
|
|
628
628
|
const RESOURCE_ID = 'AnexoSistema';
|
629
629
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
630
|
+
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
631
|
+
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
630
632
|
const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
631
633
|
constructor() {
|
632
634
|
super();
|
@@ -656,6 +658,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
656
658
|
this.back.emit();
|
657
659
|
});
|
658
660
|
};
|
661
|
+
this.gridLegacyConfigName = undefined;
|
659
662
|
this.fetcherType = undefined;
|
660
663
|
this.fetcher = undefined;
|
661
664
|
this.dataUnit = undefined;
|
@@ -767,9 +770,11 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
767
770
|
var _a, _b;
|
768
771
|
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
769
772
|
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
773
|
+
let gridValidateForm;
|
770
774
|
if (!this._currentDataUnit.metadata) {
|
771
775
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
772
|
-
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
776
|
+
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
777
|
+
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
773
778
|
}
|
774
779
|
this.initDataUnitLoaders();
|
775
780
|
this._currentDataUnit.addFilterProvider({
|
@@ -779,19 +784,21 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
779
784
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
780
785
|
});
|
781
786
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
782
|
-
this.disableEditFieldsNotInForm();
|
787
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
783
788
|
}
|
784
789
|
async loadAttach() {
|
785
790
|
var _a, _b;
|
786
791
|
this._currentFetcher = new AttachFetcher();
|
787
792
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
788
793
|
this._currentDataUnit.pageSize = 150;
|
794
|
+
let gridValidateForm;
|
789
795
|
this.initDataUnitLoaders();
|
790
796
|
this._currentDataUnit.addInterceptor({
|
791
797
|
interceptAction: (action) => {
|
792
798
|
var _a;
|
793
799
|
if (action.type === Action.METADATA_LOADED) {
|
794
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
800
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
801
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
795
802
|
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
796
803
|
}
|
797
804
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
@@ -799,9 +806,10 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
799
806
|
});
|
800
807
|
if (!this._currentDataUnit.metadata) {
|
801
808
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
802
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
809
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
810
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
803
811
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
804
|
-
this.disableEditFieldsNotInForm();
|
812
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
805
813
|
}
|
806
814
|
}
|
807
815
|
initDataUnitLoaders() {
|
@@ -820,12 +828,16 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
820
828
|
});
|
821
829
|
}
|
822
830
|
}
|
823
|
-
disableEditFieldsNotInForm() {
|
824
|
-
var _a;
|
825
|
-
(_a = this.
|
826
|
-
|
831
|
+
disableEditFieldsNotInForm(gridValidateForm) {
|
832
|
+
var _a, _b, _c, _d, _e;
|
833
|
+
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
834
|
+
if (!!this.getGridLegacyConfigName()) {
|
835
|
+
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
836
|
+
}
|
837
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
838
|
+
var _a, _b;
|
827
839
|
const fieldName = column.name;
|
828
|
-
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
840
|
+
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
829
841
|
this._currentDataUnit.disableField(fieldName);
|
830
842
|
}
|
831
843
|
});
|
@@ -875,17 +887,23 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
875
887
|
await this._currentDataUnit.loadMetadata();
|
876
888
|
}
|
877
889
|
;
|
890
|
+
getGridLegacyConfigName() {
|
891
|
+
if (this.gridLegacyConfigName)
|
892
|
+
return this.gridLegacyConfigName;
|
893
|
+
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
894
|
+
}
|
878
895
|
render() {
|
879
896
|
var _a, _b;
|
880
897
|
if (!this._currentDataUnit)
|
881
898
|
return null;
|
882
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
899
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
883
900
|
}
|
884
901
|
static get watchers() { return {
|
885
902
|
"registerKey": ["registerKeyWatcher"]
|
886
903
|
}; }
|
887
904
|
static get style() { return snkAttachCss; }
|
888
905
|
}, [2, "snk-attach", {
|
906
|
+
"gridLegacyConfigName": [1, "grid-legacy-config-name"],
|
889
907
|
"fetcherType": [1, "fetcher-type"],
|
890
908
|
"fetcher": [16],
|
891
909
|
"dataUnit": [16],
|
@@ -110,15 +110,15 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
110
110
|
newCustomRenders.set(fieldName, customRender);
|
111
111
|
this._customRenders = newCustomRenders;
|
112
112
|
}
|
113
|
-
handleResourceIDChanged(newValue, oldValue) {
|
113
|
+
async handleResourceIDChanged(newValue, oldValue) {
|
114
114
|
if (StringUtils.isEmpty(newValue)) {
|
115
115
|
return;
|
116
116
|
}
|
117
117
|
if (newValue === oldValue) {
|
118
118
|
return;
|
119
119
|
}
|
120
|
-
this.loadFormConfig(true);
|
121
|
-
this.loadGridConfig(true);
|
120
|
+
await this.loadFormConfig(true);
|
121
|
+
await this.loadGridConfig(true);
|
122
122
|
}
|
123
123
|
/**
|
124
124
|
* Registra um formatador de valores para uma coluna da grid.
|
@@ -174,7 +174,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
174
174
|
.concat(extraButtons));
|
175
175
|
}
|
176
176
|
addConfigButton(buttons) {
|
177
|
-
if (this.configName === undefined) {
|
177
|
+
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
178
178
|
return buttons;
|
179
179
|
}
|
180
180
|
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
@@ -285,7 +285,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
285
285
|
if (!this._formConfigAlreadyLoaded) {
|
286
286
|
return;
|
287
287
|
}
|
288
|
-
this.loadFormConfig(true);
|
288
|
+
await this.loadFormConfig(true);
|
289
289
|
}
|
290
290
|
openConfig(viewMode) {
|
291
291
|
this._snkConfigurator.close();
|
@@ -370,8 +370,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
370
370
|
return;
|
371
371
|
}
|
372
372
|
await this.addGridLegacyConfigName();
|
373
|
-
this.loadGridConfig();
|
374
|
-
this.loadFormConfig();
|
373
|
+
await this.loadGridConfig();
|
374
|
+
await this.loadFormConfig();
|
375
375
|
}
|
376
376
|
componentDidRender() {
|
377
377
|
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
@@ -252,7 +252,7 @@ const FieldConfig = class {
|
|
252
252
|
};
|
253
253
|
FieldConfig.style = fieldConfigCss;
|
254
254
|
|
255
|
-
const fieldItemCss = ".sc-field-item-h
|
255
|
+
const fieldItemCss = ".sc-field-item-h{width:100%;display:flex;padding:12px 8px;border-radius:var(--border--radius-small, 4px);border:1px solid #dce0e8;cursor:grab;align-items:center;height:42px;max-height:42px;background:#FAFCFF}.full-width.sc-field-item-h{width:100%}ez-icon.sc-field-item{--ez-icon--color:#A2ABB9}.icons.sc-field-item{display:flex}.label.sc-field-item{display:flex;flex-grow:1;padding-left:8px;font-size:14px;align-items:center;gap:4px;height:22px}.label-text.sc-field-item{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}.required-mark.sc-field-item{color:#cf3105;background:#F7E0E5;width:12px;height:12px;border-radius:50%;display:flex;align-items:center;justify-content:center;padding-top:5px;font-size:16px;align-self:self-start}.actions.sc-field-item{display:flex;flex-direction:row;align-content:center;gap:4px}ez-button.sc-field-item{width:24px;align-items:center;justify-content:center;display:flex}.sc-field-item-h .hiddeble.sc-field-item{transition:0.2s ease-in-out;visibility:hidden;opacity:0}.sc-field-item-h:hover .hiddeble.sc-field-item{visibility:visible;opacity:1}";
|
256
256
|
|
257
257
|
const FieldItem = class {
|
258
258
|
constructor(hostRef) {
|
@@ -5,7 +5,7 @@ import { S as SORTABLE_PATH, d as getFieldsStructure, I as ID_AVAILABLE_FIELDS }
|
|
5
5
|
import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
|
6
6
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
7
7
|
|
8
|
-
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:
|
8
|
+
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:grid;gap:12px;min-height:65px;width:100%;padding:6px 0;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}.group-content.empty-content.sc-fields-layout{position:relative}.group-content.empty-content.sc-fields-layout::before{content:\"Arraste e solte um campo aqui\";color:#cbcfd7;font-size:16px;font-weight:500;text-align:center;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity 0.3s;height:100%;box-sizing:border-box;padding:10px;background:#f9f9f9;border:1px dashed #dce0e8;border-radius:6px}.no-group-container.sc-fields-layout{padding:12px 0;width:100%;border-bottom:1px solid #dce0e8}.no-group-container.sc-fields-layout::before{content:\"Inclua estes campos nos grupos ou deixe-os separados no topo do formulário\";width:100%;display:block;font-size:16px;font-weight:400;color:#AFB6C0;padding-bottom:12px}.add-group-container.sc-fields-layout{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;padding-bottom:12px;gap:6px;cursor:pointer;justify-content:center;width:100%;height:55px}.no-guide-selected.sc-fields-layout{display:block;margin:auto;font-size:24px;color:#AFB6C0;font-weight:500}.ghost.sc-fields-layout{opacity:.5;background:#c8fbe2}";
|
9
9
|
|
10
10
|
const FieldLayoutComponent = class {
|
11
11
|
constructor(hostRef) {
|
@@ -4,7 +4,7 @@ import { I as ID_AVAILABLE_FIELDS } from './FormConfigHelper-49fe72ca.js';
|
|
4
4
|
import { ArrayUtils } from '@sankhyalabs/core';
|
5
5
|
import './constants-7b422de0.js';
|
6
6
|
|
7
|
-
const fieldsSelectorCss = ".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}";
|
7
|
+
const fieldsSelectorCss = ".sc-fields-selector-h{width:33.33333%;display:flex;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);max-width:260px}.fields-label.sc-fields-selector{display:block;font-size:16px;font-weight:500;width:100%}.fields-count.sc-fields-selector{display:block;color:#AFB6C0;font-size:14px;padding:12px 0;font-weight:400;width:100%}.fields-container.sc-fields-selector{display:flex;flex-direction:column;gap:12px;height:calc(100vh - 220px);width:100%}.ghost.sc-fields-selector{opacity:.5;background:#c8fbe2}.filter-input.sc-fields-selector{padding-right:var(--space--2xs, 8px)}";
|
8
8
|
|
9
9
|
const FieldsSelector = class {
|
10
10
|
constructor(hostRef) {
|
@@ -61,7 +61,7 @@ const FieldsSelector = class {
|
|
61
61
|
this.initializeDraggableContainer();
|
62
62
|
}
|
63
63
|
render() {
|
64
|
-
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
64
|
+
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
65
65
|
}
|
66
66
|
get el() { return getElement(this); }
|
67
67
|
};
|