@vitrosoftware/common-ui-ts 1.1.51 → 1.1.53

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.
Files changed (32) hide show
  1. package/css/std/controls/checkbox/checkbox.css +2 -2
  2. package/css/std/controls/search/checkbox-list.css +11 -0
  3. package/css/std/controls/search/input.css +55 -18
  4. package/css/std/controls/search/search.css +8 -1
  5. package/css/std/controls/table-view/treegrid.css +11 -8
  6. package/css/std/controls/tooltip/tooltip.css +3 -0
  7. package/dist/constants/Control.d.ts +10 -0
  8. package/dist/controls/Checkbox/Checkbox.d.ts +1 -1
  9. package/dist/controls/Criterion/Condition.d.ts +6 -0
  10. package/dist/controls/Criterion/ConditionSelect.d.ts +3 -6
  11. package/dist/controls/Criterion/Criterion.d.ts +6 -10
  12. package/dist/controls/Criterion/Operator.d.ts +4 -0
  13. package/dist/controls/DatePicker/DatePicker.d.ts +2 -0
  14. package/dist/controls/FieldIterator/FieldIterator.d.ts +1 -1
  15. package/dist/controls/LookupPicker/LookupPicker.d.ts +1 -0
  16. package/dist/controls/Search/Filter.d.ts +6 -10
  17. package/dist/controls/Search/Input.d.ts +1 -1
  18. package/dist/controls/Search/Search.d.ts +6 -10
  19. package/dist/controls/TableView/TableViewConstants.d.ts +4 -1
  20. package/dist/controls/TableView/TableViewContext.d.ts +1 -0
  21. package/dist/controls/TableView/TreeGridTableViewContextImpl.d.ts +1 -0
  22. package/dist/controls/TimePicker/TimePicker.d.ts +2 -0
  23. package/dist/controls/UserLookupPicker/UserLookupPicker.d.ts +1 -0
  24. package/dist/index.css +80 -23
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.js +204 -74
  27. package/dist/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/EventConstants.d.ts +0 -4
  30. package/dist/index.modern.js +0 -64186
  31. package/dist/index.modern.js.map +0 -1
  32. package/dist/index.test.d.ts +0 -1
