@omegagrid/bucket 0.9.8 → 0.9.9
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.
package/dist/ui/modalSidebar.js
CHANGED
|
@@ -26,11 +26,11 @@ let ModalSidebar = class ModalSidebar extends LitElement {
|
|
|
26
26
|
this.close();
|
|
27
27
|
};
|
|
28
28
|
this.render = () => html `
|
|
29
|
-
<div
|
|
30
|
-
<div
|
|
31
|
-
${this.closable ? html `<div
|
|
29
|
+
<div class="header">
|
|
30
|
+
<div class="title">${this.caption}</div>
|
|
31
|
+
${this.closable ? html `<div class="close" @click="${() => this.close()}">×</div>` : ``}
|
|
32
32
|
</div>
|
|
33
|
-
<div
|
|
33
|
+
<div class="body"></div>
|
|
34
34
|
<og-overlay defaultLoader></og-overlay>
|
|
35
35
|
`;
|
|
36
36
|
}
|
|
@@ -73,7 +73,7 @@ __decorate([
|
|
|
73
73
|
property({ type: String })
|
|
74
74
|
], ModalSidebar.prototype, "componentId", void 0);
|
|
75
75
|
__decorate([
|
|
76
|
-
query('
|
|
76
|
+
query('.body')
|
|
77
77
|
], ModalSidebar.prototype, "body", void 0);
|
|
78
78
|
__decorate([
|
|
79
79
|
query('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;QA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AE,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()}\">×</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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modalSidebar.style.d.ts","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":";AAGA,
|
|
1
|
+
{"version":3,"file":"modalSidebar.style.d.ts","sourceRoot":"","sources":["../../src/ui/modalSidebar.style.ts"],"names":[],"mappings":";AAGA,wBAsDE"}
|
|
@@ -17,7 +17,7 @@ export default css `
|
|
|
17
17
|
box-sizing: border-box;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
.header {
|
|
21
21
|
display: flex;
|
|
22
22
|
min-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;
|
|
23
23
|
line-height: ${constants.SIDEBAR_HEADER_HEIGHT}px;
|
|
@@ -25,11 +25,15 @@ export default css `
|
|
|
25
25
|
flex: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
.title {
|
|
29
|
+
font-size: var(--og-font-size);
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
text-overflow: ellipsis;
|
|
29
33
|
flex: 1;
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
.close {
|
|
33
37
|
flex: 0;
|
|
34
38
|
margin-top: ${constants.SIDEBAR_HEADER_HEIGHT / 4}px;
|
|
35
39
|
min-width: ${constants.SIDEBAR_HEADER_HEIGHT / 2}px;
|
|
@@ -40,11 +44,12 @@ export default css `
|
|
|
40
44
|
text-align: center;
|
|
41
45
|
}
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
.close:hover {
|
|
44
48
|
background-color: var(--og-accent-color);
|
|
49
|
+
color: var(--og-text-color-2);
|
|
45
50
|
}
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
.body {
|
|
48
53
|
flex: 1;
|
|
49
54
|
overflow: hidden;
|
|
50
55
|
}
|
|
@@ -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
|
|
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`;"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/bucket",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
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.9.
|
|
32
|
-
"@omegagrid/core": "^0.9.
|
|
33
|
-
"@omegagrid/dialog": "^0.9.
|
|
34
|
-
"@omegagrid/localize": "^0.9.
|
|
35
|
-
"@omegagrid/tabs": "^0.9.
|
|
31
|
+
"@omegagrid/commands": "^0.9.9",
|
|
32
|
+
"@omegagrid/core": "^0.9.9",
|
|
33
|
+
"@omegagrid/dialog": "^0.9.9",
|
|
34
|
+
"@omegagrid/localize": "^0.9.9",
|
|
35
|
+
"@omegagrid/tabs": "^0.9.9",
|
|
36
36
|
"lit": "^3.1.1",
|
|
37
37
|
"ts-debounce": "^4.0.0"
|
|
38
38
|
},
|