@miso.ai/client-sdk-ui 1.13.2-beta.1 → 1.14.0-beta.3
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/cjs/asset/svgs.js +17 -4
- package/dist/cjs/combo/ask/index.js +2 -2
- package/dist/cjs/constants.js +120 -98
- package/dist/cjs/defaults/ask/controls.js +1 -1
- package/dist/cjs/defaults/hybrid-search/answer-box.js +4 -4
- package/dist/cjs/defaults.js +259 -0
- package/dist/cjs/element/container/index.js +28 -0
- package/dist/cjs/element/container/miso-ask.js +3 -3
- package/dist/cjs/element/container/miso-conversation.js +21 -0
- package/dist/cjs/element/container/miso-explore.js +1 -1
- package/dist/cjs/element/container/miso-history.js +21 -0
- package/dist/cjs/element/container/miso-hybrid-search.js +1 -1
- package/dist/cjs/element/container/miso-message-item.js +91 -0
- package/dist/cjs/element/container/miso-recommendation.js +1 -1
- package/dist/cjs/element/container/miso-search.js +1 -1
- package/dist/cjs/element/container/miso-thread-item.js +91 -0
- package/dist/cjs/element/context/miso-follow-ups.js +1 -1
- package/dist/cjs/element/role/index.js +49 -0
- package/dist/cjs/element/role/miso-delete.js +20 -0
- package/dist/cjs/element/role/miso-messages.js +20 -0
- package/dist/cjs/element/role/miso-new-thread.js +20 -0
- package/dist/cjs/element/role/miso-rename.js +20 -0
- package/dist/cjs/element/role/miso-subscription.js +20 -0
- package/dist/cjs/element/role/miso-threads.js +20 -0
- package/dist/cjs/element/role/miso-title.js +20 -0
- package/dist/cjs/layout/affiliation/affiliation.js +1 -1
- package/dist/cjs/layout/banner/banner.js +2 -1
- package/dist/cjs/layout/button/button.js +170 -0
- package/dist/cjs/layout/button/checkbox.js +116 -0
- package/dist/cjs/layout/button/more-button.js +3 -3
- package/dist/cjs/layout/container/container.js +1 -1
- package/dist/cjs/layout/container/item-container.js +99 -0
- package/dist/cjs/layout/error/error.js +2 -1
- package/dist/cjs/layout/index.js +42 -0
- package/dist/cjs/layout/input/facets.js +4 -3
- package/dist/cjs/layout/input/option-list.js +3 -2
- package/dist/cjs/layout/input/search-box.js +50 -12
- package/dist/cjs/layout/input/select.js +2 -1
- package/dist/cjs/layout/list/cards.js +2 -1
- package/dist/cjs/layout/list/carousel.js +2 -1
- package/dist/cjs/layout/list/collection.js +13 -1
- package/dist/cjs/layout/list/gallery.js +2 -1
- package/dist/cjs/layout/list/horizontal.js +2 -1
- package/dist/cjs/layout/list/list.js +2 -1
- package/dist/cjs/layout/list/messages.js +359 -0
- package/dist/cjs/layout/list/threads.js +199 -0
- package/dist/cjs/layout/mixin/trackable.js +4 -5
- package/dist/cjs/layout/mixin/triggerable.js +2 -2
- package/dist/cjs/layout/radio/feedback.js +4 -3
- package/dist/cjs/layout/templates.js +97 -0
- package/dist/cjs/layout/text/question.js +71 -0
- package/dist/cjs/layout/text/text.js +2 -1
- package/dist/cjs/layout/text/typewriter/index.js +18 -23
- package/dist/cjs/plugin.js +43 -104
- package/dist/cjs/util/confirm.js +33 -0
- package/dist/cjs/util/dom.js +21 -0
- package/dist/cjs/util/modal.js +48 -0
- package/dist/cjs/util/prompt.js +47 -0
- package/dist/cjs/version.js +1 -1
- package/package.json +5 -4
- package/src/CLAUDE.md +51 -104
- package/src/asset/svgs.js +16 -3
- package/src/combo/ask/index.js +2 -2
- package/src/constants.js +39 -147
- package/src/defaults/ask/controls.js +1 -1
- package/src/defaults/hybrid-search/answer-box.js +2 -2
- package/src/defaults.js +174 -0
- package/src/element/container/index.js +4 -0
- package/src/element/container/miso-ask.js +3 -3
- package/src/element/container/miso-conversation.js +19 -0
- package/src/element/container/miso-explore.js +1 -1
- package/src/element/container/miso-history.js +19 -0
- package/src/element/container/miso-hybrid-search.js +1 -1
- package/src/element/container/miso-message-item.js +94 -0
- package/src/element/container/miso-recommendation.js +1 -1
- package/src/element/container/miso-search.js +1 -1
- package/src/element/container/miso-thread-item.js +94 -0
- package/src/element/context/miso-follow-ups.js +1 -1
- package/src/element/role/index.js +7 -0
- package/src/element/role/miso-delete.js +16 -0
- package/src/element/role/miso-messages.js +16 -0
- package/src/element/role/miso-new-thread.js +16 -0
- package/src/element/role/miso-rename.js +16 -0
- package/src/element/role/miso-subscription.js +16 -0
- package/src/element/role/miso-threads.js +16 -0
- package/src/element/role/miso-title.js +16 -0
- package/src/layout/affiliation/affiliation.js +2 -2
- package/src/layout/banner/banner.js +2 -1
- package/src/layout/button/button.js +152 -0
- package/src/layout/button/checkbox.js +92 -0
- package/src/layout/button/more-button.js +3 -3
- package/src/layout/container/container.js +2 -2
- package/src/layout/container/item-container.js +99 -0
- package/src/layout/error/error.js +2 -1
- package/src/layout/index.js +6 -0
- package/src/layout/input/facets.js +3 -2
- package/src/layout/input/option-list.js +3 -2
- package/src/layout/input/search-box.js +45 -8
- package/src/layout/input/select.js +2 -1
- package/src/layout/list/cards.js +2 -1
- package/src/layout/list/carousel.js +2 -1
- package/src/layout/list/collection.js +15 -2
- package/src/layout/list/gallery.js +2 -1
- package/src/layout/list/horizontal.js +2 -1
- package/src/layout/list/list.js +2 -1
- package/src/layout/list/messages.js +316 -0
- package/src/layout/list/threads.js +166 -0
- package/src/layout/mixin/trackable.js +2 -3
- package/src/layout/mixin/triggerable.js +1 -1
- package/src/layout/radio/feedback.js +3 -2
- package/src/layout/templates.js +97 -0
- package/src/layout/text/question.js +58 -0
- package/src/layout/text/text.js +2 -1
- package/src/layout/text/typewriter/index.js +15 -18
- package/src/plugin.js +31 -117
- package/src/util/confirm.js +28 -0
- package/src/util/dom.js +16 -0
- package/src/util/modal.js +49 -0
- package/src/util/prompt.js +42 -0
- package/src/version.js +1 -1
- package/dist/cjs/actor/data.js +0 -132
- package/dist/cjs/actor/feedback.js +0 -29
- package/dist/cjs/actor/fields.js +0 -57
- package/dist/cjs/actor/filters.js +0 -161
- package/dist/cjs/actor/hub.js +0 -57
- package/dist/cjs/actor/index.js +0 -73
- package/dist/cjs/actor/interactions.js +0 -36
- package/dist/cjs/actor/sessions.js +0 -25
- package/dist/cjs/actor/tracker-states.js +0 -61
- package/dist/cjs/actor/tracker.js +0 -109
- package/dist/cjs/actor/trackers.js +0 -52
- package/dist/cjs/actor/utils.js +0 -15
- package/dist/cjs/actor/view.js +0 -294
- package/dist/cjs/actor/views.js +0 -209
- package/dist/cjs/source.js +0 -27
- package/dist/cjs/util/proxy.js +0 -88
- package/dist/cjs/util/trackers.js +0 -88
- package/dist/cjs/workflow/affiliations.js +0 -140
- package/dist/cjs/workflow/answer-based.js +0 -337
- package/dist/cjs/workflow/ask.js +0 -319
- package/dist/cjs/workflow/asks.js +0 -150
- package/dist/cjs/workflow/autocompletable.js +0 -63
- package/dist/cjs/workflow/autocomplete.js +0 -120
- package/dist/cjs/workflow/base.js +0 -418
- package/dist/cjs/workflow/context.js +0 -19
- package/dist/cjs/workflow/explore.js +0 -210
- package/dist/cjs/workflow/explores.js +0 -21
- package/dist/cjs/workflow/hybrid-search-answer.js +0 -88
- package/dist/cjs/workflow/hybrid-search-views.js +0 -109
- package/dist/cjs/workflow/hybrid-search.js +0 -213
- package/dist/cjs/workflow/index.js +0 -41
- package/dist/cjs/workflow/options/api.js +0 -41
- package/dist/cjs/workflow/options/auto-query.js +0 -97
- package/dist/cjs/workflow/options/configurable.js +0 -45
- package/dist/cjs/workflow/options/data-processor.js +0 -20
- package/dist/cjs/workflow/options/filters.js +0 -15
- package/dist/cjs/workflow/options/index.js +0 -126
- package/dist/cjs/workflow/options/interactions.js +0 -41
- package/dist/cjs/workflow/options/layouts.js +0 -79
- package/dist/cjs/workflow/options/options.js +0 -156
- package/dist/cjs/workflow/options/pagination.js +0 -25
- package/dist/cjs/workflow/options/roles.js +0 -15
- package/dist/cjs/workflow/options/templates.js +0 -30
- package/dist/cjs/workflow/options/trackers.js +0 -83
- package/dist/cjs/workflow/options/utils.js +0 -33
- package/dist/cjs/workflow/processors.js +0 -607
- package/dist/cjs/workflow/recommendation.js +0 -57
- package/dist/cjs/workflow/recommendations.js +0 -18
- package/dist/cjs/workflow/search-based.js +0 -337
- package/dist/cjs/workflow/search.js +0 -64
- package/dist/cjs/workflow/unit.js +0 -57
- package/dist/cjs/workflow/units.js +0 -42
- package/dist/cjs/workflow/use-link.js +0 -49
- package/src/actor/data.js +0 -106
- package/src/actor/feedback.js +0 -28
- package/src/actor/fields.js +0 -51
- package/src/actor/filters.js +0 -149
- package/src/actor/hub.js +0 -47
- package/src/actor/index.js +0 -10
- package/src/actor/interactions.js +0 -32
- package/src/actor/sessions.js +0 -21
- package/src/actor/tracker-states.js +0 -57
- package/src/actor/tracker.js +0 -104
- package/src/actor/trackers.js +0 -45
- package/src/actor/utils.js +0 -7
- package/src/actor/view.js +0 -272
- package/src/actor/views.js +0 -224
- package/src/source.js +0 -17
- package/src/util/proxy.js +0 -81
- package/src/util/trackers.js +0 -84
- package/src/workflow/affiliations.js +0 -121
- package/src/workflow/answer-based.js +0 -312
- package/src/workflow/ask.js +0 -284
- package/src/workflow/asks.js +0 -143
- package/src/workflow/autocompletable.js +0 -67
- package/src/workflow/autocomplete.js +0 -114
- package/src/workflow/base.js +0 -396
- package/src/workflow/context.js +0 -16
- package/src/workflow/explore.js +0 -194
- package/src/workflow/explores.js +0 -18
- package/src/workflow/hybrid-search-answer.js +0 -73
- package/src/workflow/hybrid-search-views.js +0 -116
- package/src/workflow/hybrid-search.js +0 -230
- package/src/workflow/index.js +0 -5
- package/src/workflow/options/api.js +0 -31
- package/src/workflow/options/auto-query.js +0 -70
- package/src/workflow/options/configurable.js +0 -48
- package/src/workflow/options/data-processor.js +0 -15
- package/src/workflow/options/filters.js +0 -10
- package/src/workflow/options/index.js +0 -11
- package/src/workflow/options/interactions.js +0 -36
- package/src/workflow/options/layouts.js +0 -73
- package/src/workflow/options/options.js +0 -175
- package/src/workflow/options/pagination.js +0 -18
- package/src/workflow/options/roles.js +0 -12
- package/src/workflow/options/templates.js +0 -27
- package/src/workflow/options/trackers.js +0 -80
- package/src/workflow/options/utils.js +0 -26
- package/src/workflow/processors.js +0 -490
- package/src/workflow/recommendation.js +0 -63
- package/src/workflow/recommendations.js +0 -14
- package/src/workflow/search-based.js +0 -329
- package/src/workflow/search.js +0 -73
- package/src/workflow/unit.js +0 -51
- package/src/workflow/units.js +0 -43
- package/src/workflow/use-link.js +0 -41
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const TAG_NAME = 'miso-conversation';
|
|
10
|
+
class MisoConversationElement extends _misoContainer.default {
|
|
11
|
+
static get tagName() {
|
|
12
|
+
return TAG_NAME;
|
|
13
|
+
}
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return _misoContainer.default.observedAttributes;
|
|
16
|
+
}
|
|
17
|
+
_getWorkflow(client) {
|
|
18
|
+
return client.workflows.conversation;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = MisoConversationElement;
|
|
@@ -15,7 +15,7 @@ class MisoExploreElement extends _misoUnit.default {
|
|
|
15
15
|
return _misoUnit.default.observedAttributes;
|
|
16
16
|
}
|
|
17
17
|
_getWorkflowByUnitId(client, unitId) {
|
|
18
|
-
return client.
|
|
18
|
+
return client.workflows.explores.get(unitId);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.default = MisoExploreElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const TAG_NAME = 'miso-history';
|
|
10
|
+
class MisoHistoryElement extends _misoContainer.default {
|
|
11
|
+
static get tagName() {
|
|
12
|
+
return TAG_NAME;
|
|
13
|
+
}
|
|
14
|
+
static get observedAttributes() {
|
|
15
|
+
return _misoContainer.default.observedAttributes;
|
|
16
|
+
}
|
|
17
|
+
_getWorkflow(client) {
|
|
18
|
+
return client.workflows.history;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = MisoHistoryElement;
|
|
@@ -15,7 +15,7 @@ class MisoHybridSearchElement extends _misoContainer.default {
|
|
|
15
15
|
return _misoContainer.default.observedAttributes;
|
|
16
16
|
}
|
|
17
17
|
_getWorkflow(client) {
|
|
18
|
-
return client.
|
|
18
|
+
return client.workflows.hybridSearch;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.default = MisoHybridSearchElement;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
|
|
8
|
+
var _utils = require("../utils.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const TAG_NAME = 'miso-message-item';
|
|
11
|
+
const ATTR_QUESTION_ID = 'question-id';
|
|
12
|
+
const OBSERVED_ATTRIBUTES = Object.freeze([..._misoContainer.default.observedAttributes, ATTR_QUESTION_ID]);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A container element for one message (question-answer pair) of the
|
|
16
|
+
* conversation panel, placed inside <miso-conversation> — a container
|
|
17
|
+
* element inside another container element hosting an item subworkflow (the
|
|
18
|
+
* `message` workflow). Normally bound implicitly: the messages layout
|
|
19
|
+
* renders one <miso-message-item> per item and assigns the workflow off the item
|
|
20
|
+
* binding (element.workflow = parent workflow's _getMessageWorkflow(record)),
|
|
21
|
+
* which also covers a just-posted message that has no question id yet. A
|
|
22
|
+
* `question-id` attribute binds explicitly instead, through the parent
|
|
23
|
+
* container's workflow. Role elements inside (question, answer, sources,
|
|
24
|
+
* ...) bind to the message workflow as usual — getContainer() resolves to
|
|
25
|
+
* the closest container ancestor.
|
|
26
|
+
*/
|
|
27
|
+
class MisoMessageItemElement extends _misoContainer.default {
|
|
28
|
+
static get tagName() {
|
|
29
|
+
return TAG_NAME;
|
|
30
|
+
}
|
|
31
|
+
static get observedAttributes() {
|
|
32
|
+
return OBSERVED_ATTRIBUTES;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// properties //
|
|
36
|
+
get questionId() {
|
|
37
|
+
return this.getAttribute(ATTR_QUESTION_ID) || undefined;
|
|
38
|
+
}
|
|
39
|
+
set questionId(value) {
|
|
40
|
+
value = value !== undefined ? `${value}` : undefined;
|
|
41
|
+
if (value === this.questionId) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (value) {
|
|
45
|
+
this.setAttribute(ATTR_QUESTION_ID, value);
|
|
46
|
+
} else {
|
|
47
|
+
this.removeAttribute(ATTR_QUESTION_ID);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_getWorkflow(client) {
|
|
51
|
+
const {
|
|
52
|
+
questionId
|
|
53
|
+
} = this;
|
|
54
|
+
if (!questionId) {
|
|
55
|
+
// implicitly bound: the messages layout assigns element.workflow off
|
|
56
|
+
// the item binding — keep whatever is (or will be) assigned
|
|
57
|
+
return this._workflow;
|
|
58
|
+
}
|
|
59
|
+
const container = this._getParentContainer();
|
|
60
|
+
const workflow = container && container.workflow;
|
|
61
|
+
// the parent workflow hands out the item subworkflow; the parent binds
|
|
62
|
+
// its own workflow first (its connectedCallback resolves earlier), so
|
|
63
|
+
// it is normally present by now
|
|
64
|
+
return workflow && typeof workflow._getMessageWorkflow === 'function' ? workflow._getMessageWorkflow(questionId) : undefined;
|
|
65
|
+
}
|
|
66
|
+
_getParentContainer() {
|
|
67
|
+
try {
|
|
68
|
+
return this.parentNode ? (0, _utils.getContainer)(this.parentNode) : undefined;
|
|
69
|
+
} catch (_) {
|
|
70
|
+
return undefined; // not inside a container element
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
attributeChangedCallback(attr, oldValue, newValue) {
|
|
74
|
+
switch (attr) {
|
|
75
|
+
case ATTR_QUESTION_ID:
|
|
76
|
+
this._handleQuestionIdUpdate(oldValue, newValue);
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
super.attributeChangedCallback(attr, oldValue, newValue);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_handleQuestionIdUpdate(oldValue, newValue) {
|
|
83
|
+
oldValue = oldValue || undefined; // null -> undefined
|
|
84
|
+
newValue = newValue || undefined;
|
|
85
|
+
if (oldValue === newValue || !this._client) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this._setWorkflow(this._getWorkflow(this._client));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.default = MisoMessageItemElement;
|
|
@@ -15,7 +15,7 @@ class MisoRecommendationElement extends _misoUnit.default {
|
|
|
15
15
|
return _misoUnit.default.observedAttributes;
|
|
16
16
|
}
|
|
17
17
|
_getWorkflowByUnitId(client, unitId) {
|
|
18
|
-
return client.
|
|
18
|
+
return client.workflows.recommendations.get(unitId);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.default = MisoRecommendationElement;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoContainer = _interopRequireDefault(require("./miso-container.js"));
|
|
8
|
+
var _utils = require("../utils.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const TAG_NAME = 'miso-thread-item';
|
|
11
|
+
const ATTR_THREAD_ID = 'thread-id';
|
|
12
|
+
const OBSERVED_ATTRIBUTES = Object.freeze([..._misoContainer.default.observedAttributes, ATTR_THREAD_ID]);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A container element for one thread item of the thread list, placed inside
|
|
16
|
+
* <miso-history> — a container element inside another container element
|
|
17
|
+
* hosting an item subworkflow (the `thread` workflow). Normally bound
|
|
18
|
+
* implicitly: the threads layout renders one <miso-thread-item> per item and
|
|
19
|
+
* assigns the workflow off the item binding (element.workflow = parent
|
|
20
|
+
* workflow's _getThreadWorkflow(record)), which also covers a thread being
|
|
21
|
+
* created that has no thread id yet. A `thread-id` attribute binds
|
|
22
|
+
* explicitly instead, through the parent container's workflow. Role
|
|
23
|
+
* elements inside (title, rename, delete, subscription) bind to the thread
|
|
24
|
+
* workflow as usual — getContainer() resolves to the closest container
|
|
25
|
+
* ancestor.
|
|
26
|
+
*/
|
|
27
|
+
class MisoThreadItemElement extends _misoContainer.default {
|
|
28
|
+
static get tagName() {
|
|
29
|
+
return TAG_NAME;
|
|
30
|
+
}
|
|
31
|
+
static get observedAttributes() {
|
|
32
|
+
return OBSERVED_ATTRIBUTES;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// properties //
|
|
36
|
+
get threadId() {
|
|
37
|
+
return this.getAttribute(ATTR_THREAD_ID) || undefined;
|
|
38
|
+
}
|
|
39
|
+
set threadId(value) {
|
|
40
|
+
value = value !== undefined ? `${value}` : undefined;
|
|
41
|
+
if (value === this.threadId) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (value) {
|
|
45
|
+
this.setAttribute(ATTR_THREAD_ID, value);
|
|
46
|
+
} else {
|
|
47
|
+
this.removeAttribute(ATTR_THREAD_ID);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_getWorkflow(client) {
|
|
51
|
+
const {
|
|
52
|
+
threadId
|
|
53
|
+
} = this;
|
|
54
|
+
if (!threadId) {
|
|
55
|
+
// implicitly bound: the threads layout assigns element.workflow off
|
|
56
|
+
// the item binding — keep whatever is (or will be) assigned
|
|
57
|
+
return this._workflow;
|
|
58
|
+
}
|
|
59
|
+
const container = this._getParentContainer();
|
|
60
|
+
const workflow = container && container.workflow;
|
|
61
|
+
// the parent workflow hands out the item subworkflow; the parent binds
|
|
62
|
+
// its own workflow first (its connectedCallback resolves earlier), so
|
|
63
|
+
// it is normally present by now
|
|
64
|
+
return workflow && typeof workflow._getThreadWorkflow === 'function' ? workflow._getThreadWorkflow(threadId) : undefined;
|
|
65
|
+
}
|
|
66
|
+
_getParentContainer() {
|
|
67
|
+
try {
|
|
68
|
+
return this.parentNode ? (0, _utils.getContainer)(this.parentNode) : undefined;
|
|
69
|
+
} catch (_) {
|
|
70
|
+
return undefined; // not inside a container element
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
attributeChangedCallback(attr, oldValue, newValue) {
|
|
74
|
+
switch (attr) {
|
|
75
|
+
case ATTR_THREAD_ID:
|
|
76
|
+
this._handleThreadIdUpdate(oldValue, newValue);
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
super.attributeChangedCallback(attr, oldValue, newValue);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_handleThreadIdUpdate(oldValue, newValue) {
|
|
83
|
+
oldValue = oldValue || undefined; // null -> undefined
|
|
84
|
+
newValue = newValue || undefined;
|
|
85
|
+
if (oldValue === newValue || !this._client) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this._setWorkflow(this._getWorkflow(this._client));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.default = MisoThreadItemElement;
|
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "MisoComponentElement", {
|
|
|
21
21
|
return _misoComponent.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "MisoDeleteElement", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _misoDelete.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "MisoErrorElement", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -57,12 +63,24 @@ Object.defineProperty(exports, "MisoKeywordsElement", {
|
|
|
57
63
|
return _misoKeywords.default;
|
|
58
64
|
}
|
|
59
65
|
});
|
|
66
|
+
Object.defineProperty(exports, "MisoMessagesElement", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _misoMessages.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
60
72
|
Object.defineProperty(exports, "MisoMoreElement", {
|
|
61
73
|
enumerable: true,
|
|
62
74
|
get: function () {
|
|
63
75
|
return _misoMore.default;
|
|
64
76
|
}
|
|
65
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "MisoNewThreadElement", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _misoNewThread.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
66
84
|
Object.defineProperty(exports, "MisoProductsElement", {
|
|
67
85
|
enumerable: true,
|
|
68
86
|
get: function () {
|
|
@@ -105,6 +123,12 @@ Object.defineProperty(exports, "MisoRelatedResourcesElement", {
|
|
|
105
123
|
return _misoRelatedResources.default;
|
|
106
124
|
}
|
|
107
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "MisoRenameElement", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _misoRename.default;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
108
132
|
Object.defineProperty(exports, "MisoResultsElement", {
|
|
109
133
|
enumerable: true,
|
|
110
134
|
get: function () {
|
|
@@ -123,6 +147,24 @@ Object.defineProperty(exports, "MisoSourcesElement", {
|
|
|
123
147
|
return _misoSources.default;
|
|
124
148
|
}
|
|
125
149
|
});
|
|
150
|
+
Object.defineProperty(exports, "MisoSubscriptionElement", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _misoSubscription.default;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "MisoThreadsElement", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _misoThreads.default;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "MisoTitleElement", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _misoTitle.default;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
126
168
|
Object.defineProperty(exports, "MisoTotalElement", {
|
|
127
169
|
enumerable: true,
|
|
128
170
|
get: function () {
|
|
@@ -149,5 +191,12 @@ var _misoTotal = _interopRequireDefault(require("./miso-total.js"));
|
|
|
149
191
|
var _misoFacets = _interopRequireDefault(require("./miso-facets.js"));
|
|
150
192
|
var _misoMore = _interopRequireDefault(require("./miso-more.js"));
|
|
151
193
|
var _misoSort = _interopRequireDefault(require("./miso-sort.js"));
|
|
194
|
+
var _misoThreads = _interopRequireDefault(require("./miso-threads.js"));
|
|
195
|
+
var _misoNewThread = _interopRequireDefault(require("./miso-new-thread.js"));
|
|
196
|
+
var _misoTitle = _interopRequireDefault(require("./miso-title.js"));
|
|
197
|
+
var _misoRename = _interopRequireDefault(require("./miso-rename.js"));
|
|
198
|
+
var _misoDelete = _interopRequireDefault(require("./miso-delete.js"));
|
|
199
|
+
var _misoSubscription = _interopRequireDefault(require("./miso-subscription.js"));
|
|
200
|
+
var _misoMessages = _interopRequireDefault(require("./miso-messages.js"));
|
|
152
201
|
var _misoError = _interopRequireDefault(require("./miso-error.js"));
|
|
153
202
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoDeleteElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.DELETE
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-delete';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoDeleteElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoMessagesElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.MESSAGES
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-messages';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoMessagesElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoNewThreadElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.NEW_THREAD
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-new-thread';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoNewThreadElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoRenameElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.RENAME
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-rename';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoRenameElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoSubscriptionElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.SUBSCRIPTION
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-subscription';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoSubscriptionElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoThreadsElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.THREADS
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-threads';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoThreadsElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _misoComponent = _interopRequireDefault(require("./miso-component.js"));
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class MisoTitleElement extends _misoComponent.default {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
role: _constants.ROLE.TITLE
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static get tagName() {
|
|
17
|
+
return 'miso-title';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.default = MisoTitleElement;
|
|
@@ -13,7 +13,7 @@ var _dom = require("../../util/dom.js");
|
|
|
13
13
|
const _excluded = ["className", "templates", "autoplay"];
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
16
|
-
const TYPE =
|
|
16
|
+
const TYPE = _constants.LAYOUT_TYPE.AFFILIATION;
|
|
17
17
|
const DEFAULT_CLASSNAME = 'miso-affiliation';
|
|
18
18
|
function root(layout, state) {
|
|
19
19
|
const {
|
|
@@ -4,12 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _constants = require("../../constants.js");
|
|
7
8
|
var _template = _interopRequireDefault(require("../template.js"));
|
|
8
9
|
var _svgs = require("../svgs.js");
|
|
9
10
|
const _excluded = ["className", "templates"];
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
12
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
12
|
-
const TYPE =
|
|
13
|
+
const TYPE = _constants.LAYOUT_TYPE.BANNER;
|
|
13
14
|
const DEFAULT_CLASSNAME = 'miso-banner';
|
|
14
15
|
function root(layout) {
|
|
15
16
|
const {
|