@htmlbricks/hb-messages-list 0.20.18 → 0.50.0-alpha.10
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/main.iife.js +8 -0
- package/{release/manifest.json → manifest.json} +18 -19
- package/package.json +15 -81
- package/types/webcomponent.type.d.json +125 -0
- package/types/webcomponent_events.type.d.json +10 -0
- package/LICENSE.md +0 -68
- package/README.md +0 -1
- package/extra/docs.ts +0 -183
- package/release/docs.js +0 -183
- package/release/docs.js.map +0 -1
- package/release/docs.ts +0 -183
- package/release/release.js +0 -2
- package/release/release.js.map +0 -1
- /package/{release → types}/webcomponent.type.d.ts +0 -0
package/extra/docs.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "wc-js-utils/main";
|
|
2
|
-
import type { Component } from "../app/types/webcomponent.type";
|
|
3
|
-
|
|
4
|
-
export const storybookArgs = {
|
|
5
|
-
messages: { control: { type: "object" } },
|
|
6
|
-
authors: { control: { type: "object" } },
|
|
7
|
-
options: { control: { type: "object" } },
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const cssVars: CssVar[] = [];
|
|
11
|
-
export const cssParts: CssPart[] = [{ name: "testpart", description: "test css part on 2 div tag" }];
|
|
12
|
-
export const htmlSlots: HtmlSlot[] = [{ name: "skelcontent", description: "test slot" }];
|
|
13
|
-
export const i18nLanguages: i18nLang[] = [];
|
|
14
|
-
|
|
15
|
-
export const styleSetup: StyleSetup = {
|
|
16
|
-
vars: cssVars,
|
|
17
|
-
parts: cssParts,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const defaultExampleMessages: Component["messages"] = [
|
|
21
|
-
{
|
|
22
|
-
id: "1",
|
|
23
|
-
text: "Hello",
|
|
24
|
-
timestamp: new Date(Date.now() - 36_000),
|
|
25
|
-
type: "text",
|
|
26
|
-
status: "sent",
|
|
27
|
-
authorId: "1",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "2",
|
|
31
|
-
text: "Hi",
|
|
32
|
-
timestamp: new Date(Date.now()),
|
|
33
|
-
type: "text",
|
|
34
|
-
status: "received",
|
|
35
|
-
authorId: "2",
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
const moreExampleMessages: Component["messages"] = [
|
|
39
|
-
...defaultExampleMessages,
|
|
40
|
-
{
|
|
41
|
-
id: "3",
|
|
42
|
-
text: "How are you?",
|
|
43
|
-
timestamp: new Date(Date.now()),
|
|
44
|
-
type: "text",
|
|
45
|
-
status: "received",
|
|
46
|
-
authorId: "2",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "4",
|
|
50
|
-
text: "I'm fine, thanks",
|
|
51
|
-
timestamp: new Date(Date.now()),
|
|
52
|
-
type: "text",
|
|
53
|
-
status: "sent",
|
|
54
|
-
authorId: "1",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: "5",
|
|
58
|
-
|
|
59
|
-
text: "What about you?",
|
|
60
|
-
timestamp: new Date(Date.now()),
|
|
61
|
-
type: "text",
|
|
62
|
-
status: "received",
|
|
63
|
-
authorId: "2",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: "6",
|
|
67
|
-
text: "I'm fine too, thanks for asking",
|
|
68
|
-
timestamp: new Date(Date.now()),
|
|
69
|
-
type: "text",
|
|
70
|
-
status: "sent",
|
|
71
|
-
authorId: "1",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "7",
|
|
75
|
-
text: "You're welcome",
|
|
76
|
-
timestamp: new Date(Date.now()),
|
|
77
|
-
type: "text",
|
|
78
|
-
status: "received",
|
|
79
|
-
authorId: "2",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: "8",
|
|
83
|
-
text: "Bye",
|
|
84
|
-
timestamp: new Date(Date.now()),
|
|
85
|
-
type: "text",
|
|
86
|
-
status: "sent",
|
|
87
|
-
authorId: "1",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "9",
|
|
91
|
-
text: "Bye",
|
|
92
|
-
timestamp: new Date(Date.now()),
|
|
93
|
-
type: "text",
|
|
94
|
-
status: "received",
|
|
95
|
-
authorId: "2",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "10",
|
|
99
|
-
text: "See you later",
|
|
100
|
-
timestamp: new Date(Date.now()),
|
|
101
|
-
type: "text",
|
|
102
|
-
status: "sent",
|
|
103
|
-
authorId: "1",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: "11",
|
|
107
|
-
text: "See you later",
|
|
108
|
-
timestamp: new Date(Date.now()),
|
|
109
|
-
type: "text",
|
|
110
|
-
status: "received",
|
|
111
|
-
authorId: "2",
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "12",
|
|
115
|
-
text: "Bye",
|
|
116
|
-
timestamp: new Date(Date.now()),
|
|
117
|
-
type: "text",
|
|
118
|
-
status: "sent",
|
|
119
|
-
authorId: "1",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: "13",
|
|
123
|
-
text: "Bye",
|
|
124
|
-
timestamp: new Date(Date.now()),
|
|
125
|
-
type: "text",
|
|
126
|
-
status: "received",
|
|
127
|
-
authorId: "2",
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
const defaultExampleAuthors: Component["authors"] = [
|
|
131
|
-
{
|
|
132
|
-
id: "1",
|
|
133
|
-
name: "John",
|
|
134
|
-
avatar: "https://i.pravatar.cc/300?img=1",
|
|
135
|
-
status: "online",
|
|
136
|
-
me: true,
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "2",
|
|
140
|
-
name: "Mary",
|
|
141
|
-
avatar: "https://i.pravatar.cc/300?img=2",
|
|
142
|
-
status: "online",
|
|
143
|
-
},
|
|
144
|
-
];
|
|
145
|
-
|
|
146
|
-
const examples: { name: string; description?: string; data: Component }[] = [
|
|
147
|
-
{
|
|
148
|
-
name: "default",
|
|
149
|
-
data: {
|
|
150
|
-
messages: defaultExampleMessages,
|
|
151
|
-
authors: defaultExampleAuthors,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
name: "moreMessages",
|
|
157
|
-
data: {
|
|
158
|
-
messages: moreExampleMessages,
|
|
159
|
-
authors: defaultExampleAuthors,
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
];
|
|
163
|
-
export const componentSetup: ComponentSetup & { examples: { name: string; description?: string; data: Component }[] } = {
|
|
164
|
-
definitions: null as any,
|
|
165
|
-
storybookArgs,
|
|
166
|
-
styleSetup,
|
|
167
|
-
author: null as any,
|
|
168
|
-
contributors: [],
|
|
169
|
-
owner: null as any,
|
|
170
|
-
htmlSlots,
|
|
171
|
-
i18n: i18nLanguages,
|
|
172
|
-
examples,
|
|
173
|
-
screenshots: [],
|
|
174
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
175
|
-
readmePath: "README.md",
|
|
176
|
-
name: "hb-messages-list",
|
|
177
|
-
category: "messages",
|
|
178
|
-
tags: ["messages"],
|
|
179
|
-
size: {},
|
|
180
|
-
iifePath: "release/release.js",
|
|
181
|
-
repoName: "@htmlbricks/hb-messages-list",
|
|
182
|
-
version: null as any,
|
|
183
|
-
};
|
package/release/docs.js
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
|
-
export var storybookArgs = {
|
|
11
|
-
messages: { control: { type: "object" } },
|
|
12
|
-
authors: { control: { type: "object" } },
|
|
13
|
-
options: { control: { type: "object" } }
|
|
14
|
-
};
|
|
15
|
-
var cssVars = [];
|
|
16
|
-
export var cssParts = [{ name: "testpart", description: "test css part on 2 div tag" }];
|
|
17
|
-
export var htmlSlots = [{ name: "skelcontent", description: "test slot" }];
|
|
18
|
-
export var i18nLanguages = [];
|
|
19
|
-
export var styleSetup = {
|
|
20
|
-
vars: cssVars,
|
|
21
|
-
parts: cssParts
|
|
22
|
-
};
|
|
23
|
-
var defaultExampleMessages = [
|
|
24
|
-
{
|
|
25
|
-
id: "1",
|
|
26
|
-
text: "Hello",
|
|
27
|
-
timestamp: new Date(Date.now() - 36000),
|
|
28
|
-
type: "text",
|
|
29
|
-
status: "sent",
|
|
30
|
-
authorId: "1"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: "2",
|
|
34
|
-
text: "Hi",
|
|
35
|
-
timestamp: new Date(Date.now()),
|
|
36
|
-
type: "text",
|
|
37
|
-
status: "received",
|
|
38
|
-
authorId: "2"
|
|
39
|
-
},
|
|
40
|
-
];
|
|
41
|
-
var moreExampleMessages = __spreadArray(__spreadArray([], defaultExampleMessages, true), [
|
|
42
|
-
{
|
|
43
|
-
id: "3",
|
|
44
|
-
text: "How are you?",
|
|
45
|
-
timestamp: new Date(Date.now()),
|
|
46
|
-
type: "text",
|
|
47
|
-
status: "received",
|
|
48
|
-
authorId: "2"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "4",
|
|
52
|
-
text: "I'm fine, thanks",
|
|
53
|
-
timestamp: new Date(Date.now()),
|
|
54
|
-
type: "text",
|
|
55
|
-
status: "sent",
|
|
56
|
-
authorId: "1"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "5",
|
|
60
|
-
text: "What about you?",
|
|
61
|
-
timestamp: new Date(Date.now()),
|
|
62
|
-
type: "text",
|
|
63
|
-
status: "received",
|
|
64
|
-
authorId: "2"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "6",
|
|
68
|
-
text: "I'm fine too, thanks for asking",
|
|
69
|
-
timestamp: new Date(Date.now()),
|
|
70
|
-
type: "text",
|
|
71
|
-
status: "sent",
|
|
72
|
-
authorId: "1"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "7",
|
|
76
|
-
text: "You're welcome",
|
|
77
|
-
timestamp: new Date(Date.now()),
|
|
78
|
-
type: "text",
|
|
79
|
-
status: "received",
|
|
80
|
-
authorId: "2"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "8",
|
|
84
|
-
text: "Bye",
|
|
85
|
-
timestamp: new Date(Date.now()),
|
|
86
|
-
type: "text",
|
|
87
|
-
status: "sent",
|
|
88
|
-
authorId: "1"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: "9",
|
|
92
|
-
text: "Bye",
|
|
93
|
-
timestamp: new Date(Date.now()),
|
|
94
|
-
type: "text",
|
|
95
|
-
status: "received",
|
|
96
|
-
authorId: "2"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
id: "10",
|
|
100
|
-
text: "See you later",
|
|
101
|
-
timestamp: new Date(Date.now()),
|
|
102
|
-
type: "text",
|
|
103
|
-
status: "sent",
|
|
104
|
-
authorId: "1"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: "11",
|
|
108
|
-
text: "See you later",
|
|
109
|
-
timestamp: new Date(Date.now()),
|
|
110
|
-
type: "text",
|
|
111
|
-
status: "received",
|
|
112
|
-
authorId: "2"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: "12",
|
|
116
|
-
text: "Bye",
|
|
117
|
-
timestamp: new Date(Date.now()),
|
|
118
|
-
type: "text",
|
|
119
|
-
status: "sent",
|
|
120
|
-
authorId: "1"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: "13",
|
|
124
|
-
text: "Bye",
|
|
125
|
-
timestamp: new Date(Date.now()),
|
|
126
|
-
type: "text",
|
|
127
|
-
status: "received",
|
|
128
|
-
authorId: "2"
|
|
129
|
-
},
|
|
130
|
-
], false);
|
|
131
|
-
var defaultExampleAuthors = [
|
|
132
|
-
{
|
|
133
|
-
id: "1",
|
|
134
|
-
name: "John",
|
|
135
|
-
avatar: "https://i.pravatar.cc/300?img=1",
|
|
136
|
-
status: "online",
|
|
137
|
-
me: true
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: "2",
|
|
141
|
-
name: "Mary",
|
|
142
|
-
avatar: "https://i.pravatar.cc/300?img=2",
|
|
143
|
-
status: "online"
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
var examples = [
|
|
147
|
-
{
|
|
148
|
-
name: "default",
|
|
149
|
-
data: {
|
|
150
|
-
messages: defaultExampleMessages,
|
|
151
|
-
authors: defaultExampleAuthors
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
name: "moreMessages",
|
|
156
|
-
data: {
|
|
157
|
-
messages: moreExampleMessages,
|
|
158
|
-
authors: defaultExampleAuthors
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
];
|
|
162
|
-
export var componentSetup = {
|
|
163
|
-
definitions: null,
|
|
164
|
-
storybookArgs: storybookArgs,
|
|
165
|
-
styleSetup: styleSetup,
|
|
166
|
-
author: null,
|
|
167
|
-
contributors: [],
|
|
168
|
-
owner: null,
|
|
169
|
-
htmlSlots: htmlSlots,
|
|
170
|
-
i18n: i18nLanguages,
|
|
171
|
-
examples: examples,
|
|
172
|
-
screenshots: [],
|
|
173
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
174
|
-
readmePath: "README.md",
|
|
175
|
-
name: "hb-messages-list",
|
|
176
|
-
category: "messages",
|
|
177
|
-
tags: ["messages"],
|
|
178
|
-
size: {},
|
|
179
|
-
iifePath: "release/release.js",
|
|
180
|
-
repoName: "@htmlbricks/hb-messages-list",
|
|
181
|
-
version: null
|
|
182
|
-
};
|
|
183
|
-
//# sourceMappingURL=docs.js.map
|
package/release/docs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../extra/docs.ts"],"names":[],"mappings":"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"}
|
package/release/docs.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "wc-js-utils/main";
|
|
2
|
-
import type { Component } from "../app/types/webcomponent.type";
|
|
3
|
-
|
|
4
|
-
export const storybookArgs = {
|
|
5
|
-
messages: { control: { type: "object" } },
|
|
6
|
-
authors: { control: { type: "object" } },
|
|
7
|
-
options: { control: { type: "object" } },
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const cssVars: CssVar[] = [];
|
|
11
|
-
export const cssParts: CssPart[] = [{ name: "testpart", description: "test css part on 2 div tag" }];
|
|
12
|
-
export const htmlSlots: HtmlSlot[] = [{ name: "skelcontent", description: "test slot" }];
|
|
13
|
-
export const i18nLanguages: i18nLang[] = [];
|
|
14
|
-
|
|
15
|
-
export const styleSetup: StyleSetup = {
|
|
16
|
-
vars: cssVars,
|
|
17
|
-
parts: cssParts,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const defaultExampleMessages: Component["messages"] = [
|
|
21
|
-
{
|
|
22
|
-
id: "1",
|
|
23
|
-
text: "Hello",
|
|
24
|
-
timestamp: new Date(Date.now() - 36_000),
|
|
25
|
-
type: "text",
|
|
26
|
-
status: "sent",
|
|
27
|
-
authorId: "1",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "2",
|
|
31
|
-
text: "Hi",
|
|
32
|
-
timestamp: new Date(Date.now()),
|
|
33
|
-
type: "text",
|
|
34
|
-
status: "received",
|
|
35
|
-
authorId: "2",
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
const moreExampleMessages: Component["messages"] = [
|
|
39
|
-
...defaultExampleMessages,
|
|
40
|
-
{
|
|
41
|
-
id: "3",
|
|
42
|
-
text: "How are you?",
|
|
43
|
-
timestamp: new Date(Date.now()),
|
|
44
|
-
type: "text",
|
|
45
|
-
status: "received",
|
|
46
|
-
authorId: "2",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "4",
|
|
50
|
-
text: "I'm fine, thanks",
|
|
51
|
-
timestamp: new Date(Date.now()),
|
|
52
|
-
type: "text",
|
|
53
|
-
status: "sent",
|
|
54
|
-
authorId: "1",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: "5",
|
|
58
|
-
|
|
59
|
-
text: "What about you?",
|
|
60
|
-
timestamp: new Date(Date.now()),
|
|
61
|
-
type: "text",
|
|
62
|
-
status: "received",
|
|
63
|
-
authorId: "2",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: "6",
|
|
67
|
-
text: "I'm fine too, thanks for asking",
|
|
68
|
-
timestamp: new Date(Date.now()),
|
|
69
|
-
type: "text",
|
|
70
|
-
status: "sent",
|
|
71
|
-
authorId: "1",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "7",
|
|
75
|
-
text: "You're welcome",
|
|
76
|
-
timestamp: new Date(Date.now()),
|
|
77
|
-
type: "text",
|
|
78
|
-
status: "received",
|
|
79
|
-
authorId: "2",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: "8",
|
|
83
|
-
text: "Bye",
|
|
84
|
-
timestamp: new Date(Date.now()),
|
|
85
|
-
type: "text",
|
|
86
|
-
status: "sent",
|
|
87
|
-
authorId: "1",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "9",
|
|
91
|
-
text: "Bye",
|
|
92
|
-
timestamp: new Date(Date.now()),
|
|
93
|
-
type: "text",
|
|
94
|
-
status: "received",
|
|
95
|
-
authorId: "2",
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "10",
|
|
99
|
-
text: "See you later",
|
|
100
|
-
timestamp: new Date(Date.now()),
|
|
101
|
-
type: "text",
|
|
102
|
-
status: "sent",
|
|
103
|
-
authorId: "1",
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: "11",
|
|
107
|
-
text: "See you later",
|
|
108
|
-
timestamp: new Date(Date.now()),
|
|
109
|
-
type: "text",
|
|
110
|
-
status: "received",
|
|
111
|
-
authorId: "2",
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "12",
|
|
115
|
-
text: "Bye",
|
|
116
|
-
timestamp: new Date(Date.now()),
|
|
117
|
-
type: "text",
|
|
118
|
-
status: "sent",
|
|
119
|
-
authorId: "1",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: "13",
|
|
123
|
-
text: "Bye",
|
|
124
|
-
timestamp: new Date(Date.now()),
|
|
125
|
-
type: "text",
|
|
126
|
-
status: "received",
|
|
127
|
-
authorId: "2",
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
const defaultExampleAuthors: Component["authors"] = [
|
|
131
|
-
{
|
|
132
|
-
id: "1",
|
|
133
|
-
name: "John",
|
|
134
|
-
avatar: "https://i.pravatar.cc/300?img=1",
|
|
135
|
-
status: "online",
|
|
136
|
-
me: true,
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "2",
|
|
140
|
-
name: "Mary",
|
|
141
|
-
avatar: "https://i.pravatar.cc/300?img=2",
|
|
142
|
-
status: "online",
|
|
143
|
-
},
|
|
144
|
-
];
|
|
145
|
-
|
|
146
|
-
const examples: { name: string; description?: string; data: Component }[] = [
|
|
147
|
-
{
|
|
148
|
-
name: "default",
|
|
149
|
-
data: {
|
|
150
|
-
messages: defaultExampleMessages,
|
|
151
|
-
authors: defaultExampleAuthors,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
name: "moreMessages",
|
|
157
|
-
data: {
|
|
158
|
-
messages: moreExampleMessages,
|
|
159
|
-
authors: defaultExampleAuthors,
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
];
|
|
163
|
-
export const componentSetup: ComponentSetup & { examples: { name: string; description?: string; data: Component }[] } = {
|
|
164
|
-
definitions: null as any,
|
|
165
|
-
storybookArgs,
|
|
166
|
-
styleSetup,
|
|
167
|
-
author: null as any,
|
|
168
|
-
contributors: [],
|
|
169
|
-
owner: null as any,
|
|
170
|
-
htmlSlots,
|
|
171
|
-
i18n: i18nLanguages,
|
|
172
|
-
examples,
|
|
173
|
-
screenshots: [],
|
|
174
|
-
licenses: [{ type: "Apache-2.0", path: "LICENSE.md", cost: 0, currency: "EUR" }],
|
|
175
|
-
readmePath: "README.md",
|
|
176
|
-
name: "hb-messages-list",
|
|
177
|
-
category: "messages",
|
|
178
|
-
tags: ["messages"],
|
|
179
|
-
size: {},
|
|
180
|
-
iifePath: "release/release.js",
|
|
181
|
-
repoName: "@htmlbricks/hb-messages-list",
|
|
182
|
-
version: null as any,
|
|
183
|
-
};
|
package/release/release.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function o(){return Object.create(null)}function n(t){t.forEach(e)}function r(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let i,a;function l(t,e){return i||(i=document.createElement("a")),i.href=e,t===i.href}function c(t,e){t.appendChild(e)}function f(t,e,o){t.insertBefore(e,o||null)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function u(t){return document.createElement(t)}function g(t){return document.createTextNode(t)}function p(){return g(" ")}function h(){return g("")}function m(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}function v(t,e){e=""+e,t.data!==e&&(t.data=e)}function x(t){const e={};for(const o of t)e[o.name]=o.value;return e}function b(t){a=t}const y=[],$=[];let w=[];const k=[],_=Promise.resolve();let E=!1;function S(t){w.push(t)}const L=new Set;let C=0;function D(){if(0!==C)return;const t=a;do{try{for(;C<y.length;){const t=y[C];C++,b(t),N(t.$$)}}catch(t){throw y.length=0,C=0,t}for(b(null),y.length=0,C=0;$.length;)$.pop()();for(let t=0;t<w.length;t+=1){const e=w[t];L.has(e)||(L.add(e),e())}w.length=0}while(y.length);for(;k.length;)k.pop()();E=!1,L.clear(),b(t)}function N(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(S)}}const O=new Set;function T(t,e){t&&t.i&&(O.delete(t),t.i(e))}function A(t,e){t.d(1),e.delete(t.key)}function j(t,e){const o=t.$$;null!==o.fragment&&(!function(t){const e=[],o=[];w.forEach((n=>-1===t.indexOf(n)?e.push(n):o.push(n))),o.forEach((t=>t())),w=e}(o.after_update),n(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}function z(t,e){-1===t.$$.dirty[0]&&(y.push(t),E||(E=!0,_.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function M(s,i,l,c,f,u,g,p=[-1]){const h=a;b(s);const m=s.$$={fragment:null,ctx:[],props:u,update:t,not_equal:f,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(h?h.$$.context:[])),callbacks:o(),dirty:p,skip_bound:!1,root:i.target||h.$$.root};g&&g(m.root);let v=!1;if(m.ctx=l?l(s,i.props||{},((t,e,...o)=>{const n=o.length?o[0]:e;return m.ctx&&f(m.ctx[t],m.ctx[t]=n)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](n),v&&z(s,t)),e})):[],m.update(),v=!0,n(m.before_update),m.fragment=!!c&&c(m.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);m.fragment&&m.fragment.l(t),t.forEach(d)}else m.fragment&&m.fragment.c();i.intro&&T(s.$$.fragment),function(t,o,s,i){const{fragment:a,after_update:l}=t.$$;a&&a.m(o,s),i||S((()=>{const o=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...o):n(o),t.$$.on_mount=[]})),l.forEach(S)}(s,i.target,i.anchor,i.customElement),D()}b(h)}let P;"function"==typeof HTMLElement&&(P=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,o){this[t]=o}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){j(this,1),this.$destroy=t}$on(e,o){if(!r(o))return t;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(o),()=>{const t=n.indexOf(o);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var I=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,R=/\n/g,J=/^\s*/,W=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,B=/^:\s*/,F=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,H=/^[;\s]*/,q=/^\s+|\s+$/g,K="";function V(t){return t?t.replace(q,K):K}var G,Q=function(t,e){var o,n=null;if(!t||"string"!=typeof t)return n;for(var r,s,i=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var o=1,n=1;function r(t){var e=t.match(R);e&&(o+=e.length);var r=t.lastIndexOf("\n");n=~r?t.length-r:n+t.length}function s(){var t={line:o,column:n};return function(e){return e.position=new i(t),c(),e}}function i(t){this.start=t,this.end={line:o,column:n},this.source=e.source}function a(r){var s=new Error(e.source+":"+o+":"+n+": "+r);if(s.reason=r,s.filename=e.source,s.line=o,s.column=n,s.source=t,!e.silent)throw s}function l(e){var o=e.exec(t);if(o){var n=o[0];return r(n),t=t.slice(n.length),o}}function c(){l(J)}function f(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=s();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var o=2;K!=t.charAt(o)&&("*"!=t.charAt(o)||"/"!=t.charAt(o+1));)++o;if(o+=2,K===t.charAt(o-1))return a("End of comment missing");var i=t.slice(2,o-2);return n+=2,r(i),t=t.slice(o),n+=2,e({type:"comment",comment:i})}}function u(){var t=s(),e=l(W);if(e){if(d(),!l(B))return a("property missing ':'");var o=l(F),n=t({type:"declaration",property:V(e[0].replace(I,K)),value:o?V(o[0].replace(I,K)):K});return l(H),n}}return i.prototype.content=t,c(),function(){var t,e=[];for(f(e);t=u();)!1!==t&&(e.push(t),f(e));return e}()}(t),a="function"==typeof e,l=0,c=i.length;l<c;l++)r=(o=i[l]).property,s=o.value,a?e(r,s,o):s&&(n||(n={}),n[r]=s);return n};function U(t,e,o){const n=t.slice();return n[8]=e[o],n}function X(t){let e,o,n,r,s,i,a,h,x,b,y,$,w,k,_,E,S,L,C,D,N=t[8].author.name+"",O=t[8].dateString+"",T=t[8].text+"";return{c(){e=u("div"),o=u("img"),r=p(),s=u("div"),i=u("div"),a=u("h4"),h=g(N),x=p(),b=u("h5"),y=u("i"),$=g(O),w=p(),k=u("hr"),_=p(),E=u("div"),S=g(T),L=p(),C=u("br"),D=p(),m(o,"alt",""),m(o,"class","img-circle medium-image"),l(o.src,n=t[8].author.avatar)||m(o,"src",n),m(y,"class","fa fa-clock-o"),m(i,"class","message-info"),m(E,"class","message-text"),m(s,"class","message-body"),m(e,"class","message info")},m(t,n){f(t,e,n),c(e,o),c(e,r),c(e,s),c(s,i),c(i,a),c(a,h),c(i,x),c(i,b),c(b,y),c(b,$),c(s,w),c(s,k),c(s,_),c(s,E),c(E,S),c(e,L),c(e,C),c(e,D)},p(t,e){1&e&&!l(o.src,n=t[8].author.avatar)&&m(o,"src",n),1&e&&N!==(N=t[8].author.name+"")&&v(h,N),1&e&&O!==(O=t[8].dateString+"")&&v($,O),1&e&&T!==(T=t[8].text+"")&&v(S,T)},d(t){t&&d(e)}}}function Y(t){let e,o,n,r,s,i,a,h,x,b,y,$,w,k,_,E,S,L,C,D,N,O=t[8].author.name+"",T=t[8].dateString+"",A=t[8].text+"";return{c(){e=u("div"),o=u("img"),r=p(),s=u("div"),i=u("div"),a=u("div"),h=u("h4"),x=g(O),b=p(),y=u("h5"),$=u("i"),w=g(T),k=p(),_=u("hr"),E=p(),S=u("div"),L=g(A),C=p(),D=u("br"),N=p(),m(o,"alt",""),m(o,"class","img-circle medium-image"),l(o.src,n=t[8].author.avatar)||m(o,"src",n),m($,"class","fa fa-clock-o"),m(a,"class","message-info"),m(S,"class","message-text"),m(i,"class","message-body-inner"),m(s,"class","message-body"),m(e,"class","message my-message")},m(t,n){f(t,e,n),c(e,o),c(e,r),c(e,s),c(s,i),c(i,a),c(a,h),c(h,x),c(a,b),c(a,y),c(y,$),c(y,w),c(i,k),c(i,_),c(i,E),c(i,S),c(S,L),c(e,C),c(e,D),c(e,N)},p(t,e){1&e&&!l(o.src,n=t[8].author.avatar)&&m(o,"src",n),1&e&&O!==(O=t[8].author.name+"")&&v(x,O),1&e&&T!==(T=t[8].dateString+"")&&v(w,T),1&e&&A!==(A=t[8].text+"")&&v(L,A)},d(t){t&&d(e)}}}function Z(t,e){let o,n;function r(t,e){return t[8].author.me?Y:X}let s=r(e),i=s(e);return{key:t,first:null,c(){o=h(),i.c(),n=h(),this.first=o},m(t,e){f(t,o,e),i.m(t,e),f(t,n,e)},p(t,o){s===(s=r(e=t))&&i?i.p(e,o):(i.d(1),i=s(e),i&&(i.c(),i.m(n.parentNode,n)))},d(t){t&&d(o),i.d(t),t&&d(n)}}}function tt(e){let o,r=[],s=new Map,i=e[0];const a=t=>t[8].id;for(let t=0;t<i.length;t+=1){let o=U(e,i,t),n=a(o);s.set(n,r[t]=Z(n,o))}return{c(){for(let t=0;t<r.length;t+=1)r[t].c();o=h(),this.c=t},m(t,e){for(let o=0;o<r.length;o+=1)r[o]&&r[o].m(t,e);f(t,o,e)},p(t,[e]){1&e&&(i=t[0],r=function(t,e,o,r,s,i,a,l,c,f,d,u){let g=t.length,p=i.length,h=g;const m={};for(;h--;)m[t[h].key]=h;const v=[],x=new Map,b=new Map,y=[];for(h=p;h--;){const t=u(s,i,h),n=o(t);let l=a.get(n);l?r&&y.push((()=>l.p(t,e))):(l=f(n,t),l.c()),x.set(n,v[h]=l),n in m&&b.set(n,Math.abs(h-m[n]))}const $=new Set,w=new Set;function k(t){T(t,1),t.m(l,d),a.set(t.key,t),d=t.first,p--}for(;g&&p;){const e=v[p-1],o=t[g-1],n=e.key,r=o.key;e===o?(d=e.first,g--,p--):x.has(r)?!a.has(n)||$.has(n)?k(e):w.has(r)?g--:b.get(n)>b.get(r)?(w.add(n),k(e)):($.add(r),g--):(c(o,a),g--)}for(;g--;){const e=t[g];x.has(e.key)||c(e,a)}for(;p;)k(v[p-1]);return n(y),v}(r,e,a,1,t,i,s,o.parentNode,A,Z,o,U))},i:t,o:t,d(t){for(let e=0;e<r.length;e+=1)r[e].d(t);t&&d(o)}}}function et(t,e,o){let{id:n}=e,{style:r}=e,{messages:s}=e,{authors:i}=e,{options:a}=e,l=[];const c={};return t.$$set=t=>{"id"in t&&o(1,n=t.id),"style"in t&&o(5,r=t.style),"messages"in t&&o(2,s=t.messages),"authors"in t&&o(3,i=t.authors),"options"in t&&o(4,a=t.options)},t.$$.update=()=>{if(63&t.$$.dirty){if(n||o(1,n=""),r&&Q(r),"string"==typeof a)try{o(4,a=JSON.parse(a))}catch(t){console.error("error parsing options",t)}if(a||o(4,a=c),"string"==typeof s)try{o(2,s=JSON.parse(s))}catch(t){console.error("error parsing messages",t)}if("string"==typeof i)try{o(3,i=JSON.parse(i))}catch(t){console.error("error parsing authors",t)}if((null==s?void 0:s.length)&&(null==i?void 0:i.length)){console.log("reload messages");const t=[];for(const e of s){const o=i.find((t=>t.id===e.authorId));if(o){const n=new Date(e.timestamp).toDateString()===(new Date).toDateString(),r=new Date(e.timestamp),s=r.toLocaleTimeString().split(":")[0]+":"+r.toLocaleTimeString().split(":")[1],i=r.toLocaleString().split(" ")[0]+" "+r.toLocaleTimeString().split(":")[0]+":"+r.toLocaleTimeString().split(":")[1],a=n?s:i;t.push(Object.assign(Object.assign({},e),{author:o,dateString:a}))}}o(0,l=t)}console.info("messages are",l)}},[l,n,s,i,a,r]}(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var o,n,r="";if(t&&(null==e?void 0:e.length)&&(null===(o=Object.keys(t))||void 0===o?void 0:o.length)&&(null===(n=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===n?void 0:n.length))for(var s=function(o){(null==e?void 0:e.filter((function(e){return e.name===o&&e.defaultValue!==t[o]})))&&(r+="".concat(o,":").concat(t[o],";"))},i=0,a=Object.keys(t);i<a.length;i++)s(a[i]);return r},e.addComponent=function(t){var e,o=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!o)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var n=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(o+"-script"))try{var r=document.createElement("script");r.id=o+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(n),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var o=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,o){return t.getDictionaryWord(e,this.dictionary,o||this.lang)},t.prototype.translateDate=function(e,o,n){return t.formatDate(e,o,n||this.lang)},t.getDefaultLang=function(){var t,e,o,n,r,s="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(o=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===o?void 0:o.length)&&(s=null===(r=null===(n=navigator.languages[0])||void 0===n?void 0:n.split("-")[0])||void 0===r?void 0:r.toLowerCase()),s},t.getDictionaryWord=function(e,o,n){var r;if(!e)throw new Error("no wordKey provided");if(!o)throw new Error("no dictionary provided");if(n&&(null===(r=o[n])||void 0===r?void 0:r[e]))return o[n][e];var s="",i=t.getDefaultLang();if(!n||i!==n){var a=null==o?void 0:o[i];(null==a?void 0:a[e])&&(s=a[e])}return s},t.formatDate=function(e,o,n){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(n||t.getDefaultLang(),o).format(e)},t}();e.LanguageTranslator=o})(G={exports:{}},G.exports);class ot extends P{constructor(t){super();const e=document.createElement("style");e.textContent='@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;background-color:#fbfcff;max-height:100%;position:absolute;padding-top:20px}.medium-image{width:45px;height:45px;margin-right:5px}.img-circle{border-radius:50%}.message-body{background-color:#fbfcff;height:100%;width:calc(100% - 305px);float:right}.message{position:relative;width:100%}.message br{clear:both}.message .message-body{position:relative;width:auto;max-width:calc(100% - 150px);float:left;background-color:#fff;border-radius:4px;border:1px solid #dbe3e8;margin:0 5px 20px 15px;color:#788288;overflow-x:hidden}.message:after{content:"";position:absolute;top:11px;left:63px;float:left;z-index:100;border-top:10px solid transparent;border-left:none;border-bottom:10px solid transparent;border-right:13px solid #fff}.message:before{content:"";position:absolute;top:10px;left:62px;float:left;z-index:99;border-top:11px solid transparent;border-left:none;border-bottom:11px solid transparent;border-right:13px solid #dbe3e8}.message .medium-image{float:left;margin-left:10px}.message .message-info{width:100%;height:22px}.message .message-info>h5>i{font-size:11px;font-weight:700;margin:0 2px 0 0;color:#a2b8c5}.message .message-info>h5{color:#a2b8c5;margin:8px 0 0 0;font-size:12px;float:right;padding-right:10px}.message .message-info>h4{font-size:14px;font-weight:600;margin:7px 13px 0 10px;color:#65addd;float:left}.message hr{margin:4px 2%;width:96%;opacity:0.75}.message .message-text{text-align:left;padding:3px 13px 10px 13px;font-size:14px}.message.my-message .message-body{float:right;margin:0 15px 20px 5px}.message.my-message:after{content:"";position:absolute;top:11px;left:auto;right:63px;float:left;z-index:100;border-top:10px solid transparent;border-left:13px solid #fff;border-bottom:10px solid transparent;border-right:none}.message.my-message:before{content:"";position:absolute;top:10px;left:auto;right:62px;float:left;z-index:99;border-top:11px solid transparent;border-left:13px solid #dbe3e8;border-bottom:11px solid transparent;border-right:none}.message.my-message .medium-image{float:right;margin-left:5px;margin-right:10px}.message.my-message .message-info>h5{float:left;padding-left:10px;padding-right:0}.message.my-message .message-info>h4{float:right}.message.info .message-body{background-color:#2da9e9;border:1px solid #2da9e9;color:#fff}.message.info:after,.message.info:before{border-right:13px solid #2da9e9}.message.info .message-info>h4{color:#fff}.message.info .message-info>h5,.message.info .message-info>h5>i{color:#fff;opacity:0.9}@media screen and (max-width: 767px){.message-body{width:100%;margin:20px 0;border:1px solid #dce2e9;background-color:#fff}.message .message-body{max-width:calc(100% - 85px)}}',this.shadowRoot.appendChild(e),M(this,{target:this.shadowRoot,props:x(this.attributes),customElement:!0},et,tt,s,{id:1,style:5,messages:2,authors:3,options:4},null),t&&(t.target&&f(t.target,this,t.anchor),t.props&&(this.$set(t.props),D()))}static get observedAttributes(){return["id","style","messages","authors","options"]}get id(){return this.$$.ctx[1]}set id(t){this.$$set({id:t}),D()}get style(){return this.$$.ctx[5]}set style(t){this.$$set({style:t}),D()}get messages(){return this.$$.ctx[2]}set messages(t){this.$$set({messages:t}),D()}get authors(){return this.$$.ctx[3]}set authors(t){this.$$set({authors:t}),D()}get options(){return this.$$.ctx[4]}set options(t){this.$$set({options:t}),D()}}return customElements.define("hb-messages-list",ot),ot}();
|
|
2
|
-
//# sourceMappingURL=release.js.map
|