@sankhyalabs/ezui 1.1.76 → 1.1.77
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-d1c1db56.js +35 -0
- package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
- package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
- package/dist/cjs/DateUtils-716769e0.js +46 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +28 -0
- package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
- package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1838 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
- package/dist/cjs/ez-popover.cjs.entry.js +3 -3
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -27
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/form-metadata.cjs.entry.js +129 -0
- package/dist/cjs/index-262d703b.js +7442 -0
- package/dist/cjs/{index-9431aeeb.js → index-4e4bae01.js} +1 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -3
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +37 -0
- package/dist/collection/components/ez-button/ez-button.css +16 -1
- package/dist/collection/components/ez-button/ez-button.js +27 -2
- package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
- package/dist/collection/components/ez-calendar/ez-calendar.js +168 -24
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +4 -4
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +2 -2
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
- package/dist/collection/components/ez-grid/ez-grid.css +15 -0
- package/dist/collection/components/ez-grid/ez-grid.js +414 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-list/ez-list.css +227 -44
- package/dist/collection/components/ez-list/ez-list.js +529 -149
- package/dist/collection/components/ez-modal/ez-modal.css +4 -4
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
- package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
- package/dist/collection/components/ez-popover/ez-popover.css +10 -6
- package/dist/collection/components/ez-popup/ez-popup.css +25 -27
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +1 -0
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/collection/components/test-du/test-du.js +45 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/custom-elements/index.d.ts +36 -6
- package/dist/custom-elements/index.js +120975 -3013
- package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
- package/dist/esm/AssetsUtils-3803e935.js +22 -0
- package/dist/esm/DataUnit-1cd45202.js +464 -0
- package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +24 -0
- package/dist/esm/ez-button_11.entry.js +111757 -0
- package/dist/esm/ez-calendar.entry.js +208 -0
- package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
- package/dist/esm/ez-combo-box.entry.js +246 -0
- package/dist/esm/ez-date-time-input.entry.js +140 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1834 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +61 -190
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +3 -21
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/form-metadata.entry.js +125 -0
- package/dist/esm/{index-fd3c8023.js → index-1dacecd3.js} +1 -5
- package/dist/esm/index-cfd5e193.js +7433 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1ea8187e.entry.js +369 -0
- package/dist/ezui/p-37a611ea.js +1 -0
- package/dist/ezui/p-45689464.entry.js +1 -0
- package/dist/ezui/{p-a0b6eee2.entry.js → p-516d0e0f.entry.js} +1 -1
- package/dist/ezui/p-57291f97.entry.js +1 -0
- package/dist/ezui/{p-66954a04.entry.js → p-5a86e18a.entry.js} +1 -1
- package/dist/ezui/{p-823ff0a0.entry.js → p-5da66d3e.entry.js} +1 -1
- package/dist/ezui/p-69416bec.entry.js +1 -0
- package/dist/ezui/p-7107d7ef.js +1 -0
- package/dist/ezui/p-7ef97c5f.entry.js +1 -0
- package/dist/ezui/p-88f45a83.entry.js +1 -0
- package/dist/ezui/p-8c51a6aa.entry.js +1 -0
- package/dist/ezui/{p-e0ab3746.js → p-8f4851a6.js} +1 -1
- package/dist/ezui/p-9dfd537e.js +1 -0
- package/dist/ezui/{p-d443f020.entry.js → p-a18a2d7b.entry.js} +1 -1
- package/dist/ezui/p-a223eed8.entry.js +1 -0
- package/dist/ezui/p-b36308e7.js +1 -0
- package/dist/ezui/p-c0af195b.entry.js +1 -0
- package/dist/ezui/p-c6d469fc.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-e7ee2836.entry.js +1 -0
- package/dist/ezui/p-f7b835cf.entry.js +1 -0
- package/dist/types/components/ez-application/ez-application.d.ts +12 -0
- package/dist/types/components/ez-button/ez-button.d.ts +5 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
- package/dist/types/components/ez-list/ez-list.d.ts +70 -17
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/test-du/test-du.d.ts +6 -0
- package/dist/types/components.d.ts +283 -117
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/package.json +10 -8
- package/react/components.d.ts +6 -1
- package/react/components.js +6 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
- package/dist/cjs/ez-button_16.cjs.entry.js +0 -4079
- package/dist/cjs/ez-list.cjs.entry.js +0 -174
- package/dist/cjs/ez-modal.cjs.entry.js +0 -65
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
- package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
- package/dist/esm/ez-button_16.entry.js +0 -4060
- package/dist/esm/ez-list.entry.js +0 -170
- package/dist/esm/ez-modal.entry.js +0 -61
- package/dist/ezui/p-11ae4ae7.entry.js +0 -1
- package/dist/ezui/p-47fa3d6c.entry.js +0 -1
- package/dist/ezui/p-8ab6168f.entry.js +0 -1
- package/dist/ezui/p-9c1fb51c.entry.js +0 -1
- package/dist/ezui/p-9d85125b.entry.js +0 -1
- package/dist/ezui/p-9dfccb16.js +0 -1
- package/dist/ezui/p-a7b546b2.entry.js +0 -1
- package/dist/ezui/p-c833c94f.entry.js +0 -1
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
|
@@ -1199,11 +1199,7 @@ const connectedCallback = (elm) => {
|
|
|
1199
1199
|
};
|
|
1200
1200
|
const disconnectedCallback = (elm) => {
|
|
1201
1201
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1202
|
-
|
|
1203
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1204
|
-
{
|
|
1205
|
-
safeCall(instance, 'disconnectedCallback');
|
|
1206
|
-
}
|
|
1202
|
+
getHostRef(elm);
|
|
1207
1203
|
}
|
|
1208
1204
|
};
|
|
1209
1205
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-4e4bae01.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-
|
|
17
|
+
return index.bootstrapLazy([["ez-form.cjs",[[0,"ez-form",{"metadataExecutor":[1,"metadata-executor"],"loadExecutor":[1,"load-executor"],"saveExecutor":[1,"save-executor"],"removeExecutor":[1,"remove-executor"],"fieldSearchExecutor":[1,"field-search-executor"],"ignoreSaveValidation":[4,"ignore-save-validation"],"metadata":[16],"slaveMode":[4,"slave-mode"],"enabled":[4],"loading":[1540],"validate":[64],"getChanges":[64],"changeFieldValue":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[513],"value":[1544],"enabled":[516],"errorMessage":[1537,"error-message"],"precision":[1538],"prettyPrecision":[1538,"pretty-precision"],"textleft":[516],"formatNumber":[513,"format-number"],"_leftSlotItem":[32],"_rightSlotItem":[32]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["form-metadata.cjs",[[1,"form-metadata",{"name":[1],"label":[1],"dataunit":[1025],"many":[4],"autoload":[4],"metadata":[1040]}]]],["ez-button_11.cjs",[[0,"test-du"],[0,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}],[1,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1537,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"size":[513]}],[1,"ez-icon",{"size":[513],"href":[513]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"_preSelection":[32],"_visibleOptions":[32]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-collapsible-box_6.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64]}],[1,"place-holder"]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -5,19 +5,23 @@
|
|
|
5
5
|
"./components/ez-list/ez-list.js",
|
|
6
6
|
"./components/ez-upload/ez-upload.js",
|
|
7
7
|
"./components/ez-action-chip/ez-action-chip.js",
|
|
8
|
+
"./components/ez-application/ez-application.js",
|
|
8
9
|
"./components/ez-button/ez-button.js",
|
|
9
10
|
"./components/ez-calendar/ez-calendar.js",
|
|
10
11
|
"./components/ez-check/ez-check.js",
|
|
11
12
|
"./components/ez-collapsible-box/ez-collapsible-box.js",
|
|
12
13
|
"./components/ez-date-input/ez-date-input.js",
|
|
14
|
+
"./components/ez-date-time-input/ez-date-time-input.js",
|
|
13
15
|
"./components/ez-dialog/ez-dialog.js",
|
|
14
16
|
"./components/ez-form/subcomponents/form-metadata.js",
|
|
15
17
|
"./components/ez-form/subcomponents/place-holder.js",
|
|
18
|
+
"./components/ez-grid/ez-grid.js",
|
|
19
|
+
"./components/ez-grid/subcomponents/gridconfig/grid-config.js",
|
|
20
|
+
"./components/ez-grid/subcomponents/select-box/select-box.js",
|
|
16
21
|
"./components/ez-icon/ez-icon.js",
|
|
17
22
|
"./components/ez-label-chip/ez-label-chip.js",
|
|
18
23
|
"./components/ez-modal/ez-modal.js",
|
|
19
24
|
"./components/ez-number-input/ez-number-input.js",
|
|
20
|
-
"./components/ez-numeric-input/ez-numeric-input.js",
|
|
21
25
|
"./components/ez-popover/ez-popover.js",
|
|
22
26
|
"./components/ez-popup/ez-popup.js",
|
|
23
27
|
"./components/ez-search/ez-search.js",
|
|
@@ -25,11 +29,12 @@
|
|
|
25
29
|
"./components/ez-text-area/ez-text-area.js",
|
|
26
30
|
"./components/ez-text-input/ez-text-input.js",
|
|
27
31
|
"./components/ez-time-input/ez-time-input.js",
|
|
28
|
-
"./components/ez-toast/ez-toast.js"
|
|
32
|
+
"./components/ez-toast/ez-toast.js",
|
|
33
|
+
"./components/test-du/test-du.js"
|
|
29
34
|
],
|
|
30
35
|
"compiler": {
|
|
31
36
|
"name": "@stencil/core",
|
|
32
|
-
"version": "2.
|
|
37
|
+
"version": "2.13.0",
|
|
33
38
|
"typescriptVersion": "4.3.5"
|
|
34
39
|
},
|
|
35
40
|
"collections": [],
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Component, h, Event } from "@stencil/core";
|
|
2
|
+
import { Application } from "@sankhyalabs/core";
|
|
3
|
+
export class EzApplication {
|
|
4
|
+
componentWillLoad() {
|
|
5
|
+
//Initizalize application
|
|
6
|
+
this.application = Application.get();
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
this.applicationLoaded.emit(true);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h("div", null));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "ez-application"; }
|
|
15
|
+
static get originalStyleUrls() { return {
|
|
16
|
+
"$": ["ez-application.css"]
|
|
17
|
+
}; }
|
|
18
|
+
static get styleUrls() { return {
|
|
19
|
+
"$": ["ez-application.css"]
|
|
20
|
+
}; }
|
|
21
|
+
static get events() { return [{
|
|
22
|
+
"method": "applicationLoaded",
|
|
23
|
+
"name": "applicationLoaded",
|
|
24
|
+
"bubbles": true,
|
|
25
|
+
"cancelable": true,
|
|
26
|
+
"composed": true,
|
|
27
|
+
"docs": {
|
|
28
|
+
"tags": [],
|
|
29
|
+
"text": "Evento disparado quando a aplica\u00E7\u00E3o for carregada."
|
|
30
|
+
},
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "boolean",
|
|
33
|
+
"resolved": "boolean",
|
|
34
|
+
"references": {}
|
|
35
|
+
}
|
|
36
|
+
}]; }
|
|
37
|
+
}
|
|
@@ -102,10 +102,25 @@ button:disabled {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
button.icon {
|
|
105
|
+
padding: 0px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
button.small {
|
|
109
|
+
width: 32px;
|
|
110
|
+
min-width: 32px;
|
|
111
|
+
height: 32px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
button.medium {
|
|
105
115
|
width: 42px;
|
|
106
116
|
min-width: 42px;
|
|
107
117
|
height: 42px;
|
|
108
|
-
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
button.large {
|
|
121
|
+
width: 52px;
|
|
122
|
+
min-width: 52px;
|
|
123
|
+
height: 52px;
|
|
109
124
|
}
|
|
110
125
|
|
|
111
126
|
.label-icon {
|
|
@@ -9,6 +9,13 @@ export class EzButton {
|
|
|
9
9
|
* Define o modo de uso do botão; opções: icon, link e regular
|
|
10
10
|
*/
|
|
11
11
|
this.mode = "regular";
|
|
12
|
+
/**
|
|
13
|
+
* Quando em modo "icon" pode-se escolher entre [small,medium,large] (somente para o modo "icon")
|
|
14
|
+
*/
|
|
15
|
+
this.size = "medium";
|
|
16
|
+
}
|
|
17
|
+
getIconSize() {
|
|
18
|
+
return this.size;
|
|
12
19
|
}
|
|
13
20
|
handleSlotChange(ev) {
|
|
14
21
|
const slot = ev.target;
|
|
@@ -28,8 +35,8 @@ export class EzButton {
|
|
|
28
35
|
}
|
|
29
36
|
render() {
|
|
30
37
|
if (this.mode == "icon") {
|
|
31
|
-
return (h("button", { class: "icon", type: "button", disabled: !this.enabled },
|
|
32
|
-
h("ez-icon", { class: "icon", href: this.image, size:
|
|
38
|
+
return (h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled },
|
|
39
|
+
h("ez-icon", { class: "icon", href: this.image, size: this.getIconSize(), onClick: evt => { if (!this.enabled)
|
|
33
40
|
evt.stopPropagation(); } })));
|
|
34
41
|
}
|
|
35
42
|
else if (this.mode == "label-icon") {
|
|
@@ -130,6 +137,24 @@ export class EzButton {
|
|
|
130
137
|
},
|
|
131
138
|
"attribute": "image",
|
|
132
139
|
"reflect": true
|
|
140
|
+
},
|
|
141
|
+
"size": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Quando em modo \"icon\" pode-se escolher entre [small,medium,large] (somente para o modo \"icon\")"
|
|
154
|
+
},
|
|
155
|
+
"attribute": "size",
|
|
156
|
+
"reflect": true,
|
|
157
|
+
"defaultValue": "\"medium\""
|
|
133
158
|
}
|
|
134
159
|
}; }
|
|
135
160
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
/* cal__body */
|
|
10
10
|
/*@doc Define a cor de fundo do corpo do calendário.*/
|
|
11
11
|
--ez-calendar__body--background-color: var(--background--xlight, #FFF);
|
|
12
|
+
/*@doc Define a cor de fundo do corpo da hora do calendário.*/
|
|
13
|
+
--ez-calendar__Time--background-color: var(--background--xlight, #FAFAFA);
|
|
12
14
|
/*@doc Define o espaçamento do corpo do calendário.*/
|
|
13
15
|
--ez-calendar__body--padding: var(--space--medium, 12px);
|
|
14
16
|
/*@doc Define o raio da borda do corpo do calendário.*/
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
/*@doc Define o raio da borda das células.*/
|
|
47
49
|
--ez-calendar__cell--border-radius: var(--border--radius-small, 6px);
|
|
48
50
|
/*@doc Define a cor de fundo das células.*/
|
|
49
|
-
--ez-calendar__cell--over--background-color: var(--color--strokes, #
|
|
51
|
+
--ez-calendar__cell--over--background-color: var(--color--strokes, #E2F4EF);
|
|
50
52
|
/*@doc Define a cor do texto para células secundárias (fora do mês selecionado).*/
|
|
51
53
|
--ez-calendar__cell--outset--color: var(--color--strokes, #C0C0C0);
|
|
52
54
|
/*@doc Define a cor de fundo das células selecionadas.*/
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
/*@doc Define a cor do texto do botão "Hoje".*/
|
|
59
61
|
--ez-calendar__btn-today--color: var(--color--primary);
|
|
60
62
|
/*@doc Define a cor de fundo do botão "Hoje" quando o cursor está sobre ele.*/
|
|
61
|
-
--ez-calendar__btn-today--hover--background-color: var(--color--strokes, #
|
|
63
|
+
--ez-calendar__btn-today--hover--background-color: var(--color--strokes, #E2F4EF);
|
|
62
64
|
/*@doc Define o raio da borda do botão "Hoje".*/
|
|
63
65
|
--ez-calendar__btn-today--border-radius: var(--border--radius-small, 6px);
|
|
64
66
|
|
|
@@ -236,4 +238,69 @@
|
|
|
236
238
|
.calendar__btn-today:hover {
|
|
237
239
|
/*public*/
|
|
238
240
|
background-color: var(--ez-calendar__btn-today--hover--background-color);
|
|
239
|
-
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
section{
|
|
244
|
+
display: flex;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.calendarTime {
|
|
248
|
+
/*private*/
|
|
249
|
+
margin-left: -10px;
|
|
250
|
+
display: flex;
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
padding: 12px 6px;
|
|
253
|
+
padding-left: 16px;
|
|
254
|
+
padding-bottom: 0px;
|
|
255
|
+
|
|
256
|
+
/*public*/
|
|
257
|
+
/*TODO Criar variavel para color o calendar_time var(--ez-calendar__body-time--background-color)*/
|
|
258
|
+
background-color: var(--ez-calendar__Time--background-color);
|
|
259
|
+
border-top-right-radius: var(--ez-calendar__body--border-radius);
|
|
260
|
+
border-bottom-right-radius: var(--ez-calendar__body--border-radius);
|
|
261
|
+
box-shadow: var(--ez-calendar__body--shadow);
|
|
262
|
+
}
|
|
263
|
+
.calendar__column {
|
|
264
|
+
height: 180px;
|
|
265
|
+
padding: 0px;
|
|
266
|
+
margin: 0px;
|
|
267
|
+
overflow: auto;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Scrollbar definido como 0 para não exibir o scroll mas permitir a rolagem */
|
|
271
|
+
.calendar__column::-webkit-scrollbar {
|
|
272
|
+
width: 0px;
|
|
273
|
+
max-width: 0px;
|
|
274
|
+
min-width: 0px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.calendarTime__header{
|
|
278
|
+
/*private*/
|
|
279
|
+
padding-left: 6px;
|
|
280
|
+
padding-right: 6px;
|
|
281
|
+
display: flex;
|
|
282
|
+
justify-content: space-between;
|
|
283
|
+
padding-bottom: var(--space--medium, 12px);
|
|
284
|
+
margin: var(--space--small, 6px) var(--space--, 12px);
|
|
285
|
+
font-weight: var(--text-weight--large, 600);
|
|
286
|
+
font-size: var(--title--medium, 16px);
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
/*public*/
|
|
290
|
+
font-family: var(--ez-calendar--font-family);
|
|
291
|
+
color: var(--ez-calendar--color);
|
|
292
|
+
text-shadow: var(--ez-calendar--text-shadow);
|
|
293
|
+
border-bottom: solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);
|
|
294
|
+
font-family: var(--ez-calendar--font-family);
|
|
295
|
+
color: var(--ez-calendar--color);
|
|
296
|
+
text-shadow: var(--ez-calendar--text-shadow);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.separatorTime{
|
|
300
|
+
color: #A2ABB9;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.endHidden {
|
|
304
|
+
-webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%);
|
|
305
|
+
}
|
|
306
|
+
|
|
@@ -6,6 +6,8 @@ export class EzCalendar {
|
|
|
6
6
|
this._todayLabel = "Hoje";
|
|
7
7
|
this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
|
|
8
8
|
this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
|
9
|
+
this._hoursLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
|
|
10
|
+
this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
|
|
9
11
|
/**
|
|
10
12
|
* A data selecionada no calendário
|
|
11
13
|
*/
|
|
@@ -15,6 +17,14 @@ export class EzCalendar {
|
|
|
15
17
|
* quando o método show() for acionado.
|
|
16
18
|
*/
|
|
17
19
|
this.floating = false;
|
|
20
|
+
/**
|
|
21
|
+
* Exibe ou não as horas e minutos no calendario
|
|
22
|
+
*/
|
|
23
|
+
this.time = false;
|
|
24
|
+
/**
|
|
25
|
+
* Exibe ou não os segundos no calendario
|
|
26
|
+
*/
|
|
27
|
+
this.showSeconds = false;
|
|
18
28
|
}
|
|
19
29
|
/**
|
|
20
30
|
* Usado no modo floating. Faz com que o componente seja exibido.
|
|
@@ -72,48 +82,146 @@ export class EzCalendar {
|
|
|
72
82
|
forceUpdate(this);
|
|
73
83
|
}
|
|
74
84
|
selectDate(d) {
|
|
75
|
-
|
|
85
|
+
let newDate = d;
|
|
86
|
+
if (this.value) {
|
|
87
|
+
newDate.setHours(this.value.getHours());
|
|
88
|
+
newDate.setMinutes(this.value.getMinutes());
|
|
89
|
+
newDate.setSeconds(this.value.getSeconds());
|
|
90
|
+
}
|
|
91
|
+
this.value = newDate;
|
|
92
|
+
this.ezChange.emit();
|
|
93
|
+
}
|
|
94
|
+
selectHours(hour) {
|
|
95
|
+
if (!this.value) {
|
|
96
|
+
this.value = new Date();
|
|
97
|
+
}
|
|
98
|
+
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
|
|
99
|
+
this.ezChange.emit();
|
|
100
|
+
}
|
|
101
|
+
selectMinutes(minute) {
|
|
102
|
+
if (!this.value) {
|
|
103
|
+
this.value = new Date();
|
|
104
|
+
}
|
|
105
|
+
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
|
|
106
|
+
this.ezChange.emit();
|
|
107
|
+
}
|
|
108
|
+
selectSeconds(second) {
|
|
109
|
+
if (!this.value) {
|
|
110
|
+
this.value = new Date();
|
|
111
|
+
}
|
|
112
|
+
this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
|
|
76
113
|
this.ezChange.emit();
|
|
77
114
|
}
|
|
115
|
+
updateScroll(element) {
|
|
116
|
+
if (element) {
|
|
117
|
+
const { scrollHeight, clientHeight, scrollTop } = element;
|
|
118
|
+
const remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
|
|
119
|
+
if (remainingScroll > 0) {
|
|
120
|
+
element.classList.add("endHidden");
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
element.classList.remove("endHidden");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
78
127
|
componentDidRender() {
|
|
79
128
|
if (this.floating && this._firstRender) {
|
|
80
129
|
this._calendarHeight = this._box.clientHeight;
|
|
81
130
|
this._box.remove();
|
|
82
131
|
this._firstRender = false;
|
|
83
132
|
}
|
|
133
|
+
this.updateScroll(this._hoursScroll);
|
|
134
|
+
this.updateScroll(this._minutesScroll);
|
|
135
|
+
this.updateScroll(this._secondsScroll);
|
|
136
|
+
}
|
|
137
|
+
componentDidLoad() {
|
|
138
|
+
if (this.time || this.showSeconds) {
|
|
139
|
+
this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
|
|
140
|
+
this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
|
|
141
|
+
if (this.showSeconds) {
|
|
142
|
+
this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
84
145
|
}
|
|
85
146
|
render() {
|
|
86
147
|
if (this._currentPosition == null) {
|
|
87
148
|
this._currentPosition = new Date();
|
|
88
|
-
|
|
149
|
+
if (this.value) {
|
|
150
|
+
this._currentPosition.setTime(this.value.getTime());
|
|
151
|
+
}
|
|
89
152
|
this._currentPosition.setDate(1);
|
|
90
153
|
}
|
|
91
154
|
const firstDate = new Date();
|
|
92
155
|
firstDate.setTime(this._currentPosition.getTime());
|
|
93
156
|
firstDate.setDate(1 - firstDate.getDay());
|
|
94
157
|
return (h("section", { ref: elem => this._container = elem },
|
|
95
|
-
h("div", {
|
|
96
|
-
h("div", { class: "
|
|
97
|
-
h("
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
h("div", { class: "
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
h("
|
|
158
|
+
h("div", { ref: elem => this._box = elem, style: { display: 'flex' } },
|
|
159
|
+
h("div", { class: "calendar" },
|
|
160
|
+
h("div", { class: "calendar__header" },
|
|
161
|
+
h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
|
|
162
|
+
h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
|
|
163
|
+
h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
|
|
164
|
+
h("div", { class: "calendar__body" },
|
|
165
|
+
h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
|
|
166
|
+
[0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
|
|
167
|
+
const date = new Date();
|
|
168
|
+
date.setTime(firstDate.getTime());
|
|
169
|
+
date.setDate(date.getDate() + offset + index);
|
|
170
|
+
let classNames = "calendar__cell";
|
|
171
|
+
if (this._currentPosition.getMonth() != date.getMonth()) {
|
|
172
|
+
classNames += " calendar__cell--secondary";
|
|
173
|
+
}
|
|
174
|
+
else if (this.isSelectedDate(date)) {
|
|
175
|
+
classNames += " calendar__cell--selected";
|
|
176
|
+
}
|
|
177
|
+
return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
|
|
178
|
+
})))),
|
|
179
|
+
h("div", { class: "calendar__footer" },
|
|
180
|
+
h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))),
|
|
181
|
+
(this.time || this.showSeconds) &&
|
|
182
|
+
h("div", { class: "calendarTime" },
|
|
183
|
+
h("div", { class: "calendarTime__header" },
|
|
184
|
+
h("div", null, "H"),
|
|
185
|
+
h("div", { class: "separatorTime" }, ":"),
|
|
186
|
+
h("div", null, "M"),
|
|
187
|
+
this.showSeconds &&
|
|
188
|
+
h("div", { class: "separatorTime" }, ":"),
|
|
189
|
+
this.showSeconds &&
|
|
190
|
+
h("div", null, "S")),
|
|
191
|
+
h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '6px', paddingRight: '6px' } },
|
|
192
|
+
h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index) => {
|
|
193
|
+
if (index === this.value.getHours()) {
|
|
194
|
+
return (h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem },
|
|
195
|
+
h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index) }, offset),
|
|
196
|
+
h("div", { class: "separatorTime" }, ":")));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
return (h("div", { style: { display: 'flex' } },
|
|
200
|
+
h("div", { class: "calendar__cell", onClick: () => this.selectHours(index) }, offset),
|
|
201
|
+
h("div", { class: "separatorTime" }, ":")));
|
|
202
|
+
}
|
|
203
|
+
})),
|
|
204
|
+
h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index) => {
|
|
205
|
+
if (index === this.value.getMinutes()) {
|
|
206
|
+
return (h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem },
|
|
207
|
+
h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index) }, offset),
|
|
208
|
+
this.showSeconds && h("div", { class: "separatorTime" }, ":")));
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
return (h("div", { style: { display: 'flex' } },
|
|
212
|
+
h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index) }, offset),
|
|
213
|
+
this.showSeconds && h("div", { class: "separatorTime" }, ":")));
|
|
214
|
+
}
|
|
215
|
+
})),
|
|
216
|
+
this.showSeconds &&
|
|
217
|
+
h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index) => {
|
|
218
|
+
if (index === this.value.getSeconds()) {
|
|
219
|
+
return (h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index), ref: elem => this._secondsSelect = elem }, offset));
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return (h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index) }, offset));
|
|
223
|
+
}
|
|
224
|
+
})))))));
|
|
117
225
|
}
|
|
118
226
|
static get is() { return "ez-calendar"; }
|
|
119
227
|
static get encapsulation() { return "shadow"; }
|
|
@@ -161,6 +269,42 @@ export class EzCalendar {
|
|
|
161
269
|
"attribute": "floating",
|
|
162
270
|
"reflect": true,
|
|
163
271
|
"defaultValue": "false"
|
|
272
|
+
},
|
|
273
|
+
"time": {
|
|
274
|
+
"type": "boolean",
|
|
275
|
+
"mutable": false,
|
|
276
|
+
"complexType": {
|
|
277
|
+
"original": "boolean",
|
|
278
|
+
"resolved": "boolean",
|
|
279
|
+
"references": {}
|
|
280
|
+
},
|
|
281
|
+
"required": false,
|
|
282
|
+
"optional": false,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": "Exibe ou n\u00E3o as horas e minutos no calendario"
|
|
286
|
+
},
|
|
287
|
+
"attribute": "time",
|
|
288
|
+
"reflect": true,
|
|
289
|
+
"defaultValue": "false"
|
|
290
|
+
},
|
|
291
|
+
"showSeconds": {
|
|
292
|
+
"type": "boolean",
|
|
293
|
+
"mutable": false,
|
|
294
|
+
"complexType": {
|
|
295
|
+
"original": "boolean",
|
|
296
|
+
"resolved": "boolean",
|
|
297
|
+
"references": {}
|
|
298
|
+
},
|
|
299
|
+
"required": false,
|
|
300
|
+
"optional": false,
|
|
301
|
+
"docs": {
|
|
302
|
+
"tags": [],
|
|
303
|
+
"text": "Exibe ou n\u00E3o os segundos no calendario"
|
|
304
|
+
},
|
|
305
|
+
"attribute": "show-seconds",
|
|
306
|
+
"reflect": true,
|
|
307
|
+
"defaultValue": "false"
|
|
164
308
|
}
|
|
165
309
|
}; }
|
|
166
310
|
static get events() { return [{
|