@momentum-design/components 0.28.5 → 0.28.6

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.
@@ -5,8 +5,8 @@ export { default as Bullet } from './bullet';
5
5
  export { default as Button } from './button';
6
6
  export { default as Buttonsimple } from './buttonsimple';
7
7
  export { default as Checkbox } from './checkbox';
8
- export { default as FormfieldGroup } from './formfieldgroup';
9
8
  export { default as Divider } from './divider';
9
+ export { default as FormfieldGroup } from './formfieldgroup';
10
10
  export { default as FormfieldWrapper } from './formfieldwrapper';
11
11
  export { default as Icon } from './icon';
12
12
  export { default as IconProvider } from './iconprovider';
@@ -5,8 +5,8 @@ export { default as Bullet } from './bullet';
5
5
  export { default as Button } from './button';
6
6
  export { default as Buttonsimple } from './buttonsimple';
7
7
  export { default as Checkbox } from './checkbox';
8
- export { default as FormfieldGroup } from './formfieldgroup';
9
8
  export { default as Divider } from './divider';
9
+ export { default as FormfieldGroup } from './formfieldgroup';
10
10
  export { default as FormfieldWrapper } from './formfieldwrapper';
11
11
  export { default as Icon } from './icon';
12
12
  export { default as IconProvider } from './iconprovider';
package/package.json CHANGED
@@ -38,5 +38,5 @@
38
38
  "lit": "^3.2.0",
39
39
  "uuid": "^11.0.5"
40
40
  },
41
- "version": "0.28.5"
41
+ "version": "0.28.6"
42
42
  }
@@ -1,17 +0,0 @@
1
- import { CSSResult, PropertyValues, TemplateResult } from 'lit';
2
- import { VirtualizerProps } from './virtualizedlist.types';
3
- import { Component } from '../../models';
4
- declare class VirtualizedWrapper extends Component {
5
- onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
6
- virtualizerprops: VirtualizerProps;
7
- list: TemplateResult<1>;
8
- listItemTexts: string[];
9
- constructor();
10
- update(changedProperties: PropertyValues): void;
11
- connectedCallback(): void;
12
- private updateListItemTextArray;
13
- private setListData;
14
- render(): TemplateResult<1>;
15
- static styles: Array<CSSResult>;
16
- }
17
- export default VirtualizedWrapper;
@@ -1,79 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { html } from 'lit';
11
- import { property, state } from 'lit/decorators.js';
12
- import { ref } from 'lit/directives/ref.js';
13
- import { styleMap } from 'lit/directives/style-map.js';
14
- import { Component } from '../../models';
15
- class VirtualizedWrapper extends Component {
16
- constructor() {
17
- super();
18
- this.virtualizerprops = { count: 100, estimateSize: () => 100 };
19
- this.list = html ``;
20
- this.listItemTexts = new Array(this.virtualizerprops.count)
21
- .fill(true)
22
- .map((_, index) => `list item number ${index}`);
23
- this.onscroll = null;
24
- this.setListData = this.setListData.bind(this);
25
- }
26
- update(changedProperties) {
27
- super.update(changedProperties);
28
- if (changedProperties.get('virtualizerprops')) {
29
- this.updateListItemTextArray();
30
- }
31
- }
32
- connectedCallback() {
33
- var _a;
34
- super.connectedCallback();
35
- if ((_a = this.virtualizerprops) === null || _a === void 0 ? void 0 : _a.count) {
36
- this.updateListItemTextArray();
37
- }
38
- }
39
- updateListItemTextArray() {
40
- var _a;
41
- this.listItemTexts = new Array((_a = this.virtualizerprops) === null || _a === void 0 ? void 0 : _a.count)
42
- .fill(true)
43
- .map((_, index) => `list item number ${index}`);
44
- }
45
- setListData({ virtualItems, measureElement, listStyle }) {
46
- if (virtualItems) {
47
- this.list = html `<ul style="margin: 0;${styleMap(listStyle)}">${virtualItems.map((virtualItem) => html `<li role="listitem" key=${virtualItem.key} data-index=${virtualItem.index} ref=${ref(measureElement)}>
48
- ${this.listItemTexts[virtualItem.index]}</li>`)}</ul>`;
49
- }
50
- }
51
- render() {
52
- return html `
53
- <div style="height: 500px; width: 500px;">
54
- <mdc-virtualizedlist
55
- .onscroll=${this.onscroll}
56
- .virtualizerprops=${this.virtualizerprops}
57
- .setlistdata=${this.setListData}
58
- >${this.list}</mdc-virtualizedlist></div>
59
- `;
60
- }
61
- }
62
- VirtualizedWrapper.styles = Component.styles;
63
- __decorate([
64
- property({ type: Function, attribute: 'onscroll' }),
65
- __metadata("design:type", Object)
66
- ], VirtualizedWrapper.prototype, "onscroll", void 0);
67
- __decorate([
68
- property({ type: Object, attribute: 'virtualizerprops' }),
69
- __metadata("design:type", Object)
70
- ], VirtualizedWrapper.prototype, "virtualizerprops", void 0);
71
- __decorate([
72
- state(),
73
- __metadata("design:type", Object)
74
- ], VirtualizedWrapper.prototype, "list", void 0);
75
- __decorate([
76
- state(),
77
- __metadata("design:type", Object)
78
- ], VirtualizedWrapper.prototype, "listItemTexts", void 0);
79
- export default VirtualizedWrapper;