@openremote/or-app 1.2.0-snapshot.20240512154942

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 ADDED
@@ -0,0 +1,87 @@
1
+ # @openremote/or-asset-viewer \<or-asset-viewer\>
2
+ [![NPM Version][npm-image]][npm-url]
3
+ [![Linux Build][travis-image]][travis-url]
4
+ [![Test Coverage][coveralls-image]][coveralls-url]
5
+
6
+ Web Component for displaying an asset tree. This component requires an OpenRemote Manager to retrieve, save and query assets.
7
+
8
+ ## Install
9
+ ```bash
10
+ npm i @openremote/or-asset-viewer
11
+ yarn add @openremote/or-asset-viewer
12
+ ```
13
+
14
+ ## Usage
15
+ By default the or-asset-viewer is using a 2 columns grid. This can be changed by using a different config.
16
+
17
+ 4 column grid, 25% for each column:
18
+ ```javascript
19
+ const viewerConfig = {
20
+ viewerStyles: {
21
+ gridTemplateColumns: "repeat(auto-fill, minmax(calc(25%),1fr))";
22
+ }
23
+ };
24
+ <or-asset-viewer .config="${viewerConfig}"></or-asset-viewer>
25
+ ```
26
+
27
+
28
+ The position of a panel can also be changed by changing the config of or-asset-viewer
29
+
30
+ To change the width of a panel use gridColumn:
31
+ ```javascript
32
+ const viewerConfig = {
33
+ panels: {
34
+ "info": {
35
+ type: "property",
36
+ panelStyles: {
37
+ gridColumn: "1 / -1" // same as 1 / 3 in a 2 column grid: Start on column 1, End on column 3
38
+ }
39
+ }
40
+ }
41
+ };
42
+ ```
43
+
44
+ gridColumn can also be used to change the position horizontaly.
45
+ ```javascript
46
+ const viewerConfig = {
47
+ panels: {
48
+ "info": {
49
+ type: "property",
50
+ panelStyles: {
51
+ gridColumnStart: "2" // start the panel in the second column
52
+ }
53
+ }
54
+ }
55
+ };
56
+ ```
57
+
58
+ To change the vertical position of a panel use gridRowStart. To start the panel on the first row set gridRowStart to 1:
59
+ ```javascript
60
+ const viewerConfig = {
61
+ panels: {
62
+ "info": {
63
+ type: "property",
64
+ panelStyles: {
65
+ gridRowStart: "1"
66
+ }
67
+ }
68
+ }
69
+ };
70
+ ```
71
+
72
+ For a full list of properties, methods and options refer to the TypeDoc generated [documentation]().
73
+
74
+ ## Supported Browsers
75
+ The last 2 versions of all modern browsers are supported, including Chrome, Safari, Opera, Firefox, Edge. In addition,
76
+ Internet Explorer 11 is also supported.
77
+
78
+
79
+ ## License
80
+ [GNU AGPLv3](https://www.gnu.org/licenses/agpl-3.0.en.html)
81
+
82
+ [npm-image]: https://img.shields.io/npm/v/live-xxx.svg
83
+ [npm-url]: https://npmjs.org/package/@openremote/or-asset-list
84
+ [travis-image]: https://img.shields.io/travis/live-js/live-xxx/master.svg
85
+ [travis-url]: https://travis-ci.org/live-js/live-xxx
86
+ [coveralls-image]: https://img.shields.io/coveralls/live-js/live-xxx/master.svg
87
+ [coveralls-url]: https://coveralls.io/r/live-js/live-xxx?branch=master
Binary file
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="0 0 107.372 107.453" xmlns="http://www.w3.org/2000/svg">
3
+ <g>
4
+ <path fill="#C4D600" d="M53.648,107.296C24.068,107.296,0,83.236,0,53.646h11.234c0,23.391,19.025,42.42,42.414,42.42 c23.385,0,42.416-19.029,42.416-42.42c0-23.382-19.031-42.408-42.416-42.408V0c29.582,0,53.65,24.068,53.65,53.646 C107.299,83.236,83.23,107.296,53.648,107.296L53.648,107.296z"/>
5
+ <path fill="#4E9D2D" d="M45.525,92.57c-10.395-2.166-19.324-8.262-25.145-17.137c-5.814-8.884-7.826-19.511-5.654-29.906 c2.174-10.399,8.258-19.325,17.141-25.145c8.889-5.815,19.506-7.825,29.906-5.655c21.463,4.479,35.281,25.582,30.803,47.041 L81.58,59.478c3.207-15.397-6.703-30.539-22.105-33.751c-7.461-1.56-15.078-0.119-21.455,4.06 c-6.369,4.169-10.736,10.58-12.299,18.039c-1.555,7.458-0.113,15.075,4.064,21.453c4.17,6.37,10.576,10.744,18.041,12.297 L45.525,92.57L45.525,92.57z"/>
6
+ <path fill="#1D5632" d="M53.682,79.428c-0.432,0-0.871-0.012-1.309-0.032c-6.869-0.342-13.205-3.344-17.83-8.439 c-4.621-5.108-6.982-11.705-6.639-18.582l11.215,0.553c-0.188,3.879,1.141,7.609,3.75,10.488c2.604,2.879,6.186,4.568,10.059,4.761 c3.869,0.179,7.607-1.142,10.48-3.748c2.887-2.603,4.576-6.179,4.773-10.057c0.391-8.012-5.803-14.854-13.816-15.248l0.559-11.222 c14.201,0.71,25.178,12.823,24.475,27.021c-0.344,6.883-3.336,13.212-8.441,17.831C66.174,77.086,60.084,79.428,53.682,79.428 L53.682,79.428z"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="72.189 -19.217 539.143 173.724" xmlns="http://www.w3.org/2000/svg">
3
+ <g transform="matrix(1, 0, 0, 1, 0, 7)">
4
+ <path fill="#1D5632" d="M145.09,38.053c12.479,0,22.098,10.548,22.098,22.095c0,11.473-9.473,22.097-22.098,22.097 c-12.316,0-21.943-10.392-21.943-21.787C123.146,47.14,134.004,38.053,145.09,38.053z M145.17,77.396 c8.164,0,16.631-6.468,16.631-17.479c0-11.088-9.393-17.018-16.631-17.018c-7.701,0-16.635,6.313-16.635,17.476 C128.535,70.158,136.471,77.396,145.17,77.396z"/>
5
+ <path fill="#1D5632" d="M267.848,38.237h5.385V45.4h0.156c1.617-2.551,5.773-6.494,12.938-6.494c5.154,0,9.469,1.315,13.316,5.179 c3.156,3.093,5.238,7.956,5.238,14.911v23.26h-5.391v-23.26c0-5.484-1.695-9.347-4.006-11.588c-2.924-2.859-6.775-3.63-9.158-3.63 c-2.389,0-6.24,0.771-9.168,3.63c-2.309,2.241-4,6.104-3.926,11.588v23.26h-5.385V38.237z"/>
6
+ <path fill="#4E9D2D" d="M312.16,39.521h9.395v3.775h0.15c1.928-2.772,3.848-5.235,9.166-5.235h0.846v9.932 C322.4,48.378,322.4,55.69,322.4,58.23v24.025h-10.24V39.521z"/>
7
+ <path fill="#4E9D2D" d="M448.814,59.918c0-12.935,10.547-22.866,22.789-22.866c12.088,0,22.637,9.622,22.637,22.71 c0,14.016-10.781,22.867-22.637,22.867C458.898,82.629,448.814,72.159,448.814,59.918z M483.992,59.995 c0-7.776-6-13.554-12.389-13.554c-5.312,0-12.555,4.546-12.555,13.477c0,8.088,6.09,13.321,12.555,13.321 C479.066,73.239,483.992,66.771,483.992,59.995z"/>
8
+ <path fill="#4E9D2D" d="M500.199,47.598h-5.984V38.51h5.984V24.271h10.24V38.51h6.16v9.088h-6.16v33.646h-10.24V47.598z"/>
9
+ <path fill="#4E9D2D" d="M426.043,38.349c-5.213,0-9.924,2.27-13.324,5.927c-3.398-3.657-8.119-5.927-13.322-5.927 c-10.326,0-18.73,8.916-18.73,19.873v24.464h10.752V58.222c0-5.032,3.582-9.123,7.979-9.123c4.203,0,7.65,3.733,7.947,8.453 c-0.006,0.227-0.033,0.446-0.033,0.67v24.464h10.754v-0.06h0.059V58.222c0-0.224-0.023-0.443-0.029-0.67 c0.297-4.72,3.744-8.453,7.949-8.453c4.395,0,7.979,4.091,7.979,9.123v24.404h10.748V58.222 C444.77,47.265,436.371,38.349,426.043,38.349z"/>
10
+ <rect x="171.701" y="39.091" fill="#1D5632" width="5.402" height="56.955"/>
11
+ <path fill="#1D5632" d="M193.68,38.053c-11.088,0-21.945,9.052-21.979,22.335h5.393c0-0.006,0-0.006,0-0.006 c0-11.168,8.945-17.481,16.654-17.481c7.256,0,16.66,5.93,16.66,17.018c0,11.011-8.48,17.479-16.66,17.479 c-4.051,0-7.928-1.587-10.932-4.251v6.167c3.186,1.85,6.881,2.932,10.863,2.932c12.639,0,22.131-10.624,22.131-22.097 C215.811,48.601,206.168,38.053,193.68,38.053z"/>
12
+ <path fill="#1D5632" d="M259.939,48.83c-3.002-5.233-9.547-10.702-18.787-10.777c-12.242,0.231-21.865,10.237-21.865,22.173 c0,12.471,10.166,22.019,21.943,22.019c9.699,0,17.785-6.388,20.711-14.782h-5.699c-1.922,5.234-7.391,9.781-15.09,9.935 c-8.236,0-15.938-7.006-16.322-15.246h0.006c-0.234-2.232-0.318-5.594,0.805-8.146h0.01c2.654-7.622,9.742-11.104,15.58-11.104 c6.701,0,14.783,4.466,16.479,14.402h-24.168v4.848h29.635C263.402,58.073,262.789,53.373,259.939,48.83z"/>
13
+ <path fill="#4E9D2D" d="M376.396,59.304c0-10.779-8.549-22.481-22.1-22.481c-13.172,0-22.482,11.087-22.482,23.173 c0,12.471,9.852,22.634,22.559,22.634c10.008,0,18.17-7.157,20.635-14.855h-10.779c-1.926,3.538-5.314,5.466-9.855,5.466 c-7.08,0-11.047-5.616-11.715-8.492c-0.619-1.886-1.23-4.997-0.352-8.521h-0.023c0.051-0.205,0.117-0.395,0.17-0.59 c0.021-0.064,0.037-0.123,0.057-0.189c2.145-7.278,8.221-9.232,11.863-9.232c5.08,0,10.398,3.154,11.545,10.012h-17.971v8.235 h27.826C376.086,63.074,376.396,61.307,376.396,59.304z"/>
14
+ <path fill="#4E9D2D" d="M561.125,59.304c0-10.779-8.541-22.481-22.09-22.481c-13.172,0-22.49,11.087-22.49,23.173 c0,12.471,9.861,22.634,22.566,22.634c10.008,0,18.17-7.157,20.635-14.855h-10.781c-1.924,3.538-5.314,5.466-9.854,5.466 c-7.078,0-11.047-5.616-11.717-8.492c-0.615-1.886-1.23-4.997-0.354-8.521h-0.018c0.047-0.205,0.115-0.395,0.168-0.59 c0.021-0.064,0.037-0.123,0.057-0.189c2.145-7.278,8.221-9.232,11.863-9.232c5.08,0,10.393,3.154,11.551,10.012h-18.629v8.235 h28.479C560.82,63.074,561.125,61.307,561.125,59.304z"/>
15
+ </g>
16
+ </svg>
package/lib/app.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export interface AppState {
2
+ page: string;
3
+ params: {
4
+ [k in string]: string;
5
+ } | null;
6
+ offline: boolean;
7
+ visible: boolean;
8
+ resolved: boolean;
9
+ drawerOpened: boolean;
10
+ scrollTop: number;
11
+ realm?: string;
12
+ }
13
+ export interface AppStateKeyed {
14
+ app: AppState;
15
+ }
16
+ export interface PageAndParams {
17
+ page: string;
18
+ params: {
19
+ [k in string]: string;
20
+ } | null;
21
+ }
22
+ export declare const updatePage: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | PageAndParams, "app/updatePage">, updateDrawer: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "app/updateDrawer">, scrollToTop: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "app/scrollToTop">, updateRealm: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "app/updateRealm">, setOffline: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "app/setOffline">, setVisibility: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "app/setVisibility">;
23
+ export declare const appReducer: import("redux").Reducer<AppState>;
package/lib/app.js ADDED
@@ -0,0 +1 @@
1
+ import{createSlice}from"@reduxjs/toolkit";const INITIAL_STATE={page:"",params:null,offline:!1,visible:!0,resolved:!1,drawerOpened:!1,scrollTop:0,realm:void 0},appSlice=createSlice({name:"app",initialState:INITIAL_STATE,reducers:{updatePage:(e,a)=>Object.assign(Object.assign({},e),{page:"string"==typeof a.payload?a.payload:a.payload.page,params:"string"==typeof a.payload?null:a.payload.params}),updateDrawer:(e,a)=>Object.assign(Object.assign({},e),{drawerOpened:a.payload}),scrollToTop:(e,a)=>Object.assign(Object.assign({},e),{scrollTop:a.payload}),updateRealm:(e,a)=>Object.assign(Object.assign({},e),{realm:a.payload}),setOffline:(e,a)=>Object.assign(Object.assign({},e),{offline:a.payload}),setVisibility:(e,a)=>Object.assign(Object.assign({},e),{visible:a.payload})}});export const{updatePage,updateDrawer,scrollToTop,updateRealm,setOffline,setVisibility}=appSlice.actions;export const appReducer=appSlice.reducer;
package/lib/app.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"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AM,CAAC,OAAO,IAC1B;QACL,CAAC;KACJ;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAC,GAAG,QAAQ,CAAC,OAAO,CAAC;AAChH,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
+ import { AppConfig, RealmAppConfig } from "./types";
3
+ import "@openremote/or-translate";
4
+ import "@openremote/or-mwc-components/or-mwc-menu";
5
+ import "@openremote/or-mwc-components/or-mwc-snackbar";
6
+ import "./or-header";
7
+ import "@openremote/or-icon";
8
+ import { BasicLoginResult, Manager, OREvent, Util } from "@openremote/core";
9
+ import { DEFAULT_LANGUAGES, HeaderConfig } from "./or-header";
10
+ import { AnyAction, Store, Unsubscribe } from "@reduxjs/toolkit";
11
+ import { AppStateKeyed } from "./app";
12
+ import { ManagerConfig, Realm } from "@openremote/model";
13
+ export declare const DefaultLogo: any;
14
+ export declare const DefaultMobileLogo: any;
15
+ export declare const DefaultFavIcon: any;
16
+ export { AnyAction };
17
+ export * from "./app";
18
+ export * from "./or-header";
19
+ export * from "./types";
20
+ export { HeaderConfig, DEFAULT_LANGUAGES };
21
+ export declare function getRealmQueryParameter(): string | undefined;
22
+ export declare function getDefaultManagerConfig(): ManagerConfig;
23
+ export declare class OrApp<S extends AppStateKeyed> extends LitElement {
24
+ appConfig?: AppConfig<S>;
25
+ appConfigProvider?: (manager: Manager) => AppConfig<S>;
26
+ managerConfig?: ManagerConfig;
27
+ protected _mainElem: HTMLElement;
28
+ protected _initialised: boolean;
29
+ protected _page?: string;
30
+ protected _config: RealmAppConfig;
31
+ protected _realm?: string;
32
+ protected _offline: boolean;
33
+ protected _showOfflineFallback: boolean;
34
+ protected _activeMenu?: string;
35
+ protected _onEventBind?: any;
36
+ protected _onVisibilityBind?: any;
37
+ protected _realms: Realm[];
38
+ protected _offlineFallbackDeferred?: Util.Deferred<void>;
39
+ protected _store: Store<S, AnyAction>;
40
+ protected _storeUnsubscribe: Unsubscribe;
41
+ static get styles(): import("lit").CSSResult;
42
+ constructor(store: Store<S, AnyAction>);
43
+ getState(): S;
44
+ protected onVisibilityChange(ev: Event): void;
45
+ connectedCallback(): void;
46
+ disconnectedCallback(): void;
47
+ protected firstUpdated(_changedProperties: Map<PropertyKey, unknown>): void;
48
+ protected updated(changedProps: PropertyValues): void;
49
+ protected shouldUpdate(changedProps: PropertyValues): boolean;
50
+ protected render(): TemplateResult | void;
51
+ stateChanged(state: AppStateKeyed): void;
52
+ protected _onEvent(event: OREvent): void;
53
+ protected _startOfflineFallbackTimer(force?: boolean): void;
54
+ protected _completeOfflineFallbackTimer(aborted?: boolean): void;
55
+ logout(): void;
56
+ setLanguage(lang: string): void;
57
+ showLanguageModal(): void;
58
+ protected doAppConfigInit(): void;
59
+ protected doBasicLogin(username: string | undefined, password: string | undefined): PromiseLike<BasicLoginResult>;
60
+ protected updateWindowTitle(): void;
61
+ protected _getConfig(): RealmAppConfig;
62
+ }
package/lib/index.js ADDED
@@ -0,0 +1,75 @@
1
+ var __decorate=this&&this.__decorate||function(e,t,o,i){var r,a=arguments.length,n=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(a<3?r(n):a>3?r(t,o,n):r(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n},__awaiter=this&&this.__awaiter||function(e,t,o,i){return new(o||(o=Promise))((function(r,a){function n(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(n,s)}l((i=i.apply(e,t||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query,state}from"lit/decorators.js";import{router}from"./types";import"@openremote/or-translate";import"@openremote/or-mwc-components/or-mwc-menu";import"@openremote/or-mwc-components/or-mwc-snackbar";import"./or-header";import"@openremote/or-icon";import{updateMetadata}from"pwa-helpers/metadata";import i18next from"i18next";import manager,{DefaultColor2,DefaultColor3,DefaultColor4,normaliseConfig,ORError,OREvent,Util}from"@openremote/core";import{DEFAULT_LANGUAGES}from"./or-header";import{OrMwcDialog,showDialog,showErrorDialog}from"@openremote/or-mwc-components/or-mwc-dialog";import{OrMwcSnackbar}from"@openremote/or-mwc-components/or-mwc-snackbar";import{setOffline,setVisibility,updatePage,updateRealm}from"./app";import{InputType}from"@openremote/or-mwc-components/or-mwc-input";import{pageOfflineProvider}from"./page-offline";export const DefaultLogo=require("../images/logo.svg");export const DefaultMobileLogo=require("../images/logo-mobile.svg");export const DefaultFavIcon=require("../images/favicon.ico");export*from"./app";export*from"./or-header";export*from"./types";export{DEFAULT_LANGUAGES};export function getRealmQueryParameter(){if(location.search&&""!==location.search)return Util.getQueryParameter(location.search,"realm");if(location.hash){const e=location.hash.indexOf("?");if(e>-1)return Util.getQueryParameter(location.hash.substring(e+1),"realm")}}export function getDefaultManagerConfig(){return normaliseConfig(DEFAULT_MANAGER_CONFIG)}const DEFAULT_MANAGER_CONFIG={managerUrl:MANAGER_URL,keycloakUrl:KEYCLOAK_URL,auth:"KEYCLOAK",autoLogin:!0,realm:void 0,consoleAutoEnable:!0,loadTranslations:["or"]};let OrApp=class extends LitElement{static get styles(){return css`
2
+ :host {
3
+ --or-app-color2: ${unsafeCSS(DefaultColor2)};
4
+ --or-app-color3: ${unsafeCSS(DefaultColor3)};
5
+ --or-app-color4: ${unsafeCSS(DefaultColor4)};
6
+ --or-console-primary-color: #4D9D2A;
7
+ color: ${unsafeCSS(DefaultColor3)};
8
+ fill: ${unsafeCSS(DefaultColor3)};
9
+ font-size: 14px;
10
+
11
+ height: 100vh;
12
+ display: flex;
13
+ flex: 1;
14
+ flex-direction: column;
15
+ }
16
+
17
+ .main-content {
18
+ display: flex;
19
+ flex: 1;
20
+ box-sizing: border-box;
21
+ background-color: var(--or-app-color2);
22
+ overflow: auto;
23
+ }
24
+
25
+ .no-scroll {
26
+ overflow: hidden;
27
+ }
28
+
29
+ main > * {
30
+ display: flex;
31
+ flex: 1;
32
+ position: relative;
33
+ }
34
+
35
+ .desktop-hidden {
36
+ display: none !important;
37
+ }
38
+
39
+ @media only screen and (max-width: 780px) {
40
+ .desktop-hidden {
41
+ display: inline-block !important;
42
+ }
43
+ }
44
+
45
+ /* HEADER STYLES */
46
+ or-header a > or-icon {
47
+ margin-right: 10px;
48
+ }
49
+ `}constructor(e){super(),this._initialised=!1,this._offline=!1,this._showOfflineFallback=!1,this._store=e,OrMwcDialog.DialogHostElement=this,OrMwcSnackbar.DialogHostElement=this}getState(){return this._store.getState()}onVisibilityChange(e){"visible"===document.visibilityState?this._onEvent(OREvent.CONSOLE_VISIBLE):this._onEvent(OREvent.CONSOLE_HIDDEN)}connectedCallback(){super.connectedCallback(),this._storeUnsubscribe=this._store.subscribe((()=>this.stateChanged(this.getState()))),this._onVisibilityBind=this.onVisibilityChange.bind(this),document.addEventListener("visibilitychange",this._onVisibilityBind),this.stateChanged(this.getState())}disconnectedCallback(){this._storeUnsubscribe(),this._onVisibilityBind&&document.removeEventListener("visibilityChange",this._onVisibilityBind),this._onEventBind&&manager.removeListener(this._onEventBind),super.disconnectedCallback()}firstUpdated(e){super.firstUpdated(e);const t=this.managerConfig?Object.assign(Object.assign({},DEFAULT_MANAGER_CONFIG),this.managerConfig):DEFAULT_MANAGER_CONFIG;t.realm||(t.realm=getRealmQueryParameter()),t.skipFallbackToBasicAuth=!0,t.basicLoginProvider=(e,t)=>this.doBasicLogin(e,t),console.info("Initialising the manager"),manager.init(t).then((e=>__awaiter(this,void 0,void 0,(function*(){if(e||manager.error!==ORError.AUTH_FAILED||t.auth&&"KEYCLOAK"!==t.auth||(this.doAppConfigInit(),t.auth="BASIC",e=yield manager.init(t)),e){if(this.doAppConfigInit(),!this.appConfig)return showErrorDialog("appError.noConfig",document.body),void console.error("No AppConfig supplied");if(!this._config)return showErrorDialog("appError.noConfig",document.body),void console.error("No default AppConfig or realm specific config provided so cannot render");if(!this._store)return showErrorDialog("appError.noReduxStore",document.body),void console.error("No Redux store supplied");if(!this.appConfig.pages||0===Object.keys(this.appConfig.pages).length)return showErrorDialog("appError.noPages",document.body),void console.error("No page providers");const e=yield manager.rest.api.RealmResource.getAccessible();let t;this._realms=e.data,manager.isSuperUser()&&(t=window.sessionStorage.getItem("realm"),t&&!this._realms.some((e=>e.name===t))&&(t=void 0)),this._store.dispatch(updateRealm(t||manager.getRealm()||"master")),this._initialised=!0,this._onEventBind=this._onEvent.bind(this),manager.addListener(this._onEventBind);const o=e=>{this._activeMenu=e};router.hooks({before(e,t){o(t?t.url.split("/")[0]:void 0),e()}}),this.appConfig.pages.forEach(((e,t)=>{e.routes&&e.routes.forEach((t=>{router.on(t,(t=>{this._store.dispatch(updatePage({page:e.name,params:t.data}))}))}))})),this.appConfig.pages.length>0&&router.notFound((()=>{this._store.dispatch(updatePage(this.appConfig.pages[0].name))})),router.resolve()}else showErrorDialog(manager.isError?"managerError."+manager.error:"")}))))}updated(e){var t,o;if(super.updated(e),this._initialised&&(e.has("_page")||e.has("_offline")||e.has("_showOfflineFallback"))){if(this._mainElem){const i=this.appConfig.pages.find((e=>e.name===this._page)),r=this._showOfflineFallback&&!(null==i?void 0:i.allowOffline),a=this._mainElem.querySelector("#offline-page");if(e.has("_page")&&i){const e=this._mainElem.firstElementChild;if(e){const t=i.pageCreator();r&&(t.style.setProperty("display","none"),t.setAttribute("loadedDuringOffline","true")),this._mainElem.replaceChild(t,e)}else this._mainElem.appendChild(i.pageCreator())}if(a&&!r){this._mainElem.removeChild(a);const e=this._mainElem.firstElementChild;null==e||e.style.removeProperty("display"),(null==e?void 0:e.onRefresh)&&e.onRefresh()}else if(!a&&r){const e=(null===(t=this.appConfig)||void 0===t?void 0:t.offlinePage)?this.appConfig.offlinePage.pageCreator():pageOfflineProvider(this._store).pageCreator();null===(o=this._mainElem.firstElementChild)||void 0===o||o.style.setProperty("display","none"),e.id="offline-page",this._mainElem.appendChild(e)}}this.updateWindowTitle()}}shouldUpdate(e){if(e.has("_realm")&&(this._config=this._getConfig(),this._realm?(manager.displayRealm=this._realm,window.sessionStorage.setItem("realm",this._realm)):window.sessionStorage.removeItem("realm")),e.has("_config")&&this._config){this._config.logo||(this._config.logo=DefaultLogo),this._config.logoMobile||(this._config.logoMobile=DefaultMobileLogo);const e=this._config&&this._config.favicon?this._config.favicon:DefaultFavIcon;let t=document.querySelector("link[rel~='icon']");t||(t=document.createElement("link"),t.rel="icon",document.getElementsByTagName("head")[0].appendChild(t)),t.href=e}return this.updateWindowTitle(),super.shouldUpdate(e)}render(){if(!this._initialised)return html`<or-mwc-dialog id="app-modal"></or-mwc-dialog>`;let e;if(manager.consoleAppConfig){const t=manager.consoleAppConfig,o=t.primaryColor,i=t.secondaryColor;e=html`<style>:host {--or-console-primary-color:${o};--or-console-secondary-color:${i};}</style>`}return html`
50
+ ${this._config.styles?"string"==typeof this._config.styles?html`<style>${this._config.styles}</style>`:this._config.styles.strings:""}
51
+ ${e}
52
+ ${this._config.header?html`
53
+ <or-header .activeMenu="${this._activeMenu}" .store="${this._store}" .realm="${this._realm}" .realms="${this._realms}" .logo="${this._config.logo}" .logoMobile="${this._config.logoMobile}" .config="${this._config.header}"></or-header>
54
+ `:""}
55
+
56
+ <!-- Main content -->
57
+ <main role="main" class="main-content d-none"></main>
58
+
59
+ <slot></slot>
60
+ `}stateChanged(e){this._realm=e.app.realm,this._page=e.app.page,this._offline=e.app.offline}_onEvent(e){var t;e===OREvent.OFFLINE?this._offline||this._store.dispatch(setOffline(!0)):e===OREvent.ONLINE?this._offline&&(this._showOfflineFallback=!1,this._completeOfflineFallbackTimer(),this._store.dispatch(setOffline(!1))):e===OREvent.RECONNECT_FAILED?this._startOfflineFallbackTimer():e===OREvent.CONSOLE_VISIBLE?(this._store.dispatch(setVisibility(!0)),(null===(t=manager.console)||void 0===t?void 0:t.isMobile)&&this._offline&&this._startOfflineFallbackTimer(!0),manager.reconnect(!0)):e===OREvent.CONSOLE_HIDDEN&&this._store.dispatch(setVisibility(!1))}_startOfflineFallbackTimer(e=!1){var t;if(e)this._completeOfflineFallbackTimer(!0);else if(this._offlineFallbackDeferred||this._showOfflineFallback)return;const o=new Util.Deferred;let i=!1;o.promise.then((()=>{this._showOfflineFallback=this._offline})).finally((()=>{i=!0})),setTimeout((()=>{i||o.resolve()}),(null===(t=this.appConfig)||void 0===t?void 0:t.offlineTimeout)||1e4),this._offlineFallbackDeferred=o}_completeOfflineFallbackTimer(e=!1){var t,o;e?null===(t=this._offlineFallbackDeferred)||void 0===t||t.reject():null===(o=this._offlineFallbackDeferred)||void 0===o||o.resolve(),this._offlineFallbackDeferred=void 0}logout(){manager.logout()}setLanguage(e){manager.language=e}showLanguageModal(){showDialog((new OrMwcDialog).setHeading("language").setDismissAction(null).setStyles(html`<style>.selected { color: ${unsafeCSS(DefaultColor4)} }</style>`).setActions(Object.entries(this.appConfig.languages||DEFAULT_LANGUAGES).map((([e,t])=>({content:html`<span class="${e===manager.language?"selected":""}">${i18next.t(t)}</span>`,actionName:e,action:()=>{manager.language=e}})))))}doAppConfigInit(){this.appConfig=this.appConfig||(this.appConfigProvider?this.appConfigProvider(manager):void 0),this.appConfig&&(this._config||(this._config=this._getConfig()))}doBasicLogin(e,t){const o=new Util.Deferred;let i=e,r=t;const a=html`
61
+ #login-logo {
62
+ width: 24px;
63
+ height: 24px;
64
+ }
65
+
66
+ #login_wrapper > or-mwc-input {
67
+ margin: 10px 0;
68
+ width: 100%;
69
+ }
70
+ `;return showDialog((new OrMwcDialog).setStyles(html`<style>${a}</style>`).setHeading(html`<img id="login-logo" src="${this._config.logoMobile||this._config.logo}" /></or-icon><or-translate value="login"></or-translate>`).setContent(html`
71
+ <div id="login_wrapper">
72
+ <or-mwc-input .label="${i18next.t("user")}" .type="${InputType.TEXT}" min="1" required .value="${e}" @or-mwc-input-changed="${e=>i=e.detail.value}"></or-mwc-input>
73
+ <or-mwc-input .label="${i18next.t("password")}" .type="${InputType.PASSWORD}" min="1" required .value="${t}" @or-mwc-input-changed="${e=>r=e.detail.value}"></or-mwc-input>
74
+ </div>
75
+ `).setActions([{actionName:"submit",default:!0,action:()=>{o.resolve({cancel:!1,username:i,password:r})},content:html`<or-mwc-input .type=${InputType.BUTTON} .label="${i18next.t("submit")}" raised></or-mwc-input>`}]),document.body),o.promise}updateWindowTitle(){if(!this._initialised)return;const e=this._config.appTitle||"";let t=i18next.isInitialized?i18next.t(e):e;const o=this._mainElem?this._mainElem.firstElementChild:void 0;o&&(t+=i18next.isInitialized?" - "+i18next.t(o.name):" - "+o.name),updateMetadata({title:t,description:t})}_getConfig(){const e=this.appConfig.realms?this.appConfig.realms.default:{};let t=this.appConfig.realms?this.appConfig.realms[this._realm||""]:void 0;return t=Util.mergeObjects(e,t,!1),this.appConfig&&this.appConfig.superUserHeader&&manager.isSuperUser()&&(t.header=this.appConfig.superUserHeader),t}};__decorate([property({type:Object})],OrApp.prototype,"appConfig",void 0),__decorate([property({type:Object})],OrApp.prototype,"managerConfig",void 0),__decorate([query("main")],OrApp.prototype,"_mainElem",void 0),__decorate([state()],OrApp.prototype,"_initialised",void 0),__decorate([state()],OrApp.prototype,"_page",void 0),__decorate([state()],OrApp.prototype,"_config",void 0),__decorate([state()],OrApp.prototype,"_realm",void 0),__decorate([state()],OrApp.prototype,"_offline",void 0),__decorate([state()],OrApp.prototype,"_showOfflineFallback",void 0),__decorate([state()],OrApp.prototype,"_activeMenu",void 0),OrApp=__decorate([customElement("or-app")],OrApp);export{OrApp};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO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AAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;YAC5E,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC;QACxD,CAAC;QACD,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ,CAAA;AApiBU;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;wCACO;AAKzB;IADN,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CACY;AAG3B;IADT,KAAK,CAAC,MAAM,CAAC;wCACoB;AAGxB;IADT,KAAK,EAAE;2CACuB;AAGrB;IADT,KAAK,EAAE;oCACiB;AAGf;IADT,KAAK,EAAE;sCAC2B;AAGzB;IADT,KAAK,EAAE;qCACkB;AAGhB;IADT,KAAK,EAAE;uCAC4B;AAG1B;IADT,KAAK,EAAE;mDACwC;AAGtC;IADT,KAAK,EAAE;0CACuB;AAhCtB,KAAK;IADjB,aAAa,CAAC,QAAQ,CAAC;GACX,KAAK,CAuiBjB"}
@@ -0,0 +1,44 @@
1
+ import { LitElement, PropertyValues, TemplateResult } from "lit";
2
+ import { DEFAULT_LANGUAGES, Languages } from "@openremote/core";
3
+ import "@openremote/or-mwc-components/or-mwc-dialog";
4
+ import "@openremote/or-icon";
5
+ import { Realm } from "@openremote/model";
6
+ import { AppStateKeyed } from "./index";
7
+ import { AnyAction, Store } from "@reduxjs/toolkit";
8
+ export { DEFAULT_LANGUAGES, Languages };
9
+ export interface HeaderConfig {
10
+ mainMenu: HeaderItem[];
11
+ secondaryMenu?: HeaderItem[];
12
+ }
13
+ export interface HeaderItem {
14
+ icon: string;
15
+ text: string;
16
+ value?: string;
17
+ href?: string;
18
+ absolute?: boolean;
19
+ action?: () => void;
20
+ hideMobile?: boolean;
21
+ roles?: string[] | {
22
+ [client: string]: string[];
23
+ } | (() => boolean);
24
+ }
25
+ export declare class OrHeader extends LitElement {
26
+ static get styles(): import("lit").CSSResult;
27
+ realms: Realm[];
28
+ realm: string;
29
+ store: Store<AppStateKeyed, AnyAction>;
30
+ logo?: string;
31
+ logoMobile?: string;
32
+ config?: HeaderConfig;
33
+ protected _mobileBottomDiv: HTMLDivElement;
34
+ activeMenu: string | undefined;
35
+ private _drawerOpened;
36
+ _onRealmSelect(realm: string): void;
37
+ protected shouldUpdate(changedProperties: PropertyValues): boolean;
38
+ protected render(): TemplateResult<1>;
39
+ protected _getRealmMenu(callback: (realm: string) => void): TemplateResult;
40
+ protected _onSecondaryMenuSelect(value: string): void;
41
+ protected _onHeaderItemSelect(headerItem: HeaderItem): void;
42
+ protected _closeDrawer(): void;
43
+ protected _toggleDrawer(): void;
44
+ }
@@ -0,0 +1,297 @@
1
+ var __decorate=this&&this.__decorate||function(e,r,o,t){var a,i=arguments.length,n=i<3?r:null===t?t=Object.getOwnPropertyDescriptor(r,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,r,o,t);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(i<3?a(n):i>3?a(r,o,n):a(r,o))||n);return i>3&&n&&Object.defineProperty(r,o,n),n};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query,state}from"lit/decorators.js";import manager,{DefaultBoxShadowBottom,DefaultColor1,DefaultColor2,DefaultColor3,DefaultColor4,DefaultColor5,DefaultHeaderHeight,Util,DEFAULT_LANGUAGES}from"@openremote/core";import"@openremote/or-mwc-components/or-mwc-dialog";import"@openremote/or-icon";import{getContentWithMenuTemplate}from"@openremote/or-mwc-components/or-mwc-menu";import{router,updateRealm}from"./index";export{DEFAULT_LANGUAGES};function getHeaderMenuItems(e){return e.filter(hasRequiredRole).map((e=>({text:e.text,value:e.value?e.value:"",icon:e.icon,href:e.href})))}function hasRequiredRole(e){return!e.roles||(Array.isArray(e.roles)?e.roles.some((e=>manager.hasRole(e))):Util.isFunction(e.roles)?e.roles():Object.entries(e.roles).some((([e,r])=>r.some((r=>manager.hasRole(r,e))))))}function getCurrentMenuItemRef(e){return window.location.hash.substr(2).split("/")[0]||e}let OrHeader=class extends LitElement{constructor(){super(...arguments),this._drawerOpened=!1}static get styles(){return css`
2
+
3
+ :host {
4
+ --internal-or-header-color: var(--or-header-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));
5
+ --internal-or-header-selected-color: var(--or-header-selected-color, var(--or-app-color4, ${unsafeCSS(DefaultColor4)}));
6
+ --internal-or-header-text-color: var(--or-header-text-color, var(--or-app-color3, inherit));
7
+ --internal-or-header-height: var(--or-header-height, ${unsafeCSS(DefaultHeaderHeight)});
8
+ --internal-or-header-logo-margin: var(--or-header-logo-margin, 0 40px 0 0);
9
+ --internal-or-header-logo-height: var(--or-header-logo-height, var(--internal-or-header-height, ${unsafeCSS(DefaultHeaderHeight)}));
10
+ --internal-or-header-item-size: var(--or-header-item-size, calc(${unsafeCSS(DefaultHeaderHeight)} - 20px));
11
+ --internal-or-header-drawer-color: var(--or-header-drawer-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
12
+ --internal-or-header-drawer-text-color: var(--or-header-drawer-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
13
+ --internal-or-header-drawer-item-size: var(--or-header-drawer-item-size, 30px);
14
+ --internal-or-header-drawer-separator-color: var(--or-header-drawer-separator-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}));
15
+
16
+ display: block;
17
+ z-index: 4;
18
+ }
19
+
20
+ #toolbar-top {
21
+ display: flex;
22
+ padding: 0;
23
+ }
24
+
25
+ #logo-mobile {
26
+ margin: 8px;
27
+ height: calc(var(--internal-or-header-logo-height) - 16px);
28
+ display: block;
29
+ }
30
+
31
+ #logo {
32
+ display: none;
33
+ }
34
+
35
+ #header {
36
+ opacity: 1;
37
+ width: 100%;
38
+ height: var(--internal-or-header-height);
39
+ text-align: center;
40
+ background-color: var(--internal-or-header-color);
41
+ color: var(--internal-or-header-text-color);
42
+ --or-icon-fill: var(--internal-or-header-text-color);
43
+ --or-icon-height: calc(var(--internal-or-header-item-size) - 12px);
44
+ --or-icon-width: calc(var(--internal-or-header-item-size) - 12px);
45
+ z-index: 9999999;
46
+ }
47
+
48
+ .shadow {
49
+ -webkit-box-shadow: ${unsafeCSS(DefaultBoxShadowBottom)};
50
+ -moz-box-shadow: ${unsafeCSS(DefaultBoxShadowBottom)};
51
+ box-shadow: ${unsafeCSS(DefaultBoxShadowBottom)};
52
+ }
53
+
54
+ #drawer {
55
+ width: 100%;
56
+ position: absolute;
57
+ top: var(--internal-or-header-height);
58
+ max-height: 0;
59
+ height: calc(100% - var(--internal-or-header-height));
60
+ transition: max-height 0.25s ease-out;
61
+ background: var(--internal-or-header-drawer-color);
62
+ color: var(--internal-or-header-drawer-text-color);
63
+ --or-icon-fill: var(--internal-or-header-drawer-text-color);
64
+ --or-icon-height: calc(var(--internal-or-header-drawer-item-size) - 10px);
65
+ --or-icon-width: calc(var(--internal-or-header-drawer-item-size) - 10px);
66
+ overflow: auto;
67
+ }
68
+
69
+ #drawer[opened] {
70
+ max-height: 10000px;
71
+ transition: max-height 0.75s ease-in;
72
+ }
73
+
74
+ #drawer > div {
75
+ box-sizing: border-box;
76
+ width: 100%;
77
+ height: 100%;
78
+ padding: 10px 0px;
79
+ position: relative;
80
+ }
81
+
82
+ .menu-btn {
83
+ background: none;
84
+ border: none;
85
+ cursor: pointer;
86
+ padding: 0 16px;
87
+ height: 100%;
88
+ }
89
+
90
+ #menu-btn-mobile {
91
+ display: flex;
92
+ margin-left: auto;
93
+ --or-icon-height: calc(var(--internal-or-header-item-size) - 8px);
94
+ --or-icon-width: calc(var(--internal-or-header-item-size) - 8px);
95
+ }
96
+
97
+ #menu-btn-mobile #realm-picker > span{
98
+ max-width: 70px;
99
+ text-overflow: ellipsis;
100
+ overflow: hidden;
101
+ white-space: nowrap;
102
+ }
103
+
104
+ #menu-btn-desktop {
105
+ display: none;
106
+ }
107
+
108
+ #desktop-right {
109
+ margin-left: auto;
110
+ padding-right: 10px;
111
+ display: none;
112
+ }
113
+
114
+ .mobile-bottom-border {
115
+ border-top: 1px solid var(--internal-or-header-drawer-separator-color);
116
+ margin-top: 16px;
117
+ padding-top: 8px;
118
+ }
119
+
120
+ .menu-item {
121
+ opacity: 0.7;
122
+ cursor: pointer;
123
+ text-decoration: none !important;
124
+ color: inherit;
125
+ padding: 0 20px;
126
+ font-size: 14px;
127
+ }
128
+
129
+ .menu-item:hover,
130
+ .menu-item[selected] {
131
+ opacity: 1;
132
+ }
133
+ #desktop-left .menu-item or-icon {
134
+ margin-right: 10px;
135
+ }
136
+ #desktop-left .menu-item {
137
+ display: none;
138
+ line-height: calc(var(--internal-or-header-height) - 4px);
139
+ }
140
+
141
+ #desktop-right .menu-item {
142
+ line-height: var(--internal-or-header-height);
143
+ }
144
+
145
+ #drawer .menu-item {
146
+ display: block;
147
+ line-height: var(--internal-or-header-drawer-item-size);
148
+ margin: 6px 0;
149
+ padding: 8px 16px;
150
+ }
151
+
152
+ #drawer .menu-item or-icon {
153
+ margin: 0 10px;
154
+ }
155
+
156
+ #desktop-left .menu-item[selected] {
157
+ display: inline-block;
158
+ line-height: var(--internal-or-header-height);
159
+ }
160
+
161
+ or-mwc-menu {
162
+ margin-right: 10px;
163
+ display: block;
164
+ }
165
+
166
+ .or-language-container {
167
+ display: flex;
168
+ height: 50px;
169
+ align-items: center;
170
+ }
171
+
172
+ #realm-picker {
173
+ position: relative;
174
+ display: flex;
175
+ height: 50px;
176
+ align-items: center;
177
+ cursor: pointer;
178
+ margin-left: 10px;
179
+ }
180
+
181
+ #realm-picker > span {
182
+ margin-right: 2px;
183
+ }
184
+
185
+ /* Wide layout: when the viewport width is bigger than 768px, layout
186
+ changes to a wide layout. */
187
+ @media (min-width: 768px) {
188
+ #menu-btn-desktop {
189
+ display: block;
190
+ }
191
+
192
+ #menu-btn-mobile {
193
+ display: none;
194
+ }
195
+
196
+ #drawer {
197
+ display: none;
198
+ }
199
+
200
+ #desktop-right {
201
+ display: flex;
202
+ }
203
+
204
+ #desktop-left .menu-item {
205
+ display: inline-block;
206
+ }
207
+
208
+ #desktop-left .menu-item or-icon {
209
+ display: none;
210
+ }
211
+
212
+ #desktop-left .menu-item[selected] {
213
+ border-bottom: 4px solid var(--internal-or-header-selected-color);
214
+ line-height: calc(var(--internal-or-header-height) - 4px);
215
+ }
216
+
217
+ #logo {
218
+ margin: var(--internal-or-header-logo-margin);
219
+ height: var(--internal-or-header-logo-height);
220
+ display: block;
221
+ }
222
+
223
+ #logo-mobile {
224
+ display: none;
225
+ }
226
+
227
+ #desktop-left ::slotted(*) {
228
+ display: inline-block;
229
+ }
230
+
231
+ #desktop-left ::slotted(*[selected]) {
232
+ border-bottom: 4px solid var(--internal-or-header-selected-color);
233
+ line-height: calc(var(--internal-or-header-height) - 4px);
234
+ }
235
+ }
236
+
237
+ @media (min-width: 1024px) {
238
+
239
+
240
+ #desktop-left .menu-item or-icon{
241
+ display: inline-block;
242
+ }
243
+ }
244
+ `}_onRealmSelect(e){this.store.dispatch(updateRealm(e))}shouldUpdate(e){return e.has("config")&&(this.activeMenu=getCurrentMenuItemRef(this.config&&this.config.mainMenu&&this.config.mainMenu.length>0?this.config.mainMenu[0].href:void 0)),super.shouldUpdate(e)}render(){if(!this.config)return html``;const e=this.config.mainMenu,r=this.config.secondaryMenu;return html`
245
+ <!-- Header -->
246
+ <div id="header" class="shadow">
247
+ <div id="toolbar-top">
248
+ <div><img id="logo" src="${this.logo}" /><img id="logo-mobile" src="${this.logoMobile}" /></div>
249
+
250
+ <!-- This gets hidden on a small screen-->
251
+ <nav id="toolbar-list">
252
+ <div id="desktop-left">
253
+ ${e?e.filter(hasRequiredRole).map((e=>html`
254
+ <a class="menu-item" @click="${r=>this._onHeaderItemSelect(e)}" ?selected="${this.activeMenu===e.href}"><or-icon icon="${e.icon}"></or-icon><or-translate value="${e.text}"></or-translate></a>
255
+ `)):""}
256
+ </div>
257
+ </nav>
258
+ <div id="desktop-right">
259
+ ${this._getRealmMenu((e=>this._onRealmSelect(e)))}
260
+ ${r?getContentWithMenuTemplate(html`
261
+ <button id="menu-btn-desktop" class="menu-btn" title="Menu"><or-icon icon="dots-vertical"></or-icon></button>
262
+ `,getHeaderMenuItems(r),void 0,(e=>this._onSecondaryMenuSelect(e))):""}
263
+ </div>
264
+ <div id="menu-btn-mobile">
265
+ ${this._getRealmMenu((e=>this._onRealmSelect(e)))}
266
+ <button id="menu-btn" class="menu-btn" title="Menu" @click="${this._toggleDrawer}"><or-icon icon="${this._drawerOpened?"close":"menu"}"></or-icon></button>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ <div id="drawer" ?opened="${this._drawerOpened}" @click="${this._closeDrawer}">
271
+ <div>
272
+ <div id="mobile-top">
273
+ <nav id="drawer-list">
274
+ ${e?e.filter((e=>!e.hideMobile&&hasRequiredRole(e))).map((e=>html`
275
+ <a class="menu-item" @click="${r=>this._onHeaderItemSelect(e)}" ?selected="${this.activeMenu===e.href}"><or-icon icon="${e.icon}"></or-icon><or-translate value="${e.text}"></or-translate></a>
276
+ `)):""}
277
+ </nav>
278
+ </div>
279
+
280
+ ${r?html`
281
+ <div id="mobile-bottom" class="${e.length>0?"mobile-bottom-border":""}">
282
+ ${r.filter((e=>!e.hideMobile&&hasRequiredRole(e))).map((e=>html`
283
+ <a class="menu-item" @click="${r=>this._onHeaderItemSelect(e)}" ?selected="${this.activeMenu===e.href}"><or-icon icon="${e.icon}"></or-icon><or-translate value="${e.text}"></or-translate></a>
284
+ `))}
285
+ </div>`:""}
286
+ </div>
287
+ </div>
288
+ `}_getRealmMenu(e){const r=this.realms.find((e=>e.name===this.realm));let o=html`
289
+ <div id="realm-picker">
290
+ ${this.realms.length>1?html`
291
+ <span>${r?r.displayName:""}</span>
292
+ <or-icon icon="chevron-down"></or-icon>
293
+ `:""}
294
+ </div>
295
+ `;if(manager.isSuperUser()){const t=this.realms.map((e=>({text:e.displayName,value:e.name})));o=html`
296
+ ${getContentWithMenuTemplate(o,t,r?r.name:void 0,(r=>e(r)))}
297
+ `}return o}_onSecondaryMenuSelect(e){const r=this.config.secondaryMenu.find((r=>r.value===e));r&&this._onHeaderItemSelect(r)}_onHeaderItemSelect(e){e.action?e.action():e.href&&(e.absolute?window.location.href=e.href:router.navigate(e.href))}_closeDrawer(){this._drawerOpened=!1}_toggleDrawer(){this._drawerOpened=!this._drawerOpened}};__decorate([property({type:Array})],OrHeader.prototype,"realms",void 0),__decorate([property({type:String})],OrHeader.prototype,"realm",void 0),__decorate([property({type:Object})],OrHeader.prototype,"store",void 0),__decorate([property({type:String})],OrHeader.prototype,"logo",void 0),__decorate([property({type:String})],OrHeader.prototype,"logoMobile",void 0),__decorate([property({type:Object})],OrHeader.prototype,"config",void 0),__decorate([query("div[id=mobile-bottom]")],OrHeader.prototype,"_mobileBottomDiv",void 0),__decorate([property()],OrHeader.prototype,"activeMenu",void 0),__decorate([state()],OrHeader.prototype,"_drawerOpened",void 0),OrHeader=__decorate([customElement("or-header")],OrHeader);export{OrHeader};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"or-header.js","sourceRoot":"","sources":["../src/or-header.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkC,SAAS,EAAC,MAAM,KAAK,CAAC;AACrF,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACxE,OAAO,OAAO,EAAE,EACZ,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,IAAI,EACN,iBAAiB,EAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,6CAA6C,CAAC;AACrD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAC,0BAA0B,EAAC,MAAM,2CAA2C,CAAC;AAGrF,OAAO,EAAgB,MAAM,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAG3D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4ZpB"}
@@ -0,0 +1,11 @@
1
+ import { Page, PageProvider } from "./types";
2
+ import { TemplateResult } from "lit";
3
+ import { AppStateKeyed } from "./app";
4
+ import { Store } from "@reduxjs/toolkit";
5
+ export declare function pageOfflineProvider(store: Store<AppStateKeyed>): PageProvider<AppStateKeyed>;
6
+ export declare class PageOffline extends Page<AppStateKeyed> {
7
+ static get styles(): import("lit").CSSResult[];
8
+ stateChanged(state: AppStateKeyed): void;
9
+ protected render(): TemplateResult;
10
+ get name(): string;
11
+ }
@@ -0,0 +1,53 @@
1
+ var __decorate=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},__await=this&&this.__await||function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=this&&this.__asyncGenerator||function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=n.apply(e,t||[]),r=[];return i={},a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),i[Symbol.asyncIterator]=function(){return this},i;function a(e,t){o[e]&&(i[e]=function(t){return new Promise((function(n,i){r.push([e,t,n,i])>1||f(e,t)}))},t&&(i[e]=t(i[e])))}function f(e,t){try{(n=o[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(c,l):s(r[0][2],n)}catch(e){s(r[0][3],e)}var n}function c(e){f("next",e)}function l(e){f("throw",e)}function s(e,t){e(t),r.shift(),r.length&&f(r[0][0],r[0][1])}};import{Page}from"./types";import{css,html}from"lit";import{customElement}from"lit/decorators.js";const styling=css`
2
+ #offline-wrapper {
3
+ display: flex;
4
+ justify-content: center;
5
+ align-items: center;
6
+ height: 100%;
7
+ width: 100%;
8
+ flex-direction: column;
9
+ gap: 32px;
10
+ padding: 0 32px;
11
+ }
12
+
13
+ #offline-icon {
14
+ font-size: 64px;
15
+ }
16
+
17
+ #offline-text-container {
18
+ display: flex;
19
+ align-items: center;
20
+ flex-direction: column;
21
+ gap: 16px;
22
+ }
23
+
24
+ #offline-title {
25
+ font-size: 24px;
26
+ font-weight: bold;
27
+ }
28
+
29
+ #reconnecting-text:after {
30
+ display: inline-block;
31
+ animation: dotty steps(2,end) 2s infinite;
32
+ content: '';
33
+ }
34
+
35
+ @keyframes dotty {
36
+ 0% { content: ''; }
37
+ 25% { content: '.'; }
38
+ 50% { content: '..'; }
39
+ 75% { content: '...'; }
40
+ 100% { content: ''; }
41
+ }
42
+ `;function countDown(e){return __asyncGenerator(this,arguments,(function*(){for(;e>0;)yield yield __await(e--),yield __await(new Promise((e=>setTimeout(e,1e3))))}))}export function pageOfflineProvider(e){return{name:"offline",routes:["offline"],pageCreator:()=>new PageOffline(e)}}let PageOffline=class extends Page{static get styles(){return[styling]}stateChanged(e){}render(){return html`
43
+ <div id="offline-wrapper">
44
+ <or-icon id="offline-icon" icon="web-off"></or-icon>
45
+ <div id="offline-text-container">
46
+ <span id="offline-title""><or-translate value="youAreOffline"></or-translate></span>
47
+ <span id="offline-subtitle"><or-translate value="checkConnection"></or-translate></span>
48
+ </div>
49
+ <div>
50
+ <span><or-translate id="reconnecting-text" value="reconnecting"></or-translate></span>
51
+ </div>
52
+ </div>
53
+ `}get name(){return"offline"}};PageOffline=__decorate([customElement("page-offline")],PageOffline);export{PageOffline};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-offline.js","sourceRoot":"","sources":["../src/page-offline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAC,IAAI,EAAe,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAC,GAAG,EAAE,IAAI,EAAiB,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAQ,MAAM,mBAAmB,CAAC;AAQvD,eAAe;AACf,MAAM,OAAO,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB,CAAA;AAED,SAAgB,SAAS,CAAC,KAAa;;QACnC,OAAO,KAAK,GAAG,CAAC,EAAE,CAAC;YACf,oBAAM,KAAK,EAAE,CAAA,CAAC;YACd,cAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA,CAAC;QAClD,CAAC;IACL,CAAC;CAAA;AAED,MAAM,UAAU,mBAAmB,CAAC,KAA2B;IAC3D,OAAO;QACH,IAAI,EAAE,SAAS;QACf,MAAM,EAAE;YACJ,SAAS;SACZ;QACD,WAAW,EAAE,GAAG,EAAE;YACd,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;KACJ,CAAC;AACN,CAAC;AAIM,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,IAAmB;IAEhD,MAAM,KAAK,MAAM;QACb,OAAO,CAAC,OAAO,CAAC,CAAA;IACpB,CAAC;IAEM,YAAY,CAAC,KAAoB;IACxC,CAAC;IAES,MAAM;QACZ,OAAO,IAAI,CAAA;;;;;;;;;;;SAWV,CAAA;IACL,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AA3BY,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA2BvB"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ import { HeaderConfig, Languages } from "./or-header";
2
+ import { AppStateKeyed } from "./app";
3
+ import { LitElement, TemplateResult } from "lit";
4
+ import { AnyAction, Store, Unsubscribe } from "@reduxjs/toolkit";
5
+ import Navigo from "navigo";
6
+ export declare const router: Navigo;
7
+ export interface RealmAppConfig {
8
+ appTitle?: string;
9
+ logo?: HTMLTemplateElement | string;
10
+ logoMobile?: HTMLTemplateElement | string;
11
+ favicon?: HTMLTemplateElement | string;
12
+ language?: string;
13
+ header?: HeaderConfig;
14
+ styles?: TemplateResult | string;
15
+ }
16
+ export interface AppConfig<S extends AppStateKeyed> {
17
+ pages: PageProvider<S>[];
18
+ offlinePage?: PageProvider<S>;
19
+ offlineTimeout?: number;
20
+ languages?: Languages;
21
+ superUserHeader?: HeaderConfig;
22
+ realms?: {
23
+ default?: RealmAppConfig;
24
+ [realm: string]: RealmAppConfig;
25
+ };
26
+ }
27
+ export interface PageProvider<S extends AppStateKeyed> {
28
+ name: string;
29
+ routes: string[];
30
+ allowOffline?: boolean;
31
+ pageCreator: () => Page<S>;
32
+ }
33
+ declare const Page_base: (new (...args: any[]) => {
34
+ _i18nextJustInitialized: boolean;
35
+ connectedCallback(): void;
36
+ disconnectedCallback(): void;
37
+ shouldUpdate(changedProps: import("lit").PropertyValueMap<any> | Map<PropertyKey, unknown>): any;
38
+ initCallback: (options: import("i18next").InitOptions) => void;
39
+ langChangedCallback: () => void;
40
+ readonly isConnected: boolean;
41
+ }) & typeof LitElement;
42
+ export declare abstract class Page<S extends AppStateKeyed> extends Page_base {
43
+ abstract get name(): string;
44
+ protected _store: Store<S, AnyAction>;
45
+ protected _storeUnsubscribe: Unsubscribe;
46
+ onRefresh?: () => void;
47
+ constructor(store: Store<S, AnyAction>);
48
+ connectedCallback(): void;
49
+ disconnectedCallback(): void;
50
+ protected getState(): S;
51
+ abstract stateChanged(state: S): void;
52
+ }
53
+ export {};
package/lib/types.js ADDED
@@ -0,0 +1 @@
1
+ import{LitElement}from"lit";import i18next from"i18next";import{translate}from"@openremote/or-translate";import Navigo from"navigo";export const router=new Navigo("/",{hash:!0});export class Page extends(translate(i18next)(LitElement)){constructor(t){super(),this._store=t}connectedCallback(){super.connectedCallback(),this._storeUnsubscribe=this._store.subscribe((()=>this.stateChanged(this._store.getState()))),this.stateChanged(this._store.getState())}disconnectedCallback(){this._storeUnsubscribe(),super.disconnectedCallback()}getState(){return this._store.getState()}}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAiB,MAAM,KAAK,CAAC;AAC/C,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAEnD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,oBAAoB;AACpB,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,GAAG,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAgCpD,MAAM,OAAgB,IAA8B,SAAQ,SAAS,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAYtF,YAAY,KAA0B;QAClC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,iBAAiB;QACb,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAChG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,oBAAoB;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;IACjC,CAAC;IAES,QAAQ;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;CAGJ"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@openremote/or-app",
3
+ "version": "1.2.0-snapshot.20240512154942",
4
+ "description": "OpenRemote app template",
5
+ "author": "OpenRemote",
6
+ "license": "AGPL-3.0-or-later",
7
+ "main": "dist/umd/index.bundle.js",
8
+ "module": "lib/index.js",
9
+ "exports": {
10
+ ".": "./lib/index.js",
11
+ "./*": "./lib/*.js"
12
+ },
13
+ "types": "lib/index.d.ts",
14
+ "scripts": {
15
+ "clean": "npx tsc -b --clean && npx shx rm -rf dist lib",
16
+ "modelBuild": "npx orutil build",
17
+ "modelWatch": "npx orutil watch",
18
+ "build": "npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --mode production",
19
+ "test": "echo \"Error: no test specified\" && exit 1",
20
+ "prepublishOnly": "npx tsc -b"
21
+ },
22
+ "dependencies": {
23
+ "@openremote/core": "1.2.0-snapshot.20240512154942",
24
+ "@openremote/or-asset-tree": "1.2.0-snapshot.20240512154942",
25
+ "@openremote/or-asset-viewer": "1.2.0-snapshot.20240512154942",
26
+ "@openremote/or-attribute-input": "1.2.0-snapshot.20240512154942",
27
+ "@openremote/or-attribute-picker": "1.2.0-snapshot.20240512154942",
28
+ "@openremote/or-chart": "1.2.0-snapshot.20240512154942",
29
+ "@openremote/or-dashboard-builder": "1.2.0-snapshot.20240512154942",
30
+ "@openremote/or-gauge": "1.2.0-snapshot.20240512154942",
31
+ "@openremote/or-map": "1.2.0-snapshot.20240512154942",
32
+ "@openremote/or-mwc-components": "1.2.0-snapshot.20240512154942",
33
+ "@openremote/or-rules": "1.2.0-snapshot.20240512154942",
34
+ "@openremote/or-smart-notify": "1.2.0-snapshot.20240512154942",
35
+ "@openremote/or-timeline": "1.2.0-snapshot.20240512154942",
36
+ "@openremote/rest": "1.2.0-snapshot.20240512154942",
37
+ "@reduxjs/toolkit": "^1.8.1",
38
+ "@webcomponents/webcomponentsjs": "^2.6.0",
39
+ "lit": "^2.0.2",
40
+ "moment": "^2.29.4",
41
+ "navigo": "^8.11.1",
42
+ "pwa-helpers": "^0.9.0"
43
+ },
44
+ "devDependencies": {
45
+ "@openremote/util": "1.2.0-snapshot.20240512154942"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ }
50
+ }
package/typedoc.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ ... require('../../typedoc.js')
3
+ };