@operato/layout 10.29.36 → 10.29.37
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/CHANGELOG.md +15 -0
- package/coverage/lcov-report/index.html +20 -20
- package/coverage/lcov.info +1323 -1288
- package/dist/src/components/ox-entity360-section.js +15 -1
- package/dist/src/components/ox-entity360-section.js.map +1 -1
- package/dist/test/entity360-section.test.js +37 -0
- package/dist/test/entity360-section.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/test/entity360-section.test.ts +47 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/layout",
|
|
3
3
|
"description": "Webcomponent layout following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.37",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@material/web": "^2.0.0",
|
|
66
66
|
"@operato/i18n": "^10.29.27",
|
|
67
|
-
"@operato/popup": "^10.29.
|
|
68
|
-
"@operato/shell": "^10.29.
|
|
67
|
+
"@operato/popup": "^10.29.37",
|
|
68
|
+
"@operato/shell": "^10.29.37",
|
|
69
69
|
"@operato/styles": "^10.29.30",
|
|
70
|
-
"@operato/utils": "^10.29.
|
|
70
|
+
"@operato/utils": "^10.29.37",
|
|
71
71
|
"lit": "^3.1.2"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"prettier --write"
|
|
103
103
|
]
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "38361a65226ee9f23814747b4f0520edf42c3184"
|
|
106
106
|
}
|
|
@@ -68,3 +68,50 @@ describe('ox-entity360-section', () => {
|
|
|
68
68
|
expect(el.shadowRoot!.querySelector('p')!.textContent!.trim()).to.not.equal('')
|
|
69
69
|
})
|
|
70
70
|
})
|
|
71
|
+
|
|
72
|
+
describe('entity 360 section as a drop area', () => {
|
|
73
|
+
it('shows where a dragged file would land, and only then', async () => {
|
|
74
|
+
const section = (await fixture(html`<ox-entity360-section heading="papers" state="ready"></ox-entity360-section>`)) as OxEntity360Section
|
|
75
|
+
section.style.setProperty('--md-sys-color-primary', 'rgb(0, 0, 255)')
|
|
76
|
+
|
|
77
|
+
expect(getComputedStyle(section).outlineStyle).to.equal('none')
|
|
78
|
+
|
|
79
|
+
section.classList.add('candrop')
|
|
80
|
+
expect(getComputedStyle(section).outlineStyle, 'no mark while a file is over it').to.equal('dashed')
|
|
81
|
+
|
|
82
|
+
section.classList.remove('candrop')
|
|
83
|
+
expect(getComputedStyle(section).outlineStyle).to.equal('none')
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
describe('entity 360 section heading', () => {
|
|
88
|
+
it('keeps the heading level with an action that grows a second line', async () => {
|
|
89
|
+
const section = (await fixture(html`<ox-entity360-section heading="papers" state="ready">
|
|
90
|
+
<span slot="actions" style="display: inline-flex; flex-wrap: wrap; width: 120px">
|
|
91
|
+
<button style="height: 26px">attach</button>
|
|
92
|
+
</span>
|
|
93
|
+
</ox-entity360-section>`)) as OxEntity360Section
|
|
94
|
+
|
|
95
|
+
const heading = section.shadowRoot!.querySelector('h3')!
|
|
96
|
+
const actions = section.querySelector('[slot="actions"]') as HTMLElement
|
|
97
|
+
const before = heading.getBoundingClientRect().top
|
|
98
|
+
|
|
99
|
+
const refusal = document.createElement('div')
|
|
100
|
+
refusal.style.flexBasis = '100%'
|
|
101
|
+
refusal.textContent = 'memo.txt: not a type taken here'
|
|
102
|
+
actions.append(refusal)
|
|
103
|
+
|
|
104
|
+
expect(heading.getBoundingClientRect().top, 'the heading moved down with the second line').to.equal(before)
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
describe('entity 360 section actions', () => {
|
|
109
|
+
it('tells what sits in the actions slot to line up at the end', async () => {
|
|
110
|
+
const section = (await fixture(html`<ox-entity360-section heading="papers" state="ready">
|
|
111
|
+
<span slot="actions">attach</span>
|
|
112
|
+
</ox-entity360-section>`)) as OxEntity360Section
|
|
113
|
+
|
|
114
|
+
const actions = section.querySelector('[slot="actions"]') as HTMLElement
|
|
115
|
+
expect(getComputedStyle(actions).getPropertyValue('--ox-actions-align').trim()).to.equal('end')
|
|
116
|
+
})
|
|
117
|
+
})
|