@sankhyalabs/sankhyablocks 1.4.0-beta.2 → 1.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-b0b676c5.js → index-6fcf07f3.js} +159 -1515
- package/dist/cjs/loader.cjs.js +2 -18
- package/dist/cjs/sankhyablocks.cjs.js +4 -116
- package/dist/cjs/snk-application.cjs.entry.js +53 -217
- package/dist/cjs/snk-crud.cjs.entry.js +9 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +23 -23
- package/dist/cjs/snk-filter-bar_5.cjs.entry.js +883 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +32 -21
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +23 -31
- package/dist/cjs/snk-filter-search.cjs.entry.js +3 -12
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/{snk-form.cjs.entry.js → snk-form_2.cjs.entry.js} +119 -5
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/{taskbar-elements-283c737e.js → taskbar-elements-aedfeae6.js} +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/components/snk-crud/snk-crud.js +29 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +0 -39
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +0 -39
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +30 -36
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -14
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +4 -12
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +3 -3
- package/dist/components/index.js +0 -4
- package/dist/components/snk-application2.js +13 -177
- package/dist/components/snk-crud.js +9 -2
- package/dist/components/snk-data-unit.js +2 -2
- package/dist/components/snk-filter-bar2.js +4 -2
- package/dist/components/snk-filter-detail2.js +31 -21
- package/dist/components/snk-filter-item2.js +4 -15
- package/dist/components/snk-filter-list2.js +5 -13
- package/dist/components/snk-filter-modal2.js +4 -19
- package/dist/components/snk-filter-personalized.js +3 -13
- package/dist/components/snk-filter-search.js +2 -13
- package/dist/components/snk-form2.js +1 -1
- package/dist/components/snk-grid2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-taskbar2.js +1 -1
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/{sankhyablocks/index-2b4d2d14.js → esm/index-81dda3cf.js} +160 -1508
- package/dist/esm/loader.js +2 -18
- package/dist/esm/sankhyablocks.js +4 -116
- package/dist/esm/snk-application.entry.js +14 -178
- package/dist/esm/snk-crud.entry.js +8 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/{snk-filter-bar.entry.js → snk-filter-bar_5.entry.js} +417 -4
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +32 -21
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +3 -11
- package/dist/esm/snk-filter-search.entry.js +2 -11
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/{sankhyablocks/snk-form.entry.js → esm/snk-form_2.entry.js} +117 -4
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/{taskbar-elements-35d64ff9.js → taskbar-elements-38eb5d51.js} +1 -1
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/index.esm.js +0 -1
- package/dist/sankhyablocks/p-01823784.entry.js +1 -0
- package/dist/sankhyablocks/p-0352c0e2.entry.js +1 -0
- package/dist/sankhyablocks/p-07ebda01.entry.js +1 -0
- package/dist/sankhyablocks/p-46caa101.entry.js +1 -0
- package/dist/sankhyablocks/p-586e2522.js +1 -0
- package/dist/sankhyablocks/p-6f8303f3.entry.js +1 -0
- package/dist/sankhyablocks/p-746fc78b.entry.js +1 -0
- package/dist/sankhyablocks/p-77216252.entry.js +1 -0
- package/dist/sankhyablocks/p-86f15ffe.js +1 -0
- package/dist/sankhyablocks/p-8bbc0cbb.entry.js +74 -0
- package/dist/sankhyablocks/p-8f3c5709.entry.js +1 -0
- package/dist/sankhyablocks/p-97009a2c.entry.js +1 -0
- package/dist/sankhyablocks/p-9dd2b8cb.js +1 -0
- package/dist/sankhyablocks/p-aecf3e0a.entry.js +1 -0
- package/dist/sankhyablocks/p-c1c3b5d8.entry.js +1 -0
- package/dist/sankhyablocks/p-c9eec639.entry.js +1 -0
- package/dist/sankhyablocks/p-eea6444c.entry.js +1 -0
- package/dist/sankhyablocks/p-fac2b6a9.js +2 -0
- package/dist/sankhyablocks/p-fb705f81.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -129
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +0 -2
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -2
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +1 -1
- package/dist/types/components.d.ts +4 -10
- package/package.json +1 -1
- package/react/components.d.ts +19 -0
- package/react/components.js +19 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-b8158822.js +0 -6
- package/dist/cjs/dom-36862b77.js +0 -75
- package/dist/cjs/index-84fe3b86.js +0 -20
- package/dist/cjs/index-93965c41.js +0 -141
- package/dist/cjs/index-e90ae303.js +0 -2408
- package/dist/cjs/shadow-css-346c0795.js +0 -389
- package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -466
- package/dist/cjs/snk-filter-item.cjs.entry.js +0 -177
- package/dist/cjs/snk-filter-list.cjs.entry.js +0 -91
- package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -37
- package/dist/cjs/snk-grid.cjs.entry.js +0 -79
- package/dist/cjs/snk-taskbar.cjs.entry.js +0 -160
- package/dist/cjs/taskbar-processor-6bd0d35c.js +0 -47
- package/dist/components/index2.js +0 -2394
- package/dist/components/index3.js +0 -139
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-b3f2ee8d.js +0 -4
- package/dist/esm/dom-665d6011.js +0 -73
- package/dist/esm/index-2b4d2d14.js +0 -3262
- package/dist/esm/index-5992b7e6.js +0 -139
- package/dist/esm/index-c683b2b0.js +0 -2394
- package/dist/esm/index-c71285cb.js +0 -17
- package/dist/esm/shadow-css-b18e99d7.js +0 -387
- package/dist/esm/snk-filter-item.entry.js +0 -173
- package/dist/esm/snk-filter-list.entry.js +0 -87
- package/dist/esm/snk-filter-modal.entry.js +0 -33
- package/dist/esm/snk-form.entry.js +0 -129
- package/dist/esm/snk-grid.entry.js +0 -75
- package/dist/esm/snk-taskbar.entry.js +0 -156
- package/dist/esm/taskbar-processor-aa6772c9.js +0 -45
- package/dist/sankhyablocks/SnkMessageBuilder-35a20271.js +0 -199
- package/dist/sankhyablocks/app-globals-0f993ce5.js +0 -3
- package/dist/sankhyablocks/css-shim-b3f2ee8d.js +0 -4
- package/dist/sankhyablocks/dom-665d6011.js +0 -73
- package/dist/sankhyablocks/filter-item-type.enum-a79b2fa8.js +0 -14
- package/dist/sankhyablocks/index-5992b7e6.js +0 -139
- package/dist/sankhyablocks/index-c683b2b0.js +0 -2394
- package/dist/sankhyablocks/index-c71285cb.js +0 -17
- package/dist/sankhyablocks/shadow-css-b18e99d7.js +0 -387
- package/dist/sankhyablocks/snk-application.entry.js +0 -8166
- package/dist/sankhyablocks/snk-crud.entry.js +0 -66
- package/dist/sankhyablocks/snk-data-unit.entry.js +0 -268
- package/dist/sankhyablocks/snk-filter-bar.entry.js +0 -462
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +0 -43
- package/dist/sankhyablocks/snk-filter-detail.entry.js +0 -80
- package/dist/sankhyablocks/snk-filter-item.entry.js +0 -173
- package/dist/sankhyablocks/snk-filter-list.entry.js +0 -87
- package/dist/sankhyablocks/snk-filter-modal.entry.js +0 -33
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +0 -19
- package/dist/sankhyablocks/snk-filter-number.entry.js +0 -20
- package/dist/sankhyablocks/snk-filter-period.entry.js +0 -33
- package/dist/sankhyablocks/snk-filter-personalized.entry.js +0 -85
- package/dist/sankhyablocks/snk-filter-search.entry.js +0 -40
- package/dist/sankhyablocks/snk-filter-text.entry.js +0 -18
- package/dist/sankhyablocks/snk-grid.entry.js +0 -75
- package/dist/sankhyablocks/snk-pesquisa.entry.js +0 -311
- package/dist/sankhyablocks/snk-taskbar.entry.js +0 -156
- package/dist/sankhyablocks/taskbar-elements-35d64ff9.js +0 -90
- package/dist/sankhyablocks/taskbar-processor-aa6772c9.js +0 -45
- package/dist/sankhyablocks/teste-pesquisa.entry.js +0 -33
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
var DialogType;
|
|
2
|
-
(function (DialogType) {
|
|
3
|
-
DialogType["WARN"] = "warn";
|
|
4
|
-
DialogType["CRITICAL"] = "critical";
|
|
5
|
-
DialogType["SUCCESS"] = "success";
|
|
6
|
-
DialogType["DEFAULT"] = "default";
|
|
7
|
-
})(DialogType || (DialogType = {}));
|
|
8
|
-
|
|
9
|
-
class ApplicationUtils {
|
|
10
|
-
static async showDialog(title, message, icon = null, confirm, dialogType = DialogType.DEFAULT, options) {
|
|
11
|
-
if (options) {
|
|
12
|
-
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
13
|
-
}
|
|
14
|
-
return new Promise(resolve => {
|
|
15
|
-
let dialog = document.querySelector("ez-dialog");
|
|
16
|
-
if (!dialog) {
|
|
17
|
-
dialog = document.createElement("ez-dialog");
|
|
18
|
-
window.document.body.appendChild(dialog);
|
|
19
|
-
}
|
|
20
|
-
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger).then(ok => resolve(ok));
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
24
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.WARN, options);
|
|
25
|
-
}
|
|
26
|
-
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
27
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.CRITICAL, options);
|
|
28
|
-
}
|
|
29
|
-
static async success(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
30
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.SUCCESS, options);
|
|
31
|
-
}
|
|
32
|
-
static async confirm(title, message, icon = null, dialogType = DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
33
|
-
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
34
|
-
}
|
|
35
|
-
static async message(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
36
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.DEFAULT, options);
|
|
37
|
-
}
|
|
38
|
-
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
39
|
-
let toast = document.querySelector("ez-toast");
|
|
40
|
-
if (!toast) {
|
|
41
|
-
toast = document.createElement("ez-toast");
|
|
42
|
-
const icon = document.createElement("ez-icon");
|
|
43
|
-
icon.className = "ez-margin-right--small";
|
|
44
|
-
icon.slot = "icon";
|
|
45
|
-
icon.style.setProperty('--ez-icon--color', 'var(--color--success)');
|
|
46
|
-
toast.appendChild(icon);
|
|
47
|
-
window.document.body.appendChild(toast);
|
|
48
|
-
}
|
|
49
|
-
if (options.iconName) {
|
|
50
|
-
const iconElem = toast.querySelector("ez-icon");
|
|
51
|
-
if (iconElem) {
|
|
52
|
-
iconElem.iconName = options.iconName;
|
|
53
|
-
toast.useIcon = true;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
toast.useIcon = false;
|
|
58
|
-
}
|
|
59
|
-
toast.show(message, 5000, false, options.canClose);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
ApplicationUtils.defaultMessageOptions = {
|
|
63
|
-
canClose: true,
|
|
64
|
-
labelCancel: 'Não',
|
|
65
|
-
labelConfirm: 'Sim',
|
|
66
|
-
btnConfirmDanger: false
|
|
67
|
-
};
|
|
68
|
-
;
|
|
69
|
-
|
|
70
|
-
class CSSVarsUtils {
|
|
71
|
-
static applyCSSVars(document, host, child) {
|
|
72
|
-
const isSameDomain = (styleSheet) => {
|
|
73
|
-
if (!styleSheet.href) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
return styleSheet.href.indexOf(window.location.origin) === 0;
|
|
77
|
-
};
|
|
78
|
-
Array.from(document.styleSheets).filter(isSameDomain).forEach((sheet) => {
|
|
79
|
-
Array.from(sheet.cssRules).filter(rule => rule instanceof CSSStyleRule).forEach((rule) => {
|
|
80
|
-
Array.from(rule.style).forEach((propName) => {
|
|
81
|
-
if (propName.startsWith("--")) {
|
|
82
|
-
CSSVarsUtils.applyIfExists(host, child, propName);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
static applyVarsTextInput(host, child) {
|
|
89
|
-
if (child) {
|
|
90
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
91
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
92
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
93
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
94
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
static applyVarsButton(host, child) {
|
|
98
|
-
if (child) {
|
|
99
|
-
["--ez-button--min-width",
|
|
100
|
-
"--ez-button--height",
|
|
101
|
-
"--ez-button__icon--width",
|
|
102
|
-
"--ez-button__inline__icon--padding",
|
|
103
|
-
"--ez-button--padding-top",
|
|
104
|
-
"--ez-button--padding-bottom",
|
|
105
|
-
"--ez-button--padding-right",
|
|
106
|
-
"--ez-button--padding-left",
|
|
107
|
-
"--ez-button--color",
|
|
108
|
-
"--ez-button--font-size",
|
|
109
|
-
"--ez-button--font-family",
|
|
110
|
-
"--ez-button--font-weight",
|
|
111
|
-
"--ez-button--background-color",
|
|
112
|
-
"--ez-button--border-radius",
|
|
113
|
-
"--ez-button--border",
|
|
114
|
-
"--ez-button--hover-color",
|
|
115
|
-
"--ez-button--hover--background-color",
|
|
116
|
-
"--ez-button--disabled-color",
|
|
117
|
-
"--ez-button--disabled--background-color",
|
|
118
|
-
"--ez-button--focus--border",
|
|
119
|
-
"--ez-button--focus--box-shadow",
|
|
120
|
-
"--ez-button--active-color",
|
|
121
|
-
"--ez-button--active--background-color",
|
|
122
|
-
"--ez-button--link-color",
|
|
123
|
-
"--ez-button--link--hover-color",
|
|
124
|
-
"--ez-button--link--small--font-size",
|
|
125
|
-
"--ez-button--link--medium--font-size",
|
|
126
|
-
"--ez-button--link--large--font-size",].forEach(prop => {
|
|
127
|
-
CSSVarsUtils.applyIfExists(host, child, prop);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
static applyIfExists(host, element, varName) {
|
|
132
|
-
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
133
|
-
if (prop) {
|
|
134
|
-
element.style.setProperty(varName, prop);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export { ApplicationUtils as A, DialogType as D };
|