Merge branch 'master' into 1257_notifications-prefer-probably-over-maybe
This commit is contained in:
commit
ce30b64b71
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2017
|
||||
"ecmaVersion": 2017,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 4.1.0 (Unreleased)
|
||||
|
||||
- Use [Lerna](https://lernajs.io/) to create the @converse/headless package
|
||||
- Use ES2015 modules instead of UMD.
|
||||
- #1257: Prefer 'probably' over 'maybe' when evaluating audio play support.
|
||||
|
||||
## 4.0.3 (2018-10-22)
|
||||
|
|
8
Makefile
8
Makefile
|
@ -157,12 +157,16 @@ watchcss: dev
|
|||
$(SASS) --watch -I $(BOURBON) -I $(BOOTSTRAP) sass:css
|
||||
|
||||
.PHONY: watchjs
|
||||
watchjs: dev
|
||||
watchjs: dev dist/converse-headless.js
|
||||
./node_modules/.bin/npx webpack --mode=development --watch
|
||||
|
||||
.PHONY: watchjsheadless
|
||||
watchjsheadless: dev
|
||||
./node_modules/.bin/npx webpack --mode=development --watch --type=headless
|
||||
|
||||
.PHONY: watch
|
||||
watch: dev
|
||||
make -j 2 watchjs watchcss
|
||||
make -j 3 watchcss watchjsheadless watchjs
|
||||
|
||||
.PHONY: logo
|
||||
logo: logo/conversejs-transparent16.png \
|
||||
|
|
2433
dist/converse.js
vendored
2433
dist/converse.js
vendored
File diff suppressed because it is too large
Load Diff
|
@ -1555,10 +1555,9 @@
|
|||
it("properly handles notification that a room has been destroyed",
|
||||
mock.initConverseWithPromises(
|
||||
null, ['rosterGroupsFetched'], {},
|
||||
function (done, _converse) {
|
||||
async function (done, _converse) {
|
||||
|
||||
test_utils.openChatRoomViaModal(_converse, 'problematic@muc.localhost', 'dummy')
|
||||
.then(function () {
|
||||
await test_utils.openChatRoomViaModal(_converse, 'problematic@muc.localhost', 'dummy')
|
||||
const presence = $pres().attrs({
|
||||
from:'problematic@muc.localhost',
|
||||
id:'n13mt3l',
|
||||
|
@ -1582,7 +1581,6 @@
|
|||
expect(view.el.querySelector('.chatroom-body .moved-link').textContent.trim())
|
||||
.toBe(`other-room@chat.jabberfr.org`);
|
||||
done();
|
||||
}).catch(_.partial(console.error, _));
|
||||
}));
|
||||
|
||||
it("will use the user's reserved nickname, if it exists",
|
||||
|
|
|
@ -15,27 +15,23 @@
|
|||
null, ['rosterGroupsFetched', 'chatBoxesFetched'],
|
||||
{ allow_bookmarks: false // Makes testing easier, otherwise we
|
||||
// have to mock stanza traffic.
|
||||
},
|
||||
function (done, _converse) {
|
||||
}, async function (done, _converse) {
|
||||
|
||||
test_utils.openControlBox();
|
||||
const controlbox = _converse.chatboxviews.get('controlbox');
|
||||
let list = controlbox.el.querySelector('div.rooms-list-container');
|
||||
expect(_.includes(list.classList, 'hidden')).toBeTruthy();
|
||||
|
||||
let room_els;
|
||||
|
||||
test_utils.openChatRoom(_converse, 'room', 'conference.shakespeare.lit', 'JC')
|
||||
.then(() => {
|
||||
await test_utils.openChatRoom(_converse, 'room', 'conference.shakespeare.lit', 'JC');
|
||||
expect(_.isUndefined(_converse.rooms_list_view)).toBeFalsy();
|
||||
room_els = _converse.rooms_list_view.el.querySelectorAll(".open-room");
|
||||
let room_els = _converse.rooms_list_view.el.querySelectorAll(".open-room");
|
||||
expect(room_els.length).toBe(1);
|
||||
expect(room_els[0].innerText).toBe('room@conference.shakespeare.lit');
|
||||
return test_utils.openChatRoom(_converse, 'lounge', 'localhost', 'dummy');
|
||||
}).then(() => {
|
||||
await test_utils.openChatRoom(_converse, 'lounge', 'localhost', 'dummy');
|
||||
room_els = _converse.rooms_list_view.el.querySelectorAll(".open-room");
|
||||
expect(room_els.length).toBe(2);
|
||||
|
||||
var view = _converse.chatboxviews.get('room@conference.shakespeare.lit');
|
||||
let view = _converse.chatboxviews.get('room@conference.shakespeare.lit');
|
||||
view.close();
|
||||
room_els = _converse.rooms_list_view.el.querySelectorAll(".open-room");
|
||||
expect(room_els.length).toBe(1);
|
||||
|
@ -51,7 +47,6 @@
|
|||
list = controlbox.el.querySelector('div.rooms-list-container');
|
||||
expect(_.includes(list.classList, 'hidden')).toBeTruthy();
|
||||
done();
|
||||
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
|
||||
}
|
||||
));
|
||||
});
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
// This plugin started as a fork of Lea Verou's Awesomplete
|
||||
// https://leaverou.github.io/awesomplete/
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core"], factory);
|
||||
}(this, function (converse) {
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { _, Backbone } = converse.env,
|
||||
u = converse.env.utils;
|
||||
|
||||
|
||||
converse.plugins.add("converse-autocomplete", {
|
||||
|
||||
initialize () {
|
||||
const { _converse } = this;
|
||||
|
||||
|
@ -412,4 +412,3 @@
|
|||
_converse.AutoComplete = AutoComplete;
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -9,27 +9,18 @@
|
|||
/* This is a Converse.js plugin which add support for bookmarks specified
|
||||
* in XEP-0048.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"@converse/headless/converse-muc",
|
||||
"templates/chatroom_bookmark_form.html",
|
||||
"templates/chatroom_bookmark_toggle.html",
|
||||
"templates/bookmark.html",
|
||||
"templates/bookmarks_list.html"
|
||||
],
|
||||
factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
muc,
|
||||
tpl_chatroom_bookmark_form,
|
||||
tpl_chatroom_bookmark_toggle,
|
||||
tpl_bookmark,
|
||||
tpl_bookmarks_list
|
||||
) {
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import muc from "@converse/headless/converse-muc";
|
||||
import tpl_bookmark from "templates/bookmark.html";
|
||||
import tpl_bookmarks_list from "templates/bookmarks_list.html"
|
||||
import tpl_chatroom_bookmark_form from "templates/chatroom_bookmark_form.html";
|
||||
import tpl_chatroom_bookmark_toggle from "templates/chatroom_bookmark_toggle.html";
|
||||
|
||||
const { Backbone, Promise, Strophe, $iq, b64_sha1, sizzle, _ } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
||||
converse.plugins.add('converse-bookmarks', {
|
||||
|
||||
/* Plugin dependencies are other plugins which might be
|
||||
|
@ -42,7 +33,7 @@
|
|||
*
|
||||
* NB: These plugins need to have already been loaded via require.js.
|
||||
*/
|
||||
dependencies: ["converse-chatboxes", "@converse/headless/converse-muc", "converse-muc-views"],
|
||||
dependencies: ["converse-chatboxes", "converse-muc", "converse-muc-views"],
|
||||
|
||||
overrides: {
|
||||
// Overrides mentioned here will be picked up by converse.js's
|
||||
|
@ -584,4 +575,3 @@
|
|||
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core"], factory);
|
||||
}(this, function (converse) {
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { Strophe, $build, _, b64_sha1 } = converse.env;
|
||||
|
||||
|
@ -60,4 +59,3 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,16 +4,11 @@
|
|||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"@converse/headless/converse-core",
|
||||
"templates/chatboxes.html",
|
||||
"@converse/headless/converse-chatboxes",
|
||||
"backbone.nativeview",
|
||||
"backbone.overview"
|
||||
], factory);
|
||||
}(this, function (converse, tpl_chatboxes) {
|
||||
"use strict";
|
||||
import "@converse/headless/converse-chatboxes";
|
||||
import "backbone.nativeview";
|
||||
import "backbone.overview";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_chatboxes from "templates/chatboxes.html";
|
||||
|
||||
const { Backbone, _ } = converse.env;
|
||||
|
||||
|
@ -175,5 +170,3 @@
|
|||
/************************ END Event Handlers ************************/
|
||||
}
|
||||
});
|
||||
return converse;
|
||||
}));
|
||||
|
|
|
@ -1,58 +1,35 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"utils/emoji",
|
||||
"@converse/headless/converse-core",
|
||||
"bootstrap",
|
||||
"twemoji",
|
||||
"xss",
|
||||
"templates/chatbox.html",
|
||||
"templates/chatbox_head.html",
|
||||
"templates/chatbox_message_form.html",
|
||||
"templates/emojis.html",
|
||||
"templates/error_message.html",
|
||||
"templates/help_message.html",
|
||||
"templates/info.html",
|
||||
"templates/new_day.html",
|
||||
"templates/user_details_modal.html",
|
||||
"templates/toolbar_fileupload.html",
|
||||
"templates/spinner.html",
|
||||
"templates/spoiler_button.html",
|
||||
"templates/status_message.html",
|
||||
"templates/toolbar.html",
|
||||
"converse-modal",
|
||||
"converse-chatboxviews",
|
||||
"converse-message-view"
|
||||
], factory);
|
||||
}(this, function (
|
||||
u,
|
||||
converse,
|
||||
bootstrap,
|
||||
twemoji,
|
||||
xss,
|
||||
tpl_chatbox,
|
||||
tpl_chatbox_head,
|
||||
tpl_chatbox_message_form,
|
||||
tpl_emojis,
|
||||
tpl_error_message,
|
||||
tpl_help_message,
|
||||
tpl_info,
|
||||
tpl_new_day,
|
||||
tpl_user_details_modal,
|
||||
tpl_toolbar_fileupload,
|
||||
tpl_spinner,
|
||||
tpl_spoiler_button,
|
||||
tpl_status_message,
|
||||
tpl_toolbar
|
||||
) {
|
||||
"use strict";
|
||||
import "converse-chatboxviews";
|
||||
import "converse-message-view";
|
||||
import "converse-modal";
|
||||
import * as twemoji from "twemoji";
|
||||
import bootstrap from "bootstrap";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_chatbox from "templates/chatbox.html";
|
||||
import tpl_chatbox_head from "templates/chatbox_head.html";
|
||||
import tpl_chatbox_message_form from "templates/chatbox_message_form.html";
|
||||
import tpl_emojis from "templates/emojis.html";
|
||||
import tpl_error_message from "templates/error_message.html";
|
||||
import tpl_help_message from "templates/help_message.html";
|
||||
import tpl_info from "templates/info.html";
|
||||
import tpl_new_day from "templates/new_day.html";
|
||||
import tpl_spinner from "templates/spinner.html";
|
||||
import tpl_spoiler_button from "templates/spoiler_button.html";
|
||||
import tpl_status_message from "templates/status_message.html";
|
||||
import tpl_toolbar from "templates/toolbar.html";
|
||||
import tpl_toolbar_fileupload from "templates/toolbar_fileupload.html";
|
||||
import tpl_user_details_modal from "templates/user_details_modal.html";
|
||||
import u from "utils/emoji";
|
||||
import xss from "xss";
|
||||
|
||||
const { $msg, Backbone, Promise, Strophe, _, b64_sha1, f, sizzle, moment } = converse.env;
|
||||
|
||||
|
||||
converse.plugins.add('converse-chatview', {
|
||||
/* Plugin dependencies are other plugins which might be
|
||||
* overridden or relied upon, and therefore need to be loaded before
|
||||
|
@ -1341,6 +1318,3 @@
|
|||
/************************ END API ************************/
|
||||
}
|
||||
});
|
||||
|
||||
return converse;
|
||||
}));
|
||||
|
|
|
@ -6,30 +6,17 @@
|
|||
//
|
||||
/*global define */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"bootstrap",
|
||||
"formdata-polyfill",
|
||||
"@converse/headless/lodash.fp",
|
||||
"templates/converse_brand_heading.html",
|
||||
"templates/controlbox.html",
|
||||
"templates/controlbox_toggle.html",
|
||||
"templates/login_panel.html",
|
||||
"converse-chatview",
|
||||
"converse-rosterview",
|
||||
"converse-profile"
|
||||
], factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
bootstrap,
|
||||
_FormData,
|
||||
fp,
|
||||
tpl_brand_heading,
|
||||
tpl_controlbox,
|
||||
tpl_controlbox_toggle,
|
||||
tpl_login_panel
|
||||
) {
|
||||
"use strict";
|
||||
import "converse-chatview";
|
||||
import "converse-profile";
|
||||
import "converse-rosterview";
|
||||
import _FormData from "formdata-polyfill";
|
||||
import bootstrap from "bootstrap";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import fp from "@converse/headless/lodash.fp";
|
||||
import tpl_brand_heading from "templates/converse_brand_heading.html";
|
||||
import tpl_controlbox from "templates/controlbox.html";
|
||||
import tpl_controlbox_toggle from "templates/controlbox_toggle.html";
|
||||
import tpl_login_panel from "templates/login_panel.html";
|
||||
|
||||
const CHATBOX_TYPE = 'chatbox';
|
||||
const { Strophe, Backbone, Promise, _, moment } = converse.env;
|
||||
|
@ -625,4 +612,3 @@
|
|||
_converse.on('will-reconnect', disconnect);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -6,14 +6,11 @@
|
|||
//
|
||||
/*global define, window, document */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"templates/dragresize.html",
|
||||
"converse-chatview",
|
||||
"converse-controlbox"
|
||||
], factory);
|
||||
}(this, function (converse, tpl_dragresize) {
|
||||
"use strict";
|
||||
import "converse-chatview";
|
||||
import "converse-controlbox";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_dragresize from "templates/dragresize.html";
|
||||
|
||||
const { _ } = converse.env;
|
||||
|
||||
function renderDragResizeHandles (_converse, view) {
|
||||
|
@ -368,4 +365,4 @@
|
|||
};
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core", "@converse/headless/converse-muc"], factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
import "@converse/headless/converse-muc";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { Backbone, _ } = converse.env;
|
||||
|
||||
converse.plugins.add('converse-embedded', {
|
||||
|
@ -37,4 +36,3 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,18 +4,14 @@
|
|||
// Copyright (c) JC Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"templates/inverse_brand_heading.html",
|
||||
"converse-chatview",
|
||||
"converse-controlbox",
|
||||
"@converse/headless/converse-muc",
|
||||
"converse-singleton"
|
||||
], factory);
|
||||
}(this, function (converse, tpl_brand_heading) {
|
||||
"use strict";
|
||||
import "@converse/headless/converse-muc";
|
||||
import "converse-chatview";
|
||||
import "converse-controlbox";
|
||||
import "converse-singleton";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_brand_heading from "templates/inverse_brand_heading.html";
|
||||
|
||||
const { Strophe, _ } = converse.env;
|
||||
|
||||
converse.plugins.add('converse-fullscreen', {
|
||||
|
@ -57,4 +53,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -3,19 +3,14 @@
|
|||
//
|
||||
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define */
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"@converse/headless/converse-core",
|
||||
"templates/chatbox.html",
|
||||
"converse-chatview",
|
||||
], factory);
|
||||
}(this, function (converse, tpl_chatbox) {
|
||||
"use strict";
|
||||
import "converse-chatview";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_chatbox from "templates/chatbox.html";
|
||||
|
||||
const { _, utils } = converse.env;
|
||||
|
||||
|
||||
converse.plugins.add('converse-headline', {
|
||||
/* Plugin dependencies are other plugins which might be
|
||||
* overridden or relied upon, and therefore need to be loaded before
|
||||
|
@ -153,4 +148,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,32 +4,17 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"./utils/html",
|
||||
"utils/emoji",
|
||||
"@converse/headless/converse-core",
|
||||
"xss",
|
||||
"filesize",
|
||||
"templates/csn.html",
|
||||
"templates/file_progress.html",
|
||||
"templates/info.html",
|
||||
"templates/message.html",
|
||||
"templates/message_versions_modal.html",
|
||||
], factory);
|
||||
}(this, function (
|
||||
html,
|
||||
u,
|
||||
converse,
|
||||
xss,
|
||||
filesize,
|
||||
tpl_csn,
|
||||
tpl_file_progress,
|
||||
tpl_info,
|
||||
tpl_message,
|
||||
tpl_message_versions_modal
|
||||
) {
|
||||
"use strict";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import filesize from "filesize";
|
||||
import html from "./utils/html";
|
||||
import tpl_csn from "templates/csn.html";
|
||||
import tpl_file_progress from "templates/file_progress.html";
|
||||
import tpl_info from "templates/info.html";
|
||||
import tpl_message from "templates/message.html";
|
||||
import tpl_message_versions_modal from "templates/message_versions_modal.html";
|
||||
import u from "utils/emoji";
|
||||
import xss from "xss";
|
||||
|
||||
const { Backbone, _, moment } = converse.env;
|
||||
|
||||
|
||||
|
@ -272,5 +257,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
return converse;
|
||||
}));
|
||||
|
|
|
@ -1,27 +1,16 @@
|
|||
// Converse.js (A browser based XMPP chat client)
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define, window, document */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"templates/chatbox_minimize.html",
|
||||
"templates/toggle_chats.html",
|
||||
"templates/trimmed_chat.html",
|
||||
"templates/chats_panel.html",
|
||||
"converse-chatview"
|
||||
], factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
tpl_chatbox_minimize,
|
||||
tpl_toggle_chats,
|
||||
tpl_trimmed_chat,
|
||||
tpl_chats_panel
|
||||
) {
|
||||
"use strict";
|
||||
import "converse-chatview";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_chatbox_minimize from "templates/chatbox_minimize.html";
|
||||
import tpl_chats_panel from "templates/chats_panel.html";
|
||||
import tpl_toggle_chats from "templates/toggle_chats.html";
|
||||
import tpl_trimmed_chat from "templates/trimmed_chat.html";
|
||||
|
||||
|
||||
const { _ , Backbone, Promise, Strophe, b64_sha1, moment } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -39,7 +28,7 @@
|
|||
*
|
||||
* NB: These plugins need to have already been loaded via require.js.
|
||||
*/
|
||||
dependencies: ["converse-chatview", "converse-controlbox", "@converse/headless/converse-muc", "converse-muc-views", "converse-headline"],
|
||||
dependencies: ["converse-chatview", "converse-controlbox", "converse-muc", "converse-muc-views", "converse-headline"],
|
||||
|
||||
enabled (_converse) {
|
||||
return _converse.view_mode == 'overlayed';
|
||||
|
@ -549,4 +538,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([
|
||||
"@converse/headless/converse-core",
|
||||
"templates/alert_modal.html",
|
||||
"bootstrap",
|
||||
"backbone.vdomview"
|
||||
], factory);
|
||||
}
|
||||
}(this, function (converse, tpl_alert_modal, bootstrap) {
|
||||
"use strict";
|
||||
import "backbone.vdomview";
|
||||
import bootstrap from "bootstrap";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_alert_modal from "templates/alert_modal.html";
|
||||
|
||||
const { Strophe, Backbone, _ } = converse.env;
|
||||
|
||||
|
||||
converse.plugins.add('converse-modal', {
|
||||
|
||||
initialize () {
|
||||
|
@ -114,4 +108,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -4,65 +4,34 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"@converse/headless/converse-core",
|
||||
"formdata-polyfill",
|
||||
"utils/muc",
|
||||
"xss",
|
||||
"templates/add_chatroom_modal.html",
|
||||
"templates/chatarea.html",
|
||||
"templates/chatroom.html",
|
||||
"templates/chatroom_details_modal.html",
|
||||
"templates/chatroom_destroyed.html",
|
||||
"templates/chatroom_disconnect.html",
|
||||
"templates/chatroom_features.html",
|
||||
"templates/chatroom_form.html",
|
||||
"templates/chatroom_head.html",
|
||||
"templates/chatroom_invite.html",
|
||||
"templates/chatroom_nickname_form.html",
|
||||
"templates/chatroom_password_form.html",
|
||||
"templates/chatroom_sidebar.html",
|
||||
"templates/info.html",
|
||||
"templates/list_chatrooms_modal.html",
|
||||
"templates/occupant.html",
|
||||
"templates/room_description.html",
|
||||
"templates/room_item.html",
|
||||
"templates/room_panel.html",
|
||||
"templates/rooms_results.html",
|
||||
"templates/spinner.html",
|
||||
"awesomplete",
|
||||
"converse-modal"
|
||||
], factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
_FormData,
|
||||
muc_utils,
|
||||
xss,
|
||||
tpl_add_chatroom_modal,
|
||||
tpl_chatarea,
|
||||
tpl_chatroom,
|
||||
tpl_chatroom_details_modal,
|
||||
tpl_chatroom_destroyed,
|
||||
tpl_chatroom_disconnect,
|
||||
tpl_chatroom_features,
|
||||
tpl_chatroom_form,
|
||||
tpl_chatroom_head,
|
||||
tpl_chatroom_invite,
|
||||
tpl_chatroom_nickname_form,
|
||||
tpl_chatroom_password_form,
|
||||
tpl_chatroom_sidebar,
|
||||
tpl_info,
|
||||
tpl_list_chatrooms_modal,
|
||||
tpl_occupant,
|
||||
tpl_room_description,
|
||||
tpl_room_item,
|
||||
tpl_room_panel,
|
||||
tpl_rooms_results,
|
||||
tpl_spinner,
|
||||
Awesomplete
|
||||
) {
|
||||
"use strict";
|
||||
import "converse-modal";
|
||||
import Awesomplete from "awesomplete";
|
||||
import _FormData from "formdata-polyfill";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import muc_utils from "utils/muc";
|
||||
import tpl_add_chatroom_modal from "templates/add_chatroom_modal.html";
|
||||
import tpl_chatarea from "templates/chatarea.html";
|
||||
import tpl_chatroom from "templates/chatroom.html";
|
||||
import tpl_chatroom_destroyed from "templates/chatroom_destroyed.html";
|
||||
import tpl_chatroom_details_modal from "templates/chatroom_details_modal.html";
|
||||
import tpl_chatroom_disconnect from "templates/chatroom_disconnect.html";
|
||||
import tpl_chatroom_features from "templates/chatroom_features.html";
|
||||
import tpl_chatroom_form from "templates/chatroom_form.html";
|
||||
import tpl_chatroom_head from "templates/chatroom_head.html";
|
||||
import tpl_chatroom_invite from "templates/chatroom_invite.html";
|
||||
import tpl_chatroom_nickname_form from "templates/chatroom_nickname_form.html";
|
||||
import tpl_chatroom_password_form from "templates/chatroom_password_form.html";
|
||||
import tpl_chatroom_sidebar from "templates/chatroom_sidebar.html";
|
||||
import tpl_info from "templates/info.html";
|
||||
import tpl_list_chatrooms_modal from "templates/list_chatrooms_modal.html";
|
||||
import tpl_occupant from "templates/occupant.html";
|
||||
import tpl_room_description from "templates/room_description.html";
|
||||
import tpl_room_item from "templates/room_item.html";
|
||||
import tpl_room_panel from "templates/room_panel.html";
|
||||
import tpl_rooms_results from "templates/rooms_results.html";
|
||||
import tpl_spinner from "templates/spinner.html";
|
||||
import xss from "xss";
|
||||
|
||||
|
||||
const { Backbone, Promise, Strophe, b64_sha1, moment, f, sizzle, _, $build, $iq, $msg, $pres } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -2146,4 +2115,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
//
|
||||
/*global define */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core"], factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { Strophe, _, sizzle } = converse.env,
|
||||
u = converse.env.utils;
|
||||
|
||||
|
||||
converse.plugins.add('converse-notification', {
|
||||
|
||||
dependencies: ["converse-chatboxes"],
|
||||
|
@ -103,23 +102,22 @@
|
|||
_converse.isMessageToHiddenChat(message);
|
||||
};
|
||||
|
||||
|
||||
_converse.playSoundNotification = function () {
|
||||
/* Plays a sound to notify that a new message was recieved.
|
||||
*/
|
||||
// XXX Eventually this can be refactored to use Notification's sound
|
||||
// feature, but no browser currently supports it.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/notification/sound
|
||||
let audioOgg, audioMp3, canPlayOgg, canPlayMp3;
|
||||
if (_converse.play_sounds && !_.isUndefined(window.Audio)) {
|
||||
audioOgg = new Audio(_converse.sounds_path+"msg_received.ogg");
|
||||
canPlayOgg = audioOgg.canPlayType('audio/ogg');
|
||||
audioMp3 = new Audio(_converse.sounds_path+"msg_received.mp3");
|
||||
canPlayMp3 = audioMp3.canPlayType('audio/mp3');
|
||||
|
||||
// Prefer 'probably' over 'maybe'.
|
||||
const audioOgg = new Audio(_converse.sounds_path+"msg_received.ogg");
|
||||
const canPlayOgg = audioOgg.canPlayType('audio/ogg');
|
||||
if (canPlayOgg === 'probably') {
|
||||
audioOgg.play();
|
||||
} else if ( canPlayMp3 === 'probably' ) {
|
||||
return audioOgg.play();
|
||||
}
|
||||
const audioMp3 = new Audio(_converse.sounds_path+"msg_received.mp3");
|
||||
const canPlayMp3 = audioMp3.canPlayType('audio/mp3');
|
||||
if (canPlayMp3 === 'probably') {
|
||||
audioMp3.play();
|
||||
} else if (canPlayOgg === 'maybe') {
|
||||
audioOgg.play();
|
||||
|
@ -294,4 +292,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -4,22 +4,15 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as a module called "myplugin"
|
||||
define(["@converse/headless/converse-core", "templates/oauth_providers.html", "hellojs"], factory);
|
||||
} else {
|
||||
// Browser globals. If you're not using a module loader such as require.js,
|
||||
// then this line below executes. Make sure that your plugin's <script> tag
|
||||
// appears after the one from converse.js.
|
||||
factory(converse);
|
||||
}
|
||||
}(this, function (converse, tpl_oauth_providers, hello) {
|
||||
'use strict';
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import hello from "hellojs";
|
||||
import tpl_oauth_providers from "templates/oauth_providers.html";
|
||||
|
||||
const _ = converse.env._,
|
||||
Backbone = converse.env.Backbone,
|
||||
Strophe = converse.env.Strophe;
|
||||
|
||||
|
||||
// The following line registers your plugin.
|
||||
converse.plugins.add("converse-oauth", {
|
||||
|
||||
|
@ -143,4 +136,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
|
||||
/* global libsignal, ArrayBuffer, parseInt, crypto */
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"@converse/headless/converse-core",
|
||||
"templates/toolbar_omemo.html"
|
||||
], factory);
|
||||
}(this, function (converse, tpl_toolbar_omemo) {
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_toolbar_omemo from "templates/toolbar_omemo.html";
|
||||
|
||||
const { Backbone, Promise, Strophe, moment, sizzle, $iq, $msg, _, f, b64_sha1 } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -1050,4 +1046,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -6,29 +6,17 @@
|
|||
//
|
||||
/*global define */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"bootstrap",
|
||||
"formdata-polyfill",
|
||||
"templates/alert.html",
|
||||
"templates/chat_status_modal.html",
|
||||
"templates/profile_modal.html",
|
||||
"templates/profile_view.html",
|
||||
"templates/status_option.html",
|
||||
"@converse/headless/converse-vcard",
|
||||
"converse-modal"
|
||||
], factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
bootstrap,
|
||||
_FormData,
|
||||
tpl_alert,
|
||||
tpl_chat_status_modal,
|
||||
tpl_profile_modal,
|
||||
tpl_profile_view,
|
||||
tpl_status_option
|
||||
) {
|
||||
"use strict";
|
||||
import "@converse/headless/converse-vcard";
|
||||
import "converse-modal";
|
||||
import _FormData from "formdata-polyfill";
|
||||
import bootstrap from "bootstrap";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_alert from "templates/alert.html";
|
||||
import tpl_chat_status_modal from "templates/chat_status_modal.html";
|
||||
import tpl_profile_modal from "templates/profile_modal.html";
|
||||
import tpl_profile_view from "templates/profile_view.html";
|
||||
import tpl_status_option from "templates/status_option.html";
|
||||
|
||||
|
||||
const { Strophe, Backbone, Promise, utils, _, moment } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -273,4 +261,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
/* This is a Converse.js plugin which add support for registering
|
||||
* an "App Server" as defined in XEP-0357
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core"], factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
const { Strophe, $iq, _ } = converse.env;
|
||||
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { Strophe, $iq, _ } = converse.env;
|
||||
|
||||
Strophe.addNamespace('PUSH', 'urn:xmpp:push:0');
|
||||
|
||||
|
||||
|
@ -132,4 +131,4 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -9,31 +9,17 @@
|
|||
/* This is a Converse.js plugin which add support for in-band registration
|
||||
* as specified in XEP-0077.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["utils/form",
|
||||
"@converse/headless/converse-core",
|
||||
"templates/form_username.html",
|
||||
"templates/register_link.html",
|
||||
"templates/register_panel.html",
|
||||
"templates/registration_form.html",
|
||||
"templates/registration_request.html",
|
||||
"templates/form_input.html",
|
||||
"templates/spinner.html",
|
||||
"converse-controlbox"
|
||||
], factory);
|
||||
}(this, function (
|
||||
utils,
|
||||
converse,
|
||||
tpl_form_username,
|
||||
tpl_register_link,
|
||||
tpl_register_panel,
|
||||
tpl_registration_form,
|
||||
tpl_registration_request,
|
||||
tpl_form_input,
|
||||
tpl_spinner
|
||||
) {
|
||||
|
||||
"use strict";
|
||||
import "converse-controlbox";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_form_input from "templates/form_input.html";
|
||||
import tpl_form_username from "templates/form_username.html";
|
||||
import tpl_register_link from "templates/register_link.html";
|
||||
import tpl_register_panel from "templates/register_panel.html";
|
||||
import tpl_registration_form from "templates/registration_form.html";
|
||||
import tpl_registration_request from "templates/registration_request.html";
|
||||
import tpl_spinner from "templates/spinner.html";
|
||||
import utils from "utils/form";
|
||||
|
||||
// Strophe methods for building stanzas
|
||||
const { Strophe, Backbone, sizzle, $iq, _ } = converse.env;
|
||||
|
@ -51,6 +37,7 @@
|
|||
Strophe.Status.CONFLICT = i + 3;
|
||||
Strophe.Status.NOTACCEPTABLE = i + 5;
|
||||
|
||||
|
||||
converse.plugins.add('converse-register', {
|
||||
|
||||
'overrides': {
|
||||
|
@ -699,4 +686,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
// Converse.js (A browser based XMPP chat client)
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define */
|
||||
|
||||
/* This is a non-core Converse.js plugin which shows a list of currently open
|
||||
* rooms in the "Rooms Panel" of the ControlBox.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"@converse/headless/converse-muc",
|
||||
"templates/rooms_list.html",
|
||||
"templates/rooms_list_item.html"
|
||||
], factory);
|
||||
}(this, function (converse, muc, tpl_rooms_list, tpl_rooms_list_item) {
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import muc from "@converse/headless/converse-muc";
|
||||
import tpl_rooms_list from "templates/rooms_list.html";
|
||||
import tpl_rooms_list_item from "templates/rooms_list_item.html"
|
||||
|
||||
const { Backbone, Promise, Strophe, b64_sha1, sizzle, _ } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
||||
converse.plugins.add('converse-roomslist', {
|
||||
|
||||
/* Optional dependencies are other plugins which might be
|
||||
|
@ -33,7 +31,7 @@
|
|||
*
|
||||
* NB: These plugins need to have already been loaded via require.js.
|
||||
*/
|
||||
dependencies: ["converse-singleton", "converse-controlbox", "@converse/headless/converse-muc", "converse-bookmarks"],
|
||||
dependencies: ["converse-singleton", "converse-controlbox", "converse-muc", "converse-bookmarks"],
|
||||
|
||||
initialize () {
|
||||
/* The initialize function gets called as soon as the plugin is
|
||||
|
@ -286,4 +284,4 @@
|
|||
_converse.api.listen.on('reconnected', initRoomsListView);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core"], factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { Backbone, Promise, Strophe, $iq, $pres, b64_sha1, moment, sizzle, _ } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
@ -934,4 +932,4 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,38 +1,23 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["@converse/headless/converse-core",
|
||||
"formdata-polyfill",
|
||||
"templates/add_contact_modal.html",
|
||||
"templates/group_header.html",
|
||||
"templates/pending_contact.html",
|
||||
"templates/requesting_contact.html",
|
||||
"templates/roster.html",
|
||||
"templates/roster_filter.html",
|
||||
"templates/roster_item.html",
|
||||
"templates/search_contact.html",
|
||||
"awesomplete",
|
||||
"@converse/headless/converse-chatboxes",
|
||||
"converse-modal"
|
||||
], factory);
|
||||
}(this, function (
|
||||
converse,
|
||||
_FormData,
|
||||
tpl_add_contact_modal,
|
||||
tpl_group_header,
|
||||
tpl_pending_contact,
|
||||
tpl_requesting_contact,
|
||||
tpl_roster,
|
||||
tpl_roster_filter,
|
||||
tpl_roster_item,
|
||||
tpl_search_contact,
|
||||
Awesomplete
|
||||
) {
|
||||
"use strict";
|
||||
import "@converse/headless/converse-chatboxes";
|
||||
import "converse-modal";
|
||||
import Awesomplete from "awesomplete";
|
||||
import _FormData from "formdata-polyfill";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import tpl_add_contact_modal from "templates/add_contact_modal.html";
|
||||
import tpl_group_header from "templates/group_header.html";
|
||||
import tpl_pending_contact from "templates/pending_contact.html";
|
||||
import tpl_requesting_contact from "templates/requesting_contact.html";
|
||||
import tpl_roster from "templates/roster.html";
|
||||
import tpl_roster_filter from "templates/roster_filter.html";
|
||||
import tpl_roster_item from "templates/roster_item.html";
|
||||
import tpl_search_contact from "templates/search_contact.html";
|
||||
|
||||
const { Backbone, Strophe, $iq, b64_sha1, sizzle, _ } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
@ -1000,4 +985,4 @@
|
|||
_converse.api.listen.on('rosterReadyAfterReconnection', initRoster);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Converse.js
|
||||
// http://conversejs.org
|
||||
//
|
||||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
/* converse-singleton
|
||||
|
@ -13,14 +13,11 @@
|
|||
*
|
||||
* This plugin makes sense in mobile or fullscreen chat environments (as
|
||||
* configured by the `view_mode` setting).
|
||||
*
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(
|
||||
["@converse/headless/converse-core", "converse-chatview"],
|
||||
factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
|
||||
import "converse-chatview";
|
||||
import converse from "@converse/headless/converse-core";
|
||||
|
||||
const { _, Strophe } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
@ -115,4 +112,4 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
|
|
21
src/headless/3rdparty/lodash.fp.js
vendored
21
src/headless/3rdparty/lodash.fp.js
vendored
|
@ -1,3 +1,5 @@
|
|||
/*global module, exports, _ */
|
||||
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
|
@ -48,9 +50,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/******/ })([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
|
@ -71,7 +71,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
if (typeof _ == 'function' && typeof _.runInContext == 'function') {
|
||||
// XXX: Customization in order to be able to run both _ and fp in the
|
||||
// non-AMD usecase.
|
||||
fp = browserConvert(_.runInContext());
|
||||
window.fp = browserConvert(_.runInContext());
|
||||
}
|
||||
module.exports = browserConvert;
|
||||
|
||||
|
@ -227,8 +227,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
func = name;
|
||||
name = undefined;
|
||||
}
|
||||
if (func == null) {
|
||||
throw new TypeError;
|
||||
if (func === null) {
|
||||
throw new TypeError();
|
||||
}
|
||||
options || (options = {});
|
||||
|
||||
|
@ -433,11 +433,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
result = clone(Object(object)),
|
||||
nested = result;
|
||||
|
||||
while (nested != null && ++index < length) {
|
||||
while (nested !== null && ++index < length) {
|
||||
var key = path[index],
|
||||
value = nested[key];
|
||||
|
||||
if (value != null) {
|
||||
if (value !== null) {
|
||||
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
|
||||
}
|
||||
nested = nested[key];
|
||||
|
@ -934,6 +934,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
result = {};
|
||||
|
||||
for (var key in object) {
|
||||
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
||||
var value = object[key];
|
||||
if (hasOwnProperty.call(result, value)) {
|
||||
result[value].push(key);
|
||||
|
@ -941,6 +942,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
result[value] = [key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
|
||||
|
@ -1034,9 +1036,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
* @type {Object}
|
||||
*/
|
||||
module.exports = {};
|
||||
|
||||
|
||||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
|
|
|
@ -4,15 +4,10 @@
|
|||
// Copyright (c) 2012-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"./converse-core",
|
||||
"filesize",
|
||||
"./utils/form",
|
||||
"./utils/emoji"
|
||||
], factory);
|
||||
}(this, function (converse, filesize) {
|
||||
"use strict";
|
||||
import "./utils/emoji";
|
||||
import "./utils/form";
|
||||
import converse from "./converse-core";
|
||||
import filesize from "filesize";
|
||||
|
||||
const { $msg, Backbone, Promise, Strophe, b64_sha1, moment, sizzle, utils, _ } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -954,5 +949,3 @@
|
|||
/************************ END API ************************/
|
||||
}
|
||||
});
|
||||
return converse;
|
||||
}));
|
||||
|
|
|
@ -4,27 +4,24 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["sizzle",
|
||||
"es6-promise/dist/es6-promise.auto",
|
||||
"./lodash.noconflict",
|
||||
"./lodash.fp",
|
||||
"./polyfill",
|
||||
"./i18n",
|
||||
"./utils/core",
|
||||
"moment",
|
||||
"strophe.js",
|
||||
"pluggable.js/dist/pluggable",
|
||||
"./backbone.noconflict",
|
||||
"backbone.browserStorage"
|
||||
], factory);
|
||||
}(this, function (sizzle, Promise, _, f, polyfill, i18n, u, moment, Strophe, pluggable, Backbone) {
|
||||
"use strict";
|
||||
|
||||
import { $build, $iq, $msg, $pres, SHA1, Strophe } from "strophe.js";
|
||||
import Backbone from "./backbone.noconflict";
|
||||
import Promise from "es6-promise/dist/es6-promise.auto";
|
||||
import _ from "./lodash.noconflict";
|
||||
import browserStorage from "backbone.browserStorage";
|
||||
import f from "./lodash.fp";
|
||||
import i18n from "./i18n";
|
||||
import moment from "moment";
|
||||
import pluggable from "pluggable.js/dist/pluggable";
|
||||
import polyfill from "./polyfill";
|
||||
import sizzle from "sizzle";
|
||||
import u from "./utils/core";
|
||||
|
||||
|
||||
// Strophe globals
|
||||
const { $build, $iq, $msg, $pres } = Strophe;
|
||||
const b64_sha1 = Strophe.SHA1.b64_sha1;
|
||||
Strophe = Strophe.Strophe;
|
||||
const b64_sha1 = SHA1.b64_sha1;
|
||||
|
||||
// Add Strophe Namespaces
|
||||
Strophe.addNamespace('CARBONS', 'urn:xmpp:carbons:2');
|
||||
|
@ -1779,5 +1776,4 @@
|
|||
};
|
||||
window.converse = converse;
|
||||
window.dispatchEvent(new CustomEvent('converse-loaded'));
|
||||
return converse;
|
||||
}));
|
||||
export default converse;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
|
||||
/* This is a Converse plugin which add support for XEP-0030: Service Discovery */
|
||||
|
||||
(function (root, factory) {
|
||||
define(["./converse-core", "sizzle"], factory);
|
||||
}(this, function (converse, sizzle) {
|
||||
import converse from "./converse-core";
|
||||
import sizzle from "sizzle";
|
||||
|
||||
const { Backbone, Promise, Strophe, $iq, b64_sha1, utils, _, f } = converse.env;
|
||||
|
||||
|
@ -683,4 +682,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -8,14 +8,12 @@
|
|||
|
||||
// XEP-0059 Result Set Management
|
||||
|
||||
(function (root, factory) {
|
||||
define(["sizzle",
|
||||
"./converse-core",
|
||||
"./converse-disco",
|
||||
"strophejs-plugin-rsm"
|
||||
], factory);
|
||||
}(this, function (sizzle, converse) {
|
||||
"use strict";
|
||||
import "./converse-disco";
|
||||
import "strophejs-plugin-rsm";
|
||||
import converse from "./converse-core";
|
||||
import sizzle from "sizzle";
|
||||
|
||||
|
||||
const CHATROOMS_TYPE = 'chatroom';
|
||||
const { Promise, Strophe, $iq, _, moment } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
@ -593,4 +591,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,19 +4,14 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"./utils/form",
|
||||
"./converse-core",
|
||||
"./converse-disco",
|
||||
"backbone.overview/backbone.overview",
|
||||
"backbone.overview/backbone.orderedlistview",
|
||||
"backbone.vdomview",
|
||||
"./utils/muc",
|
||||
"./utils/emoji"
|
||||
], factory);
|
||||
}(this, function (u, converse) {
|
||||
"use strict";
|
||||
import "./converse-disco";
|
||||
import "./utils/emoji";
|
||||
import "./utils/muc";
|
||||
import "backbone.overview/backbone.orderedlistview";
|
||||
import "backbone.overview/backbone.overview";
|
||||
import "backbone.vdomview";
|
||||
import converse from "./converse-core";
|
||||
import u from "./utils/form";
|
||||
|
||||
const MUC_ROLE_WEIGHTS = {
|
||||
'moderator': 1,
|
||||
|
@ -1458,20 +1453,17 @@
|
|||
* true
|
||||
* );
|
||||
*/
|
||||
'open' (jids, attrs) {
|
||||
return new Promise((resolve, reject) => {
|
||||
_converse.api.waitUntil('chatBoxesFetched').then(() => {
|
||||
'open': async function (jids, attrs) {
|
||||
await _converse.api.waitUntil('chatBoxesFetched');
|
||||
if (_.isUndefined(jids)) {
|
||||
const err_msg = 'rooms.open: You need to provide at least one JID';
|
||||
_converse.log(err_msg, Strophe.LogLevel.ERROR);
|
||||
reject(new TypeError(err_msg));
|
||||
throw(new TypeError(err_msg));
|
||||
} else if (_.isString(jids)) {
|
||||
resolve(_converse.api.rooms.create(jids, attrs).trigger('show'));
|
||||
return _converse.api.rooms.create(jids, attrs).trigger('show');
|
||||
} else {
|
||||
resolve(_.map(jids, (jid) => _converse.api.rooms.create(jid, attrs).trigger('show')));
|
||||
return _.map(jids, (jid) => _converse.api.rooms.create(jid, attrs).trigger('show'));
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1525,4 +1517,3 @@
|
|||
/************************ END API ************************/
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
/* This is a Converse.js plugin which add support for application-level pings
|
||||
* as specified in XEP-0199 XMPP Ping.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
define(["./converse-core", "strophejs-plugin-ping"], factory);
|
||||
}(this, function (converse) {
|
||||
"use strict";
|
||||
|
||||
import "strophejs-plugin-ping";
|
||||
import converse from "./converse-core";
|
||||
|
||||
// Strophe methods for building stanzas
|
||||
const { Strophe, _ } = converse.env;
|
||||
|
||||
|
@ -91,4 +91,3 @@
|
|||
_converse.on('reconnected', onConnected);
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
// Copyright (c) 2013-2018, the Converse.js developers
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
|
||||
(function (root, factory) {
|
||||
define(["./converse-core", "./templates/vcard.html"], factory);
|
||||
}(this, function (converse, tpl_vcard) {
|
||||
"use strict";
|
||||
|
||||
import converse from "./converse-core";
|
||||
import tpl_vcard from "./templates/vcard.html";
|
||||
|
||||
const { Backbone, Promise, Strophe, _, $iq, $build, b64_sha1, moment, sizzle } = converse.env;
|
||||
const u = converse.env.utils;
|
||||
|
||||
|
@ -240,4 +240,3 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -3,52 +3,16 @@
|
|||
//
|
||||
// This is the utilities module.
|
||||
//
|
||||
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define, escape, window, Uint8Array */
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([
|
||||
"sizzle",
|
||||
"es6-promise/dist/es6-promise.auto",
|
||||
"../lodash.noconflict",
|
||||
"backbone",
|
||||
"strophe.js",
|
||||
], factory);
|
||||
} else {
|
||||
// Used by the mockups
|
||||
const Strophe = {
|
||||
'Strophe': root.Strophe,
|
||||
'$build': root.$build,
|
||||
'$iq': root.$iq,
|
||||
'$msg': root.$msg,
|
||||
'$pres': root.$pres,
|
||||
'SHA1': root.SHA1,
|
||||
'MD5': root.MD5,
|
||||
'b64_hmac_sha1': root.b64_hmac_sha1,
|
||||
'b64_sha1': root.b64_sha1,
|
||||
'str_hmac_sha1': root.str_hmac_sha1,
|
||||
'str_sha1': root.str_sha1
|
||||
};
|
||||
root.converse_utils = factory(
|
||||
root.sizzle,
|
||||
root.Promise,
|
||||
null,
|
||||
root._,
|
||||
root.Backbone,
|
||||
Strophe
|
||||
);
|
||||
}
|
||||
}(this, function (
|
||||
sizzle,
|
||||
Promise,
|
||||
_,
|
||||
Backbone,
|
||||
Strophe
|
||||
) {
|
||||
"use strict";
|
||||
Strophe = Strophe.Strophe;
|
||||
/*global escape, Uint8Array */
|
||||
|
||||
import Backbone from "backbone";
|
||||
import Promise from "es6-promise/dist/es6-promise.auto";
|
||||
import { Strophe } from "strophe.js";
|
||||
import _ from "../lodash.noconflict";
|
||||
import sizzle from "sizzle";
|
||||
|
||||
const u = {};
|
||||
|
||||
|
@ -475,5 +439,5 @@
|
|||
return v.toString(16);
|
||||
});
|
||||
};
|
||||
return u;
|
||||
}));
|
||||
|
||||
export default u;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,16 +5,10 @@
|
|||
//
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define */
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"../lodash.noconflict",
|
||||
"./core",
|
||||
"../templates/field.html"
|
||||
], factory);
|
||||
}(this, function (_, u, tpl_field) {
|
||||
"use strict";
|
||||
|
||||
import _ from "../lodash.noconflict";
|
||||
import tpl_field from "../templates/field.html";
|
||||
import u from "./core";
|
||||
|
||||
u.webForm2xForm = function (field) {
|
||||
/* Takes an HTML DOM and turns it into an XForm field.
|
||||
|
@ -39,5 +33,4 @@
|
|||
})
|
||||
);
|
||||
};
|
||||
return u;
|
||||
}));
|
||||
export default u;
|
||||
|
|
|
@ -3,17 +3,18 @@
|
|||
//
|
||||
// This is the utilities module.
|
||||
//
|
||||
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define, escape, Jed */
|
||||
(function (root, factory) {
|
||||
define(["../converse-core", "./core"], factory);
|
||||
}(this, function (converse, u) {
|
||||
"use strict";
|
||||
/*global escape, Jed */
|
||||
|
||||
|
||||
import converse from "@converse/headless/converse-core";
|
||||
import u from "./core";
|
||||
|
||||
const { Strophe, sizzle, _ } = converse.env;
|
||||
|
||||
|
||||
u.computeAffiliationsDelta = function computeAffiliationsDelta (exclude_existing, remove_absentees, new_list, old_list) {
|
||||
/* Given two lists of objects with 'jid', 'affiliation' and
|
||||
* 'reason' properties, return a new list containing
|
||||
|
@ -100,4 +101,4 @@
|
|||
}
|
||||
);
|
||||
};
|
||||
}));
|
||||
|
||||
|
|
|
@ -5,48 +5,24 @@
|
|||
//
|
||||
// Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
|
||||
// Licensed under the Mozilla Public License (MPLv2)
|
||||
//
|
||||
/*global define */
|
||||
(function (root, factory) {
|
||||
define([
|
||||
"sizzle",
|
||||
"../headless/lodash.noconflict",
|
||||
"../headless/utils/core",
|
||||
"urijs",
|
||||
"../templates/audio.html",
|
||||
"../headless/templates/field.html",
|
||||
"../templates/file.html",
|
||||
"../templates/form_captcha.html",
|
||||
"../templates/form_checkbox.html",
|
||||
"../templates/form_input.html",
|
||||
"../templates/form_select.html",
|
||||
"../templates/form_textarea.html",
|
||||
"../templates/form_url.html",
|
||||
"../templates/form_username.html",
|
||||
"../templates/image.html",
|
||||
"../templates/select_option.html",
|
||||
"../templates/video.html"
|
||||
], factory);
|
||||
}(this, function (
|
||||
sizzle,
|
||||
_,
|
||||
u,
|
||||
URI,
|
||||
tpl_audio,
|
||||
tpl_field,
|
||||
tpl_file,
|
||||
tpl_form_captcha,
|
||||
tpl_form_checkbox,
|
||||
tpl_form_input,
|
||||
tpl_form_select,
|
||||
tpl_form_textarea,
|
||||
tpl_form_url,
|
||||
tpl_form_username,
|
||||
tpl_image,
|
||||
tpl_select_option,
|
||||
tpl_video
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
import URI from "urijs";
|
||||
import _ from "../headless/lodash.noconflict";
|
||||
import sizzle from "sizzle";
|
||||
import tpl_audio from "../templates/audio.html";
|
||||
import tpl_field from "@converse/headless/templates/field.html";
|
||||
import tpl_file from "../templates/file.html";
|
||||
import tpl_form_captcha from "../templates/form_captcha.html";
|
||||
import tpl_form_checkbox from "../templates/form_checkbox.html";
|
||||
import tpl_form_input from "../templates/form_input.html";
|
||||
import tpl_form_select from "../templates/form_select.html";
|
||||
import tpl_form_textarea from "../templates/form_textarea.html";
|
||||
import tpl_form_url from "../templates/form_url.html";
|
||||
import tpl_form_username from "../templates/form_username.html";
|
||||
import tpl_image from "../templates/image.html";
|
||||
import tpl_select_option from "../templates/select_option.html";
|
||||
import tpl_video from "../templates/video.html";
|
||||
import u from "../headless/utils/core";
|
||||
|
||||
const URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g;
|
||||
|
||||
|
@ -639,5 +615,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
return u;
|
||||
}));
|
||||
export default u;
|
||||
|
|
|
@ -112,6 +112,8 @@
|
|||
modal.el.querySelector('input[name="chatroom"]').value = jid;
|
||||
modal.el.querySelector('input[name="nickname"]').value = nick;
|
||||
modal.el.querySelector('form input[type="submit"]').click();
|
||||
await utils.waitUntil(() => _converse.chatboxviews.get(jid), 1000);
|
||||
return _converse.chatboxviews.get(jid);
|
||||
};
|
||||
|
||||
utils.openChatRoom = function (_converse, room, server, nick) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user