@omegagrid/bucket 0.10.16 → 0.10.17

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.
@@ -28,7 +28,7 @@ let ModalSidebar = class ModalSidebar extends LitElement {
28
28
  this.render = () => html `
29
29
  <div class="header">
30
30
  <div class="title">${this.caption}</div>
31
- ${this.closable ? html `<div class="close" @click="${() => this.close()}">&times</div>` : ``}
31
+ ${this.closable ? html `<og-close @click="${() => this.close()}">&times</og-close>` : ``}
32
32
  </div>
33
33
  <div class="body"></div>
34
34
  <og-overlay defaultLoader></og-overlay>
@@ -1 +1 @@
1
- {"version":3,"file":"modalSidebar.js","sourceRoot":"","sources":["../../src/ui/modalSidebar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAe,GAAG,EAAmB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,MAAM,sBAAsB,CAAC;AAGlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAQN,aAAQ,GAAG,KAAK,CAAC;QAqBjB,oBAAoB;QACpB,+BAA+B;QAC/B,mDAAmD;QACnD,yDAAyD;QACzD,OAAO;QACP,0BAA0B;QAC1B,6CAA6C;QAC7C,IAAI;QAEJ,eAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,eAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAEvC,aAAQ,GAAG,GAAG,EAAE;YACf,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAA;QAyBD,WAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAA;;wBAEI,IAAI,CA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,MAAM,EAAC,CAAC;6CACT;AAGhB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;8CACT;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CACV;AAGf;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iDACA;AAGzB;IADC,KAAK,CAAC,OAAO,CAAC;0CACM;AAGrB;IADC,KAAK,CAAC,YAAY,CAAC;6CACH;AApBL,YAAY;IADxB,aAAa,CAAC,yBAAyB,CAAC;GAC5B,YAAY,CA6ExB","sourcesContent":["import { ComponentId, dom, Layout, Overlay } from '@omegagrid/core';\nimport { LitElement, html } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { Bucket } from './bucket';\nimport style from './modalSidebar.style';\n\n@customElement('og-bucket-modal-sidebar')\nexport class ModalSidebar extends LitElement implements Layout {\n\n\tstatic styles = [style];\n\n\t@property({type: String})\n\tcaption: string;\n\n\t@property({type: Boolean})\n\tclosable = false;\n\n\t@property({type: Object})\n\tbucket: Bucket;\n\n\t@property({type: String})\n\tcomponentId: ComponentId;\n\n\t@query('.body')\n\tbody: HTMLDivElement;\n\n\t@query('og-overlay')\n\toverlay: Overlay;\n\n\tprivate component: HTMLElement;\n\t// private isEdited = false;\n\n\tlayout() {\n\t\t(this.component as Layout)?.layout();\n\t}\n\n\t// _onSave = () => {\n\t// \tif (!this.isEdited) return;\n\t// \tthis.bucket.editorContainer.model.walk(tab => {\n\t// \t\tif (tab.id == this.componentId) tab.unsaved = false;\n\t// \t});\n\t// \tthis.isEdited = false;\n\t// \tthis.bucket.editorContainer.updateTabs();\n\t// }\n\n\tshowLoader = () => this.overlay.show(this);\n\thideLoader = () => this.overlay.hide();\n\n\t_onClose = () => {\n\t\tthis.close();\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.component?.removeEventListener('close', this._onClose);\n\t}\n\n\tasync updated(props: Map<PropertyKey, unknown>) {\n\t\tif (props.has('componentId') && this.componentId) {\n\t\t\tthis.showLoader();\n\t\t\tconst component = await this.bucket.components.get(this.componentId);\n\t\t\tthis.component = component;\n\t\t\tdom.empty(this.body);\n\t\t\tthis.body.appendChild(component);\n\t\t\t// component.removeEventListener('save', this._onSave);\n\t\t\t// component.addEventListener('save', this._onSave);\n\t\t\tcomponent.addEventListener('close', this._onClose, {once: true});\n\t\t\tcomponent.focus();\n\t\t\tthis.hideLoader();\n\t\t}\n\t}\n\n\tclose() {\n\t\tthis.bucket.sidebars.closeModalSidebar();\n\t}\n\n\trender = () => html`\n\t\t<div class=\"header\">\n\t\t\t<div class=\"title\">${this.caption}</div>\n\t\t\t${this.closable ? html`<div class=\"close\" @click=\"${() => this.close()}\">&times</div>` : ``}\n\t\t</div>\n\t\t<div class=\"body\"></div>\n\t\t<og-overlay defaultLoader></og-overlay>\n\t`;\n\n}"]}
1
+ {"version":3,"file":"modalSidebar.js","sourceRoot":"","sources":["../../src/ui/modalSidebar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAe,GAAG,EAAmB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,MAAM,sBAAsB,CAAC;AAGlC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAQN,aAAQ,GAAG,KAAK,CAAC;QAqBjB,oBAAoB;QACpB,+BAA+B;QAC/B,mDAAmD;QACnD,yDAAyD;QACzD,OAAO;QACP,0BAA0B;QAC1B,6CAA6C;QAC7C,IAAI;QAEJ,eAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,eAAU,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EA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,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;IAC1C,CAAC;;AAhEM,mBAAM,GAAG,CAAC,KAAK,CAAC,AAAV,CAAW;AAGxB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;6CACT;AAGhB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;8CACT;AAGjB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CACV;AAGf;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iDACA;AAGzB;IADC,KAAK,CAAC,OAAO,CAAC;0CACM;AAGrB;IADC,KAAK,CAAC,YAAY,CAAC;6CACH;AApBL,YAAY;IADxB,aAAa,CAAC,yBAAyB,CAAC;GAC5B,YAAY,CA6ExB","sourcesContent":["import { ComponentId, dom, Layout, Overlay } from '@omegagrid/core';\nimport { LitElement, html } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { Bucket } from './bucket';\nimport style from './modalSidebar.style';\n\n@customElement('og-bucket-modal-sidebar')\nexport class ModalSidebar extends LitElement implements Layout {\n\n\tstatic styles = [style];\n\n\t@property({type: String})\n\tcaption: string;\n\n\t@property({type: Boolean})\n\tclosable = false;\n\n\t@property({type: Object})\n\tbucket: Bucket;\n\n\t@property({type: String})\n\tcomponentId: ComponentId;\n\n\t@query('.body')\n\tbody: HTMLDivElement;\n\n\t@query('og-overlay')\n\toverlay: Overlay;\n\n\tprivate component: HTMLElement;\n\t// private isEdited = false;\n\n\tlayout() {\n\t\t(this.component as Layout)?.layout();\n\t}\n\n\t// _onSave = () => {\n\t// \tif (!this.isEdited) return;\n\t// \tthis.bucket.editorContainer.model.walk(tab => {\n\t// \t\tif (tab.id == this.componentId) tab.unsaved = false;\n\t// \t});\n\t// \tthis.isEdited = false;\n\t// \tthis.bucket.editorContainer.updateTabs();\n\t// }\n\n\tshowLoader = () => this.overlay.show(this);\n\thideLoader = () => this.overlay.hide();\n\n\t_onClose = () => {\n\t\tthis.close();\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.component?.removeEventListener('close', this._onClose);\n\t}\n\n\tasync updated(props: Map<PropertyKey, unknown>) {\n\t\tif (props.has('componentId') && this.componentId) {\n\t\t\tthis.showLoader();\n\t\t\tconst component = await this.bucket.components.get(this.componentId);\n\t\t\tthis.component = component;\n\t\t\tdom.empty(this.body);\n\t\t\tthis.body.appendChild(component);\n\t\t\t// component.removeEventListener('save', this._onSave);\n\t\t\t// component.addEventListener('save', this._onSave);\n\t\t\tcomponent.addEventListener('close', this._onClose, {once: true});\n\t\t\tcomponent.focus();\n\t\t\tthis.hideLoader();\n\t\t}\n\t}\n\n\tclose() {\n\t\tthis.bucket.sidebars.closeModalSidebar();\n\t}\n\n\trender = () => html`\n\t\t<div class=\"header\">\n\t\t\t<div class=\"title\">${this.caption}</div>\n\t\t\t${this.closable ? html`<og-close @click=\"${() => this.close()}\">&times</og-close>` : ``}\n\t\t</div>\n\t\t<div class=\"body\"></div>\n\t\t<og-overlay defaultLoader></og-overlay>\n\t`;\n\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modalSidebar.style.d.ts","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":";AAGA,wBAsDE"}
1
+ {"version":3,"file":"modalSidebar.style.d.ts","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":";AAGA,wBAkDE"}
@@ -33,17 +33,13 @@ export default css `
33
33
  flex: 1;
34
34
  }
35
35
 
36
- .close {
36
+ og-close {
37
37
  flex: 0;
38
38
  margin-top: ${constants.SIDEBAR_HEADER_HEIGHT / 4}px;
39
39
  min-width: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;
40
40
  height: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;
41
- line-height: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;
42
- border-radius: var(--og-base-radius);
43
- cursor: pointer;
44
- text-align: center;
45
41
  }
46
-
42
+
47
43
  .close:hover {
48
44
  background-color: var(--og-accent-color);
49
45
  color: var(--og-text-color-2);
@@ -53,6 +49,6 @@ export default css `
53
49
  flex: 1;
54
50
  overflow: hidden;
55
51
  }
56
-
52
+
57
53
  `;
58
54
  //# sourceMappingURL=modalSidebar.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modalSidebar.style.js","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;gBAmBF,SAAS,CAAC,qBAAqB;iBAC9B,SAAS,CAAC,qBAAqB;;;;;;;;;;;;;;;gBAehC,SAAS,CAAC,qBAAqB,GAAG,CAAC;eACpC,SAAS,CAAC,qBAAqB,GAAG,CAAC;YACtC,SAAS,CAAC,qBAAqB,GAAG,CAAC;iBAC9B,SAAS,CAAC,qBAAqB,GAAG,CAAC;;;;;;;;;;;;;;;;CAgBnD,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport default css`\n\t:host {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\tflex-direction: column;\n\t\tbackground-color: var(--og-bucket-sidebar-background-color);\n\t\tbox-shadow: 8px 8px 4px -3px var(--og-dialog-shadow);\n\t}\n\n\t:host(.right) {\n\t\tbox-shadow: -8px 8px 4px -3px var(--og-dialog-shadow);\n\t}\n\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.header {\n\t\tdisplay: flex;\n\t\tmin-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;\n\t\tline-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;\n\t\tpadding: 0 10px;\n\t\tflex: 0;\n\t}\n\n\t.title {\n\t\tfont-size: var(--og-font-size);\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tflex: 1;\n\t}\n\n\t.close {\n\t\tflex: 0;\n\t\tmargin-top: ${constants.SIDEBAR_HEADER_HEIGHT / 4}px;\n\t\tmin-width: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;\n\t\theight: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;\n\t\tline-height: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;\n\t\tborder-radius: var(--og-base-radius);\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t}\n\t\n\t.close:hover {\n\t\tbackground-color: var(--og-accent-color);\n\t\tcolor: var(--og-text-color-2);\n\t}\n\n\t.body {\n\t\tflex: 1;\n\t\toverflow: hidden;\n\t}\n\t\n`;"]}
1
+ {"version":3,"file":"modalSidebar.style.js","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;gBAmBF,SAAS,CAAC,qBAAqB;iBAC9B,SAAS,CAAC,qBAAqB;;;;;;;;;;;;;;;gBAehC,SAAS,CAAC,qBAAqB,GAAG,CAAC;eACpC,SAAS,CAAC,qBAAqB,GAAG,CAAC;YACtC,SAAS,CAAC,qBAAqB,GAAG,CAAC;;;;;;;;;;;;;CAa9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport constants from '../constants';\n\nexport default css`\n\t:host {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\tflex-direction: column;\n\t\tbackground-color: var(--og-bucket-sidebar-background-color);\n\t\tbox-shadow: 8px 8px 4px -3px var(--og-dialog-shadow);\n\t}\n\n\t:host(.right) {\n\t\tbox-shadow: -8px 8px 4px -3px var(--og-dialog-shadow);\n\t}\n\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.header {\n\t\tdisplay: flex;\n\t\tmin-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;\n\t\tline-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;\n\t\tpadding: 0 10px;\n\t\tflex: 0;\n\t}\n\n\t.title {\n\t\tfont-size: var(--og-font-size);\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tflex: 1;\n\t}\n\n\tog-close {\n\t\tflex: 0;\n\t\tmargin-top: ${constants.SIDEBAR_HEADER_HEIGHT / 4}px;\n\t\tmin-width: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;\n\t\theight: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;\n\t}\n\n\t.close:hover {\n\t\tbackground-color: var(--og-accent-color);\n\t\tcolor: var(--og-text-color-2);\n\t}\n\n\t.body {\n\t\tflex: 1;\n\t\toverflow: hidden;\n\t}\n\n`;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/bucket",
3
- "version": "0.10.16",
3
+ "version": "0.10.17",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Application layout component",
6
6
  "main": "./dist/index.js",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@fortawesome/fontawesome-svg-core": "^7.0.1",
31
- "@omegagrid/commands": "^0.10.16",
32
- "@omegagrid/core": "^0.10.16",
33
- "@omegagrid/dialog": "^0.10.16",
34
- "@omegagrid/localize": "^0.10.16",
35
- "@omegagrid/tabs": "^0.10.16",
31
+ "@omegagrid/commands": "^0.10.17",
32
+ "@omegagrid/core": "^0.10.17",
33
+ "@omegagrid/dialog": "^0.10.17",
34
+ "@omegagrid/localize": "^0.10.17",
35
+ "@omegagrid/tabs": "^0.10.17",
36
36
  "lit": "^3.1.1",
37
37
  "ts-debounce": "^4.0.0"
38
38
  },