@sankhyalabs/sankhyablocks 2.9.0 → 2.11.0
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/index-9c584423.js +7 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +19 -8
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +24 -9
- package/dist/cjs/snk-crud.cjs.entry.js +19 -5
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +21 -7
- package/dist/cjs/snk-data-unit.cjs.entry.js +49 -10
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +58 -22
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-bbb89cdb.js → taskbar-elements-89bf9399.js} +14 -3
- package/dist/collection/components/snk-application/snk-application.js +12 -6
- package/dist/collection/components/snk-crud/snk-crud.js +41 -4
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +3 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +4 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +49 -10
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-form/snk-form.css +1 -1
- package/dist/collection/components/snk-form/snk-form.js +80 -21
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +8 -1
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +42 -19
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +92 -40
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +96 -45
- package/dist/collection/components/snk-grid/snk-grid.js +44 -6
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +14 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +37 -2
- package/dist/collection/lib/@types/index.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +15 -4
- package/dist/components/snk-application2.js +19 -8
- package/dist/components/snk-config-options2.js +1 -1
- package/dist/components/snk-crud.js +20 -6
- package/dist/components/snk-data-exporter2.js +5 -3
- package/dist/components/snk-data-unit.js +49 -10
- package/dist/components/snk-field-config2.js +1 -1
- package/dist/components/snk-filter-bar2.js +1 -1
- package/dist/components/snk-filter-item2.js +1 -1
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form2.js +59 -23
- package/dist/components/snk-grid2.js +23 -8
- package/dist/components/snk-tab-config2.js +1 -1
- package/dist/components/snk-taskbar2.js +33 -5
- package/dist/esm/index-de5f37a6.js +7 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +19 -8
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +22 -7
- package/dist/esm/snk-crud.entry.js +20 -6
- package/dist/esm/snk-data-exporter_8.entry.js +21 -7
- package/dist/esm/snk-data-unit.entry.js +49 -10
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +58 -22
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-beec3b27.js → taskbar-elements-c8966343.js} +14 -3
- package/dist/sankhyablocks/p-01c361bb.entry.js +1 -0
- package/dist/sankhyablocks/p-05fadb77.js +1 -0
- package/dist/sankhyablocks/p-3ee68d78.entry.js +1 -0
- package/dist/sankhyablocks/p-420d07c4.js +1 -0
- package/dist/sankhyablocks/p-4a5c1d36.entry.js +1 -0
- package/dist/sankhyablocks/{p-3cb9f3ad.entry.js → p-4c759619.entry.js} +1 -1
- package/dist/sankhyablocks/p-9b858e3a.entry.js +1 -0
- package/dist/sankhyablocks/p-a65d6ba3.entry.js +1 -0
- package/dist/sankhyablocks/p-b84c7c61.entry.js +90 -0
- package/dist/sankhyablocks/p-c32cfc29.entry.js +1 -0
- package/dist/sankhyablocks/p-cd19bd29.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +2 -2
- package/dist/types/components/snk-crud/snk-crud.d.ts +8 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +6 -0
- package/dist/types/components/snk-form/snk-form.d.ts +10 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
- package/dist/types/components.d.ts +37 -4
- package/dist/types/lib/@types/index.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -1
- package/dist/types/lib/store/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/sankhyablocks/p-13116d05.entry.js +0 -1
- package/dist/sankhyablocks/p-1faef46c.entry.js +0 -83
- package/dist/sankhyablocks/p-3480f2fa.entry.js +0 -1
- package/dist/sankhyablocks/p-4ca32c86.entry.js +0 -1
- package/dist/sankhyablocks/p-6617d349.entry.js +0 -1
- package/dist/sankhyablocks/p-82e20fc0.entry.js +0 -1
- package/dist/sankhyablocks/p-9d474bc0.entry.js +0 -1
- package/dist/sankhyablocks/p-c8327a5c.js +0 -1
- package/dist/sankhyablocks/p-fc77347c.entry.js +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { ApplicationContext, DateUtils, ObjectUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { h } from '@stencil/core';
|
|
3
|
-
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
|
4
3
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
4
|
+
import { PresentationMode } from '../../lib/@types';
|
|
5
|
+
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
|
5
6
|
export class SnkForm {
|
|
6
7
|
constructor() {
|
|
7
8
|
this._renderTimer = 500;
|
|
8
|
-
this._taskbarProcessor = new TaskbarProcessor({
|
|
9
|
-
"snkForm.regular": ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"],
|
|
10
|
-
"snkForm.finish_edition": ["CANCEL", "SAVE"]
|
|
11
|
-
});
|
|
12
9
|
this._editionFormConfig = {};
|
|
13
10
|
this._insertionFormConfig = {};
|
|
14
11
|
this._showFormConfig = false;
|
|
12
|
+
/**
|
|
13
|
+
* Altera o modo de apresentação dos botões do snk-taskbar.
|
|
14
|
+
*/
|
|
15
|
+
this.presentationMode = PresentationMode.PRIMARY;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Exibe a janela de configurações do formulário.
|
|
@@ -25,6 +26,22 @@ export class SnkForm {
|
|
|
25
26
|
async hideConfig() {
|
|
26
27
|
this._showFormConfig = false;
|
|
27
28
|
}
|
|
29
|
+
getFinishEditionTaskbarButtons() {
|
|
30
|
+
if (this.presentationMode === PresentationMode.PRIMARY) {
|
|
31
|
+
return ["CANCEL", "SAVE"];
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return ["SAVE", "CANCEL"];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
getRegularTaskbarButtons() {
|
|
38
|
+
if (this.presentationMode === PresentationMode.PRIMARY) {
|
|
39
|
+
return ["PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR", "INSERT"];
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return ["INSERT", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "GRID_MODE", "CONFIGURATOR"];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
28
45
|
loadConfig() {
|
|
29
46
|
if (this.configName == undefined) {
|
|
30
47
|
return;
|
|
@@ -128,6 +145,33 @@ export class SnkForm {
|
|
|
128
145
|
closeConfig() {
|
|
129
146
|
this.hideConfig();
|
|
130
147
|
}
|
|
148
|
+
validatePresentationMode() {
|
|
149
|
+
if (Object.values(PresentationMode).includes(this.presentationMode)) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.presentationMode = PresentationMode.PRIMARY;
|
|
153
|
+
}
|
|
154
|
+
dataunitReady() {
|
|
155
|
+
this.loadInsertionConfig();
|
|
156
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
|
157
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
158
|
+
}
|
|
159
|
+
loadTaskbarProcessor() {
|
|
160
|
+
var _a;
|
|
161
|
+
const taskbarId = ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkForm.finish_edition" : "snkForm.regular";
|
|
162
|
+
const disabledButtons = [];
|
|
163
|
+
if (!this._dataState || !this._dataState.hasPrevious) {
|
|
164
|
+
disabledButtons.push("PREVIOUS");
|
|
165
|
+
}
|
|
166
|
+
if (!this._dataState || !this._dataState.hasNext) {
|
|
167
|
+
disabledButtons.push("NEXT");
|
|
168
|
+
}
|
|
169
|
+
this._taskbarProcessor = new TaskbarProcessor({
|
|
170
|
+
"snkForm.regular": this.getRegularTaskbarButtons(),
|
|
171
|
+
"snkForm.finish_edition": this.getFinishEditionTaskbarButtons(),
|
|
172
|
+
});
|
|
173
|
+
this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
|
|
174
|
+
}
|
|
131
175
|
getDisabledButtons() {
|
|
132
176
|
const disabled = [];
|
|
133
177
|
if (!this._dataState.hasPrevious) {
|
|
@@ -138,11 +182,6 @@ export class SnkForm {
|
|
|
138
182
|
}
|
|
139
183
|
return disabled;
|
|
140
184
|
}
|
|
141
|
-
dataunitReady() {
|
|
142
|
-
this.loadInsertionConfig();
|
|
143
|
-
const dataInfo = { dataUnit: this._dataUnit };
|
|
144
|
-
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
145
|
-
}
|
|
146
185
|
componentWillLoad() {
|
|
147
186
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
148
187
|
let parent = this._element.parentElement;
|
|
@@ -170,23 +209,20 @@ export class SnkForm {
|
|
|
170
209
|
this.loadConfig();
|
|
171
210
|
}
|
|
172
211
|
componentWillRender() {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const disabledButtons = [];
|
|
176
|
-
if (!this._dataState || !this._dataState.hasPrevious) {
|
|
177
|
-
disabledButtons.push("PREVIOUS");
|
|
178
|
-
}
|
|
179
|
-
if (!this._dataState || !this._dataState.hasNext) {
|
|
180
|
-
disabledButtons.push("NEXT");
|
|
181
|
-
}
|
|
182
|
-
this._taskbarProcessor.process(taskbarId, this.taskbarManager, this._dataState, disabledButtons);
|
|
212
|
+
this.validatePresentationMode();
|
|
213
|
+
this.loadTaskbarProcessor();
|
|
183
214
|
}
|
|
184
215
|
render() {
|
|
185
216
|
var _a;
|
|
186
217
|
if (!this._dataUnit || !this._dataState) {
|
|
187
218
|
return undefined;
|
|
188
219
|
}
|
|
189
|
-
return (h("section", { class: "snk-form" }, h("div", { class:
|
|
220
|
+
return (h("section", { class: "snk-form" }, h("div", { class: `snk-form__header ez-row
|
|
221
|
+
${this.presentationMode === PresentationMode.PRIMARY ? 'snk-form__header--fixed' : ''}
|
|
222
|
+
` }, this.presentationMode === PresentationMode.PRIMARY &&
|
|
223
|
+
h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm(), "data-element-id": "formToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), h("div", { class: `ez-col
|
|
224
|
+
${this.presentationMode === PresentationMode.PRIMARY ? "ez-col--sd-6 ez-col--tb-6 ez-align--right" : ""}
|
|
225
|
+
` }, h("snk-taskbar", { key: "formTaskbar", "data-element-id": "form", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, primaryButton: ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", dataUnit: this._dataUnit, presentationMode: this.presentationMode }))), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
190
226
|
h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
191
227
|
}
|
|
192
228
|
static get is() { return "snk-form"; }
|
|
@@ -282,6 +318,29 @@ export class SnkForm {
|
|
|
282
318
|
"tags": [],
|
|
283
319
|
"text": "Gerenciador das barras de tarefas. \u00C9 poss\u00EDvel determinar bot\u00F5es espec\u00EDficos\nou mesmo gerenciar o estado dos bot\u00F5es."
|
|
284
320
|
}
|
|
321
|
+
},
|
|
322
|
+
"presentationMode": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "PresentationMode",
|
|
327
|
+
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
|
|
328
|
+
"references": {
|
|
329
|
+
"PresentationMode": {
|
|
330
|
+
"location": "import",
|
|
331
|
+
"path": "../../lib/@types"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"required": false,
|
|
336
|
+
"optional": false,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
|
|
340
|
+
},
|
|
341
|
+
"attribute": "presentation-mode",
|
|
342
|
+
"reflect": false,
|
|
343
|
+
"defaultValue": "PresentationMode.PRIMARY"
|
|
285
344
|
}
|
|
286
345
|
};
|
|
287
346
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
/*@doc Define o espaçamento interno direito do componente arrastável.*/
|
|
3
|
+
--snk-config-options--border: 2px solid var(--color--secondary-200, #D2D3DA);
|
|
4
|
+
|
|
5
|
+
/*private*/
|
|
2
6
|
width: 100%;
|
|
3
|
-
border: 2px solid var(--color--secondary-200);
|
|
4
7
|
border-radius: 15px;
|
|
8
|
+
|
|
9
|
+
/*public*/
|
|
10
|
+
border: var(--snk-config-options--border);
|
|
5
11
|
}
|
|
6
12
|
|
|
7
13
|
.config-options__switch-row {
|
|
14
|
+
/*private*/
|
|
8
15
|
margin-top: -30px;
|
|
9
16
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
/* dimensions */
|
|
3
2
|
/*@doc Define a altura do componente.*/
|
|
4
3
|
--snk-field-config--height: 42px;
|
|
5
4
|
/*@doc Define a largura do componente.*/
|
|
@@ -7,9 +6,7 @@
|
|
|
7
6
|
/*@doc Define a largura do slot que contém o ícone.*/
|
|
8
7
|
--snk-field-config__icon--width: 48px;
|
|
9
8
|
/*@doc Define a altura do componente em modo "slim".*/
|
|
10
|
-
--snk-field-config--height
|
|
11
|
-
|
|
12
|
-
/* general */
|
|
9
|
+
--snk-field-config-slim--height: 32px;
|
|
13
10
|
/*@doc Define o raio da borda do input do componente.*/
|
|
14
11
|
--snk-field-config--border-radius: var(--border--radius-medium, 12px);
|
|
15
12
|
/*@doc Define o tamanho da fonte do input e label do componente.*/
|
|
@@ -20,20 +17,28 @@
|
|
|
20
17
|
--snk-field-config--font-weight: var(--text-weight--medium, 400);
|
|
21
18
|
/*@doc Define a cor da fonte do input e label do componente.*/
|
|
22
19
|
--snk-field-config--color: var(--title--primary, #000);
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
/*@doc Define o espaçamento interno esquerdo do componente.*/
|
|
21
|
+
--snk-field-config--padding-left: var(--space--medium, 6px);
|
|
25
22
|
/*@doc Define a cor de fundo do input.*/
|
|
26
23
|
--snk-field-config__input--background-color: var(--background--medium, #e0e0e0);
|
|
27
24
|
/*@doc Define o estilo da borda do input.*/
|
|
28
25
|
--snk-field-config__input--border: var(--border--medium, 2px solid);
|
|
29
26
|
/*@doc Define a cor da borda do input.*/
|
|
30
27
|
--snk-field-config__input--border-color: var(--background--xlight, #fff);
|
|
31
|
-
|
|
28
|
+
/*@doc Define no modo normal a borda com a mesma cor do bg.*/
|
|
32
29
|
--snk-field-config__required--color: var(--color--error, #FF0000);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
/*@doc Define espeçamento interno esquerdo do label de required.*/
|
|
31
|
+
--snk-field-config__required--padding-left: var(--space--extra-small, 3px);
|
|
32
|
+
/*@doc Define o efeito de visualização do componente.*/
|
|
33
|
+
--snk-field-config__transition--visibility: var(--transition, 0.2s linear);
|
|
34
|
+
/*@doc Define o efeito de opacidade do componente.*/
|
|
35
|
+
--snk-field-config__transition--opacity: var(--transition, 0.15s linear);
|
|
36
|
+
/*@doc Define o z-index do popover.*/
|
|
37
|
+
--snk-field-config__config-popover--z-index: var(--more-visible, 2);
|
|
38
|
+
/*@doc Define a cor de fundo da seta externa do popover.*/
|
|
39
|
+
--snk-field-config__config-outer-arrow--background-color: var(--color--secondary-200, #D2D3DA);
|
|
40
|
+
/*@doc Define o espaçamento interno direito do componente arrastável.*/
|
|
41
|
+
--snk-field-config__draggable--padding-right: var(--space--small, 6px);
|
|
37
42
|
|
|
38
43
|
/***************
|
|
39
44
|
host style
|
|
@@ -55,7 +60,7 @@
|
|
|
55
60
|
align-items: center;
|
|
56
61
|
|
|
57
62
|
/*public*/
|
|
58
|
-
padding-left: var(--
|
|
63
|
+
padding-left: var(--snk-field-config--padding-left);
|
|
59
64
|
font-weight: var(--snk-field-config--font-weight);
|
|
60
65
|
height: var(--snk-field-config--height);
|
|
61
66
|
border-radius: var(--snk-field-config--border-radius);
|
|
@@ -68,74 +73,89 @@
|
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
.field-config__config-popover {
|
|
76
|
+
/*private*/
|
|
71
77
|
width: 40px;
|
|
72
78
|
margin-left: auto;
|
|
73
|
-
|
|
79
|
+
|
|
80
|
+
/*public*/
|
|
81
|
+
z-index: var(--snk-field-config__config-popover--z-index);
|
|
74
82
|
}
|
|
75
83
|
|
|
76
84
|
.field-config__required-label {
|
|
77
|
-
padding-left: var(--space--extra-small, 3px);
|
|
78
|
-
|
|
79
85
|
/*public*/
|
|
80
86
|
color: var(--snk-field-config__required--color);
|
|
87
|
+
padding-left: var(--snk-field-config__required--padding-left);
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
.field-config__add {
|
|
91
|
+
/*private*/
|
|
84
92
|
display: flex;
|
|
85
93
|
margin-left: auto;
|
|
86
|
-
|
|
87
94
|
visibility:hidden;
|
|
88
95
|
opacity:0;
|
|
96
|
+
|
|
97
|
+
/*public*/
|
|
89
98
|
transition: visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity);
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
|
|
93
102
|
.field-config__options {
|
|
103
|
+
/*private*/
|
|
94
104
|
display: flex;
|
|
95
105
|
margin-left: auto;
|
|
96
|
-
|
|
97
106
|
visibility:hidden;
|
|
98
107
|
opacity:0;
|
|
108
|
+
|
|
109
|
+
/*public*/
|
|
99
110
|
transition: visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity);
|
|
100
111
|
}
|
|
101
112
|
|
|
102
113
|
.field-config__options--is-active {
|
|
114
|
+
/*private*/
|
|
103
115
|
display: flex;
|
|
104
116
|
visibility:visible;
|
|
105
117
|
opacity:1;
|
|
106
118
|
}
|
|
107
119
|
|
|
108
120
|
.field-config__remove-icon {
|
|
121
|
+
/*private*/
|
|
109
122
|
margin-right: -15px;
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
.field-config:hover .field-config__options {
|
|
126
|
+
/*private*/
|
|
113
127
|
display: flex;
|
|
114
128
|
visibility:visible;
|
|
115
129
|
opacity:1;
|
|
116
130
|
}
|
|
117
131
|
|
|
118
132
|
.field-config:hover .field-config__add {
|
|
133
|
+
/*private*/
|
|
119
134
|
visibility:visible;
|
|
120
135
|
opacity:1;
|
|
121
136
|
}
|
|
122
137
|
|
|
123
138
|
|
|
124
139
|
.field-config__draggable {
|
|
125
|
-
|
|
140
|
+
/*public*/
|
|
141
|
+
padding-right: var(--snk-field-config__draggable--padding-right);
|
|
126
142
|
}
|
|
127
143
|
|
|
128
144
|
.field-config__config-outer-arrow {
|
|
129
|
-
|
|
145
|
+
/*private*/
|
|
130
146
|
clip-path: polygon(50% 0, 90% 100%, 10% 100%);
|
|
131
147
|
border-radius: 0.25em 0 0 0;
|
|
132
148
|
width: 30px;
|
|
133
149
|
height: 15px;
|
|
134
150
|
padding-top: 3px;
|
|
135
151
|
border-bottom: 1px solid #FFFFFF;
|
|
152
|
+
|
|
153
|
+
/*public*/
|
|
154
|
+
background-color: var(--snk-field-config__config-outer-arrow--background-color);
|
|
136
155
|
}
|
|
137
156
|
|
|
138
157
|
.field-config__config-inner-arrow {
|
|
158
|
+
/*private*/
|
|
139
159
|
background-color: #FFFFFF;
|
|
140
160
|
clip-path: polygon(50% 0, 90% 100%, 10% 100%);
|
|
141
161
|
border-radius: 0.25em 0 0 0;
|
|
@@ -144,6 +164,7 @@
|
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
.ez-box__container ez-collapsible-box {
|
|
167
|
+
/*private*/
|
|
147
168
|
--snk-collapsible-box__header--padding-left: 6px;
|
|
148
169
|
}
|
|
149
170
|
|
|
@@ -153,11 +174,13 @@ ez-icon {
|
|
|
153
174
|
}
|
|
154
175
|
|
|
155
176
|
ez-popover {
|
|
177
|
+
/*private*/
|
|
156
178
|
--snk-popover__box--background-color: transparent;
|
|
157
179
|
--snk-popover__box--box-shadow: none
|
|
158
180
|
}
|
|
159
181
|
|
|
160
182
|
.field-config__options ez-button {
|
|
183
|
+
/*private*/
|
|
161
184
|
--snk-button--background-color: transparent;
|
|
162
185
|
--snk-button--focus--border: none;
|
|
163
186
|
--snk-button--focus--box-shadow: none;
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css
CHANGED
|
@@ -1,74 +1,103 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
/*@doc Define o z-index do componente.*/
|
|
3
|
+
--snk-form-config--z-index: var(--more-visible, 2);
|
|
4
|
+
/*@doc Define a cor de fundo do componente.*/
|
|
5
|
+
--snk-form-config--background-color: var(--background--xlight, #fff);
|
|
6
|
+
/*@doc Define a cor dos icones do componente.*/
|
|
7
|
+
--snk-form-config__icon--color: var(--text--disable, #AFB6C0);
|
|
8
|
+
/*@doc Define o peso do texto do label de contagem de campos disponíveis.*/
|
|
9
|
+
--snk-form-config__label-counter--font-weight: var(--text-weight--extra-small, 200);
|
|
10
|
+
/*@doc Define o raio da borda externa do bloco para adicionar novo grupo.*/
|
|
11
|
+
--snk-form-config__add-group-container--border-radius: var(--border--radius-medium, 12px);
|
|
12
|
+
/*@doc Define a cor de fundo do bloco para adicionar novo grupo.*/
|
|
13
|
+
--snk-form-config__add-group-container--background-color: var(--background--medium, #d2dce9);
|
|
14
|
+
/*@doc Define o espaçamento interno do bloco para adicionar novo grupo.*/
|
|
15
|
+
--snk-form-config__add-group-container--padding: var(--space--small, 6px);
|
|
16
|
+
/*@doc Define a borda interna do bloco para adicionar novo grupo.*/
|
|
17
|
+
--snk-form-config__add-group-content--border: 2px dashed var(--color-strokes, #DCE0E8);
|
|
18
|
+
/*@doc Define o raio da borda interna do bloco para adicionar novo grupo.*/
|
|
19
|
+
--snk-form-config__add-group-content--border-radius: var(--border--radius-small, 6px);
|
|
20
|
+
/*@doc Define o espaçamento interno do label do bloco para adicionar novo grupo.*/
|
|
21
|
+
--snk-form-config__add-group-label--padding: var(--space--large, 24px);
|
|
22
|
+
/*@doc Define o espaçamento interno da área interna do bloco para adicionar novo grupo.*/
|
|
23
|
+
--snk-form-config__btn-add-group--padding: var(--space--large, 24px) var(--space--medium, 12px) 0;
|
|
24
|
+
/*@doc Define o espaçamento interno do botão para adicionar novo grupo.*/
|
|
25
|
+
--snk-form-config__btn-add-group-container--padding: var(--space--medium, 12px);
|
|
26
|
+
/*@doc Define o raio da borda do botão para adicionar novo grupo.*/
|
|
27
|
+
--snk-form-config__btn-add-group-container--border-radius: var(--border--radius-medium, 12px);
|
|
28
|
+
/*@doc Define a borda do botão para adicionar novo grupo.*/
|
|
29
|
+
--snk-form-config__btn-add-group-container--border: 2px solid var(--color-strokes, #DCE0E8);
|
|
30
|
+
/*@doc Define a cor de fundo do botão para adicionar novo grupo.*/
|
|
31
|
+
--snk-form-config__btn-add-group-container--background-color: var(--background--body, #fafcff);
|
|
32
|
+
|
|
8
33
|
/*private*/
|
|
9
34
|
display: flex;
|
|
10
35
|
flex-direction: column;
|
|
11
|
-
position:
|
|
36
|
+
position: fixed;
|
|
12
37
|
top: 0;
|
|
13
38
|
left: 0;
|
|
14
39
|
width: 100%;
|
|
15
40
|
height: 100%;
|
|
16
41
|
|
|
17
42
|
/*public*/
|
|
18
|
-
z-index: var(--
|
|
19
|
-
background-color: var(--background
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.form-config__title {
|
|
23
|
-
display: flex;
|
|
24
|
-
margin: 0;
|
|
25
|
-
line-height: 1.3;
|
|
26
|
-
|
|
27
|
-
/*public*/
|
|
28
|
-
font-family: var(--snk-form-config__title--font-pattern);
|
|
29
|
-
font-weight: var(--snk-form-config__title--weight--large);
|
|
43
|
+
z-index: var(--snk-form-config--z-index);
|
|
44
|
+
background-color: var(--snk-form-config--background-color);
|
|
30
45
|
}
|
|
31
46
|
|
|
32
47
|
.form-config__header-container {
|
|
48
|
+
/*private*/
|
|
33
49
|
display: flex;
|
|
34
50
|
}
|
|
35
51
|
|
|
36
52
|
.form-config__field-container {
|
|
53
|
+
/*private*/
|
|
37
54
|
width: 32%;
|
|
38
55
|
padding: 6px;
|
|
39
56
|
}
|
|
40
57
|
|
|
41
58
|
.form-config__hide-content {
|
|
59
|
+
/*private*/
|
|
42
60
|
display: none;
|
|
43
61
|
}
|
|
44
62
|
|
|
45
63
|
ez-icon .left-icon {
|
|
46
|
-
|
|
64
|
+
/*public*/
|
|
65
|
+
--ez-icon--color: var(--snk-form-config__icon--color);
|
|
47
66
|
}
|
|
48
67
|
|
|
49
68
|
.ez-box__label-counter {
|
|
50
|
-
|
|
51
|
-
margin-top: -7px;
|
|
69
|
+
/*private*/
|
|
70
|
+
margin-top: -7px;
|
|
71
|
+
|
|
72
|
+
/*public*/
|
|
73
|
+
font-weight: var(--snk-form-config__label-counter--font-weight);
|
|
52
74
|
}
|
|
53
75
|
|
|
54
76
|
.form-config__btn-options {
|
|
77
|
+
/*private*/
|
|
55
78
|
--ez-button--min-width: 300px;
|
|
56
|
-
|
|
79
|
+
|
|
80
|
+
/*public*/
|
|
81
|
+
--ez-button--background-color: var(--snk-form-config--background-color);
|
|
57
82
|
}
|
|
58
83
|
|
|
59
84
|
[data-draggable-parent] {
|
|
85
|
+
/*private*/
|
|
60
86
|
position: relative;
|
|
61
87
|
}
|
|
62
88
|
|
|
63
89
|
.form-config__field-config--selected {
|
|
90
|
+
/*private*/
|
|
64
91
|
position: static;
|
|
65
92
|
}
|
|
66
93
|
|
|
67
94
|
.form-config__field-config--dragged .draggable-mirror {
|
|
68
|
-
|
|
95
|
+
/*public*/
|
|
96
|
+
z-index: var(--snk-form-config--z-index);
|
|
69
97
|
}
|
|
70
98
|
|
|
71
99
|
.form-config__config-options {
|
|
100
|
+
/*private*/
|
|
72
101
|
position: relative;
|
|
73
102
|
margin-top: -3px;
|
|
74
103
|
min-width: 100%;
|
|
@@ -77,6 +106,7 @@ ez-icon .left-icon {
|
|
|
77
106
|
|
|
78
107
|
.form-config__tab-container,
|
|
79
108
|
.form-config__fields-available {
|
|
109
|
+
/*private*/
|
|
80
110
|
position: relative;
|
|
81
111
|
height: 100%;
|
|
82
112
|
max-height: calc(100vh - 92px);
|
|
@@ -84,11 +114,13 @@ ez-icon .left-icon {
|
|
|
84
114
|
|
|
85
115
|
.form-config__tab-container .ez-box__container,
|
|
86
116
|
.form-config__fields-available .ez-box__container {
|
|
117
|
+
/*private*/
|
|
87
118
|
align-content: flex-start;
|
|
88
119
|
height: 100%;
|
|
89
120
|
}
|
|
90
121
|
|
|
91
122
|
.form-config__fields-available [data-draggable-parent] {
|
|
123
|
+
/*private*/
|
|
92
124
|
align-content: flex-start;
|
|
93
125
|
overflow-y: auto;
|
|
94
126
|
height: 100%;
|
|
@@ -96,6 +128,7 @@ ez-icon .left-icon {
|
|
|
96
128
|
}
|
|
97
129
|
|
|
98
130
|
.form-config__tab-content {
|
|
131
|
+
/*private*/
|
|
99
132
|
align-content: flex-start;
|
|
100
133
|
overflow-y: auto;
|
|
101
134
|
height: auto;
|
|
@@ -103,83 +136,102 @@ ez-icon .left-icon {
|
|
|
103
136
|
}
|
|
104
137
|
|
|
105
138
|
[data-draggable-element] {
|
|
139
|
+
/*private*/
|
|
106
140
|
cursor: grab;
|
|
107
141
|
}
|
|
108
142
|
|
|
109
143
|
.form-config__actions-button {
|
|
144
|
+
/*private*/
|
|
110
145
|
--ez-actions-button__btn-action--min-width: 235px;
|
|
111
146
|
}
|
|
112
147
|
|
|
113
148
|
.form-config__add-group {
|
|
149
|
+
/*private*/
|
|
114
150
|
position: relative;
|
|
115
151
|
min-height: 120px;
|
|
116
152
|
margin-bottom: 10px;
|
|
117
153
|
}
|
|
118
154
|
|
|
119
155
|
.form-config__add-group-container {
|
|
156
|
+
/*private*/
|
|
120
157
|
position: absolute;
|
|
121
158
|
display: flex;
|
|
122
159
|
flex-wrap: wrap;
|
|
123
160
|
width: 100%;
|
|
124
161
|
box-sizing: border-box;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
162
|
+
|
|
163
|
+
/*public*/
|
|
164
|
+
border-radius: var(--snk-form-config__add-group-container--border-radius);
|
|
165
|
+
background-color: var(--snk-form-config__add-group-container--background-color);
|
|
166
|
+
padding: var(--snk-form-config__add-group-container--padding);
|
|
128
167
|
}
|
|
129
168
|
|
|
130
169
|
.form-config__add-group-content {
|
|
170
|
+
/*private*/
|
|
131
171
|
width: 100%;
|
|
132
172
|
display: flex;
|
|
133
173
|
flex-wrap: wrap;
|
|
134
174
|
justify-content: center;
|
|
135
175
|
align-items: center;
|
|
136
176
|
box-sizing: border-box;
|
|
137
|
-
|
|
138
|
-
|
|
177
|
+
|
|
178
|
+
/*public*/
|
|
179
|
+
border: var(--snk-form-config__add-group-content--border);
|
|
180
|
+
border-radius: var(--snk-form-config__add-group-content--border-radius);
|
|
139
181
|
}
|
|
140
182
|
|
|
141
183
|
.form-config__add-group-label {
|
|
184
|
+
/*private*/
|
|
142
185
|
display: flex;
|
|
143
186
|
justify-content: center;
|
|
144
187
|
box-sizing: border-box;
|
|
145
|
-
|
|
188
|
+
|
|
189
|
+
/*public*/
|
|
190
|
+
padding: var(--snk-form-config__add-group-label--padding);
|
|
146
191
|
}
|
|
147
192
|
|
|
148
193
|
.form-config__btn-add-group {
|
|
194
|
+
/*private*/
|
|
149
195
|
position: relative;
|
|
150
|
-
padding: var(--space--large, 24px) var(--space--medium, 12px) 0;
|
|
151
|
-
}
|
|
152
196
|
|
|
153
|
-
|
|
154
|
-
padding: var(--
|
|
155
|
-
border-radius: var(--border--radius-medium, 12px);
|
|
156
|
-
border: 2px solid var(--color-strokes, #DCE0E8);
|
|
157
|
-
background-color: var(--background--body, #fafcff);
|
|
197
|
+
/*public*/
|
|
198
|
+
padding: var(--snk-form-config__btn-add-group--padding);
|
|
158
199
|
}
|
|
159
200
|
|
|
160
|
-
.form-
|
|
161
|
-
|
|
201
|
+
.form-config__btn-add-group-container {
|
|
202
|
+
/*public*/
|
|
203
|
+
padding: var(--snk-form-config__btn-add-group-container--padding);
|
|
204
|
+
border-radius: var(--snk-form-config__btn-add-group-container--border-radius);
|
|
205
|
+
border: var(--snk-form-config__btn-add-group-container--border);
|
|
206
|
+
background-color: var(--snk-form-config__btn-add-group-container--background-color);
|
|
162
207
|
}
|
|
163
208
|
|
|
164
209
|
ez-collapsible-box.draggable-mirror {
|
|
210
|
+
/*private*/
|
|
165
211
|
display: table;
|
|
166
|
-
|
|
212
|
+
|
|
213
|
+
/*public*/
|
|
214
|
+
background-color: var(--snk-form-config--background-color);
|
|
167
215
|
}
|
|
168
216
|
|
|
169
217
|
ez-collapsible-box{
|
|
218
|
+
/*private*/
|
|
170
219
|
margin-bottom: 10px;
|
|
171
220
|
}
|
|
172
221
|
|
|
173
222
|
@media screen and (min-width: 480px) {
|
|
174
223
|
.form-config__field-config--selected .ez-flex.form-config__config-options {
|
|
224
|
+
/*private*/
|
|
175
225
|
min-width: calc(300% + 12px);
|
|
176
226
|
}
|
|
177
227
|
|
|
178
228
|
.form-config__field-config--selected:nth-child(3n+2) .ez-flex.form-config__config-options {
|
|
229
|
+
/*private*/
|
|
179
230
|
transform: translate(calc(100% / 3 * -1));
|
|
180
231
|
}
|
|
181
232
|
|
|
182
233
|
.form-config__field-config--selected:nth-child(3n+3) .ez-flex.form-config__config-options {
|
|
234
|
+
/*private*/
|
|
183
235
|
transform: translate(calc(100% / 3 * -2));
|
|
184
236
|
}
|
|
185
237
|
}
|