@omegagrid/toolbar 0.6.123 → 0.6.125
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarDropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/ui/controls/toolbarDropdownMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAuB,MAAM,iBAAiB,CAAC;AAI9F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBACa,mBAAoB,SAAQ,YAAY;IAEpD,MAAM,CAAC,MAAM,4BAMV;IAGH,IAAI,EAAE,WAAW,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"toolbarDropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/ui/controls/toolbarDropdownMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAuB,MAAM,iBAAiB,CAAC;AAI9F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,qBACa,mBAAoB,SAAQ,YAAY;IAEpD,MAAM,CAAC,MAAM,4BAMV;IAGH,IAAI,EAAE,WAAW,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;;CAuBtC"}
|
|
@@ -14,10 +14,11 @@ let ToolbarDropdownMenu = class ToolbarDropdownMenu extends DropdownMenu {
|
|
|
14
14
|
this.style.width = dom.numToPixels(this.item.width || (this.item.text ? null : 23));
|
|
15
15
|
this.style.textAlign = this.item.text ? 'left' : 'center';
|
|
16
16
|
this.icon = this.item.icon;
|
|
17
|
-
this.color = ColorTypes.Gray;
|
|
17
|
+
this.color = this.item.color || ColorTypes.Gray;
|
|
18
18
|
this.label = this.item.caption ?? this.item.text;
|
|
19
19
|
this.noCaret = false;
|
|
20
20
|
this.items = (this.item.items || []);
|
|
21
|
+
this.dynamicWidth = true;
|
|
21
22
|
}
|
|
22
23
|
constructor() {
|
|
23
24
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbarDropdownMenu.js","sourceRoot":"","sources":["../../../src/ui/controls/toolbarDropdownMenu.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAuB,MAAM,iBAAiB,CAAC;AAC9F,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIrD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,YAAY;IAgBpD,UAAU,CAAC,KAA2B;QACrC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC1D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"toolbarDropdownMenu.js","sourceRoot":"","sources":["../../../src/ui/controls/toolbarDropdownMenu.ts"],"names":[],"mappings":";;;;;;AAAA,OAA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,EAAE;YACrD,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE;gBAC5C,IAAI,EAAE,QAAQ;gBACd,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE;gBACzC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE;aAC7C,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;;AAnCM,0BAAM,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,GAAG,CAAA;;;;aAIhC,SAAS,CAAC,2BAA2B;;EAEhD,CAAC,AANW,CAMV;AAGH;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iDACP;AAGlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kDACX;AAdF,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CAuC/B","sourcesContent":["import { actions, ColorTypes, dom, DropdownMenu, MenuEvent, MenuItem } from '@omegagrid/core';\nimport constants from '../../constants';\nimport { css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ToolbarItem } from '../../types';\n\n@customElement('og-toolbar-dropdownmenu')\nexport class ToolbarDropdownMenu extends DropdownMenu {\n\n\tstatic styles = [...DropdownMenu.styles, css`\n\t\t:host {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\theight: ${constants.TOOLBAR_COMPONENT_SIZE_BASE}px;\n\t\t}\n\t`];\n\n\t@property({type: Object})\n\titem: ToolbarItem;\n\n\t@property({type: String})\n\tvalue: string;\n\n\twillUpdate(props: Map<string, unknown>) {\n\t\tsuper.willUpdate(props);\n\t\tthis.style.width = dom.numToPixels(this.item.width || (this.item.text ? null : 23));\n\t\tthis.style.textAlign = this.item.text ? 'left' : 'center';\n\t\tthis.icon = this.item.icon;\n\t\tthis.color = this.item.color || ColorTypes.Gray;\n\t\tthis.label = this.item.caption ?? this.item.text;\n\t\tthis.noCaret = false;\n\t\tthis.items = (this.item.items || []) as MenuItem[];\n\t\tthis.dynamicWidth = true;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('menu.select', (e: MenuEvent) => {\n\t\t\tactions.dispatchActionEvent(this, 'toolbar', {\n\t\t\t\ttype: 'select', \n\t\t\t\tkey: (e.item.key ?? e.item.k)?.toString(), \n\t\t\t\tvalue: (e.item.value ?? e.item.v)?.toString()\n\t\t\t});\n\t\t});\n\t}\n\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/toolbar",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.125",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Toolbar component",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"_prepublish": "yarn test && yarn lint"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@omegagrid/core": "^0.6.
|
|
31
|
-
"@omegagrid/localize": "^0.6.
|
|
32
|
-
"@omegagrid/tree": "^0.6.
|
|
30
|
+
"@omegagrid/core": "^0.6.125",
|
|
31
|
+
"@omegagrid/localize": "^0.6.125",
|
|
32
|
+
"@omegagrid/tree": "^0.6.125",
|
|
33
33
|
"lit": "^3.1.1",
|
|
34
34
|
"lit-html": "^3.1.1",
|
|
35
35
|
"ts-debounce": "^4.0.0"
|