@openremote/or-asset-viewer 1.2.0-snapshot.20240512160221

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/lib/style.js ADDED
@@ -0,0 +1,328 @@
1
+ import{css,unsafeCSS}from"lit";import{DefaultColor1,DefaultColor2,DefaultColor3,DefaultColor5,DefaultColor4,DefaultColor6,DefaultHeaderHeight}from"@openremote/core";export const panelStyles=css`
2
+ .panelContainer {
3
+ flex: 1 1 50%;
4
+ box-sizing: border-box;
5
+ min-width: 400px;
6
+ padding: 0 5px;
7
+ }
8
+
9
+ .panel {
10
+ background-color: var(--internal-or-asset-viewer-panel-color);
11
+ border: 1px solid #e5e5e5;
12
+ border-radius: 5px;
13
+ position: relative;
14
+ margin: 0 0 10px 0;
15
+ }
16
+
17
+ .panel-content-wrapper {
18
+ padding: var(--internal-or-asset-viewer-panel-padding);
19
+ }
20
+
21
+ .panel-content > :first-child {
22
+ margin-top: 0;
23
+ }
24
+ .panel-content > :last-child {
25
+ margin-bottom: 0;
26
+ }
27
+
28
+ .panel-content {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ }
32
+
33
+ .panel-title {
34
+ text-transform: uppercase;
35
+ font-weight: bolder;
36
+ line-height: 1em;
37
+ color: var(--internal-or-asset-viewer-title-text-color);
38
+ margin-bottom: 20px;
39
+ flex: 0 0 auto;
40
+ letter-spacing: 0.025em;
41
+ }
42
+
43
+ .field {
44
+ margin: 10px 0;
45
+ width: 100%;
46
+ flex: 0 0 auto;
47
+ }
48
+
49
+ .field > * {
50
+ width: 100%;
51
+ box-sizing: border-box;
52
+ }
53
+
54
+ @media screen and (max-width: 767px) {
55
+ .panel {
56
+ border-radius: 0;
57
+ border-right: none;
58
+ border-left: none;
59
+ flex-basis: 100%;
60
+ min-width: 360px;
61
+ }
62
+ }
63
+
64
+ #linkedUsers-panel {
65
+ min-height: 200px;
66
+ }
67
+ `;export const style=css`
68
+
69
+ :host {
70
+ --internal-or-asset-viewer-background-color: var(--or-asset-viewer-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
71
+ --internal-or-asset-viewer-panel-margin: var(--or-asset-viewer-panel-margin, 20px);
72
+ --internal-or-asset-viewer-panel-padding: var(--or-asset-viewer-panel-padding, 24px);
73
+ --internal-or-asset-viewer-text-color: var(--or-asset-viewer-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
74
+ --internal-or-asset-viewer-title-text-color: var(--or-asset-viewer-title-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
75
+ --internal-or-asset-viewer-panel-color: var(--or-asset-viewer-panel-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));
76
+ --internal-or-asset-viewer-line-color: var(--or-asset-viewer-line-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}));
77
+ --internal-or-asset-viewer-button-color: var(--or-asset-viewer-button-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));
78
+ --internal-or-asset-viewer-error-color: var(--or-asset-viewer-error-color, var(--or-app-color6, ${unsafeCSS(DefaultColor6)}));
79
+ --internal-or-header-height: var(--or-header-height, ${unsafeCSS(DefaultHeaderHeight)});
80
+
81
+ height: 100%;
82
+ width: 100%;
83
+ background-color: var(--internal-or-asset-viewer-background-color);
84
+ }
85
+
86
+ *[hidden] {
87
+ display: none;
88
+ }
89
+
90
+ #wrapper {
91
+ height: 100%;
92
+ width: 100%;
93
+ display: flex;
94
+ flex-direction: column;
95
+ }
96
+
97
+ #wrapper.saving {
98
+ opacity: 0.5;
99
+ pointer-events: none;
100
+ }
101
+
102
+ #view-container, #edit-container {
103
+ flex: 0 1 auto;
104
+ overflow: auto;
105
+ }
106
+
107
+ #view-container {
108
+ flex: 1;
109
+ margin-top: 0;
110
+ box-sizing: border-box;
111
+ display: flex;
112
+ flex-direction: row;
113
+ flex-wrap: wrap;
114
+ width: 100%;
115
+ padding: 0 15px 15px;
116
+
117
+ -webkit-animation: fadein 0.3s; /* Safari, Chrome and Opera > 12.1 */
118
+ -moz-animation: fadein 0.3s; /* Firefox < 16 */
119
+ -ms-animation: fadein 0.3s; /* Internet Explorer */
120
+ -o-animation: fadein 0.3s; /* Opera < 12.1 */
121
+ animation: fadein 0.3s;
122
+ }
123
+
124
+ #edit-container {
125
+ padding: 10px 20px 0;
126
+ }
127
+
128
+ #name-input {
129
+ width: 300px;
130
+ }
131
+
132
+ @keyframes fadein {
133
+ from { opacity: 0; }
134
+ to { opacity: 1; }
135
+ }
136
+
137
+ /* Firefox < 16 */
138
+ @-moz-keyframes fadein {
139
+ from { opacity: 0; }
140
+ to { opacity: 1; }
141
+ }
142
+
143
+ /* Safari, Chrome and Opera > 12.1 */
144
+ @-webkit-keyframes fadein {
145
+ from { opacity: 0; }
146
+ to { opacity: 1; }
147
+ }
148
+
149
+ /* Internet Explorer */
150
+ @-ms-keyframes fadein {
151
+ from { opacity: 0; }
152
+ to { opacity: 1; }
153
+ }
154
+
155
+ /* Opera < 12.1 */
156
+ @-o-keyframes fadein {
157
+ from { opacity: 0; }
158
+ to { opacity: 1; }
159
+ }
160
+
161
+ #asset-header {
162
+ padding: 20px 30px 15px;
163
+ display: flex;
164
+ flex: 0 0 auto;
165
+ align-items: center;
166
+ justify-content: space-between;
167
+ z-index: 1;
168
+ transition: box-shadow 0.2s;
169
+ box-shadow: none;
170
+ }
171
+
172
+ #asset-header.editmode {
173
+ padding: 14px 30px;
174
+ background-color: var(--internal-or-asset-viewer-panel-color);
175
+ border-bottom: solid 1px #e5e5e5;
176
+ }
177
+ #asset-header.scrolled {
178
+ box-shadow: rgb(0 0 0 / 15%) 0 0 5px 0;
179
+ }
180
+
181
+ #title {
182
+ flex: 1 1 auto;
183
+ font-size: 18px;
184
+ font-weight: bold;
185
+ display: flex;
186
+ flex-direction: row;
187
+ align-items: center;
188
+ color: var(--internal-or-asset-viewer-title-text-color);
189
+ }
190
+
191
+ #title > or-icon {
192
+ margin-right: 10px;
193
+ }
194
+
195
+ #error-wrapper {
196
+ color: var(--internal-or-asset-viewer-error-color);
197
+ }
198
+
199
+ #error-wrapper > * {
200
+ vertical-align: middle;
201
+ }
202
+
203
+ #error-wrapper or-translate {
204
+ margin-left: 5px;
205
+ }
206
+
207
+ #created-time {
208
+ font-size: 12px;
209
+ }
210
+
211
+ #right-wrapper {
212
+ flex: 1 1 auto;
213
+ text-align: right;
214
+ }
215
+
216
+ #edit-wrapper {
217
+ flex: 0 0 auto;
218
+ }
219
+
220
+ #edit-wrapper > or-translate {
221
+ margin-right: 10px;
222
+ }
223
+
224
+ #save-btn {
225
+ margin-left: 20px;
226
+ }
227
+
228
+ #edit-btn {
229
+ margin-left: 15px;
230
+ }
231
+
232
+ #location-panel .panel-content {
233
+ height: 100%;
234
+ }
235
+
236
+ #history-panel .panel-content {
237
+ position: relative;
238
+ }
239
+
240
+ .msg {
241
+ display: flex;
242
+ justify-content: center;
243
+ align-items: center;
244
+ text-align: center;
245
+ height: 100%;
246
+ }
247
+
248
+ .back-navigation {
249
+ display: none;
250
+ cursor: pointer;
251
+ }
252
+
253
+ #fileupload {
254
+ display: flex;
255
+ align-items: center;
256
+ width: 100%;
257
+ }
258
+
259
+ .hidden {
260
+ display: none;
261
+ }
262
+
263
+ .multipleAssetsView {
264
+ display: flex;
265
+ flex-direction: column;
266
+ }
267
+
268
+ .multipleAssetsView > *:first-child {
269
+ margin: 30px;
270
+ }
271
+
272
+ @media screen and (max-width: 767px) {
273
+ #wrapper {
274
+ position: absolute;
275
+ left: 0;
276
+ right: 0;
277
+ }
278
+
279
+ .back-navigation {
280
+ display: block;
281
+ }
282
+
283
+ .mobileHidden {
284
+ display: none;
285
+ }
286
+
287
+ #asset-header {
288
+ padding: 15px 15px 15px;
289
+ }
290
+
291
+ #name-input {
292
+ width: auto;
293
+ }
294
+
295
+ #view-container {
296
+ padding: 0;
297
+ }
298
+
299
+ #edit-container {
300
+ padding: 10px 0;
301
+ }
302
+
303
+ .panelContainer {
304
+ min-width: 360px;
305
+ padding: 0;
306
+ }
307
+ }
308
+
309
+ @media screen and (max-width: 1130px) {
310
+ #name-input {
311
+ width: 150px;
312
+ }
313
+
314
+ .tabletHidden {
315
+ display: none;
316
+ }
317
+
318
+ #view-container {
319
+ flex-direction: column;
320
+ flex-wrap: nowrap;
321
+ }
322
+
323
+ .panelContainer {
324
+ flex: 0 1 auto;
325
+ }
326
+ }
327
+
328
+ `;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,KAAK,CAAC;AACnC,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAE/I,eAAe;AACf,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkE7B,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;oHAG4F,SAAS,CAAC,aAAa,CAAC;;;wGAGpC,SAAS,CAAC,aAAa,CAAC;oHACZ,SAAS,CAAC,aAAa,CAAC;0GAClC,SAAS,CAAC,aAAa,CAAC;wGAC1B,SAAS,CAAC,aAAa,CAAC;4GACpB,SAAS,CAAC,aAAa,CAAC;0GAC1B,SAAS,CAAC,aAAa,CAAC;+DACnE,SAAS,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyP5F,CAAC"}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@openremote/or-asset-viewer",
3
+ "version": "1.2.0-snapshot.20240512160221",
4
+ "description": "OpenRemote Asset Viewer",
5
+ "main": "dist/umd/index.bundle.js",
6
+ "module": "lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./*": "./lib/*.js"
10
+ },
11
+ "types": "lib/index.d.ts",
12
+ "scripts": {
13
+ "test": "echo \"No tests\" && exit 0",
14
+ "prepublishOnly": "npx webpack"
15
+ },
16
+ "author": "OpenRemote",
17
+ "license": "AGPL-3.0-or-later",
18
+ "dependencies": {
19
+ "@material/data-table": "^9.0.0",
20
+ "@openremote/core": "1.2.0-snapshot.20240512160221",
21
+ "@openremote/model": "1.2.0-snapshot.20240512160221",
22
+ "@openremote/or-attribute-history": "1.2.0-snapshot.20240512160221",
23
+ "@openremote/or-attribute-input": "1.2.0-snapshot.20240512160221",
24
+ "@openremote/or-chart": "1.2.0-snapshot.20240512160221",
25
+ "@openremote/or-components": "1.2.0-snapshot.20240512160221",
26
+ "@openremote/or-icon": "1.2.0-snapshot.20240512160221",
27
+ "@openremote/or-json-forms": "1.2.0-snapshot.20240512160221",
28
+ "@openremote/or-mwc-components": "1.2.0-snapshot.20240512160221",
29
+ "@openremote/or-survey": "1.2.0-snapshot.20240512160221",
30
+ "@openremote/or-survey-results": "1.2.0-snapshot.20240512160221",
31
+ "@openremote/or-translate": "1.2.0-snapshot.20240512160221",
32
+ "@openremote/rest": "1.2.0-snapshot.20240512160221",
33
+ "lit": "^2.0.2"
34
+ },
35
+ "devDependencies": {
36
+ "@openremote/util": "1.2.0-snapshot.20240512160221"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }