mirror of https://github.com/zulip/zulip.git
js: Convert static/js/message_list_data.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
f9c4b5438e
commit
6ff28577cc
|
@ -127,7 +127,6 @@
|
|||
"globals": {
|
||||
"$": false,
|
||||
"Filter": false,
|
||||
"MessageListData": false,
|
||||
"MessageListView": false,
|
||||
"activity": false,
|
||||
"admin": false,
|
||||
|
|
|
@ -20,7 +20,6 @@ function MessageListView() {
|
|||
set_global("MessageListView", MessageListView);
|
||||
|
||||
const Filter = zrequire("Filter", "js/filter");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
const message_list = zrequire("message_list");
|
||||
const people = zrequire("people");
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ const narrow_state = set_global("narrow_state", {});
|
|||
const stream_data = set_global("stream_data", {});
|
||||
|
||||
const muting = zrequire("muting");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
zrequire("MessageListView", "js/message_list_view");
|
||||
const {MessageList} = zrequire("message_list");
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const muting = zrequire("muting");
|
|||
zrequire("unread");
|
||||
|
||||
zrequire("Filter", "js/filter");
|
||||
const MessageListData = zrequire("MessageListData", "js/message_list_data");
|
||||
const {MessageListData} = zrequire("MessageListData", "js/message_list_data");
|
||||
|
||||
set_global("page_params", {});
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ const {run_test} = require("../zjsunit/test");
|
|||
set_global("document", "document-stub");
|
||||
|
||||
const Filter = zrequire("Filter", "js/filter");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
const MessageListView = zrequire("MessageListView", "js/message_list_view");
|
||||
const message_list = zrequire("message_list");
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ set_global("resize", {
|
|||
});
|
||||
const stream_data = zrequire("stream_data");
|
||||
zrequire("Filter", "js/filter");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
zrequire("unread");
|
||||
const narrow = zrequire("narrow");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const {set_global, zrequire} = require("../zjsunit/namespace");
|
|||
const {run_test} = require("../zjsunit/test");
|
||||
|
||||
const Filter = zrequire("Filter", "js/filter");
|
||||
const MessageListData = zrequire("MessageListData", "js/message_list_data");
|
||||
const {MessageListData} = zrequire("MessageListData", "js/message_list_data");
|
||||
const narrow_state = zrequire("narrow_state");
|
||||
const narrow = zrequire("narrow");
|
||||
zrequire("stream_data");
|
||||
|
|
|
@ -20,7 +20,6 @@ const people = zrequire("people");
|
|||
const stream_color = zrequire("stream_color");
|
||||
const stream_data = zrequire("stream_data");
|
||||
zrequire("Filter", "js/filter");
|
||||
zrequire("MessageListData", "js/message_list_data");
|
||||
zrequire("MessageListView", "js/message_list_view");
|
||||
const message_list = zrequire("message_list");
|
||||
const settings_config = zrequire("settings_config");
|
||||
|
|
|
@ -44,7 +44,6 @@ import "../filter";
|
|||
import "../poll_widget";
|
||||
import "../widgetize";
|
||||
import "../submessage";
|
||||
import "../message_list_data";
|
||||
import "../message_list_view";
|
||||
import "../message_list";
|
||||
import "../message_live_update";
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// to TS.
|
||||
|
||||
declare let Filter: any;
|
||||
declare let MessageListData: any;
|
||||
declare let MessageListView: any;
|
||||
declare let activity: any;
|
||||
declare let admin: any;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
const autosize = require("autosize");
|
||||
|
||||
const {MessageListData} = require("./message_list_data");
|
||||
|
||||
exports.narrowed = undefined;
|
||||
exports.set_narrowed = function (value) {
|
||||
exports.narrowed = value;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
"use strict";
|
||||
import _ from "lodash";
|
||||
|
||||
const _ = require("lodash");
|
||||
import {FetchStatus} from "./fetch_status";
|
||||
import * as util from "./util";
|
||||
|
||||
const {FetchStatus} = require("./fetch_status");
|
||||
const util = require("./util");
|
||||
|
||||
class MessageListData {
|
||||
export class MessageListData {
|
||||
constructor(opts) {
|
||||
this.excludes_muted_topics = opts.excludes_muted_topics;
|
||||
if (this.excludes_muted_topics) {
|
||||
|
@ -521,7 +519,3 @@ class MessageListData {
|
|||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageListData;
|
||||
|
||||
window.MessageListData = MessageListData;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const {MessageListData} = require("./message_list_data");
|
||||
const people = require("./people");
|
||||
const search_pill = require("./search_pill");
|
||||
const topic_generator = require("./topic_generator");
|
||||
|
|
Loading…
Reference in New Issue