@omegagrid/statusbar 0.10.2 → 0.10.4

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.
@@ -0,0 +1,48 @@
1
+ declare const _default: {
2
+ PREFIX: string;
3
+ DEFAULT_ACCENT_COLOR: string;
4
+ DEFAULT_ACCENT_COLOR_2: import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | any | ArrayLike<number> | {
5
+ [key: string]: any;
6
+ }> | ArrayLike<number> | {
7
+ [key: string]: any;
8
+ }> | ArrayLike<number> | {
9
+ [key: string]: any;
10
+ }> | ArrayLike<number> | {
11
+ [key: string]: any;
12
+ }> | ArrayLike<number> | {
13
+ [key: string]: any;
14
+ }> | ArrayLike<number> | {
15
+ [key: string]: any;
16
+ }> | ArrayLike<number> | {
17
+ [key: string]: any;
18
+ }> | ArrayLike<number> | {
19
+ [key: string]: any;
20
+ }> | ArrayLike<number> | {
21
+ [key: string]: any;
22
+ }> | ArrayLike<number> | {
23
+ [key: string]: any;
24
+ }> | ArrayLike<number> | {
25
+ [key: string]: any;
26
+ }> | ArrayLike<number> | {
27
+ [key: string]: any;
28
+ }>;
29
+ SIZER_SIZE: number;
30
+ SLIDER_SIZE: number;
31
+ SLIDER_MIN_LENGTH: number;
32
+ EXPANDER_SIZE: number;
33
+ LIST_ITEM_HEIGHT: number;
34
+ LIST_RENDERING_TRESHOLD: number;
35
+ LIST_AUTOSCROLL_TRESHOLD: number;
36
+ LIST_AUTOSCROLL_DELAY: number;
37
+ DEFAULT_TEXT_HIGHLIGHT_COLOR: string;
38
+ TOOLTIP_MARGIN: number;
39
+ MENU_ITEM_HEIGHT: number;
40
+ COLORPICKER_COLOR_SIZE: number;
41
+ DEFAULT_NUMBER_FORMAT: string;
42
+ BUTTON_HEIGHT: number;
43
+ FONT_SIZE: number;
44
+ FLOATING_WINDOW_MAX_WIDTH: number;
45
+ STATUSBAR_HEIGHT: number;
46
+ };
47
+ export default _default;
48
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAGC"}
@@ -0,0 +1,6 @@
1
+ import { constants as coreConstants } from '@omegagrid/core';
2
+ export default {
3
+ STATUSBAR_HEIGHT: 22,
4
+ ...coreConstants
5
+ };
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,eAAe;IACd,gBAAgB,EAAE,EAAE;IACpB,GAAG,aAAa;CAChB,CAAA","sourcesContent":["import { constants as coreConstants } from '@omegagrid/core';\n\nexport default {\n\tSTATUSBAR_HEIGHT: 22,\n\t...coreConstants\n}"]}
@@ -0,0 +1,3 @@
1
+ export * from './ui';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './ui';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC","sourcesContent":["export * from './ui';\nexport * from './types';"]}
@@ -0,0 +1,9 @@
1
+ import { ComponentId } from "@omegagrid/core";
2
+ export type StatusbarItemType = 'button' | 'custom';
3
+ export type StatusbarItem = {
4
+ id?: ComponentId;
5
+ type: StatusbarItemType;
6
+ icon?: string;
7
+ text?: string;
8
+ };
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAC,QAAQ,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ComponentId } from \"@omegagrid/core\";\n\nexport type StatusbarItemType = 'button'|'custom';\n\nexport type StatusbarItem = {\n\tid?: ComponentId,\n\ttype: StatusbarItemType,\n\ticon?: string,\n\ttext?: string,\n}"]}
@@ -0,0 +1,2 @@
1
+ export * from './statusbar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './statusbar';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC","sourcesContent":["export * from './statusbar';"]}
@@ -0,0 +1,14 @@
1
+ import { ComponentFactory, Layout } from '@omegagrid/core';
2
+ import { LitElement } from 'lit';
3
+ import { StatusbarItem } from '../types';
4
+ export declare class Statusbar extends LitElement implements Layout {
5
+ static styles: import("lit").CSSResult[];
6
+ leftItems: StatusbarItem[];
7
+ rightItems: StatusbarItem[];
8
+ createComponent: ComponentFactory;
9
+ customComponents: HTMLDivElement;
10
+ private components;
11
+ layout(): void;
12
+ render: () => import("lit-html").TemplateResult<1>;
13
+ }
14
+ //# sourceMappingURL=statusbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusbar.d.ts","sourceRoot":"","sources":["../../src/ui/statusbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,qBACa,SAAU,SAAQ,UAAW,YAAW,MAAM;IAE1D,MAAM,CAAC,MAAM,4BAAW;IAGxB,SAAS,EAAE,aAAa,EAAE,CAAC;IAG3B,UAAU,EAAE,aAAa,EAAE,CAAC;IAG5B,eAAe,EAAE,gBAAgB,CAAC;IAGlC,gBAAgB,EAAE,cAAc,CAAC;IAEjC,OAAO,CAAC,UAAU,CAAkC;IAEpD,MAAM;IAIN,MAAM,6CAgBJ;CAEF"}
@@ -0,0 +1,52 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html } from 'lit';
8
+ import { customElement, property, queryAll } from 'lit/decorators.js';
9
+ import { map } from 'lit/directives/map.js';
10
+ import { style } from './statusbar.style';
11
+ let Statusbar = class Statusbar extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.components = new Map();
15
+ this.render = () => html `
16
+ <div id="left">
17
+ ${map(this.leftItems, item => item.type == 'button'
18
+ ? html `<div class="item"><og-button icon="${item.icon}" text="${item.text}" color="transparent"></og-button></div>`
19
+ : html `<div class="item custom">${this.createComponent(item.id)}</div>`)}
20
+ </div>
21
+
22
+ <div id="center"></div>
23
+
24
+ <div id="right">
25
+ ${map(this.rightItems, item => item.type == 'button'
26
+ ? html `<div class="item"><og-button icon="${item.icon}" text="${item.text}" color="transparent"></og-button></div>`
27
+ : html `<div class="item custom">${this.createComponent(item.id)}</div>`)}
28
+ </div>
29
+ `;
30
+ }
31
+ layout() {
32
+ //empty
33
+ }
34
+ };
35
+ Statusbar.styles = [style];
36
+ __decorate([
37
+ property({ type: Array })
38
+ ], Statusbar.prototype, "leftItems", void 0);
39
+ __decorate([
40
+ property({ type: Array })
41
+ ], Statusbar.prototype, "rightItems", void 0);
42
+ __decorate([
43
+ property({ type: Object })
44
+ ], Statusbar.prototype, "createComponent", void 0);
45
+ __decorate([
46
+ queryAll('.itemcustom')
47
+ ], Statusbar.prototype, "customComponents", void 0);
48
+ Statusbar = __decorate([
49
+ customElement('og-statusbar')
50
+ ], Statusbar);
51
+ export { Statusbar };
52
+ //# sourceMappingURL=statusbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusbar.js","sourceRoot":"","sources":["../../src/ui/statusbar.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAA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Element, property, queryAll } from 'lit/decorators.js';\nimport { map } from 'lit/directives/map.js';\nimport { StatusbarItem } from '../types';\nimport { style } from './statusbar.style';\n\n@customElement('og-statusbar')\nexport class Statusbar extends LitElement implements Layout {\n\n\tstatic styles = [style];\n\n\t@property({type: Array})\n\tleftItems: StatusbarItem[];\n\n\t@property({type: Array})\n\trightItems: StatusbarItem[];\n\n\t@property({type: Object})\n\tcreateComponent: ComponentFactory;\n\n\t@queryAll('.itemcustom')\n\tcustomComponents: HTMLDivElement;\n\n\tprivate components = new Map<string, HTMLElement>();\n\n\tlayout() {\n\t\t//empty\n\t}\n\t\n\trender = () => html`\n\t\t<div id=\"left\">\n\t\t\t${map(this.leftItems, item => item.type == 'button'\n\t\t\t\t? html`<div class=\"item\"><og-button icon=\"${item.icon}\" text=\"${item.text}\" color=\"transparent\"></og-button></div>`\n\t\t\t\t: html`<div class=\"item custom\">${this.createComponent(item.id)}</div>`\n\t\t\t)}\n\t\t</div>\n\n\t\t<div id=\"center\"></div>\n\n\t\t<div id=\"right\">\n\t\t\t${map(this.rightItems, item => item.type == 'button'\n\t\t\t\t? html`<div class=\"item\"><og-button icon=\"${item.icon}\" text=\"${item.text}\" color=\"transparent\"></og-button></div>`\n\t\t\t\t: html`<div class=\"item custom\">${this.createComponent(item.id)}</div>`\n\t\t\t)}\n\t\t</div>\n\t`;\n\n}"]}
@@ -0,0 +1,2 @@
1
+ export declare const style: import("lit").CSSResult;
2
+ //# sourceMappingURL=statusbar.style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusbar.style.d.ts","sourceRoot":"","sources":["../../src/ui/statusbar.style.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,yBA4CjB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { css } from 'lit';
2
+ import constants from '../constants';
3
+ export const style = css `
4
+ * {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ :host {
9
+ display: block;
10
+ height: ${constants.STATUSBAR_HEIGHT}px;
11
+ line-height: ${constants.STATUSBAR_HEIGHT}px;
12
+ background-color: var(--og-accent-color-alpha-70);
13
+ display: flex;
14
+ flex-direction: row;
15
+ }
16
+
17
+ #right, #left {
18
+ display: flex;
19
+ flex-direction: row;
20
+ }
21
+
22
+ #left {
23
+ justify-content: flex-start;
24
+ flex: 0;
25
+ }
26
+
27
+ #center {
28
+ flex: 1;
29
+ }
30
+
31
+ #right {
32
+ flex: 0;
33
+ justify-content: flex-end;
34
+ }
35
+
36
+ .item {
37
+ height: 100%;
38
+ }
39
+
40
+ .item > * {
41
+ box-sizing: border-box;
42
+ height: 100%;
43
+ color: #ffffff;
44
+ padding: 0 4px;
45
+ }
46
+
47
+ `;
48
+ //# sourceMappingURL=statusbar.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusbar.style.js","sourceRoot":"","sources":["../../src/ui/statusbar.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;YAOZ,SAAS,CAAC,gBAAgB;iBACrB,SAAS,CAAC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC1C,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport const style = css`\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t\theight: ${constants.STATUSBAR_HEIGHT}px;\n\t\tline-height: ${constants.STATUSBAR_HEIGHT}px;\n\t\tbackground-color: var(--og-accent-color-alpha-70);\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t}\n\n\t#right, #left {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t}\n\n\t#left {\n\t\tjustify-content: flex-start;\n\t\tflex: 0;\n\t}\n\n\t#center {\n\t\tflex: 1;\n\t}\n\n\t#right {\n\t\tflex: 0;\n\t\tjustify-content: flex-end;\n\t}\n\n\t.item {\n\t\theight: 100%;\n\t}\n\n\t.item > * {\n\t\tbox-sizing: border-box;\n\t\theight: 100%;\n\t\tcolor: #ffffff;\n\t\tpadding: 0 4px;\n\t}\n\n`;"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/statusbar",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Statusbar component",
6
6
  "main": "./dist/index.js",
@@ -27,8 +27,8 @@
27
27
  "_prepublish": "yarn test && yarn lint"
28
28
  },
29
29
  "dependencies": {
30
- "@omegagrid/core": "^0.10.2",
31
- "@omegagrid/tree": "^0.10.2",
30
+ "@omegagrid/core": "^0.10.4",
31
+ "@omegagrid/tree": "^0.10.4",
32
32
  "lit": "^3.1.1",
33
33
  "lit-html": "^3.1.1",
34
34
  "ts-debounce": "^4.0.0"