@sankhyalabs/sankhyablocks 1.1.24 → 1.1.25
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/ApplicationUtils-05b74ee9.js +39 -0
- package/dist/cjs/AssetsUtils-7e3c38f9.js +24 -0
- package/dist/cjs/CSSVarsUtils-75ca9c64.js +19 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +27 -0
- package/dist/cjs/ez-application.cjs.entry.js +26 -0
- package/dist/cjs/ez-button_4.cjs.entry.js +660 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +223 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +47 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +278 -0
- package/dist/cjs/ez-date-input.cjs.entry.js +102 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +145 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +89 -0
- package/dist/cjs/ez-form.cjs.entry.js +463 -0
- package/dist/cjs/ez-grid.cjs.entry.js +647 -0
- package/dist/cjs/ez-icon.cjs.entry.js +41 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +104 -0
- package/dist/cjs/ez-modal_2.cjs.entry.js +316 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +86 -0
- package/dist/cjs/ez-popover.cjs.entry.js +120 -0
- package/dist/cjs/ez-popup.cjs.entry.js +48 -0
- package/dist/cjs/ez-search.cjs.entry.js +64 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js +198 -0
- package/dist/cjs/ez-text-area.cjs.entry.js +114 -0
- package/dist/cjs/ez-text-input.cjs.entry.js +201 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +118 -0
- package/dist/cjs/ez-toast.cjs.entry.js +44 -0
- package/dist/cjs/ez-upload.cjs.entry.js +356 -0
- package/dist/cjs/index-682c98b2.js +1771 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +6 -41
- package/dist/cjs/test-du.cjs.entry.js +76 -0
- package/dist/collection/collection-manifest.json +36 -1
- package/dist/collection/components/snk-application/snk-application.js +2 -1
- package/dist/{collection/temp → components}/ApplicationUtils.js +37 -36
- package/dist/components/AssetsUtils.js +22 -0
- package/dist/components/CSSVarsUtils.js +17 -0
- package/dist/components/ez-action-chip.js +44 -0
- package/dist/components/ez-application.js +39 -0
- package/dist/components/ez-button.js +6 -0
- package/dist/components/ez-button2.js +105 -0
- package/dist/components/ez-calendar.js +6 -0
- package/dist/components/ez-calendar2.js +242 -0
- package/dist/components/ez-check.js +6 -0
- package/dist/components/ez-check2.js +94 -0
- package/dist/components/ez-collapsible-box.js +67 -0
- package/dist/components/ez-combo-box.js +6 -0
- package/dist/components/ez-combo-box2.js +311 -0
- package/dist/components/ez-date-input.js +135 -0
- package/dist/components/ez-date-time-input.js +179 -0
- package/dist/components/ez-dialog.js +124 -0
- package/dist/components/ez-form.js +6 -0
- package/dist/components/ez-form2.js +485 -0
- package/dist/components/ez-grid.js +738 -0
- package/dist/components/ez-icon.js +6 -0
- package/dist/components/ez-icon2.js +56 -0
- package/dist/components/ez-label-chip.js +125 -0
- package/dist/components/ez-list.js +6 -0
- package/dist/components/ez-list2.js +523 -0
- package/dist/components/ez-modal.js +6 -0
- package/dist/components/ez-modal2.js +82 -0
- package/dist/components/ez-number-input.js +115 -0
- package/dist/components/ez-popover.js +145 -0
- package/dist/components/ez-popup.js +67 -0
- package/dist/components/ez-search.js +100 -0
- package/dist/components/ez-tabselector.js +6 -0
- package/dist/components/ez-tabselector2.js +213 -0
- package/dist/components/ez-text-area.js +137 -0
- package/dist/components/ez-text-input.js +6 -0
- package/dist/components/ez-text-input2.js +223 -0
- package/dist/components/ez-time-input.js +153 -0
- package/dist/components/ez-toast.js +64 -0
- package/dist/components/ez-upload.js +382 -0
- package/dist/components/grid-config.js +6 -0
- package/dist/components/grid-config2.js +318 -0
- package/dist/components/select-box.js +6 -0
- package/dist/components/select-box2.js +47 -0
- package/dist/components/snk-application.js +1 -36
- package/dist/components/test-du.js +101 -0
- package/dist/esm/ApplicationUtils-e0b6d857.js +37 -0
- package/dist/esm/AssetsUtils-6e6624dc.js +22 -0
- package/dist/esm/CSSVarsUtils-0787c3f3.js +17 -0
- package/dist/esm/ez-action-chip.entry.js +23 -0
- package/dist/esm/ez-application.entry.js +22 -0
- package/dist/esm/ez-button_4.entry.js +653 -0
- package/dist/esm/ez-calendar.entry.js +219 -0
- package/dist/esm/ez-collapsible-box.entry.js +43 -0
- package/dist/esm/ez-combo-box.entry.js +274 -0
- package/dist/esm/ez-date-input.entry.js +98 -0
- package/dist/esm/ez-date-time-input.entry.js +141 -0
- package/dist/esm/ez-dialog.entry.js +85 -0
- package/dist/esm/ez-form.entry.js +459 -0
- package/dist/esm/ez-grid.entry.js +643 -0
- package/dist/esm/ez-icon.entry.js +37 -0
- package/dist/esm/ez-label-chip.entry.js +100 -0
- package/dist/esm/ez-modal_2.entry.js +311 -0
- package/dist/esm/ez-number-input.entry.js +82 -0
- package/dist/esm/ez-popover.entry.js +116 -0
- package/dist/esm/ez-popup.entry.js +44 -0
- package/dist/esm/ez-search.entry.js +60 -0
- package/dist/esm/ez-tabselector.entry.js +194 -0
- package/dist/esm/ez-text-area.entry.js +110 -0
- package/dist/esm/ez-text-input.entry.js +197 -0
- package/dist/esm/ez-time-input.entry.js +114 -0
- package/dist/esm/ez-toast.entry.js +40 -0
- package/dist/esm/ez-upload.entry.js +352 -0
- package/dist/esm/index-35088a3f.js +1740 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +2 -37
- package/dist/esm/test-du.entry.js +72 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +67 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +180 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +319 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +327 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +162 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +217 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +49 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +527 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +5 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +31 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +129 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +10 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +176 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +139 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +335 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +358 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +44 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +405 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +3 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +138 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +165 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +196 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +10 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +127 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +568 -0
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/sankhyablocks/p-0183d259.entry.js +1 -0
- package/dist/sankhyablocks/p-01f23a70.entry.js +1 -0
- package/dist/sankhyablocks/p-07c32f68.entry.js +1 -0
- package/dist/sankhyablocks/p-0f90499d.entry.js +1 -0
- package/dist/sankhyablocks/p-105724a3.entry.js +1 -0
- package/dist/sankhyablocks/p-2ac02d48.entry.js +1 -0
- package/dist/sankhyablocks/p-35364a97.entry.js +1 -0
- package/dist/sankhyablocks/p-3f6aa9a7.entry.js +1 -0
- package/dist/sankhyablocks/p-5f9af495.entry.js +1 -0
- package/dist/sankhyablocks/p-60967cf0.js +1 -0
- package/dist/sankhyablocks/p-6ce33b60.entry.js +57 -0
- package/dist/sankhyablocks/p-70ad6c16.entry.js +1 -0
- package/dist/sankhyablocks/p-710bfffe.entry.js +1 -0
- package/dist/sankhyablocks/p-735440c1.entry.js +1 -0
- package/dist/sankhyablocks/p-811b4b9d.js +1 -0
- package/dist/sankhyablocks/p-813fe4f7.js +1 -0
- package/dist/sankhyablocks/p-85a9446b.js +2 -0
- package/dist/sankhyablocks/p-89a1100f.entry.js +1 -0
- package/dist/sankhyablocks/p-8b543003.entry.js +1 -0
- package/dist/sankhyablocks/p-9750632b.entry.js +1 -0
- package/dist/sankhyablocks/p-a96272f7.entry.js +1 -0
- package/dist/sankhyablocks/p-ac8842e5.entry.js +1 -0
- package/dist/sankhyablocks/p-ba64cc41.entry.js +1 -0
- package/dist/sankhyablocks/p-c1ede043.entry.js +1 -0
- package/dist/sankhyablocks/p-d90ebb85.entry.js +1 -0
- package/dist/sankhyablocks/p-e17dfaae.entry.js +1 -0
- package/dist/sankhyablocks/p-e5355a29.entry.js +1 -0
- package/dist/sankhyablocks/p-ef04b633.entry.js +1 -0
- package/dist/sankhyablocks/p-f6db07fb.entry.js +1 -0
- package/dist/sankhyablocks/p-fcd9bd92.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +29 -0
- package/react/components.js +29 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/index-4720dab8.js +0 -735
- package/dist/esm/index-72d4e2e0.js +0 -709
- package/dist/sankhyablocks/p-45635e4f.entry.js +0 -57
- package/dist/sankhyablocks/p-a33afc3b.js +0 -2
- package/dist/types/temp/ApplicationUtils.d.ts +0 -11
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getSpritePath } from './AssetsUtils.js';
|
|
3
|
+
import { StringUtils } from '@sankhyalabs/core';
|
|
4
|
+
import { d as defineCustomElement$8 } from './ez-button2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './ez-check2.js';
|
|
6
|
+
import { d as defineCustomElement$6 } from './ez-combo-box2.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './ez-icon2.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './ez-list2.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './ez-tabselector2.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './ez-text-input2.js';
|
|
11
|
+
import { d as defineCustomElement$1 } from './select-box2.js';
|
|
12
|
+
|
|
13
|
+
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, \"Sora\");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}";
|
|
14
|
+
|
|
15
|
+
const GridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.__registerHost();
|
|
19
|
+
this.configFinish = createEvent(this, "configFinish", 7);
|
|
20
|
+
this.configCancel = createEvent(this, "configCancel", 7);
|
|
21
|
+
this._columnListHistory = [];
|
|
22
|
+
this._orderListItems = [];
|
|
23
|
+
this._columListItems = [];
|
|
24
|
+
this.selectedTab = "Colunas";
|
|
25
|
+
this._selectedIndex = -1;
|
|
26
|
+
}
|
|
27
|
+
/* Creation Methods */
|
|
28
|
+
createOrderList() {
|
|
29
|
+
var _a;
|
|
30
|
+
let newList = [];
|
|
31
|
+
if (((_a = this._columnListHistory) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
32
|
+
this._columnListHistory.find(group => group.group === "Visíveis").items.forEach(column => {
|
|
33
|
+
let item = { label: column.label };
|
|
34
|
+
newList.push(item);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.columns.forEach(column => {
|
|
39
|
+
let item = { name: column.name, label: column.label };
|
|
40
|
+
if (!column.hidden) {
|
|
41
|
+
newList.push(item);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
this._orderListItems = newList;
|
|
46
|
+
}
|
|
47
|
+
createColumnList() {
|
|
48
|
+
let visibleGroup = {
|
|
49
|
+
group: 'Visíveis',
|
|
50
|
+
items: [],
|
|
51
|
+
};
|
|
52
|
+
let hiddenGroup = {
|
|
53
|
+
group: 'Ocultas',
|
|
54
|
+
items: [],
|
|
55
|
+
sort: 'ASC'
|
|
56
|
+
};
|
|
57
|
+
this.columns.forEach(column => {
|
|
58
|
+
let item = { label: column.label };
|
|
59
|
+
if (column.hidden) {
|
|
60
|
+
hiddenGroup.items.push(item);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
visibleGroup.items.push(item);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
if (this._columnListHistory.length <= 0) {
|
|
67
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
buildColumnListSlot(item, group) {
|
|
71
|
+
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
|
|
72
|
+
}
|
|
73
|
+
buildOrderListSlot(item) {
|
|
74
|
+
let existingItem = this.columns.find(columnItem => columnItem.label === item.label);
|
|
75
|
+
return (h("div", null, h("select-box", { selectedOption: existingItem === null || existingItem === void 0 ? void 0 : existingItem.sort, key: 'select-box' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item); } })));
|
|
76
|
+
}
|
|
77
|
+
updateOrder(sortOrder, updatedItem) {
|
|
78
|
+
let newList = [...this.columns];
|
|
79
|
+
let newItem = newList.find(item => item.label === updatedItem.label);
|
|
80
|
+
if (newItem) {
|
|
81
|
+
newItem.sort = sortOrder.value;
|
|
82
|
+
}
|
|
83
|
+
this.columns = newList;
|
|
84
|
+
}
|
|
85
|
+
/* Actions Methods */
|
|
86
|
+
switchColumnGroup(ev, switchedItem) {
|
|
87
|
+
ev.stopPropagation();
|
|
88
|
+
let newList = [...this._columListItems];
|
|
89
|
+
if (ev.detail === true) {
|
|
90
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
91
|
+
let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
92
|
+
if (index >= 0) {
|
|
93
|
+
hiddenGroup.items.splice(index, 1);
|
|
94
|
+
}
|
|
95
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
96
|
+
visibleGroup.items.push(switchedItem);
|
|
97
|
+
this._columListItems = newList;
|
|
98
|
+
this.createOrderList();
|
|
99
|
+
}
|
|
100
|
+
else if (ev.detail === false) {
|
|
101
|
+
let visibleGroup = newList.find(group => group.group === "Visíveis");
|
|
102
|
+
let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
|
|
103
|
+
if (index >= 0) {
|
|
104
|
+
visibleGroup.items.splice(index, 1);
|
|
105
|
+
}
|
|
106
|
+
let hiddenGroup = newList.find(group => group.group === "Ocultas");
|
|
107
|
+
hiddenGroup.items.push(switchedItem);
|
|
108
|
+
this._columListItems = newList;
|
|
109
|
+
this.createOrderList();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
finish() {
|
|
113
|
+
let newColumnList = [];
|
|
114
|
+
this._columListItems.forEach(group => {
|
|
115
|
+
group.items.forEach(item => {
|
|
116
|
+
const baseColumn = this.columns.find(column => column.label === item.label);
|
|
117
|
+
let newColumnItem = Object.assign({}, baseColumn);
|
|
118
|
+
if (group.group === "Ocultas") {
|
|
119
|
+
newColumnItem.hidden = true;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
newColumnItem.hidden = false;
|
|
123
|
+
}
|
|
124
|
+
newColumnList.push(newColumnItem);
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
this._columnListHistory = [];
|
|
128
|
+
this.columns = newColumnList;
|
|
129
|
+
this.configFinish.emit(this.columns);
|
|
130
|
+
}
|
|
131
|
+
async locateColumn(evt, searchingText) {
|
|
132
|
+
var _a;
|
|
133
|
+
const hitEnter = evt.key === "Enter";
|
|
134
|
+
if (!searchingText) {
|
|
135
|
+
searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
136
|
+
}
|
|
137
|
+
let newSelected = -1;
|
|
138
|
+
if (this.selectedTab === "Ordenação das linhas") {
|
|
139
|
+
if (searchingText) {
|
|
140
|
+
const matchedIndexes = [];
|
|
141
|
+
let orderListDatasource;
|
|
142
|
+
await this._orderList.getList().then(listGroup => {
|
|
143
|
+
orderListDatasource = listGroup;
|
|
144
|
+
orderListDatasource.forEach((column, index) => {
|
|
145
|
+
if (this.compareWords(column, searchingText)) {
|
|
146
|
+
matchedIndexes.push(index);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
if (matchedIndexes.length > 0) {
|
|
151
|
+
if (hitEnter) {
|
|
152
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
153
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
154
|
+
newSelected = matchedIndexes[j];
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (newSelected === -1) {
|
|
160
|
+
newSelected = matchedIndexes[0];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
this._selectedIndex = newSelected;
|
|
164
|
+
let selectedColumn;
|
|
165
|
+
selectedColumn = orderListDatasource[newSelected];
|
|
166
|
+
if (selectedColumn) {
|
|
167
|
+
this._orderList.setSelection({ label: selectedColumn.label }, true);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this._orderList.setSelection(undefined);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this._orderList.setSelection(undefined);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
if (searchingText) {
|
|
179
|
+
const matchedIndexes = [];
|
|
180
|
+
this.columns.forEach((column, index) => {
|
|
181
|
+
if (this.compareWords(column, searchingText)) {
|
|
182
|
+
matchedIndexes.push(index);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
if (matchedIndexes.length > 0) {
|
|
186
|
+
if (hitEnter) {
|
|
187
|
+
for (let j = 0; j < matchedIndexes.length; j++) {
|
|
188
|
+
if (matchedIndexes[j] > this._selectedIndex) {
|
|
189
|
+
newSelected = matchedIndexes[j];
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (newSelected === -1) {
|
|
195
|
+
newSelected = matchedIndexes[0];
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
this._selectedIndex = newSelected;
|
|
199
|
+
let selectedColumn = this.columns[newSelected];
|
|
200
|
+
if (selectedColumn) {
|
|
201
|
+
this._columnList.setSelection({ label: selectedColumn.label }, true);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this._columnList.setSelection(undefined);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
this._columnList.setSelection(undefined);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
compareWords(column, searchingText) {
|
|
213
|
+
if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
closeConfig() {
|
|
219
|
+
this._columnListHistory = [];
|
|
220
|
+
this.configCancel.emit();
|
|
221
|
+
}
|
|
222
|
+
/* Handlers */
|
|
223
|
+
handleTabChange(ev) {
|
|
224
|
+
var _a;
|
|
225
|
+
if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
|
|
226
|
+
if (ev.target.selectedTab === "Ordenação das linhas") {
|
|
227
|
+
this._columnListHistory = this._columnList.dataSource;
|
|
228
|
+
this.createOrderList();
|
|
229
|
+
}
|
|
230
|
+
this.selectedTab = ev.target.selectedTab;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
handleColumnListChange(ev) {
|
|
234
|
+
var _a;
|
|
235
|
+
if (ev.detail) {
|
|
236
|
+
let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
|
|
237
|
+
if (visibleItems) {
|
|
238
|
+
this._orderListItems = visibleItems;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
componentWillRender() {
|
|
243
|
+
var _a;
|
|
244
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
245
|
+
this.createColumnList();
|
|
246
|
+
this.createOrderList();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
componentDidRender() {
|
|
250
|
+
var _a;
|
|
251
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
252
|
+
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
render() {
|
|
256
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "heigth-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
|
|
257
|
+
}
|
|
258
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
259
|
+
static get style() { return gridConfigCss; }
|
|
260
|
+
}, [2, "grid-config", {
|
|
261
|
+
"selectedTab": [1025, "selected-tab"],
|
|
262
|
+
"columns": [1040]
|
|
263
|
+
}]);
|
|
264
|
+
function defineCustomElement() {
|
|
265
|
+
if (typeof customElements === "undefined") {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const components = ["grid-config", "ez-button", "ez-check", "ez-combo-box", "ez-icon", "ez-list", "ez-tabselector", "ez-text-input", "select-box"];
|
|
269
|
+
components.forEach(tagName => { switch (tagName) {
|
|
270
|
+
case "grid-config":
|
|
271
|
+
if (!customElements.get(tagName)) {
|
|
272
|
+
customElements.define(tagName, GridConfig);
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
case "ez-button":
|
|
276
|
+
if (!customElements.get(tagName)) {
|
|
277
|
+
defineCustomElement$8();
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
case "ez-check":
|
|
281
|
+
if (!customElements.get(tagName)) {
|
|
282
|
+
defineCustomElement$7();
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
case "ez-combo-box":
|
|
286
|
+
if (!customElements.get(tagName)) {
|
|
287
|
+
defineCustomElement$6();
|
|
288
|
+
}
|
|
289
|
+
break;
|
|
290
|
+
case "ez-icon":
|
|
291
|
+
if (!customElements.get(tagName)) {
|
|
292
|
+
defineCustomElement$5();
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
case "ez-list":
|
|
296
|
+
if (!customElements.get(tagName)) {
|
|
297
|
+
defineCustomElement$4();
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case "ez-tabselector":
|
|
301
|
+
if (!customElements.get(tagName)) {
|
|
302
|
+
defineCustomElement$3();
|
|
303
|
+
}
|
|
304
|
+
break;
|
|
305
|
+
case "ez-text-input":
|
|
306
|
+
if (!customElements.get(tagName)) {
|
|
307
|
+
defineCustomElement$2();
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
case "select-box":
|
|
311
|
+
if (!customElements.get(tagName)) {
|
|
312
|
+
defineCustomElement$1();
|
|
313
|
+
}
|
|
314
|
+
break;
|
|
315
|
+
} });
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export { GridConfig as G, defineCustomElement as d };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './ez-combo-box2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './ez-text-input2.js';
|
|
4
|
+
|
|
5
|
+
const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
|
6
|
+
|
|
7
|
+
const SelectBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
|
13
|
+
this.selectedOption = { value: "na", label: "N/A" };
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("ez-combo-box", { class: "grid-config-combo inverted", label: "", value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
|
|
17
|
+
}
|
|
18
|
+
static get assetsDirs() { return ["../assets"]; }
|
|
19
|
+
static get style() { return selectBoxCss; }
|
|
20
|
+
}, [1, "select-box", {
|
|
21
|
+
"selectedOption": [1, "selected-option"]
|
|
22
|
+
}]);
|
|
23
|
+
function defineCustomElement() {
|
|
24
|
+
if (typeof customElements === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const components = ["select-box", "ez-combo-box", "ez-text-input"];
|
|
28
|
+
components.forEach(tagName => { switch (tagName) {
|
|
29
|
+
case "select-box":
|
|
30
|
+
if (!customElements.get(tagName)) {
|
|
31
|
+
customElements.define(tagName, SelectBox);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
case "ez-combo-box":
|
|
35
|
+
if (!customElements.get(tagName)) {
|
|
36
|
+
defineCustomElement$2();
|
|
37
|
+
}
|
|
38
|
+
break;
|
|
39
|
+
case "ez-text-input":
|
|
40
|
+
if (!customElements.get(tagName)) {
|
|
41
|
+
defineCustomElement$1();
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { SelectBox as S, defineCustomElement as d };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { DataUnit, ChangeOperation, DateUtils, StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
4
|
|
|
4
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
6
|
|
|
@@ -6861,42 +6862,6 @@ class ParametersFetcher {
|
|
|
6861
6862
|
}
|
|
6862
6863
|
}
|
|
6863
6864
|
|
|
6864
|
-
class ApplicationUtils {
|
|
6865
|
-
static async showDialog(title, message, icon = null, confirm, critical = false) {
|
|
6866
|
-
return new Promise(resolve => {
|
|
6867
|
-
let dialog = document.querySelector("ez-dialog");
|
|
6868
|
-
if (!dialog) {
|
|
6869
|
-
dialog = document.createElement("ez-dialog");
|
|
6870
|
-
window.document.body.appendChild(dialog);
|
|
6871
|
-
}
|
|
6872
|
-
dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
|
|
6873
|
-
});
|
|
6874
|
-
}
|
|
6875
|
-
static async alert(title, message, icon = null) {
|
|
6876
|
-
return ApplicationUtils.showDialog(title, message, icon, false, false);
|
|
6877
|
-
}
|
|
6878
|
-
static async error(title, message, icon = null) {
|
|
6879
|
-
return ApplicationUtils.showDialog(title, message, icon, false, true);
|
|
6880
|
-
}
|
|
6881
|
-
static async confirm(title, message, icon = null, critical = false) {
|
|
6882
|
-
return ApplicationUtils.showDialog(title, message, icon, true, critical);
|
|
6883
|
-
}
|
|
6884
|
-
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
6885
|
-
let toast = document.querySelector("ez-toast");
|
|
6886
|
-
if (!toast) {
|
|
6887
|
-
toast = document.createElement("ez-toast");
|
|
6888
|
-
window.document.body.appendChild(toast);
|
|
6889
|
-
}
|
|
6890
|
-
toast.canClose = options.canClose;
|
|
6891
|
-
toast.message = message;
|
|
6892
|
-
toast.fadeTime = 4000;
|
|
6893
|
-
toast.show();
|
|
6894
|
-
}
|
|
6895
|
-
}
|
|
6896
|
-
ApplicationUtils.defaultMessageOptions = {
|
|
6897
|
-
canClose: true
|
|
6898
|
-
};
|
|
6899
|
-
|
|
6900
6865
|
class ResourceFetcher {
|
|
6901
6866
|
constructor() {
|
|
6902
6867
|
this.templateByQuery = new Map();
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { DataUnit, DataType, UserInterface } from '@sankhyalabs/core';
|
|
3
|
+
import { d as defineCustomElement$3 } from './ez-form2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './ez-tabselector2.js';
|
|
5
|
+
|
|
6
|
+
const testDuCss = ":host{display:block}";
|
|
7
|
+
|
|
8
|
+
const TestDu$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
}
|
|
13
|
+
/*private _ezButton// : HTMLEzButton;
|
|
14
|
+
private _ezComboBox// : HTMLEzComboBox;
|
|
15
|
+
private _ezDateInput// : HTMLEzDateInput;
|
|
16
|
+
private _ezDateTimeInput// : HTMLEzDateTimeInput;
|
|
17
|
+
private _ezNumberInput// : HTMLEzNumberInput
|
|
18
|
+
private _ezSearch// : HTMLEzSearch
|
|
19
|
+
private _ezUpload// : HTMLEzUpload*/
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
this.dataUnit = new DataUnit("testes_com_formulario");
|
|
22
|
+
this.dataUnit.metadata = {
|
|
23
|
+
name: "dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",
|
|
24
|
+
label: "Parceiro",
|
|
25
|
+
fields: [
|
|
26
|
+
{
|
|
27
|
+
name: "CODPARC",
|
|
28
|
+
label: "Parceiro",
|
|
29
|
+
dataType: DataType.NUMBER,
|
|
30
|
+
userInterface: UserInterface.SEARCH,
|
|
31
|
+
required: true,
|
|
32
|
+
properties: {}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "RECDESP",
|
|
36
|
+
label: "Receita/Despesa",
|
|
37
|
+
dataType: DataType.TEXT,
|
|
38
|
+
userInterface: UserInterface.OPTIONSELECTOR,
|
|
39
|
+
required: true,
|
|
40
|
+
properties: { options: `{"-1": "Despesa", "1": "Receita"}` }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "P",
|
|
44
|
+
label: "pera",
|
|
45
|
+
dataType: DataType.TEXT,
|
|
46
|
+
userInterface: UserInterface.OPTIONSELECTOR,
|
|
47
|
+
properties: { options: `{"M": "Madura", "V": "Verde", "P": "Passada"}` }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "ME",
|
|
51
|
+
label: "ME",
|
|
52
|
+
dataType: DataType.NUMBER,
|
|
53
|
+
userInterface: UserInterface.DECIMALNUMBER,
|
|
54
|
+
properties: { precision: 4, prettyPrecision: 1 }
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
this.dataUnit.dataLoader = () => new Promise(accept => accept([
|
|
59
|
+
{
|
|
60
|
+
__record__id__: "1321321321321321",
|
|
61
|
+
CODPARC: 10,
|
|
62
|
+
NOMEPARC: "Parceiro 10",
|
|
63
|
+
P: "M",
|
|
64
|
+
L: "Bagaço",
|
|
65
|
+
LI: "Azedo"
|
|
66
|
+
}
|
|
67
|
+
]));
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
return (h("ez-form", { dataUnit: this.dataUnit }));
|
|
71
|
+
}
|
|
72
|
+
static get style() { return testDuCss; }
|
|
73
|
+
}, [0, "test-du"]);
|
|
74
|
+
function defineCustomElement$1() {
|
|
75
|
+
if (typeof customElements === "undefined") {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const components = ["test-du", "ez-form", "ez-tabselector"];
|
|
79
|
+
components.forEach(tagName => { switch (tagName) {
|
|
80
|
+
case "test-du":
|
|
81
|
+
if (!customElements.get(tagName)) {
|
|
82
|
+
customElements.define(tagName, TestDu$1);
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
case "ez-form":
|
|
86
|
+
if (!customElements.get(tagName)) {
|
|
87
|
+
defineCustomElement$3();
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case "ez-tabselector":
|
|
91
|
+
if (!customElements.get(tagName)) {
|
|
92
|
+
defineCustomElement$2();
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
} });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const TestDu = TestDu$1;
|
|
99
|
+
const defineCustomElement = defineCustomElement$1;
|
|
100
|
+
|
|
101
|
+
export { TestDu, defineCustomElement };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class ApplicationUtils {
|
|
2
|
+
static async showDialog(title, message, icon = null, confirm, critical = false) {
|
|
3
|
+
return new Promise(resolve => {
|
|
4
|
+
let dialog = document.querySelector("ez-dialog");
|
|
5
|
+
if (!dialog) {
|
|
6
|
+
dialog = document.createElement("ez-dialog");
|
|
7
|
+
window.document.body.appendChild(dialog);
|
|
8
|
+
}
|
|
9
|
+
dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
static async alert(title, message, icon = null) {
|
|
13
|
+
return ApplicationUtils.showDialog(title, message, icon, false, false);
|
|
14
|
+
}
|
|
15
|
+
static async error(title, message, icon = null) {
|
|
16
|
+
return ApplicationUtils.showDialog(title, message, icon, false, true);
|
|
17
|
+
}
|
|
18
|
+
static async confirm(title, message, icon = null, critical = false) {
|
|
19
|
+
return ApplicationUtils.showDialog(title, message, icon, true, critical);
|
|
20
|
+
}
|
|
21
|
+
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
22
|
+
let toast = document.querySelector("ez-toast");
|
|
23
|
+
if (!toast) {
|
|
24
|
+
toast = document.createElement("ez-toast");
|
|
25
|
+
window.document.body.appendChild(toast);
|
|
26
|
+
}
|
|
27
|
+
toast.canClose = options.canClose;
|
|
28
|
+
toast.message = message;
|
|
29
|
+
toast.fadeTime = 4000;
|
|
30
|
+
toast.show();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
ApplicationUtils.defaultMessageOptions = {
|
|
34
|
+
canClose: true
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { ApplicationUtils as A };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { a as getAssetPath, s as setAssetPath } from './index-35088a3f.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 };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-35088a3f.js';
|
|
2
|
+
|
|
3
|
+
const ezActionChipCss = ":host{--ez-action-chip--height:36px;--ez-action-chip--border-radius:var(--border--radius-large, 24px);--ez-action-chip__border:1px solid;--ez-action-chip__border-color-strokes:var(--color--strokes, #DCE0E8);--ez-action-chip--font-size:var(--text--medium, 14px);--ez-action-chip--font-family:var(--font-pattern, Arial);--ez-action-chip--font-weight:var(--text-weight--large, 500);--ez-action-chip__label--title--primary:var(--title--primary, #919191);--ez-action-chip__label-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-action-chip__label__default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-action-chip__label__default--border-color--hover:var(--color--primary-600, #007a5a)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;background-color:#FFFFFF;align-items:center;align-self:center;cursor:pointer;color:var(--ez-action-chip__label--title--primary);fill:var(--ez-action-chip__label--title--primary);border:var(--ez-action-chip__border);border-radius:var(--ez-action-chip--border-radius);border-color:var(--ez-action-chip__border-color-strokes);padding-right:var(--space--medium, 12px);padding-left:var(--space--medium, 12px)}.label__container:hover{border-color:var(--ez-action-chip__label__default--border-color--hover);background-color:var(--ez-action-chip__label__default--background-color--hover)}label{display:flex;align-items:center;font-weight:var(--text-weight--large, 600);cursor:pointer;height:var(--ez-action-chip--height);font-family:var(--ez-action-chip--font-family);font-size:var(--ez-action-chip--font-size)}";
|
|
4
|
+
|
|
5
|
+
const EzLabelChip = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.actionClick = createEvent(this, "actionClick", 7);
|
|
9
|
+
/**
|
|
10
|
+
* Deixa o componente disponível ou não para seleção.
|
|
11
|
+
*/
|
|
12
|
+
this.enabled = true;
|
|
13
|
+
}
|
|
14
|
+
//---------------------------------------------
|
|
15
|
+
// Lifecycle web component
|
|
16
|
+
//---------------------------------------------
|
|
17
|
+
render() {
|
|
18
|
+
return (h("div", { onClick: () => this.actionClick.emit(), class: "label__container" }, h("slot", { name: "leftIcon" }), h("label", null, this.label), h("slot", { name: "rightIcon" })));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
EzLabelChip.style = ezActionChipCss;
|
|
22
|
+
|
|
23
|
+
export { EzLabelChip as ez_action_chip };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-35088a3f.js';
|
|
2
|
+
|
|
3
|
+
const ezApplicationCss = "";
|
|
4
|
+
|
|
5
|
+
const EzApplication = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.applicationLoaded = createEvent(this, "applicationLoaded", 7);
|
|
9
|
+
}
|
|
10
|
+
componentWillLoad() {
|
|
11
|
+
//Initizalize application
|
|
12
|
+
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
this.applicationLoaded.emit(true);
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h("div", null));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
EzApplication.style = ezApplicationCss;
|
|
21
|
+
|
|
22
|
+
export { EzApplication as ez_application };
|