logitude-dashboard-library 1.2.2 → 1.2.5

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.
Binary file
@@ -0,0 +1,10 @@
1
+ $blue: #2C99F7;
2
+ $bg-color: #F5F6FB;
3
+ $gray: #F5F6FB;
4
+ $green: #22D792;
5
+ $yellow: #FBC445;
6
+ $red: #F74E49;
7
+ $dark-grey: #717585;
8
+
9
+
10
+
@@ -0,0 +1,190 @@
1
+ $blue: #2C99F7;
2
+ $bg-color: #F5F6FB;
3
+ $gray: #F5F6FB;
4
+ $green: #22D792;
5
+ $yellow: #FBC445;
6
+ $red: #F74E49;
7
+ $dark-grey: #717585;
8
+
9
+ .form-field{
10
+ display: flex;
11
+ align-items: baseline;
12
+ margin-bottom: 5px;
13
+ >label{
14
+ margin-right: 15px;
15
+ width: 100px;
16
+ }
17
+ .p-inputtext{
18
+ width: 250px;
19
+ }
20
+ }
21
+ .dialog-footer{
22
+ display: flex;
23
+ justify-content: flex-end;
24
+ button{
25
+ margin-left: 10px;
26
+ }
27
+ }
28
+ .dialog-wrapper{
29
+ min-height: 400px;
30
+
31
+ display: flex;
32
+ flex-direction: column;
33
+ justify-content: space-between;
34
+ height: 100%;
35
+ }
36
+
37
+
38
+
39
+ .App {
40
+ margin: 0 50px;
41
+ }
42
+
43
+ .dashboard-header {
44
+ display: flex;
45
+ justify-content: space-between;
46
+
47
+ >div {
48
+ align-items: center;
49
+ display: flex;
50
+ }
51
+
52
+ >div>* {
53
+ margin-right: 15px;
54
+ }
55
+
56
+ .p-button-icon,
57
+ i {
58
+ font-size: 28px !important;
59
+ color: black;
60
+ }
61
+
62
+ }
63
+
64
+
65
+
66
+ .App-link {
67
+ color: #61dafb;
68
+ }
69
+
70
+ @keyframes App-logo-spin {
71
+ from {
72
+ transform: rotate(0deg);
73
+ }
74
+
75
+ to {
76
+ transform: rotate(360deg);
77
+ }
78
+ }
79
+
80
+
81
+ #container {
82
+ height: 100%;
83
+ width: 100%;
84
+ position: absolute;
85
+ }
86
+
87
+
88
+ .react-grid-item {
89
+ background-color: lightblue;
90
+ }
91
+
92
+ .panel {
93
+ background: white !important;
94
+ border-radius: 7px;
95
+ box-shadow: 0px 0px 3px 1px #6273842b;
96
+ padding: 20px;
97
+ box-sizing: border-box;
98
+ position: relative;
99
+ height: 100%;
100
+
101
+ header {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ align-items: center;
105
+
106
+ i {
107
+ font-size: 18px;
108
+ // color: colors.$red;
109
+ cursor: pointer;
110
+ }
111
+ }
112
+
113
+ h1 {
114
+ text-transform: capitalize;
115
+ font-size: 15px;
116
+ font-family: 'Roboto Flex';
117
+ color: #061436;
118
+ }
119
+ }
120
+
121
+
122
+ #container {
123
+ width: 100%;
124
+ height: 100%;
125
+ position: absolute;
126
+ }
127
+
128
+
129
+ .grid-container {
130
+ position: relative;
131
+
132
+ .react-grid-layout {
133
+ position: absolute;
134
+ top: 0;
135
+ width: 100%;
136
+ }
137
+ }
138
+
139
+ .grid {
140
+ display: grid;
141
+ grid-template-columns: repeat(12, 1fr);
142
+ grid-column-gap: 10px;
143
+ grid-row-gap: 10px;
144
+ height: fit-content;
145
+ padding: 10px;
146
+
147
+ >div {
148
+ box-sizing: border-box;
149
+ border-radius: 7px;
150
+ }
151
+
152
+ }
153
+
154
+ .grid--bordered>div {
155
+ border: 2px dotted #d0d0d0;
156
+ }
157
+
158
+ .grid--boxes>div {
159
+ background: #00000008;
160
+ }
161
+
162
+
163
+ .dashboard-widget {
164
+ height: calc(100% - 40px);
165
+ box-sizing: border-box;
166
+ }
167
+
168
+ .filter-label {
169
+ font-size: 12px;
170
+ color: $dark-grey;
171
+ }
172
+
173
+ .buttons-overlay .p-overlaypanel-content {
174
+ padding: 0 !important;
175
+ }
176
+
177
+ .buttons-list>div {
178
+ padding: 15px;
179
+ width: 150px;
180
+ cursor: pointer;
181
+ user-select: none;
182
+
183
+ &:hover {
184
+ background: $bg-color;
185
+ }
186
+ }
187
+
188
+ .hidden {
189
+ display: none;
190
+ }
@@ -0,0 +1 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600&family=Roboto+Flex:opsz@8..144&display=swap');
@@ -0,0 +1,26 @@
1
+ @use 'colors.scss';
2
+
3
+ @mixin card {
4
+ background: white !important;
5
+ border-radius: 7px;
6
+ box-shadow: 0px 0px 3px 1px #6273842b;
7
+ }
8
+
9
+ * {
10
+ // change ReactPrime component default size
11
+ font-size: 15px;
12
+ }
13
+
14
+ .container{
15
+ position: relative;
16
+ display: flex;
17
+ width: 100%;
18
+ >div{
19
+ // width: 50%;
20
+ padding: 0 20px;
21
+ }
22
+ }
23
+
24
+ #chart,.chart{
25
+ height: 100%;
26
+ }
@@ -1,67 +1,24 @@
1
- import "./dashboard-designer.scss";
2
- import "react-grid-layout/css/styles.css";
3
- import "react-resizable/css/styles.css";
4
- import "primereact/resources/themes/lara-light-indigo/theme.css";
5
- import "primereact/resources/primereact.min.css";
6
- import "primeicons/primeicons.css";
7
- import 'line-awesome/dist/line-awesome/css/line-awesome.min.css';
8
- import { Layouts } from "react-grid-layout";
9
- import React, { RefObject } from "react";
10
- import { OverlayPanel } from "primereact/overlaypanel";
11
- import { WidgetComponent } from "../../types/WidgetComponent";
12
- import { Widget } from "../../types/widget";
13
- declare class DashboardDesigner extends React.Component<any, any> {
14
- moreButtonToggle: RefObject<OverlayPanel>;
15
- widgetButtonToggle: RefObject<OverlayPanel>;
16
- addWidgetButtonToggle: RefObject<OverlayPanel>;
17
- widgetComponents: WidgetComponent[];
18
- constructor(props: any);
19
- static layoutGridProps: {
20
- rowHeight: number;
21
- className: string;
22
- cols: {
23
- lg: number;
24
- md: number;
25
- sm: number;
26
- xs: number;
27
- xxs: number;
28
- };
29
- useCSSTransforms: boolean;
1
+ /// <reference types="react" />
2
+ import ColumnChartComponent from "./ChartsComponents/ColumnChartComponent";
3
+ declare const DashboardDesigner: () => JSX.Element;
4
+ export declare const layoutGridProps: {
5
+ rowHeight: number;
6
+ className: string;
7
+ cols: {
8
+ lg: number;
9
+ md: number;
10
+ sm: number;
11
+ xs: number;
12
+ xxs: number;
30
13
  };
31
- componentDidUpdate(prevState: any): void;
32
- private UpdatePlaceholderDimensions;
33
- showMsg: boolean;
34
- onLayoutChange(layouts: Layouts): void;
35
- deletePanel: (i: any) => void;
36
- editWidget: (widget: any) => void;
37
- addPanel: (newWidget: Widget) => void;
38
- EvaluateNewWidgetPosition(): {
39
- x: number;
40
- y: number;
41
- };
42
- SaveGrid(): void;
43
- hideDialog: () => void;
44
- reset(): void;
45
- setToken(): void;
46
- changeTitle(i: string | number): void;
47
- selectedWidget: any;
48
- addComponent(): void;
49
- onOkButton: (data: any) => void;
50
- onCancelButton: () => void;
51
- saveToStorage: (key: string, value: any) => void;
52
- getFromStorage: (key: string) => any;
53
- FindWidget(el: any): any;
54
- toggleDialog(): void;
55
- toggleWidget(widget: {
56
- id: string;
57
- }): void;
58
- getRandomInt(min: number, max: number): number;
59
- widgetToEdit: Widget | null;
60
- renderNewWidgetDialog(): JSX.Element;
61
- renderPageHeader(): JSX.Element;
62
- renderGridWidgetsPlaceholder(): JSX.Element;
63
- renderLayoutGrid(layout: any): JSX.Element;
64
- renderWidgetComponent(el: any): JSX.Element;
65
- render(): JSX.Element;
66
- }
14
+ useCSSTransforms: boolean;
15
+ };
16
+ export declare const WidgetTypes: {
17
+ Name: string;
18
+ Disabled: boolean;
19
+ }[];
20
+ export declare const widgetComponents: {
21
+ type: string;
22
+ component: typeof ColumnChartComponent;
23
+ }[];
67
24
  export default DashboardDesigner;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { DropdownChangeParams } from "primereact/dropdown";
3
- import "./NewWidget.scss";
4
3
  import { Widget } from "../../types/widget";
5
4
  interface NewWidgetProps {
6
5
  onOkButton(data: Widget): any;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import "./dashboard-designer.scss";
3
2
  declare type WidgetCardProps = {
4
3
  editBtnClicked(widget: any): any;
5
4
  deleteBtnClicked(i: any): any;
Binary file
package/dist/index.css CHANGED
@@ -1,218 +1,10 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600&family=Roboto+Flex:opsz@8..144&display=swap");
2
- * {
3
- font-size: 15px;
4
- }
5
-
6
- ._3uhvX {
7
- position: relative;
8
- display: flex;
9
- width: 100%;
10
- }
11
- ._3uhvX > div {
12
- padding: 0 20px;
13
- }
14
-
15
- #_3d4HD, ._3d4HD {
16
- height: 100%;
17
- }
18
-
19
- ._1WqvU {
20
- background-color: antiquewhite;
21
- }
22
-
23
- ._26Nxd {
24
- background-color: lightblue;
25
- }
26
-
27
- ._39fRL {
28
- background: white !important;
29
- border-radius: 7px;
30
- box-shadow: 0px 0px 3px 1px rgba(98, 115, 132, 0.168627451);
31
- padding: 20px;
32
- box-sizing: border-box;
33
- position: relative;
34
- height: 100%;
35
- }
36
- ._39fRL header {
37
- display: flex;
38
- justify-content: space-between;
39
- align-items: center;
40
- }
41
- ._39fRL header i {
42
- font-size: 18px;
43
- cursor: pointer;
44
- }
45
- ._39fRL h1 {
46
- text-transform: capitalize;
47
- font-size: 15px;
48
- font-family: "Roboto Flex";
49
- color: #061436;
50
- }
51
-
52
- #_3uhvX {
53
- width: 100%;
54
- height: 100%;
55
- position: absolute;
56
- }
57
-
58
- ._3IiJz {
59
- position: relative;
60
- }
61
- ._3IiJz ._Job3x {
62
- position: absolute;
63
- top: 0;
64
- width: 100%;
65
- }
66
-
67
- ._1SnLK {
68
- display: grid;
69
- grid-template-columns: repeat(12, 1fr);
70
- grid-column-gap: 10px;
71
- grid-row-gap: 10px;
72
- height: -webkit-fit-content;
73
- height: -moz-fit-content;
74
- height: fit-content;
75
- padding: 10px;
76
- }
77
- ._1SnLK > div {
78
- box-sizing: border-box;
79
- border-radius: 7px;
80
- }
81
-
82
- ._NWJ3F > div {
83
- border: 2px dotted #d0d0d0;
84
- }
85
-
86
- ._2hSmL > div {
87
- background: rgba(0, 0, 0, 0.031372549);
88
- }
89
-
90
- ._1GwiB {
91
- height: calc(100% - 40px);
92
- box-sizing: border-box;
93
- }
94
-
95
- ._1gJPQ {
96
- font-size: 12px;
97
- color: #717585;
98
- }
99
-
100
- ._3jTkc ._1pjVN {
101
- padding: 0 !important;
102
- }
103
-
104
- ._1yXJg > div {
105
- padding: 15px;
106
- width: 150px;
107
- cursor: pointer;
108
- -webkit-user-select: none;
109
- -moz-user-select: none;
110
- user-select: none;
111
- }
112
- ._1yXJg > div:hover {
113
- background: #F5F6FB;
114
- }
115
-
116
- ._33DWa {
117
- display: none;
118
- }
119
- ._3s4OD {
120
- position: relative;
121
- }
122
- ._3ACrv {
123
- position: absolute;
124
- width: 20px;
125
- height: 20px;
126
- background-repeat: no-repeat;
127
- background-origin: content-box;
128
- box-sizing: border-box;
129
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');
130
- background-position: bottom right;
131
- padding: 0 3px 3px 0;
132
- }
133
- ._3Dv4b {
134
- bottom: 0;
135
- left: 0;
136
- cursor: sw-resize;
137
- -webkit-transform: rotate(90deg);
138
- transform: rotate(90deg);
139
- }
140
- ._1_pdx {
141
- bottom: 0;
142
- right: 0;
143
- cursor: se-resize;
144
- }
145
- ._3lqDp {
146
- top: 0;
147
- left: 0;
148
- cursor: nw-resize;
149
- -webkit-transform: rotate(180deg);
150
- transform: rotate(180deg);
151
- }
152
- ._1br-A {
153
- top: 0;
154
- right: 0;
155
- cursor: ne-resize;
156
- -webkit-transform: rotate(270deg);
157
- transform: rotate(270deg);
158
- }
159
- ._2LU8g,
160
- ._12Q3f {
161
- top: 50%;
162
- margin-top: -10px;
163
- cursor: ew-resize;
164
- }
165
- ._2LU8g {
166
- left: 0;
167
- -webkit-transform: rotate(135deg);
168
- transform: rotate(135deg);
169
- }
170
- ._12Q3f {
171
- right: 0;
172
- -webkit-transform: rotate(315deg);
173
- transform: rotate(315deg);
174
- }
175
- ._vogN6,
176
- ._25fW6 {
177
- left: 50%;
178
- margin-left: -10px;
179
- cursor: ns-resize;
180
- }
181
- ._vogN6 {
182
- top: 0;
183
- -webkit-transform: rotate(225deg);
184
- transform: rotate(225deg);
185
- }
186
- ._25fW6 {
187
- bottom: 0;
188
- -webkit-transform: rotate(45deg);
189
- transform: rotate(45deg);
190
- }
191
- ._3LBx0 {
192
- display: flex;
193
- align-items: baseline;
194
- margin-bottom: 5px;
195
- }
196
- ._3LBx0 > label {
197
- margin-right: 15px;
198
- width: 100px;
199
- }
200
- ._3LBx0 ._1uVlk {
201
- width: 250px;
202
- }
203
-
204
- ._2Zju7 {
205
- display: flex;
206
- justify-content: flex-end;
207
- }
208
- ._2Zju7 button {
209
- margin-left: 10px;
210
- }
211
-
212
- ._grais {
213
- min-height: 400px;
214
- display: flex;
215
- flex-direction: column;
216
- justify-content: space-between;
217
- height: 100%;
218
- }
1
+ @import "logitude-dashboard-library/dist/assets/styles/components-style.scss";
2
+ @import "logitude-dashboard-library/dist/assets/styles/colors.scss";
3
+ @import "logitude-dashboard-library/dist/assets/styles/fonts.scss";
4
+ @import "logitude-dashboard-library/dist/assets/styles/global.scss";
5
+
6
+ @import "react-grid-layout/css/styles";
7
+ @import "react-resizable/css/styles";
8
+ @import "primereact/resources/themes/lara-light-indigo/theme";
9
+ @import "primereact/resources/primereact";
10
+ @import "primeicons/primeicons";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import DashboardDesigner from './features/Dashboard/DashboardDesigner';
3
- export default DashboardDesigner;
4
- export declare const ExampleComponent: () => JSX.Element;
2
+ import "./styles.module.css";
3
+ declare const Dashboard: () => JSX.Element;
4
+ export default Dashboard;