@sankhyalabs/ezui 1.1.96 → 1.1.99
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/{StringUtils-0ba09df4.js → AssetsUtils-69356e76.js} +22 -0
- package/dist/cjs/UnitMetadata-63c56042.js +1311 -0
- package/dist/cjs/{ez-calendar_14.cjs.entry.js → ez-calendar_16.cjs.entry.js} +227 -35
- package/dist/cjs/ez-grid.cjs.entry.js +38 -19
- package/dist/cjs/ez-modal_2.cjs.entry.js +3 -4
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-form/DataBinder.js +12 -0
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -2
- package/dist/collection/components/ez-icon/ez-icon.css +5 -0
- package/dist/custom-elements/index.js +219 -6314
- package/dist/esm/{StringUtils-cbf10229.js → AssetsUtils-0e207bec.js} +22 -1
- package/dist/esm/UnitMetadata-109880b0.js +1305 -0
- package/dist/esm/{ez-calendar_14.entry.js → ez-calendar_16.entry.js} +194 -4
- package/dist/esm/ez-grid.entry.js +23 -4
- package/dist/esm/ez-modal_2.entry.js +2 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- 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-6714a1b2.entry.js → p-18de871c.entry.js} +10 -10
- package/dist/ezui/p-9fab5606.js +1 -0
- package/dist/ezui/p-a30309ce.entry.js +1 -0
- package/dist/ezui/{p-2617733e.entry.js → p-afb820c1.entry.js} +1 -1
- package/dist/ezui/p-c3f30dff.entry.js +1 -0
- package/dist/ezui/p-ec7c1b86.js +1 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
- package/package.json +2 -2
- package/dist/cjs/AssetsUtils-4909c6de.js +0 -24
- package/dist/cjs/CSSVarsUtils-8fbdf2e0.js +0 -19
- package/dist/cjs/ez-icon.cjs.entry.js +0 -42
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/index-6164b259.js +0 -7460
- package/dist/esm/AssetsUtils-9b1329a3.js +0 -22
- package/dist/esm/CSSVarsUtils-667e0016.js +0 -17
- package/dist/esm/ez-icon.entry.js +0 -38
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/index-74a9c220.js +0 -7452
- package/dist/ezui/p-2f84ba72.js +0 -1
- package/dist/ezui/p-38589c64.entry.js +0 -1
- package/dist/ezui/p-477bb703.js +0 -1
- package/dist/ezui/p-a943d501.entry.js +0 -1
- package/dist/ezui/p-b139372f.entry.js +0 -1
- package/dist/ezui/p-c6762896.js +0 -1
- package/dist/ezui/p-d54c157f.js +0 -1
- package/dist/ezui/p-ef393d36.entry.js +0 -1
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { a as getAssetPath, s as setAssetPath } from './index-6b8bfbeb.js';
|
|
2
|
-
|
|
3
|
-
const getSpritePath = (sprite) => `${getContextAssetsPath("../assets/actions-sprite.svg")}#${sprite}`;
|
|
4
|
-
let ctxLoaded = false;
|
|
5
|
-
function getContextAssetsPath(resource) {
|
|
6
|
-
if (!ctxLoaded) {
|
|
7
|
-
const scriptElem = document.querySelector("script[data-ezui-assets-url]");
|
|
8
|
-
if (scriptElem) {
|
|
9
|
-
let assetsPath = scriptElem.dataset.ezuiAssetsUrl;
|
|
10
|
-
if (assetsPath) {
|
|
11
|
-
if (assetsPath.startsWith('/')) {
|
|
12
|
-
assetsPath = window.location.origin + assetsPath;
|
|
13
|
-
}
|
|
14
|
-
setAssetPath(assetsPath);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ctxLoaded = true;
|
|
18
|
-
}
|
|
19
|
-
return getAssetPath(resource);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { getSpritePath as g };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
class CSSVarsUtils {
|
|
2
|
-
static applyVarsTextInput(host, child) {
|
|
3
|
-
if (child) {
|
|
4
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
5
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
6
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
static applyIfExists(host, element, varName) {
|
|
10
|
-
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
11
|
-
if (prop) {
|
|
12
|
-
element.style.setProperty(varName, prop);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { CSSVarsUtils as C };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-6b8bfbeb.js';
|
|
2
|
-
import { S as StringUtils } from './StringUtils-cbf10229.js';
|
|
3
|
-
import './index-74a9c220.js';
|
|
4
|
-
|
|
5
|
-
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:\"\\ea01\"}.ez-icon-account:before{content:\"\\ea02\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea03\"}.ez-icon-alert-circle:before{content:\"\\ea04\"}.ez-icon-alert-mail:before{content:\"\\ea05\"}.ez-icon-alert-outline:before{content:\"\\ea06\"}.ez-icon-alert-popup:before{content:\"\\ea07\"}.ez-icon-apps:before{content:\"\\ea08\"}.ez-icon-arrow_back:before{content:\"\\ea09\"}.ez-icon-bell-inverted:before{content:\"\\ea0a\"}.ez-icon-bell:before{content:\"\\ea0b\"}.ez-icon-business-center:before{content:\"\\ea0c\"}.ez-icon-calendar-text:before{content:\"\\ea0d\"}.ez-icon-calendar:before{content:\"\\ea0e\"}.ez-icon-check-circle-inverted:before{content:\"\\ea0f\"}.ez-icon-check-circle:before{content:\"\\ea10\"}.ez-icon-check:before{content:\"\\ea11\"}.ez-icon-chevron-down:before{content:\"\\ea12\"}.ez-icon-chevron-left:before{content:\"\\ea13\"}.ez-icon-chevron-right:before{content:\"\\ea14\"}.ez-icon-chevron-up:before{content:\"\\ea15\"}.ez-icon-circle--medium:before{content:\"\\ea16\"}.ez-icon-circle:before{content:\"\\ea17\"}.ez-icon-clipboard:before{content:\"\\ea18\"}.ez-icon-close-circle-inverted:before{content:\"\\ea19\"}.ez-icon-close-circle:before{content:\"\\ea1a\"}.ez-icon-close:before{content:\"\\ea1b\"}.ez-icon-comment-inverted:before{content:\"\\ea1c\"}.ez-icon-comment:before{content:\"\\ea1d\"}.ez-icon-configuration:before{content:\"\\ea1e\"}.ez-icon-copy:before{content:\"\\ea1f\"}.ez-icon-crop:before{content:\"\\ea20\"}.ez-icon-delete:before{content:\"\\ea21\"}.ez-icon-description:before{content:\"\\ea22\"}.ez-icon-dot-notification:before{content:\"\\ea23\"}.ez-icon-dots-horizontal:before{content:\"\\ea24\"}.ez-icon-dots-vertical:before{content:\"\\ea25\"}.ez-icon-drag-indicator:before{content:\"\\ea26\"}.ez-icon-edit-file:before{content:\"\\ea27\"}.ez-icon-edit-table:before{content:\"\\ea28\"}.ez-icon-edit-time:before{content:\"\\ea29\"}.ez-icon-edit:before{content:\"\\ea2a\"}.ez-icon-email-inverted:before{content:\"\\ea2b\"}.ez-icon-email:before{content:\"\\ea2c\"}.ez-icon-error-octagon:before{content:\"\\ea2d\"}.ez-icon-expand:before{content:\"\\ea2e\"}.ez-icon-eye-off:before{content:\"\\ea2f\"}.ez-icon-eye:before{content:\"\\ea30\"}.ez-icon-favorite:before{content:\"\\ea31\"}.ez-icon-file-download:before{content:\"\\ea32\"}.ez-icon-file-upload:before{content:\"\\ea33\"}.ez-icon-filter:before{content:\"\\ea34\"}.ez-icon-find-file:before{content:\"\\ea35\"}.ez-icon-find-page:before{content:\"\\ea36\"}.ez-icon-format-color-fill:before{content:\"\\ea37\"}.ez-icon-help-circle-outline:before{content:\"\\ea38\"}.ez-icon-help-inverted:before{content:\"\\ea39\"}.ez-icon-help:before{content:\"\\ea3a\"}.ez-icon-home:before{content:\"\\ea3b\"}.ez-icon-language:before{content:\"\\ea3c\"}.ez-icon-launch:before{content:\"\\ea3d\"}.ez-icon-lightbulb:before{content:\"\\ea3e\"}.ez-icon-list:before{content:\"\\ea3f\"}.ez-icon-loading:before{content:\"\\ea40\"}.ez-icon-lock-outline:before{content:\"\\ea41\"}.ez-icon-lock:before{content:\"\\ea42\"}.ez-icon-menu:before{content:\"\\ea43\"}.ez-icon-minus-circle-inverted:before{content:\"\\ea44\"}.ez-icon-minus:before{content:\"\\ea45\"}.ez-icon-money-off:before{content:\"\\ea46\"}.ez-icon-money:before{content:\"\\ea47\"}.ez-icon-north-west:before{content:\"\\ea48\"}.ez-icon-pause:before{content:\"\\ea49\"}.ez-icon-payments:before{content:\"\\ea4a\"}.ez-icon-play:before{content:\"\\ea4b\"}.ez-icon-plus-circle-inverted:before{content:\"\\ea4c\"}.ez-icon-plus-circle:before{content:\"\\ea4d\"}.ez-icon-plus:before{content:\"\\ea4e\"}.ez-icon-power:before{content:\"\\ea4f\"}.ez-icon-push-pin:before{content:\"\\ea50\"}.ez-icon-restore:before{content:\"\\ea51\"}.ez-icon-return:before{content:\"\\ea52\"}.ez-icon-rotate:before{content:\"\\ea53\"}.ez-icon-save:before{content:\"\\ea54\"}.ez-icon-search:before{content:\"\\ea55\"}.ez-icon-settings-inverted:before{content:\"\\ea56\"}.ez-icon-settings:before{content:\"\\ea57\"}.ez-icon-share:before{content:\"\\ea58\"}.ez-icon-shield:before{content:\"\\ea59\"}.ez-icon-south-east:before{content:\"\\ea5a\"}.ez-icon-success-circle:before{content:\"\\ea5b\"}.ez-icon-sync:before{content:\"\\ea5c\"}.ez-icon-table:before{content:\"\\ea5d\"}.ez-icon-timer-outline:before{content:\"\\ea5e\"}.ez-icon-user-circle:before{content:\"\\ea5f\"}.ez-icon-warning-minus:before{content:\"\\ea60\"}.ez-icon-warning-triangle:before{content:\"\\ea61\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|
|
6
|
-
|
|
7
|
-
let EzIcon = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
/**
|
|
11
|
-
* Tamanho do ícone
|
|
12
|
-
*/
|
|
13
|
-
this.size = 'medium';
|
|
14
|
-
}
|
|
15
|
-
isSprite() {
|
|
16
|
-
return this.href && this.href.indexOf('#') > -1;
|
|
17
|
-
}
|
|
18
|
-
getIconClassName() {
|
|
19
|
-
return `ez-icon-${this.iconName}`;
|
|
20
|
-
}
|
|
21
|
-
getIconContent() {
|
|
22
|
-
if (this.isSprite()) {
|
|
23
|
-
return h("svg", { class: this.size, role: "img" }, h("use", { xlinkHref: this.href }));
|
|
24
|
-
}
|
|
25
|
-
else if (!StringUtils.isEmpty(this.iconName)) {
|
|
26
|
-
return h("span", { class: `icon-content ${this.getIconClassName()} ${this.size}--font` });
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
return h("img", { class: this.size, src: this.href });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return (h(Host, null, this.getIconContent()));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
EzIcon.style = ezIconCss;
|
|
37
|
-
|
|
38
|
-
export { EzIcon as ez_icon };
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-6b8bfbeb.js';
|
|
2
|
-
import { M as MaskFormatter, T as TimeFormatter, N as NumberUtils } from './index-74a9c220.js';
|
|
3
|
-
import { C as CSSVarsUtils } from './CSSVarsUtils-667e0016.js';
|
|
4
|
-
import { g as getSpritePath } from './AssetsUtils-9b1329a3.js';
|
|
5
|
-
|
|
6
|
-
const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
|
|
7
|
-
|
|
8
|
-
let EzTimeInput = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
/**
|
|
12
|
-
* Deixa o campo disponível ou não para digitação.
|
|
13
|
-
*/
|
|
14
|
-
this.enabled = true;
|
|
15
|
-
/**
|
|
16
|
-
* Define se o componente irá ou não considerar os segundos
|
|
17
|
-
*/
|
|
18
|
-
this.showSeconds = false;
|
|
19
|
-
}
|
|
20
|
-
prepareMask() {
|
|
21
|
-
if (this.showSeconds) {
|
|
22
|
-
if (this._maskFormatter == undefined) {
|
|
23
|
-
this._maskFormatter = new MaskFormatter("##:##:##");
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this._maskFormatter.mask = "##:##:##";
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
if (this._maskFormatter == undefined) {
|
|
31
|
-
this._maskFormatter = new MaskFormatter("##:##");
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this._maskFormatter.mask = "##:##";
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
onValueChanged() {
|
|
39
|
-
if (this.value === NaN) {
|
|
40
|
-
this.value = undefined;
|
|
41
|
-
this.handleFocusout();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//---------------------------------------------
|
|
45
|
-
// Public methods
|
|
46
|
-
//---------------------------------------------
|
|
47
|
-
/**
|
|
48
|
-
* Faz o foco no componente de input
|
|
49
|
-
*/
|
|
50
|
-
async setFocus() {
|
|
51
|
-
this._inputElem.focus();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Remove o foco no componente de input
|
|
55
|
-
*/
|
|
56
|
-
async setBlur() {
|
|
57
|
-
this._inputElem.blur();
|
|
58
|
-
}
|
|
59
|
-
//---------------------------------------------
|
|
60
|
-
// Event handlers
|
|
61
|
-
//---------------------------------------------
|
|
62
|
-
handleFocusout() {
|
|
63
|
-
this.errorMessage = "";
|
|
64
|
-
this.prepareValue(this.viewValue);
|
|
65
|
-
if (!TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
66
|
-
this.clearField();
|
|
67
|
-
this.errorMessage = "Favor inserir um horário válido.";
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
prepareValue(value) {
|
|
71
|
-
try {
|
|
72
|
-
this.viewValue = TimeFormatter.prepareValue(value, this.showSeconds);
|
|
73
|
-
}
|
|
74
|
-
catch (e) {
|
|
75
|
-
this.clearField();
|
|
76
|
-
this.errorMessage = e.message;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
clearField() {
|
|
80
|
-
this.viewValue = this.value = undefined;
|
|
81
|
-
}
|
|
82
|
-
handleChange() {
|
|
83
|
-
this.viewValue = this._inputElem.value;
|
|
84
|
-
this.value = NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
85
|
-
}
|
|
86
|
-
//---------------------------------------------
|
|
87
|
-
// Lifecycle web component
|
|
88
|
-
//---------------------------------------------
|
|
89
|
-
componentDidLoad() {
|
|
90
|
-
this.onValueChanged();
|
|
91
|
-
CSSVarsUtils.applyVarsTextInput(this._elem, this._inputElem);
|
|
92
|
-
}
|
|
93
|
-
componentWillLoad() {
|
|
94
|
-
this.prepareMask();
|
|
95
|
-
if (this.value) {
|
|
96
|
-
this.prepareValue(this.value.toString());
|
|
97
|
-
}
|
|
98
|
-
else if (this.viewValue) {
|
|
99
|
-
this.prepareValue(this.viewValue);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
render() {
|
|
103
|
-
return (h(Host, null, h("ez-text-input", { ref: (el) => this._inputElem = el, value: this.viewValue, enabled: this.enabled, label: this.label, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, errorMessage: this.errorMessage }, h("ez-icon", { slot: "leftIcon", href: getSpritePath("timer-outline") }))));
|
|
104
|
-
}
|
|
105
|
-
static get assetsDirs() { return ["../assets"]; }
|
|
106
|
-
get _elem() { return getElement(this); }
|
|
107
|
-
static get watchers() { return {
|
|
108
|
-
"showSeconds": ["prepareMask"],
|
|
109
|
-
"value": ["onValueChanged"]
|
|
110
|
-
}; }
|
|
111
|
-
};
|
|
112
|
-
EzTimeInput.style = ezTimeInputCss;
|
|
113
|
-
|
|
114
|
-
export { EzTimeInput as ez_time_input };
|