@sankhyalabs/ezui 2.12.0 → 2.14.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ez-tree.cjs.entry.js → ez-filter-input_3.cjs.entry.js} +103 -16
- package/dist/cjs/ez-form.cjs.entry.js +325 -184
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +339 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-form/ez-form.css +1 -1
- package/dist/collection/components/ez-form/ez-form.js +20 -16
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +48 -0
- package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/CheckBox.tpl.js +4 -4
- package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/ComboBox.tpl.js +2 -2
- package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/DateInput.tpl.js +1 -1
- package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/NumberInput.tpl.js +3 -3
- package/dist/collection/components/ez-form/structure/FormItem.js +11 -0
- package/dist/collection/components/ez-form/{FormMetadata.js → structure/FormMetadata.js} +53 -38
- package/dist/collection/components/ez-form/structure/FormSheet.js +6 -0
- package/dist/collection/components/ez-guide-navigator/Guide.js +200 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css +53 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +230 -0
- package/dist/collection/components/ez-tree/ez-tree.js +5 -5
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +1 -1
- package/dist/collection/components/ez-tree/types/Tree.js +0 -11
- package/dist/custom-elements/index.d.ts +6 -6
- package/dist/custom-elements/index.js +667 -337
- package/dist/esm/{ez-tree.entry.js → ez-filter-input_3.entry.js} +103 -18
- package/dist/esm/ez-form.entry.js +327 -186
- package/dist/esm/ez-guide-navigator.entry.js +335 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-6500a260.entry.js +1 -0
- package/dist/ezui/p-6c45dc64.entry.js +1 -0
- package/dist/ezui/p-fa2f4ea5.entry.js +1 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -1
- package/dist/types/components/ez-form/ez-form.d.ts +3 -4
- package/dist/types/components/ez-form/fieldbuilder/FieldBuilder.d.ts +2 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +6 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +15 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/FileInput.tpl.d.ts +5 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +7 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +6 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextArea.tpl.d.ts +5 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextInput.tpl.d.ts +5 -0
- package/dist/types/components/ez-form/store/form.slice.d.ts +2 -2
- package/dist/types/components/ez-form/structure/FormItem.d.ts +9 -0
- package/dist/types/components/ez-form/{FormMetadata.d.ts → structure/FormMetadata.d.ts} +5 -2
- package/dist/types/components/ez-form/structure/FormSheet.d.ts +10 -0
- package/dist/types/components/ez-guide-navigator/Guide.d.ts +69 -0
- package/dist/types/components/ez-tree/types/Tree.d.ts +0 -1
- package/dist/types/components.d.ts +41 -26
- package/dist/types/interfaces/ez-form/IFieldMetadata.d.ts +6 -0
- package/dist/types/interfaces/ez-form/IFieldSetMetadata.d.ts +5 -0
- package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IFormSheetMetadata.d.ts +3 -2
- package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IRecordValidator.d.ts +1 -1
- package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/index.d.ts +2 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -1
- package/react/components.js +1 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +0 -81
- package/dist/cjs/ez-form-view.cjs.entry.js +0 -140
- package/dist/cjs/ez-sidebar-button.cjs.entry.js +0 -31
- package/dist/collection/components/ez-form-view/ez-form-view.css +0 -6
- package/dist/collection/components/ez-form-view/ez-form-view.js +0 -71
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +0 -26
- package/dist/esm/ez-filter-input.entry.js +0 -77
- package/dist/esm/ez-form-view.entry.js +0 -136
- package/dist/esm/ez-sidebar-button.entry.js +0 -27
- package/dist/ezui/p-36ed5c45.entry.js +0 -1
- package/dist/ezui/p-7799666d.entry.js +0 -1
- package/dist/ezui/p-81897c04.entry.js +0 -1
- package/dist/ezui/p-97d2d2f6.entry.js +0 -1
- package/dist/ezui/p-ba03ac61.entry.js +0 -1
- package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +0 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +0 -3
- package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +0 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +0 -4
- package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +0 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +0 -3
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +0 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +0 -2
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +0 -2
- package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +0 -10
- package/dist/types/components/ez-form-view/interfaces/index.d.ts +0 -1
- /package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/FileInput.tpl.js +0 -0
- /package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/SearchInput.tpl.js +0 -0
- /package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/TextArea.tpl.js +0 -0
- /package/dist/collection/components/{ez-form-view/fieldbuilder/templates → ez-form/fieldbuilder/tpl}/TextInput.tpl.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IDefaultConfig.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IFieldConfig.js +0 -0
- /package/dist/collection/{components/ez-form-view/interfaces/IFormViewField.js → interfaces/ez-form/IFieldMetadata.js} +0 -0
- /package/dist/collection/{components/ez-form-view/interfaces/index.js → interfaces/ez-form/IFieldSetMetadata.js} +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IFormConfig.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IFormSheetMetadata.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IInvalidField.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IRecordValidator.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/ITabConfig.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/IValidationResult.js +0 -0
- /package/dist/collection/{components/ez-form/interfaces → interfaces/ez-form}/index.js +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IDefaultConfig.d.ts +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IFieldConfig.d.ts +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IFormConfig.d.ts +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IInvalidField.d.ts +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/ITabConfig.d.ts +0 -0
- /package/dist/types/{components/ez-form/interfaces → interfaces/ez-form}/IValidationResult.d.ts +0 -0
package/react/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,oBAAoB;AACpB,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAM7D,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAA,oBAAoB,CAAkD,mBAAmB,CAAC,CAAC;AACvI,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAA,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAA,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,aAAa,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,cAAc,CAAC,CAAC;AACnH,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA,oBAAoB,CAAkC,UAAU,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA,oBAAoB,CAAgC,SAAS,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAA,oBAAoB,CAAoD,oBAAoB,CAAC,CAAC;AAC3I,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,cAAc,CAAC,CAAC;AACnH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAA,oBAAoB,CAA0C,eAAe,CAAC,CAAC;AACvH,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAA,oBAAoB,CAAkD,oBAAoB,CAAC,CAAC;AACxI,MAAM,CAAC,MAAM,QAAQ,GAAG,aAAa,CAAA,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,aAAa,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA,oBAAoB,CAAwC,cAAc,CAAC,CAAC;AACnH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA,oBAAoB,CAA8C,iBAAiB,CAAC,CAAC;AAC/H,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAA,oBAAoB,CAAgC,SAAS,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-5e208fa5.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const CSSVarsUtils = require('./CSSVarsUtils-af809e73.js');
|
|
8
|
-
|
|
9
|
-
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
10
|
-
|
|
11
|
-
let EzFilterInput = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
15
|
-
/**
|
|
16
|
-
* Se false o usuário não pode interagir com o campo.
|
|
17
|
-
*/
|
|
18
|
-
this.enabled = true;
|
|
19
|
-
/**
|
|
20
|
-
* Define o tamanho do campo.
|
|
21
|
-
*/
|
|
22
|
-
this.mode = "regular";
|
|
23
|
-
}
|
|
24
|
-
observeLabel() {
|
|
25
|
-
if (this._textInput) {
|
|
26
|
-
this._textInput.label = this.label;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
observeErrorMessage() {
|
|
30
|
-
if (this._textInput) {
|
|
31
|
-
this._textInput.errorMessage = this.errorMessage;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
observeValue(newValue, oldValue) {
|
|
35
|
-
if (this._textInput && newValue != oldValue) {
|
|
36
|
-
this._textInput.value = newValue;
|
|
37
|
-
this.ezChange.emit(newValue);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Aplica o foco no campo.
|
|
42
|
-
*/
|
|
43
|
-
async setFocus() {
|
|
44
|
-
this._textInput.setFocus();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Remove o foco do campo.
|
|
48
|
-
*/
|
|
49
|
-
async setBlur() {
|
|
50
|
-
this._textInput.setBlur();
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Retorna se o conteúdo é inválido.
|
|
54
|
-
*/
|
|
55
|
-
async isInvalid() {
|
|
56
|
-
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
57
|
-
}
|
|
58
|
-
changeValue(evt) {
|
|
59
|
-
const newValue = evt.detail;
|
|
60
|
-
this.errorMessage = "";
|
|
61
|
-
if (newValue !== this.value) {
|
|
62
|
-
this.value = newValue;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
componentDidLoad() {
|
|
66
|
-
CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
67
|
-
}
|
|
68
|
-
render() {
|
|
69
|
-
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
70
|
-
return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.changeValue(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
71
|
-
}
|
|
72
|
-
get _elem() { return index.getElement(this); }
|
|
73
|
-
static get watchers() { return {
|
|
74
|
-
"label": ["observeLabel"],
|
|
75
|
-
"errorMessage": ["observeErrorMessage"],
|
|
76
|
-
"value": ["observeValue"]
|
|
77
|
-
}; }
|
|
78
|
-
};
|
|
79
|
-
EzFilterInput.style = ezFilterInputCss;
|
|
80
|
-
|
|
81
|
-
exports.ez_filter_input = EzFilterInput;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-5e208fa5.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const CheckMode = require('./CheckMode-ecb90b87.js');
|
|
8
|
-
|
|
9
|
-
const buildSwitch = (field) => {
|
|
10
|
-
return buildField(field.name, field.label, field.readOnly, true);
|
|
11
|
-
};
|
|
12
|
-
const buildCheckBox = (field) => {
|
|
13
|
-
return buildField(field.name, field.label, field.readOnly, false);
|
|
14
|
-
};
|
|
15
|
-
function buildField(fieldName, fieldLabel, readOnly, switchMode = false) {
|
|
16
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
|
|
17
|
-
index.h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.CheckMode.SWITCH : CheckMode.CheckMode.REGULAR, "data-field-name": fieldName, key: fieldName })));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const buildComboBox = ({ name, label, readOnly, required, props }) => {
|
|
21
|
-
const prop = props === null || props === void 0 ? void 0 : props.options;
|
|
22
|
-
let options;
|
|
23
|
-
if (typeof prop === "string") {
|
|
24
|
-
const parsed = JSON.parse(prop);
|
|
25
|
-
options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
options = prop;
|
|
29
|
-
}
|
|
30
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
31
|
-
index.h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const buildDate = ({ name, label, readOnly }) => {
|
|
35
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
36
|
-
index.h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
37
|
-
};
|
|
38
|
-
const buildTime = ({ name, label, readOnly }) => {
|
|
39
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
40
|
-
index.h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
41
|
-
};
|
|
42
|
-
const buildDateTime = ({ name, label, readOnly }) => {
|
|
43
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
44
|
-
index.h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const buildFile = ({ name, label, readOnly }) => {
|
|
48
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
49
|
-
index.h("ez-upload", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const buildDecimal = ({ name, label, readOnly, props }) => {
|
|
53
|
-
const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
|
|
54
|
-
const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
|
|
55
|
-
return buildNumeric(name, label, readOnly, precision, prettyPrecision);
|
|
56
|
-
};
|
|
57
|
-
const buildInteger = ({ name, label, readOnly }) => {
|
|
58
|
-
return buildNumeric(name, label, readOnly, 0, 0);
|
|
59
|
-
};
|
|
60
|
-
function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision) {
|
|
61
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
62
|
-
index.h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, key: fieldName })));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const buildSearch = ({ name, label, readOnly, required }) => {
|
|
66
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
67
|
-
index.h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name })));
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const buildTextArea = ({ name, label, readOnly }) => {
|
|
71
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small", key: name },
|
|
72
|
-
index.h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name })));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const buildTextInput = ({ name, label, readOnly }) => {
|
|
76
|
-
return (index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
77
|
-
index.h("ez-text-input", { label: label, "data-field-name": name, key: name, enabled: !readOnly })));
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const uiBuilders = new Map();
|
|
81
|
-
uiBuilders.set(core.UserInterface.CHECKBOX, buildCheckBox);
|
|
82
|
-
uiBuilders.set(core.UserInterface.SWITCH, buildSwitch);
|
|
83
|
-
uiBuilders.set(core.UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
84
|
-
uiBuilders.set(core.UserInterface.DATE, buildDate);
|
|
85
|
-
uiBuilders.set(core.UserInterface.TIME, buildTime);
|
|
86
|
-
uiBuilders.set(core.UserInterface.DATETIME, buildDateTime);
|
|
87
|
-
uiBuilders.set(core.UserInterface.FILE, buildFile);
|
|
88
|
-
uiBuilders.set(core.UserInterface.DECIMALNUMBER, buildDecimal);
|
|
89
|
-
uiBuilders.set(core.UserInterface.INTEGERNUMBER, buildInteger);
|
|
90
|
-
uiBuilders.set(core.UserInterface.SEARCH, buildSearch);
|
|
91
|
-
uiBuilders.set(core.UserInterface.LONGTEXT, buildTextArea);
|
|
92
|
-
const fieldBuilder = (field) => {
|
|
93
|
-
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
94
|
-
const label = field.required ? `${field.label} (obrigatório) *` : field.label;
|
|
95
|
-
return builder(Object.assign(Object.assign({}, field), { label }));
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
99
|
-
|
|
100
|
-
let EzFormView = class {
|
|
101
|
-
constructor(hostRef) {
|
|
102
|
-
index.registerInstance(this, hostRef);
|
|
103
|
-
}
|
|
104
|
-
groupFields(fields) {
|
|
105
|
-
const result = new Map();
|
|
106
|
-
fields.forEach(item => {
|
|
107
|
-
const groupLabel = item.group;
|
|
108
|
-
if (groupLabel) {
|
|
109
|
-
let groupFields = result.get(groupLabel);
|
|
110
|
-
if (groupFields == undefined) {
|
|
111
|
-
groupFields = [];
|
|
112
|
-
result.set(groupLabel, groupFields);
|
|
113
|
-
}
|
|
114
|
-
groupFields.push(item);
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
result.set(item.name, item);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
122
|
-
render() {
|
|
123
|
-
core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
124
|
-
if (this.fields == undefined) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
return (index.h(index.Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
128
|
-
if (Array.isArray(value)) {
|
|
129
|
-
return (index.h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
return fieldBuilder(value);
|
|
133
|
-
}
|
|
134
|
-
})));
|
|
135
|
-
}
|
|
136
|
-
get _element() { return index.getElement(this); }
|
|
137
|
-
};
|
|
138
|
-
EzFormView.style = ezFormViewCss;
|
|
139
|
-
|
|
140
|
-
exports.ez_form_view = EzFormView;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-5e208fa5.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
|
|
8
|
-
const ezSidebarButtonCss = ":host{--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--small) var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) 0}";
|
|
9
|
-
|
|
10
|
-
let EzSidebarButton = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.ezClick = index.createEvent(this, "ezClick", 7);
|
|
14
|
-
}
|
|
15
|
-
componentDidLoad() {
|
|
16
|
-
if (this._element) {
|
|
17
|
-
core.ElementIDUtils.addIDInfo(this._element);
|
|
18
|
-
}
|
|
19
|
-
if (this._button) {
|
|
20
|
-
const dataInfo = { id: 'embedded' };
|
|
21
|
-
core.ElementIDUtils.addIDInfo(this._button, 'button', dataInfo);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (index.h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, index.h("span", null)));
|
|
26
|
-
}
|
|
27
|
-
get _element() { return index.getElement(this); }
|
|
28
|
-
};
|
|
29
|
-
EzSidebarButton.style = ezSidebarButtonCss;
|
|
30
|
-
|
|
31
|
-
exports.ez_sidebar_button = EzSidebarButton;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Component, Element, Host, Prop, h } from '@stencil/core';
|
|
2
|
-
import { fieldBuilder } from './fieldbuilder/FieldBuilder';
|
|
3
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
|
-
export class EzFormView {
|
|
5
|
-
groupFields(fields) {
|
|
6
|
-
const result = new Map();
|
|
7
|
-
fields.forEach(item => {
|
|
8
|
-
const groupLabel = item.group;
|
|
9
|
-
if (groupLabel) {
|
|
10
|
-
let groupFields = result.get(groupLabel);
|
|
11
|
-
if (groupFields == undefined) {
|
|
12
|
-
groupFields = [];
|
|
13
|
-
result.set(groupLabel, groupFields);
|
|
14
|
-
}
|
|
15
|
-
groupFields.push(item);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
result.set(item.name, item);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
25
|
-
if (this.fields == undefined) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
return (h(Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
29
|
-
if (Array.isArray(value)) {
|
|
30
|
-
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return fieldBuilder(value);
|
|
34
|
-
}
|
|
35
|
-
})));
|
|
36
|
-
}
|
|
37
|
-
static get is() { return "ez-form-view"; }
|
|
38
|
-
static get encapsulation() { return "scoped"; }
|
|
39
|
-
static get originalStyleUrls() { return {
|
|
40
|
-
"$": ["ez-form-view.css"]
|
|
41
|
-
}; }
|
|
42
|
-
static get styleUrls() { return {
|
|
43
|
-
"$": ["ez-form-view.css"]
|
|
44
|
-
}; }
|
|
45
|
-
static get properties() { return {
|
|
46
|
-
"fields": {
|
|
47
|
-
"type": "unknown",
|
|
48
|
-
"mutable": false,
|
|
49
|
-
"complexType": {
|
|
50
|
-
"original": "Array<IFormViewField>",
|
|
51
|
-
"resolved": "IFormViewField[]",
|
|
52
|
-
"references": {
|
|
53
|
-
"Array": {
|
|
54
|
-
"location": "global"
|
|
55
|
-
},
|
|
56
|
-
"IFormViewField": {
|
|
57
|
-
"location": "import",
|
|
58
|
-
"path": "./interfaces/IFormViewField"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"required": false,
|
|
63
|
-
"optional": false,
|
|
64
|
-
"docs": {
|
|
65
|
-
"tags": [],
|
|
66
|
-
"text": "Define a lista de metadados usada para criar os campos de user interface."
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}; }
|
|
70
|
-
static get elementRef() { return "_element"; }
|
|
71
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { UserInterface } from "@sankhyalabs/core";
|
|
2
|
-
import { buildCheckBox, buildSwitch } from "./templates/CheckBox.tpl";
|
|
3
|
-
import { buildComboBox } from "./templates/ComboBox.tpl";
|
|
4
|
-
import { buildDate, buildTime, buildDateTime } from "./templates/DateInput.tpl";
|
|
5
|
-
import { buildFile } from "./templates/FileInput.tpl";
|
|
6
|
-
import { buildDecimal, buildInteger } from "./templates/NumberInput.tpl";
|
|
7
|
-
import { buildSearch } from "./templates/SearchInput.tpl";
|
|
8
|
-
import { buildTextArea } from "./templates/TextArea.tpl";
|
|
9
|
-
import { buildTextInput } from "./templates/TextInput.tpl";
|
|
10
|
-
const uiBuilders = new Map();
|
|
11
|
-
uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
|
|
12
|
-
uiBuilders.set(UserInterface.SWITCH, buildSwitch);
|
|
13
|
-
uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
14
|
-
uiBuilders.set(UserInterface.DATE, buildDate);
|
|
15
|
-
uiBuilders.set(UserInterface.TIME, buildTime);
|
|
16
|
-
uiBuilders.set(UserInterface.DATETIME, buildDateTime);
|
|
17
|
-
uiBuilders.set(UserInterface.FILE, buildFile);
|
|
18
|
-
uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
|
|
19
|
-
uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
|
|
20
|
-
uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
21
|
-
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
22
|
-
export const fieldBuilder = (field) => {
|
|
23
|
-
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
24
|
-
const label = field.required ? `${field.label} (obrigatório) *` : field.label;
|
|
25
|
-
return builder(Object.assign(Object.assign({}, field), { label }));
|
|
26
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c5203f95.js';
|
|
2
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
|
|
4
|
-
|
|
5
|
-
const ezFilterInputCss = ":host{display:block;width:100%}";
|
|
6
|
-
|
|
7
|
-
let EzFilterInput = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.ezChange = createEvent(this, "ezChange", 7);
|
|
11
|
-
/**
|
|
12
|
-
* Se false o usuário não pode interagir com o campo.
|
|
13
|
-
*/
|
|
14
|
-
this.enabled = true;
|
|
15
|
-
/**
|
|
16
|
-
* Define o tamanho do campo.
|
|
17
|
-
*/
|
|
18
|
-
this.mode = "regular";
|
|
19
|
-
}
|
|
20
|
-
observeLabel() {
|
|
21
|
-
if (this._textInput) {
|
|
22
|
-
this._textInput.label = this.label;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
observeErrorMessage() {
|
|
26
|
-
if (this._textInput) {
|
|
27
|
-
this._textInput.errorMessage = this.errorMessage;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
observeValue(newValue, oldValue) {
|
|
31
|
-
if (this._textInput && newValue != oldValue) {
|
|
32
|
-
this._textInput.value = newValue;
|
|
33
|
-
this.ezChange.emit(newValue);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Aplica o foco no campo.
|
|
38
|
-
*/
|
|
39
|
-
async setFocus() {
|
|
40
|
-
this._textInput.setFocus();
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Remove o foco do campo.
|
|
44
|
-
*/
|
|
45
|
-
async setBlur() {
|
|
46
|
-
this._textInput.setBlur();
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Retorna se o conteúdo é inválido.
|
|
50
|
-
*/
|
|
51
|
-
async isInvalid() {
|
|
52
|
-
return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
|
|
53
|
-
}
|
|
54
|
-
changeValue(evt) {
|
|
55
|
-
const newValue = evt.detail;
|
|
56
|
-
this.errorMessage = "";
|
|
57
|
-
if (newValue !== this.value) {
|
|
58
|
-
this.value = newValue;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
componentDidLoad() {
|
|
62
|
-
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
66
|
-
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.changeValue(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
67
|
-
}
|
|
68
|
-
get _elem() { return getElement(this); }
|
|
69
|
-
static get watchers() { return {
|
|
70
|
-
"label": ["observeLabel"],
|
|
71
|
-
"errorMessage": ["observeErrorMessage"],
|
|
72
|
-
"value": ["observeValue"]
|
|
73
|
-
}; }
|
|
74
|
-
};
|
|
75
|
-
EzFilterInput.style = ezFilterInputCss;
|
|
76
|
-
|
|
77
|
-
export { EzFilterInput as ez_filter_input };
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { h, r as registerInstance, H as Host, g as getElement } from './index-c5203f95.js';
|
|
2
|
-
import { UserInterface, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
|
-
|
|
5
|
-
const buildSwitch = (field) => {
|
|
6
|
-
return buildField(field.name, field.label, field.readOnly, true);
|
|
7
|
-
};
|
|
8
|
-
const buildCheckBox = (field) => {
|
|
9
|
-
return buildField(field.name, field.label, field.readOnly, false);
|
|
10
|
-
};
|
|
11
|
-
function buildField(fieldName, fieldLabel, readOnly, switchMode = false) {
|
|
12
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
|
|
13
|
-
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, key: fieldName })));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const buildComboBox = ({ name, label, readOnly, required, props }) => {
|
|
17
|
-
const prop = props === null || props === void 0 ? void 0 : props.options;
|
|
18
|
-
let options;
|
|
19
|
-
if (typeof prop === "string") {
|
|
20
|
-
const parsed = JSON.parse(prop);
|
|
21
|
-
options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
options = prop;
|
|
25
|
-
}
|
|
26
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
27
|
-
h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const buildDate = ({ name, label, readOnly }) => {
|
|
31
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
32
|
-
h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
33
|
-
};
|
|
34
|
-
const buildTime = ({ name, label, readOnly }) => {
|
|
35
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
36
|
-
h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
37
|
-
};
|
|
38
|
-
const buildDateTime = ({ name, label, readOnly }) => {
|
|
39
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
40
|
-
h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const buildFile = ({ name, label, readOnly }) => {
|
|
44
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
45
|
-
h("ez-upload", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const buildDecimal = ({ name, label, readOnly, props }) => {
|
|
49
|
-
const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
|
|
50
|
-
const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
|
|
51
|
-
return buildNumeric(name, label, readOnly, precision, prettyPrecision);
|
|
52
|
-
};
|
|
53
|
-
const buildInteger = ({ name, label, readOnly }) => {
|
|
54
|
-
return buildNumeric(name, label, readOnly, 0, 0);
|
|
55
|
-
};
|
|
56
|
-
function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision) {
|
|
57
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
58
|
-
h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, key: fieldName })));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const buildSearch = ({ name, label, readOnly, required }) => {
|
|
62
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
63
|
-
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name })));
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const buildTextArea = ({ name, label, readOnly }) => {
|
|
67
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small", key: name },
|
|
68
|
-
h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name })));
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const buildTextInput = ({ name, label, readOnly }) => {
|
|
72
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
73
|
-
h("ez-text-input", { label: label, "data-field-name": name, key: name, enabled: !readOnly })));
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const uiBuilders = new Map();
|
|
77
|
-
uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
|
|
78
|
-
uiBuilders.set(UserInterface.SWITCH, buildSwitch);
|
|
79
|
-
uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
80
|
-
uiBuilders.set(UserInterface.DATE, buildDate);
|
|
81
|
-
uiBuilders.set(UserInterface.TIME, buildTime);
|
|
82
|
-
uiBuilders.set(UserInterface.DATETIME, buildDateTime);
|
|
83
|
-
uiBuilders.set(UserInterface.FILE, buildFile);
|
|
84
|
-
uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
|
|
85
|
-
uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
|
|
86
|
-
uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
87
|
-
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
88
|
-
const fieldBuilder = (field) => {
|
|
89
|
-
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
90
|
-
const label = field.required ? `${field.label} (obrigatório) *` : field.label;
|
|
91
|
-
return builder(Object.assign(Object.assign({}, field), { label }));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
95
|
-
|
|
96
|
-
let EzFormView = class {
|
|
97
|
-
constructor(hostRef) {
|
|
98
|
-
registerInstance(this, hostRef);
|
|
99
|
-
}
|
|
100
|
-
groupFields(fields) {
|
|
101
|
-
const result = new Map();
|
|
102
|
-
fields.forEach(item => {
|
|
103
|
-
const groupLabel = item.group;
|
|
104
|
-
if (groupLabel) {
|
|
105
|
-
let groupFields = result.get(groupLabel);
|
|
106
|
-
if (groupFields == undefined) {
|
|
107
|
-
groupFields = [];
|
|
108
|
-
result.set(groupLabel, groupFields);
|
|
109
|
-
}
|
|
110
|
-
groupFields.push(item);
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
result.set(item.name, item);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return result;
|
|
117
|
-
}
|
|
118
|
-
render() {
|
|
119
|
-
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
120
|
-
if (this.fields == undefined) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
return (h(Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
|
|
124
|
-
if (Array.isArray(value)) {
|
|
125
|
-
return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
return fieldBuilder(value);
|
|
129
|
-
}
|
|
130
|
-
})));
|
|
131
|
-
}
|
|
132
|
-
get _element() { return getElement(this); }
|
|
133
|
-
};
|
|
134
|
-
EzFormView.style = ezFormViewCss;
|
|
135
|
-
|
|
136
|
-
export { EzFormView as ez_form_view };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c5203f95.js';
|
|
2
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
-
|
|
4
|
-
const ezSidebarButtonCss = ":host{--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--small) var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) 0}";
|
|
5
|
-
|
|
6
|
-
let EzSidebarButton = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.ezClick = createEvent(this, "ezClick", 7);
|
|
10
|
-
}
|
|
11
|
-
componentDidLoad() {
|
|
12
|
-
if (this._element) {
|
|
13
|
-
ElementIDUtils.addIDInfo(this._element);
|
|
14
|
-
}
|
|
15
|
-
if (this._button) {
|
|
16
|
-
const dataInfo = { id: 'embedded' };
|
|
17
|
-
ElementIDUtils.addIDInfo(this._button, 'button', dataInfo);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return (h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, h("span", null)));
|
|
22
|
-
}
|
|
23
|
-
get _element() { return getElement(this); }
|
|
24
|
-
};
|
|
25
|
-
EzSidebarButton.style = ezSidebarButtonCss;
|
|
26
|
-
|
|
27
|
-
export { EzSidebarButton as ez_sidebar_button };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as e,h as t,g as i}from"./p-7b80df03.js";import{ElementIDUtils as r}from"@sankhyalabs/core";import{C as a}from"./p-4a5e37a7.js";let h=class{constructor(t){s(this,t),this.ezChange=e(this,"ezChange",7),this.enabled=!0,this.mode="regular"}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){this._textInput&&(this._textInput.errorMessage=this.errorMessage)}observeValue(s,e){this._textInput&&s!=e&&(this._textInput.value=s,this.ezChange.emit(s))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}changeValue(s){const e=s.detail;this.errorMessage="",e!==this.value&&(this.value=e)}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput)}render(){return r.addIDInfoIfNotExists(this._elem,"input"),t("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),ref:s=>this._textInput=s,label:this.label,onEzChange:s=>this.changeValue(s),value:this.value,enabled:this.enabled,errorMessage:this.errorMessage,restrict:this.restrict,mode:this.mode},t("ez-icon",{slot:"leftIcon",iconName:"search"}))}get _elem(){return i(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};h.style=":host{display:block;width:100%}";export{h as ez_filter_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as t,c as i,f as r,H as s,g as o}from"./p-7b80df03.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const a=(e,t)=>t?e.iconExpanded||"chevron-down":e.iconContracted||"chevron-right",h=e=>e.tooltip||e.label,l=t=>{const{node:i,selectedId:r,itemClick:s,iconClick:o,iconResolver:a,tooltipResolver:h,itemsList:c}=t,d=i.item,m=t.level||1,v=i.isDisabled(),u=!v&&d.expanded,b=i.isExpandable(),g=!v&&!i.isPlaceHolder;return g&&c.push(d),e("ul",{title:h(d,!v,m),class:1===m?"first-level":void 0},e("li",Object.assign({class:"tree-item",onClick:()=>g&&s(d)},{disabled:v,selected:d.id===r,[n.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:n.getInternalIDInfo(`ezTreeItem_${d.id}`)}),e("div",{class:"item-icon-box"},b&&e("ez-icon",{id:d.id,class:"item-icon",size:"small",iconName:a(d,u,m),onClick:()=>g&&o(d)})),e("label",{class:"item-label"},d.label)),u&&i.getChildren().map((t=>e(l,{selectedId:r,node:t,itemClick:s,iconClick:o,level:m+1,iconResolver:a,tooltipResolver:h,itemsList:c}))))};class c{constructor(e,t,i,r=!1){this.children=new Map,this.item=t,this.parent=i,this._tree=e,this.isPlaceHolder=r,t&&!r?(this._isLazyLoad="function"==typeof t.children||t.childrenCount>0,Array.isArray(t.children)&&(Array.from(t.children).forEach((e=>this.addChild(this._tree,e))),this._childrenLoaded=!0)):(this._isLazyLoad=!1,this._childrenLoaded=!0)}refresh(e){if(this.isPlaceHolder)return;this.item=Object.assign(Object.assign({},e),{expanded:this.item.expanded}),this._isLazyLoad="function"==typeof this.item.children||this.item.childrenCount>0;const t=this.children;this.children=new Map,Array.isArray(this.item.children)?(Array.from(this.item.children).forEach((e=>{const i=t.get(e.id);i?(i.refresh(e),this.children.set(e.id,i)):this.addChild(this._tree,Object.assign({},e))})),this._childrenLoaded=!0):this._childrenLoaded=!1}isDisabled(){return!this.isPlaceHolder&&this._tree.isNodeDisabled(this.item.id,this.item.disabled)}updateChildren(e){this.isPlaceHolder||this.refresh(Object.assign(Object.assign({},this.item),{children:e}))}addChild(e,t){this.children.has(t.id)||this.children.set(t.id,new c(e,t,this))}addPlaceHolder(){this.children.clear();const e=this.item.id;this.children.set(e,new c(void 0,{id:`placeholder_${e}`,label:"Carregando..."},this,!0))}getNode(e){if(this.children.has(e))return this.children.get(e);const t=Array.from(this.children.values());for(const i of t){const t=i.getNode(e);if(t)return t}}needLoad(){return this._isLazyLoad&&!this._childrenLoaded}isExpandable(){return this._isLazyLoad||this.children.size>0||Array.isArray(this.item.children)}getChildren(){return this.isPlaceHolder?[]:(this.needLoad()&&this._tree.loadChildren(this),Array.from(this.children.values()))}}class d extends c{constructor(e){super(void 0),this._disabledValues=new Map,this._changeCallback=e}async addChildAt(e,t){const i=this.getNode(e);null!=i&&(i.addChild(this,t),this._changeCallback())}setDisabled(e,t){this._disabledValues.set(e,t),this._changeCallback()}isNodeDisabled(e,t){return this._disabledValues.has(e)?this._disabledValues.get(e):t}load(e){const t=this.children;this.children=new Map,e.forEach((e=>{const i=t.get(e.id);i?(i.refresh(e),this.children.set(e.id,i)):this.addChild(this,Object.assign({},e))}))}updateItem(e){if(null==e)return;const t=this.getNode(e.id);null!=t&&(Object.keys(e).forEach((i=>t.item[i]=e[i])),this._changeCallback())}async open(e){return new Promise((async t=>{await this.walk(this,e,(e=>e.item.expanded=!0)),t()}))}async walk(e,t,i,r=0){return new Promise((async s=>{const o=t.split(">>").map((e=>e.trim()));if(o.length>r){const s=e.getNode(o[r]);s&&(s.needLoad()&&await this.loadLevel(s),i(s),await this.walk(s,t,i,r+1))}s()}))}async loadChildren(e){return new Promise((t=>{this.loadLevel(e).then((()=>{t(),this._changeCallback()}))}))}async loadLevel(e){return new Promise((t=>{e.addPlaceHolder(),(0,e.item.children)(e.item).then((i=>{e.updateChildren(i),t()}))}))}}let m=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezOpenItem=i(this,"ezOpenItem",7),this._tree=new d((()=>r(this))),this._onItemClick=e=>{this.value=e},this._onIconClick=e=>{this.openClose(e),this.value=e},this.items=[],this.iconResolver=a,this.tooltipResolver=h}async selectItem(e){const t=this._tree.getNode(e);this.value=t?t.item:void 0}async openItem(e){this._waintingForLoad=!0,await this._tree.open(e),this._waintingForLoad=!1}async disableItem(e){[].concat(e).forEach((e=>this._tree.setDisabled(e,!0)))}async enableItem(e){[].concat(e).forEach((e=>this._tree.setDisabled(e,!1)))}async addChild(e,t){var i;null==t&&(t=null===(i=this.value)||void 0===i?void 0:i.id),this._tree.addChildAt(t,e);const r=this._tree.getNode(t);r&&(r.item.expanded=!0)}observeItems(){this._tree.load(this.items)}observeValue(){var e;this.ezChange.emit(this.value),this.selectedId=null===(e=this.value)||void 0===e?void 0:e.id}onKeyDownListener(e){if(!this.value)return;let t=!1;switch(e.key){case"ArrowUp":this.previousItem(),t=!0;break;case"ArrowDown":this.nextItem(),t=!0;break;case"ArrowLeft":this.previousLevel(),t=!0;break;case"ArrowRight":this.nextLevel(),t=!0;break;case" ":this.openClose(this.value),t=!0}t&&(e.stopPropagation(),e.preventDefault())}openClose(e){if(null==e)return;const t=!e.expanded;e.expanded=t,t&&this.ezOpenItem.emit(e),this._tree.updateItem(e)}previousLevel(){var e;if(this.value)if(this.value.expanded)this.value.expanded=!1,this._tree.updateItem(this.value);else{const t=null===(e=this._tree.getNode(this.value.id).parent)||void 0===e?void 0:e.item;t&&(this.value=t)}}nextLevel(){this.value&&this._tree.getNode(this.value.id).isExpandable()&&(this.value.expanded?this.nextItem():(this.value.expanded=!0,this._tree.updateItem(this.value)))}indexOf(e){if(null==e)return-1;for(let t=0;t<this._visibleItems.length;t++)if(this._visibleItems[t].id===e)return t;return-1}selectNextItem(e){var t;const i=this.indexOf(null===(t=this.value)||void 0===t?void 0:t.id)+e;i>-1&&i<this._visibleItems.length&&(this.value=this._visibleItems[i])}nextItem(){this.selectNextItem(1)}previousItem(){this.selectNextItem(-1)}connectedCallback(){this.items&&this._tree.load(this.items)}componentWillRender(){var e;if(!this.selectedId||(null===(e=this.value)||void 0===e?void 0:e.id)===this.selectedId)return;const t=this._tree.getNode(this.selectedId);t?this.value=t.item:this.selectedId=void 0}render(){if(n.addIDInfoIfNotExists(this._element,"ezTree"),null!=this.items)return this._visibleItems=[],e(s,{tabindex:"-1"},this._waintingForLoad?e("label",null,"Carregando..."):this._tree.getChildren().map((t=>{var i;return e(l,{selectedId:null===(i=this.value)||void 0===i?void 0:i.id,node:t,itemClick:this._onItemClick,iconClick:this._onIconClick,iconResolver:this.iconResolver,tooltipResolver:this.tooltipResolver,itemsList:this._visibleItems})})))}get _element(){return o(this)}static get watchers(){return{items:["observeItems"],value:["observeValue"]}}};m.style=":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding)}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";export{m as ez_tree}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,c as a,h as e,g as t}from"./p-7b80df03.js";import{ElementIDUtils as o}from"@sankhyalabs/core";let d=class{constructor(e){r(this,e),this.ezClick=a(this,"ezClick",7)}componentDidLoad(){this._element&&o.addIDInfo(this._element),this._button&&o.addIDInfo(this._button,"button",{id:"embedded"})}render(){return e("button",{type:"button",onClick:()=>{this.ezClick.emit()},ref:r=>this._button=r},e("span",null))}get _element(){return t(this)}};d.style=":host{--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--small) var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) var(--ez-sidebar-button--space--medium) 0}";export{d as ez_sidebar_button}
|