@uxland-admin/ip-context-info
Advanced tools
Comparing version 1.0.3 to 1.0.4
import { html } from '@polymer/lit-element'; | ||
export default html `<style>mwc-fab{--mdc-theme-secondary: #00bcd4}mwc-button{--mdc-theme-primary: #26c5da}mwc-checkbox{--mdc-theme-secondary: #26c5da}#app-container{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;flex:1;height:100vh}:host{display:flex;margin-right:32px}div{background-color:#F7F7F7;padding:6px 12px;border-radius:5px;font-size:12px;color:#37464D} | ||
export default html `<style>mwc-fab{--mdc-theme-secondary: #00bcd4}mwc-button{--mdc-theme-primary: #26c5da}mwc-checkbox{--mdc-theme-secondary: #26c5da}#app-container{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;flex:1;height:100vh}:host{display:flex;margin-left:32px}*[hidden]{display:none !important}#context-info-toolbar{background-color:#F7F7F7;padding:6px 12px;border-radius:5px;font-size:12px;color:#37464D;cursor:pointer}#context-info-toolbar:hover{background-color:#D9D9D9}#context-info-dialog{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:#01589d;color:#fff;z-index:1000}#context-info-dialog-header{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;padding:24px}paper-icon-button{--iron-icon-fill-color: #fff;padding:0} | ||
</style>`; |
import { html } from '@polymer/lit-element/lit-element'; | ||
import { moduleName } from "../../constants"; | ||
const innerTemplate = (props) => html `${props.contextInfo | ||
? html `<div>${props.contextInfo} - ${props.localize(`${moduleName}.diagnostic`)}: ${props.diagnosticInfo}</div>` | ||
: html `-`}`; | ||
import '@polymer/paper-icon-button/paper-icon-button'; | ||
import { iconTemplate } from './ip-cs-icons'; | ||
const innerTemplate = (props) => html ` | ||
${iconTemplate()} | ||
${props.contextInfo | ||
? html `<div id="context-info-toolbar">${props.contextInfo} - ${props.localize(`${moduleName}.diagnostic`)}: ${props.diagnosticInfo}</div>` | ||
: html `-`} | ||
<div ?hidden="${!props.displayInfo}" id="context-info-dialog"> | ||
<div id="context-info-dialog-header"> | ||
<paper-icon-button id="close-context" icon="ip-ci-icons:close"></paper-icon-button> | ||
</div> | ||
<div id="context-info-dialog-container"> | ||
</div> | ||
</div> | ||
`; | ||
export const template = innerTemplate; |
import * as tslib_1 from "tslib"; | ||
import { html, LitElement } from '@polymer/lit-element/lit-element'; | ||
import { property, customElement } from "@uxland/uxl-polymer2-ts"; | ||
import { property, customElement, listen } from "@uxland/uxl-polymer2-ts"; | ||
import { Locale } from '@uxland/uxl-prism/mixins/localization'; | ||
import CSS from './ip-ci-styles.js'; | ||
import { RegionView } from "@uxland/uxl-regions/region-view"; | ||
import { RegionHost } from '@uxland/uxl-regions/region-host-mixin'; | ||
import { template as TEMPLATE } from './ip-ci-template.js'; | ||
import { contextInfoView, diagnosticView } from "../../app/context-info/context-info-view"; | ||
import { fetchContextInfo } from "../../app/context-info/fetch-context-info"; | ||
let IpCi = class IpCi extends RegionView(Locale(LitElement)) { | ||
import { region } from '@uxland/uxl-regions/region-decorator'; | ||
import { infoContent } from '@uxland-admin/context-info-core/regions'; | ||
let IpCi = class IpCi extends RegionHost(RegionView(Locale(LitElement))) { | ||
constructor() { | ||
super(...arguments); | ||
this.displayInfo = false; | ||
} | ||
activeChanged(current) { | ||
@@ -17,4 +24,17 @@ current && fetchContextInfo(); | ||
} | ||
onClickToolbar(e) { | ||
this.toggleDisplay(); | ||
} | ||
onClickCloseContext(e) { | ||
this.toggleDisplay(); | ||
} | ||
toggleDisplay() { | ||
this.displayInfo = !this.displayInfo; | ||
} | ||
}; | ||
tslib_1.__decorate([ | ||
region({ name: infoContent, targetId: 'context-info-dialog-container' }), | ||
tslib_1.__metadata("design:type", Object) | ||
], IpCi.prototype, "content", void 0); | ||
tslib_1.__decorate([ | ||
property({ statePath: contextInfoView }), | ||
@@ -27,2 +47,18 @@ tslib_1.__metadata("design:type", String) | ||
], IpCi.prototype, "diagnosticInfo", void 0); | ||
tslib_1.__decorate([ | ||
property(), | ||
tslib_1.__metadata("design:type", Boolean) | ||
], IpCi.prototype, "displayInfo", void 0); | ||
tslib_1.__decorate([ | ||
listen('click', '#context-info-toolbar'), | ||
tslib_1.__metadata("design:type", Function), | ||
tslib_1.__metadata("design:paramtypes", [Object]), | ||
tslib_1.__metadata("design:returntype", void 0) | ||
], IpCi.prototype, "onClickToolbar", null); | ||
tslib_1.__decorate([ | ||
listen('click', '#close-context'), | ||
tslib_1.__metadata("design:type", Function), | ||
tslib_1.__metadata("design:paramtypes", [Object]), | ||
tslib_1.__metadata("design:returntype", void 0) | ||
], IpCi.prototype, "onClickCloseContext", null); | ||
IpCi = tslib_1.__decorate([ | ||
@@ -29,0 +65,0 @@ customElement('ip-ci') |
@@ -73,8 +73,15 @@ declare module '@uxland-admin/ip-context-info/constants' { | ||
declare module '@uxland-admin/ip-context-info/components/ip-ci/ip-ci-styles' { | ||
const _default: import("@polymer/lit-element/node_modules/lit-html/lib/template-result").TemplateResult; | ||
const _default: import("lit-html/lib/template-result").TemplateResult; | ||
export default _default; | ||
} | ||
declare module '@uxland-admin/ip-context-info/components/ip-ci/ip-cs-icons' { | ||
import '@polymer/iron-icons/iron-icons'; | ||
import { TemplateResult } from 'lit-html'; | ||
export const iconTemplate: () => TemplateResult; | ||
} | ||
declare module '@uxland-admin/ip-context-info/components/ip-ci/ip-ci-template' { | ||
import { TemplateResult } from 'lit-html'; | ||
import '@polymer/paper-icon-button/paper-icon-button'; | ||
export const template: (props: any) => TemplateResult; | ||
@@ -84,8 +91,13 @@ | ||
declare module '@uxland-admin/ip-context-info/components/ip-ci/ip-ci' { | ||
const IpCi_base: any; | ||
import { IRegion } from '@uxland/uxl-regions'; const IpCi_base: import("@uxland/uxl-regions/region-host-mixin").IRegionHostMixin<{}>; | ||
export class IpCi extends IpCi_base { | ||
activeChanged(current: boolean): void; | ||
render(): any; | ||
content: IRegion; | ||
contextInfo: string; | ||
diagnosticInfo: string; | ||
displayInfo: boolean; | ||
onClickToolbar(e: any): void; | ||
onClickCloseContext(e: any): void; | ||
toggleDisplay(): void; | ||
} | ||
@@ -92,0 +104,0 @@ export {}; |
@@ -8,3 +8,3 @@ import { calculateModuleBaseRoute } from '@uxland/uxl-prism/calculate-module-base.route'; | ||
import { regionManager } from "@uxland/uxl-regions/region-manager"; | ||
import { actionsToolbar } from '@uxland-admin/ics-process-core/regions'; | ||
import { header } from '@uxland-admin/ics-process-core/regions'; | ||
export const initialize = (mi) => { | ||
@@ -15,5 +15,5 @@ let baseRoute = calculateModuleBaseRoute(mi); | ||
injectReducer(moduleName, reducer); | ||
regionManager.registerViewWithRegion(actionsToolbar, moduleName, { htmlTag: 'ip-ci', htmlUrl: url('ip-ci/ip-ci'), sortHint: '001' }); | ||
regionManager.registerViewWithRegion(header, moduleName, { htmlTag: 'ip-ci', htmlUrl: url('ip-ci/ip-ci'), sortHint: '001' }); | ||
}; | ||
export const dispose = (mi) => { | ||
}; |
{ | ||
"name": "@uxland-admin/ip-context-info", | ||
"description": "ICS Process - Context info", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "index.js", | ||
@@ -30,5 +30,7 @@ "repository": { | ||
"typescript": "^3.1.6", | ||
"@uxland-admin/ics-process": "1.1.19" | ||
"@uxland-admin/ics-process": "1.1.21" | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"@uxland-admin/context-info-core": "^1.0.0" | ||
}, | ||
"scripts": { | ||
@@ -35,0 +37,0 @@ "deps:delete": "rimraf node_modules/ package-lock.json", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15515
15
273
1