@sankhyalabs/ezui 1.1.8 → 1.1.9
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/README.md +72 -72
- package/dist/cjs/{DataUnit-28b290cb.js → DataUnit-9a4a35ca.js} +415 -371
- package/dist/cjs/ez-action-chip.cjs.entry.js +41 -41
- package/dist/cjs/ez-button_14.cjs.entry.js +1911 -1911
- package/dist/cjs/ez-label-chip.cjs.entry.js +120 -120
- package/dist/cjs/ez-modal.cjs.entry.js +104 -104
- package/dist/cjs/ez-number-input.cjs.entry.js +236 -236
- package/dist/cjs/ez-time-input.cjs.entry.js +168 -168
- package/dist/cjs/form-metadata.cjs.entry.js +65 -65
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -82
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -109
- package/dist/collection/components/ez-button/ez-button.css +94 -94
- package/dist/collection/components/ez-button/ez-button.js +125 -125
- package/dist/collection/components/ez-calendar/ez-calendar.css +210 -210
- package/dist/collection/components/ez-calendar/ez-calendar.js +215 -215
- package/dist/collection/components/ez-check/ez-check.css +265 -265
- package/dist/collection/components/ez-check/ez-check.js +168 -168
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +67 -67
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -108
- package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -167
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -363
- package/dist/collection/components/ez-date-input/ez-date-input.css +38 -38
- package/dist/collection/components/ez-date-input/ez-date-input.js +172 -172
- package/dist/collection/components/ez-form/ez-form.css +19 -19
- package/dist/collection/components/ez-form/ez-form.js +368 -368
- package/dist/collection/components/ez-form/store/Form.actions.js +132 -132
- package/dist/collection/components/ez-form/store/Form.reducer.js +194 -194
- package/dist/collection/components/ez-form/store/Form.selectors.js +44 -44
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +251 -207
- package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -16
- package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +23 -23
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -173
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -14
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -71
- package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -27
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -40
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -27
- package/dist/collection/components/ez-icon/ez-icon.css +36 -36
- package/dist/collection/components/ez-icon/ez-icon.js +56 -56
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -117
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -276
- package/dist/collection/components/ez-modal/ez-modal.css +86 -86
- package/dist/collection/components/ez-modal/ez-modal.js +224 -224
- package/dist/collection/components/ez-number-input/ez-number-input.css +144 -144
- package/dist/collection/components/ez-number-input/ez-number-input.js +465 -465
- package/dist/collection/components/ez-popover/ez-popover.css +38 -38
- package/dist/collection/components/ez-popover/ez-popover.js +323 -323
- package/dist/collection/components/ez-search/ez-search.css +295 -295
- package/dist/collection/components/ez-search/ez-search.js +527 -527
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +125 -125
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +283 -283
- package/dist/collection/components/ez-text-area/ez-text-area.css +139 -139
- package/dist/collection/components/ez-text-area/ez-text-area.js +267 -267
- package/dist/collection/components/ez-text-input/ez-text-input.css +169 -169
- package/dist/collection/components/ez-text-input/ez-text-input.js +395 -395
- package/dist/collection/components/ez-time-input/ez-time-input.css +155 -155
- package/dist/collection/components/ez-time-input/ez-time-input.js +326 -326
- package/dist/collection/index.js +1 -1
- package/dist/collection/servidor.js +100 -100
- package/dist/collection/utils/FloatingManager.js +15 -15
- package/dist/collection/utils/utils.js +6 -6
- package/dist/custom-elements/index.js +3125 -3081
- package/dist/esm/{DataUnit-69e518fa.js → DataUnit-d5d4c9a3.js} +415 -371
- package/dist/esm/ez-action-chip.entry.js +41 -41
- package/dist/esm/ez-button_14.entry.js +1911 -1911
- package/dist/esm/ez-label-chip.entry.js +120 -120
- package/dist/esm/ez-modal.entry.js +104 -104
- package/dist/esm/ez-number-input.entry.js +236 -236
- package/dist/esm/ez-time-input.entry.js +168 -168
- package/dist/esm/form-metadata.entry.js +65 -65
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-b0974f4f.entry.js → p-0fcdfb51.entry.js} +1 -1
- package/dist/ezui/p-dac7a6c2.js +1 -0
- package/dist/ezui/{p-db11c600.entry.js → p-dbef7060.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +16 -16
- package/dist/types/components/ez-button/ez-button.d.ts +20 -20
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +42 -42
- package/dist/types/components/ez-check/ez-check.d.ts +32 -32
- package/dist/types/components/ez-collapsable-box/ez-collapsable-box.d.ts +18 -18
- package/dist/types/components/ez-combo-box/ez-combo-box-interfaces.d.ts +4 -4
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +68 -68
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +31 -31
- package/dist/types/components/ez-form/ez-form.d.ts +26 -31
- package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -111
- package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -20
- package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -14
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +60 -55
- package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +41 -41
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +15 -15
- package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +3 -3
- package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +10 -10
- package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +12 -12
- package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +13 -13
- package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +17 -17
- package/dist/types/components/ez-icon/ez-icon.d.ts +5 -5
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +40 -40
- package/dist/types/components/ez-modal/ez-modal.d.ts +32 -32
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +73 -73
- package/dist/types/components/ez-popover/ez-popover.d.ts +52 -52
- package/dist/types/components/ez-search/ez-search.d.ts +95 -95
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +31 -31
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +49 -49
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +64 -64
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +53 -53
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +2 -2
- package/package.json +114 -114
- package/dist/ezui/p-10ef58b3.js +0 -1
- package/react/components.d.ts +0 -22
- package/react/components.js +0 -25
- package/react/components.js.map +0 -1
- package/react/react-component-lib/createComponent.d.ts +0 -10
- package/react/react-component-lib/createComponent.js +0 -59
- package/react/react-component-lib/createComponent.js.map +0 -1
- package/react/react-component-lib/createOverlayComponent.d.ts +0 -20
- package/react/react-component-lib/createOverlayComponent.js +0 -89
- package/react/react-component-lib/createOverlayComponent.js.map +0 -1
- package/react/react-component-lib/index.d.ts +0 -2
- package/react/react-component-lib/index.js +0 -3
- package/react/react-component-lib/index.js.map +0 -1
- package/react/react-component-lib/interfaces.d.ts +0 -29
- package/react/react-component-lib/interfaces.js +0 -1
- package/react/react-component-lib/interfaces.js.map +0 -1
- package/react/react-component-lib/utils/attachProps.d.ts +0 -12
- package/react/react-component-lib/utils/attachProps.js +0 -96
- package/react/react-component-lib/utils/attachProps.js.map +0 -1
- package/react/react-component-lib/utils/case.d.ts +0 -2
- package/react/react-component-lib/utils/case.js +0 -7
- package/react/react-component-lib/utils/case.js.map +0 -1
- package/react/react-component-lib/utils/dev.d.ts +0 -2
- package/react/react-component-lib/utils/dev.js +0 -13
- package/react/react-component-lib/utils/dev.js.map +0 -1
- package/react/react-component-lib/utils/index.d.ts +0 -7
- package/react/react-component-lib/utils/index.js +0 -21
- package/react/react-component-lib/utils/index.js.map +0 -1
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
export declare class EzTextInput {
|
|
3
|
-
private _inputElem;
|
|
4
|
-
private _labelElem;
|
|
5
|
-
private _messageBoxElem;
|
|
6
|
-
private _lastValidValue;
|
|
7
|
-
private _maskFormatter;
|
|
8
|
-
private _hostElement;
|
|
9
|
-
ezChange: EventEmitter<string>;
|
|
10
|
-
/**
|
|
11
|
-
* Label é o título do campo
|
|
12
|
-
*/
|
|
13
|
-
label: string;
|
|
14
|
-
/**
|
|
15
|
-
* Valor digitado pelo usuário. Este valor é o que fica visível no campo.
|
|
16
|
-
*/
|
|
17
|
-
value: string;
|
|
18
|
-
/**
|
|
19
|
-
* Deixa o campo disponível ou não para digitação.
|
|
20
|
-
*/
|
|
21
|
-
enabled: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Deixa o componente em modo "carregando".
|
|
24
|
-
*/
|
|
25
|
-
loading: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Quando há um problema de validação, serve como orientação ao usuário
|
|
28
|
-
*/
|
|
29
|
-
errormessage: string;
|
|
30
|
-
/**
|
|
31
|
-
* Faz com que o componente só aceite números
|
|
32
|
-
*/
|
|
33
|
-
onlynumber: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Aplica uma máscara no conteúdo conforme um o padrão estabelecido
|
|
36
|
-
*/
|
|
37
|
-
mask: string;
|
|
38
|
-
/**
|
|
39
|
-
* Restringe o que o usuário pode digitar. Cada caractere digitado será testado
|
|
40
|
-
* e deve estar contido nessa string ou será descartado.
|
|
41
|
-
*/
|
|
42
|
-
restrict: string;
|
|
43
|
-
showError(): void;
|
|
44
|
-
prepareMask(): void;
|
|
45
|
-
updateInputValue(): void;
|
|
46
|
-
adjustFloatingLabel(): void;
|
|
47
|
-
isFocused(): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Faz o foco no componente de input
|
|
50
|
-
*/
|
|
51
|
-
setFocus(): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Remove o foco no componente de input
|
|
54
|
-
*/
|
|
55
|
-
setBlur(): Promise<void>;
|
|
56
|
-
handleFocusout(): void;
|
|
57
|
-
isValidValue(value: string): boolean;
|
|
58
|
-
handleChange(): void;
|
|
59
|
-
handleSlotChange(ev: Event): void;
|
|
60
|
-
doFocus(): void;
|
|
61
|
-
componentDidLoad(): void;
|
|
62
|
-
componentWillLoad(): void;
|
|
63
|
-
render(): any;
|
|
64
|
-
}
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class EzTextInput {
|
|
3
|
+
private _inputElem;
|
|
4
|
+
private _labelElem;
|
|
5
|
+
private _messageBoxElem;
|
|
6
|
+
private _lastValidValue;
|
|
7
|
+
private _maskFormatter;
|
|
8
|
+
private _hostElement;
|
|
9
|
+
ezChange: EventEmitter<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Label é o título do campo
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Valor digitado pelo usuário. Este valor é o que fica visível no campo.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
/**
|
|
19
|
+
* Deixa o campo disponível ou não para digitação.
|
|
20
|
+
*/
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Deixa o componente em modo "carregando".
|
|
24
|
+
*/
|
|
25
|
+
loading: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Quando há um problema de validação, serve como orientação ao usuário
|
|
28
|
+
*/
|
|
29
|
+
errormessage: string;
|
|
30
|
+
/**
|
|
31
|
+
* Faz com que o componente só aceite números
|
|
32
|
+
*/
|
|
33
|
+
onlynumber: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Aplica uma máscara no conteúdo conforme um o padrão estabelecido
|
|
36
|
+
*/
|
|
37
|
+
mask: string;
|
|
38
|
+
/**
|
|
39
|
+
* Restringe o que o usuário pode digitar. Cada caractere digitado será testado
|
|
40
|
+
* e deve estar contido nessa string ou será descartado.
|
|
41
|
+
*/
|
|
42
|
+
restrict: string;
|
|
43
|
+
showError(): void;
|
|
44
|
+
prepareMask(): void;
|
|
45
|
+
updateInputValue(): void;
|
|
46
|
+
adjustFloatingLabel(): void;
|
|
47
|
+
isFocused(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Faz o foco no componente de input
|
|
50
|
+
*/
|
|
51
|
+
setFocus(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Remove o foco no componente de input
|
|
54
|
+
*/
|
|
55
|
+
setBlur(): Promise<void>;
|
|
56
|
+
handleFocusout(): void;
|
|
57
|
+
isValidValue(value: string): boolean;
|
|
58
|
+
handleChange(): void;
|
|
59
|
+
handleSlotChange(ev: Event): void;
|
|
60
|
+
doFocus(): void;
|
|
61
|
+
componentDidLoad(): void;
|
|
62
|
+
componentWillLoad(): void;
|
|
63
|
+
render(): any;
|
|
64
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export declare class EzTimeInput {
|
|
2
|
-
private _inputElem;
|
|
3
|
-
private _labelElem;
|
|
4
|
-
private _iconElement;
|
|
5
|
-
private _messageBoxElem;
|
|
6
|
-
private _maskFormatter;
|
|
7
|
-
/**
|
|
8
|
-
* Label é o título do campo
|
|
9
|
-
*/
|
|
10
|
-
label: string;
|
|
11
|
-
/**
|
|
12
|
-
* Valor digitado pelo usuário. Este valor é o que fica visível no campo.
|
|
13
|
-
*/
|
|
14
|
-
viewValue: string;
|
|
15
|
-
/**
|
|
16
|
-
* Valor que será transmitido para o back-end.
|
|
17
|
-
*/
|
|
18
|
-
value: number;
|
|
19
|
-
/**
|
|
20
|
-
* Deixa o campo disponível ou não para digitação.
|
|
21
|
-
*/
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Quando há um problema de validação, serve como orientação ao usuário
|
|
25
|
-
*/
|
|
26
|
-
errormessage: string;
|
|
27
|
-
/**
|
|
28
|
-
* Define se o componente irá ou não considerar os segundos
|
|
29
|
-
*/
|
|
30
|
-
showSeconds: boolean;
|
|
31
|
-
showError(): void;
|
|
32
|
-
prepareMask(): void;
|
|
33
|
-
adjustFloatingLabel(): void;
|
|
34
|
-
onValueChanged(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Faz o foco no componente de input
|
|
37
|
-
*/
|
|
38
|
-
setFocus(): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Remove o foco no componente de input
|
|
41
|
-
*/
|
|
42
|
-
setBlur(): Promise<void>;
|
|
43
|
-
setInputElemnt(input: HTMLInputElement): void;
|
|
44
|
-
handleFocusout(): void;
|
|
45
|
-
prepareValue(value: string): void;
|
|
46
|
-
clearField(): void;
|
|
47
|
-
handleChange(): void;
|
|
48
|
-
adjustIconStyle(): void;
|
|
49
|
-
doFocus(): void;
|
|
50
|
-
componentDidLoad(): void;
|
|
51
|
-
componentWillLoad(): void;
|
|
52
|
-
render(): any;
|
|
53
|
-
}
|
|
1
|
+
export declare class EzTimeInput {
|
|
2
|
+
private _inputElem;
|
|
3
|
+
private _labelElem;
|
|
4
|
+
private _iconElement;
|
|
5
|
+
private _messageBoxElem;
|
|
6
|
+
private _maskFormatter;
|
|
7
|
+
/**
|
|
8
|
+
* Label é o título do campo
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Valor digitado pelo usuário. Este valor é o que fica visível no campo.
|
|
13
|
+
*/
|
|
14
|
+
viewValue: string;
|
|
15
|
+
/**
|
|
16
|
+
* Valor que será transmitido para o back-end.
|
|
17
|
+
*/
|
|
18
|
+
value: number;
|
|
19
|
+
/**
|
|
20
|
+
* Deixa o campo disponível ou não para digitação.
|
|
21
|
+
*/
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Quando há um problema de validação, serve como orientação ao usuário
|
|
25
|
+
*/
|
|
26
|
+
errormessage: string;
|
|
27
|
+
/**
|
|
28
|
+
* Define se o componente irá ou não considerar os segundos
|
|
29
|
+
*/
|
|
30
|
+
showSeconds: boolean;
|
|
31
|
+
showError(): void;
|
|
32
|
+
prepareMask(): void;
|
|
33
|
+
adjustFloatingLabel(): void;
|
|
34
|
+
onValueChanged(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Faz o foco no componente de input
|
|
37
|
+
*/
|
|
38
|
+
setFocus(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Remove o foco no componente de input
|
|
41
|
+
*/
|
|
42
|
+
setBlur(): Promise<void>;
|
|
43
|
+
setInputElemnt(input: HTMLInputElement): void;
|
|
44
|
+
handleFocusout(): void;
|
|
45
|
+
prepareValue(value: string): void;
|
|
46
|
+
clearField(): void;
|
|
47
|
+
handleChange(): void;
|
|
48
|
+
adjustIconStyle(): void;
|
|
49
|
+
doFocus(): void;
|
|
50
|
+
componentDidLoad(): void;
|
|
51
|
+
componentWillLoad(): void;
|
|
52
|
+
render(): any;
|
|
53
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Components, JSX } from './components';
|
|
1
|
+
export { Components, JSX } from './components';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function format(first: string, middle: string, last: string): string;
|
|
2
|
-
export declare function isValidNumber(strValue: string): boolean;
|
|
1
|
+
export declare function format(first: string, middle: string, last: string): string;
|
|
2
|
+
export declare function isValidNumber(strValue: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Biblioteca de componentes Sankhya.",
|
|
5
|
-
"main": "dist/index.cjs.js",
|
|
6
|
-
"module": "dist/custom-elements/index.js",
|
|
7
|
-
"es2015": "dist/esm/index.mjs",
|
|
8
|
-
"es2017": "dist/esm/index.mjs",
|
|
9
|
-
"types": "dist/custom-elements/index.d.ts",
|
|
10
|
-
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
-
"collection:main": "dist/collection/index.js",
|
|
12
|
-
"unpkg": "dist/ezui/ezui.esm.js",
|
|
13
|
-
"files": [
|
|
14
|
-
"dist/",
|
|
15
|
-
"loader/",
|
|
16
|
-
"react/"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"start.storybook": "start-storybook --ci -c .storybook-dev -s .diststorybook -p $PORT --quiet",
|
|
20
|
-
"start.server": "http-server ./storybook-static -p $PORT",
|
|
21
|
-
"build.sb": "build-storybook",
|
|
22
|
-
"build": "stencil build --docs",
|
|
23
|
-
"build.prod": "stencil build --docs --prod",
|
|
24
|
-
"start": "stencil build --dev --watch --serve",
|
|
25
|
-
"test": "stencil test --spec --e2e",
|
|
26
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
27
|
-
"generate": "stencil generate",
|
|
28
|
-
"storybook": "npm run start.storybook",
|
|
29
|
-
"build.watch": "stencil build --dev --watch",
|
|
30
|
-
"build.css.docs": " node docscsstask.js",
|
|
31
|
-
"gulp": "gulp default",
|
|
32
|
-
"link": "node link.js",
|
|
33
|
-
"dev": "run-p storybook build.watch gulp",
|
|
34
|
-
"semantic-release": "semantic-release"
|
|
35
|
-
},
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "https://git.sankhya.com.br/sankhyalabs/ez-ui.git"
|
|
39
|
-
},
|
|
40
|
-
"publishConfig": {
|
|
41
|
-
"access": "public"
|
|
42
|
-
},
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": "14.x"
|
|
45
|
-
},
|
|
46
|
-
"author": "",
|
|
47
|
-
"license": "ISC",
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@sankhyalabs/core": "^1.0.18",
|
|
50
|
-
"@sankhyalabs/ez-design": "^1.0.12",
|
|
51
|
-
"@storybook/addon-notes": "^5.3.21",
|
|
52
|
-
"@storybook/html": "^6.1.16",
|
|
53
|
-
"http-server": "^0.12.3",
|
|
54
|
-
"jest": "^26.6.3",
|
|
55
|
-
"redux": "^4.1.0",
|
|
56
|
-
"redux-thunk": "^2.3.0",
|
|
57
|
-
"redux-undo": "^1.0.1",
|
|
58
|
-
"run-p": "0.0.0"
|
|
59
|
-
},
|
|
60
|
-
"devDependencies": {
|
|
61
|
-
"@babel/preset-env": "^7.13.12",
|
|
62
|
-
"@sankhyalabs/docscss": "^1.0.1",
|
|
63
|
-
"@semantic-release/git": "^9.0.0",
|
|
64
|
-
"@semantic-release/gitlab": "^6.1.0",
|
|
65
|
-
"@semantic-release/npm": "^7.1.3",
|
|
66
|
-
"@stencil/core": "^2.4.0",
|
|
67
|
-
"@stencil/react-output-target": "0.0.9",
|
|
68
|
-
"@storybook/addon-knobs": "6.2.9",
|
|
69
|
-
"@types/jest": "^26.0.20",
|
|
70
|
-
"@types/puppeteer": "^5.4.2",
|
|
71
|
-
"gulp": "^4.0.2",
|
|
72
|
-
"gulp-run": "^1.7.1",
|
|
73
|
-
"gulp-watch": "^5.0.1",
|
|
74
|
-
"jest-cli": "^26.6.3",
|
|
75
|
-
"npm-run-all": "^4.1.5",
|
|
76
|
-
"puppeteer": "^5.5.0",
|
|
77
|
-
"semantic-release": "^17.4.3",
|
|
78
|
-
"ws": "^7.4.4"
|
|
79
|
-
},
|
|
80
|
-
"jest": {
|
|
81
|
-
"verbose": true
|
|
82
|
-
},
|
|
83
|
-
"release": {
|
|
84
|
-
"plugins": [
|
|
85
|
-
[
|
|
86
|
-
"@semantic-release/commit-analyzer",
|
|
87
|
-
{
|
|
88
|
-
"preset": "angular",
|
|
89
|
-
"releaseRules": [
|
|
90
|
-
{
|
|
91
|
-
"type": "breaking",
|
|
92
|
-
"scope": "API",
|
|
93
|
-
"release": "major"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"@semantic-release/release-notes-generator",
|
|
99
|
-
[
|
|
100
|
-
"@semantic-release/npm",
|
|
101
|
-
{
|
|
102
|
-
"npmPublish": true
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
[
|
|
106
|
-
"@semantic-release/gitlab",
|
|
107
|
-
{
|
|
108
|
-
"gitlabUrl": "https://git.sankhya.com.br",
|
|
109
|
-
"gitlabApiPathPrefix": "/api/v4"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@sankhyalabs/ezui",
|
|
3
|
+
"version": "1.1.9",
|
|
4
|
+
"description": "Biblioteca de componentes Sankhya.",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/custom-elements/index.js",
|
|
7
|
+
"es2015": "dist/esm/index.mjs",
|
|
8
|
+
"es2017": "dist/esm/index.mjs",
|
|
9
|
+
"types": "dist/custom-elements/index.d.ts",
|
|
10
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
+
"collection:main": "dist/collection/index.js",
|
|
12
|
+
"unpkg": "dist/ezui/ezui.esm.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/",
|
|
15
|
+
"loader/",
|
|
16
|
+
"react/"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"start.storybook": "start-storybook --ci -c .storybook-dev -s .diststorybook -p $PORT --quiet",
|
|
20
|
+
"start.server": "http-server ./storybook-static -p $PORT",
|
|
21
|
+
"build.sb": "build-storybook",
|
|
22
|
+
"build": "stencil build --docs",
|
|
23
|
+
"build.prod": "stencil build --docs --prod",
|
|
24
|
+
"start": "stencil build --dev --watch --serve",
|
|
25
|
+
"test": "stencil test --spec --e2e",
|
|
26
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
27
|
+
"generate": "stencil generate",
|
|
28
|
+
"storybook": "npm run start.storybook",
|
|
29
|
+
"build.watch": "stencil build --dev --watch",
|
|
30
|
+
"build.css.docs": " node docscsstask.js",
|
|
31
|
+
"gulp": "gulp default",
|
|
32
|
+
"link": "node link.js",
|
|
33
|
+
"dev": "run-p storybook build.watch gulp",
|
|
34
|
+
"semantic-release": "semantic-release"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://git.sankhya.com.br/sankhyalabs/ez-ui.git"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": "14.x"
|
|
45
|
+
},
|
|
46
|
+
"author": "",
|
|
47
|
+
"license": "ISC",
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@sankhyalabs/core": "^1.0.18",
|
|
50
|
+
"@sankhyalabs/ez-design": "^1.0.12",
|
|
51
|
+
"@storybook/addon-notes": "^5.3.21",
|
|
52
|
+
"@storybook/html": "^6.1.16",
|
|
53
|
+
"http-server": "^0.12.3",
|
|
54
|
+
"jest": "^26.6.3",
|
|
55
|
+
"redux": "^4.1.0",
|
|
56
|
+
"redux-thunk": "^2.3.0",
|
|
57
|
+
"redux-undo": "^1.0.1",
|
|
58
|
+
"run-p": "0.0.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@babel/preset-env": "^7.13.12",
|
|
62
|
+
"@sankhyalabs/docscss": "^1.0.1",
|
|
63
|
+
"@semantic-release/git": "^9.0.0",
|
|
64
|
+
"@semantic-release/gitlab": "^6.1.0",
|
|
65
|
+
"@semantic-release/npm": "^7.1.3",
|
|
66
|
+
"@stencil/core": "^2.4.0",
|
|
67
|
+
"@stencil/react-output-target": "0.0.9",
|
|
68
|
+
"@storybook/addon-knobs": "6.2.9",
|
|
69
|
+
"@types/jest": "^26.0.20",
|
|
70
|
+
"@types/puppeteer": "^5.4.2",
|
|
71
|
+
"gulp": "^4.0.2",
|
|
72
|
+
"gulp-run": "^1.7.1",
|
|
73
|
+
"gulp-watch": "^5.0.1",
|
|
74
|
+
"jest-cli": "^26.6.3",
|
|
75
|
+
"npm-run-all": "^4.1.5",
|
|
76
|
+
"puppeteer": "^5.5.0",
|
|
77
|
+
"semantic-release": "^17.4.3",
|
|
78
|
+
"ws": "^7.4.4"
|
|
79
|
+
},
|
|
80
|
+
"jest": {
|
|
81
|
+
"verbose": true
|
|
82
|
+
},
|
|
83
|
+
"release": {
|
|
84
|
+
"plugins": [
|
|
85
|
+
[
|
|
86
|
+
"@semantic-release/commit-analyzer",
|
|
87
|
+
{
|
|
88
|
+
"preset": "angular",
|
|
89
|
+
"releaseRules": [
|
|
90
|
+
{
|
|
91
|
+
"type": "breaking",
|
|
92
|
+
"scope": "API",
|
|
93
|
+
"release": "major"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"@semantic-release/release-notes-generator",
|
|
99
|
+
[
|
|
100
|
+
"@semantic-release/npm",
|
|
101
|
+
{
|
|
102
|
+
"npmPublish": true
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"@semantic-release/gitlab",
|
|
107
|
+
{
|
|
108
|
+
"gitlabUrl": "https://git.sankhya.com.br",
|
|
109
|
+
"gitlabApiPathPrefix": "/api/v4"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
package/dist/ezui/p-10ef58b3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,s){return{type:"FORM/CHANGETAB",payload:{formId:t,index:s}}}function s(t,s){return{type:"FORM/CLEAREDITION",payload:{dataUnit:t,recordsLimit:s}}}function i(t,s){return{type:"FORM/COLLAPSEGROUP",payload:{collapseId:t,collapsed:s}}}function e(){return{type:"FORM/LOAD"}}function h(t,s,i,e,h,r,a){return{type:"FORM/INVALIDFIELD",payload:{tabController:t,tabIndex:s,dataUnit:i,recordId:h,recordIndex:e,fieldName:r,errorMessage:a}}}function r(t,s){return{type:"FORM/SHOWHIDENAVBTN",payload:{buttonName:t,status:s}}}const a=(t,s)=>t.hist.present.currentTabIndex[s]||0,n=(t,s)=>t.hist.present.collapsedGroups[s],o=(t,s)=>t.hist.present.changes[s],d=(t,s)=>t.hist.present.currentRecordIndex[s]||0,c=(t,s)=>t.hist.present.newRecordIndex[s]||0,l=t=>t.nonhist.visibleButtons;class u{constructor(t,s,i="1"){this.name=t,this.unitLabel=s,this.cardinality=i}set store(t){this._store=t}isLoading(){return this._store.getState().nonhist.dataLoading[this.name]}hasChanges(){const t=this._store.getState();return void 0!==o(t,this.name)||c(t,this.name)>0}hasNext(){return d(this._store.getState(),this.name)<this.records.length-1}hasPrevious(){return d(this._store.getState(),this.name)>0}hasCurrentRecord(){return null!=this.getCurrentRecord()}previous(){this._store.dispatch({type:"FORM/NAVIGATE",payload:{dataUnit:this.name,limit:0,backward:!0}})}next(){this._store.dispatch({type:"FORM/NAVIGATE",payload:{dataUnit:this.name,limit:this.records.length,backward:!1}})}getValue(t){const s=this.getCurrentRecord();if(!s)return;const i=this.getRecordChanges(s);return i&&void 0!==i[t]?i[t]:s[t]||null}getErrorMessage(t){const s=this.getCurrentRecord();return((t,s,i,e)=>((t.nonhist.invalidFields[this.name]||{})[i]||{})[e]||"")(this._store.getState(),0,null==s?void 0:s.record__id,t)}changeValue(t,s){0==this.records.length&&this.insert(),this._changeDeboucing&&window.clearTimeout(this._changeDeboucing),this._changeDeboucing=window.setTimeout((()=>{const i=this.getCurrentRecord();this._store.dispatch(function(t,s,i,e){return{type:"FORM/CHANGEFIELD",payload:{dataUnit:t,recordId:s,fieldName:i,value:e}}}(this.name,i.record__id,t,s))}),100)}cancel(){this.records=this.records.filter((t=>!t.record__id.startsWith("NEW_"))),this._store.dispatch(s(this.name,this.records.length-1))}insert(){const t=this.records.length,s=c(this._store.getState(),this.name);this.records.push({record__id:"NEW_"+(s+1)}),this._store.dispatch(function(t,s){return{type:"FORM/INSERT",payload:{dataUnit:t,insertionIndex:s}}}(this.name,t))}getChangesToSave(){const t=o(this._store.getState(),this.name);if(t){const s=Object.keys(t).map((s=>{const i={record__id:s},e=t[s];return Object.keys(e).forEach((t=>{i[t]=e[t]})),i}));return[{dataUnit:this.name,records:s}]}}save(){if(!this.validateRecords())return;let t;this._store.dispatch({type:"FORM/SAVINGCHANGES",payload:{dataUnit:this.name}}),this.saveExecutor&&(t=this.saveExecutor(this.getChangesToSave())),t instanceof Promise?t.then((t=>this.processSaveResult(t))):this.processSaveResult(t)}load(){let t;this._store.dispatch({type:"FORM/DATALOADING",payload:{dataUnit:this.name}}),this.loadExecutor&&(t=this.loadExecutor({dataUnit:this.name})),t instanceof Promise?t.then((t=>this.processLoadResult(t))):this.processLoadResult(t)}remove(){const t=d(this._store.getState(),this.name);let s;if(this._store.dispatch({type:"FORM/REMOVINGRECORD",payload:{dataUnit:this.name}}),this.removeExecutor){const t=this.getCurrentRecord();s=this.removeExecutor({dataUnit:this.name,recordId:t.record__id,record:t})}else s=!0;s&&(s instanceof Promise?s.then((s=>this.processRemoveResult(s,t))):this.processRemoveResult(s,t))}processSaveResult(t){t&&(t instanceof Array?t.forEach((t=>this.processSaveResult(t))):t.dataUnit===this.name&&t.records.forEach((t=>{let s=t.oldRecord__id;delete t.oldRecord__id,void 0===s&&(s=t.record__id),this.records.forEach(((i,e)=>{i.record__id===s&&(this.records[e]=Object.assign(i,t))}))}))),this._store.dispatch(s(this.name,this.records.length-1)),this._store.dispatch({type:"FORM/CHANGESSAVED",payload:{dataUnit:this.name}})}processLoadResult(t){this.records=t,this._store.dispatch(s(this.name,this.records.length-1)),this._store.dispatch({type:"FORM/DATALOADED",payload:{dataUnit:this.name}})}processRemoveResult(t,i){t&&(this.records.splice(i,1),this._store.dispatch(s(this.name,this.records.length-1))),this._store.dispatch({type:"FORM/RECORDREMOVED",payload:{dataUnit:this.name}})}set records(t){this._records=t}get records(){return this._records||(this._records=[]),this._records}getCurrentRecord(){const t=d(this._store.getState(),this.name);return this.records[t]}getRecordChanges(t){return void 0===t&&(t=this.getCurrentRecord()),t?((t,s,i)=>{const e=o(t,this.name);return e?e[i]:void 0})(this._store.getState(),0,t.record__id):void 0}validateRecords(){if(!this.recordsValidator)return!0;const t=o(this._store.getState(),this.name),s=[];this.records.forEach(((i,e)=>{const h=t[i.record__id];h&&s.push(Object.assign(Object.assign(Object.assign({},i),h),{record__index:e,record__changedfields:Object.keys(h)}))}));const i=this.recordsValidator.validateRecords(this,s);return i.message&&alert(i.message),i.isValid}}export{u as D,a,l as b,i as c,t as d,r as e,e as f,h as i,n as s}
|