web: Add explicit extensions to imports.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-11-11 18:59:37 -08:00 committed by Tim Abbott
parent 4e8d028c49
commit ec3177c834
507 changed files with 3767 additions and 3766 deletions

View File

@ -51,7 +51,7 @@ module.exports = {
], ],
"formatjs/no-id": "error", "formatjs/no-id": "error",
"guard-for-in": "error", "guard-for-in": "error",
"import/extensions": "error", "import/extensions": ["error", "ignorePackages"],
"import/first": "error", "import/first": "error",
"import/newline-after-import": "error", "import/newline-after-import": "error",
"import/no-cycle": ["error", {ignoreExternal: true}], "import/no-cycle": ["error", {ignoreExternal: true}],

View File

@ -1,5 +1,5 @@
"use strict"; "use strict";
const events = require("../../web/tests/lib/events"); const events = require("../../web/tests/lib/events.js");
console.info(JSON.stringify(events.fixtures, null, 4)); console.info(JSON.stringify(events.fixtures, null, 4));

View File

@ -11,6 +11,7 @@
"strict": true, "strict": true,
/* Modules */ /* Modules */
"allowImportingTsExtensions": true,
"moduleResolution": "node", "moduleResolution": "node",
"paths": { "paths": {
"*": ["./web/src/types/*"], "*": ["./web/src/types/*"],

View File

@ -64,7 +64,7 @@ export default class DebugRequirePlugin implements WebpackPluginInstance {
resolver.resolve( resolver.resolve(
{}, {},
__dirname, __dirname,
"./debug-require", "./debug-require.js",
{}, {},
(err?: Error | null, result?: string | false) => { (err?: Error | null, result?: string | false) => {
resolve(err ? false : result!); resolve(err ? false : result!);

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function submit_announcements_stream_settings(page: Page): Promise<void> { async function submit_announcements_stream_settings(page: Page): Promise<void> {
await page.waitForSelector('#org-notifications .save-button[data-status="unsaved"]', { await page.waitForSelector('#org-notifications .save-button[data-status="unsaved"]', {

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function check_compose_form_empty(page: Page): Promise<void> { async function check_compose_form_empty(page: Page): Promise<void> {
await common.check_compose_state(page, { await common.check_compose_state(page, {

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function copy_messages( async function copy_messages(
page: Page, page: Page,

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
// This will be the row of the custom profile field we add. // This will be the row of the custom profile field we add.
const profile_field_row = "#admin_profile_fields_table tr:nth-last-child(1)"; const profile_field_row = "#admin_profile_fields_table tr:nth-last-child(1)";

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function click_delete_and_return_last_msg_id(page: Page): Promise<string> { async function click_delete_and_return_last_msg_id(page: Page): Promise<string> {
const msg = (await page.$$(".message-list .message_row")).at(-1); const msg = (await page.$$(".message-list .message_row")).at(-1);

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function wait_for_drafts_to_disappear(page: Page): Promise<void> { async function wait_for_drafts_to_disappear(page: Page): Promise<void> {
await page.waitForSelector("#draft_overlay.show", {hidden: true}); await page.waitForSelector("#draft_overlay.show", {hidden: true});

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function trigger_edit_last_message(page: Page): Promise<void> { async function trigger_edit_last_message(page: Page): Promise<void> {
const msg = (await page.$$(".message-list .message_row")).at(-1); const msg = (await page.$$(".message-list .message_row")).at(-1);

View File

@ -9,7 +9,7 @@ import puppeteer from "puppeteer";
import StackFrame from "stackframe"; import StackFrame from "stackframe";
import StackTraceGPS from "stacktrace-gps"; import StackTraceGPS from "stacktrace-gps";
import {test_credentials} from "../../../var/puppeteer/test_credentials"; import {test_credentials} from "../../../var/puppeteer/test_credentials.js";
const root_dir = path.resolve(__dirname, "../../.."); const root_dir = path.resolve(__dirname, "../../..");
const puppeteer_dir = path.join(root_dir, "var/puppeteer"); const puppeteer_dir = path.join(root_dir, "var/puppeteer");

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function test_mention(page: Page): Promise<void> { async function test_mention(page: Page): Promise<void> {
await common.log_in(page); await common.log_in(page);

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function get_stream_li(page: Page, stream_name: string): Promise<string> { async function get_stream_li(page: Page, stream_name: string): Promise<string> {
const stream_id = await common.get_stream_id(page, stream_name); const stream_id = await common.get_stream_id(page, stream_name);

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function navigate_using_left_sidebar(page: Page, stream_name: string): Promise<void> { async function navigate_using_left_sidebar(page: Page, stream_name: string): Promise<void> {
console.log("Visiting #" + stream_name); console.log("Visiting #" + stream_name);

View File

@ -3,7 +3,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import {z} from "zod"; import {z} from "zod";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
const email = "alice@test.example.com"; const email = "alice@test.example.com";
const organization_name = "Awesome Organization"; const organization_name = "Awesome Organization";

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function test_add_linkifier(page: Page): Promise<void> { async function test_add_linkifier(page: Page): Promise<void> {
await page.waitForSelector(".admin-linkifier-form", {visible: true}); await page.waitForSelector(".admin-linkifier-form", {visible: true});

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
type Playground = { type Playground = {
playground_name: string; playground_name: string;

View File

@ -2,9 +2,9 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import {test_credentials} from "../../var/puppeteer/test_credentials"; import {test_credentials} from "../../var/puppeteer/test_credentials.js";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
const OUTGOING_WEBHOOK_BOT_TYPE = "3"; const OUTGOING_WEBHOOK_BOT_TYPE = "3";
const GENERIC_BOT_TYPE = "1"; const GENERIC_BOT_TYPE = "1";

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
const message = "test star"; const message = "test star";

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function user_row_selector(page: Page, name: string): Promise<string> { async function user_row_selector(page: Page, name: string): Promise<string> {
const user_id = await common.get_user_id_from_name(page, name); const user_id = await common.get_user_id_from_name(page, name);

View File

@ -1,6 +1,6 @@
import type {ElementHandle, Page} from "puppeteer"; import type {ElementHandle, Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function test_subscription_button(page: Page): Promise<void> { async function test_subscription_button(page: Page): Promise<void> {
const all_stream_selector = "[data-tab-key='all-streams']"; const all_stream_selector = "[data-tab-key='all-streams']";

View File

@ -2,7 +2,7 @@ import assert from "node:assert/strict";
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function navigate_to_user_list(page: Page): Promise<void> { async function navigate_to_user_list(page: Page): Promise<void> {
const menu_selector = "#settings-dropdown"; const menu_selector = "#settings-dropdown";

View File

@ -1,6 +1,6 @@
import type {Page} from "puppeteer"; import type {Page} from "puppeteer";
import * as common from "./lib/common"; import * as common from "./lib/common.ts";
async function open_set_user_status_modal(page: Page): Promise<void> { async function open_set_user_status_modal(page: Page): Promise<void> {
// We are clicking on the menu icon with the help of `waitForFunction` because the list // We are clicking on the menu icon with the help of `waitForFunction` because the list

View File

@ -2,7 +2,7 @@
const path = require("node:path"); const path = require("node:path");
const {media_breakpoints} = require("./src/css_variables"); const {media_breakpoints} = require("./src/css_variables.js");
const config = ({file}) => ({ const config = ({file}) => ({
plugins: [ plugins: [

View File

@ -4,10 +4,10 @@ import assert from "minimalistic-assert";
import render_about_zulip from "../templates/about_zulip.hbs"; import render_about_zulip from "../templates/about_zulip.hbs";
import * as browser_history from "./browser_history"; import * as browser_history from "./browser_history.ts";
import {show_copied_confirmation} from "./copied_tooltip"; import {show_copied_confirmation} from "./copied_tooltip.ts";
import * as overlays from "./overlays"; import * as overlays from "./overlays.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
export function launch(): void { export function launch(): void {
overlays.open_overlay({ overlays.open_overlay({

View File

@ -2,11 +2,11 @@ import $ from "jquery";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import {z} from "zod"; import {z} from "zod";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import {electron_bridge} from "./electron_bridge"; import {electron_bridge} from "./electron_bridge.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as presence from "./presence"; import * as presence from "./presence.ts";
import * as watchdog from "./watchdog"; import * as watchdog from "./watchdog.ts";
const post_presence_response_schema = z.object({ const post_presence_response_schema = z.object({
msg: z.string(), msg: z.string(),

View File

@ -4,23 +4,23 @@ import assert from "minimalistic-assert";
import render_empty_list_widget_for_list from "../templates/empty_list_widget_for_list.hbs"; import render_empty_list_widget_for_list from "../templates/empty_list_widget_for_list.hbs";
import * as activity from "./activity"; import * as activity from "./activity.ts";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as buddy_data from "./buddy_data"; import * as buddy_data from "./buddy_data.ts";
import {buddy_list} from "./buddy_list"; import {buddy_list} from "./buddy_list.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import {ListCursor} from "./list_cursor"; import {ListCursor} from "./list_cursor.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as pm_list from "./pm_list"; import * as pm_list from "./pm_list.ts";
import * as popovers from "./popovers"; import * as popovers from "./popovers.ts";
import * as presence from "./presence"; import * as presence from "./presence.ts";
import type {PresenceInfoFromEvent} from "./presence"; import type {PresenceInfoFromEvent} from "./presence.ts";
import * as sidebar_ui from "./sidebar_ui"; import * as sidebar_ui from "./sidebar_ui.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import type {FullUnreadCountsData} from "./unread"; import type {FullUnreadCountsData} from "./unread.ts";
import {UserSearch} from "./user_search"; import {UserSearch} from "./user_search.ts";
import * as util from "./util"; import * as util from "./util.ts";
export let user_cursor: ListCursor<number> | undefined; export let user_cursor: ListCursor<number> | undefined;
export let user_filter: UserSearch | undefined; export let user_filter: UserSearch | undefined;

View File

@ -1,17 +1,17 @@
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import * as add_subscribers_pill from "./add_subscribers_pill"; import * as add_subscribers_pill from "./add_subscribers_pill.ts";
import * as input_pill from "./input_pill"; import * as input_pill from "./input_pill.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import type {User} from "./people"; import type {User} from "./people.ts";
import * as stream_pill from "./stream_pill"; import * as stream_pill from "./stream_pill.ts";
import type {CombinedPill, CombinedPillContainer} from "./typeahead_helper"; import type {CombinedPill, CombinedPillContainer} from "./typeahead_helper.ts";
import * as user_group_components from "./user_group_components"; import * as user_group_components from "./user_group_components.ts";
import * as user_group_create_members_data from "./user_group_create_members_data"; import * as user_group_create_members_data from "./user_group_create_members_data.ts";
import * as user_group_pill from "./user_group_pill"; import * as user_group_pill from "./user_group_pill.ts";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups.ts";
import type {UserGroup} from "./user_groups"; import type {UserGroup} from "./user_groups.ts";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill.ts";
function get_pill_user_ids(pill_widget: CombinedPillContainer): number[] { function get_pill_user_ids(pill_widget: CombinedPillContainer): number[] {
const user_ids = user_pill.get_user_ids(pill_widget); const user_ids = user_pill.get_user_ids(pill_widget);

View File

@ -4,9 +4,9 @@ import type * as tippy from "tippy.js";
import render_left_sidebar_stream_setting_popover from "../templates/popovers/left_sidebar/left_sidebar_stream_setting_popover.hbs"; import render_left_sidebar_stream_setting_popover from "../templates/popovers/left_sidebar/left_sidebar_stream_setting_popover.hbs";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
export function initialize(): void { export function initialize(): void {
popover_menus.register_popover_menu("#streams_inline_icon", { popover_menus.register_popover_menu("#streams_inline_icon", {

View File

@ -2,17 +2,17 @@ import assert from "minimalistic-assert";
import render_input_pill from "../templates/input_pill.hbs"; import render_input_pill from "../templates/input_pill.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as input_pill from "./input_pill"; import * as input_pill from "./input_pill.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import type {User} from "./people"; import type {User} from "./people.ts";
import * as pill_typeahead from "./pill_typeahead"; import * as pill_typeahead from "./pill_typeahead.ts";
import * as stream_pill from "./stream_pill"; import * as stream_pill from "./stream_pill.ts";
import type {CombinedPill, CombinedPillContainer} from "./typeahead_helper"; import type {CombinedPill, CombinedPillContainer} from "./typeahead_helper.ts";
import * as user_group_pill from "./user_group_pill"; import * as user_group_pill from "./user_group_pill.ts";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups.ts";
import type {UserGroup} from "./user_groups"; import type {UserGroup} from "./user_groups.ts";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill.ts";
export function create_item_from_text( export function create_item_from_text(
text: string, text: string,

View File

@ -4,24 +4,24 @@ import * as tippy from "tippy.js";
import render_admin_tab from "../templates/settings/admin_tab.hbs"; import render_admin_tab from "../templates/settings/admin_tab.hbs";
import render_settings_organization_settings_tip from "../templates/settings/organization_settings_tip.hbs"; import render_settings_organization_settings_tip from "../templates/settings/organization_settings_tip.hbs";
import * as bot_data from "./bot_data"; import * as bot_data from "./bot_data.ts";
import * as demo_organizations_ui from "./demo_organizations_ui"; import * as demo_organizations_ui from "./demo_organizations_ui.ts";
import {$t, get_language_name, language_list} from "./i18n"; import {$t, get_language_name, language_list} from "./i18n.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as people from "./people"; import * as people from "./people.ts";
import {realm_user_settings_defaults} from "./realm_user_settings_defaults"; import {realm_user_settings_defaults} from "./realm_user_settings_defaults.ts";
import * as settings from "./settings"; import * as settings from "./settings.js";
import * as settings_bots from "./settings_bots"; import * as settings_bots from "./settings_bots.ts";
import * as settings_components from "./settings_components"; import * as settings_components from "./settings_components.ts";
import * as settings_config from "./settings_config"; import * as settings_config from "./settings_config.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import * as settings_invites from "./settings_invites"; import * as settings_invites from "./settings_invites.ts";
import * as settings_org from "./settings_org"; import * as settings_org from "./settings_org.ts";
import * as settings_panel_menu from "./settings_panel_menu"; import * as settings_panel_menu from "./settings_panel_menu.js";
import * as settings_sections from "./settings_sections"; import * as settings_sections from "./settings_sections.js";
import * as settings_toggle from "./settings_toggle"; import * as settings_toggle from "./settings_toggle.js";
import * as settings_users from "./settings_users"; import * as settings_users from "./settings_users.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
const admin_settings_label = { const admin_settings_label = {
// Organization profile // Organization profile

View File

@ -1,8 +1,8 @@
import _ from "lodash"; import _ from "lodash";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as people from "./people"; import * as people from "./people.ts";
import type {StateData} from "./state_data"; import type {StateData} from "./state_data.ts";
// For simplicity, we use a list for our internal // For simplicity, we use a list for our internal
// data, since that matches what the server sends us. // data, since that matches what the server sends us.

View File

@ -3,12 +3,12 @@ import $ from "jquery";
import render_add_alert_word from "../templates/settings/add_alert_word.hbs"; import render_add_alert_word from "../templates/settings/add_alert_word.hbs";
import render_alert_word_settings_item from "../templates/settings/alert_word_settings_item.hbs"; import render_alert_word_settings_item from "../templates/settings/alert_word_settings_item.hbs";
import * as alert_words from "./alert_words"; import * as alert_words from "./alert_words.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import {$t, $t_html} from "./i18n"; import {$t, $t_html} from "./i18n.ts";
import * as ListWidget from "./list_widget"; import * as ListWidget from "./list_widget.ts";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report.ts";
export let loaded = false; export let loaded = false;

View File

@ -1,5 +1,5 @@
import {Filter} from "./filter"; import {Filter} from "./filter.ts";
import {MessageListData} from "./message_list_data"; import {MessageListData} from "./message_list_data.ts";
export let all_messages_data = new MessageListData({ export let all_messages_data = new MessageListData({
excludes_muted_topics: false, excludes_muted_topics: false,

View File

@ -6,16 +6,16 @@ import render_confirm_delete_detached_attachments_modal from "../templates/confi
import render_settings_upload_space_stats from "../templates/settings/upload_space_stats.hbs"; import render_settings_upload_space_stats from "../templates/settings/upload_space_stats.hbs";
import render_uploaded_files_list from "../templates/settings/uploaded_files_list.hbs"; import render_uploaded_files_list from "../templates/settings/uploaded_files_list.hbs";
import {attachment_api_response_schema} from "./attachments"; import {attachment_api_response_schema} from "./attachments.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import {$t, $t_html} from "./i18n"; import {$t, $t_html} from "./i18n.ts";
import * as ListWidget from "./list_widget"; import * as ListWidget from "./list_widget.ts";
import * as loading from "./loading"; import * as loading from "./loading.ts";
import * as scroll_util from "./scroll_util"; import * as scroll_util from "./scroll_util.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
import * as timerender from "./timerender"; import * as timerender from "./timerender.ts";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report.ts";
type ServerAttachment = z.infer<typeof attachment_api_response_schema>["attachments"][number]; type ServerAttachment = z.infer<typeof attachment_api_response_schema>["attachments"][number];

View File

@ -1,7 +1,7 @@
import $ from "jquery"; import $ from "jquery";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as util from "./util"; import * as util from "./util.ts";
export function initialize(): void { export function initialize(): void {
update_notification_sound_source($("audio#user-notification-sound-audio"), user_settings); update_notification_sound_source($("audio#user-notification-sound-audio"), user_settings);

View File

@ -2,13 +2,13 @@ import $ from "jquery";
import render_confirm_delete_user_avatar from "../templates/confirm_dialog/confirm_delete_user_avatar.hbs"; import render_confirm_delete_user_avatar from "../templates/confirm_dialog/confirm_delete_user_avatar.hbs";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as confirm_dialog from "./confirm_dialog"; import * as confirm_dialog from "./confirm_dialog.ts";
import {$t_html} from "./i18n"; import {$t_html} from "./i18n.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
import * as upload_widget from "./upload_widget"; import * as upload_widget from "./upload_widget.ts";
import type {UploadFunction, UploadWidget} from "./upload_widget"; import type {UploadFunction, UploadWidget} from "./upload_widget.ts";
export function build_bot_create_widget(): UploadWidget { export function build_bot_create_widget(): UploadWidget {
// We have to do strange gyrations with the file input to clear it, // We have to do strange gyrations with the file input to clear it,

View File

@ -1,6 +1,6 @@
import {z} from "zod"; import {z} from "zod";
import {narrow_term_schema, state_data_schema} from "./state_data"; import {narrow_term_schema, state_data_schema} from "./state_data.ts";
const t1 = performance.now(); const t1 = performance.now();

View File

@ -1,9 +1,9 @@
import $ from "jquery"; import $ from "jquery";
import {z} from "zod"; import {z} from "zod";
import * as portico_modals from "../portico/portico_modals"; import * as portico_modals from "../portico/portico_modals.ts";
import * as helpers from "./helpers"; import * as helpers from "./helpers.ts";
const billing_frequency_schema = z.enum(["Monthly", "Annual"]); const billing_frequency_schema = z.enum(["Monthly", "Annual"]);
const billing_base_url = $("#billing-page").attr("data-billing-base-url")!; const billing_base_url = $("#billing-page").attr("data-billing-base-url")!;

View File

@ -1,9 +1,9 @@
import $ from "jquery"; import $ from "jquery";
import {z} from "zod"; import {z} from "zod";
import * as loading from "../loading"; import * as loading from "../loading.ts";
import * as helpers from "./helpers"; import * as helpers from "./helpers.ts";
const billing_base_url = $("#data").attr("data-billing-base-url")!; const billing_base_url = $("#data").attr("data-billing-base-url")!;

View File

@ -1,8 +1,8 @@
import $ from "jquery"; import $ from "jquery";
import {z} from "zod"; import {z} from "zod";
import * as loading from "../loading"; import * as loading from "../loading.ts";
import * as util from "../util"; import * as util from "../util.ts";
export type FormDataObject = Record<string, string>; export type FormDataObject = Record<string, string>;

View File

@ -1,6 +1,6 @@
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import {page_params as base_page_params} from "../base_page_params"; import {page_params as base_page_params} from "../base_page_params.ts";
assert(base_page_params.page_type === "upgrade"); assert(base_page_params.page_type === "upgrade");

View File

@ -2,9 +2,9 @@ import $ from "jquery";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import {z} from "zod"; import {z} from "zod";
import {the} from "../util"; import {the} from "../util.ts";
import * as helpers from "./helpers"; import * as helpers from "./helpers.ts";
const is_remotely_hosted = $("#sponsorship-form").attr("data-is-remotely-hosted") === "True"; const is_remotely_hosted = $("#sponsorship-form").attr("data-is-remotely-hosted") === "True";

View File

@ -1,12 +1,12 @@
import $ from "jquery"; import $ from "jquery";
import {z} from "zod"; import {z} from "zod";
import {localstorage} from "../localstorage"; import {localstorage} from "../localstorage.ts";
import * as portico_modals from "../portico/portico_modals"; import * as portico_modals from "../portico/portico_modals.ts";
import * as helpers from "./helpers"; import * as helpers from "./helpers.ts";
import type {Prices} from "./helpers"; import type {Prices} from "./helpers.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
const prices: Prices = { const prices: Prices = {
annual: page_params.annual_price, annual: page_params.annual_price,

View File

@ -9,7 +9,7 @@
import * as Sentry from "@sentry/browser"; import * as Sentry from "@sentry/browser";
import $ from "jquery"; import $ from "jquery";
import {BlueslipError, display_stacktrace} from "./blueslip_stacktrace"; import {BlueslipError, display_stacktrace} from "./blueslip_stacktrace.ts";
if (Error.stackTraceLimit !== undefined) { if (Error.stackTraceLimit !== undefined) {
Error.stackTraceLimit = 100000; Error.stackTraceLimit = 100000;

View File

@ -164,8 +164,8 @@ import {insertTextIntoField} from "text-field-edit";
import getCaretCoordinates from "textarea-caret"; import getCaretCoordinates from "textarea-caret";
import * as tippy from "tippy.js"; import * as tippy from "tippy.js";
import * as scroll_util from "./scroll_util"; import * as scroll_util from "./scroll_util.ts";
import {get_string_diff, the} from "./util"; import {get_string_diff, the} from "./util.ts";
export function defaultSorter(items: string[], query: string): string[] { export function defaultSorter(items: string[], query: string): string[] {
const beginswith = []; const beginswith = [];

View File

@ -1,9 +1,9 @@
import type {z} from "zod"; import type {z} from "zod";
import type {services_schema} from "./bot_types"; import type {services_schema} from "./bot_types.ts";
import {server_add_bot_schema, server_update_bot_schema} from "./bot_types"; import {server_add_bot_schema, server_update_bot_schema} from "./bot_types.ts";
import * as people from "./people"; import * as people from "./people.ts";
import type {StateData} from "./state_data"; import type {StateData} from "./state_data.ts";
export type ServerUpdateBotData = z.infer<typeof server_update_bot_schema>; export type ServerUpdateBotData = z.infer<typeof server_update_bot_schema>;
export type ServerAddBotData = z.infer<typeof server_add_bot_schema>; export type ServerAddBotData = z.infer<typeof server_add_bot_schema>;

View File

@ -1,10 +1,10 @@
// TODO: Rewrite this module to use window.history.pushState. // TODO: Rewrite this module to use window.history.pushState.
import {z} from "zod"; import {z} from "zod";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as hash_parser from "./hash_parser"; import * as hash_parser from "./hash_parser.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
export const state: { export const state: {
is_internal_change: boolean; is_internal_change: boolean;

View File

@ -1,22 +1,22 @@
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as muted_users from "./muted_users"; import * as muted_users from "./muted_users.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as peer_data from "./peer_data"; import * as peer_data from "./peer_data.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as presence from "./presence"; import * as presence from "./presence.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import type {StreamSubscription} from "./sub_store"; import type {StreamSubscription} from "./sub_store.ts";
import * as timerender from "./timerender"; import * as timerender from "./timerender.ts";
import * as unread from "./unread"; import * as unread from "./unread.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as user_status from "./user_status"; import * as user_status from "./user_status.ts";
import * as util from "./util"; import * as util from "./util.ts";
/* /*

View File

@ -9,25 +9,25 @@ import render_empty_list_widget_for_list from "../templates/empty_list_widget_fo
import render_presence_row from "../templates/presence_row.hbs"; import render_presence_row from "../templates/presence_row.hbs";
import render_presence_rows from "../templates/presence_rows.hbs"; import render_presence_rows from "../templates/presence_rows.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as buddy_data from "./buddy_data"; import * as buddy_data from "./buddy_data.ts";
import type {BuddyUserInfo} from "./buddy_data"; import type {BuddyUserInfo} from "./buddy_data.ts";
import {media_breakpoints_num} from "./css_variables"; import {media_breakpoints_num} from "./css_variables.js";
import type {Filter} from "./filter"; import type {Filter} from "./filter.ts";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_viewport from "./message_viewport"; import * as message_viewport from "./message_viewport.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as padded_widget from "./padded_widget"; import * as padded_widget from "./padded_widget.ts";
import * as peer_data from "./peer_data"; import * as peer_data from "./peer_data.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as scroll_util from "./scroll_util"; import * as scroll_util from "./scroll_util.ts";
import {current_user} from "./state_data"; import {current_user} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import type {StreamSubscription} from "./sub_store"; import type {StreamSubscription} from "./sub_store.ts";
import {INTERACTIVE_HOVER_DELAY} from "./tippyjs"; import {INTERACTIVE_HOVER_DELAY} from "./tippyjs.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as util from "./util"; import * as util from "./util.ts";
function get_formatted_sub_count(sub_count: number): string { function get_formatted_sub_count(sub_count: number): string {
if (sub_count < 1000) { if (sub_count < 1000) {

View File

@ -1,17 +1,17 @@
import "./common"; import "./common.ts";
// Import third party jQuery plugins // Import third party jQuery plugins
import "../bootstrap_typeahead"; import "../bootstrap_typeahead.ts";
import "jquery-caret-plugin/dist/jquery.caret"; import "jquery-caret-plugin/dist/jquery.caret";
import "../../third/jquery-idle/jquery.idle"; import "../../third/jquery-idle/jquery.idle.js";
import "spectrum-colorpicker"; import "spectrum-colorpicker";
import "jquery-validation"; import "jquery-validation";
// Import app JS // Import app JS
import "../setup"; import "../setup.ts";
import "../reload"; import "../reload.ts";
import "../templates"; import "../templates.js";
import "../zulip_test"; import "../zulip_test.ts";
// Import styles // Import styles
import "tippy.js/dist/tippy.css"; import "tippy.js/dist/tippy.css";
@ -60,4 +60,4 @@ import "../../styles/print.css";
import "../../styles/inbox.css"; import "../../styles/inbox.css";
// This should be last. // This should be last.
import "../ui_init"; import "../ui_init.js";

View File

@ -1,12 +1,12 @@
import "../sentry"; import "../sentry.ts";
import "../../debug-require"; import "../../debug-require.js";
import "../alert_popup"; import "../alert_popup.ts";
import "../csrf"; import "../csrf.ts";
import "../blueslip"; import "../blueslip.ts";
import "../../third/bootstrap/css/bootstrap-btn.css"; import "../../third/bootstrap/css/bootstrap-btn.css";
import "simplebar/dist/simplebar.css"; import "simplebar/dist/simplebar.css";
import "font-awesome/css/font-awesome.css"; import "font-awesome/css/font-awesome.css";
import "../../images/icons/zulip-icons.font"; import "../../images/icons/zulip-icons.font.js";
import "source-sans/source-sans-3VF.css"; import "source-sans/source-sans-3VF.css";
import "source-code-pro/source-code-pro.css"; import "source-code-pro/source-code-pro.css";
import "@fontsource-variable/open-sans"; import "@fontsource-variable/open-sans";

View File

@ -4,4 +4,4 @@
import "source-sans/source-sans-3VF.css"; import "source-sans/source-sans-3VF.css";
import "source-code-pro/source-code-pro.css"; import "source-code-pro/source-code-pro.css";
import "@fontsource-variable/open-sans"; import "@fontsource-variable/open-sans";
import "../portico/google-analytics"; import "../portico/google-analytics.ts";

View File

@ -1,8 +1,8 @@
import "./common"; import "./common.ts";
import "../portico/header"; import "../portico/header.ts";
import "../portico/google-analytics"; import "../portico/google-analytics.ts";
import "../portico/portico_modals"; import "../portico/portico_modals.ts";
import "../portico/tippyjs"; import "../portico/tippyjs.ts";
import "../../third/bootstrap/css/bootstrap.portico.css"; import "../../third/bootstrap/css/bootstrap.portico.css";
import "../../styles/portico/portico_styles.css"; import "../../styles/portico/portico_styles.css";
import "tippy.js/dist/tippy.css"; import "tippy.js/dist/tippy.css";

View File

@ -3,11 +3,11 @@ import $ from "jquery";
import _ from "lodash"; import _ from "lodash";
import {z} from "zod"; import {z} from "zod";
import {page_params} from "./base_page_params"; import {page_params} from "./base_page_params.ts";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as reload_state from "./reload_state"; import * as reload_state from "./reload_state.ts";
import {normalize_path, shouldCreateSpanForRequest} from "./sentry"; import {normalize_path, shouldCreateSpanForRequest} from "./sentry.ts";
import * as spectators from "./spectators"; import * as spectators from "./spectators.ts";
// We omit `success` handler from original `AjaxSettings` type because it types // We omit `success` handler from original `AjaxSettings` type because it types
// the `data` parameter as `any` type and we want to avoid that. // the `data` parameter as `any` type and we want to avoid that.

View File

@ -6,41 +6,41 @@ import * as tippy from "tippy.js";
import render_buddy_list_tooltip_content from "../templates/buddy_list_tooltip_content.hbs"; import render_buddy_list_tooltip_content from "../templates/buddy_list_tooltip_content.hbs";
import * as activity_ui from "./activity_ui"; import * as activity_ui from "./activity_ui.ts";
import * as browser_history from "./browser_history"; import * as browser_history from "./browser_history.ts";
import * as buddy_data from "./buddy_data"; import * as buddy_data from "./buddy_data.ts";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions.ts";
import * as compose_reply from "./compose_reply"; import * as compose_reply from "./compose_reply.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import {media_breakpoints_num} from "./css_variables"; import {media_breakpoints_num} from "./css_variables.js";
import * as emoji_picker from "./emoji_picker"; import * as emoji_picker from "./emoji_picker.ts";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import * as hashchange from "./hashchange"; import * as hashchange from "./hashchange.js";
import * as message_edit from "./message_edit"; import * as message_edit from "./message_edit.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import * as message_view from "./message_view"; import * as message_view from "./message_view.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as navigate from "./navigate"; import * as navigate from "./navigate.js";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as pm_list from "./pm_list"; import * as pm_list from "./pm_list.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import * as reactions from "./reactions"; import * as reactions from "./reactions.ts";
import * as recent_view_ui from "./recent_view_ui"; import * as recent_view_ui from "./recent_view_ui.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as server_events from "./server_events"; import * as server_events from "./server_events.js";
import * as settings_panel_menu from "./settings_panel_menu"; import * as settings_panel_menu from "./settings_panel_menu.js";
import * as settings_preferences from "./settings_preferences"; import * as settings_preferences from "./settings_preferences.ts";
import * as settings_toggle from "./settings_toggle"; import * as settings_toggle from "./settings_toggle.js";
import * as sidebar_ui from "./sidebar_ui"; import * as sidebar_ui from "./sidebar_ui.ts";
import * as spectators from "./spectators"; import * as spectators from "./spectators.ts";
import * as starred_messages_ui from "./starred_messages_ui"; import * as starred_messages_ui from "./starred_messages_ui.ts";
import * as stream_list from "./stream_list"; import * as stream_list from "./stream_list.ts";
import * as stream_popover from "./stream_popover"; import * as stream_popover from "./stream_popover.js";
import * as topic_list from "./topic_list"; import * as topic_list from "./topic_list.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
import * as util from "./util"; import * as util from "./util.ts";
export function initialize() { export function initialize() {
// MESSAGE CLICKING // MESSAGE CLICKING

View File

@ -1,8 +1,8 @@
import $ from "jquery"; import $ from "jquery";
import * as tippy from "tippy.js"; import * as tippy from "tippy.js";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as util from "./util"; import * as util from "./util.ts";
export const status_classes = "alert-error alert-success alert-info alert-warning alert-loading"; export const status_classes = "alert-error alert-success alert-info alert-warning alert-loading";

View File

@ -1,7 +1,7 @@
import $ from "jquery"; import $ from "jquery";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
/* USAGE: /* USAGE:
Toggle x = components.toggle({ Toggle x = components.toggle({

View File

@ -6,25 +6,25 @@ import $ from "jquery";
import render_success_message_scheduled_banner from "../templates/compose_banner/success_message_scheduled_banner.hbs"; import render_success_message_scheduled_banner from "../templates/compose_banner/success_message_scheduled_banner.hbs";
import render_wildcard_mention_not_allowed_error from "../templates/compose_banner/wildcard_mention_not_allowed_error.hbs"; import render_wildcard_mention_not_allowed_error from "../templates/compose_banner/wildcard_mention_not_allowed_error.hbs";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as compose_notifications from "./compose_notifications"; import * as compose_notifications from "./compose_notifications.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as drafts from "./drafts"; import * as drafts from "./drafts.ts";
import * as echo from "./echo"; import * as echo from "./echo.ts";
import * as message_events from "./message_events"; import * as message_events from "./message_events.js";
import * as onboarding_steps from "./onboarding_steps"; import * as onboarding_steps from "./onboarding_steps.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as scheduled_messages from "./scheduled_messages"; import * as scheduled_messages from "./scheduled_messages.ts";
import * as sent_messages from "./sent_messages"; import * as sent_messages from "./sent_messages.ts";
import * as server_events from "./server_events"; import * as server_events from "./server_events.js";
import {current_user} from "./state_data"; import {current_user} from "./state_data.ts";
import * as transmit from "./transmit"; import * as transmit from "./transmit.js";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as util from "./util"; import * as util from "./util.ts";
import * as zcommand from "./zcommand"; import * as zcommand from "./zcommand.ts";
// Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html // Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html

View File

@ -3,29 +3,29 @@
import autosize from "autosize"; import autosize from "autosize";
import $ from "jquery"; import $ from "jquery";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as compose_fade from "./compose_fade"; import * as compose_fade from "./compose_fade.ts";
import * as compose_notifications from "./compose_notifications"; import * as compose_notifications from "./compose_notifications.ts";
import * as compose_pm_pill from "./compose_pm_pill"; import * as compose_pm_pill from "./compose_pm_pill.ts";
import * as compose_recipient from "./compose_recipient"; import * as compose_recipient from "./compose_recipient.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import type {ComposeTriggeredOptions} from "./compose_ui"; import type {ComposeTriggeredOptions} from "./compose_ui.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as drafts from "./drafts"; import * as drafts from "./drafts.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as message_util from "./message_util"; import * as message_util from "./message_util.ts";
import * as message_viewport from "./message_viewport"; import * as message_viewport from "./message_viewport.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as popovers from "./popovers"; import * as popovers from "./popovers.ts";
import * as reload_state from "./reload_state"; import * as reload_state from "./reload_state.ts";
import * as resize from "./resize"; import * as resize from "./resize.ts";
import * as spectators from "./spectators"; import * as spectators from "./spectators.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
// Opts sent to `compose_actions.start`. // Opts sent to `compose_actions.start`.
type ComposeActionsStartOpts = { type ComposeActionsStartOpts = {

View File

@ -4,10 +4,10 @@ import render_cannot_send_direct_message_error from "../templates/compose_banner
import render_compose_banner from "../templates/compose_banner/compose_banner.hbs"; import render_compose_banner from "../templates/compose_banner/compose_banner.hbs";
import render_stream_does_not_exist_error from "../templates/compose_banner/stream_does_not_exist_error.hbs"; import render_stream_does_not_exist_error from "../templates/compose_banner/stream_does_not_exist_error.hbs";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as scroll_util from "./scroll_util"; import * as scroll_util from "./scroll_util.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import type {StreamSubscription} from "./sub_store"; import type {StreamSubscription} from "./sub_store.ts";
export let scroll_to_message_banner_message_id: number | null = null; export let scroll_to_message_banner_message_id: number | null = null;
export function set_scroll_to_message_banner_message_id(val: number | null): void { export function set_scroll_to_message_banner_message_id(val: number | null): void {

View File

@ -1,4 +1,4 @@
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
export const zoom_token_callbacks = new Map(); export const zoom_token_callbacks = new Map();
export const video_call_xhrs = new Map<string, JQuery.jqXHR<unknown>>(); export const video_call_xhrs = new Map<string, JQuery.jqXHR<unknown>>();

View File

@ -1,15 +1,15 @@
import $ from "jquery"; import $ from "jquery";
import {z} from "zod"; import {z} from "zod";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as compose_call from "./compose_call"; import * as compose_call from "./compose_call.ts";
import {get_recipient_label} from "./compose_closed_ui"; import {get_recipient_label} from "./compose_closed_ui.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import {$t, $t_html} from "./i18n"; import {$t, $t_html} from "./i18n.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report.ts";
import * as util from "./util"; import * as util from "./util.ts";
const call_response_schema = z.object({ const call_response_schema = z.object({
msg: z.string(), msg: z.string(),

View File

@ -1,13 +1,13 @@
import $ from "jquery"; import $ from "jquery";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import * as message_util from "./message_util"; import * as message_util from "./message_util.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
function format_stream_recipient_label(stream_id: number, topic: string): string { function format_stream_recipient_label(stream_id: number, topic: string): string {
const stream = stream_data.get_sub_by_id(stream_id); const stream = stream_data.get_sub_by_id(stream_id);

View File

@ -2,14 +2,14 @@ import $ from "jquery";
import _ from "lodash"; import _ from "lodash";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import * as compose_fade_helper from "./compose_fade_helper"; import * as compose_fade_helper from "./compose_fade_helper.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import type {MessageGroup} from "./message_list_view"; import type {MessageGroup} from "./message_list_view.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as message_viewport from "./message_viewport"; import * as message_viewport from "./message_viewport.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as util from "./util"; import * as util from "./util.ts";
let normal_display = false; let normal_display = false;

View File

@ -1,7 +1,7 @@
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
import type {Recipient} from "./util"; import type {Recipient} from "./util.ts";
import * as util from "./util"; import * as util from "./util.ts";
let focused_recipient: Recipient | undefined; let focused_recipient: Recipient | undefined;

View File

@ -7,18 +7,18 @@ import render_jump_to_sent_message_conversation_banner from "../templates/compos
import render_message_sent_banner from "../templates/compose_banner/message_sent_banner.hbs"; import render_message_sent_banner from "../templates/compose_banner/message_sent_banner.hbs";
import render_unmute_topic_banner from "../templates/compose_banner/unmute_topic_banner.hbs"; import render_unmute_topic_banner from "../templates/compose_banner/unmute_topic_banner.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as onboarding_steps from "./onboarding_steps"; import * as onboarding_steps from "./onboarding_steps.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as user_topics from "./user_topics"; import * as user_topics from "./user_topics.ts";
export function notify_unmute(muted_narrow: string, stream_id: number, topic_name: string): void { export function notify_unmute(muted_narrow: string, stream_id: number, topic_name: string): void {
const $unmute_notification = $( const $unmute_notification = $(

View File

@ -1,12 +1,12 @@
import $ from "jquery"; import $ from "jquery";
import type {InputPillConfig} from "./input_pill"; import type {InputPillConfig} from "./input_pill.ts";
import * as input_pill from "./input_pill"; import * as input_pill from "./input_pill.ts";
import type {User} from "./people"; import type {User} from "./people.ts";
import * as people from "./people"; import * as people from "./people.ts";
import type {UserPill, UserPillWidget} from "./user_pill"; import type {UserPill, UserPillWidget} from "./user_pill.ts";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill.ts";
import * as util from "./util"; import * as util from "./util.ts";
export let widget: UserPillWidget; export let widget: UserPillWidget;

View File

@ -3,11 +3,11 @@ import assert from "minimalistic-assert";
import render_compose_control_buttons_popover from "../templates/popovers/compose_control_buttons/compose_control_buttons_popover.hbs"; import render_compose_control_buttons_popover from "../templates/popovers/compose_control_buttons/compose_control_buttons_popover.hbs";
import * as giphy_state from "./giphy_state"; import * as giphy_state from "./giphy_state.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import * as popovers from "./popovers"; import * as popovers from "./popovers.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
export function initialize(): void { export function initialize(): void {
// Click event handlers for it are handled in `compose_ui` and // Click event handlers for it are handled in `compose_ui` and

View File

@ -7,24 +7,24 @@ import type * as tippy from "tippy.js";
import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs"; import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as compose_fade from "./compose_fade"; import * as compose_fade from "./compose_fade.ts";
import * as compose_pm_pill from "./compose_pm_pill"; import * as compose_pm_pill from "./compose_pm_pill.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import type {ComposeTriggeredOptions} from "./compose_ui"; import type {ComposeTriggeredOptions} from "./compose_ui.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as drafts from "./drafts"; import * as drafts from "./drafts.ts";
import * as dropdown_widget from "./dropdown_widget"; import * as dropdown_widget from "./dropdown_widget.ts";
import type {Option} from "./dropdown_widget"; import type {Option} from "./dropdown_widget.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups.ts";
import * as util from "./util"; import * as util from "./util.ts";
type MessageType = "stream" | "private"; type MessageType = "stream" | "private";
type DirectMessagesOption = { type DirectMessagesOption = {

View File

@ -2,25 +2,25 @@ import $ from "jquery";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import {z} from "zod"; import {z} from "zod";
import * as fenced_code from "../shared/src/fenced_code"; import * as fenced_code from "../shared/src/fenced_code.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as copy_and_paste from "./copy_and_paste"; import * as copy_and_paste from "./copy_and_paste.ts";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as inbox_ui from "./inbox_ui"; import * as inbox_ui from "./inbox_ui.ts";
import * as inbox_util from "./inbox_util"; import * as inbox_util from "./inbox_util.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as recent_view_ui from "./recent_view_ui"; import * as recent_view_ui from "./recent_view_ui.ts";
import * as recent_view_util from "./recent_view_util"; import * as recent_view_util from "./recent_view_util.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as unread_ops from "./unread_ops"; import * as unread_ops from "./unread_ops.ts";
export let respond_to_message = (opts: { export let respond_to_message = (opts: {
keep_composebox_empty?: boolean; keep_composebox_empty?: boolean;

View File

@ -5,18 +5,18 @@ import render_send_later_popover from "../templates/popovers/send_later_popover.
import render_send_later_modal from "../templates/send_later_modal.hbs"; import render_send_later_modal from "../templates/send_later_modal.hbs";
import render_send_later_modal_options from "../templates/send_later_modal_options.hbs"; import render_send_later_modal_options from "../templates/send_later_modal_options.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as compose from "./compose"; import * as compose from "./compose.js";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as drafts from "./drafts"; import * as drafts from "./drafts.ts";
import * as flatpickr from "./flatpickr"; import * as flatpickr from "./flatpickr.ts";
import * as modals from "./modals"; import * as modals from "./modals.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import * as scheduled_messages from "./scheduled_messages"; import * as scheduled_messages from "./scheduled_messages.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
export const SCHEDULING_MODAL_UPDATE_INTERVAL_IN_MILLISECONDS = 60 * 1000; export const SCHEDULING_MODAL_UPDATE_INTERVAL_IN_MILLISECONDS = 60 * 1000;
const ENTER_SENDS_SELECTION_DELAY = 600; const ENTER_SENDS_SELECTION_DELAY = 600;

View File

@ -1,40 +1,40 @@
import $ from "jquery"; import $ from "jquery";
import {unresolve_name} from "../shared/src/resolved_topic"; import {unresolve_name} from "../shared/src/resolved_topic.ts";
import render_add_poll_modal from "../templates/add_poll_modal.hbs"; import render_add_poll_modal from "../templates/add_poll_modal.hbs";
import * as compose from "./compose"; import * as compose from "./compose.js";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions.ts";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as compose_call from "./compose_call"; import * as compose_call from "./compose_call.ts";
import * as compose_call_ui from "./compose_call_ui"; import * as compose_call_ui from "./compose_call_ui.ts";
import * as compose_notifications from "./compose_notifications"; import * as compose_notifications from "./compose_notifications.ts";
import * as compose_recipient from "./compose_recipient"; import * as compose_recipient from "./compose_recipient.ts";
import * as compose_send_menu_popover from "./compose_send_menu_popover"; import * as compose_send_menu_popover from "./compose_send_menu_popover.js";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import * as flatpickr from "./flatpickr"; import * as flatpickr from "./flatpickr.ts";
import {$t_html} from "./i18n"; import {$t_html} from "./i18n.ts";
import * as message_edit from "./message_edit"; import * as message_edit from "./message_edit.ts";
import * as message_view from "./message_view"; import * as message_view from "./message_view.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as onboarding_steps from "./onboarding_steps"; import * as onboarding_steps from "./onboarding_steps.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as poll_modal from "./poll_modal"; import * as poll_modal from "./poll_modal.ts";
import * as popovers from "./popovers"; import * as popovers from "./popovers.ts";
import * as resize from "./resize"; import * as resize from "./resize.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as scheduled_messages from "./scheduled_messages"; import * as scheduled_messages from "./scheduled_messages.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as stream_settings_components from "./stream_settings_components"; import * as stream_settings_components from "./stream_settings_components.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
import * as subscriber_api from "./subscriber_api"; import * as subscriber_api from "./subscriber_api.ts";
import {get_timestamp_for_flatpickr} from "./timerender"; import {get_timestamp_for_flatpickr} from "./timerender.ts";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report.ts";
import * as upload from "./upload"; import * as upload from "./upload.ts";
import * as user_topics from "./user_topics"; import * as user_topics from "./user_topics.ts";
export function abort_xhr() { export function abort_xhr() {
$("#compose-send-button").prop("disabled", false); $("#compose-send-button").prop("disabled", false);

View File

@ -1,9 +1,9 @@
import $ from "jquery"; import $ from "jquery";
import * as compose_pm_pill from "./compose_pm_pill"; import * as compose_pm_pill from "./compose_pm_pill.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
let message_type: "stream" | "private" | undefined; let message_type: "stream" | "private" | undefined;
let recipient_edited_manually = false; let recipient_edited_manually = false;

View File

@ -6,16 +6,16 @@ import * as tippy from "tippy.js";
import render_drafts_tooltip from "../templates/drafts_tooltip.hbs"; import render_drafts_tooltip from "../templates/drafts_tooltip.hbs";
import render_narrow_to_compose_recipients_tooltip from "../templates/narrow_to_compose_recipients_tooltip.hbs"; import render_narrow_to_compose_recipients_tooltip from "../templates/narrow_to_compose_recipients_tooltip.hbs";
import * as compose_recipient from "./compose_recipient"; import * as compose_recipient from "./compose_recipient.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import {pick_empty_narrow_banner} from "./narrow_banner"; import {pick_empty_narrow_banner} from "./narrow_banner.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import {EXTRA_LONG_HOVER_DELAY, INSTANT_HOVER_DELAY, LONG_HOVER_DELAY} from "./tippyjs"; import {EXTRA_LONG_HOVER_DELAY, INSTANT_HOVER_DELAY, LONG_HOVER_DELAY} from "./tippyjs.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
export function initialize(): void { export function initialize(): void {
tippy.delegate("body", { tippy.delegate("body", {

View File

@ -12,23 +12,23 @@ import {
} from "text-field-edit"; } from "text-field-edit";
import {z} from "zod"; import {z} from "zod";
import type {Typeahead} from "./bootstrap_typeahead"; import type {Typeahead} from "./bootstrap_typeahead.ts";
import * as bulleted_numbered_list_util from "./bulleted_numbered_list_util"; import * as bulleted_numbered_list_util from "./bulleted_numbered_list_util.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as common from "./common"; import * as common from "./common.ts";
import type {TypeaheadSuggestion} from "./composebox_typeahead"; import type {TypeaheadSuggestion} from "./composebox_typeahead.ts";
import {$t, $t_html} from "./i18n"; import {$t, $t_html} from "./i18n.ts";
import * as loading from "./loading"; import * as loading from "./loading.ts";
import * as markdown from "./markdown"; import * as markdown from "./markdown.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import {postprocess_content} from "./postprocess_content"; import {postprocess_content} from "./postprocess_content.ts";
import * as rendered_markdown from "./rendered_markdown"; import * as rendered_markdown from "./rendered_markdown.ts";
import * as rtl from "./rtl"; import * as rtl from "./rtl.ts";
import {current_user} from "./state_data"; import {current_user} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as user_status from "./user_status"; import * as user_status from "./user_status.ts";
import * as util from "./util"; import * as util from "./util.ts";
export const DEFAULT_COMPOSE_PLACEHOLDER = $t({defaultMessage: "Compose your message here"}); export const DEFAULT_COMPOSE_PLACEHOLDER = $t({defaultMessage: "Compose your message here"});

View File

@ -1,6 +1,6 @@
import $ from "jquery"; import $ from "jquery";
import * as resolved_topic from "../shared/src/resolved_topic"; import * as resolved_topic from "../shared/src/resolved_topic.ts";
import render_compose_banner from "../templates/compose_banner/compose_banner.hbs"; import render_compose_banner from "../templates/compose_banner/compose_banner.hbs";
import render_not_subscribed_warning from "../templates/compose_banner/not_subscribed_warning.hbs"; import render_not_subscribed_warning from "../templates/compose_banner/not_subscribed_warning.hbs";
import render_private_stream_warning from "../templates/compose_banner/private_stream_warning.hbs"; import render_private_stream_warning from "../templates/compose_banner/private_stream_warning.hbs";
@ -8,27 +8,27 @@ import render_stream_wildcard_warning from "../templates/compose_banner/stream_w
import render_wildcard_mention_not_allowed_error from "../templates/compose_banner/wildcard_mention_not_allowed_error.hbs"; import render_wildcard_mention_not_allowed_error from "../templates/compose_banner/wildcard_mention_not_allowed_error.hbs";
import render_compose_limit_indicator from "../templates/compose_limit_indicator.hbs"; import render_compose_limit_indicator from "../templates/compose_limit_indicator.hbs";
import * as compose_banner from "./compose_banner"; import * as compose_banner from "./compose_banner.ts";
import * as compose_pm_pill from "./compose_pm_pill"; import * as compose_pm_pill from "./compose_pm_pill.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import * as message_util from "./message_util"; import * as message_util from "./message_util.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as peer_data from "./peer_data"; import * as peer_data from "./peer_data.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as reactions from "./reactions"; import * as reactions from "./reactions.ts";
import * as recent_senders from "./recent_senders"; import * as recent_senders from "./recent_senders.ts";
import * as settings_config from "./settings_config"; import * as settings_config from "./settings_config.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
import type {StreamSubscription} from "./sub_store"; import type {StreamSubscription} from "./sub_store.ts";
import type {UserOrMention} from "./typeahead_helper"; import type {UserOrMention} from "./typeahead_helper.ts";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups.ts";
import * as util from "./util"; import * as util from "./util.ts";
let user_acknowledged_stream_wildcard = false; let user_acknowledged_stream_wildcard = false;
let upload_in_progress = false; let upload_in_progress = false;

View File

@ -2,46 +2,46 @@ import $ from "jquery";
import _ from "lodash"; import _ from "lodash";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import * as typeahead from "../shared/src/typeahead"; import * as typeahead from "../shared/src/typeahead.ts";
import type {Emoji, EmojiSuggestion} from "../shared/src/typeahead"; import type {Emoji, EmojiSuggestion} from "../shared/src/typeahead.ts";
import render_topic_typeahead_hint from "../templates/topic_typeahead_hint.hbs"; import render_topic_typeahead_hint from "../templates/topic_typeahead_hint.hbs";
import {MAX_ITEMS, Typeahead} from "./bootstrap_typeahead"; import {MAX_ITEMS, Typeahead} from "./bootstrap_typeahead.ts";
import type {TypeaheadInputElement} from "./bootstrap_typeahead"; import type {TypeaheadInputElement} from "./bootstrap_typeahead.ts";
import * as bulleted_numbered_list_util from "./bulleted_numbered_list_util"; import * as bulleted_numbered_list_util from "./bulleted_numbered_list_util.ts";
import * as compose_pm_pill from "./compose_pm_pill"; import * as compose_pm_pill from "./compose_pm_pill.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate.ts";
import * as emoji from "./emoji"; import * as emoji from "./emoji.ts";
import type {EmojiDict} from "./emoji"; import type {EmojiDict} from "./emoji.ts";
import * as flatpickr from "./flatpickr"; import * as flatpickr from "./flatpickr.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import * as muted_users from "./muted_users"; import * as muted_users from "./muted_users.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as people from "./people"; import * as people from "./people.ts";
import type {PseudoMentionUser, User} from "./people"; import type {PseudoMentionUser, User} from "./people.ts";
import * as realm_playground from "./realm_playground"; import * as realm_playground from "./realm_playground.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import {realm} from "./state_data"; import {realm} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import type {StreamPillData} from "./stream_pill"; import type {StreamPillData} from "./stream_pill.ts";
import * as stream_topic_history from "./stream_topic_history"; import * as stream_topic_history from "./stream_topic_history.ts";
import * as stream_topic_history_util from "./stream_topic_history_util"; import * as stream_topic_history_util from "./stream_topic_history_util.ts";
import * as timerender from "./timerender"; import * as timerender from "./timerender.ts";
import * as topic_link_util from "./topic_link_util"; import * as topic_link_util from "./topic_link_util.ts";
import * as typeahead_helper from "./typeahead_helper"; import * as typeahead_helper from "./typeahead_helper.ts";
import type {UserOrMentionPillData} from "./typeahead_helper"; import type {UserOrMentionPillData} from "./typeahead_helper.ts";
import type {UserGroupPillData} from "./user_group_pill"; import type {UserGroupPillData} from "./user_group_pill.ts";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups.ts";
import type {UserGroup} from "./user_groups"; import type {UserGroup} from "./user_groups.ts";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill.ts";
import type {UserPillData} from "./user_pill"; import type {UserPillData} from "./user_pill.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as util from "./util"; import * as util from "./util.ts";
// ********************************** // **********************************
// AN IMPORTANT NOTE ABOUT TYPEAHEADS // AN IMPORTANT NOTE ABOUT TYPEAHEADS

View File

@ -3,12 +3,12 @@ import assert from "minimalistic-assert";
import render_message_length_toggle from "../templates/message_length_toggle.hbs"; import render_message_length_toggle from "../templates/message_length_toggle.hbs";
import * as message_flags from "./message_flags"; import * as message_flags from "./message_flags.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as message_viewport from "./message_viewport"; import * as message_viewport from "./message_viewport.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as util from "./util"; import * as util from "./util.ts";
/* /*
This library implements two related, similar concepts: This library implements two related, similar concepts:

View File

@ -1,6 +1,6 @@
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import type {DialogWidgetConfig} from "./dialog_widget"; import type {DialogWidgetConfig} from "./dialog_widget.ts";
import {$t_html} from "./i18n"; import {$t_html} from "./i18n.ts";
export function launch(conf: DialogWidgetConfig): string { export function launch(conf: DialogWidgetConfig): string {
return dialog_widget.launch({ return dialog_widget.launch({

View File

@ -1,7 +1,7 @@
import $ from "jquery"; import $ from "jquery";
import * as tippy from "tippy.js"; import * as tippy from "tippy.js";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
function show_copied_tooltip( function show_copied_tooltip(
copy_button: HTMLElement, copy_button: HTMLElement,

View File

@ -5,13 +5,13 @@ import assert from "minimalistic-assert";
import {insertTextIntoField} from "text-field-edit"; import {insertTextIntoField} from "text-field-edit";
import TurndownService from "turndown"; import TurndownService from "turndown";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as hash_util from "./hash_util"; import * as hash_util from "./hash_util.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as topic_link_util from "./topic_link_util"; import * as topic_link_util from "./topic_link_util.ts";
import * as util from "./util"; import * as util from "./util.ts";
declare global { declare global {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions // eslint-disable-next-line @typescript-eslint/consistent-type-definitions

View File

@ -4,16 +4,16 @@ import {z} from "zod";
import render_settings_custom_user_profile_field from "../templates/settings/custom_user_profile_field.hbs"; import render_settings_custom_user_profile_field from "../templates/settings/custom_user_profile_field.hbs";
import {Typeahead} from "./bootstrap_typeahead"; import {Typeahead} from "./bootstrap_typeahead.ts";
import * as bootstrap_typeahead from "./bootstrap_typeahead"; import * as bootstrap_typeahead from "./bootstrap_typeahead.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as pill_typeahead from "./pill_typeahead"; import * as pill_typeahead from "./pill_typeahead.ts";
import * as settings_components from "./settings_components"; import * as settings_components from "./settings_components.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
import * as typeahead_helper from "./typeahead_helper"; import * as typeahead_helper from "./typeahead_helper.ts";
import type {UserPillWidget} from "./user_pill"; import type {UserPillWidget} from "./user_pill.ts";
import * as user_pill from "./user_pill"; import * as user_pill from "./user_pill.ts";
const user_value_schema = z.array(z.number()); const user_value_schema = z.array(z.number());

View File

@ -4,17 +4,17 @@ import {z} from "zod";
import render_convert_demo_organization_form from "../templates/settings/convert_demo_organization_form.hbs"; import render_convert_demo_organization_form from "../templates/settings/convert_demo_organization_form.hbs";
import render_demo_organization_warning from "../templates/settings/demo_organization_warning.hbs"; import render_demo_organization_warning from "../templates/settings/demo_organization_warning.hbs";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import {get_demo_organization_deadline_days_remaining} from "./navbar_alerts"; import {get_demo_organization_deadline_days_remaining} from "./navbar_alerts.ts";
import * as settings_config from "./settings_config"; import * as settings_config from "./settings_config.ts";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data.ts";
import * as settings_org from "./settings_org"; import * as settings_org from "./settings_org.ts";
import type {RequestOpts} from "./settings_ui"; import type {RequestOpts} from "./settings_ui.ts";
import {current_user, realm} from "./state_data"; import {current_user, realm} from "./state_data.ts";
import type {HTMLSelectOneElement} from "./types"; import type {HTMLSelectOneElement} from "./types.ts";
export function insert_demo_organization_warning(): void { export function insert_demo_organization_warning(): void {
const days_remaining = get_demo_organization_deadline_days_remaining(); const days_remaining = get_demo_organization_deadline_days_remaining();

View File

@ -1,9 +1,9 @@
import {z} from "zod"; import {z} from "zod";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as dialog_widget from "./dialog_widget"; import * as dialog_widget from "./dialog_widget.ts";
import {$t_html} from "./i18n"; import {$t_html} from "./i18n.ts";
import {localstorage} from "./localstorage"; import {localstorage} from "./localstorage.ts";
export function get_hotkey_deprecation_notice( export function get_hotkey_deprecation_notice(
originalHotkey: string, originalHotkey: string,

View File

@ -1,13 +1,13 @@
import $ from "jquery"; import $ from "jquery";
import * as browser_history from "./browser_history"; import * as browser_history from "./browser_history.ts";
import * as channel from "./channel"; import * as channel from "./channel.ts";
import {electron_bridge} from "./electron_bridge"; import {electron_bridge} from "./electron_bridge.ts";
import * as feedback_widget from "./feedback_widget"; import * as feedback_widget from "./feedback_widget.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import * as message_view from "./message_view"; import * as message_view from "./message_view.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
export function initialize() { export function initialize() {
if (electron_bridge === undefined) { if (electron_bridge === undefined) {

View File

@ -1,8 +1,8 @@
import $ from "jquery"; import $ from "jquery";
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import {electron_bridge} from "./electron_bridge"; import {electron_bridge} from "./electron_bridge.ts";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
type NoticeMemory = Map< type NoticeMemory = Map<
string, string,

View File

@ -3,11 +3,11 @@ import _ from "lodash";
import render_dialog_widget from "../templates/dialog_widget.hbs"; import render_dialog_widget from "../templates/dialog_widget.hbs";
import type {AjaxRequestHandler} from "./channel"; import type {AjaxRequestHandler} from "./channel.ts";
import {$t_html} from "./i18n"; import {$t_html} from "./i18n.ts";
import * as loading from "./loading"; import * as loading from "./loading.ts";
import * as modals from "./modals"; import * as modals from "./modals.ts";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report.ts";
// Since only one dialog widget can be active at a time // Since only one dialog widget can be active at a time
// and we don't support reopening already closed dialog widgets, // and we don't support reopening already closed dialog widgets,

View File

@ -1,7 +1,7 @@
import _ from "lodash"; import _ from "lodash";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
import * as people from "./people"; import * as people from "./people.ts";
const direct_message_group_timestamps = new Map<string, number>(); const direct_message_group_timestamps = new Map<string, number>();

View File

@ -7,20 +7,20 @@ import {z} from "zod";
import render_confirm_delete_all_drafts from "../templates/confirm_dialog/confirm_delete_all_drafts.hbs"; import render_confirm_delete_all_drafts from "../templates/confirm_dialog/confirm_delete_all_drafts.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as compose_state from "./compose_state"; import * as compose_state from "./compose_state.ts";
import * as confirm_dialog from "./confirm_dialog"; import * as confirm_dialog from "./confirm_dialog.ts";
import {$t, $t_html} from "./i18n"; import {$t, $t_html} from "./i18n.ts";
import {localstorage} from "./localstorage"; import {localstorage} from "./localstorage.ts";
import * as markdown from "./markdown"; import * as markdown from "./markdown.ts";
import * as narrow_state from "./narrow_state"; import * as narrow_state from "./narrow_state.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as stream_color from "./stream_color"; import * as stream_color from "./stream_color.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as sub_store from "./sub_store"; import * as sub_store from "./sub_store.ts";
import * as timerender from "./timerender"; import * as timerender from "./timerender.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import * as util from "./util"; import * as util from "./util.ts";
export let set_count = (count: number): void => { export let set_count = (count: number): void => {
const $drafts_li = $(".top_left_drafts"); const $drafts_li = $(".top_left_drafts");

View File

@ -3,17 +3,17 @@ import _ from "lodash";
import render_draft_table_body from "../templates/draft_table_body.hbs"; import render_draft_table_body from "../templates/draft_table_body.hbs";
import * as browser_history from "./browser_history"; import * as browser_history from "./browser_history.ts";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions.ts";
import * as drafts from "./drafts"; import * as drafts from "./drafts.ts";
import {$t} from "./i18n"; import {$t} from "./i18n.ts";
import * as message_view from "./message_view"; import * as message_view from "./message_view.ts";
import * as messages_overlay_ui from "./messages_overlay_ui"; import * as messages_overlay_ui from "./messages_overlay_ui.ts";
import * as overlays from "./overlays"; import * as overlays from "./overlays.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as rendered_markdown from "./rendered_markdown"; import * as rendered_markdown from "./rendered_markdown.ts";
import * as user_card_popover from "./user_card_popover"; import * as user_card_popover from "./user_card_popover.js";
import * as user_group_popover from "./user_group_popover"; import * as user_group_popover from "./user_group_popover.ts";
function restore_draft(draft_id) { function restore_draft(draft_id) {
const draft = drafts.draft_model.getDraft(draft_id); const draft = drafts.draft_model.getDraft(draft_id);

View File

@ -8,14 +8,14 @@ import render_dropdown_list from "../templates/dropdown_list.hbs";
import render_dropdown_list_container from "../templates/dropdown_list_container.hbs"; import render_dropdown_list_container from "../templates/dropdown_list_container.hbs";
import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs"; import render_inline_decorated_stream_name from "../templates/inline_decorated_stream_name.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as ListWidget from "./list_widget"; import * as ListWidget from "./list_widget.ts";
import type {ListWidget as ListWidgetType} from "./list_widget"; import type {ListWidget as ListWidgetType} from "./list_widget.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import type {StreamSubscription} from "./sub_store"; import type {StreamSubscription} from "./sub_store.ts";
import {parse_html} from "./ui_util"; import {parse_html} from "./ui_util.ts";
import * as util from "./util"; import * as util from "./util.ts";
/* Sync with max-height set in zulip.css */ /* Sync with max-height set in zulip.css */
export const DEFAULT_DROPDOWN_HEIGHT = 210; export const DEFAULT_DROPDOWN_HEIGHT = 210;

View File

@ -5,31 +5,31 @@ import {z} from "zod";
import render_message_controls from "../templates/message_controls.hbs"; import render_message_controls from "../templates/message_controls.hbs";
import render_message_controls_failed_msg from "../templates/message_controls_failed_msg.hbs"; import render_message_controls_failed_msg from "../templates/message_controls_failed_msg.hbs";
import * as alert_words from "./alert_words"; import * as alert_words from "./alert_words.ts";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as compose_notifications from "./compose_notifications"; import * as compose_notifications from "./compose_notifications.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as echo_state from "./echo_state"; import * as echo_state from "./echo_state.ts";
import * as local_message from "./local_message"; import * as local_message from "./local_message.ts";
import * as markdown from "./markdown"; import * as markdown from "./markdown.ts";
import * as message_events_util from "./message_events_util"; import * as message_events_util from "./message_events_util.ts";
import * as message_list_data_cache from "./message_list_data_cache"; import * as message_list_data_cache from "./message_list_data_cache.ts";
import * as message_lists from "./message_lists"; import * as message_lists from "./message_lists.ts";
import * as message_live_update from "./message_live_update"; import * as message_live_update from "./message_live_update.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import type {DisplayRecipientUser, Message, RawMessage} from "./message_store"; import type {DisplayRecipientUser, Message, RawMessage} from "./message_store.ts";
import * as message_util from "./message_util"; import * as message_util from "./message_util.ts";
import * as people from "./people"; import * as people from "./people.ts";
import * as pm_list from "./pm_list"; import * as pm_list from "./pm_list.ts";
import * as recent_view_data from "./recent_view_data"; import * as recent_view_data from "./recent_view_data.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as sent_messages from "./sent_messages"; import * as sent_messages from "./sent_messages.ts";
import {current_user} from "./state_data"; import {current_user} from "./state_data.ts";
import * as stream_data from "./stream_data"; import * as stream_data from "./stream_data.ts";
import * as stream_list from "./stream_list"; import * as stream_list from "./stream_list.ts";
import * as stream_topic_history from "./stream_topic_history"; import * as stream_topic_history from "./stream_topic_history.ts";
import type {TopicLink} from "./types"; import type {TopicLink} from "./types.ts";
import * as util from "./util"; import * as util from "./util.ts";
// Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html // Docs: https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html

View File

@ -1,6 +1,6 @@
import assert from "minimalistic-assert"; import assert from "minimalistic-assert";
import type {Message} from "./message_store"; import type {Message} from "./message_store.ts";
const waiting_for_id = new Map<string, Message>(); const waiting_for_id = new Map<string, Message>();
let waiting_for_ack = new Map<string, Message>(); let waiting_for_ack = new Map<string, Message>();

View File

@ -1,5 +1,5 @@
import type {InputPillConfig, InputPillContainer} from "./input_pill"; import type {InputPillConfig, InputPillContainer} from "./input_pill.ts";
import * as input_pill from "./input_pill"; import * as input_pill from "./input_pill.ts";
type EmailPill = { type EmailPill = {
type: "email"; type: "email";

View File

@ -1,8 +1,8 @@
import _ from "lodash"; import _ from "lodash";
import type {z} from "zod"; import type {z} from "zod";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import type {StateData, realm_emoji_map_schema, server_emoji_schema} from "./state_data"; import type {StateData, realm_emoji_map_schema, server_emoji_schema} from "./state_data.ts";
// This is the data structure that we get from the server on initialization. // This is the data structure that we get from the server on initialization.
export type ServerEmoji = z.infer<typeof server_emoji_schema>; export type ServerEmoji = z.infer<typeof server_emoji_schema>;

View File

@ -4,29 +4,29 @@ import type * as tippy from "tippy.js";
import {z} from "zod"; import {z} from "zod";
import emoji_codes from "../../static/generated/emoji/emoji_codes.json"; import emoji_codes from "../../static/generated/emoji/emoji_codes.json";
import * as typeahead from "../shared/src/typeahead"; import * as typeahead from "../shared/src/typeahead.ts";
import render_emoji_popover from "../templates/popovers/emoji/emoji_popover.hbs"; import render_emoji_popover from "../templates/popovers/emoji/emoji_popover.hbs";
import render_emoji_popover_emoji_map from "../templates/popovers/emoji/emoji_popover_emoji_map.hbs"; import render_emoji_popover_emoji_map from "../templates/popovers/emoji/emoji_popover_emoji_map.hbs";
import render_emoji_popover_search_results from "../templates/popovers/emoji/emoji_popover_search_results.hbs"; import render_emoji_popover_search_results from "../templates/popovers/emoji/emoji_popover_search_results.hbs";
import render_emoji_showcase from "../templates/popovers/emoji/emoji_showcase.hbs"; import render_emoji_showcase from "../templates/popovers/emoji/emoji_showcase.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui.ts";
import * as composebox_typeahead from "./composebox_typeahead"; import * as composebox_typeahead from "./composebox_typeahead.ts";
import * as emoji from "./emoji"; import * as emoji from "./emoji.ts";
import type {EmojiDict} from "./emoji"; import type {EmojiDict} from "./emoji.ts";
import * as keydown_util from "./keydown_util"; import * as keydown_util from "./keydown_util.ts";
import * as message_store from "./message_store"; import * as message_store from "./message_store.ts";
import {page_params} from "./page_params"; import {page_params} from "./page_params.ts";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus.ts";
import * as reactions from "./reactions"; import * as reactions from "./reactions.ts";
import * as rows from "./rows"; import * as rows from "./rows.ts";
import * as scroll_util from "./scroll_util"; import * as scroll_util from "./scroll_util.ts";
import * as spectators from "./spectators"; import * as spectators from "./spectators.ts";
import * as ui_util from "./ui_util"; import * as ui_util from "./ui_util.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import * as user_status_ui from "./user_status_ui"; import * as user_status_ui from "./user_status_ui.ts";
import * as util from "./util"; import * as util from "./util.ts";
// The functionalities for reacting to a message with an emoji // The functionalities for reacting to a message with an emoji
// and composing a message with an emoji share a single widget, // and composing a message with an emoji share a single widget,

View File

@ -3,8 +3,8 @@ import google_blob_sheet from "../generated/emoji/google-blob.webp";
import google_sheet from "../generated/emoji/google.webp"; import google_sheet from "../generated/emoji/google.webp";
import twitter_sheet from "../generated/emoji/twitter.webp"; import twitter_sheet from "../generated/emoji/twitter.webp";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings.ts";
import google_blob_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-blob-sprite.css"; import google_blob_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-blob-sprite.css";
import google_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-sprite.css"; import google_css from "!style-loader?injectType=lazyStyleTag!css-loader!../generated/emoji-styles/google-sprite.css";

View File

@ -3,8 +3,8 @@ import $ from "jquery";
import static_favicon_image from "../../static/images/favicon.svg"; import static_favicon_image from "../../static/images/favicon.svg";
import render_favicon_svg from "../templates/favicon.svg.hbs"; import render_favicon_svg from "../templates/favicon.svg.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip.ts";
import favicon_font_url from "./favicon_font_url!=!url-loader!font-subset-loader2?glyphs=0123456789KMGT∞!source-sans/TTF/SourceSans3-Bold.ttf"; import favicon_font_url from "./favicon_font_url!=!url-loader!font-subset-loader2?glyphs=0123456789KMGT∞!source-sans/TTF/SourceSans3-Bold.ttf"; // eslint-disable-line import/extensions
let favicon_state: {image: HTMLImageElement; url: string} | undefined; let favicon_state: {image: HTMLImageElement; url: string} | undefined;

Some files were not shown because too many files have changed in this diff Show More