@omegagrid/toolbar 0.5.19 → 0.6.0

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.
@@ -1,27 +1,29 @@
1
1
  declare const _default: {
2
2
  PREFIX: string;
3
3
  DEFAULT_ACCENT_COLOR: string;
4
- DEFAULT_ACCENT_COLOR_2: import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<string | number | ArrayLike<number> | import("color")<any> | {
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
5
  [key: string]: any;
6
- }> | {
6
+ }> | ArrayLike<number> | {
7
7
  [key: string]: any;
8
- }> | {
8
+ }> | ArrayLike<number> | {
9
9
  [key: string]: any;
10
- }> | {
10
+ }> | ArrayLike<number> | {
11
11
  [key: string]: any;
12
- }> | {
12
+ }> | ArrayLike<number> | {
13
13
  [key: string]: any;
14
- }> | {
14
+ }> | ArrayLike<number> | {
15
15
  [key: string]: any;
16
- }> | {
16
+ }> | ArrayLike<number> | {
17
17
  [key: string]: any;
18
- }> | {
18
+ }> | ArrayLike<number> | {
19
19
  [key: string]: any;
20
- }> | {
20
+ }> | ArrayLike<number> | {
21
21
  [key: string]: any;
22
- }> | {
22
+ }> | ArrayLike<number> | {
23
23
  [key: string]: any;
24
- }> | {
24
+ }> | ArrayLike<number> | {
25
+ [key: string]: any;
26
+ }> | ArrayLike<number> | {
25
27
  [key: string]: any;
26
28
  }>;
27
29
  SIZER_SIZE: number;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAMC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAMC"}
package/dist/constants.js CHANGED
@@ -1,10 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@omegagrid/core");
4
- exports.default = {
1
+ import { constants as coreConstants } from '@omegagrid/core';
2
+ export default {
5
3
  TOOLBAR_HEIGHT: 30,
6
4
  TOOLBAR_COMPONENT_SIZE_BASE: 24,
7
5
  TOOLBAR_TOOLTIP_DELAY: 200,
8
- ...core_1.constants
6
+ ...coreConstants
9
7
  };
10
8
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;AAAA,0CAA6D;AAE7D,kBAAe;IACd,cAAc,EAAE,EAAE;IAClB,2BAA2B,EAAE,EAAE;IAC/B,qBAAqB,EAAE,GAAG;IAC1B,GAAG,gBAAa;CAEhB,CAAA"}
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,cAAc,EAAE,EAAE;IAClB,2BAA2B,EAAE,EAAE;IAC/B,qBAAqB,EAAE,GAAG;IAC1B,GAAG,aAAa;CAEhB,CAAA"}
package/dist/index.js CHANGED
@@ -1,19 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ui"), exports);
18
- __exportStar(require("./types"), exports);
1
+ export * from './ui';
2
+ export * from './types';
19
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC"}
package/dist/types.js CHANGED
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=types.js.map
@@ -1,23 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./toolbarButton"), exports);
18
- __exportStar(require("./toolbarDropdown"), exports);
19
- __exportStar(require("./toolbarDropdownButton"), exports);
20
- __exportStar(require("./toolbarGrid"), exports);
21
- __exportStar(require("./toolbarText"), exports);
22
- __exportStar(require("./toolbarColorPicker"), exports);
1
+ export * from './toolbarButton';
2
+ export * from './toolbarDropdown';
3
+ export * from './toolbarDropdownButton';
4
+ export * from './toolbarGrid';
5
+ export * from './toolbarText';
6
+ export * from './toolbarColorPicker';
23
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/controls/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,0DAAwC;AACxC,gDAA8B;AAC9B,gDAA8B;AAC9B,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/controls/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../src/ui/controls/renderers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmB3D,eAAO,MAAM,SAAS,8BAAmC,WAAW,UAAU,OAAO,KAAK,eAAe,CAAC,CAAC,CA0DzG,CAAC"}
1
+ {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../src/ui/controls/renderers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmB3D,eAAO,MAAM,SAAS,8BAAmC,WAAW,UAAU,OAAO,KAAK,cAAc,CAAC,CAAC,CAAC,CA0DzG,CAAC"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renderers = void 0;
4
- const core_1 = require("@omegagrid/core");
5
- const lit_1 = require("lit");
6
- const style_map_js_1 = require("lit-html/directives/style-map.js");
1
+ import { dom } from "@omegagrid/core";
2
+ import { html } from "lit";
3
+ import { styleMap } from "lit-html/directives/style-map.js";
7
4
  const defaultStyles = new Map([
8
5
  ['button', {}],
9
6
  ['togglebutton', {}],
@@ -16,68 +13,68 @@ function getItemStyle(item) {
16
13
  const style = { ...defaultStyles.get(item.type) };
17
14
  style.display = item.hidden ? 'none' : null;
18
15
  if (item.width)
19
- style.width = core_1.dom.numToPixels(item.width);
16
+ style.width = dom.numToPixels(item.width);
20
17
  if (item.gap)
21
- style.marginLeft = core_1.dom.numToPixels(item.gap);
18
+ style.marginLeft = dom.numToPixels(item.gap);
22
19
  return style;
23
20
  }
24
- exports.renderers = new Map([
25
- ['button', (item) => (0, lit_1.html) `
21
+ export const renderers = new Map([
22
+ ['button', (item) => html `
26
23
  <og-toolbar-button
27
24
  data-id="${item.id}"
28
25
  class="control"
29
26
  .item="${item}"
30
27
  ?disabled="${item.disabled}"
31
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
28
+ style="${styleMap(getItemStyle(item))}">
32
29
  </og-toolbar-button>
33
30
  `],
34
- ['togglebutton', (item, value) => (0, lit_1.html) `
31
+ ['togglebutton', (item, value) => html `
35
32
  <og-toolbar-button
36
33
  data-id="${item.id}"
37
34
  class="control"
38
35
  .item="${item}"
39
36
  type="toggle"
40
37
  state="${value ? 'checked' : 'unchecked'}"
41
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
38
+ style="${styleMap(getItemStyle(item))}">
42
39
  </og-toolbar-button>
43
40
  `],
44
- ['dropdown', (item, value) => (0, lit_1.html) `
41
+ ['dropdown', (item, value) => html `
45
42
  <og-toolbar-dropdown
46
43
  data-id="${item.id}"
47
44
  class="control"
48
45
  .item="${item}"
49
46
  .value="${value}"
50
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
47
+ style="${styleMap(getItemStyle(item))}">
51
48
  </og-toolbar-dropdown>
52
49
  `],
53
- ['dropdown-button', (item) => (0, lit_1.html) `
50
+ ['dropdown-button', (item) => html `
54
51
  <og-toolbar-dropdownbutton
55
52
  data-id="${item.id}"
56
53
  class="control"
57
54
  .item="${item}"
58
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
55
+ style="${styleMap(getItemStyle(item))}">
59
56
  </og-toolbar-dropdownbutton>
60
57
  `],
61
- ['color', (item, value) => (0, lit_1.html) `
58
+ ['color', (item, value) => html `
62
59
  <og-toolbar-colorpicker
63
60
  data-id="${item.id}"
64
61
  class="control"
65
62
  .item="${item}"
66
63
  .value="${value}"
67
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
64
+ style="${styleMap(getItemStyle(item))}">
68
65
  </og-toolbar-colorpicker>
69
66
  `],
70
- ['text', (item, value) => (0, lit_1.html) `
67
+ ['text', (item, value) => html `
71
68
  <og-toolbar-text
72
69
  data-id="${item.id}"
73
70
  class="control"
74
71
  .item="${item}"
75
72
  .value="${value}"
76
- style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">
73
+ style="${styleMap(getItemStyle(item))}">
77
74
  </og-toolbar-text>
78
75
  `],
79
- ['label', (item, value) => (0, lit_1.html) `
80
- <label style="${(0, style_map_js_1.styleMap)(getItemStyle(item))}">${value}</label>
76
+ ['label', (item, value) => html `
77
+ <label style="${styleMap(getItemStyle(item))}">${value}</label>
81
78
  `],
82
79
  ]);
83
80
  //# sourceMappingURL=renderers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":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F,CAAC,CAAC"}
@@ -1,28 +1,22 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
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;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ToolbarButton = void 0;
13
- const core_1 = require("@omegagrid/core");
14
- const constants_1 = __importDefault(require("../../constants"));
15
- const lit_1 = require("lit");
16
- const decorators_js_1 = require("lit/decorators.js");
17
- const core_2 = require("@omegagrid/core");
18
- let ToolbarButton = class ToolbarButton extends core_1.Button {
7
+ import { Button, ColorTypes } from '@omegagrid/core';
8
+ import constants from '../../constants';
9
+ import { css, render, html } from 'lit';
10
+ import { customElement, property } from 'lit/decorators.js';
11
+ import { actions } from '@omegagrid/core';
12
+ let ToolbarButton = class ToolbarButton extends Button {
19
13
  constructor() {
20
14
  super();
21
15
  this.color = null;
22
16
  }
23
17
  firstUpdated() {
24
18
  this.addEventListener('click', () => {
25
- core_2.actions.dispatchActionEvent(this, 'toolbar', {
19
+ actions.dispatchActionEvent(this, 'toolbar', {
26
20
  type: 'change',
27
21
  key: this.item.id,
28
22
  value: this.type == 'toggle' ? (this.state == 'checked') : this.item.value
@@ -33,30 +27,30 @@ let ToolbarButton = class ToolbarButton extends core_1.Button {
33
27
  if (changedProps.has('item') && this.item) {
34
28
  this.icon = this.item.icon;
35
29
  this.text = this.item.text;
36
- this.color = this.item.color ? this.item.color : (this.type == 'normal' ? core_1.ColorTypes.Gray : core_1.ColorTypes.Accent);
30
+ this.color = this.item.color ? this.item.color : (this.type == 'normal' ? ColorTypes.Gray : ColorTypes.Accent);
37
31
  if (this.item.content) {
38
- (0, lit_1.render)((0, lit_1.html) `<div slot="content">${this.item.content}</div>`, this);
32
+ render(html `<div slot="content">${this.item.content}</div>`, this);
39
33
  }
40
34
  }
41
35
  super.willUpdate(changedProps);
42
36
  }
43
37
  };
44
- exports.ToolbarButton = ToolbarButton;
45
- ToolbarButton.styles = [...core_1.Button.styles, (0, lit_1.css) `
38
+ ToolbarButton.styles = [...Button.styles, css `
46
39
  :host {
47
40
  box-sizing: border-box;
48
41
  display: block;
49
- min-width: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
50
- height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
51
- max-height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
52
- line-height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
42
+ min-width: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
43
+ height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
44
+ max-height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
45
+ line-height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
53
46
  padding: 0;
54
47
  }
55
48
  `];
56
49
  __decorate([
57
- (0, decorators_js_1.property)({ type: Object })
50
+ property({ type: Object })
58
51
  ], ToolbarButton.prototype, "item", void 0);
59
- exports.ToolbarButton = ToolbarButton = __decorate([
60
- (0, decorators_js_1.customElement)('og-toolbar-button')
52
+ ToolbarButton = __decorate([
53
+ customElement('og-toolbar-button')
61
54
  ], ToolbarButton);
55
+ export { ToolbarButton };
62
56
  //# sourceMappingURL=toolbarButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarButton.js","sourceRoot":"","sources":["../../../src/ui/controls/toolbarButton.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0C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aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CA8CzB"}
@@ -1,47 +1,41 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
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;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ToolbarColorPicker = void 0;
13
- const constants_1 = __importDefault(require("../../constants"));
14
- const lit_1 = require("lit");
15
- const decorators_js_1 = require("lit/decorators.js");
16
- const style_map_js_1 = require("lit/directives/style-map.js");
17
- const core_1 = require("@omegagrid/core");
18
- let ToolbarColorPicker = class ToolbarColorPicker extends lit_1.LitElement {
7
+ import constants from '../../constants';
8
+ import { css, LitElement, html } from 'lit';
9
+ import { customElement, property, query } from 'lit/decorators.js';
10
+ import { styleMap } from 'lit/directives/style-map.js';
11
+ import { actions } from '@omegagrid/core';
12
+ let ToolbarColorPicker = class ToolbarColorPicker extends LitElement {
19
13
  constructor() {
20
14
  super(...arguments);
21
15
  this._onSelect = (e) => {
22
16
  this.btnContent.style.backgroundColor = e.color;
23
- core_1.actions.dispatchActionEvent(this, 'toolbar', { type: 'select', key: this.item.id, value: e.color });
17
+ actions.dispatchActionEvent(this, 'toolbar', { type: 'select', key: this.item.id, value: e.color });
24
18
  this.dropdown.close();
25
19
  };
26
20
  this._onPreview = (e) => {
27
21
  this.btnContent.style.backgroundColor = e.color;
28
- core_1.actions.dispatchActionEvent(this, 'toolbar', { type: 'preview', key: this.item.id, value: e.color });
22
+ actions.dispatchActionEvent(this, 'toolbar', { type: 'preview', key: this.item.id, value: e.color });
29
23
  };
30
24
  this._onPreviewEnd = (e) => {
31
25
  this.btnContent.style.backgroundColor = e.color;
32
- core_1.actions.dispatchActionEvent(this, 'toolbar', { type: 'previewEnd', key: this.item.id, value: e.color });
26
+ actions.dispatchActionEvent(this, 'toolbar', { type: 'previewEnd', key: this.item.id, value: e.color });
33
27
  };
34
- this.render = () => (0, lit_1.html) `
28
+ this.render = () => html `
35
29
  <og-button mode="toggle" color="gray">
36
- <div id="btnContent" slot="content" style="${(0, style_map_js_1.styleMap)({ backgroundColor: this.value })}">
37
- ${this.item.icon ? (0, lit_1.html) `<og-icon .icon="${this.item.icon}"></og-icon>` : ``}
30
+ <div id="btnContent" slot="content" style="${styleMap({ backgroundColor: this.value })}">
31
+ ${this.item.icon ? html `<og-icon .icon="${this.item.icon}"></og-icon>` : ``}
38
32
  </div>
39
33
  </og-button>
40
34
  <og-dropdown
41
35
  style="min-width: 14px; flex: 0"
42
36
  color="gray"
43
37
  alignment="left"
44
- positionOffset="${-constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}">
38
+ positionOffset="${-constants.TOOLBAR_COMPONENT_SIZE_BASE}">
45
39
  <og-colorpicker
46
40
  slot="content"
47
41
  @select="${this._onSelect}"
@@ -53,22 +47,21 @@ let ToolbarColorPicker = class ToolbarColorPicker extends lit_1.LitElement {
53
47
  `;
54
48
  }
55
49
  };
56
- exports.ToolbarColorPicker = ToolbarColorPicker;
57
- ToolbarColorPicker.styles = [(0, lit_1.css) `
50
+ ToolbarColorPicker.styles = [css `
58
51
  :host {
59
52
  display: flex;
60
53
  flex-direction: row;
61
- max-height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
54
+ max-height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
62
55
  }
63
56
 
64
57
  og-button {
65
58
  box-sizing: border-box;
66
59
  display: block;
67
- width: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
68
- height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
69
- max-height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
70
- min-width: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
71
- line-height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
60
+ width: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
61
+ height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
62
+ max-height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
63
+ min-width: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
64
+ line-height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
72
65
  padding: 0;
73
66
  flex: 0;
74
67
  }
@@ -82,18 +75,19 @@ ToolbarColorPicker.styles = [(0, lit_1.css) `
82
75
  }
83
76
  `];
84
77
  __decorate([
85
- (0, decorators_js_1.property)({ type: Object })
78
+ property({ type: Object })
86
79
  ], ToolbarColorPicker.prototype, "item", void 0);
87
80
  __decorate([
88
- (0, decorators_js_1.property)({ type: String })
81
+ property({ type: String })
89
82
  ], ToolbarColorPicker.prototype, "value", void 0);
90
83
  __decorate([
91
- (0, decorators_js_1.query)('og-dropdown')
84
+ query('og-dropdown')
92
85
  ], ToolbarColorPicker.prototype, "dropdown", void 0);
93
86
  __decorate([
94
- (0, decorators_js_1.query)('#btnContent')
87
+ query('#btnContent')
95
88
  ], ToolbarColorPicker.prototype, "btnContent", void 0);
96
- exports.ToolbarColorPicker = ToolbarColorPicker = __decorate([
97
- (0, decorators_js_1.customElement)('og-toolbar-colorpicker')
89
+ ToolbarColorPicker = __decorate([
90
+ customElement('og-toolbar-colorpicker')
98
91
  ], ToolbarColorPicker);
92
+ export { ToolbarColorPicker };
99
93
  //# sourceMappingURL=toolbarColorPicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarColorPicker.js","sourceRoot":"","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IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAC,CAAC,CAAC;QACvG,CAAC,CAAA;QAED,WAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;gDAE4B,QAAQ,CAAC,EAAC,eAAe,EAAE,IAAI,CAAC,KAAK,EAAC,CAAC;MACjF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,IAAI,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE;;;;;;;qBAO1D,CAAC,SAAS,CAAC,2BAA2B;;;eAG5C,IAAI,CAAC,SAAS;gBACb,IAAI,CAAC,UAAU;mBACZ,IAAI,CAAC,aAAa;kBACnB,CAAC,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE;;;EAGtD,CAAC;IAEH,CAAC;;AA7EO,yBAAM,GAAG,CAAC,GAAG,CAAA;;;;iBAIJ,SAAS,CAAC,2BAA2B;;;;;;YAM1C,SAAS,CAAC,2BAA2B;aACpC,SAAS,CAAC,2BAA2B;iBACjC,SAAS,CAAC,2BAA2B;gBACtC,SAAS,CAAC,2BAA2B;kBACnC,SAAS,CAAC,2BAA2B;;;;;;;;;;;;EAYrD,CAAC,AA1BW,CA0BV;AAGH;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDACP;AAGlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iDACX;AAGd;IADC,KAAK,CAAC,aAAa,CAAC;oDACF;AAGnB;IADC,KAAK,CAAC,aAAa,CAAC;sDACM;AAxCf,kBAAkB;IAD9B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,kBAAkB,CA+E9B"}
@@ -1,35 +1,29 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
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;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ToolbarDropdown = void 0;
13
- const core_1 = require("@omegagrid/core");
14
- const constants_1 = __importDefault(require("../../constants"));
15
- const lit_1 = require("lit");
16
- const decorators_js_1 = require("lit/decorators.js");
17
- const tree_1 = require("@omegagrid/tree");
18
- const core_2 = require("@omegagrid/core");
19
- let ToolbarDropdown = class ToolbarDropdown extends lit_1.LitElement {
7
+ import { dom } from '@omegagrid/core';
8
+ import constants from '../../constants';
9
+ import { LitElement, html, css } from 'lit';
10
+ import { customElement, property, query } from 'lit/decorators.js';
11
+ import { SelectMode } from '@omegagrid/tree';
12
+ import { actions } from '@omegagrid/core';
13
+ let ToolbarDropdown = class ToolbarDropdown extends LitElement {
20
14
  constructor() {
21
15
  super(...arguments);
22
16
  this._onChange = () => {
23
17
  this.tree.close();
24
18
  const serializedValue = this.tree.value;
25
19
  this.value = serializedValue && serializedValue[0] && serializedValue[0][0] ? serializedValue[0][0] : null;
26
- core_2.actions.dispatchActionEvent(this, 'toolbar', {
20
+ actions.dispatchActionEvent(this, 'toolbar', {
27
21
  type: 'change',
28
22
  key: this.item.id,
29
23
  value: this.value
30
24
  });
31
25
  };
32
- this.render = () => (0, lit_1.html) `
26
+ this.render = () => html `
33
27
  <og-tree-dropdown
34
28
  color="gray"
35
29
  @change="${this._onChange}"
@@ -40,34 +34,34 @@ let ToolbarDropdown = class ToolbarDropdown extends lit_1.LitElement {
40
34
  }
41
35
  updated() {
42
36
  if (this.item.width)
43
- core_1.dom.setSize(this.tree, { w: this.item.width });
37
+ dom.setSize(this.tree, { w: this.item.width });
44
38
  this.tree.setSourceData(this.item.items, {
45
39
  globalLevels: false,
46
- selectMode: tree_1.SelectMode.Single,
40
+ selectMode: SelectMode.Single,
47
41
  checkboxes: false,
48
42
  expanders: false,
49
43
  allowEmpty: false
50
44
  });
51
45
  }
52
46
  };
53
- exports.ToolbarDropdown = ToolbarDropdown;
54
- ToolbarDropdown.styles = [(0, lit_1.css) `
47
+ ToolbarDropdown.styles = [css `
55
48
  :host {
56
49
  display: flex;
57
50
  flex-direction: row;
58
- height: ${constants_1.default.TOOLBAR_COMPONENT_SIZE_BASE}px;
51
+ height: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;
59
52
  }
60
53
  `];
61
54
  __decorate([
62
- (0, decorators_js_1.query)('og-tree-dropdown')
55
+ query('og-tree-dropdown')
63
56
  ], ToolbarDropdown.prototype, "tree", void 0);
64
57
  __decorate([
65
- (0, decorators_js_1.property)({ type: Object })
58
+ property({ type: Object })
66
59
  ], ToolbarDropdown.prototype, "item", void 0);
67
60
  __decorate([
68
- (0, decorators_js_1.property)({ type: String })
61
+ property({ type: String })
69
62
  ], ToolbarDropdown.prototype, "value", void 0);
70
- exports.ToolbarDropdown = ToolbarDropdown = __decorate([
71
- (0, decorators_js_1.customElement)('og-toolbar-dropdown')
63
+ ToolbarDropdown = __decorate([
64
+ customElement('og-toolbar-dropdown')
72
65
  ], ToolbarDropdown);
66
+ export { ToolbarDropdown };
73
67
  //# sourceMappingURL=toolbarDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolbarDropdown.js","sourceRoot":"","sources":["../../../src/ui/controls/toolbarDropdown.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAsC;AACtC,gEAAwC;AACxC,6BAA4C;AAC5C,qDAAmE;AAEnE,0CAAwF;AACxF,0CAA0C;AAGnC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,gBAAU;I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