@@ -21,8 +21,8 @@
21
21
  .vitro-checkbox-content input:checked::before {
22
22
  content: '';
23
23
  display: block;
24
- width: 24px;
25
- height: 24px;
24
+ width: 100%;
25
+ height: 100%;
26
26
  background: #fff;
27
27
  background-size: 100%;
28
28
  background-position: center;
@@ -7,10 +7,21 @@
7
7
  .vitro-checkbox-list .vitro-control {
8
8
  margin-bottom: 8px;
9
9
  margin-right: 12px;
10
+ width: unset !important;
11
+ }
12
+
13
+ .vitro-checkbox-list .vitro-control > div {
14
+ width: unset !important;
10
15
  }
11
16
 
12
17
  .vitro-checkbox-list .vitro-checkbox {
13
18
  margin-bottom: 4px;
19
+ height: 24px;
20
+ }
21
+
22
+ .vitro-checkbox-list .vitro-checkbox input {
23
+ width: 16px;
24
+ height: 16px;
14
25
  }
15
26
 
16
27
  .vitro-checkbox:last-child,
@@ -1,7 +1,7 @@
1
1
  .vitro-control {
2
2
  height: 32px;
3
3
  border-radius: 4px;
4
- border: 1px solid #4A556C;
4
+ border: 1px solid #C0CAD5;
5
5
  padding: 4px 8px;
6
6
  display: flex;
7
7
  align-items: center;
@@ -17,39 +17,47 @@
17
17
 
18
18
  .vitro-control input {
19
19
  border: none;
20
+ width: 100%;
20
21
  }
21
22
 
22
23
  .vitro-control input::placeholder {
23
- color: #8E98A3;
24
+ color: #4A556C;
24
25
  font-size: 14px;
25
26
  line-height: 16px;
26
27
  font-weight: 400 !important;
27
28
  }
28
29
 
29
- .vitro-search-value-list {
30
- display: flex;
31
- align-items: center;
32
- flex: 1 1;
33
- overflow: hidden;
34
- }
35
-
36
- .vitro-search-value-list::before {
37
- content: '';
30
+ .vitro-button-search {
38
31
  width: 24px;
39
32
  height: 24px;
33
+ border: none;
34
+ outline: none;
40
35
  flex-shrink: 0;
36
+ background-color: #fff;
41
37
  background-size: 100%;
42
38
  background-position: center;
43
39
  margin-right: 8px;
44
- /* search-grey.svg URL-encoder for SVG */
45
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='circum:search'%3E%3Cpath id='Vector' d='M18.3236 18.8832C18.6858 19.2434 19.2449 18.6875 18.8827 18.3351L15.9297 15.3909C16.9656 14.2512 17.5381 12.7692 17.5361 11.233C17.5361 7.79544 14.725 5 11.2681 5C7.81118 5 5 7.79544 5 11.233C5 14.6705 7.81118 17.4659 11.2681 17.4659C12.8272 17.4659 14.2682 16.8943 15.3707 15.9468L18.3236 18.8832ZM5.78666 11.233C5.78666 8.22611 8.25136 5.78304 11.2673 5.78304C14.2911 5.78304 16.7479 8.22611 16.7479 11.233C16.7479 14.2398 14.2911 16.6829 11.2673 16.6829C8.25136 16.6829 5.78666 14.2398 5.78666 11.233Z' fill='%238E98A3'/%3E%3C/g%3E%3C/svg%3E%0A");
46
- }
47
-
48
- .vitro-active .vitro-search-value-list::before {
49
40
  /* search.svg URL-encoder for SVG */
50
41
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='circum:search'%3E%3Cpath id='Vector' d='M18.3236 18.8832C18.6858 19.2434 19.2449 18.6875 18.8827 18.3351L15.9297 15.3909C16.9656 14.2512 17.5381 12.7692 17.5361 11.233C17.5361 7.79544 14.725 5 11.2681 5C7.81118 5 5 7.79544 5 11.233C5 14.6705 7.81118 17.4659 11.2681 17.4659C12.8272 17.4659 14.2682 16.8943 15.3707 15.9468L18.3236 18.8832ZM5.78666 11.233C5.78666 8.22611 8.25136 5.78304 11.2673 5.78304C14.2911 5.78304 16.7479 8.22611 16.7479 11.233C16.7479 14.2398 14.2911 16.6829 11.2673 16.6829C8.25136 16.6829 5.78666 14.2398 5.78666 11.233Z' fill='%23222D44'/%3E%3C/g%3E%3C/svg%3E");
51
42
  }
52
43
 
44
+ .vitro-button-search:hover,
45
+ .vitro-button-search:active,
46
+ .vitro-button-search:focus {
47
+ background-color: #fff;
48
+ }
49
+
50
+ .vitro-active .vitro-search-value-list {
51
+ width: 262px;
52
+ }
53
+
54
+ .vitro-search-value-list {
55
+ display: flex;
56
+ align-items: center;
57
+ flex: 1 1;
58
+ overflow: hidden;
59
+ }
60
+
53
61
  .vitro-button-cancel,
54
62
  .vitro-button-settings,
55
63
  .vitro-button-cancel:hover,
@@ -61,7 +69,7 @@
61
69
  background-size: 100%;
62
70
  background-position: center;
63
71
  margin-left: 8px;
64
- background-color: #fff;
72
+ background-color: transparent;
65
73
  }
66
74
 
67
75
  .vitro-button-settings {
@@ -83,7 +91,11 @@
83
91
  .vitro-search-value {
84
92
  border-radius: 4px;
85
93
  background: #F7F9FC;
86
- padding: 4px;
94
+ display: flex;
95
+ align-items: center;
96
+ min-width: 0;
97
+ grid-gap: 8px;
98
+ padding: 0 4px;
87
99
  font-size: 14px;
88
100
  line-height: 16px;
89
101
  margin-right: 4px;
@@ -91,3 +103,28 @@
91
103
  overflow: hidden;
92
104
  text-overflow: ellipsis;
93
105
  }
106
+
107
+ .vitro-search-value .vitro-button-cancel {
108
+ margin: 0;
109
+ /* close.svg URL-encoder for SVG */
110
+ background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='iconoir:cancel'%3E%3Cpath id='Vector' d='M6.75781 17.2438L12.0008 12.0008L17.2438 17.2438M17.2438 6.75781L11.9998 12.0008L6.75781 6.75781' stroke='%234A556C' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E%0A");
111
+ }
112
+
113
+ @media (max-width: 800px) {
114
+ .vitro-control,
115
+ .vitro-control.vitro-active {
116
+ border: none;
117
+ padding: 0;
118
+ }
119
+
120
+ .vitro-button-search {
121
+ margin: 0;
122
+ height: 32px;
123
+ width: 32px;
124
+ border-radius: 4px;
125
+ }
126
+
127
+ .vitro-active.vitro-button-search {
128
+ background-color: #DCEEFF;
129
+ }
130
+ }
@@ -3,7 +3,6 @@
3
3
  align-self: baseline;
4
4
  margin-right: 16px;
5
5
  margin-left: auto;
6
- max-width: 50%;
7
6
  }
8
7
 
9
8
  .vitro-settings-dialog {
@@ -29,6 +28,7 @@
29
28
 
30
29
  .vitro-add-field {
31
30
  position: relative;
31
+ margin-bottom: 16px;
32
32
  }
33
33
 
34
34
  .vitro-add-field-button,
@@ -68,9 +68,16 @@
68
68
  background: #fff !important;
69
69
  color: #222D44 !important;
70
70
  font-family: 'InterRegular' !important;
71
+ border: 1px solid #E4E6EC !important;
71
72
  }
72
73
 
73
74
  .vitro-button-cancel:hover,
74
75
  .vitro-button-cancel:active {
75
76
  background: #F3F8FF !important;
76
77
  }
78
+
79
+ @media (max-width: 800px) {
80
+ .vitro-filter {
81
+ width: 100%;
82
+ }
83
+ }
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  .TWLow .TWIconRight {
120
- background-position-x: -8px;
120
+ background-position: center;
121
121
  background-size: 24px;
122
122
  }
123
123
 
@@ -139,13 +139,21 @@
139
139
  .TWCellMenuMain,
140
140
  .TWFilterMenuMain {
141
141
  width: 241px !important;
142
- margin-top: 24px !important;
143
- margin-left: -34px;
144
142
  border: none;
145
143
  border-radius: 4px;
146
144
  box-shadow: 0px 4px 14px 0px rgba(0, 0, 0, 0.15), 0px 0px 4px 0px rgba(0, 0, 0, 0.12);
147
145
  }
148
146
 
147
+ .TWCellMenuMain {
148
+ margin-top: 24px !important;
149
+ margin-left: -27px;
150
+ }
151
+
152
+ .TWFilterMenuMain {
153
+ margin-top: 8px !important;
154
+ margin-left: -22px;
155
+ }
156
+
149
157
  .TWCellMenuMain::before,
150
158
  .TWFilterMenuMain::before {
151
159
  content: '';
@@ -313,11 +321,6 @@
313
321
  background-repeat: no-repeat;
314
322
  }
315
323
 
316
- .TWIconRight.TWCellFilter {
317
- background-size: 16px 16px !important;
318
- background-position: 0 !important;
319
- }
320
-
321
324
  .TWRightSplitter {
322
325
  background: #4292F7;
323
326
  }
@@ -1,5 +1,6 @@
1
1
  .vitro-tooltip {
2
2
  display: none !important;
3
+ opacity: 1;
3
4
  }
4
5
 
5
6
  .vitro-tooltip[style*='transform'] {
@@ -16,6 +17,8 @@
16
17
  background: #4A556C;
17
18
  box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.12), 0px 2px 6px 0px rgba(0, 0, 0, 0.10);
18
19
  max-width: 224px;
20
+ text-align: left;
21
+ white-space: pre-wrap;
19
22
  }
20
23
 
21
24
  .vitro-tooltip :global(.tooltip-arrow)::before {
@@ -0,0 +1,10 @@
1
+ export declare class CONTROL {
2
+ static readonly LOOKUP_PICKER = "LookupPicker";
3
+ static readonly DATE_PICKER = "DatePicker";
4
+ static readonly CHECKBOX = "Checkbox";
5
+ static readonly IMAGE_PICKER = "ImagePicker";
6
+ static readonly AVATAR = "Avatar";
7
+ static readonly INPUT = "Input";
8
+ static readonly PASSWORD = "Password";
9
+ static readonly TIME_PICKER = "TimePicker";
10
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export interface CheckboxProps {
3
3
  value?: any;
4
- onChange?: (value: any[] | any, name?: string) => void;
4
+ onChange?: (value: any[] | any, name: string) => void;
5
5
  labelPosition?: string;
6
6
  label: string;
7
7
  isDisabled?: boolean;
@@ -0,0 +1,6 @@
1
+ export interface Condition {
2
+ type: number;
3
+ text: string;
4
+ imageUrl?: string;
5
+ imageHoverUrl?: string;
6
+ }
@@ -1,11 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { Condition } from './Condition';
2
3
  interface ConditionSelectProps {
3
- itemList: {
4
- type: number;
5
- text: string;
6
- imageUrl?: string;
7
- imageHoverUrl?: string;
8
- }[];
4
+ itemList: Condition[];
5
+ defaultValue?: Condition;
9
6
  onSelect: (condition: any) => any;
10
7
  translateX: number;
11
8
  }
@@ -1,17 +1,13 @@
1
1
  import React from 'react';
2
2
  import { SearchCriterion } from '../Search/SearchCriterion';
3
+ import { Condition } from './Condition';
4
+ import { Operator } from './Operator';
3
5
  interface CriterionProps {
4
6
  label: string;
5
- operatorList: {
6
- type: number;
7
- text: string;
8
- }[];
9
- conditionList: {
10
- type: number;
11
- text: string;
12
- imageUrl?: string;
13
- imageHoverUrl?: string;
14
- }[];
7
+ operatorList: Operator[];
8
+ conditionList: Condition[];
9
+ defaultOperator?: number;
10
+ defaultCondition?: number;
15
11
  onChange: (value: SearchCriterion, name: string) => any;
16
12
  onDelete: (name: string) => any;
17
13
  className?: string;
@@ -0,0 +1,4 @@
1
+ export interface Operator {
2
+ type: number;
3
+ text: string;
4
+ }
@@ -20,6 +20,8 @@ interface DatePickerProps {
20
20
  onOpen?: (e: any, container: any) => void;
21
21
  onChange?: (value: any, name?: string) => void;
22
22
  onClose?: (value: any, name?: string) => void;
23
+ onBlur?: (e: any) => void;
24
+ onFocus?: (e: any) => void;
23
25
  className?: string;
24
26
  }
25
27
  export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<unknown>>;
@@ -7,7 +7,7 @@ interface FieldIteratorProps {
7
7
  value: React.FunctionComponent<any>;
8
8
  }[];
9
9
  rowFieldList?: string[];
10
- fieldValueMap?: Map<string, any>;
10
+ fieldValueMap?: any;
11
11
  changedFieldValueMap?: Map<string, any>;
12
12
  isClearChangedFieldValueMap?: boolean;
13
13
  onChange: (changedFieldValueMap: Map<string, any>, saveStatus?: {
@@ -24,6 +24,7 @@ interface LookupPickerProps {
24
24
  isRequired?: boolean;
25
25
  onChange?: (value: any[] | any, name?: string) => void;
26
26
  onBlur?: (e: any, name?: string) => void;
27
+ onFocus?: (e: any) => void;
27
28
  label?: string;
28
29
  labelWidth?: number;
29
30
  placeholder?: string;
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
+ import { Condition } from '../Criterion/Condition';
3
+ import { Operator } from '../Criterion/Operator';
2
4
  interface FilterProps {
3
5
  fieldList: any[];
6
+ valueList: any[];
4
7
  componentMap: {
5
8
  name: string;
6
9
  value: React.FunctionComponent<any>;
@@ -9,16 +12,9 @@ interface FilterProps {
9
12
  onChange: (changedFieldValueMap: Map<string, any>, saveStatus?: {
10
13
  isSaving: boolean;
11
14
  }) => any;
12
- operatorList: {
13
- type: number;
14
- text: string;
15
- }[];
16
- conditionList: {
17
- type: number;
18
- text: string;
19
- imageUrl?: string;
20
- imageHoverUrl?: string;
21
- }[];
15
+ operatorList: Operator[];
16
+ getConditionList: (componentName: string) => Condition[];
17
+ getDefaultCondition?: (componentName: string) => number;
22
18
  onDeleteField: (id: string) => any;
23
19
  }
24
20
  export declare const Filter: (props: FilterProps) => JSX.Element;
@@ -6,7 +6,7 @@ interface InputProps {
6
6
  placeholder?: string;
7
7
  onSettingsClick?: (active: boolean) => any;
8
8
  onCancel: () => any;
9
- onEnter: (value?: string) => any;
9
+ onSubmit: (value?: string) => any;
10
10
  onChange?: (value: any) => any;
11
11
  isShowSettings?: boolean;
12
12
  isSettingsActive?: boolean;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SearchCriterion } from './SearchCriterion';
3
+ import { Condition } from '../Criterion/Condition';
4
+ import { Operator } from '../Criterion/Operator';
3
5
  interface SearchProps {
4
6
  fieldList: any[];
5
7
  visibleFieldList?: any[];
@@ -11,22 +13,16 @@ interface SearchProps {
11
13
  value: React.FunctionComponent<any>;
12
14
  }[];
13
15
  onAddField?: (selectedFieldIdList: string[]) => any;
14
- operatorList: {
15
- type: number;
16
- text: string;
17
- }[];
18
- conditionList: {
19
- type: number;
20
- text: string;
21
- imageUrl?: string;
22
- imageHoverUrl?: string;
23
- }[];
16
+ operatorList: Operator[];
17
+ getConditionList: (componentName: string) => Condition[];
18
+ getDefaultCondition?: (componentName: string) => number;
24
19
  isAllFieldsVisible?: boolean;
25
20
  labelCancel: string;
26
21
  labelSearch: string;
27
22
  labelAddField: string;
28
23
  defaultSearchFieldName: string;
29
24
  inputPlaceholder?: string;
25
+ maxFieldCount: number;
30
26
  }
31
27
  export declare const Search: (props: SearchProps) => JSX.Element;
32
28
  export {};
@@ -3,6 +3,8 @@ export declare enum EVENT {
3
3
  ON_DATA_SEND = "OnDataSend",
4
4
  ON_LOADED = "OnLoaded",
5
5
  ON_CLICK = "OnClick",
6
+ ON_CLICK_PANEL = "OnClickPanel",
7
+ ON_CLICK_CELL = "OnClickCell",
6
8
  ON_BLUR = "OnBlur",
7
9
  ON_DBL_CLICK = "OnDblClick",
8
10
  ON_CONTEXT_MENU = "OnContextMenu",
@@ -54,7 +56,8 @@ export declare enum COLUMN {
54
56
  export declare enum ROW_TYPE {
55
57
  HEADER = "Header",
56
58
  DATA = "Data",
57
- FILTER = "Filter"
59
+ FILTER = "Filter",
60
+ GROUP = "Group"
58
61
  }
59
62
  export declare enum CELL_TYPE {
60
63
  DATE = "Date",
@@ -75,4 +75,5 @@ export interface TableViewContext {
75
75
  getFocusedCols(): any[];
76
76
  getFocusedRows(): any[];
77
77
  getFilter(spec: boolean): any[];
78
+ selectRange(row1: any, col1: any, row2: any, col2: any, select: boolean): any;
78
79
  }
@@ -84,4 +84,5 @@ export declare class TreeGridTableViewContextImpl implements TableViewContext {
84
84
  getFocusedCols(): any[];
85
85
  getFocusedRows(): any[];
86
86
  getFilter(spec: boolean): any[];
87
+ selectRange(row1: any, col1: any, row2: any, col2: any, select: boolean): any;
87
88
  }
@@ -14,6 +14,8 @@ interface TimePickerProps {
14
14
  onChange?: (value: any) => void;
15
15
  onOpen?: (e: any, container: any) => void;
16
16
  onClose?: (e: any, container: any) => void;
17
+ onBlur?: (e: any) => void;
18
+ onFocus?: (e: any) => void;
17
19
  className?: string;
18
20
  }
19
21
  export declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<unknown>>;
@@ -26,6 +26,7 @@ interface UserLookupPickerProps {
26
26
  isRequired?: boolean;
27
27
  onChange?: (value: any[] | any, name?: string) => void;
28
28
  onBlur?: (e: any, name?: string) => void;
29
+ onFocus?: (e: any) => void;
29
30
  label?: string;
30
31
  labelWidth?: number;
31
32
  placeholder?: string;