hunk
dict
file
stringlengths
0
11.8M
file_path
stringlengths
2
234
label
int64
0
1
commit_url
stringlengths
74
103
dependency_score
listlengths
5
5
{ "id": 9, "code_window": [ "\n", "type Props = OwnProps & ConnectedProps<typeof connector>;\n", "\n", "const UserListAdminPageUnConnected: React.FC<Props> = ({\n", " fetchUsers,\n", " navModel,\n", " query,\n", " changeQuery,\n", " users,\n", " showPaging,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 61 }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // NOTE: This file will be auto generated from models.cue // It is currenty hand written but will serve as the target for cuetsy //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import { AxisConfig, AxisPlacement, HideableFieldConfig, ScaleDistributionConfig, VisibilityMode } from '@grafana/schema'; import { HeatmapCellLayout, HeatmapCalculationOptions } from 'app/features/transformers/calculateHeatmap/models.gen'; export const modelVersion = Object.freeze([1, 0]); export enum HeatmapColorMode { Opacity = 'opacity', Scheme = 'scheme', } export enum HeatmapColorScale { Linear = 'linear', Exponential = 'exponential', } export interface HeatmapColorOptions { mode: HeatmapColorMode; scheme: string; // when in scheme mode -- the d3 scheme name fill: string; // when opacity mode, the target color scale: HeatmapColorScale; // for opacity mode exponent: number; // when scale== sqrt steps: number; // 2-128 // Clamp the colors to the value range min?: number; max?: number; } export interface YAxisConfig extends AxisConfig { unit?: string; reverse?: boolean; decimals?: number; // Only used when the axis is not ordinal min?: number; max?: number; } export interface CellValues { unit?: string; decimals?: number; } export interface FilterValueRange { le?: number; ge?: number; } export interface HeatmapTooltip { show: boolean; yHistogram?: boolean; } export interface HeatmapLegend { show: boolean; } export interface ExemplarConfig { color: string; } export interface RowsHeatmapOptions { value?: string; // value field name layout?: HeatmapCellLayout; } export interface PanelOptions { calculate?: boolean; calculation?: HeatmapCalculationOptions; color: HeatmapColorOptions; filterValues?: FilterValueRange; // was hideZeroBuckets rowsFrame?: RowsHeatmapOptions; showValue: VisibilityMode; cellGap?: number; // was cardPadding cellRadius?: number; // was cardRadius (not used, but migrated from angular) cellValues?: CellValues; yAxis: YAxisConfig; legend: HeatmapLegend; tooltip: HeatmapTooltip; exemplars: ExemplarConfig; } export const defaultPanelOptions: PanelOptions = { calculate: false, color: { mode: HeatmapColorMode.Scheme, scheme: 'Oranges', fill: 'dark-orange', scale: HeatmapColorScale.Exponential, exponent: 0.5, steps: 64, }, rowsFrame: { layout: HeatmapCellLayout.auto, }, yAxis: { axisPlacement: AxisPlacement.Left, }, cellValues: { }, showValue: VisibilityMode.Auto, tooltip: { show: true, yHistogram: false, }, legend: { show: true, }, exemplars: { color: 'rgba(255,0,255,0.7)', }, filterValues: { le: 1e-9, }, cellGap: 1, }; export interface PanelFieldConfig extends HideableFieldConfig { scaleDistribution?: ScaleDistributionConfig; } export const defaultPanelFieldConfig: PanelFieldConfig = {};
public/app/plugins/panel/heatmap/models.gen.ts
0
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.00017930248577613384, 0.0001744524051900953, 0.00016703839355614036, 0.00017600986757315695, 0.000003942879175156122 ]
{ "id": 9, "code_window": [ "\n", "type Props = OwnProps & ConnectedProps<typeof connector>;\n", "\n", "const UserListAdminPageUnConnected: React.FC<Props> = ({\n", " fetchUsers,\n", " navModel,\n", " query,\n", " changeQuery,\n", " users,\n", " showPaging,\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 61 }
// 🌟 This was machine generated. Do not edit. 🌟 // // Frame[0] {} // Name: ingress // Dimensions: 2 Fields by 1 Rows // +-------------------------------+---------------------------------+ // | Name: Time | Name: file_size | // | Labels: | Labels: dead=true, train=350117 | // | Type: []*time.Time | Type: []*int64 | // +-------------------------------+---------------------------------+ // | 2020-11-09 17:27:00 +0000 UTC | 3339 | // +-------------------------------+---------------------------------+ // // // // Frame[1] // Name: ingress // Dimensions: 2 Fields by 1 Rows // +-------------------------------+---------------------------------+ // | Name: Time | Name: file_size | // | Labels: | Labels: dead=true, train=350125 | // | Type: []*time.Time | Type: []*int64 | // +-------------------------------+---------------------------------+ // | 2020-11-10 12:29:00 +0000 UTC | 3666 | // +-------------------------------+---------------------------------+ // // // // Frame[2] // Name: ingress // Dimensions: 2 Fields by 1 Rows // +-------------------------------+---------------------------------+ // | Name: Time | Name: file_size | // | Labels: | Labels: dead=true, train=350236 | // | Type: []*time.Time | Type: []*int64 | // +-------------------------------+---------------------------------+ // | 2020-11-09 19:01:00 +0000 UTC | 3570 | // +-------------------------------+---------------------------------+ // // // // Frame[3] // Name: ingress // Dimensions: 2 Fields by 1 Rows // +-------------------------------+---------------------------------+ // | Name: Time | Name: file_size | // | Labels: | Labels: dead=true, train=350410 | // | Type: []*time.Time | Type: []*int64 | // +-------------------------------+---------------------------------+ // | 2020-11-09 07:13:00 +0000 UTC | 2772 | // +-------------------------------+---------------------------------+ // // // 🌟 This was machine generated. Do not edit. 🌟 { "frames": [ { "schema": { "name": "ingress", "meta": {}, "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true } }, { "name": "file_size", "type": "number", "typeInfo": { "frame": "int64", "nullable": true }, "labels": { "dead": "true", "train": "350117" } } ] }, "data": { "values": [ [ 1604942820000 ], [ 3339 ] ] } }, { "schema": { "name": "ingress", "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true } }, { "name": "file_size", "type": "number", "typeInfo": { "frame": "int64", "nullable": true }, "labels": { "dead": "true", "train": "350125" } } ] }, "data": { "values": [ [ 1605011340000 ], [ 3666 ] ] } }, { "schema": { "name": "ingress", "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true } }, { "name": "file_size", "type": "number", "typeInfo": { "frame": "int64", "nullable": true }, "labels": { "dead": "true", "train": "350236" } } ] }, "data": { "values": [ [ 1604948460000 ], [ 3570 ] ] } }, { "schema": { "name": "ingress", "fields": [ { "name": "Time", "type": "time", "typeInfo": { "frame": "time.Time", "nullable": true } }, { "name": "file_size", "type": "number", "typeInfo": { "frame": "int64", "nullable": true }, "labels": { "dead": "true", "train": "350410" } } ] }, "data": { "values": [ [ 1604905980000 ], [ 2772 ] ] } } ] }
pkg/tsdb/influxdb/flux/testdata/boolean_tag.golden.jsonc
0
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.0001785747881513089, 0.00017446624406147748, 0.00017204908363055438, 0.00017393410962540656, 0.0000017926942064150353 ]
{ "id": 10, "code_window": [ " }, [fetchUsers]);\n", "\n", " const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]);\n", "\n", " return (\n", " <Page navModel={navModel}>\n", " <Page.Contents>\n", " <div className=\"page-action-bar\">\n", " <div className=\"gf-form gf-form--grow\">\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " <Page navId=\"global-users\" subTitle=\"Manage and create users across the whole Grafana server.\">\n" ], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 82 }
import { css, cx } from '@emotion/css'; import React, { ComponentType, useEffect, useMemo, memo } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { GrafanaTheme2 } from '@grafana/data'; import { Icon, IconName, LinkButton, Pagination, RadioButtonGroup, Tooltip, useStyles2, FilterInput, } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; import { TagBadge } from 'app/core/components/TagFilter/TagBadge'; import { contextSrv } from 'app/core/core'; import PageLoader from '../../core/components/PageLoader/PageLoader'; import { getNavModel } from '../../core/selectors/navModel'; import { AccessControlAction, StoreState, Unit, UserDTO, UserFilter } from '../../types'; import { changeFilter, changePage, changeQuery, fetchUsers } from './state/actions'; export interface FilterProps { filters: UserFilter[]; onChange: (filter: any) => void; className?: string; } const extraFilters: Array<ComponentType<FilterProps>> = []; export const addExtraFilters = (filter: ComponentType<FilterProps>) => { extraFilters.push(filter); }; const mapDispatchToProps = { fetchUsers, changeQuery, changePage, changeFilter, }; const mapStateToProps = (state: StoreState) => ({ navModel: getNavModel(state.navIndex, 'global-users'), users: state.userListAdmin.users, query: state.userListAdmin.query, showPaging: state.userListAdmin.showPaging, totalPages: state.userListAdmin.totalPages, page: state.userListAdmin.page, filters: state.userListAdmin.filters, isLoading: state.userListAdmin.isLoading, }); const connector = connect(mapStateToProps, mapDispatchToProps); interface OwnProps {} type Props = OwnProps & ConnectedProps<typeof connector>; const UserListAdminPageUnConnected: React.FC<Props> = ({ fetchUsers, navModel, query, changeQuery, users, showPaging, totalPages, page, changePage, changeFilter, filters, isLoading, }) => { const styles = useStyles2(getStyles); useEffect(() => { fetchUsers(); }, [fetchUsers]); const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]); return ( <Page navModel={navModel}> <Page.Contents> <div className="page-action-bar"> <div className="gf-form gf-form--grow"> <FilterInput placeholder="Search user by login, email, or name." autoFocus={true} value={query} onChange={changeQuery} /> <RadioButtonGroup options={[ { label: 'All users', value: false }, { label: 'Active last 30 days', value: true }, ]} onChange={(value) => changeFilter({ name: 'activeLast30Days', value })} value={filters.find((f) => f.name === 'activeLast30Days')?.value} className={styles.filter} /> {extraFilters.map((FilterComponent, index) => ( <FilterComponent key={index} filters={filters} onChange={changeFilter} className={styles.filter} /> ))} </div> {contextSrv.hasPermission(AccessControlAction.UsersCreate) && ( <LinkButton href="admin/users/create" variant="primary"> New user </LinkButton> )} </div> {isLoading ? ( <PageLoader /> ) : ( <> <div className={cx(styles.table, 'admin-list-table')}> <table className="filter-table form-inline filter-table--hover"> <thead> <tr> <th></th> <th>Login</th> <th>Email</th> <th>Name</th> <th>Belongs to</th> {showLicensedRole && ( <th> Licensed role{' '} <Tooltip placement="top" content={ <> Licensed role is based on a user&apos;s Org role (i.e. Viewer, Editor, Admin) and their dashboard/folder permissions.{' '} <a className={styles.link} target="_blank" rel="noreferrer noopener" href={ 'https://grafana.com/docs/grafana/next/enterprise/license/license-restrictions/#active-users-limit' } > Learn more </a> </> } > <Icon name="question-circle" /> </Tooltip> </th> )} <th> Last active&nbsp; <Tooltip placement="top" content="Time since user was seen using Grafana"> <Icon name="question-circle" /> </Tooltip> </th> <th style={{ width: '1%' }}></th> </tr> </thead> <tbody> {users.map((user) => ( <UserListItem user={user} showLicensedRole={showLicensedRole} key={user.id} /> ))} </tbody> </table> </div> {showPaging && <Pagination numberOfPages={totalPages} currentPage={page} onNavigate={changePage} />} </> )} </Page.Contents> </Page> ); }; const getUsersAriaLabel = (name: string) => { return `Edit user's ${name} details`; }; type UserListItemProps = { user: UserDTO; showLicensedRole: boolean; }; const UserListItem = memo(({ user, showLicensedRole }: UserListItemProps) => { const styles = useStyles2(getStyles); const editUrl = `admin/users/edit/${user.id}`; return ( <tr key={user.id}> <td className="width-4 text-center link-td"> <a href={editUrl} aria-label={`Edit user's ${user.name} details`}> <img className="filter-table__avatar" src={user.avatarUrl} alt={`Avatar for user ${user.name}`} /> </a> </td> <td className="link-td max-width-10"> <a className="ellipsis" href={editUrl} title={user.login} aria-label={getUsersAriaLabel(user.name)}> {user.login} </a> </td> <td className="link-td max-width-10"> <a className="ellipsis" href={editUrl} title={user.email} aria-label={getUsersAriaLabel(user.name)}> {user.email} </a> </td> <td className="link-td max-width-10"> <a className="ellipsis" href={editUrl} title={user.name} aria-label={getUsersAriaLabel(user.name)}> {user.name} </a> </td> <td className={styles.row} title={ user.orgs?.length ? `The user is a member of the following organizations: ${user.orgs.map((org) => org.name).join(',')}` : undefined } > <OrgUnits units={user.orgs} icon={'building'} /> {user.isAdmin && ( <a href={editUrl} aria-label={getUsersAriaLabel(user.name)}> <Tooltip placement="top" content="Grafana Admin"> <Icon name="shield" /> </Tooltip> </a> )} </td> {showLicensedRole && ( <td className={cx('link-td', styles.iconRow)}> <a className="ellipsis" href={editUrl} title={user.name} aria-label={getUsersAriaLabel(user.name)}> {user.licensedRole === 'None' ? ( <span className={styles.disabled}> Not assigned{' '} <Tooltip placement="top" content="A licensed role will be assigned when this user signs in"> <Icon name="question-circle" /> </Tooltip> </span> ) : ( user.licensedRole )} </a> </td> )} <td className="link-td"> {user.lastSeenAtAge && ( <a href={editUrl} aria-label={`Last seen at ${user.lastSeenAtAge}. Follow to edit user's ${user.name} details.`} > {user.lastSeenAtAge === '10 years' ? <span className={styles.disabled}>Never</span> : user.lastSeenAtAge} </a> )} </td> <td className="text-right"> {Array.isArray(user.authLabels) && user.authLabels.length > 0 && ( <TagBadge label={user.authLabels[0]} removeIcon={false} count={0} /> )} </td> <td className="text-right"> {user.isDisabled && <span className="label label-tag label-tag--gray">Disabled</span>} </td> </tr> ); }); UserListItem.displayName = 'UserListItem'; type OrgUnitProps = { units?: Unit[]; icon: IconName }; const OrgUnits = ({ units, icon }: OrgUnitProps) => { const styles = useStyles2(getStyles); if (!units?.length) { return null; } return units.length > 1 ? ( <Tooltip placement={'top'} content={ <div className={styles.unitTooltip}> {units?.map((unit) => ( <a href={unit.url} className={styles.link} title={unit.name} key={unit.name} aria-label={`Edit ${unit.name}`} > {unit.name} </a> ))} </div> } > <div className={styles.unitItem}> <Icon name={icon} /> <span>{units.length}</span> </div> </Tooltip> ) : ( <a href={units[0].url} className={styles.unitItem} title={units[0].name} key={units[0].name} aria-label={`Edit ${units[0].name}`} > <Icon name={icon} /> {units[0].name} </a> ); }; const getStyles = (theme: GrafanaTheme2) => { return { table: css` margin-top: ${theme.spacing(3)}; `, filter: css` margin: 0 ${theme.spacing(1)}; `, iconRow: css` svg { margin-left: ${theme.spacing(0.5)}; } `, row: css` display: flex; align-items: center; height: 100% !important; a { padding: ${theme.spacing(0.5)} 0 !important; } `, unitTooltip: css` display: flex; flex-direction: column; `, unitItem: css` cursor: pointer; padding: ${theme.spacing(0.5)} 0; margin-right: ${theme.spacing(1)}; `, disabled: css` color: ${theme.colors.text.disabled}; `, link: css` color: inherit; cursor: pointer; text-decoration: underline; `, }; }; export default connector(UserListAdminPageUnConnected);
public/app/features/admin/UserListAdminPage.tsx
1
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.999168872833252, 0.13884669542312622, 0.00016438125749118626, 0.00017575389938428998, 0.34455564618110657 ]
{ "id": 10, "code_window": [ " }, [fetchUsers]);\n", "\n", " const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]);\n", "\n", " return (\n", " <Page navModel={navModel}>\n", " <Page.Contents>\n", " <div className=\"page-action-bar\">\n", " <div className=\"gf-form gf-form--grow\">\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " <Page navId=\"global-users\" subTitle=\"Manage and create users across the whole Grafana server.\">\n" ], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 82 }
import React, { useState } from 'react'; import { getBackendSrv, locationService } from '@grafana/runtime'; import { Button, Form, Field, Input, FieldSet } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; import { TeamRolePicker } from 'app/core/components/RolePicker/TeamRolePicker'; import { updateTeamRoles } from 'app/core/components/RolePicker/api'; import { useRoleOptions } from 'app/core/components/RolePicker/hooks'; import { contextSrv } from 'app/core/core'; import { AccessControlAction, Role } from 'app/types'; interface TeamDTO { email: string; name: string; } export const CreateTeam = (): JSX.Element => { const currentOrgId = contextSrv.user.orgId; const [pendingRoles, setPendingRoles] = useState<Role[]>([]); const [{ roleOptions }] = useRoleOptions(currentOrgId); const canUpdateRoles = contextSrv.hasPermission(AccessControlAction.ActionUserRolesAdd) && contextSrv.hasPermission(AccessControlAction.ActionUserRolesRemove); const createTeam = async (formModel: TeamDTO) => { const newTeam = await getBackendSrv().post('/api/teams', formModel); if (newTeam.teamId) { try { await contextSrv.fetchUserPermissions(); if (contextSrv.licensedAccessControlEnabled() && canUpdateRoles) { await updateTeamRoles(pendingRoles, newTeam.teamId, newTeam.orgId); } } catch (e) { console.error(e); } locationService.push(`/org/teams/edit/${newTeam.teamId}`); } }; return ( <Page navId="teams"> <Page.Contents> <Form onSubmit={createTeam}> {({ register, errors }) => ( <FieldSet label="New Team"> <Field label="Name" required invalid={!!errors.name} error="Team name is required"> <Input {...register('name', { required: true })} id="team-name" width={60} /> </Field> {contextSrv.licensedAccessControlEnabled() && ( <Field label="Role"> <TeamRolePicker teamId={0} roleOptions={roleOptions} disabled={false} apply={true} onApplyRoles={setPendingRoles} pendingRoles={pendingRoles} /> </Field> )} <Field label={'Email'} description={'This is optional and is primarily used for allowing custom team avatars.'} > <Input {...register('email')} type="email" id="team-email" placeholder="[email protected]" width={60} /> </Field> <div className="gf-form-button-row"> <Button type="submit" variant="primary"> Create </Button> </div> </FieldSet> )} </Form> </Page.Contents> </Page> ); }; export default CreateTeam;
public/app/features/teams/CreateTeam.tsx
0
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.00021842357818968594, 0.00017612996452953666, 0.00016465406224597245, 0.00016862864140421152, 0.000016570234947721474 ]
{ "id": 10, "code_window": [ " }, [fetchUsers]);\n", "\n", " const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]);\n", "\n", " return (\n", " <Page navModel={navModel}>\n", " <Page.Contents>\n", " <div className=\"page-action-bar\">\n", " <div className=\"gf-form gf-form--grow\">\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " <Page navId=\"global-users\" subTitle=\"Manage and create users across the whole Grafana server.\">\n" ], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 82 }
import React from 'react'; import { PanelPlugin } from '@grafana/data'; import { config, DataSourcePicker } from '@grafana/runtime'; import { TagsInput } from '@grafana/ui'; import { FolderPicker } from 'app/core/components/Select/FolderPicker'; import { ALL_FOLDER, GENERAL_FOLDER, ReadonlyFolderPicker, } from 'app/core/components/Select/ReadonlyFolderPicker/ReadonlyFolderPicker'; import { PermissionLevelString } from 'app/types'; import { AlertList } from './AlertList'; import { alertListPanelMigrationHandler } from './AlertListMigrationHandler'; import { GroupBy } from './GroupByWithLoading'; import { UnifiedAlertList } from './UnifiedAlertList'; import { AlertListSuggestionsSupplier } from './suggestions'; import { AlertListOptions, GroupMode, ShowOption, SortOrder, UnifiedAlertListOptions, ViewMode } from './types'; function showIfCurrentState(options: AlertListOptions) { return options.showOptions === ShowOption.Current; } const alertList = new PanelPlugin<AlertListOptions>(AlertList) .setPanelOptions((builder) => { builder .addSelect({ name: 'Show', path: 'showOptions', settings: { options: [ { label: 'Current state', value: ShowOption.Current }, { label: 'Recent state changes', value: ShowOption.RecentChanges }, ], }, defaultValue: ShowOption.Current, category: ['Options'], }) .addNumberInput({ name: 'Max items', path: 'maxItems', defaultValue: 10, category: ['Options'], }) .addSelect({ name: 'Sort order', path: 'sortOrder', settings: { options: [ { label: 'Alphabetical (asc)', value: SortOrder.AlphaAsc }, { label: 'Alphabetical (desc)', value: SortOrder.AlphaDesc }, { label: 'Importance', value: SortOrder.Importance }, { label: 'Time (asc)', value: SortOrder.TimeAsc }, { label: 'Time (desc)', value: SortOrder.TimeDesc }, ], }, defaultValue: SortOrder.AlphaAsc, category: ['Options'], }) .addBooleanSwitch({ path: 'dashboardAlerts', name: 'Alerts from this dashboard', defaultValue: false, category: ['Options'], }) .addTextInput({ path: 'alertName', name: 'Alert name', defaultValue: '', category: ['Filter'], showIf: showIfCurrentState, }) .addTextInput({ path: 'dashboardTitle', name: 'Dashboard title', defaultValue: '', category: ['Filter'], showIf: showIfCurrentState, }) .addCustomEditor({ path: 'folderId', name: 'Folder', id: 'folderId', defaultValue: null, editor: function RenderFolderPicker({ value, onChange }) { return ( <ReadonlyFolderPicker initialFolderId={value} onChange={(folder) => onChange(folder?.id)} extraFolders={[ALL_FOLDER, GENERAL_FOLDER]} /> ); }, category: ['Filter'], showIf: showIfCurrentState, }) .addCustomEditor({ id: 'tags', path: 'tags', name: 'Tags', description: '', defaultValue: [], editor(props) { return <TagsInput tags={props.value} onChange={props.onChange} />; }, category: ['Filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.ok', name: 'Ok', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.paused', name: 'Paused', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.no_data', name: 'No data', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.execution_error', name: 'Execution error', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.alerting', name: 'Alerting', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }) .addBooleanSwitch({ path: 'stateFilter.pending', name: 'Pending', defaultValue: false, category: ['State filter'], showIf: showIfCurrentState, }); }) .setMigrationHandler(alertListPanelMigrationHandler) .setSuggestionsSupplier(new AlertListSuggestionsSupplier()); const unifiedAlertList = new PanelPlugin<UnifiedAlertListOptions>(UnifiedAlertList).setPanelOptions((builder) => { builder .addRadio({ path: 'viewMode', name: 'View mode', description: 'Toggle between list view and stat view', defaultValue: ViewMode.List, settings: { options: [ { label: 'List', value: ViewMode.List }, { label: 'Stat', value: ViewMode.Stat }, ], }, category: ['Options'], }) .addRadio({ path: 'groupMode', name: 'Group mode', description: 'How alert instances should be grouped', defaultValue: GroupMode.Default, settings: { options: [ { value: GroupMode.Default, label: 'Default grouping' }, { value: GroupMode.Custom, label: 'Custom grouping' }, ], }, category: ['Options'], }) .addCustomEditor({ path: 'groupBy', name: 'Group by', description: 'Filter alerts using label querying', id: 'groupBy', defaultValue: [], showIf: (options) => options.groupMode === GroupMode.Custom, category: ['Options'], editor: (props) => { return ( <GroupBy id={props.id ?? 'groupBy'} defaultValue={props.value.map((value: string) => ({ label: value, value }))} onChange={props.onChange} /> ); }, }) .addNumberInput({ name: 'Max items', path: 'maxItems', description: 'Maximum alerts to display', defaultValue: 20, category: ['Options'], }) .addSelect({ name: 'Sort order', path: 'sortOrder', description: 'Sort order of alerts and alert instances', settings: { options: [ { label: 'Alphabetical (asc)', value: SortOrder.AlphaAsc }, { label: 'Alphabetical (desc)', value: SortOrder.AlphaDesc }, { label: 'Importance', value: SortOrder.Importance }, { label: 'Time (asc)', value: SortOrder.TimeAsc }, { label: 'Time (desc)', value: SortOrder.TimeDesc }, ], }, defaultValue: SortOrder.AlphaAsc, category: ['Options'], }) .addBooleanSwitch({ path: 'dashboardAlerts', name: 'Alerts from this dashboard', description: 'Show alerts from this dashboard', defaultValue: false, category: ['Options'], }) .addTextInput({ path: 'alertName', name: 'Alert name', description: 'Filter for alerts containing this text', defaultValue: '', category: ['Filter'], }) .addTextInput({ path: 'alertInstanceLabelFilter', name: 'Alert instance label', description: 'Filter alert instances using label querying, ex: {severity="critical", instance=~"cluster-us-.+"}', defaultValue: '', category: ['Filter'], }) .addCustomEditor({ path: 'folder', name: 'Folder', description: 'Filter for alerts in the selected folder', id: 'folder', defaultValue: null, editor: function RenderFolderPicker(props) { return ( <FolderPicker enableReset={true} showRoot={false} allowEmpty={true} initialTitle={props.value?.title} initialFolderId={props.value?.id} permissionLevel={PermissionLevelString.View} onClear={() => props.onChange('')} {...props} /> ); }, category: ['Filter'], }) .addCustomEditor({ path: 'datasource', name: 'Datasource', description: 'Filter alerts from selected datasource', id: 'datasource', defaultValue: null, editor: function RenderDatasourcePicker(props) { return ( <DataSourcePicker {...props} type={['prometheus', 'loki', 'grafana']} noDefault current={props.value} onChange={(ds) => props.onChange(ds.name)} onClear={() => props.onChange('')} /> ); }, category: ['Filter'], }) .addBooleanSwitch({ path: 'stateFilter.firing', name: 'Alerting / Firing', defaultValue: true, category: ['Alert state filter'], }) .addBooleanSwitch({ path: 'stateFilter.pending', name: 'Pending', defaultValue: true, category: ['Alert state filter'], }) .addBooleanSwitch({ path: 'stateFilter.noData', name: 'No Data', defaultValue: false, category: ['Alert state filter'], }) .addBooleanSwitch({ path: 'stateFilter.normal', name: 'Normal', defaultValue: false, category: ['Alert state filter'], }) .addBooleanSwitch({ path: 'stateFilter.error', name: 'Error', defaultValue: true, category: ['Alert state filter'], }); }); export const plugin = config.unifiedAlertingEnabled ? unifiedAlertList : alertList;
public/app/plugins/panel/alertlist/module.tsx
0
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.000178674774360843, 0.00017531508638057858, 0.0001682630681898445, 0.0001754846889525652, 0.000002327508582311566 ]
{ "id": 10, "code_window": [ " }, [fetchUsers]);\n", "\n", " const showLicensedRole = useMemo(() => users.some((user) => user.licensedRole), [users]);\n", "\n", " return (\n", " <Page navModel={navModel}>\n", " <Page.Contents>\n", " <div className=\"page-action-bar\">\n", " <div className=\"gf-form gf-form--grow\">\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " <Page navId=\"global-users\" subTitle=\"Manage and create users across the whole Grafana server.\">\n" ], "file_path": "public/app/features/admin/UserListAdminPage.tsx", "type": "replace", "edit_start_line_idx": 82 }
import { Props } from '@storybook/addon-docs/blocks'; import { InlineField } from './InlineField'; # InlineField A basic component for rendering form elements, like `Input`, `Select`, `Checkbox`, etc, inline together with `InlineLabel`. If the child element has `id` specified, the label's `htmlFor` attribute, pointing to the id, will be added. The width of the `InlineLabel` can be modified via `labelWidth` prop, which is a multiple of 8px. For example, an `InlineField` with `labelWidth={20}` will have a label 160px wide. If `tooltip` prop is provided, an info icon with supplied tooltip content will be rendered inside the label. # Usage ```jsx <InlineField label="Inline field"> <Input placeholder="Inline input" /> </InlineField> ``` <Props of={InlineField} />
packages/grafana-ui/src/components/Forms/InlineField.mdx
0
https://github.com/grafana/grafana/commit/05508081263463ad91316b4cae6c290669b12b48
[ 0.0001739818835631013, 0.00017056484648492187, 0.00016568388673476875, 0.00017202874005306512, 0.0000035422633573034545 ]
{ "id": 0, "code_window": [ "import _Array$from from \"../../core-js/array/from\";\n", "export default function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n", "}\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "import _Array$from from \"@babel/runtime/core-js/array/from\";\n" ], "file_path": "packages/babel-runtime/helpers/es6/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
{ "name": "@babel/standalone", "version": "7.0.0-beta.3", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ "babel.js", "babel.min.js", "src" ], "devDependencies": { "@babel/core": "7.0.0-beta.3", "@babel/plugin-check-es2015-constants": "7.0.0-beta.3", "@babel/plugin-external-helpers": "7.0.0-beta.3", "babel-plugin-inline-replace-variables": "1.3.1", "@babel/plugin-syntax-async-generators": "7.0.0-beta.3", "@babel/plugin-syntax-class-properties": "7.0.0-beta.3", "@babel/plugin-syntax-decorators": "7.0.0-beta.3", "@babel/plugin-syntax-do-expressions": "7.0.0-beta.3", "@babel/plugin-syntax-dynamic-import": "7.0.0-beta.3", "@babel/plugin-syntax-export-extensions": "7.0.0-beta.3", "@babel/plugin-syntax-flow": "7.0.0-beta.3", "@babel/plugin-syntax-function-bind": "7.0.0-beta.3", "@babel/plugin-syntax-function-sent": "7.0.0-beta.3", "@babel/plugin-syntax-jsx": "7.0.0-beta.3", "@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-async-generator-functions": "7.0.0-beta.3", "@babel/plugin-transform-async-to-generator": "7.0.0-beta.3", "@babel/plugin-transform-async-to-module-method": "7.0.0-beta.3", "@babel/plugin-transform-class-properties": "7.0.0-beta.3", "@babel/plugin-transform-decorators": "7.0.0-beta.3", "@babel/plugin-transform-do-expressions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-arrow-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoped-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoping": "7.0.0-beta.3", "@babel/plugin-transform-es2015-classes": "7.0.0-beta.3", "@babel/plugin-transform-es2015-computed-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-destructuring": "7.0.0-beta.3", "@babel/plugin-transform-es2015-duplicate-keys": "7.0.0-beta.3", "@babel/plugin-transform-es2015-for-of": "7.0.0-beta.3", "@babel/plugin-transform-es2015-function-name": "7.0.0-beta.3", "@babel/plugin-transform-es2015-instanceof": "7.0.0-beta.3", "@babel/plugin-transform-es2015-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-amd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-commonjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-systemjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-umd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-object-super": "7.0.0-beta.3", "@babel/plugin-transform-es2015-parameters": "7.0.0-beta.3", "@babel/plugin-transform-es2015-shorthand-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-spread": "7.0.0-beta.3", "@babel/plugin-transform-es2015-sticky-regex": "7.0.0-beta.3", "@babel/plugin-transform-es2015-template-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-typeof-symbol": "7.0.0-beta.3", "@babel/plugin-transform-es2015-unicode-regex": "7.0.0-beta.3", "@babel/plugin-transform-es3-member-expression-literals": "7.0.0-beta.3", "@babel/plugin-transform-es3-property-literals": "7.0.0-beta.3", "@babel/plugin-transform-es5-property-mutators": "7.0.0-beta.3", "@babel/plugin-transform-eval": "7.0.0-beta.3", "@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.3", "@babel/plugin-transform-flow-comments": "7.0.0-beta.3", "@babel/plugin-transform-flow-strip-types": "7.0.0-beta.3", "@babel/plugin-transform-function-bind": "7.0.0-beta.3", "@babel/plugin-transform-jscript": "7.0.0-beta.3", "@babel/plugin-transform-new-target": "7.0.0-beta.3", "@babel/plugin-transform-object-assign": "7.0.0-beta.3", "@babel/plugin-transform-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-transform-object-set-prototype-of-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-proto-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-react-constant-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-display-name": "7.0.0-beta.3", "@babel/plugin-transform-react-inline-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-compat": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-self": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-source": "7.0.0-beta.3", "@babel/plugin-transform-regenerator": "7.0.0-beta.3", "@babel/plugin-transform-runtime": "7.0.0-beta.3", "@babel/plugin-transform-strict-mode": "7.0.0-beta.3", "babel-plugin-transform-unicode-property-regex": "^2.0.5", "@babel/preset-env": "2.0.0-alpha.19", "@babel/preset-es2015": "7.0.0-beta.3", "@babel/preset-es2016": "7.0.0-beta.3", "@babel/preset-es2017": "7.0.0-beta.3", "@babel/preset-flow": "7.0.0-beta.3", "@babel/preset-react": "7.0.0-beta.3", "@babel/preset-stage-0": "7.0.0-beta.3", "@babel/preset-stage-1": "7.0.0-beta.3", "@babel/preset-stage-2": "7.0.0-beta.3", "@babel/preset-stage-3": "7.0.0-beta.3", "@babel/preset-typescript": "7.0.0-beta.3" }, "keywords": [ "babel", "babeljs", "6to5", "transpile", "transpiler" ], "author": "Daniel Lo Nigro <[email protected]> (http://dan.cx/)", "license": "MIT", "bugs": { "url": "https://github.com/babel/babel-standalone/issues" }, "homepage": "https://github.com/babel/babel-standalone#readme" }
packages/babel-standalone/package.json
1
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017432494496461004, 0.00016842319746501744, 0.00016525285900570452, 0.0001666535681579262, 0.0000028902688882226357 ]
{ "id": 0, "code_window": [ "import _Array$from from \"../../core-js/array/from\";\n", "export default function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n", "}\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "import _Array$from from \"@babel/runtime/core-js/array/from\";\n" ], "file_path": "packages/babel-runtime/helpers/es6/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
throw err; throw Error("foobar"); throw new Error("foobar"); throw /a/;
packages/babel-generator/test/fixtures/types/ThrowStatement/actual.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017488586308900267, 0.00017488586308900267, 0.00017488586308900267, 0.00017488586308900267, 0 ]
{ "id": 0, "code_window": [ "import _Array$from from \"../../core-js/array/from\";\n", "export default function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n", "}\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "import _Array$from from \"@babel/runtime/core-js/array/from\";\n" ], "file_path": "packages/babel-runtime/helpers/es6/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of the React source tree. */ const scriptTypes = ["text/jsx", "text/babel"]; let headEl; let inlineScriptCount = 0; /** * Actually transform the code. */ function transformCode(transformFn, script) { let source; if (script.url != null) { source = script.url; } else { source = "Inline Babel script"; inlineScriptCount++; if (inlineScriptCount > 1) { source += " (" + inlineScriptCount + ")"; } } return transformFn(script.content, { filename: source, ...buildBabelOptions(script), }).code; } /** * Builds the Babel options for transforming the specified script, using some * sensible default presets and plugins if none were explicitly provided. */ function buildBabelOptions(script) { return { presets: script.presets || ["react", "es2015"], plugins: script.plugins || [ "transform-class-properties", "transform-object-rest-spread", "transform-flow-strip-types", ], sourceMaps: "inline", }; } /** * Appends a script element at the end of the <head> with the content of code, * after transforming it. */ function run(transformFn, script) { const scriptEl = document.createElement("script"); scriptEl.text = transformCode(transformFn, script); headEl.appendChild(scriptEl); } /** * Load script from the provided url and pass the content to the callback. */ function load(url, successCallback, errorCallback) { const xhr = new XMLHttpRequest(); // async, however scripts will be executed in the order they are in the // DOM to mirror normal script loading. xhr.open("GET", url, true); if ("overrideMimeType" in xhr) { xhr.overrideMimeType("text/plain"); } xhr.onreadystatechange = function() { if (xhr.readyState === 4) { if (xhr.status === 0 || xhr.status === 200) { successCallback(xhr.responseText); } else { errorCallback(); throw new Error("Could not load " + url); } } }; return xhr.send(null); } /** * Converts a comma-separated data attribute string into an array of values. If * the string is empty, returns an empty array. If the string is not defined, * returns null. */ function getPluginsOrPresetsFromScript(script, attributeName) { const rawValue = script.getAttribute(attributeName); if (rawValue === "") { // Empty string means to not load ANY presets or plugins return []; } if (!rawValue) { // Any other falsy value (null, undefined) means we're not overriding this // setting, and should use the default. return null; } return rawValue.split(",").map(item => item.trim()); } /** * Loop over provided script tags and get the content, via innerHTML if an * inline script, or by using XHR. Transforms are applied if needed. The scripts * are executed in the order they are found on the page. */ function loadScripts(transformFn, scripts) { const result = []; const count = scripts.length; function check() { let script, i; for (i = 0; i < count; i++) { script = result[i]; if (script.loaded && !script.executed) { script.executed = true; run(transformFn, script); } else if (!script.loaded && !script.error && !script.async) { break; } } } scripts.forEach((script, i) => { const scriptData = { // script.async is always true for non-JavaScript script tags async: script.hasAttribute("async"), error: false, executed: false, plugins: getPluginsOrPresetsFromScript(script, "data-plugins"), presets: getPluginsOrPresetsFromScript(script, "data-presets"), }; if (script.src) { result[i] = { ...scriptData, content: null, loaded: false, url: script.src, }; load( script.src, content => { result[i].loaded = true; result[i].content = content; check(); }, () => { result[i].error = true; check(); }, ); } else { result[i] = { ...scriptData, content: script.innerHTML, loaded: true, url: null, }; } }); check(); } /** * Run script tags with type="text/jsx". * @param {Array} scriptTags specify script tags to run, run all in the <head> if not given */ export function runScripts(transformFn, scripts) { headEl = document.getElementsByTagName("head")[0]; if (!scripts) { scripts = document.getElementsByTagName("script"); } // Array.prototype.slice cannot be used on NodeList on IE8 const jsxScripts = []; for (let i = 0; i < scripts.length; i++) { const script = scripts.item(i); // Support the old type="text/jsx;harmony=true" const type = script.type.split(";")[0]; if (scriptTypes.indexOf(type) !== -1) { jsxScripts.push(script); } } if (jsxScripts.length === 0) { return; } console.warn( "You are using the in-browser Babel transformer. Be sure to precompile " + "your scripts for production - https://babeljs.io/docs/setup/", ); loadScripts(transformFn, jsxScripts); }
packages/babel-standalone/src/transformScriptTags.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.006449373438954353, 0.00047586800064891577, 0.00016559970390517265, 0.00017029633454512805, 0.0013359029544517398 ]
{ "id": 0, "code_window": [ "import _Array$from from \"../../core-js/array/from\";\n", "export default function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n", "}\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "import _Array$from from \"@babel/runtime/core-js/array/from\";\n" ], "file_path": "packages/babel-runtime/helpers/es6/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
class C1 { m() { return function() { return this; }(); } } class C2 extends C1 { m() { return function() { return this; }(); } } var C3 = class { m() { return function() { return this; }(); } }; var C4 = class extends C3 { m() { return function() { return this; }(); } }; assert.isUndefined(new C1().m()); assert.isUndefined(new C2().m()); assert.isUndefined(new C3().m()); assert.isUndefined(new C4().m());
packages/babel-preset-es2015/test/fixtures/traceur/Classes/Strict.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017468169971834868, 0.00016962671361397952, 0.0001677331601968035, 0.00016804599727038294, 0.0000029219361294963164 ]
{ "id": 1, "code_window": [ "var _Array$from = require(\"../core-js/array/from\");\n", "\n", "function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "var _Array$from = require(\"@babel/runtime/core-js/array/from\");\n" ], "file_path": "packages/babel-runtime/helpers/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
import _Array$from from "../../core-js/array/from"; export default function _toArray(arr) { return Array.isArray(arr) ? arr : _Array$from(arr); }
packages/babel-runtime/helpers/es6/toArray.js
1
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.9946070313453674, 0.9946070313453674, 0.9946070313453674, 0.9946070313453674, 0 ]
{ "id": 1, "code_window": [ "var _Array$from = require(\"../core-js/array/from\");\n", "\n", "function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "var _Array$from = require(\"@babel/runtime/core-js/array/from\");\n" ], "file_path": "packages/babel-runtime/helpers/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
import React from "react"; const HOC = component => component; const Parent = ({}) => ( <div className="parent"> <Child/> </div> ); export default Parent; let Child = () => ( <div className="child"> ChildTextContent </div> ); Child = HOC(Child);
packages/babel-plugin-transform-react-constant-elements/test/fixtures/constant-elements/dont-hoist-before-hoc/actual.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017153048247564584, 0.00017141312127932906, 0.0001712957746349275, 0.00017141312127932906, 1.1735392035916448e-7 ]
{ "id": 1, "code_window": [ "var _Array$from = require(\"../core-js/array/from\");\n", "\n", "function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "var _Array$from = require(\"@babel/runtime/core-js/array/from\");\n" ], "file_path": "packages/babel-runtime/helpers/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
var t = new Map(); var objectKey = {}; var stringKey = 'keykeykey'; var numberKey = 42.24; var booleanKey = true; var undefinedKey = undefined; var nullKey = null; var nanKey = NaN; var zeroKey = 0; assert.equal(t.size, 0); t.set(undefinedKey, 'value8'); t.set(nullKey, 'value9'); t.set(stringKey, 'value5'); t.set(numberKey, 'value6'); t.set(booleanKey, 'value7'); t.set(objectKey, 'value1'); t.set(nanKey, 'value10'); t.set(zeroKey, 'value11'); assert.equal(t.size, 8); assert.equal(t.get(objectKey), 'value1'); assert.equal(t.get(stringKey), 'value5'); assert.equal(t.get(numberKey), 'value6'); assert.equal(t.get(booleanKey), 'value7'); assert.equal(t.get(undefinedKey), 'value8'); assert.equal(t.get(nullKey), 'value9'); assert.equal(t.get(nanKey), 'value10'); assert.equal(t.get(zeroKey), 'value11'); assert.equal(t.get({}), undefined); assert.equal(t.get('keykeykey'), 'value5'); assert.equal(t.get(42.24), 'value6'); assert.equal(t.get(true), 'value7'); assert.equal(t.get(undefined), 'value8'); assert.equal(t.get(null), 'value9'); assert.equal(t.get(NaN), 'value10'); assert.equal(t.get(0), 'value11'); assert.equal(t.get(1 / Infinity), 'value11'); // V8 is broken for -0 // https://code.google.com/p/v8/issues/detail?id=3906 // assert.equal(t.get(-1 / Infinity), 'value11'); assert.isTrue(!t.has({})); assert.isTrue(t.has(objectKey)); assert.isTrue(t.has(stringKey)); assert.isTrue(t.has(numberKey)); assert.isTrue(t.has(booleanKey)); assert.isTrue(t.has(undefinedKey)); assert.isTrue(t.has(nullKey)); assert.isTrue(t.has(nanKey)); assert.isTrue(t.has(zeroKey)); assert.isTrue(t.has('keykeykey')); assert.isTrue(t.has(42.24)); assert.isTrue(t.has(true)); assert.isTrue(t.has(undefined)); assert.isTrue(t.has(null)); assert.isTrue(t.has(NaN)); assert.isTrue(t.has(0)); // V8 is broken for -0 // https://code.google.com/p/v8/issues/detail?id=3906 // assert.isTrue(t.has(-0)); // forEach var arrKeys = []; var arr = []; var cnt = 0; t.forEach(function (value, key, map) { if (cnt === 0) { t.set('foo', 42); } assert.equal(map, t); arrKeys.push(key); arr.push(value); cnt++; }); assert.equal(cnt, 9); t.delete('foo'); assertArrayEquals(arrKeys, [ undefinedKey, nullKey, stringKey, numberKey, booleanKey, objectKey, nanKey, zeroKey, 'foo' ]); assertArrayEquals(arr, [ 'value8', 'value9', 'value5', 'value6', 'value7', 'value1', 'value10', 'value11', 42 ]); // iterator arrKeys = []; arr = []; cnt = 0; for (var mapIterItem of t) { if (cnt === 0) { t.set('foo', 42); } var [mapIterItemKey, mapIterItemVal] = mapIterItem; arrKeys.push(mapIterItemKey); arr.push(mapIterItemVal); cnt++; } assert.equal(cnt, 9); t.delete('foo'); assertArrayEquals(arrKeys, [ undefinedKey, nullKey, stringKey, numberKey, booleanKey, objectKey, nanKey, zeroKey, 'foo' ]); assertArrayEquals(arr, [ 'value8', 'value9', 'value5', 'value6', 'value7', 'value1', 'value10', 'value11', 42 ]); // .entries() arrKeys = []; arr = []; cnt = 0; for (var mapIterItem of t.entries()) { var [mapIterItemKey, mapIterItemVal] = mapIterItem; arrKeys.push(mapIterItemKey); arr.push(mapIterItemVal); cnt++; } assert.equal(cnt, 8); assertArrayEquals(arrKeys, [ undefinedKey, nullKey, stringKey, numberKey, booleanKey, objectKey, nanKey, zeroKey ]); assertArrayEquals(arr, [ 'value8', 'value9', 'value5', 'value6', 'value7', 'value1', 'value10', 'value11' ]); // .keys() arrKeys = []; cnt = 0; for (var mapIterKey of t.keys()) { arrKeys.push(mapIterKey); cnt++; } assert.equal(cnt, 8); assertArrayEquals(arrKeys, [ undefinedKey, nullKey, stringKey, numberKey, booleanKey, objectKey, nanKey, zeroKey ]); // .values() arr = []; cnt = 0; for (var mapIterVal of t.values()) { arr.push(mapIterVal); cnt++; } assert.equal(cnt, 8); assertArrayEquals(arr, [ 'value8', 'value9', 'value5', 'value6', 'value7', 'value1', 'value10', 'value11' ]); var t3 = new Map([ [[],[]], [{},{}], [NaN,NaN] ]); var deleteReturnValue; assert.equal(t3.size, 3); assert.isTrue(t3.has(NaN)); assert.isTrue(isNaN(t3.get(NaN))); assert.equal(t3.set(NaN, NaN), t3); // test of 23.1.3.9.11 deleteReturnValue = t3.delete(NaN); assert.equal(t3.size, 2); assert.isTrue(deleteReturnValue); deleteReturnValue = t3.delete(NaN); assert.equal(t3.size, 2); assert.isFalse(deleteReturnValue); t3.clear(); assert.equal(t3.size, 0); assert.equal(Map.prototype[Symbol.iterator], Map.prototype.entries);
packages/babel-preset-es2015/test/fixtures/traceur/Collections/Map.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.33008232712745667, 0.018318621441721916, 0.00016920329653657973, 0.0001759239676175639, 0.06592646986246109 ]
{ "id": 1, "code_window": [ "var _Array$from = require(\"../core-js/array/from\");\n", "\n", "function _toArray(arr) {\n", " return Array.isArray(arr) ? arr : _Array$from(arr);\n" ], "labels": [ "replace", "keep", "keep", "keep" ], "after_edit": [ "var _Array$from = require(\"@babel/runtime/core-js/array/from\");\n" ], "file_path": "packages/babel-runtime/helpers/toArray.js", "type": "replace", "edit_start_line_idx": 0 }
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } module.exports = _toArray;
packages/babel-runtime/helpers/builtin/toArray.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.995233952999115, 0.995233952999115, 0.995233952999115, 0.995233952999115, 0 ]
{ "id": 2, "code_window": [ " ],\n", " \"devDependencies\": {\n", " \"@babel/core\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-check-es2015-constants\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-external-helpers\": \"7.0.0-beta.3\",\n", " \"babel-plugin-inline-replace-variables\": \"1.3.1\",\n", " \"@babel/plugin-syntax-async-generators\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-class-properties\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-decorators\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 14 }
{ "name": "@babel/standalone", "version": "7.0.0-beta.3", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ "babel.js", "babel.min.js", "src" ], "devDependencies": { "@babel/core": "7.0.0-beta.3", "@babel/plugin-check-es2015-constants": "7.0.0-beta.3", "@babel/plugin-external-helpers": "7.0.0-beta.3", "babel-plugin-inline-replace-variables": "1.3.1", "@babel/plugin-syntax-async-generators": "7.0.0-beta.3", "@babel/plugin-syntax-class-properties": "7.0.0-beta.3", "@babel/plugin-syntax-decorators": "7.0.0-beta.3", "@babel/plugin-syntax-do-expressions": "7.0.0-beta.3", "@babel/plugin-syntax-dynamic-import": "7.0.0-beta.3", "@babel/plugin-syntax-export-extensions": "7.0.0-beta.3", "@babel/plugin-syntax-flow": "7.0.0-beta.3", "@babel/plugin-syntax-function-bind": "7.0.0-beta.3", "@babel/plugin-syntax-function-sent": "7.0.0-beta.3", "@babel/plugin-syntax-jsx": "7.0.0-beta.3", "@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-async-generator-functions": "7.0.0-beta.3", "@babel/plugin-transform-async-to-generator": "7.0.0-beta.3", "@babel/plugin-transform-async-to-module-method": "7.0.0-beta.3", "@babel/plugin-transform-class-properties": "7.0.0-beta.3", "@babel/plugin-transform-decorators": "7.0.0-beta.3", "@babel/plugin-transform-do-expressions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-arrow-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoped-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoping": "7.0.0-beta.3", "@babel/plugin-transform-es2015-classes": "7.0.0-beta.3", "@babel/plugin-transform-es2015-computed-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-destructuring": "7.0.0-beta.3", "@babel/plugin-transform-es2015-duplicate-keys": "7.0.0-beta.3", "@babel/plugin-transform-es2015-for-of": "7.0.0-beta.3", "@babel/plugin-transform-es2015-function-name": "7.0.0-beta.3", "@babel/plugin-transform-es2015-instanceof": "7.0.0-beta.3", "@babel/plugin-transform-es2015-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-amd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-commonjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-systemjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-umd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-object-super": "7.0.0-beta.3", "@babel/plugin-transform-es2015-parameters": "7.0.0-beta.3", "@babel/plugin-transform-es2015-shorthand-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-spread": "7.0.0-beta.3", "@babel/plugin-transform-es2015-sticky-regex": "7.0.0-beta.3", "@babel/plugin-transform-es2015-template-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-typeof-symbol": "7.0.0-beta.3", "@babel/plugin-transform-es2015-unicode-regex": "7.0.0-beta.3", "@babel/plugin-transform-es3-member-expression-literals": "7.0.0-beta.3", "@babel/plugin-transform-es3-property-literals": "7.0.0-beta.3", "@babel/plugin-transform-es5-property-mutators": "7.0.0-beta.3", "@babel/plugin-transform-eval": "7.0.0-beta.3", "@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.3", "@babel/plugin-transform-flow-comments": "7.0.0-beta.3", "@babel/plugin-transform-flow-strip-types": "7.0.0-beta.3", "@babel/plugin-transform-function-bind": "7.0.0-beta.3", "@babel/plugin-transform-jscript": "7.0.0-beta.3", "@babel/plugin-transform-new-target": "7.0.0-beta.3", "@babel/plugin-transform-object-assign": "7.0.0-beta.3", "@babel/plugin-transform-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-transform-object-set-prototype-of-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-proto-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-react-constant-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-display-name": "7.0.0-beta.3", "@babel/plugin-transform-react-inline-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-compat": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-self": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-source": "7.0.0-beta.3", "@babel/plugin-transform-regenerator": "7.0.0-beta.3", "@babel/plugin-transform-runtime": "7.0.0-beta.3", "@babel/plugin-transform-strict-mode": "7.0.0-beta.3", "babel-plugin-transform-unicode-property-regex": "^2.0.5", "@babel/preset-env": "2.0.0-alpha.19", "@babel/preset-es2015": "7.0.0-beta.3", "@babel/preset-es2016": "7.0.0-beta.3", "@babel/preset-es2017": "7.0.0-beta.3", "@babel/preset-flow": "7.0.0-beta.3", "@babel/preset-react": "7.0.0-beta.3", "@babel/preset-stage-0": "7.0.0-beta.3", "@babel/preset-stage-1": "7.0.0-beta.3", "@babel/preset-stage-2": "7.0.0-beta.3", "@babel/preset-stage-3": "7.0.0-beta.3", "@babel/preset-typescript": "7.0.0-beta.3" }, "keywords": [ "babel", "babeljs", "6to5", "transpile", "transpiler" ], "author": "Daniel Lo Nigro <[email protected]> (http://dan.cx/)", "license": "MIT", "bugs": { "url": "https://github.com/babel/babel-standalone/issues" }, "homepage": "https://github.com/babel/babel-standalone#readme" }
packages/babel-standalone/package.json
1
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.9954230189323425, 0.09423181414604187, 0.0001639295369386673, 0.0017802056390792131, 0.28502678871154785 ]
{ "id": 2, "code_window": [ " ],\n", " \"devDependencies\": {\n", " \"@babel/core\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-check-es2015-constants\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-external-helpers\": \"7.0.0-beta.3\",\n", " \"babel-plugin-inline-replace-variables\": \"1.3.1\",\n", " \"@babel/plugin-syntax-async-generators\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-class-properties\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-decorators\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 14 }
import path from "path"; import fs from "fs"; import { sync as mkdirpSync } from "mkdirp"; import homeOrTmp from "home-or-tmp"; import * as babel from "@babel/core"; import findCacheDir from "find-cache-dir"; const DEFAULT_CACHE_DIR = findCacheDir({ name: "@babel/register" }) || homeOrTmp; const DEFAULT_FILENAME = path.join( DEFAULT_CACHE_DIR, `.babel.${babel.version}.${babel.getEnv()}.json`, ); const FILENAME: string = process.env.BABEL_CACHE_PATH || DEFAULT_FILENAME; let data: Object = {}; /** * Write stringified cache to disk. */ export function save() { let serialised: string = "{}"; try { serialised = JSON.stringify(data, null, " "); } catch (err) { if (err.message === "Invalid string length") { err.message = "Cache too large so it's been cleared."; console.error(err.stack); } else { throw err; } } mkdirpSync(path.dirname(FILENAME)); fs.writeFileSync(FILENAME, serialised); } /** * Load cache from disk and parse. */ export function load() { if (process.env.BABEL_DISABLE_CACHE) return; process.on("exit", save); process.nextTick(save); if (!fs.existsSync(FILENAME)) return; try { data = JSON.parse(fs.readFileSync(FILENAME)); } catch (err) { return; } } /** * Retrieve data from cache. */ export function get(): Object { return data; }
packages/babel-register/src/cache.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.0001850532862590626, 0.00017155804380308837, 0.00016604257689323276, 0.0001675060484558344, 0.0000068481995185720734 ]
{ "id": 2, "code_window": [ " ],\n", " \"devDependencies\": {\n", " \"@babel/core\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-check-es2015-constants\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-external-helpers\": \"7.0.0-beta.3\",\n", " \"babel-plugin-inline-replace-variables\": \"1.3.1\",\n", " \"@babel/plugin-syntax-async-generators\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-class-properties\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-decorators\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 14 }
React.createElement("div", { id: "w\xF4w" }); React.createElement("div", { id: "\\w" }); React.createElement("div", { id: "w < w" });
packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-escape-xhtml-jsxattribute/expected.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017029163427650928, 0.00017029163427650928, 0.00017029163427650928, 0.00017029163427650928, 0 ]
{ "id": 2, "code_window": [ " ],\n", " \"devDependencies\": {\n", " \"@babel/core\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-check-es2015-constants\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-external-helpers\": \"7.0.0-beta.3\",\n", " \"babel-plugin-inline-replace-variables\": \"1.3.1\",\n", " \"@babel/plugin-syntax-async-generators\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-class-properties\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-syntax-decorators\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 14 }
class C /*:: <+T, -U>*/ {} function f /*:: <+T, -U>*/ () {} /*:: type T<+T, -U> = {};*/
packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/def-site-variance/expected.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.0001677744439803064, 0.0001677744439803064, 0.0001677744439803064, 0.0001677744439803064, 0 ]
{ "id": 3, "code_window": [ " \"@babel/plugin-transform-runtime\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-transform-strict-mode\": \"7.0.0-beta.3\",\n", " \"babel-plugin-transform-unicode-property-regex\": \"^2.0.5\",\n", " \"@babel/preset-env\": \"2.0.0-alpha.19\",\n", " \"@babel/preset-es2015\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2016\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2017\": \"7.0.0-beta.3\",\n", " \"@babel/preset-flow\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 82 }
{ "name": "@babel/standalone", "version": "7.0.0-beta.3", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ "babel.js", "babel.min.js", "src" ], "devDependencies": { "@babel/core": "7.0.0-beta.3", "@babel/plugin-check-es2015-constants": "7.0.0-beta.3", "@babel/plugin-external-helpers": "7.0.0-beta.3", "babel-plugin-inline-replace-variables": "1.3.1", "@babel/plugin-syntax-async-generators": "7.0.0-beta.3", "@babel/plugin-syntax-class-properties": "7.0.0-beta.3", "@babel/plugin-syntax-decorators": "7.0.0-beta.3", "@babel/plugin-syntax-do-expressions": "7.0.0-beta.3", "@babel/plugin-syntax-dynamic-import": "7.0.0-beta.3", "@babel/plugin-syntax-export-extensions": "7.0.0-beta.3", "@babel/plugin-syntax-flow": "7.0.0-beta.3", "@babel/plugin-syntax-function-bind": "7.0.0-beta.3", "@babel/plugin-syntax-function-sent": "7.0.0-beta.3", "@babel/plugin-syntax-jsx": "7.0.0-beta.3", "@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-syntax-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-async-generator-functions": "7.0.0-beta.3", "@babel/plugin-transform-async-to-generator": "7.0.0-beta.3", "@babel/plugin-transform-async-to-module-method": "7.0.0-beta.3", "@babel/plugin-transform-class-properties": "7.0.0-beta.3", "@babel/plugin-transform-decorators": "7.0.0-beta.3", "@babel/plugin-transform-do-expressions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-arrow-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoped-functions": "7.0.0-beta.3", "@babel/plugin-transform-es2015-block-scoping": "7.0.0-beta.3", "@babel/plugin-transform-es2015-classes": "7.0.0-beta.3", "@babel/plugin-transform-es2015-computed-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-destructuring": "7.0.0-beta.3", "@babel/plugin-transform-es2015-duplicate-keys": "7.0.0-beta.3", "@babel/plugin-transform-es2015-for-of": "7.0.0-beta.3", "@babel/plugin-transform-es2015-function-name": "7.0.0-beta.3", "@babel/plugin-transform-es2015-instanceof": "7.0.0-beta.3", "@babel/plugin-transform-es2015-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-amd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-commonjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-systemjs": "7.0.0-beta.3", "@babel/plugin-transform-es2015-modules-umd": "7.0.0-beta.3", "@babel/plugin-transform-es2015-object-super": "7.0.0-beta.3", "@babel/plugin-transform-es2015-parameters": "7.0.0-beta.3", "@babel/plugin-transform-es2015-shorthand-properties": "7.0.0-beta.3", "@babel/plugin-transform-es2015-spread": "7.0.0-beta.3", "@babel/plugin-transform-es2015-sticky-regex": "7.0.0-beta.3", "@babel/plugin-transform-es2015-template-literals": "7.0.0-beta.3", "@babel/plugin-transform-es2015-typeof-symbol": "7.0.0-beta.3", "@babel/plugin-transform-es2015-unicode-regex": "7.0.0-beta.3", "@babel/plugin-transform-es3-member-expression-literals": "7.0.0-beta.3", "@babel/plugin-transform-es3-property-literals": "7.0.0-beta.3", "@babel/plugin-transform-es5-property-mutators": "7.0.0-beta.3", "@babel/plugin-transform-eval": "7.0.0-beta.3", "@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.3", "@babel/plugin-transform-flow-comments": "7.0.0-beta.3", "@babel/plugin-transform-flow-strip-types": "7.0.0-beta.3", "@babel/plugin-transform-function-bind": "7.0.0-beta.3", "@babel/plugin-transform-jscript": "7.0.0-beta.3", "@babel/plugin-transform-new-target": "7.0.0-beta.3", "@babel/plugin-transform-object-assign": "7.0.0-beta.3", "@babel/plugin-transform-object-rest-spread": "7.0.0-beta.3", "@babel/plugin-transform-object-set-prototype-of-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-optional-catch-binding": "7.0.0-beta.3", "@babel/plugin-transform-proto-to-assign": "7.0.0-beta.3", "@babel/plugin-transform-react-constant-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-display-name": "7.0.0-beta.3", "@babel/plugin-transform-react-inline-elements": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-compat": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-self": "7.0.0-beta.3", "@babel/plugin-transform-react-jsx-source": "7.0.0-beta.3", "@babel/plugin-transform-regenerator": "7.0.0-beta.3", "@babel/plugin-transform-runtime": "7.0.0-beta.3", "@babel/plugin-transform-strict-mode": "7.0.0-beta.3", "babel-plugin-transform-unicode-property-regex": "^2.0.5", "@babel/preset-env": "2.0.0-alpha.19", "@babel/preset-es2015": "7.0.0-beta.3", "@babel/preset-es2016": "7.0.0-beta.3", "@babel/preset-es2017": "7.0.0-beta.3", "@babel/preset-flow": "7.0.0-beta.3", "@babel/preset-react": "7.0.0-beta.3", "@babel/preset-stage-0": "7.0.0-beta.3", "@babel/preset-stage-1": "7.0.0-beta.3", "@babel/preset-stage-2": "7.0.0-beta.3", "@babel/preset-stage-3": "7.0.0-beta.3", "@babel/preset-typescript": "7.0.0-beta.3" }, "keywords": [ "babel", "babeljs", "6to5", "transpile", "transpiler" ], "author": "Daniel Lo Nigro <[email protected]> (http://dan.cx/)", "license": "MIT", "bugs": { "url": "https://github.com/babel/babel-standalone/issues" }, "homepage": "https://github.com/babel/babel-standalone#readme" }
packages/babel-standalone/package.json
1
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.994005024433136, 0.09166118502616882, 0.00016591438907198608, 0.0012815636582672596, 0.2853492200374603 ]
{ "id": 3, "code_window": [ " \"@babel/plugin-transform-runtime\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-transform-strict-mode\": \"7.0.0-beta.3\",\n", " \"babel-plugin-transform-unicode-property-regex\": \"^2.0.5\",\n", " \"@babel/preset-env\": \"2.0.0-alpha.19\",\n", " \"@babel/preset-es2015\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2016\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2017\": \"7.0.0-beta.3\",\n", " \"@babel/preset-flow\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 82 }
{ "plugins": ["optionalChaining"] }
packages/babel-generator/test/fixtures/types/Optional-MemberExpression/options.json
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.0001690288190729916, 0.0001690288190729916, 0.0001690288190729916, 0.0001690288190729916, 0 ]
{ "id": 3, "code_window": [ " \"@babel/plugin-transform-runtime\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-transform-strict-mode\": \"7.0.0-beta.3\",\n", " \"babel-plugin-transform-unicode-property-regex\": \"^2.0.5\",\n", " \"@babel/preset-env\": \"2.0.0-alpha.19\",\n", " \"@babel/preset-es2015\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2016\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2017\": \"7.0.0-beta.3\",\n", " \"@babel/preset-flow\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 82 }
function test(a = throw new Error('test')) { }
packages/babel-plugin-transform-throw-expressions/test/fixtures/stupid-fixture-nesting-folder/expression-params/actual.js
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00016978479106910527, 0.00016978479106910527, 0.00016978479106910527, 0.00016978479106910527, 0 ]
{ "id": 3, "code_window": [ " \"@babel/plugin-transform-runtime\": \"7.0.0-beta.3\",\n", " \"@babel/plugin-transform-strict-mode\": \"7.0.0-beta.3\",\n", " \"babel-plugin-transform-unicode-property-regex\": \"^2.0.5\",\n", " \"@babel/preset-env\": \"2.0.0-alpha.19\",\n", " \"@babel/preset-es2015\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2016\": \"7.0.0-beta.3\",\n", " \"@babel/preset-es2017\": \"7.0.0-beta.3\",\n", " \"@babel/preset-flow\": \"7.0.0-beta.3\",\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [], "file_path": "packages/babel-standalone/package.json", "type": "replace", "edit_start_line_idx": 82 }
The MIT License (MIT) Copyright (c) 2015 Jed Watson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
packages/babel-plugin-transform-object-assign/LICENSE
0
https://github.com/babel/babel/commit/919bdf5e7960bfb40033751329b65eb1944fe1be
[ 0.00017639747238717973, 0.00017019151709973812, 0.00016565434634685516, 0.000168522703461349, 0.0000045418328227242455 ]
{ "id": 0, "code_window": [ "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tsandbox: true,\n", "\t\t\t\tcontextIsolation: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tdevTools: false\n", "\t\t\t}\n", "\t\t};\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/auth.ts", "type": "add", "edit_start_line_idx": 66 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as path from 'vs/base/common/path'; import * as objects from 'vs/base/common/objects'; import * as nls from 'vs/nls'; import { Emitter } from 'vs/base/common/event'; import { URI } from 'vs/base/common/uri'; import { screen, BrowserWindow, systemPreferences, app, TouchBar, nativeImage, Rectangle, Display, TouchBarSegmentedControl, NativeImage, BrowserWindowConstructorOptions, SegmentedControlSegment, nativeTheme, Event, Details } from 'electron'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv'; import { NativeParsedArgs } from 'vs/platform/environment/common/argv'; import product from 'vs/platform/product/common/product'; import { IWindowSettings, MenuBarVisibility, getTitleBarStyle, getMenuBarVisibility, zoomLevelToZoomFactor, INativeWindowConfiguration } from 'vs/platform/windows/common/windows'; import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService'; import { IBackupMainService } from 'vs/platform/backup/electron-main/backup'; import { ISerializableCommandAction } from 'vs/platform/actions/common/actions'; import * as perf from 'vs/base/common/performance'; import { resolveMarketplaceHeaders } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService'; import { RunOnceScheduler } from 'vs/base/common/async'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs'; import { mnemonicButtonLabel } from 'vs/base/common/labels'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService'; import { IStorageMainService } from 'vs/platform/storage/node/storageMainService'; import { IFileService } from 'vs/platform/files/common/files'; import { ColorScheme } from 'vs/platform/theme/common/theme'; export interface IWindowCreationOptions { state: IWindowState; extensionDevelopmentPath?: string[]; isExtensionTestHost?: boolean; } export const defaultWindowState = function (mode = WindowMode.Normal): IWindowState { return { width: 1024, height: 768, mode }; }; interface ITouchBarSegment extends SegmentedControlSegment { id: string; } const enum WindowError { UNRESPONSIVE = 1, CRASHED = 2 } const enum ReadyState { /** * This window has not loaded any HTML yet */ NONE, /** * This window is loading HTML */ LOADING, /** * This window is navigating to another HTML */ NAVIGATING, /** * This window is done loading HTML */ READY } export class CodeWindow extends Disposable implements ICodeWindow { private static readonly MIN_WIDTH = 600; private static readonly MIN_HEIGHT = 270; private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32 private readonly _onLoad = this._register(new Emitter<void>()); readonly onLoad = this._onLoad.event; private readonly _onReady = this._register(new Emitter<void>()); readonly onReady = this._onReady.event; private readonly _onClose = this._register(new Emitter<void>()); readonly onClose = this._onClose.event; private readonly _onDestroy = this._register(new Emitter<void>()); readonly onDestroy = this._onDestroy.event; private hiddenTitleBarStyle: boolean | undefined; private showTimeoutHandle: NodeJS.Timeout | undefined; private _lastFocusTime: number; private _readyState: ReadyState; private windowState: IWindowState; private currentMenuBarVisibility: MenuBarVisibility | undefined; private representedFilename: string | undefined; private documentEdited: boolean | undefined; private readonly whenReadyCallbacks: { (window: ICodeWindow): void }[]; private pendingLoadConfig?: INativeWindowConfiguration; private marketplaceHeadersPromise: Promise<object>; private readonly touchBarGroups: TouchBarSegmentedControl[]; private currentHttpProxy?: string; private currentNoProxy?: string; constructor( config: IWindowCreationOptions, @ILogService private readonly logService: ILogService, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @IFileService private readonly fileService: IFileService, @IStorageMainService private readonly storageService: IStorageMainService, @IConfigurationService private readonly configurationService: IConfigurationService, @IThemeMainService private readonly themeMainService: IThemeMainService, @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, @IBackupMainService private readonly backupMainService: IBackupMainService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IDialogMainService private readonly dialogMainService: IDialogMainService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService ) { super(); this.touchBarGroups = []; this._lastFocusTime = -1; this._readyState = ReadyState.NONE; this.whenReadyCallbacks = []; //#region create browser window { // Load window state const [state, hasMultipleDisplays] = this.restoreWindowState(config.state); this.windowState = state; this.logService.trace('window#ctor: using window state', state); // in case we are maximized or fullscreen, only show later after the call to maximize/fullscreen (see below) const isFullscreenOrMaximized = (this.windowState.mode === WindowMode.Maximized || this.windowState.mode === WindowMode.Fullscreen); const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); const options: BrowserWindowConstructorOptions = { width: this.windowState.width, height: this.windowState.height, x: this.windowState.x, y: this.windowState.y, backgroundColor: this.themeMainService.getBackgroundColor(), minWidth: CodeWindow.MIN_WIDTH, minHeight: CodeWindow.MIN_HEIGHT, show: !isFullscreenOrMaximized, title: product.nameLong, webPreferences: { preload: URI.parse(this.doGetPreloadUrl()).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, webviewTag: true, zoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }; // Apply icon to window // Linux: always // Windows: only when running out of sources, otherwise an icon is set by us on the executable if (isLinux) { options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); } else if (isWindows && !this.environmentService.isBuilt) { options.icon = path.join(this.environmentService.appRoot, 'resources/win32/code_150x150.png'); } if (isMacintosh && !this.useNativeFullScreen()) { options.fullscreenable = false; // enables simple fullscreen mode } if (isMacintosh) { options.acceptFirstMouse = true; // enabled by default if (windowConfig?.clickThroughInactive === false) { options.acceptFirstMouse = false; } } const useNativeTabs = isMacintosh && windowConfig?.nativeTabs === true; if (useNativeTabs) { options.tabbingIdentifier = product.nameShort; // this opts in to sierra tabs } const useCustomTitleStyle = getTitleBarStyle(this.configurationService, this.environmentService, !!config.extensionDevelopmentPath) === 'custom'; if (useCustomTitleStyle) { options.titleBarStyle = 'hidden'; this.hiddenTitleBarStyle = true; if (!isMacintosh) { options.frame = false; } } // Create the browser window. this._win = new BrowserWindow(options); this._id = this._win.id; // Open devtools if instructed from command line args if (this.environmentService.args['open-devtools'] === true) { this._win.webContents.openDevTools(); } if (isMacintosh && useCustomTitleStyle) { this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any } // TODO@Ben (Electron 4 regression): when running on multiple displays where the target display // to open the window has a larger resolution than the primary display, the window will not size // correctly unless we set the bounds again (https://github.com/microsoft/vscode/issues/74872) // // However, when running with native tabs with multiple windows we cannot use this workaround // because there is a potential that the new window will be added as native tab instead of being // a window on its own. In that case calling setBounds() would cause https://github.com/microsoft/vscode/issues/75830 if (isMacintosh && hasMultipleDisplays && (!useNativeTabs || BrowserWindow.getAllWindows().length === 1)) { if ([this.windowState.width, this.windowState.height, this.windowState.x, this.windowState.y].every(value => typeof value === 'number')) { const ensuredWindowState = this.windowState as Required<IWindowState>; this._win.setBounds({ width: ensuredWindowState.width, height: ensuredWindowState.height, x: ensuredWindowState.x, y: ensuredWindowState.y }); } } if (isFullscreenOrMaximized) { this._win.maximize(); if (this.windowState.mode === WindowMode.Fullscreen) { this.setFullScreen(true); } if (!this._win.isVisible()) { this._win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize } } this._lastFocusTime = Date.now(); // since we show directly, we need to set the last focus time too } //#endregion // respect configured menu bar visibility this.onConfigurationUpdated(); // macOS: touch bar support this.createTouchBar(); // Request handling const that = this; this.marketplaceHeadersPromise = resolveMarketplaceHeaders(product.version, this.environmentService, this.fileService, { get(key) { return that.storageService.get(key); }, store(key, value) { that.storageService.store(key, value); } }); // Eventing this.registerListeners(); } private currentConfig: INativeWindowConfiguration | undefined; get config(): INativeWindowConfiguration | undefined { return this.currentConfig; } private _id: number; get id(): number { return this._id; } private _win: BrowserWindow; get win(): BrowserWindow { return this._win; } get hasHiddenTitleBarStyle(): boolean { return !!this.hiddenTitleBarStyle; } get isExtensionDevelopmentHost(): boolean { return !!(this.config && this.config.extensionDevelopmentPath); } get isExtensionTestHost(): boolean { return !!(this.config && this.config.extensionTestsPath); } get isExtensionDevelopmentTestFromCli(): boolean { return this.isExtensionDevelopmentHost && this.isExtensionTestHost && !this.config?.debugId; } setRepresentedFilename(filename: string): void { if (isMacintosh) { this.win.setRepresentedFilename(filename); } else { this.representedFilename = filename; } } getRepresentedFilename(): string | undefined { if (isMacintosh) { return this.win.getRepresentedFilename(); } return this.representedFilename; } setDocumentEdited(edited: boolean): void { if (isMacintosh) { this._win.setDocumentEdited(edited); } this.documentEdited = edited; } isDocumentEdited(): boolean { if (isMacintosh) { return this._win.isDocumentEdited(); } return !!this.documentEdited; } focus(options?: { force: boolean }): void { // macOS: Electron >6.x changed its behaviour to not // bring the application to the foreground when a window // is focused programmatically. Only via `app.focus` and // the option `steal: true` can you get the previous // behaviour back. The only reason to use this option is // when a window is getting focused while the application // is not in the foreground. if (isMacintosh && options?.force) { app.focus({ steal: true }); } if (!this._win) { return; } if (this._win.isMinimized()) { this._win.restore(); } this._win.focus(); } get lastFocusTime(): number { return this._lastFocusTime; } get backupPath(): string | undefined { return this.currentConfig ? this.currentConfig.backupPath : undefined; } get openedWorkspace(): IWorkspaceIdentifier | undefined { return this.currentConfig ? this.currentConfig.workspace : undefined; } get openedFolderUri(): URI | undefined { return this.currentConfig ? this.currentConfig.folderUri : undefined; } get remoteAuthority(): string | undefined { return this.currentConfig ? this.currentConfig.remoteAuthority : undefined; } setReady(): void { this._readyState = ReadyState.READY; // inform all waiting promises that we are ready now while (this.whenReadyCallbacks.length) { this.whenReadyCallbacks.pop()!(this); } // Events this._onReady.fire(); } ready(): Promise<ICodeWindow> { return new Promise<ICodeWindow>(resolve => { if (this.isReady) { return resolve(this); } // otherwise keep and call later when we are ready this.whenReadyCallbacks.push(resolve); }); } get isReady(): boolean { return this._readyState === ReadyState.READY; } get whenClosedOrLoaded(): Promise<void> { return new Promise<void>(resolve => { function handle() { closeListener.dispose(); loadListener.dispose(); resolve(); } const closeListener = this.onClose(() => handle()); const loadListener = this.onLoad(() => handle()); }); } private registerListeners(): void { // Crashes & Unrsponsive this._win.webContents.on('render-process-gone', (event, details) => this.onWindowError(WindowError.CRASHED, details)); this._win.on('unresponsive', () => this.onWindowError(WindowError.UNRESPONSIVE)); // Window close this._win.on('closed', () => { this._onClose.fire(); this.dispose(); }); // Prevent loading of svgs this._win.webContents.session.webRequest.onBeforeRequest(null!, (details, callback) => { if (details.url.indexOf('.svg') > 0) { const uri = URI.parse(details.url); if (uri && !uri.scheme.match(/file/i) && uri.path.endsWith('.svg')) { return callback({ cancel: true }); } } return callback({}); }); this._win.webContents.session.webRequest.onHeadersReceived(null!, (details, callback) => { const responseHeaders = details.responseHeaders as Record<string, (string) | (string[])>; const contentType = (responseHeaders['content-type'] || responseHeaders['Content-Type']); if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) { return callback({ cancel: true }); } return callback({ cancel: false }); }); // Remember that we loaded this._win.webContents.on('did-finish-load', () => { this._readyState = ReadyState.LOADING; // Associate properties from the load request if provided if (this.pendingLoadConfig) { this.currentConfig = this.pendingLoadConfig; this.pendingLoadConfig = undefined; } }); // Window Focus this._win.on('focus', () => { this._lastFocusTime = Date.now(); }); if (isMacintosh) { const displayChangedScheduler = this._register(new RunOnceScheduler(() => { if (!this._win) { return; // disposed } // Notify renderers about displays changed this.sendWhenReady('vscode:displayChanged'); // Simple fullscreen doesn't resize automatically when the resolution changes so as a workaround // we need to detect when display metrics change or displays are added/removed and toggle the // fullscreen manually. if (!this.useNativeFullScreen() && this.isFullScreen) { this.setFullScreen(false); this.setFullScreen(true); } }, 100)); const displayChangedListener = (event: Event, display: Display, changedMetrics?: string[]) => { if (Array.isArray(changedMetrics) && changedMetrics.length === 1 && changedMetrics[0] === 'workArea') { // Electron will emit 'display-metrics-changed' events even when actually // going fullscreen, because the dock hides. However, we do not want to // react on this event as there is no change in display bounds. return; } displayChangedScheduler.schedule(); }; screen.on('display-metrics-changed', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-metrics-changed', displayChangedListener))); screen.on('display-added', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-added', displayChangedListener))); screen.on('display-removed', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-removed', displayChangedListener))); } // Window (Un)Maximize this._win.on('maximize', (e: Event) => { if (this.currentConfig) { this.currentConfig.maximized = true; } app.emit('browser-window-maximize', e, this._win); }); this._win.on('unmaximize', (e: Event) => { if (this.currentConfig) { this.currentConfig.maximized = false; } app.emit('browser-window-unmaximize', e, this._win); }); // Window Fullscreen this._win.on('enter-full-screen', () => { this.sendWhenReady('vscode:enterFullScreen'); }); this._win.on('leave-full-screen', () => { this.sendWhenReady('vscode:leaveFullScreen'); }); // Window Failed to load this._win.webContents.on('did-fail-load', (event: Event, errorCode: number, errorDescription: string, validatedURL: string, isMainFrame: boolean) => { this.logService.warn('[electron event]: fail to load, ', errorDescription); }); // Handle configuration changes this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated())); // Handle Workspace events this._register(this.workspacesMainService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e))); // Inject headers when requests are incoming const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*']; this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => this.marketplaceHeadersPromise.then(headers => cb({ cancel: false, requestHeaders: Object.assign(details.requestHeaders, headers) }))); } private onWindowError(error: WindowError.UNRESPONSIVE): void; private onWindowError(error: WindowError.CRASHED, details: Details): void; private onWindowError(error: WindowError, details?: Details): void { this.logService.error(error === WindowError.CRASHED ? `[VS Code]: renderer process crashed (detail: ${details?.reason})` : '[VS Code]: detected unresponsive'); // If we run extension tests from CLI, showing a dialog is not // very helpful in this case. Rather, we bring down the test run // to signal back a failing run. if (this.isExtensionDevelopmentTestFromCli) { this.lifecycleMainService.kill(1); return; } // Telemetry type WindowErrorClassification = { type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; }; type WindowErrorEvent = { type: WindowError; }; this.telemetryService.publicLog2<WindowErrorEvent, WindowErrorClassification>('windowerror', { type: error }); // Unresponsive if (error === WindowError.UNRESPONSIVE) { if (this.isExtensionDevelopmentHost || this.isExtensionTestHost || (this._win && this._win.webContents && this._win.webContents.isDevToolsOpened())) { // TODO@Ben Workaround for https://github.com/Microsoft/vscode/issues/56994 // In certain cases the window can report unresponsiveness because a breakpoint was hit // and the process is stopped executing. The most typical cases are: // - devtools are opened and debugging happens // - window is an extensions development host that is being debugged // - window is an extension test development host that is being debugged return; } // Show Dialog this.dialogMainService.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(nls.localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(nls.localize({ key: 'wait', comment: ['&& denotes a mnemonic'] }, "&&Keep Waiting")), mnemonicButtonLabel(nls.localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: nls.localize('appStalled', "The window is no longer responding"), detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true }, this._win).then(result => { if (!this._win) { return; // Return early if the window has been going down already } if (result.response === 0) { this.reload(); } else if (result.response === 2) { this.destroyWindow(); } }); } // Crashed else { let message: string; if (details && details.reason !== 'crashed') { message = nls.localize('appCrashedDetails', "The window has crashed (reason: '{0}')", details?.reason); } else { message = nls.localize('appCrashed', "The window has crashed", details?.reason); } this.dialogMainService.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(nls.localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(nls.localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message, detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true }, this._win).then(result => { if (!this._win) { return; // Return early if the window has been going down already } if (result.response === 0) { this.reload(); } else if (result.response === 1) { this.destroyWindow(); } }); } } private destroyWindow(): void { this._onDestroy.fire(); // 'close' event will not be fired on destroy(), so signal crash via explicit event this._win.destroy(); // make sure to destroy the window as it has crashed } private onUntitledWorkspaceDeleted(workspace: IWorkspaceIdentifier): void { // Make sure to update our workspace config if we detect that it // was deleted if (this.openedWorkspace && this.openedWorkspace.id === workspace.id && this.currentConfig) { this.currentConfig.workspace = undefined; } } private onConfigurationUpdated(): void { const newMenuBarVisibility = this.getMenuBarVisibility(); if (newMenuBarVisibility !== this.currentMenuBarVisibility) { this.currentMenuBarVisibility = newMenuBarVisibility; this.setMenuBarVisibility(newMenuBarVisibility); } // Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options: const env = process.env; let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim() || (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized. || undefined; if (newHttpProxy?.endsWith('/')) { newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1); } const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized. if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) { this.currentHttpProxy = newHttpProxy; this.currentNoProxy = newNoProxy; const proxyRules = newHttpProxy || ''; const proxyBypassRules = newNoProxy ? `${newNoProxy},<local>` : '<local>'; this.logService.trace(`Setting proxy to '${proxyRules}', bypassing '${proxyBypassRules}'`); this._win.webContents.session.setProxy({ proxyRules, proxyBypassRules, pacScript: '', }); } } addTabbedWindow(window: ICodeWindow): void { if (isMacintosh) { this._win.addTabbedWindow(window.win); } } load(config: INativeWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void { // If this is the first time the window is loaded, we associate the paths // directly with the window because we assume the loading will just work if (this._readyState === ReadyState.NONE) { this.currentConfig = config; } // Otherwise, the window is currently showing a folder and if there is an // unload handler preventing the load, we cannot just associate the paths // because the loading might be vetoed. Instead we associate it later when // the window load event has fired. else { this.pendingLoadConfig = config; this._readyState = ReadyState.NAVIGATING; } // Add disable-extensions to the config, but do not preserve it on currentConfig or // pendingLoadConfig so that it is applied only on this load const configuration = { ...config }; if (disableExtensions !== undefined) { configuration['disable-extensions'] = disableExtensions; } // Clear Document Edited if needed if (this.isDocumentEdited()) { if (!isReload || !this.backupMainService.isHotExitEnabled()) { this.setDocumentEdited(false); } } // Clear Title and Filename if needed if (!isReload) { if (this.getRepresentedFilename()) { this.setRepresentedFilename(''); } this._win.setTitle(product.nameLong); } // Load URL perf.mark('main:loadWindow'); this._win.loadURL(this.getUrl(configuration)); // Make window visible if it did not open in N seconds because this indicates an error // Only do this when running out of sources and not when running tests if (!this.environmentService.isBuilt && !this.environmentService.extensionTestsLocationURI) { this.showTimeoutHandle = setTimeout(() => { if (this._win && !this._win.isVisible() && !this._win.isMinimized()) { this._win.show(); this.focus({ force: true }); this._win.webContents.openDevTools(); } }, 10000); } // Event this._onLoad.fire(); } reload(configurationIn?: INativeWindowConfiguration, cli?: NativeParsedArgs): void { // If config is not provided, copy our current one const configuration = configurationIn ? configurationIn : objects.mixin({}, this.currentConfig); // Delete some properties we do not want during reload delete configuration.filesToOpenOrCreate; delete configuration.filesToDiff; delete configuration.filesToWait; // Some configuration things get inherited if the window is being reloaded and we are // in extension development mode. These options are all development related. if (this.isExtensionDevelopmentHost && cli) { configuration.verbose = cli.verbose; configuration['inspect-extensions'] = cli['inspect-extensions']; configuration['inspect-brk-extensions'] = cli['inspect-brk-extensions']; configuration.debugId = cli.debugId; configuration['extensions-dir'] = cli['extensions-dir']; } configuration.isInitialStartup = false; // since this is a reload // Load config const disableExtensions = cli ? cli['disable-extensions'] : undefined; this.load(configuration, true, disableExtensions); } private getUrl(windowConfiguration: INativeWindowConfiguration): string { // Set window ID windowConfiguration.windowId = this._win.id; windowConfiguration.sessionId = `window:${this._win.id}`; windowConfiguration.logLevel = this.logService.getLevel(); // Set zoomlevel const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); const zoomLevel = windowConfig?.zoomLevel; if (typeof zoomLevel === 'number') { windowConfiguration.zoomLevel = zoomLevel; } // Set fullscreen state windowConfiguration.fullscreen = this.isFullScreen; // Set Accessibility Config windowConfiguration.colorScheme = (nativeTheme.shouldUseInvertedColorScheme || nativeTheme.shouldUseHighContrastColors) ? ColorScheme.HIGH_CONTRAST : nativeTheme.shouldUseDarkColors ? ColorScheme.DARK : ColorScheme.LIGHT; windowConfiguration.autoDetectHighContrast = windowConfig?.autoDetectHighContrast ?? true; windowConfiguration.accessibilitySupport = app.accessibilitySupportEnabled; // Title style related windowConfiguration.maximized = this._win.isMaximized(); // Dump Perf Counters windowConfiguration.perfEntries = perf.exportEntries(); // Parts splash windowConfiguration.partsSplashPath = path.join(this.environmentService.userDataPath, 'rapid_render.json'); // Config (combination of process.argv and window configuration) const environment = parseArgs(process.argv, OPTIONS); const config = Object.assign(environment, windowConfiguration) as unknown as { [key: string]: unknown }; for (const key in config) { const configValue = config[key]; if (configValue === undefined || configValue === null || configValue === '' || configValue === false) { delete config[key]; // only send over properties that have a true value } } // In the unlikely event of the URL becoming larger than 2MB, remove parts of // it that are not under our control. Mainly, the user environment can be very // large depending on user configuration, so we can only remove it in that case. let configUrl = this.doGetUrl(config); if (configUrl.length > CodeWindow.MAX_URL_LENGTH) { delete config.userEnv; this.logService.warn('Application URL exceeds maximum of 2MB and was shortened.'); configUrl = this.doGetUrl(config); if (configUrl.length > CodeWindow.MAX_URL_LENGTH) { this.logService.error('Application URL exceeds maximum of 2MB and cannot be loaded.'); } } return configUrl; } private doGetUrl(config: object): string { let workbench: string; if (this.environmentService.sandbox) { workbench = 'vs/code/electron-sandbox/workbench/workbench.html'; } else { workbench = 'vs/code/electron-browser/workbench/workbench.html'; } return `${require.toUrl(workbench)}?config=${encodeURIComponent(JSON.stringify(config))}`; } private doGetPreloadUrl(): string { return require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js'); } serializeWindowState(): IWindowState { if (!this._win) { return defaultWindowState(); } // fullscreen gets special treatment if (this.isFullScreen) { let display: Display | undefined; try { display = screen.getDisplayMatching(this.getBounds()); } catch (error) { // Electron has weird conditions under which it throws errors // e.g. https://github.com/microsoft/vscode/issues/100334 when // large numbers are passed in } const defaultState = defaultWindowState(); const res = { mode: WindowMode.Fullscreen, display: display ? display.id : undefined, // Still carry over window dimensions from previous sessions // if we can compute it in fullscreen state. // does not seem possible in all cases on Linux for example // (https://github.com/Microsoft/vscode/issues/58218) so we // fallback to the defaults in that case. width: this.windowState.width || defaultState.width, height: this.windowState.height || defaultState.height, x: this.windowState.x || 0, y: this.windowState.y || 0 }; return res; } const state: IWindowState = Object.create(null); let mode: WindowMode; // get window mode if (!isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; } else { mode = WindowMode.Normal; } // we don't want to save minimized state, only maximized or normal if (mode === WindowMode.Maximized) { state.mode = WindowMode.Maximized; } else { state.mode = WindowMode.Normal; } // only consider non-minimized window states if (mode === WindowMode.Normal || mode === WindowMode.Maximized) { let bounds: Rectangle; if (mode === WindowMode.Normal) { bounds = this.getBounds(); } else { bounds = this._win.getNormalBounds(); // make sure to persist the normal bounds when maximized to be able to restore them } state.x = bounds.x; state.y = bounds.y; state.width = bounds.width; state.height = bounds.height; } return state; } private restoreWindowState(state?: IWindowState): [IWindowState, boolean? /* has multiple displays */] { let hasMultipleDisplays = false; if (state) { try { const displays = screen.getAllDisplays(); hasMultipleDisplays = displays.length > 1; state = this.validateWindowState(state, displays); } catch (err) { this.logService.warn(`Unexpected error validating window state: ${err}\n${err.stack}`); // somehow display API can be picky about the state to validate } } return [state || defaultWindowState(), hasMultipleDisplays]; } private validateWindowState(state: IWindowState, displays: Display[]): IWindowState | undefined { this.logService.trace(`window#validateWindowState: validating window state on ${displays.length} display(s)`, state); if (typeof state.x !== 'number' || typeof state.y !== 'number' || typeof state.width !== 'number' || typeof state.height !== 'number' ) { this.logService.trace('window#validateWindowState: unexpected type of state values'); return undefined; } if (state.width <= 0 || state.height <= 0) { this.logService.trace('window#validateWindowState: unexpected negative values'); return undefined; } // Single Monitor: be strict about x/y positioning // macOS & Linux: these OS seem to be pretty good in ensuring that a window is never outside of it's bounds. // Windows: it is possible to have a window with a size that makes it fall out of the window. our strategy // is to try as much as possible to keep the window in the monitor bounds. we are not as strict as // macOS and Linux and allow the window to exceed the monitor bounds as long as the window is still // some pixels (128) visible on the screen for the user to drag it back. if (displays.length === 1) { const displayWorkingArea = this.getWorkingArea(displays[0]); if (displayWorkingArea) { this.logService.trace('window#validateWindowState: 1 monitor working area', displayWorkingArea); function ensureStateInDisplayWorkingArea(): void { if (!state || typeof state.x !== 'number' || typeof state.y !== 'number' || !displayWorkingArea) { return; } if (state.x < displayWorkingArea.x) { // prevent window from falling out of the screen to the left state.x = displayWorkingArea.x; } if (state.y < displayWorkingArea.y) { // prevent window from falling out of the screen to the top state.y = displayWorkingArea.y; } } // ensure state is not outside display working area (top, left) ensureStateInDisplayWorkingArea(); if (state.width > displayWorkingArea.width) { // prevent window from exceeding display bounds width state.width = displayWorkingArea.width; } if (state.height > displayWorkingArea.height) { // prevent window from exceeding display bounds height state.height = displayWorkingArea.height; } if (state.x > (displayWorkingArea.x + displayWorkingArea.width - 128)) { // prevent window from falling out of the screen to the right with // 128px margin by positioning the window to the far right edge of // the screen state.x = displayWorkingArea.x + displayWorkingArea.width - state.width; } if (state.y > (displayWorkingArea.y + displayWorkingArea.height - 128)) { // prevent window from falling out of the screen to the bottom with // 128px margin by positioning the window to the far bottom edge of // the screen state.y = displayWorkingArea.y + displayWorkingArea.height - state.height; } // again ensure state is not outside display working area // (it may have changed from the previous validation step) ensureStateInDisplayWorkingArea(); } return state; } // Multi Montior (fullscreen): try to find the previously used display if (state.display && state.mode === WindowMode.Fullscreen) { const display = displays.find(d => d.id === state.display); if (display && typeof display.bounds?.x === 'number' && typeof display.bounds?.y === 'number') { this.logService.trace('window#validateWindowState: restoring fullscreen to previous display'); const defaults = defaultWindowState(WindowMode.Fullscreen); // make sure we have good values when the user restores the window defaults.x = display.bounds.x; // carefull to use displays x/y position so that the window ends up on the correct monitor defaults.y = display.bounds.y; return defaults; } } // Multi Monitor (non-fullscreen): ensure window is within display bounds let display: Display | undefined; let displayWorkingArea: Rectangle | undefined; try { display = screen.getDisplayMatching({ x: state.x, y: state.y, width: state.width, height: state.height }); displayWorkingArea = this.getWorkingArea(display); } catch (error) { // Electron has weird conditions under which it throws errors // e.g. https://github.com/microsoft/vscode/issues/100334 when // large numbers are passed in } if ( display && // we have a display matching the desired bounds displayWorkingArea && // we have valid working area bounds state.x + state.width > displayWorkingArea.x && // prevent window from falling out of the screen to the left state.y + state.height > displayWorkingArea.y && // prevent window from falling out of the screen to the top state.x < displayWorkingArea.x + displayWorkingArea.width && // prevent window from falling out of the screen to the right state.y < displayWorkingArea.y + displayWorkingArea.height // prevent window from falling out of the screen to the bottom ) { this.logService.trace('window#validateWindowState: multi-monitor working area', displayWorkingArea); return state; } return undefined; } private getWorkingArea(display: Display): Rectangle | undefined { // Prefer the working area of the display to account for taskbars on the // desktop being positioned somewhere (https://github.com/Microsoft/vscode/issues/50830). // // Linux X11 sessions sometimes report wrong display bounds, so we validate // the reported sizes are positive. if (display.workArea.width > 0 && display.workArea.height > 0) { return display.workArea; } if (display.bounds.width > 0 && display.bounds.height > 0) { return display.bounds; } return undefined; } getBounds(): Rectangle { const pos = this._win.getPosition(); const dimension = this._win.getSize(); return { x: pos[0], y: pos[1], width: dimension[0], height: dimension[1] }; } toggleFullScreen(): void { this.setFullScreen(!this.isFullScreen); } private setFullScreen(fullscreen: boolean): void { // Set fullscreen state if (this.useNativeFullScreen()) { this.setNativeFullScreen(fullscreen); } else { this.setSimpleFullScreen(fullscreen); } // Events this.sendWhenReady(fullscreen ? 'vscode:enterFullScreen' : 'vscode:leaveFullScreen'); // Respect configured menu bar visibility or default to toggle if not set if (this.currentMenuBarVisibility) { this.setMenuBarVisibility(this.currentMenuBarVisibility, false); } } get isFullScreen(): boolean { return this._win.isFullScreen() || this._win.isSimpleFullScreen(); } private setNativeFullScreen(fullscreen: boolean): void { if (this._win.isSimpleFullScreen()) { this._win.setSimpleFullScreen(false); } this._win.setFullScreen(fullscreen); } private setSimpleFullScreen(fullscreen: boolean): void { if (this._win.isFullScreen()) { this._win.setFullScreen(false); } this._win.setSimpleFullScreen(fullscreen); this._win.webContents.focus(); // workaround issue where focus is not going into window } private useNativeFullScreen(): boolean { const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') { return true; // default } if (windowConfig.nativeTabs) { return true; // https://github.com/electron/electron/issues/16142 } return windowConfig.nativeFullScreen !== false; } isMinimized(): boolean { return this._win.isMinimized(); } private getMenuBarVisibility(): MenuBarVisibility { let menuBarVisibility = getMenuBarVisibility(this.configurationService, this.environmentService, !!this.config?.extensionDevelopmentPath); if (['visible', 'toggle', 'hidden'].indexOf(menuBarVisibility) < 0) { menuBarVisibility = 'default'; } return menuBarVisibility; } private setMenuBarVisibility(visibility: MenuBarVisibility, notify: boolean = true): void { if (isMacintosh) { return; // ignore for macOS platform } if (visibility === 'toggle') { if (notify) { this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the Alt-key.")); } } if (visibility === 'hidden') { // for some weird reason that I have no explanation for, the menu bar is not hiding when calling // this without timeout (see https://github.com/Microsoft/vscode/issues/19777). there seems to be // a timing issue with us opening the first window and the menu bar getting created. somehow the // fact that we want to hide the menu without being able to bring it back via Alt key makes Electron // still show the menu. Unable to reproduce from a simple Hello World application though... setTimeout(() => { this.doSetMenuBarVisibility(visibility); }); } else { this.doSetMenuBarVisibility(visibility); } } private doSetMenuBarVisibility(visibility: MenuBarVisibility): void { const isFullscreen = this.isFullScreen; switch (visibility) { case ('default'): this._win.setMenuBarVisibility(!isFullscreen); this._win.autoHideMenuBar = isFullscreen; break; case ('visible'): this._win.setMenuBarVisibility(true); this._win.autoHideMenuBar = false; break; case ('toggle'): this._win.setMenuBarVisibility(false); this._win.autoHideMenuBar = true; break; case ('hidden'): this._win.setMenuBarVisibility(false); this._win.autoHideMenuBar = false; break; } } handleTitleDoubleClick(): void { // Respect system settings on mac with regards to title click on windows title if (isMacintosh) { const action = systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string'); switch (action) { case 'Minimize': this.win.minimize(); break; case 'None': break; case 'Maximize': default: if (this.win.isMaximized()) { this.win.unmaximize(); } else { this.win.maximize(); } } } // Linux/Windows: just toggle maximize/minimized state else { if (this.win.isMaximized()) { this.win.unmaximize(); } else { this.win.maximize(); } } } close(): void { if (this._win) { this._win.close(); } } sendWhenReady(channel: string, ...args: any[]): void { if (this.isReady) { this.send(channel, ...args); } else { this.ready().then(() => this.send(channel, ...args)); } } send(channel: string, ...args: any[]): void { if (this._win) { this._win.webContents.send(channel, ...args); } } updateTouchBar(groups: ISerializableCommandAction[][]): void { if (!isMacintosh) { return; // only supported on macOS } // Update segments for all groups. Setting the segments property // of the group directly prevents ugly flickering from happening this.touchBarGroups.forEach((touchBarGroup, index) => { const commands = groups[index]; touchBarGroup.segments = this.createTouchBarGroupSegments(commands); }); } private createTouchBar(): void { if (!isMacintosh) { return; // only supported on macOS } // To avoid flickering, we try to reuse the touch bar group // as much as possible by creating a large number of groups // for reusing later. for (let i = 0; i < 10; i++) { const groupTouchBar = this.createTouchBarGroup(); this.touchBarGroups.push(groupTouchBar); } this._win.setTouchBar(new TouchBar({ items: this.touchBarGroups })); } private createTouchBarGroup(items: ISerializableCommandAction[] = []): TouchBarSegmentedControl { // Group Segments const segments = this.createTouchBarGroupSegments(items); // Group Control const control = new TouchBar.TouchBarSegmentedControl({ segments, mode: 'buttons', segmentStyle: 'automatic', change: (selectedIndex) => { this.sendWhenReady('vscode:runAction', { id: (control.segments[selectedIndex] as ITouchBarSegment).id, from: 'touchbar' }); } }); return control; } private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] { const segments: ITouchBarSegment[] = items.map(item => { let icon: NativeImage | undefined; if (item.icon && !ThemeIcon.isThemeIcon(item.icon) && item.icon?.dark?.scheme === 'file') { icon = nativeImage.createFromPath(URI.revive(item.icon.dark).fsPath); if (icon.isEmpty()) { icon = undefined; } } let title: string; if (typeof item.title === 'string') { title = item.title; } else { title = item.title.value; } return { id: item.id, label: !icon ? title : undefined, icon }; }); return segments; } dispose(): void { super.dispose(); if (this.showTimeoutHandle) { clearTimeout(this.showTimeoutHandle); } this._win = null!; // Important to dereference the window object to allow for GC } }
src/vs/code/electron-main/window.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0054205795750021935, 0.0002177850401494652, 0.00016207592852879316, 0.0001712977245915681, 0.0004567063879221678 ]
{ "id": 0, "code_window": [ "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tsandbox: true,\n", "\t\t\t\tcontextIsolation: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tdevTools: false\n", "\t\t\t}\n", "\t\t};\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/auth.ts", "type": "add", "edit_start_line_idx": 66 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { mkdir, open, close, read, write, fdatasync, Dirent, Stats } from 'fs'; import { promisify } from 'util'; import { IDisposable, Disposable, toDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecycle'; import { FileSystemProviderCapabilities, IFileChange, IWatchOptions, IStat, FileType, FileDeleteOptions, FileOverwriteOptions, FileWriteOptions, FileOpenOptions, FileSystemProviderErrorCode, createFileSystemProviderError, FileSystemProviderError, IFileSystemProviderWithFileReadWriteCapability, IFileSystemProviderWithFileReadStreamCapability, IFileSystemProviderWithOpenReadWriteCloseCapability, FileReadStreamOptions, IFileSystemProviderWithFileFolderCopyCapability } from 'vs/platform/files/common/files'; import { URI } from 'vs/base/common/uri'; import { Event, Emitter } from 'vs/base/common/event'; import { isLinux, isWindows } from 'vs/base/common/platform'; import { statLink, unlink, move, copy, readFile, truncate, rimraf, RimRafMode, exists, readdirWithFileTypes } from 'vs/base/node/pfs'; import { normalize, basename, dirname } from 'vs/base/common/path'; import { joinPath } from 'vs/base/common/resources'; import { isEqual } from 'vs/base/common/extpath'; import { retry, ThrottledDelayer } from 'vs/base/common/async'; import { ILogService, LogLevel } from 'vs/platform/log/common/log'; import { localize } from 'vs/nls'; import { IDiskFileChange, toFileChanges, ILogMessage } from 'vs/platform/files/node/watcher/watcher'; import { FileWatcher as UnixWatcherService } from 'vs/platform/files/node/watcher/unix/watcherService'; import { FileWatcher as WindowsWatcherService } from 'vs/platform/files/node/watcher/win32/watcherService'; import { FileWatcher as NsfwWatcherService } from 'vs/platform/files/node/watcher/nsfw/watcherService'; import { FileWatcher as NodeJSWatcherService } from 'vs/platform/files/node/watcher/nodejs/watcherService'; import { CancellationToken } from 'vs/base/common/cancellation'; import { ReadableStreamEvents, newWriteableStream } from 'vs/base/common/stream'; import { readFileIntoStream } from 'vs/platform/files/common/io'; import { insert } from 'vs/base/common/arrays'; import { VSBuffer } from 'vs/base/common/buffer'; export interface IWatcherOptions { pollingInterval?: number; usePolling: boolean; } export interface IDiskFileSystemProviderOptions { bufferSize?: number; watcher?: IWatcherOptions; } export class DiskFileSystemProvider extends Disposable implements IFileSystemProviderWithFileReadWriteCapability, IFileSystemProviderWithOpenReadWriteCloseCapability, IFileSystemProviderWithFileReadStreamCapability, IFileSystemProviderWithFileFolderCopyCapability { private readonly BUFFER_SIZE = this.options?.bufferSize || 64 * 1024; constructor( private readonly logService: ILogService, private readonly options?: IDiskFileSystemProviderOptions ) { super(); } //#region File Capabilities onDidChangeCapabilities: Event<void> = Event.None; protected _capabilities: FileSystemProviderCapabilities | undefined; get capabilities(): FileSystemProviderCapabilities { if (!this._capabilities) { this._capabilities = FileSystemProviderCapabilities.FileReadWrite | FileSystemProviderCapabilities.FileOpenReadWriteClose | FileSystemProviderCapabilities.FileReadStream | FileSystemProviderCapabilities.FileFolderCopy; if (isLinux) { this._capabilities |= FileSystemProviderCapabilities.PathCaseSensitive; } } return this._capabilities; } //#endregion //#region File Metadata Resolving async stat(resource: URI): Promise<IStat> { try { const { stat, symbolicLink } = await statLink(this.toFilePath(resource)); // cannot use fs.stat() here to support links properly return { type: this.toType(stat, symbolicLink), ctime: stat.birthtime.getTime(), // intentionally not using ctime here, we want the creation time mtime: stat.mtime.getTime(), size: stat.size }; } catch (error) { throw this.toFileSystemProviderError(error); } } async readdir(resource: URI): Promise<[string, FileType][]> { try { const children = await readdirWithFileTypes(this.toFilePath(resource)); const result: [string, FileType][] = []; await Promise.all(children.map(async child => { try { let type: FileType; if (child.isSymbolicLink()) { type = (await this.stat(joinPath(resource, child.name))).type; // always resolve target the link points to if any } else { type = this.toType(child); } result.push([child.name, type]); } catch (error) { this.logService.trace(error); // ignore errors for individual entries that can arise from permission denied } })); return result; } catch (error) { throw this.toFileSystemProviderError(error); } } private toType(entry: Stats | Dirent, symbolicLink?: { dangling: boolean }): FileType { // Signal file type by checking for file / directory, except: // - symbolic links pointing to non-existing files are FileType.Unknown // - files that are neither file nor directory are FileType.Unknown let type: FileType; if (symbolicLink?.dangling) { type = FileType.Unknown; } else if (entry.isFile()) { type = FileType.File; } else if (entry.isDirectory()) { type = FileType.Directory; } else { type = FileType.Unknown; } // Always signal symbolic link as file type additionally if (symbolicLink) { type |= FileType.SymbolicLink; } return type; } //#endregion //#region File Reading/Writing async readFile(resource: URI): Promise<Uint8Array> { try { const filePath = this.toFilePath(resource); return await readFile(filePath); } catch (error) { throw this.toFileSystemProviderError(error); } } readFileStream(resource: URI, opts: FileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array> { const stream = newWriteableStream<Uint8Array>(data => VSBuffer.concat(data.map(data => VSBuffer.wrap(data))).buffer); readFileIntoStream(this, resource, stream, data => data.buffer, { ...opts, bufferSize: this.BUFFER_SIZE }, token); return stream; } async writeFile(resource: URI, content: Uint8Array, opts: FileWriteOptions): Promise<void> { let handle: number | undefined = undefined; try { const filePath = this.toFilePath(resource); // Validate target unless { create: true, overwrite: true } if (!opts.create || !opts.overwrite) { const fileExists = await exists(filePath); if (fileExists) { if (!opts.overwrite) { throw createFileSystemProviderError(localize('fileExists', "File already exists"), FileSystemProviderErrorCode.FileExists); } } else { if (!opts.create) { throw createFileSystemProviderError(localize('fileNotExists', "File does not exist"), FileSystemProviderErrorCode.FileNotFound); } } } // Open handle = await this.open(resource, { create: true }); // Write content at once await this.write(handle, 0, content, 0, content.byteLength); } catch (error) { throw this.toFileSystemProviderError(error); } finally { if (typeof handle === 'number') { await this.close(handle); } } } private readonly mapHandleToPos: Map<number, number> = new Map(); private readonly writeHandles: Set<number> = new Set(); private canFlush: boolean = true; async open(resource: URI, opts: FileOpenOptions): Promise<number> { try { const filePath = this.toFilePath(resource); let flags: string | undefined = undefined; if (opts.create) { if (isWindows && await exists(filePath)) { try { // On Windows and if the file exists, we use a different strategy of saving the file // by first truncating the file and then writing with r+ flag. This helps to save hidden files on Windows // (see https://github.com/Microsoft/vscode/issues/931) and prevent removing alternate data streams // (see https://github.com/Microsoft/vscode/issues/6363) await truncate(filePath, 0); // After a successful truncate() the flag can be set to 'r+' which will not truncate. flags = 'r+'; } catch (error) { this.logService.trace(error); } } // we take opts.create as a hint that the file is opened for writing // as such we use 'w' to truncate an existing or create the // file otherwise. we do not allow reading. if (!flags) { flags = 'w'; } } else { // otherwise we assume the file is opened for reading // as such we use 'r' to neither truncate, nor create // the file. flags = 'r'; } const handle = await promisify(open)(filePath, flags); // remember this handle to track file position of the handle // we init the position to 0 since the file descriptor was // just created and the position was not moved so far (see // also http://man7.org/linux/man-pages/man2/open.2.html - // "The file offset is set to the beginning of the file.") this.mapHandleToPos.set(handle, 0); // remember that this handle was used for writing if (opts.create) { this.writeHandles.add(handle); } return handle; } catch (error) { throw this.toFileSystemProviderError(error); } } async close(fd: number): Promise<void> { try { // remove this handle from map of positions this.mapHandleToPos.delete(fd); // if a handle is closed that was used for writing, ensure // to flush the contents to disk if possible. if (this.writeHandles.delete(fd) && this.canFlush) { try { await promisify(fdatasync)(fd); } catch (error) { // In some exotic setups it is well possible that node fails to sync // In that case we disable flushing and log the error to our logger this.canFlush = false; this.logService.error(error); } } return await promisify(close)(fd); } catch (error) { throw this.toFileSystemProviderError(error); } } async read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> { const normalizedPos = this.normalizePos(fd, pos); let bytesRead: number | null = null; try { const result = await promisify(read)(fd, data, offset, length, normalizedPos); if (typeof result === 'number') { bytesRead = result; // node.d.ts fail } else { bytesRead = result.bytesRead; } return bytesRead; } catch (error) { throw this.toFileSystemProviderError(error); } finally { this.updatePos(fd, normalizedPos, bytesRead); } } private normalizePos(fd: number, pos: number): number | null { // when calling fs.read/write we try to avoid passing in the "pos" argument and // rather prefer to pass in "null" because this avoids an extra seek(pos) // call that in some cases can even fail (e.g. when opening a file over FTP - // see https://github.com/microsoft/vscode/issues/73884). // // as such, we compare the passed in position argument with our last known // position for the file descriptor and use "null" if they match. if (pos === this.mapHandleToPos.get(fd)) { return null; } return pos; } private updatePos(fd: number, pos: number | null, bytesLength: number | null): void { const lastKnownPos = this.mapHandleToPos.get(fd); if (typeof lastKnownPos === 'number') { // pos !== null signals that previously a position was used that is // not null. node.js documentation explains, that in this case // the internal file pointer is not moving and as such we do not move // our position pointer. // // Docs: "If position is null, data will be read from the current file position, // and the file position will be updated. If position is an integer, the file position // will remain unchanged." if (typeof pos === 'number') { // do not modify the position } // bytesLength = number is a signal that the read/write operation was // successful and as such we need to advance the position in the Map // // Docs (http://man7.org/linux/man-pages/man2/read.2.html): // "On files that support seeking, the read operation commences at the // file offset, and the file offset is incremented by the number of // bytes read." // // Docs (http://man7.org/linux/man-pages/man2/write.2.html): // "For a seekable file (i.e., one to which lseek(2) may be applied, for // example, a regular file) writing takes place at the file offset, and // the file offset is incremented by the number of bytes actually // written." else if (typeof bytesLength === 'number') { this.mapHandleToPos.set(fd, lastKnownPos + bytesLength); } // bytesLength = null signals an error in the read/write operation // and as such we drop the handle from the Map because the position // is unspecificed at this point. else { this.mapHandleToPos.delete(fd); } } } async write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> { // we know at this point that the file to write to is truncated and thus empty // if the write now fails, the file remains empty. as such we really try hard // to ensure the write succeeds by retrying up to three times. return retry(() => this.doWrite(fd, pos, data, offset, length), 100 /* ms delay */, 3 /* retries */); } private async doWrite(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number> { const normalizedPos = this.normalizePos(fd, pos); let bytesWritten: number | null = null; try { const result = await promisify(write)(fd, data, offset, length, normalizedPos); if (typeof result === 'number') { bytesWritten = result; // node.d.ts fail } else { bytesWritten = result.bytesWritten; } return bytesWritten; } catch (error) { throw this.toFileSystemProviderError(error); } finally { this.updatePos(fd, normalizedPos, bytesWritten); } } //#endregion //#region Move/Copy/Delete/Create Folder async mkdir(resource: URI): Promise<void> { try { await promisify(mkdir)(this.toFilePath(resource)); } catch (error) { throw this.toFileSystemProviderError(error); } } async delete(resource: URI, opts: FileDeleteOptions): Promise<void> { try { const filePath = this.toFilePath(resource); await this.doDelete(filePath, opts); } catch (error) { throw this.toFileSystemProviderError(error); } } protected async doDelete(filePath: string, opts: FileDeleteOptions): Promise<void> { if (opts.recursive) { await rimraf(filePath, RimRafMode.MOVE); } else { await unlink(filePath); } } async rename(from: URI, to: URI, opts: FileOverwriteOptions): Promise<void> { const fromFilePath = this.toFilePath(from); const toFilePath = this.toFilePath(to); if (fromFilePath === toFilePath) { return; // simulate node.js behaviour here and do a no-op if paths match } try { // Ensure target does not exist await this.validateTargetDeleted(from, to, 'move', opts.overwrite); // Move await move(fromFilePath, toFilePath); } catch (error) { // rewrite some typical errors that can happen especially around symlinks // to something the user can better understand if (error.code === 'EINVAL' || error.code === 'EBUSY' || error.code === 'ENAMETOOLONG') { error = new Error(localize('moveError', "Unable to move '{0}' into '{1}' ({2}).", basename(fromFilePath), basename(dirname(toFilePath)), error.toString())); } throw this.toFileSystemProviderError(error); } } async copy(from: URI, to: URI, opts: FileOverwriteOptions): Promise<void> { const fromFilePath = this.toFilePath(from); const toFilePath = this.toFilePath(to); if (fromFilePath === toFilePath) { return; // simulate node.js behaviour here and do a no-op if paths match } try { // Ensure target does not exist await this.validateTargetDeleted(from, to, 'copy', opts.overwrite); // Copy await copy(fromFilePath, toFilePath); } catch (error) { // rewrite some typical errors that can happen especially around symlinks // to something the user can better understand if (error.code === 'EINVAL' || error.code === 'EBUSY' || error.code === 'ENAMETOOLONG') { error = new Error(localize('copyError', "Unable to copy '{0}' into '{1}' ({2}).", basename(fromFilePath), basename(dirname(toFilePath)), error.toString())); } throw this.toFileSystemProviderError(error); } } private async validateTargetDeleted(from: URI, to: URI, mode: 'move' | 'copy', overwrite?: boolean): Promise<void> { const fromFilePath = this.toFilePath(from); const toFilePath = this.toFilePath(to); let isSameResourceWithDifferentPathCase = false; const isPathCaseSensitive = !!(this.capabilities & FileSystemProviderCapabilities.PathCaseSensitive); if (!isPathCaseSensitive) { isSameResourceWithDifferentPathCase = isEqual(fromFilePath, toFilePath, true /* ignore case */); } if (isSameResourceWithDifferentPathCase && mode === 'copy') { throw createFileSystemProviderError(localize('fileCopyErrorPathCase', "'File cannot be copied to same path with different path case"), FileSystemProviderErrorCode.FileExists); } // handle existing target (unless this is a case change) if (!isSameResourceWithDifferentPathCase && await exists(toFilePath)) { if (!overwrite) { throw createFileSystemProviderError(localize('fileCopyErrorExists', "File at target already exists"), FileSystemProviderErrorCode.FileExists); } // Delete target await this.delete(to, { recursive: true, useTrash: false }); } } //#endregion //#region File Watching private readonly _onDidWatchErrorOccur = this._register(new Emitter<string>()); readonly onDidErrorOccur = this._onDidWatchErrorOccur.event; private readonly _onDidChangeFile = this._register(new Emitter<readonly IFileChange[]>()); readonly onDidChangeFile = this._onDidChangeFile.event; private recursiveWatcher: WindowsWatcherService | UnixWatcherService | NsfwWatcherService | undefined; private readonly recursiveFoldersToWatch: { path: string, excludes: string[] }[] = []; private recursiveWatchRequestDelayer = this._register(new ThrottledDelayer<void>(0)); private recursiveWatcherLogLevelListener: IDisposable | undefined; watch(resource: URI, opts: IWatchOptions): IDisposable { if (opts.recursive) { return this.watchRecursive(resource, opts.excludes); } return this.watchNonRecursive(resource); // TODO@ben ideally the same watcher can be used in both cases } private watchRecursive(resource: URI, excludes: string[]): IDisposable { // Add to list of folders to watch recursively const folderToWatch = { path: this.toFilePath(resource), excludes }; const remove = insert(this.recursiveFoldersToWatch, folderToWatch); // Trigger update this.refreshRecursiveWatchers(); return toDisposable(() => { // Remove from list of folders to watch recursively remove(); // Trigger update this.refreshRecursiveWatchers(); }); } private refreshRecursiveWatchers(): void { // Buffer requests for recursive watching to decide on right watcher // that supports potentially watching more than one folder at once this.recursiveWatchRequestDelayer.trigger(async () => { this.doRefreshRecursiveWatchers(); }); } private doRefreshRecursiveWatchers(): void { // Reuse existing if (this.recursiveWatcher instanceof NsfwWatcherService) { this.recursiveWatcher.setFolders(this.recursiveFoldersToWatch); } // Create new else { // Dispose old dispose(this.recursiveWatcher); this.recursiveWatcher = undefined; // Create new if we actually have folders to watch if (this.recursiveFoldersToWatch.length > 0) { let watcherImpl: { new( folders: { path: string, excludes: string[] }[], onChange: (changes: IDiskFileChange[]) => void, onLogMessage: (msg: ILogMessage) => void, verboseLogging: boolean, watcherOptions?: IWatcherOptions ): WindowsWatcherService | UnixWatcherService | NsfwWatcherService }; let watcherOptions: IWatcherOptions | undefined = undefined; // requires a polling watcher if (this.options?.watcher?.usePolling) { watcherImpl = UnixWatcherService; watcherOptions = this.options?.watcher; } // Single Folder Watcher else { if (this.recursiveFoldersToWatch.length === 1) { if (isWindows) { watcherImpl = WindowsWatcherService; } else { watcherImpl = UnixWatcherService; } } // Multi Folder Watcher else { watcherImpl = NsfwWatcherService; } } // Create and start watching this.recursiveWatcher = new watcherImpl( this.recursiveFoldersToWatch, event => this._onDidChangeFile.fire(toFileChanges(event)), msg => { if (msg.type === 'error') { this._onDidWatchErrorOccur.fire(msg.message); } this.logService[msg.type](msg.message); }, this.logService.getLevel() === LogLevel.Trace, watcherOptions ); if (!this.recursiveWatcherLogLevelListener) { this.recursiveWatcherLogLevelListener = this.logService.onDidChangeLogLevel(() => { if (this.recursiveWatcher) { this.recursiveWatcher.setVerboseLogging(this.logService.getLevel() === LogLevel.Trace); } }); } } } } private watchNonRecursive(resource: URI): IDisposable { const watcherService = new NodeJSWatcherService( this.toFilePath(resource), changes => this._onDidChangeFile.fire(toFileChanges(changes)), msg => { if (msg.type === 'error') { this._onDidWatchErrorOccur.fire(msg.message); } this.logService[msg.type](msg.message); }, this.logService.getLevel() === LogLevel.Trace ); const logLevelListener = this.logService.onDidChangeLogLevel(() => { watcherService.setVerboseLogging(this.logService.getLevel() === LogLevel.Trace); }); return combinedDisposable(watcherService, logLevelListener); } //#endregion //#region Helpers protected toFilePath(resource: URI): string { return normalize(resource.fsPath); } private toFileSystemProviderError(error: NodeJS.ErrnoException): FileSystemProviderError { if (error instanceof FileSystemProviderError) { return error; // avoid double conversion } let code: FileSystemProviderErrorCode; switch (error.code) { case 'ENOENT': code = FileSystemProviderErrorCode.FileNotFound; break; case 'EISDIR': code = FileSystemProviderErrorCode.FileIsADirectory; break; case 'ENOTDIR': code = FileSystemProviderErrorCode.FileNotADirectory; break; case 'EEXIST': code = FileSystemProviderErrorCode.FileExists; break; case 'EPERM': case 'EACCES': code = FileSystemProviderErrorCode.NoPermissions; break; default: code = FileSystemProviderErrorCode.Unknown; } return createFileSystemProviderError(error, code); } //#endregion dispose(): void { super.dispose(); dispose(this.recursiveWatcher); this.recursiveWatcher = undefined; dispose(this.recursiveWatcherLogLevelListener); this.recursiveWatcherLogLevelListener = undefined; } }
src/vs/platform/files/node/diskFileSystemProvider.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0019380629528313875, 0.00020486407447606325, 0.00015765814168844372, 0.00017179761198349297, 0.0002215059648733586 ]
{ "id": 0, "code_window": [ "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tsandbox: true,\n", "\t\t\t\tcontextIsolation: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tdevTools: false\n", "\t\t\t}\n", "\t\t};\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/auth.ts", "type": "add", "edit_start_line_idx": 66 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ResourceMap, TernarySearchTree, PathIterator, StringIterator, LinkedMap, Touch, LRUCache, UriIterator } from 'vs/base/common/map'; import * as assert from 'assert'; import { URI } from 'vs/base/common/uri'; import { extUriIgnorePathCase } from 'vs/base/common/resources'; suite('Map', () => { test('LinkedMap - Simple', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); assert.deepStrictEqual([...map.keys()], ['ak', 'bk']); assert.deepStrictEqual([...map.values()], ['av', 'bv']); assert.equal(map.first, 'av'); assert.equal(map.last, 'bv'); }); test('LinkedMap - Touch Old one', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('ak', 'av', Touch.AsOld); assert.deepStrictEqual([...map.keys()], ['ak']); assert.deepStrictEqual([...map.values()], ['av']); }); test('LinkedMap - Touch New one', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('ak', 'av', Touch.AsNew); assert.deepStrictEqual([...map.keys()], ['ak']); assert.deepStrictEqual([...map.values()], ['av']); }); test('LinkedMap - Touch Old two', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); map.set('bk', 'bv', Touch.AsOld); assert.deepStrictEqual([...map.keys()], ['bk', 'ak']); assert.deepStrictEqual([...map.values()], ['bv', 'av']); }); test('LinkedMap - Touch New two', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); map.set('ak', 'av', Touch.AsNew); assert.deepStrictEqual([...map.keys()], ['bk', 'ak']); assert.deepStrictEqual([...map.values()], ['bv', 'av']); }); test('LinkedMap - Touch Old from middle', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); map.set('ck', 'cv'); map.set('bk', 'bv', Touch.AsOld); assert.deepStrictEqual([...map.keys()], ['bk', 'ak', 'ck']); assert.deepStrictEqual([...map.values()], ['bv', 'av', 'cv']); }); test('LinkedMap - Touch New from middle', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); map.set('ck', 'cv'); map.set('bk', 'bv', Touch.AsNew); assert.deepStrictEqual([...map.keys()], ['ak', 'ck', 'bk']); assert.deepStrictEqual([...map.values()], ['av', 'cv', 'bv']); }); test('LinkedMap - basics', function () { const map = new LinkedMap<string, any>(); assert.equal(map.size, 0); map.set('1', 1); map.set('2', '2'); map.set('3', true); const obj = Object.create(null); map.set('4', obj); const date = Date.now(); map.set('5', date); assert.equal(map.size, 5); assert.equal(map.get('1'), 1); assert.equal(map.get('2'), '2'); assert.equal(map.get('3'), true); assert.equal(map.get('4'), obj); assert.equal(map.get('5'), date); assert.ok(!map.get('6')); map.delete('6'); assert.equal(map.size, 5); assert.equal(map.delete('1'), true); assert.equal(map.delete('2'), true); assert.equal(map.delete('3'), true); assert.equal(map.delete('4'), true); assert.equal(map.delete('5'), true); assert.equal(map.size, 0); assert.ok(!map.get('5')); assert.ok(!map.get('4')); assert.ok(!map.get('3')); assert.ok(!map.get('2')); assert.ok(!map.get('1')); map.set('1', 1); map.set('2', '2'); map.set('3', true); assert.ok(map.has('1')); assert.equal(map.get('1'), 1); assert.equal(map.get('2'), '2'); assert.equal(map.get('3'), true); map.clear(); assert.equal(map.size, 0); assert.ok(!map.get('1')); assert.ok(!map.get('2')); assert.ok(!map.get('3')); assert.ok(!map.has('1')); }); test('LinkedMap - Iterators', () => { const map = new LinkedMap<number, any>(); map.set(1, 1); map.set(2, 2); map.set(3, 3); for (const elem of map.keys()) { assert.ok(elem); } for (const elem of map.values()) { assert.ok(elem); } for (const elem of map.entries()) { assert.ok(elem); } { const keys = map.keys(); const values = map.values(); const entries = map.entries(); map.get(1); keys.next(); values.next(); entries.next(); } { const keys = map.keys(); const values = map.values(); const entries = map.entries(); map.get(1, Touch.AsNew); let exceptions: number = 0; try { keys.next(); } catch (err) { exceptions++; } try { values.next(); } catch (err) { exceptions++; } try { entries.next(); } catch (err) { exceptions++; } assert.strictEqual(exceptions, 3); } }); test('LinkedMap - LRU Cache simple', () => { const cache = new LRUCache<number, number>(5); [1, 2, 3, 4, 5].forEach(value => cache.set(value, value)); assert.strictEqual(cache.size, 5); cache.set(6, 6); assert.strictEqual(cache.size, 5); assert.deepStrictEqual([...cache.keys()], [2, 3, 4, 5, 6]); cache.set(7, 7); assert.strictEqual(cache.size, 5); assert.deepStrictEqual([...cache.keys()], [3, 4, 5, 6, 7]); let values: number[] = []; [3, 4, 5, 6, 7].forEach(key => values.push(cache.get(key)!)); assert.deepStrictEqual(values, [3, 4, 5, 6, 7]); }); test('LinkedMap - LRU Cache get', () => { const cache = new LRUCache<number, number>(5); [1, 2, 3, 4, 5].forEach(value => cache.set(value, value)); assert.strictEqual(cache.size, 5); assert.deepStrictEqual([...cache.keys()], [1, 2, 3, 4, 5]); cache.get(3); assert.deepStrictEqual([...cache.keys()], [1, 2, 4, 5, 3]); cache.peek(4); assert.deepStrictEqual([...cache.keys()], [1, 2, 4, 5, 3]); let values: number[] = []; [1, 2, 3, 4, 5].forEach(key => values.push(cache.get(key)!)); assert.deepStrictEqual(values, [1, 2, 3, 4, 5]); }); test('LinkedMap - LRU Cache limit', () => { const cache = new LRUCache<number, number>(10); for (let i = 1; i <= 10; i++) { cache.set(i, i); } assert.strictEqual(cache.size, 10); cache.limit = 5; assert.strictEqual(cache.size, 5); assert.deepStrictEqual([...cache.keys()], [6, 7, 8, 9, 10]); cache.limit = 20; assert.strictEqual(cache.size, 5); for (let i = 11; i <= 20; i++) { cache.set(i, i); } assert.deepEqual(cache.size, 15); let values: number[] = []; for (let i = 6; i <= 20; i++) { values.push(cache.get(i)!); assert.strictEqual(cache.get(i), i); } assert.deepStrictEqual([...cache.values()], values); }); test('LinkedMap - LRU Cache limit with ratio', () => { const cache = new LRUCache<number, number>(10, 0.5); for (let i = 1; i <= 10; i++) { cache.set(i, i); } assert.strictEqual(cache.size, 10); cache.set(11, 11); assert.strictEqual(cache.size, 5); assert.deepStrictEqual([...cache.keys()], [7, 8, 9, 10, 11]); let values: number[] = []; [...cache.keys()].forEach(key => values.push(cache.get(key)!)); assert.deepStrictEqual(values, [7, 8, 9, 10, 11]); assert.deepStrictEqual([...cache.values()], values); }); test('LinkedMap - toJSON / fromJSON', () => { let map = new LinkedMap<string, string>(); map.set('ak', 'av'); map.set('bk', 'bv'); map.set('ck', 'cv'); const json = map.toJSON(); map = new LinkedMap<string, string>(); map.fromJSON(json); let i = 0; map.forEach((value, key) => { if (i === 0) { assert.equal(key, 'ak'); assert.equal(value, 'av'); } else if (i === 1) { assert.equal(key, 'bk'); assert.equal(value, 'bv'); } else if (i === 2) { assert.equal(key, 'ck'); assert.equal(value, 'cv'); } i++; }); }); test('LinkedMap - delete Head and Tail', function () { const map = new LinkedMap<string, number>(); assert.equal(map.size, 0); map.set('1', 1); assert.equal(map.size, 1); map.delete('1'); assert.equal(map.get('1'), undefined); assert.equal(map.size, 0); assert.equal([...map.keys()].length, 0); }); test('LinkedMap - delete Head', function () { const map = new LinkedMap<string, number>(); assert.equal(map.size, 0); map.set('1', 1); map.set('2', 2); assert.equal(map.size, 2); map.delete('1'); assert.equal(map.get('2'), 2); assert.equal(map.size, 1); assert.equal([...map.keys()].length, 1); assert.equal([...map.keys()][0], 2); }); test('LinkedMap - delete Tail', function () { const map = new LinkedMap<string, number>(); assert.equal(map.size, 0); map.set('1', 1); map.set('2', 2); assert.equal(map.size, 2); map.delete('2'); assert.equal(map.get('1'), 1); assert.equal(map.size, 1); assert.equal([...map.keys()].length, 1); assert.equal([...map.keys()][0], 1); }); test('PathIterator', () => { const iter = new PathIterator(); iter.reset('file:///usr/bin/file.txt'); assert.equal(iter.value(), 'file:'); assert.equal(iter.hasNext(), true); assert.equal(iter.cmp('file:'), 0); assert.ok(iter.cmp('a') < 0); assert.ok(iter.cmp('aile:') < 0); assert.ok(iter.cmp('z') > 0); assert.ok(iter.cmp('zile:') > 0); iter.next(); assert.equal(iter.value(), 'usr'); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'bin'); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'file.txt'); assert.equal(iter.hasNext(), false); iter.next(); assert.equal(iter.value(), ''); assert.equal(iter.hasNext(), false); iter.next(); assert.equal(iter.value(), ''); assert.equal(iter.hasNext(), false); // iter.reset('/foo/bar/'); assert.equal(iter.value(), 'foo'); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'bar'); assert.equal(iter.hasNext(), false); }); test('URIIterator', function () { const iter = new UriIterator(); iter.reset(URI.parse('file:///usr/bin/file.txt')); assert.equal(iter.value(), 'file'); // assert.equal(iter.cmp('FILE'), 0); assert.equal(iter.cmp('file'), 0); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'usr'); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'bin'); assert.equal(iter.hasNext(), true); iter.next(); assert.equal(iter.value(), 'file.txt'); assert.equal(iter.hasNext(), false); iter.reset(URI.parse('file://share/usr/bin/file.txt?foo')); // scheme assert.equal(iter.value(), 'file'); // assert.equal(iter.cmp('FILE'), 0); assert.equal(iter.cmp('file'), 0); assert.equal(iter.hasNext(), true); iter.next(); // authority assert.equal(iter.value(), 'share'); assert.equal(iter.cmp('SHARe'), 0); assert.equal(iter.hasNext(), true); iter.next(); // path assert.equal(iter.value(), 'usr'); assert.equal(iter.hasNext(), true); iter.next(); // path assert.equal(iter.value(), 'bin'); assert.equal(iter.hasNext(), true); iter.next(); // path assert.equal(iter.value(), 'file.txt'); assert.equal(iter.hasNext(), true); iter.next(); // query assert.equal(iter.value(), 'foo'); assert.equal(iter.cmp('z') > 0, true); assert.equal(iter.cmp('a') < 0, true); assert.equal(iter.hasNext(), false); }); function assertTernarySearchTree<E>(trie: TernarySearchTree<string, E>, ...elements: [string, E][]) { const map = new Map<string, E>(); for (const [key, value] of elements) { map.set(key, value); } map.forEach((value, key) => { assert.equal(trie.get(key), value); }); trie.forEach((element, key) => { assert.equal(element, map.get(key)); map.delete(key); }); assert.equal(map.size, 0); } test('TernarySearchTree - set', function () { let trie = TernarySearchTree.forStrings<number>(); trie.set('foobar', 1); trie.set('foobaz', 2); assertTernarySearchTree(trie, ['foobar', 1], ['foobaz', 2]); // longer trie = TernarySearchTree.forStrings<number>(); trie.set('foobar', 1); trie.set('fooba', 2); assertTernarySearchTree(trie, ['foobar', 1], ['fooba', 2]); // shorter trie = TernarySearchTree.forStrings<number>(); trie.set('foo', 1); trie.set('foo', 2); assertTernarySearchTree(trie, ['foo', 2]); trie = TernarySearchTree.forStrings<number>(); trie.set('foo', 1); trie.set('foobar', 2); trie.set('bar', 3); trie.set('foob', 4); trie.set('bazz', 5); assertTernarySearchTree(trie, ['foo', 1], ['foobar', 2], ['bar', 3], ['foob', 4], ['bazz', 5] ); }); test('TernarySearchTree - findLongestMatch', function () { let trie = TernarySearchTree.forStrings<number>(); trie.set('foo', 1); trie.set('foobar', 2); trie.set('foobaz', 3); assert.equal(trie.findSubstr('f'), undefined); assert.equal(trie.findSubstr('z'), undefined); assert.equal(trie.findSubstr('foo'), 1); assert.equal(trie.findSubstr('fooö'), 1); assert.equal(trie.findSubstr('fooba'), 1); assert.equal(trie.findSubstr('foobarr'), 2); assert.equal(trie.findSubstr('foobazrr'), 3); }); test('TernarySearchTree - basics', function () { let trie = new TernarySearchTree<string, number>(new StringIterator()); trie.set('foo', 1); trie.set('bar', 2); trie.set('foobar', 3); assert.equal(trie.get('foo'), 1); assert.equal(trie.get('bar'), 2); assert.equal(trie.get('foobar'), 3); assert.equal(trie.get('foobaz'), undefined); assert.equal(trie.get('foobarr'), undefined); assert.equal(trie.findSubstr('fo'), undefined); assert.equal(trie.findSubstr('foo'), 1); assert.equal(trie.findSubstr('foooo'), 1); trie.delete('foobar'); trie.delete('bar'); assert.equal(trie.get('foobar'), undefined); assert.equal(trie.get('bar'), undefined); trie.set('foobar', 17); trie.set('barr', 18); assert.equal(trie.get('foobar'), 17); assert.equal(trie.get('barr'), 18); assert.equal(trie.get('bar'), undefined); }); test('TernarySearchTree - delete & cleanup', function () { let trie = new TernarySearchTree<string, number>(new StringIterator()); trie.set('foo', 1); trie.set('foobar', 2); trie.set('bar', 3); trie.delete('foo'); trie.delete('foobar'); }); test('TernarySearchTree (PathSegments) - basics', function () { let trie = new TernarySearchTree<string, number>(new PathIterator()); trie.set('/user/foo/bar', 1); trie.set('/user/foo', 2); trie.set('/user/foo/flip/flop', 3); assert.equal(trie.get('/user/foo/bar'), 1); assert.equal(trie.get('/user/foo'), 2); assert.equal(trie.get('/user//foo'), 2); assert.equal(trie.get('/user\\foo'), 2); assert.equal(trie.get('/user/foo/flip/flop'), 3); assert.equal(trie.findSubstr('/user/bar'), undefined); assert.equal(trie.findSubstr('/user/foo'), 2); assert.equal(trie.findSubstr('\\user\\foo'), 2); assert.equal(trie.findSubstr('/user//foo'), 2); assert.equal(trie.findSubstr('/user/foo/ba'), 2); assert.equal(trie.findSubstr('/user/foo/far/boo'), 2); assert.equal(trie.findSubstr('/user/foo/bar'), 1); assert.equal(trie.findSubstr('/user/foo/bar/far/boo'), 1); }); test('TernarySearchTree (PathSegments) - lookup', function () { const map = new TernarySearchTree<string, number>(new PathIterator()); map.set('/user/foo/bar', 1); map.set('/user/foo', 2); map.set('/user/foo/flip/flop', 3); assert.equal(map.get('/foo'), undefined); assert.equal(map.get('/user'), undefined); assert.equal(map.get('/user/foo'), 2); assert.equal(map.get('/user/foo/bar'), 1); assert.equal(map.get('/user/foo/bar/boo'), undefined); }); test('TernarySearchTree (PathSegments) - superstr', function () { const map = new TernarySearchTree<string, number>(new PathIterator()); map.set('/user/foo/bar', 1); map.set('/user/foo', 2); map.set('/user/foo/flip/flop', 3); map.set('/usr/foo', 4); let item: IteratorResult<number>; let iter = map.findSuperstr('/user'); item = iter!.next(); assert.equal(item.value, 2); assert.equal(item.done, false); item = iter!.next(); assert.equal(item.value, 1); assert.equal(item.done, false); item = iter!.next(); assert.equal(item.value, 3); assert.equal(item.done, false); item = iter!.next(); assert.equal(item.value, undefined); assert.equal(item.done, true); iter = map.findSuperstr('/usr'); item = iter!.next(); assert.equal(item.value, 4); assert.equal(item.done, false); item = iter!.next(); assert.equal(item.value, undefined); assert.equal(item.done, true); assert.equal(map.findSuperstr('/not'), undefined); assert.equal(map.findSuperstr('/us'), undefined); assert.equal(map.findSuperstr('/usrr'), undefined); assert.equal(map.findSuperstr('/userr'), undefined); }); test('TernarySearchTree (URI) - basics', function () { let trie = new TernarySearchTree<URI, number>(new UriIterator()); trie.set(URI.file('/user/foo/bar'), 1); trie.set(URI.file('/user/foo'), 2); trie.set(URI.file('/user/foo/flip/flop'), 3); assert.equal(trie.get(URI.file('/user/foo/bar')), 1); assert.equal(trie.get(URI.file('/user/foo')), 2); assert.equal(trie.get(URI.file('/user/foo/flip/flop')), 3); assert.equal(trie.findSubstr(URI.file('/user/bar')), undefined); assert.equal(trie.findSubstr(URI.file('/user/foo')), 2); assert.equal(trie.findSubstr(URI.file('/user/foo/ba')), 2); assert.equal(trie.findSubstr(URI.file('/user/foo/far/boo')), 2); assert.equal(trie.findSubstr(URI.file('/user/foo/bar')), 1); assert.equal(trie.findSubstr(URI.file('/user/foo/bar/far/boo')), 1); }); test('TernarySearchTree (URI) - lookup', function () { const map = new TernarySearchTree<URI, number>(new UriIterator()); map.set(URI.parse('http://foo.bar/user/foo/bar'), 1); map.set(URI.parse('http://foo.bar/user/foo?query'), 2); map.set(URI.parse('http://foo.bar/user/foo?QUERY'), 3); map.set(URI.parse('http://foo.bar/user/foo/flip/flop'), 3); assert.equal(map.get(URI.parse('http://foo.bar/foo')), undefined); assert.equal(map.get(URI.parse('http://foo.bar/user')), undefined); assert.equal(map.get(URI.parse('http://foo.bar/user/foo/bar')), 1); assert.equal(map.get(URI.parse('http://foo.bar/user/foo?query')), 2); assert.equal(map.get(URI.parse('http://foo.bar/user/foo?Query')), undefined); assert.equal(map.get(URI.parse('http://foo.bar/user/foo?QUERY')), 3); assert.equal(map.get(URI.parse('http://foo.bar/user/foo/bar/boo')), undefined); }); test('TernarySearchTree (PathSegments) - superstr', function () { const map = new TernarySearchTree<URI, number>(new UriIterator()); map.set(URI.file('/user/foo/bar'), 1); map.set(URI.file('/user/foo'), 2); map.set(URI.file('/user/foo/flip/flop'), 3); map.set(URI.file('/usr/foo'), 4); let item: IteratorResult<number>; let iter = map.findSuperstr(URI.file('/user'))!; item = iter.next(); assert.equal(item.value, 2); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, 1); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, 3); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, undefined); assert.equal(item.done, true); iter = map.findSuperstr(URI.file('/usr'))!; item = iter.next(); assert.equal(item.value, 4); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, undefined); assert.equal(item.done, true); iter = map.findSuperstr(URI.file('/'))!; item = iter.next(); assert.equal(item.value, 2); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, 1); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, 3); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, 4); assert.equal(item.done, false); item = iter.next(); assert.equal(item.value, undefined); assert.equal(item.done, true); assert.equal(map.findSuperstr(URI.file('/not')), undefined); assert.equal(map.findSuperstr(URI.file('/us')), undefined); assert.equal(map.findSuperstr(URI.file('/usrr')), undefined); assert.equal(map.findSuperstr(URI.file('/userr')), undefined); }); test('ResourceMap - basics', function () { const map = new ResourceMap<any>(); const resource1 = URI.parse('some://1'); const resource2 = URI.parse('some://2'); const resource3 = URI.parse('some://3'); const resource4 = URI.parse('some://4'); const resource5 = URI.parse('some://5'); const resource6 = URI.parse('some://6'); assert.equal(map.size, 0); let res = map.set(resource1, 1); assert.ok(res === map); map.set(resource2, '2'); map.set(resource3, true); const values = [...map.values()]; assert.equal(values[0], 1); assert.equal(values[1], '2'); assert.equal(values[2], true); let counter = 0; map.forEach((value, key, mapObj) => { assert.equal(value, values[counter++]); assert.ok(URI.isUri(key)); assert.ok(map === mapObj); }); const obj = Object.create(null); map.set(resource4, obj); const date = Date.now(); map.set(resource5, date); assert.equal(map.size, 5); assert.equal(map.get(resource1), 1); assert.equal(map.get(resource2), '2'); assert.equal(map.get(resource3), true); assert.equal(map.get(resource4), obj); assert.equal(map.get(resource5), date); assert.ok(!map.get(resource6)); map.delete(resource6); assert.equal(map.size, 5); assert.ok(map.delete(resource1)); assert.ok(map.delete(resource2)); assert.ok(map.delete(resource3)); assert.ok(map.delete(resource4)); assert.ok(map.delete(resource5)); assert.equal(map.size, 0); assert.ok(!map.get(resource5)); assert.ok(!map.get(resource4)); assert.ok(!map.get(resource3)); assert.ok(!map.get(resource2)); assert.ok(!map.get(resource1)); map.set(resource1, 1); map.set(resource2, '2'); map.set(resource3, true); assert.ok(map.has(resource1)); assert.equal(map.get(resource1), 1); assert.equal(map.get(resource2), '2'); assert.equal(map.get(resource3), true); map.clear(); assert.equal(map.size, 0); assert.ok(!map.get(resource1)); assert.ok(!map.get(resource2)); assert.ok(!map.get(resource3)); assert.ok(!map.has(resource1)); map.set(resource1, false); map.set(resource2, 0); assert.ok(map.has(resource1)); assert.ok(map.has(resource2)); }); test('ResourceMap - files (do NOT ignorecase)', function () { const map = new ResourceMap<any>(); const fileA = URI.parse('file://some/filea'); const fileB = URI.parse('some://some/other/fileb'); const fileAUpper = URI.parse('file://SOME/FILEA'); map.set(fileA, 'true'); assert.equal(map.get(fileA), 'true'); assert.ok(!map.get(fileAUpper)); assert.ok(!map.get(fileB)); map.set(fileAUpper, 'false'); assert.equal(map.get(fileAUpper), 'false'); assert.equal(map.get(fileA), 'true'); const windowsFile = URI.file('c:\\test with %25\\c#code'); const uncFile = URI.file('\\\\shäres\\path\\c#\\plugin.json'); map.set(windowsFile, 'true'); map.set(uncFile, 'true'); assert.equal(map.get(windowsFile), 'true'); assert.equal(map.get(uncFile), 'true'); }); test('ResourceMap - files (ignorecase)', function () { const map = new ResourceMap<any>(uri => extUriIgnorePathCase.getComparisonKey(uri)); const fileA = URI.parse('file://some/filea'); const fileB = URI.parse('some://some/other/fileb'); const fileAUpper = URI.parse('file://SOME/FILEA'); map.set(fileA, 'true'); assert.equal(map.get(fileA), 'true'); assert.equal(map.get(fileAUpper), 'true'); assert.ok(!map.get(fileB)); map.set(fileAUpper, 'false'); assert.equal(map.get(fileAUpper), 'false'); assert.equal(map.get(fileA), 'false'); const windowsFile = URI.file('c:\\test with %25\\c#code'); const uncFile = URI.file('\\\\shäres\\path\\c#\\plugin.json'); map.set(windowsFile, 'true'); map.set(uncFile, 'true'); assert.equal(map.get(windowsFile), 'true'); assert.equal(map.get(uncFile), 'true'); }); });
src/vs/base/test/common/map.test.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0001793544797692448, 0.00017631267837714404, 0.00016879205941222608, 0.00017643127648625523, 0.0000021518369521800196 ]
{ "id": 0, "code_window": [ "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tsandbox: true,\n", "\t\t\t\tcontextIsolation: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tdevTools: false\n", "\t\t\t}\n", "\t\t};\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/auth.ts", "type": "add", "edit_start_line_idx": 66 }
<svg width="53" height="36" viewBox="0 0 53 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M48.0364 4.01042H4.00779L4.00779 32.0286H48.0364V4.01042ZM4.00779 0.0078125C1.79721 0.0078125 0.00518799 1.79984 0.00518799 4.01042V32.0286C0.00518799 34.2392 1.79721 36.0312 4.00779 36.0312H48.0364C50.247 36.0312 52.039 34.2392 52.039 32.0286V4.01042C52.039 1.79984 50.247 0.0078125 48.0364 0.0078125H4.00779ZM8.01042 8.01302H12.013V12.0156H8.01042V8.01302ZM20.0182 8.01302H16.0156V12.0156H20.0182V8.01302ZM24.0208 8.01302H28.0234V12.0156H24.0208V8.01302ZM36.0286 8.01302H32.026V12.0156H36.0286V8.01302ZM40.0312 8.01302H44.0339V12.0156H40.0312V8.01302ZM16.0156 16.0182H8.01042V20.0208H16.0156V16.0182ZM20.0182 16.0182H24.0208V20.0208H20.0182V16.0182ZM32.026 16.0182H28.0234V20.0208H32.026V16.0182ZM44.0339 16.0182V20.0208H36.0286V16.0182H44.0339ZM12.013 24.0234H8.01042V28.026H12.013V24.0234ZM16.0156 24.0234H36.0286V28.026H16.0156V24.0234ZM44.0339 24.0234H40.0312V28.026H44.0339V24.0234Z" fill="#424242"/> </g> <defs> <clipPath id="clip0"> <rect width="53" height="36" fill="white"/> </clipPath> </defs> </svg>
src/vs/editor/standalone/browser/iPadShowKeyboard/keyboard-light.svg
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0016375858103856444, 0.0009062520111910999, 0.00017491821199655533, 0.0009062520111910999, 0.0007313337991945446 ]
{ "id": 1, "code_window": [ "\t\t\twebPreferences: {\n", "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tnodeIntegration: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\timages: false,\n", "\t\t\t\twebgl: false,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/sharedProcess.ts", "type": "add", "edit_start_line_idx": 47 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; import * as os from 'os'; import product from 'vs/platform/product/common/product'; import * as objects from 'vs/base/common/objects'; import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv'; import { ICommonIssueService, IssueReporterData, IssueReporterFeatures, ProcessExplorerData } from 'vs/platform/issue/common/issue'; import { BrowserWindow, ipcMain, screen, IpcMainEvent, Display, shell } from 'electron'; import { ILaunchMainService } from 'vs/platform/launch/electron-main/launchMainService'; import { PerformanceInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics'; import { IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { isMacintosh, IProcessEnvironment } from 'vs/base/common/platform'; import { ILogService } from 'vs/platform/log/common/log'; import { IWindowState } from 'vs/platform/windows/electron-main/windows'; import { listProcesses } from 'vs/base/node/ps'; import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs'; import { URI } from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { zoomLevelToZoomFactor } from 'vs/platform/windows/common/windows'; const DEFAULT_BACKGROUND_COLOR = '#1E1E1E'; export const IIssueMainService = createDecorator<IIssueMainService>('issueMainService'); export interface IIssueMainService extends ICommonIssueService { } export class IssueMainService implements ICommonIssueService { declare readonly _serviceBrand: undefined; _issueWindow: BrowserWindow | null = null; _issueParentWindow: BrowserWindow | null = null; _processExplorerWindow: BrowserWindow | null = null; _processExplorerParentWindow: BrowserWindow | null = null; constructor( private machineId: string, private userEnv: IProcessEnvironment, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @ILaunchMainService private readonly launchMainService: ILaunchMainService, @ILogService private readonly logService: ILogService, @IDiagnosticsService private readonly diagnosticsService: IDiagnosticsService, @IDialogMainService private readonly dialogMainService: IDialogMainService ) { this.registerListeners(); } private registerListeners(): void { ipcMain.on('vscode:issueSystemInfoRequest', async (event: IpcMainEvent) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getSystemInfo(info, remoteData).then(msg => { event.sender.send('vscode:issueSystemInfoResponse', msg); }); }); }); ipcMain.on('vscode:listProcesses', async (event: IpcMainEvent) => { const processes = []; try { const mainPid = await this.launchMainService.getMainProcessId(); processes.push({ name: localize('local', "Local"), rootProcess: await listProcesses(mainPid) }); (await this.launchMainService.getRemoteDiagnostics({ includeProcesses: true })) .forEach(data => { if (isRemoteDiagnosticError(data)) { processes.push({ name: data.hostName, rootProcess: data }); } else { if (data.processes) { processes.push({ name: data.hostName, rootProcess: data.processes }); } } }); } catch (e) { this.logService.error(`Listing processes failed: ${e}`); } event.sender.send('vscode:listProcessesResponse', processes); }); ipcMain.on('vscode:issueReporterClipboard', (event: IpcMainEvent) => { const messageOptions = { message: localize('issueReporterWriteToClipboard', "There is too much data to send to GitHub directly. The data will be copied to the clipboard, please paste it into the GitHub issue page that is opened."), type: 'warning', buttons: [ localize('ok', "OK"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { event.sender.send('vscode:issueReporterClipboardResponse', result.response === 0); }); } }); ipcMain.on('vscode:issuePerformanceInfoRequest', (event: IpcMainEvent) => { this.getPerformanceInfo().then(msg => { event.sender.send('vscode:issuePerformanceInfoResponse', msg); }); }); ipcMain.on('vscode:issueReporterConfirmClose', () => { const messageOptions = { message: localize('confirmCloseIssueReporter', "Your input will not be saved. Are you sure you want to close this window?"), type: 'warning', buttons: [ localize('yes', "Yes"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { if (result.response === 0) { if (this._issueWindow) { this._issueWindow.destroy(); this._issueWindow = null; } } }); } }); ipcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any; }) => { const { id, from, args } = commandInfo; let parentWindow: BrowserWindow | null; switch (from) { case 'issueReporter': parentWindow = this._issueParentWindow; break; case 'processExplorer': parentWindow = this._processExplorerParentWindow; break; default: throw new Error(`Unexpected command source: ${from}`); } if (parentWindow) { parentWindow.webContents.send('vscode:runAction', { id, from, args }); } }); ipcMain.on('vscode:openExternal', (_: unknown, arg: string) => { shell.openExternal(arg); }); ipcMain.on('vscode:closeIssueReporter', (event: IpcMainEvent) => { if (this._issueWindow) { this._issueWindow.close(); } }); ipcMain.on('vscode:closeProcessExplorer', (event: IpcMainEvent) => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); } }); ipcMain.on('vscode:windowsInfoRequest', (event: IpcMainEvent) => { this.launchMainService.getMainProcessInfo().then(info => { event.sender.send('vscode:windowsInfoResponse', info.windows); }); }); } openReporter(data: IssueReporterData): Promise<void> { return new Promise(_ => { if (!this._issueWindow) { this._issueParentWindow = BrowserWindow.getFocusedWindow(); if (this._issueParentWindow) { const position = this.getWindowPosition(this._issueParentWindow, 700, 800); this._issueWindow = new BrowserWindow({ fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, title: localize('issueReporter', "Issue Reporter"), backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR, webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._issueWindow.setMenuBarVisibility(false); // workaround for now, until a menu is implemented // Modified when testing UI const features: IssueReporterFeatures = {}; this.logService.trace('issueService#openReporter: opening issue reporter'); this._issueWindow.loadURL(this.getIssueReporterPath(data, features)); this._issueWindow.on('close', () => this._issueWindow = null); this._issueParentWindow.on('closed', () => { if (this._issueWindow) { this._issueWindow.close(); this._issueWindow = null; } }); } } if (this._issueWindow) { this._issueWindow.focus(); } }); } openProcessExplorer(data: ProcessExplorerData): Promise<void> { return new Promise(_ => { // Create as singleton if (!this._processExplorerWindow) { this._processExplorerParentWindow = BrowserWindow.getFocusedWindow(); if (this._processExplorerParentWindow) { const position = this.getWindowPosition(this._processExplorerParentWindow, 800, 500); this._processExplorerWindow = new BrowserWindow({ skipTaskbar: true, resizable: true, fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, backgroundColor: data.styles.backgroundColor, title: localize('processExplorer', "Process Explorer"), webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._processExplorerWindow.setMenuBarVisibility(false); const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._processExplorerWindow.id, userEnv: this.userEnv, machineId: this.machineId, data }; this._processExplorerWindow.loadURL( toLauchUrl('vs/code/electron-sandbox/processExplorer/processExplorer.html', windowConfiguration)); this._processExplorerWindow.on('close', () => this._processExplorerWindow = null); this._processExplorerParentWindow.on('close', () => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); this._processExplorerWindow = null; } }); } } // Focus if (this._processExplorerWindow) { this._processExplorerWindow.focus(); } }); } public async getSystemStatus(): Promise<string> { return Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; return this.diagnosticsService.getDiagnostics(info, remoteData); }); } private getWindowPosition(parentWindow: BrowserWindow, defaultWidth: number, defaultHeight: number): IWindowState { // We want the new window to open on the same display that the parent is in let displayToUse: Display | undefined; const displays = screen.getAllDisplays(); // Single Display if (displays.length === 1) { displayToUse = displays[0]; } // Multi Display else { // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is if (isMacintosh) { const cursorPoint = screen.getCursorScreenPoint(); displayToUse = screen.getDisplayNearestPoint(cursorPoint); } // if we have a last active window, use that display for the new window if (!displayToUse && parentWindow) { displayToUse = screen.getDisplayMatching(parentWindow.getBounds()); } // fallback to primary display or first display if (!displayToUse) { displayToUse = screen.getPrimaryDisplay() || displays[0]; } } const state: IWindowState = { width: defaultWidth, height: defaultHeight }; const displayBounds = displayToUse.bounds; state.x = displayBounds.x + (displayBounds.width / 2) - (state.width! / 2); state.y = displayBounds.y + (displayBounds.height / 2) - (state.height! / 2); if (displayBounds.width > 0 && displayBounds.height > 0 /* Linux X11 sessions sometimes report wrong display bounds */) { if (state.x < displayBounds.x) { state.x = displayBounds.x; // prevent window from falling out of the screen to the left } if (state.y < displayBounds.y) { state.y = displayBounds.y; // prevent window from falling out of the screen to the top } if (state.x > (displayBounds.x + displayBounds.width)) { state.x = displayBounds.x; // prevent window from falling out of the screen to the right } if (state.y > (displayBounds.y + displayBounds.height)) { state.y = displayBounds.y; // prevent window from falling out of the screen to the bottom } if (state.width! > displayBounds.width) { state.width = displayBounds.width; // prevent window from exceeding display bounds width } if (state.height! > displayBounds.height) { state.height = displayBounds.height; // prevent window from exceeding display bounds height } } return state; } private getPerformanceInfo(): Promise<PerformanceInfo> { return new Promise(async (resolve, reject) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: true, includeWorkspaceMetadata: true })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getPerformanceInfo(info, remoteData) .then(diagnosticInfo => { resolve(diagnosticInfo); }) .catch(err => { this.logService.warn('issueService#getPerformanceInfo ', err.message); reject(err); }); }); }); } private getIssueReporterPath(data: IssueReporterData, features: IssueReporterFeatures): string { if (!this._issueWindow) { throw new Error('Issue window has been disposed'); } const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._issueWindow.id, machineId: this.machineId, userEnv: this.userEnv, data, features, disableExtensions: this.environmentService.disableExtensions, os: { type: os.type(), arch: os.arch(), release: os.release(), }, product: { nameShort: product.nameShort, version: product.version, commit: product.commit, date: product.date, reportIssueUrl: product.reportIssueUrl } }; return toLauchUrl('vs/code/electron-sandbox/issue/issueReporter.html', windowConfiguration); } } function toLauchUrl<T>(pathToHtml: string, windowConfiguration: T): string { const environment = parseArgs(process.argv, OPTIONS); const config = objects.assign(environment, windowConfiguration); for (const keyValue of Object.keys(config)) { const key = keyValue as keyof typeof config; if (config[key] === undefined || config[key] === null || config[key] === '') { delete config[key]; // only send over properties that have a true value } } return `${require.toUrl(pathToHtml)}?config=${encodeURIComponent(JSON.stringify(config))}`; }
src/vs/platform/issue/electron-main/issueMainService.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.996350884437561, 0.0398268923163414, 0.0001656409294810146, 0.00017085635045077652, 0.18677595257759094 ]
{ "id": 1, "code_window": [ "\t\t\twebPreferences: {\n", "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tnodeIntegration: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\timages: false,\n", "\t\t\t\twebgl: false,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/sharedProcess.ts", "type": "add", "edit_start_line_idx": 47 }
.vscode/** typings/** **/*.ts **/*.map .gitignore tsconfig.json
extensions/vscode-api-tests/.vscodeignore
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017465456039644778, 0.00017465456039644778, 0.00017465456039644778, 0.00017465456039644778, 0 ]
{ "id": 1, "code_window": [ "\t\t\twebPreferences: {\n", "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tnodeIntegration: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\timages: false,\n", "\t\t\t\twebgl: false,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/sharedProcess.ts", "type": "add", "edit_start_line_idx": 47 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ define(function() { return { data: ["AI_ClearCaptureImportanceBonus","AI_ClearImportance","AI_CreateObjective","AI_DebugAttackEncounterPositionScoringEnable","AI_DebugAttackEncounterPositionScoringIsEnabled","AI_DebugLuaEnable","AI_DebugLuaIsEnabled","AI_DebugRatingEnable","AI_DebugRatingIsEnabled","AI_DebugRenderAllTaskChildrenEnable","AI_DebugRenderAllTaskChildrenIsEnabled","AI_DebugSkirmishCaptureEnable","AI_DebugSkirmishCaptureIsEnabled","AI_DebugSkirmishCombatTargetEnable","AI_DebugSkirmishCombatTargetIsEnabled","AI_DebugSkirmishObjectiveEnable","AI_DebugSkirmishObjectiveIsEnabled","AI_DisableAllEconomyOverrides","AI_Enable","AI_EnableAll","AI_EnableEconomyOverride","AI_GetDifficulty","AI_GetPersonality","AI_GetPersonalityLuaFileName","AI_IsAIPlayer","AI_IsEnabled","AI_LockEntity","AI_LockSquad","AI_LockSquads","AI_RestoreDefaultPersonalitySettings","AI_SetCaptureImportanceBonus","AI_SetDifficulty","AI_SetImportance","AI_SetPersonality","AI_UnlockAll","AI_UnlockEntity","AI_UnlockSquad","AI_UnlockSquads","AI_UpdateStatics","AIAbilityObjective_AbilityGuidance_SetAbilityPBG","AIObjective_Cancel","AIObjective_CombatGuidance_EnableCombatGarrison","AIObjective_CombatGuidance_EnableRetaliateAttacks","AIObjective_CombatGuidance_SetRetaliateAttackTargetAreaRadius","AIObjective_DefenseGuidance_AddFacingPosition","AIObjective_DefenseGuidance_EnableIdleGarrison","AIObjective_DefenseGuidance_ResetFacingPositions","AIObjective_EngagementGuidance_EnableAggressiveEngagementMove","AIObjective_EngagementGuidance_SetAllowReturnToPreviousStages","AIObjective_EngagementGuidance_SetCoordinatedSetup","AIObjective_EngagementGuidance_SetMaxEngagementTime","AIObjective_EngagementGuidance_SetMaxIdleTime","AIObjective_FallbackGuidance_EnableRetreatOnPinned","AIObjective_FallbackGuidance_EnableRetreatOnSuppression","AIObjective_FallbackGuidance_SetEntitiesRemainingThreshold","AIObjective_FallbackGuidance_SetFallbackCapacityPercentage","AIObjective_FallbackGuidance_SetFallbackCombatRatingPercentage","AIObjective_FallbackGuidance_SetFallbackSquadHealthPercentage","AIObjective_FallbackGuidance_SetFallbackVehicleHealthPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackPercentage","AIObjective_FallbackGuidance_SetGlobalFallbackRetreat","AIObjective_FallbackGuidance_SetRetreatCapacityPercentage","AIObjective_FallbackGuidance_SetRetreatCombatRatingPercentage","AIObjective_FallbackGuidance_SetRetreatHealthPercentage","AIObjective_FallbackGuidance_SetTargetPosition","AIObjective_IsValid","AIObjective_MoveGuidance_EnableAggressiveMove","AIObjective_MoveGuidance_ResetPathingLengthFactor","AIObjective_MoveGuidance_ResetSafePathingWeight","AIObjective_MoveGuidance_SetPathingLengthFactor","AIObjective_MoveGuidance_SetSafePathingWeight","AIObjective_MoveGuidance_SetSquadCoherenceRadius","AIObjective_Notify_ClearCallbacks","AIObjective_Notify_SetPlayerEventObjectiveID","AIObjective_ResourceGuidance_ClearSquads","AIObjective_ResourceGuidance_SquadGroup","AIObjective_SetName","AIObjective_TacticFilter_DisableAbility","AIObjective_TacticFilter_DisableAbilityForSquadGroup","AIObjective_TacticFilter_EnableCloseGround","AIObjective_TacticFilter_Reset","AIObjective_TacticFilter_ResetAbilityGuidance","AIObjective_TacticFilter_ResetPriority","AIObjective_TacticFilter_ResetTacticGuidance","AIObjective_TacticFilter_ResetTargetGuidance","AIObjective_TacticFilter_SetAbilityGuidance","AIObjective_TacticFilter_SetDefaultAbilityGuidance","AIObjective_TacticFilter_SetDefaultTacticGuidance","AIObjective_TacticFilter_SetDefaultTargetGuidance","AIObjective_TacticFilter_SetPriority","AIObjective_TacticFilter_SetPriorityForSquadGroup","AIObjective_TacticFilter_SetTacticGuidance","AIObjective_TacticFilter_SetTargetPolicy","AIObjective_TargetGuidance_SetTargetArea","AIObjective_TargetGuidance_SetTargetEntity","AIObjective_TargetGuidance_SetTargetLeash","AIObjective_TargetGuidance_SetTargetPathByName","AIObjective_TargetGuidance_SetTargetPathWander","AIObjective_TargetGuidance_SetTargetPosition","AIObjective_TargetGuidance_SetTargetSquad","BeginnerHint_AddOpportunity","BeginnerHint_RemoveAllOpportunities","BeginnerHint_RemoveOpportunity","BP_GetAbilityBlueprint","BP_GetCamouflageStanceBlueprint","BP_GetCriticalBlueprint","BP_GetEntityBlueprint","BP_GetID","BP_GetMoveTypeBlueprint","BP_GetName","BP_GetPropertyBagGroupCount","BP_GetPropertyBagGroupPathName","BP_GetSlotItemBlueprint","BP_GetSquadBlueprint","BP_GetUpgradeBlueprint","BP_GetWeaponBlueprint","EBP_Exists","SBP_Exists","Camera_CyclePositions","Camera_Follow","Camera_MoveTo","Camera_MoveToIfClose","Camera_SetDefault","Cmd_AbandonTeamWeapon","Cmd_Ability","Cmd_AttachSquads","Cmd_Attack","Cmd_AttackMove","Cmd_AttackMoveThenCapture","Cmd_CaptureTeamWeapon","Cmd_Construct","Cmd_CriticalHit","Cmd_DetonateDemolitions","Cmd_EjectOccupants","Cmd_Garrison","Cmd_InstantReinforceUnit","Cmd_InstantReinforceUnitPos","Cmd_InstantSetupTeamWeapon","Cmd_InstantUpgrade","Cmd_Move","Cmd_MoveAwayFromPos","Cmd_MoveToAndDespawn","Cmd_MoveToClosestMarker","Cmd_MoveToThenCapture","Cmd_RecrewVehicle","Cmd_ReinforceUnit","Cmd_ReinforceUnitPos","Cmd_Retreat","Cmd_RevertOccupiedBuilding","Cmd_SetDemolitions","Cmd_SquadCamouflageStance","Cmd_SquadPath","Cmd_SquadPatrolMarker","Cmd_StaggeredRetreat","Cmd_Stop","Cmd_Surrender","Cmd_UngarrisonSquad","Cmd_Upgrade","Command_Entity","Command_EntityAbility","Command_EntityBuildSquad","Command_EntityEntity","Command_EntityExt","Command_EntityPos","Command_EntityPosAbility","Command_EntityPosDirAbility","Command_EntityPosSquad","Command_EntitySquad","Command_EntityTargetEntityAbility","Command_EntityTargetSquadAbility","Command_EntityUpgrade","Command_Player","Command_PlayerAbility","Command_PlayerEntity","Command_PlayerEntityCriticalHit","Command_PlayerExt","Command_PlayerPos","Command_PlayerPosAbility","Command_PlayerPosDirAbility","Command_PlayerPosExt","Command_PlayerSquadConstructBuilding","Command_PlayerSquadConstructFence","Command_PlayerSquadConstructField","Command_PlayerSquadCriticalHit","Command_PlayerUpgrade","Command_Squad","Command_SquadAbility","Command_SquadAttackMovePos","Command_SquadDoCustomPlan","Command_SquadDoCustomPlanTarget","Command_SquadEntity","Command_SquadEntityAbility","Command_SquadEntityAttack","Command_SquadEntityBool","Command_SquadEntityExt","Command_SquadEntityLoad","Command_SquadExt","Command_SquadMovePos","Command_SquadMovePosFacing","Command_SquadPos","Command_SquadPosAbility","Command_SquadPosExt","Command_SquadPositionAttack","Command_SquadSquad","Command_SquadSquadAbility","Command_SquadSquadAttack","Command_SquadSquadExt","Command_SquadSquadLoad","Command_SquadUpgrade","AutoCinematic","AutoReinforce_AddSGroup","AutoReinforce_RemoveAll","AutoReinforce_RemoveSGroup","AutoRetreat_AddSGroup","AutoRetreat_RemoveAll","AutoRetreat_RemoveSGroup","BridgeTerritory_Add","Ceasefire_AddSGroup","Ceasefire_RemoveSGroup","FireTargettingArtillery","Game_DefaultGameRestore","Game_GetGameRestoreCallbackExists","Game_RemoveGameRestoreCallback","Game_SetGameRestoreCallback","Resources_Disable","Resources_Enable","ShootTheSky_AddSyncWeapon","ShootTheSky_RemoveAll","ShootTheSky_RemoveSyncWeapon","SmokeEntrance_Do","Table_Contains","Table_Copy","Table_GetRandomItem","TeamWeapon_AddGroup","TeamWeapon_RemoveDirections","TeamWeapon_RemoveGroup","EGroup_Add","EGroup_AddEGroup","EGroup_CanSeeEGroup","EGroup_CanSeeSGroup","EGroup_Clear","EGroup_Compare","EGroup_ContainsBlueprints","EGroup_ContainsEGroup","EGroup_ContainsEntity","EGroup_Count","EGroup_CountAlive","EGroup_CountDeSpawned","EGroup_CountSpawned","EGroup_Create","EGroup_CreateIfNotFound","EGroup_CreateKickerMessage","EGroup_DeSpawn","EGroup_Destroy","EGroup_DestroyAllEntities","EGroup_Duplicate","EGroup_EnableMinimapIndicator","EGroup_EnableUIDecorator","EGroup_Exists","EGroup_Filter","EGroup_FilterUnderConstruction","EGroup_ForEach","EGroup_ForEachAllOrAny","EGroup_ForEachAllOrAnyEx","EGroup_ForEachEx","EGroup_FromName","EGroup_GetAvgHealth","EGroup_GetDeSpawnedEntityAt","EGroup_GetInvulnerable","EGroup_GetLastAttacker","EGroup_GetName","EGroup_GetOffsetPosition","EGroup_GetPosition","EGroup_GetRandomSpawnedEntity","EGroup_GetSequence","EGroup_GetSpawnedEntityAt","EGroup_GetSpawnedEntityFilter","EGroup_GetSpread","EGroup_GetSquadsHeld","EGroup_HasUpgrade","EGroup_Hide","EGroup_InstantCaptureStrategicPoint","EGroup_InstantRevertOccupiedBuilding","EGroup_Intersection","EGroup_IsBurning","EGroup_IsCapturedByPlayer","EGroup_IsCapturedByTeam","EGroup_IsDoingAttack","EGroup_IsEmpty","EGroup_IsHoldingAny","EGroup_IsInCover","EGroup_IsMoving","EGroup_IsOnScreen","EGroup_IsProducingSquads","EGroup_IsSpawned","EGroup_IsUnderAttack","EGroup_IsUnderAttackByPlayer","EGroup_IsUnderAttackFromDirection","EGroup_IsUsingAbility","EGroup_Kill","EGroup_NotifyOnPlayerDemolition","EGroup_Remove","EGroup_RemoveDemolitions","EGroup_RemoveGroup","EGroup_RemoveUpgrade","EGroup_ReSpawn","EGroup_SetAnimatorAction","EGroup_SetAnimatorEvent","EGroup_SetAnimatorState","EGroup_SetAnimatorVariable","EGroup_SetAutoTargetting","EGroup_SetAvgHealth","EGroup_SetCrushable","EGroup_SetDemolitions","EGroup_SetHealthMinCap","EGroup_SetInvulnerable","EGroup_SetPlayerOwner","EGroup_SetRallyPoint","EGroup_SetRecrewable","EGroup_SetSelectable","EGroup_SetSharedProductionQueue","EGroup_SetStrategicPointNeutral","EGroup_SetWorldOwned","EGroup_Single","SGroup_HasEntityUpgrade","Ai\\:GetEncountersBySGroup","Ai\\:GetEncountersBySquad","AI_DisableAllEncounters","AI_EnableAllEncounters","AI_GetActiveEncounters","AI_GetNumEncounters","AI_IsMatchingDifficulty","AI_OverrideDifficulty","AI_RemoveAllEncounters","AI_SetDebugLevel","AI_SetStaggeredSpawnDelay","AI_ToggleDebugData","AI_ToggleDebugPrint","AIAbilityGoal_AdjustDefaultGoalData","AIAbilityGoal_SetDefaultGoalData","AIAbilityGoal_SetModifyGoalData","AIAbilityGoal_SetOverrideGoalData","AIAttackGoal_AdjustDefaultGoalData","AIAttackGoal_SetDefaultGoalData","AIAttackGoal_SetModifyGoalData","AIAttackGoal_SetOverrideGoalData","AIBaseGoal_AdjustDefaultGoalData","AIBaseGoal_SetDefaultGoalData","AIBaseGoal_SetModifyGoalData","AIBaseGoal_SetOverrideGoalData","AIDefendGoal_AdjustDefaultGoalData","AIDefendGoal_SetDefaultGoalData","AIDefendGoal_SetModifyGoalData","AIDefendGoal_SetOverrideGoalData","AIMoveGoal_AdjustDefaultGoalData","AIMoveGoal_SetDefaultGoalData","AIMoveGoal_SetModifyGoalData","AIMoveGoal_SetOverrideGoalData","Encounter\\:AddSgroup","Encounter\\:ClearGoal","Encounter\\:ConvertSgroup","Encounter\\:Create","Encounter\\:CreateAbility","Encounter\\:CreateAttack","Encounter\\:CreateBasic","Encounter\\:CreateDefend","Encounter\\:CreateMove","Encounter\\:CreatePatrol","Encounter\\:Disable","Encounter\\:Enable","Encounter\\:GetGoalData","Encounter\\:GetSgroup","Encounter\\:RemoveOnDeath","Encounter\\:RestartGoal","Encounter\\:SetGoal","Encounter\\:SetGoalOnSuccess","Encounter\\:SetOnDeath","Encounter\\:Spawn","Encounter\\:UpdateGoal","MergeClone","Entity_ApplyCritical","Entity_BuildingPanelInfo","Entity_CanAttackNow","Entity_CancelProductionQueueItem","Entity_CanLoadSquad","Entity_CanLoadSquadAndAttackCurrentTarget","Entity_CanSeeEntity","Entity_CanSeeSquad","Entity_ClearPostureSuggestion","Entity_ClearTagDebug","Entity_CompleteUpgrade","Entity_Create","Entity_CreateENV","Entity_DeSpawn","Entity_Destroy","Entity_DisableBuildingDeath","Entity_DoBuildingDamageRay","Entity_EnableAttention","Entity_EnableProductionQueue","Entity_EnableStrategicPoint","Entity_ForceConstruct","Entity_FromWorldID","Entity_GetActiveCommand","Entity_GetBlueprint","Entity_GetBuildingProgress","Entity_GetCoverValue","Entity_GetGameID","Entity_GetHeading","Entity_GetHealth","Entity_GetHealthMax","Entity_GetHealthPercentage","Entity_GetInvulnerable","Entity_GetInvulnerableMinCap","Entity_GetInvulnerableToCritical","Entity_GetLastAttacker","Entity_GetLastAttackers","Entity_GetMaxCaptureCrewSize","Entity_GetOffsetPosition","Entity_GetPlayerOwner","Entity_GetPosition","Entity_GetProductionQueueItem","Entity_GetProductionQueueItemType","Entity_GetProductionQueueSize","Entity_GetResourceType","Entity_GetSightInnerHeight","Entity_GetSightInnerRadius","Entity_GetSightOuterHeight","Entity_GetSightOuterRadius","Entity_GetSquad","Entity_GetSquadsHeld","Entity_GetTotalPanelCount","Entity_GetUndestroyedPanelCount","Entity_GetWeaponBlueprint","Entity_GetWeaponHardpointCount","Entity_HasAnyCritical","Entity_HasCritical","Entity_HasProductionQueue","Entity_HasUpgrade","Entity_InstantCaptureStrategicPoint","Entity_InstantRevertOccupiedBuilding","Entity_IsAlive","Entity_IsAttacking","Entity_IsBuilding","Entity_IsBurning","Entity_IsCamouflaged","Entity_IsCapturableBuilding","Entity_IsCasualty","Entity_IsCuttable","Entity_IsDemolitionReady","Entity_IsEBPBuilding","Entity_IsEBPObjCover","Entity_IsHardpointActive","Entity_IsHoldingAny","Entity_IsInCover","Entity_IsMoving","Entity_IsOfType","Entity_IsPartOfSquad","Entity_IsPlane","Entity_IsSlotItem","Entity_IsSoldier","Entity_IsSpawned","Entity_IsStartingPosition","Entity_IsStrategicPoint","Entity_IsStrategicPointCapturedBy","Entity_IsSyncWeapon","Entity_IsUnderAttack","Entity_IsUnderAttackByPlayer","Entity_IsUnderAttackFromDirection","Entity_IsValid","Entity_IsVaultable","Entity_IsVehicle","Entity_IsVictoryPoint","Entity_Kill","Entity_NotifyOnPlayerDemolition","Entity_RemoveBoobyTraps","Entity_RemoveCritical","Entity_RemoveDemolitions","Entity_RemoveUpgrade","Entity_SetAnimatorAction","Entity_SetAnimatorActionParameter","Entity_SetAnimatorEvent","Entity_SetAnimatorState","Entity_SetAnimatorVariable","Entity_SetBuildingVisualFireState","Entity_SetCrushable","Entity_SetCrushMode","Entity_SetDemolitions","Entity_SetEnableCasualty","Entity_SetHeading","Entity_SetHealth","Entity_SetInvulnerable","Entity_SetInvulnerableMinCap","Entity_SetInvulnerableToCritical","Entity_SetOnFire","Entity_SetPlayerOwner","Entity_SetPosition","Entity_SetProjectileCanExplode","Entity_SetRecrewable","Entity_SetSharedProductionQueue","Entity_SetStrategicPointNeutral","Entity_SetWorldOwned","Entity_SimHide","Entity_Spawn","Entity_StopAbility","Entity_SuggestPosture","Entity_SupportsDemolition","Entity_TagDebug","Entity_VisHide","Misc_DoWeaponHitEffectOnPosition","Misc_GetTerrainHeight","Misc_ToggleEntities","ModMisc_MakeCasualtyAction","ModMisc_MakeWreckAction","ModMisc_OOCAction","UI_EnableEntityDecorator","UI_EnableEntityMinimapIndicator","UI_EnableEntitySelectionVisuals","UI_EnableSquadDecorator","UI_EnableSquadMinimapIndicator","UI_GetAbilityIconName","Event_CreateAND","Event_CreateOR","Event_ElementOnScreen","Event_EncounterIsDead","Event_Exists","Event_GroupBurning","Event_GroupIsDead","Event_GroupIsNotPinned","Event_GroupIsNotSuppressed","Event_GroupIsPinned","Event_GroupIsSuppressed","Event_GroupLeftAlive","Event_IsDoingAttack","Event_IsEngaged","Event_IsHoldingAny","Event_IsInHold","Event_IsSelected","Event_IsUnderAttack","Event_NarrativeEventsNotRunning","Event_NarrativeEventsRunning","Event_OnHealth","Event_PlayerBuildingCount","Event_PlayerCanNotSeeElement","Event_PlayerCanSeeElement","Event_PlayerDoesntOwnTerritory","Event_PlayerOwnsElement","Event_PlayerOwnsTerritory","Event_PlayerResourceLevel","Event_PlayerSquadCount","Event_Proximity","Event_Remove","Event_RemoveAll","Event_TeamBuildingCount","Event_TeamCanNotSeeElement","Event_TeamCanSeeElement","Event_TeamDoesntOwnTerritory","Event_TeamOwnsElement","Event_TeamOwnsTerritory","Event_TeamResourceLevel","Event_TeamSquadCount","Event_Timer","Event_ToggleDebug","Event_View","EventHandler_AssignEncounterGoal","EventHandler_ObjectiveComplete","EventHandler_ObjectiveStart","EventHandler_RemoveHint","EventHandler_RemoveMinimapBlip","EventHandler_RemoveObjectiveUI","EventHandler_Retreat","EventHandler_StaggeredRetreat","EventHandler_StartIntel","EventHandler_StartNislet","EventHandler_StopFlashing","FOW_PlayerExploreAll","FOW_PlayerRevealAll","FOW_PlayerRevealArea","FOW_PlayerUnExploreAll","FOW_PlayerUnRevealAll","FOW_PlayerUnRevealArea","FOW_RevealAll","FOW_RevealArea","FOW_RevealEGroup","FOW_RevealEGroupOnly","FOW_RevealEntity","FOW_RevealMarker","FOW_RevealSGroup","FOW_RevealSGroupOnly","FOW_RevealSquad","FOW_RevealTerritory","FOW_UnRevealAll","FOW_UnRevealArea","FOW_UnRevealMarker","FOW_UnRevealTerritory","EGroup_CreateTable","EGroup_GetWBTable","Marker_GetNonSequentialTable","Marker_GetTable","SGroup_CreateTable","SGroup_GetWBTable","Marker_DoesNumberAttributeExist","Marker_DoesStringAttributeExist","Marker_Exists","Marker_FromName","Marker_GetDirection","Marker_GetName","Marker_GetNumberAttribute","Marker_GetPosition","Marker_GetProximityRadius","Marker_GetProximityType","Marker_GetSequence","Marker_GetStringAttribute","Marker_GetType","Marker_InProximity","Modifier_IsEnabledOnEGroup","Modifier_Remove","Modifier_RemoveAllFromEGroup","Modifier_RemoveAllFromSGroup","Modify_AbilityDelayTime","Modify_AbilityDurationTime","Modify_AbilityManpowerCost","Modify_AbilityMaxCastRange","Modify_AbilityMinCastRange","Modify_AbilityMunitionsCost","Modify_AbilityRechargeTime","Modify_Armor","Modify_CaptureTime","Modify_DisableHold","Modify_Enable_ParadropReinforcements","Modify_EntityBuildTime","Modify_EntityCost","Modify_PlayerExperienceReceived","Modify_PlayerProductionRate","Modify_PlayerResourceCap","Modify_PlayerResourceGift","Modify_PlayerResourceRate","Modify_PlayerSightRadius","Modify_ProductionRate","Modify_ProjectileDelayTime","Modify_ReceivedAccuracy","Modify_ReceivedDamage","Modify_ReceivedSuppression","Modify_SetUpgradeCost","Modify_SightRadius","Modify_SquadAvailability","Modify_SquadCaptureRate","Modify_SquadTypeSightRadius","Modify_TargetPriority","Modify_TeamWeapon","Modify_TerritoryRadius","Modify_UnitSpeed","Modify_UnitVeterancyValue","Modify_UpgradeBuildTime","Modify_Upkeep","Modify_VehicleRepairRate","Modify_VehicleRotationSpeed","Modify_VehicleTurretRotationSpeed","Modify_Vulnerability","Modify_WeaponAccuracy","Modify_WeaponBurstLength","Modify_WeaponBurstRateOfFire","Modify_WeaponCooldown","Modify_WeaponDamage","Modify_WeaponEnabled","Modify_WeaponPenetration","Modify_WeaponRange","Modify_WeaponReload","Modify_WeaponScatter","Modify_WeaponSuppression","MP_BlizzardInit","Objective_AddPing","Objective_AddUIElements","Objective_AreAllPrimaryObjectivesComplete","Objective_Complete","Objective_Fail","Objective_GetCounter","Objective_GetTimerSeconds","Objective_IncreaseCounter","Objective_IsComplete","Objective_IsCounterSet","Objective_IsFailed","Objective_IsStarted","Objective_IsTimerSet","Objective_IsVisible","Objective_PauseTimer","Objective_Register","Objective_RemovePing","Objective_RemoveUIElements","Objective_ResumeTimer","Objective_SetAlwaysShowDetails","Objective_SetCounter","Objective_Show","Objective_Start","Objective_StartTimer","Objective_StopCounter","Objective_StopTimer","Objective_TogglePings","Objective_UpdateText","Cmd_StopSquadsOnly","OpGameSetup","OpNPC_AddSupportGroup","OpNPC_AddSyncWpnGroup","OpNPC_AddTeamWpnGroup","OpNPC_IsGroupActive","OpNPC_Name","OpNPC_RemoveGroup","OpNPC_RetreatGroup","OpNPC_SetGroupActive","OpPlayer_Action","OpUtil_AddModifier","OpUtil_AddResourcesToTeam","OpUtil_AssignSquadSameTypeControlGroup","OpUtil_AssignSquadUnusedControlGroup","OpUtil_ClearPlayZone","OpUtil_EgroupIsCapturedByTeam","OpUtil_EnemyEGroupArrowManager","OpUtil_FindNearestCapturePoint","OpUtil_InvulnerableAdd","OpUtil_InvulnerableRemove","OpUtil_LogSyncWpn","OpUtil_ReturnEnemyNPC","OpUtil_ReturnHumanPlayer","OpUtil_ReturnNPCPlayer","OpUtil_ReturnRace","OpUtil_ReturnTeam","OpUtil_SetPlayZone","OpUtil_TeamOwnsEntity","OpVP_AddPenaltyGroup","OpVP_Name","OpVP_RegisterCaptureablePoints","OpVP_RegisterPointDefense","OpVP_RemoveGroup","UI_PopUpMessage","Util_ProductionRestriction","Util_TutorialIntel","Player_AddAbility","Player_AddAbilityLockoutZone","Player_AddResource","Player_AddSquadsToSGroup","Player_AddUnspentCommandPoints","Player_AreSquadsNearMarker","Player_CanCastAbilityOnEntity","Player_CanCastAbilityOnPlayer","Player_CanCastAbilityOnPosition","Player_CanCastAbilityOnSquad","Player_CanSeeEGroup","Player_CanSeeEntity","Player_CanSeePosition","Player_CanSeeSGroup","Player_CanSeeSquad","Player_ClearArea","Player_ClearAvailabilities","Player_ClearPopCapOverride","Player_CompleteUpgrade","Player_DoParadrop","Player_FindFirstEnemyPlayer","Player_FromId","Player_GetAIType","Player_GetAll","Player_GetAllEntitiesNearMarker","Player_GetAllSquadsNearMarker","Player_GetBuildingID","Player_GetBuildingsCount","Player_GetBuildingsCountExcept","Player_GetBuildingsCountOnly","Player_GetCurrentPopulation","Player_GetDisplayName","Player_GetEntities","Player_GetEntitiesFromType","Player_GetEntityConcentration","Player_GetEntityCount","Player_GetEntityName","Player_GetID","Player_GetMaxPopulation","Player_GetNumStrategicPoints","Player_GetNumVictoryPoints","Player_GetPopulationPercentage","Player_GetRace","Player_GetRaceName","Player_GetRelationship","Player_GetResource","Player_GetResourceRate","Player_GetSquadConcentration","Player_GetSquadCount","Player_GetSquads","Player_GetStartingPosition","Player_GetStrategicPointCaptureProgress","Player_GetTeam","Player_GetUnitCount","Player_GetUpgradeCost","Player_HasAbility","Player_HasBuilding","Player_HasBuildingsExcept","Player_HasBuildingUnderConstruction","Player_HasCapturingSquadNearStrategicPoint","Player_HasLost","Player_HasMapEntryPosition","Player_HasUpgrade","Player_IsAlive","Player_IsAllied","Player_IsHuman","Player_NumUpgradeComplete","Player_OwnsEGroup","Player_OwnsEntity","Player_OwnsSGroup","Player_OwnsSquad","Player_RemoveAbilityLockoutZone","Player_RemoveUpgrade","Player_ResetResource","Player_RestrictAddOnList","Player_RestrictBuildingList","Player_RestrictResearchList","Player_SetAbilityAvailability","Player_SetAllCommandAvailabilityInternal","Player_SetCommandAvailability","Player_SetConstructionMenuAvailability","Player_SetDefaultSquadMoodMode","Player_SetEntityProductionAvailability","Player_SetHeatGainRate","Player_SetHeatLossRate","Player_SetMaxCapPopulation","Player_SetMaxPopulation","Player_SetPopCapOverride","Player_SetResource","Player_SetSquadProductionAvailability","Player_SetUpgradeAvailability","Player_SetUpgradeCost","Player_SpawnGlider","Player_StopAbility","Player_StopEarningActionPoints","Player_Triangulate","Actor_Clear","Actor_PlaySpeech","Actor_PlaySpeechWithoutPortrait","Actor_SetFromSGroup","Actor_SetFromSquad","Prox_AreEntitiesNearMarker","Prox_ArePlayerMembersNearMarker","Prox_ArePlayersNearMarker","Prox_AreSquadMembersNearMarker","Prox_AreSquadsNearMarker","Prox_AreTeamsNearMarker","Prox_EGroupEGroup","Prox_EGroupSGroup","Prox_EntitiesInProximityOfEntities","Prox_GetRandomPosition","Prox_MarkerEGroup","Prox_MarkerSGroup","Prox_PlayerEntitiesInProximityOfEntities","Prox_PlayerEntitiesInProximityOfPlayerSquads","Prox_PlayerEntitiesInProximityOfSquads","Prox_PlayerSquadsInProximityOfEntities","Prox_PlayerSquadsInProximityOfPlayerEntities","Prox_PlayerSquadsInProximityOfPlayerSquads","Prox_PlayerSquadsInProximityOfSquads","Prox_SGroupSGroup","Prox_SquadsInProximityOfEntities","Prox_SquadsInProximityOfSquads","Rule_Add","Rule_AddDelayedInterval","Rule_AddDelayedIntervalEx","Rule_AddEGroupEvent","Rule_AddEntityEvent","Rule_AddGlobalEvent","Rule_AddInterval","Rule_AddIntervalEx","Rule_AddOneShot","Rule_AddPlayerEvent","Rule_AddSGroupEvent","Rule_AddSquadEvent","Rule_ChangeInterval","Rule_Exists","Rule_Remove","Rule_RemoveAll","Rule_RemoveEGroupEvent","Rule_RemoveEntityEvent","Rule_RemoveGlobalEvent","Rule_RemoveIfExist","Rule_RemoveMe","Rule_RemovePlayerEvent","Rule_RemoveSGroupEvent","Rule_RemoveSquadEvent","Setup_Player","Cmd_StopSquadsExcept","Misc_IsEGroupOnScreen","Misc_IsSGroupOnScreen","SGroup_Add","SGroup_AddAbility","SGroup_AddGroup","SGroup_AddGroups","SGroup_AddLeaders","SGroup_AddSlotItemToDropOnDeath","SGroup_CanCastAbilityOnEntity","SGroup_CanCastAbilityOnPosition","SGroup_CanCastAbilityOnSquad","SGroup_CanInstantReinforceNow","SGroup_CanSeeSGroup","SGroup_Clear","SGroup_ClearPostureSuggestion","SGroup_Compare","SGroup_CompleteEntityUpgrade","SGroup_ContainsBlueprints","SGroup_ContainsSGroup","SGroup_ContainsSquad","SGroup_Count","SGroup_CountDeSpawned","SGroup_CountSpawned","SGroup_Create","SGroup_CreateIfNotFound","SGroup_CreateKickerMessage","SGroup_DeSpawn","SGroup_Destroy","SGroup_DestroyAllInMarker","SGroup_DestroyAllSquads","SGroup_DisableCombatPlans","SGroup_Duplicate","SGroup_EnableAttention","SGroup_EnableMinimapIndicator","SGroup_EnableSurprise","SGroup_EnableUIDecorator","SGroup_Exists","SGroup_FaceEachOther","SGroup_FaceMarker","SGroup_Filter","SGroup_FilterCount","SGroup_FilterThreat","SGroup_ForEach","SGroup_ForEachAllOrAny","SGroup_ForEachAllOrAnyEx","SGroup_ForEachEx","SGroup_FromName","SGroup_GetAvgHealth","SGroup_GetAvgLoadout","SGroup_GetDeSpawnedSquadAt","SGroup_GetGarrisonedBuildingEntity","SGroup_GetHoldEGroup","SGroup_GetHoldSGroup","SGroup_GetInvulnerable","SGroup_GetLastAttacker","SGroup_GetLoadedVehicleSquad","SGroup_GetName","SGroup_GetNumSlotItem","SGroup_GetOffsetPosition","SGroup_GetPosition","SGroup_GetRandomSpawnedSquad","SGroup_GetSequence","SGroup_GetSpawnedSquadAt","SGroup_GetSpread","SGroup_GetSquadsHeld","SGroup_GetSuppression","SGroup_GetVeterancyExperience","SGroup_GetVeterancyRank","SGroup_HasCritical","SGroup_HasLeader","SGroup_HasSquadBlueprint","SGroup_HasTeamWeapon","SGroup_HasUpgrade","SGroup_Hide","SGroup_IncreaseVeterancyExperience","SGroup_IncreaseVeterancyRank","SGroup_Intersection","SGroup_IsAlive","SGroup_IsAttackMoving","SGroup_IsCamouflaged","SGroup_IsCapturing","SGroup_IsConstructingBuilding","SGroup_IsDoingAbility","SGroup_IsDoingAttack","SGroup_IsDugIn","SGroup_IsEmpty","SGroup_IsFemale","SGroup_IsHoldingAny","SGroup_IsIdle","SGroup_IsInCover","SGroup_IsInfiltrated","SGroup_IsInHoldEntity","SGroup_IsInHoldSquad","SGroup_IsMoving","SGroup_IsOnScreen","SGroup_IsPinned","SGroup_IsReinforcing","SGroup_IsRetreating","SGroup_IsSettingDemolitions","SGroup_IsSuppressed","SGroup_IsUnderAttack","SGroup_IsUnderAttackByPlayer","SGroup_IsUnderAttackFromDirection","SGroup_IsUpgrading","SGroup_IsUsingAbility","SGroup_Kill","SGroup_Remove","SGroup_RemoveGroup","SGroup_RemoveUpgrade","SGroup_ReSpawn","SGroup_RestoreCombatPlans","SGroup_RewardActionPoints","SGroup_SetAnimatorState","SGroup_SetAutoTargetting","SGroup_SetAvgHealth","SGroup_SetAvgMorale","SGroup_SetCrushable","SGroup_SetInvulnerable","SGroup_SetInvulnerableToCritical","SGroup_SetMoodMode","SGroup_SetMoveType","SGroup_SetPlayerOwner","SGroup_SetRecrewable","SGroup_SetSelectable","SGroup_SetSharedProductionQueue","SGroup_SetSuppression","SGroup_SetTeamWeaponCapturable","SGroup_SetVeterancyDisplayVisibility","SGroup_SetWorldOwned","SGroup_Single","SGroup_SnapFaceEachOther","SGroup_SuggestPosture","SGroup_TotalMembersCount","SGroup_WarpToMarker","SGroup_WarpToPos","Util_Grab","SGroup_FacePosition","SGroup_SnapFacePosition","Squad_AddAbility","Squad_AddSlotItemToDropOnDeath","Squad_CanCaptureStrategicPoint","Squad_CanCaptureTeamWeapon","Squad_CanCastAbilityOnEGroup","Squad_CanCastAbilityOnEntity","Squad_CanCastAbilityOnPosition","Squad_CanCastAbilityOnSGroup","Squad_CanCastAbilityOnSquad","Squad_CancelProductionQueueItem","Squad_CanHold","Squad_CanInstantReinforceNow","Squad_CanLoadSquad","Squad_CanPickupSlotItem","Squad_CanRecrew","Squad_CanSeeEntity","Squad_CanSeeSquad","Squad_ClearPostureSuggestion","Squad_CompleteUpgrade","Squad_Count","Squad_CreateAndSpawnToward","Squad_DeSpawn","Squad_Destroy","Squad_EnableProductionQueue","Squad_EnableSurprise","Squad_EntityAt","Squad_FacePosition","Squad_FaceSquad","Squad_FindCover","Squad_FindCoverCompareCurrent","Squad_FromWorldID","Squad_GetActiveCommand","Squad_GetAttackPlan","Squad_GetAttackTargets","Squad_GetBlueprint","Squad_GetDestination","Squad_GetGameID","Squad_GetHeading","Squad_GetHealth","Squad_GetHealthMax","Squad_GetHealthPercentage","Squad_GetHoldEntity","Squad_GetHoldSquad","Squad_GetInvulnerable","Squad_GetInvulnerableEntityCount","Squad_GetInvulnerableMinCap","Squad_GetLastAttacker","Squad_GetLastAttackers","Squad_GetLastEntityAttacker","Squad_GetMax","Squad_GetNumSlotItem","Squad_GetOffsetPosition","Squad_GetPinnedPlan","Squad_GetPlayerOwner","Squad_GetPosition","Squad_GetPositionDeSpawned","Squad_GetProductionQueueItem","Squad_GetProductionQueueItemType","Squad_GetProductionQueueSize","Squad_GetReactionPlan","Squad_GetRetaliationPlan","Squad_GetSlotItemAt","Squad_GetSlotItemCount","Squad_GetSlotItemsTable","Squad_GetSquadsHeld","Squad_GetSuppression","Squad_GetVeterancyExperience","Squad_GetVeterancyRank","Squad_GiveSlotItem","Squad_GiveSlotItemsFromTable","Squad_HasActiveCommand","Squad_HasAnyCritical","Squad_HasCritical","Squad_HasDestination","Squad_HasProductionQueue","Squad_HasSlotItem","Squad_HasTeamWeapon","Squad_HasUpgrade","Squad_IncreaseVeterancyExperience","Squad_IncreaseVeterancyRank","Squad_InstantSetupTeamWeapon","Squad_IsAttacking","Squad_IsCamouflaged","Squad_IsDoingAbility","Squad_IsFemale","Squad_IsHoldingAny","Squad_IsInCover","Squad_IsInHoldEntity","Squad_IsInHoldSquad","Squad_IsMoving","Squad_IsPinned","Squad_IsReinforcing","Squad_IsRetreating","Squad_IsSuppressed","Squad_IsUnderAttack","Squad_IsUnderAttackByPlayer","Squad_IsUnderAttackFromDirection","Squad_IsUpgrading","Squad_IsUpgradingAny","Squad_IsValid","Squad_Kill","Squad_RemoveAbility","Squad_RemoveUpgrade","Squad_RewardActionPoints","Squad_SetAnimatorState","Squad_SetAttackPlan","Squad_SetHealth","Squad_SetInvulnerable","Squad_SetInvulnerableEntityCount","Squad_SetInvulnerableMinCap","Squad_SetInvulnerableToCritical","Squad_SetMoodMode","Squad_SetMoveType","Squad_SetPinnedPlan","Squad_SetPlayerOwner","Squad_SetPosition","Squad_SetReactionPlan","Squad_SetRecrewable","Squad_SetRetaliationPlan","Squad_SetSharedProductionQueue","Squad_SetSuppression","Squad_SetVeterancyDisplayVisibility","Squad_SetWorldOwned","Squad_Spawn","Squad_SpawnToward","Squad_Split","Squad_StopAbility","Squad_SuggestPosture","Squad_WarpToPos","Stats_BuildingsLost","Stats_InfantryLost","Stats_KillsTotal","Stats_PlayerAt","Stats_PlayerCount","Stats_ResGathered","Stats_ResSpent","Stats_SoldiersKilled","Stats_StructuresKilled","Stats_TeamTally","Stats_TotalDuration","Stats_TotalSquadsLost","Stats_UnitSoldierKills","Stats_UnitStructureKills","Stats_UnitTotalKills","Stats_UnitVehicleKills","Stats_VehiclesKilled","Stats_VehiclesLost","Stinger_AddEvent","Stinger_AddFunction","Stinger_Remove","Team_AddResource","Team_AddSquadsToSGroup","Team_AreSquadsNearMarker","Team_CanSee","Team_ClearArea","Team_DefineAllies","Team_DefineEnemies","Team_FindByRace","Team_ForEachAllOrAny","Team_GetAll","Team_GetAllEntitiesNearMarker","Team_GetAllSquadsNearMarker","Team_GetBuildingID","Team_GetBuildingsCount","Team_GetBuildingsCountExcept","Team_GetBuildingsCountOnly","Team_GetEnemyTeam","Team_GetEntitiesFromType","Team_HasBuilding","Team_HasBuildingsExcept","Team_HasBuildingUnderConstruction","Team_IsAlive","Team_OwnsEGroup","Team_OwnsEntity","Team_OwnsSGroup","Team_OwnsSquad","Team_RestrictAddOnList","Team_RestrictBuildingList","Team_RestrictResearchList","Team_SetAbilityAvailability","Team_SetCommandAvailability","Team_SetConstructionMenuAvailability","Team_SetEntityProductionAvailability","Team_SetMaxCapPopulation","Team_SetMaxPopulation","Team_SetSquadProductionAvailability","Team_SetTechTreeByYear","Team_SetUpgradeAvailability","Team_SetUpgradeCost","ToW_DefenseCreateWave","ToW_SetStandardResources","ToW_SetUpBattleObjectives","ToW_SetUpTechTreeByYear","Timer_Add","Timer_Advance","Timer_Display","Timer_DisplayOnScreen","Timer_End","Timer_Exists","Timer_GetElapsed","Timer_GetMinutesAndSeconds","Timer_GetRemaining","Timer_IsPaused","Timer_Pause","Timer_Resume","Timer_Start","EventCue_Create","FOW_Enable","Game_SubTextFade","HintMouseover_Add","HintMouseover_Remove","HintPoint_Add","HintPoint_Remove","HintPoint_SetDisplayOffset","HintPoint_SetVisible","Misc_IsEGroupSelected","Misc_IsSGroupSelected","ThreatArrow_Add","ThreatArrow_CreateGroup","ThreatArrow_DestroyAllGroups","ThreatArrow_DestroyGroup","ThreatArrow_Remove","UI_AddHintAndFlashAbility","UI_CreateEventCue","UI_CreateMinimapBlip","UI_CreateSGroupKickerMessage","UI_DeleteMinimapBlip","UI_HighlightSGroup","UI_SetAllowLoadAndSave","UI_SetSGroupSpecialLevel","WinWarning_PublishLoseReminder","WinWarning_SetMaxTickers","WinWarning_SetTickers","WinWarning_ShowLoseWarning","Clone","Event_IsAnyRunning","Game_EndSP","Game_FadeToBlack","Import_Once","Loc_FormatText","Sound_PlayOnSquad","Team_GetEntityConcentration","Team_GetSquadConcentration","Util_AddMouseoverSquadToSGroup","Util_ApplyModifier","Util_AutoAmbient","Util_AutoIntel","Util_AutoNISlet","Util_Autosave","Util_ClearWrecksFromMarker","Util_DespawnAll","Util_DifVar","Util_ElementCanSee","Util_EntityLimit","Util_FallBackToGarrisonBuilding","Util_FindHiddenSpawn","Util_ForceRetreatAll","Util_GarrisonNearbyBuilding","Util_GarrisonNearbyVehicle","Util_GetClosestMarker","Util_GetEntitiesByBP","Util_GetHealth","Util_GetMouseoverSGroup","Util_GetPosition","Util_GetPositionAwayFromPlayer","Util_GetPositionFromAtoB","Util_GetRandomPosition","Util_GetSquadsByBP","Util_GetTrailingNumber","Util_HasPosition","Util_HidePlayerForNIS","Util_IsSequenceSkipped","Util_Kill","Util_LogSyncWpn","Util_MarkerFX","Util_MissionTitle","Util_MuteAmbientSound","Util_NewHUDFeatureEvent","Util_PlayMovie","Util_PlayMusic","Util_PrintObject","Util_ReinforceEvent","Util_ReloadScript","Util_RestoreMusic","Util_SetPlayerCanSkipSequence","Util_SetPlayerUnableToSkipSequence","Util_SortPositionsByClosest","Util_StartAmbient","Util_StartIntel","Util_StartNislet","Util_StartQuickIntel","Util_TableContains","Util_ToggleAllowIntelEvents","Util_TriggerEvent","Util_UnitCounts","World_KillAllNeutralEntitesNearMarker","Anim_PlayEntityAnim","bug","Camera_AutoRotate","Camera_ClampToMarker","Camera_FocusOnPosition","Camera_FollowEntity","Camera_FollowSelection","Camera_FollowSquad","Camera_GetCurrentTargetPos","Camera_GetDeclination","Camera_GetOrbit","Camera_GetTargetPos","Camera_GetTuningValue","Camera_GetZoomDist","Camera_IsInputEnabled","Camera_Reload","Camera_ResetFocus","Camera_ResetToDefault","Camera_SetDeclination","Camera_SetInputEnabled","Camera_SetOrbit","Camera_SetSlideTargetRate","Camera_SetTuningValue","Camera_SetZoomDist","Camera_StopAutoRotating","Camera_Unclamp","EGroup_CallEntityFunction","EGroup_CallEntityFunctionAllOrAny","fatal","Game_EnableInput","Game_EndSubTextFade","Game_EndTextTitleFade","Game_GetLocalPlayer","Game_GetMode","Game_GetSPDifficulty","Game_HasLocalPlayer","Game_IsLetterboxed","Game_IsPerformanceTest","Game_IsRTM","Game_Letterbox","Game_LoadAtmosphere","Game_LockRandom","Game_ProfileDumpFrames","Game_QuitApp","Game_ScreenFade","Game_SetLocalPlayer","Game_SetMode","Game_ShowPauseMenu","Game_SkipAllEvents","Game_SkipEvent","Game_StartMuted","Game_TextTitleFade","Game_TriggerLightning","Game_UnlockInputOnLetterBox","Game_UnLockRandom","Ghost_DisableSpotting","Ghost_EnableSpotting","HintPoint_AddToEGroup","HintPoint_AddToEntity","HintPoint_AddToPosition","HintPoint_AddToSGroup","HintPoint_AddToSquad","HintPoint_ClearFacing","HintPoint_RemoveAll","HintPoint_SetDisplayOffsetInternal","HintPoint_SetFacingEntity","HintPoint_SetFacingPosition","HintPoint_SetFacingSquad","HintPoint_SetVisibleInternal","inv_dump","IsOfType","IsSecuringStructure","IsStructure","License_CanPlayRace","LOC","Loc_ConvertNumber","Loc_Empty","Loc_FormatTime","Misc_AbortToFE","Misc_AddRestrictCommandsMarker","Misc_AIControlLocalPlayer","Misc_AreDefaultCommandsEnabled","Misc_DetectKeyboardInput","Misc_DetectMouseInput","Misc_DoWeaponHitEffectOnEntity","Misc_EnablePerformanceTest","Misc_GetCommandLineString","Misc_GetControlGroupContents","Misc_GetEntityControlGroup","Misc_GetHiddenPositionOnPath","Misc_GetMouseOnTerrain","Misc_GetMouseOverEntity","Misc_GetSelectedEntities","Misc_GetSelectedSquads","Misc_GetSquadControlGroup","Misc_IsCommandLineOptionSet","Misc_IsDevMode","Misc_IsEntityOnScreen","Misc_IsEntitySelected","Misc_IsMouseOverEntity","Misc_IsPosOnScreen","Misc_IsSelectionInputEnabled","Misc_IsSquadOnScreen","Misc_IsSquadSelected","Misc_RemoveCommandRestriction","Misc_RestrictCommandsToMarker","Misc_Screenshot","Misc_ScreenshotExt","Misc_SelectEntity","Misc_SelectSquad","Misc_SetDefaultCommandsEnabled","Misc_SetDesignerSplatsVisibility","Misc_SetEntityControlGroup","Misc_SetEntitySelectable","Misc_SetSelectionInputEnabled","Misc_SetSquadControlGroup","Misc_SetSquadSelectable","Mission_Complete","Mission_Fail","Mission_GetSecondaryObjective","Mission_StartBonusObjective","Mission_Win","Modifier_ApplyToEntity","Modifier_ApplyToPlayer","Modifier_ApplyToSquad","Modifier_Create","Modifier_Destroy","Modifier_IsEnabled","nis_setintransitiontime","nis_setouttransitionnis","nis_setouttransitiontime","Obj_Create","Obj_Delete","Obj_DeleteAll","Obj_GetState","Obj_GetVisible","Obj_HideProgress","Obj_SetDescription","Obj_SetIcon","Obj_SetObjectiveFunction","Obj_SetProgressBlinking","Obj_SetState","Obj_SetTitle","Obj_SetVisible","Obj_ShowProgress","Obj_ShowProgress2","Obj_ShowProgressTimer","OpBounty_AddRewardGroup","OpBounty_AddRewardTable","Order227_Init","PrintOnScreen","PrintOnScreen_Add","PrintOnScreen_Remove","PrintOnScreen_RemoveFromScreen","ResourceAmount_Add","ResourceAmount_ClampToZero","ResourceAmount_Has","ResourceAmount_Mult","ResourceAmount_Subtract","ResourceAmount_Sum","ResourceAmount_Zero","Scar_Autosave","Scar_CompleteIntelBulletinTask","Scar_DebugConsoleExecute","Scar_PlayNIS","Scar_PlayNIS2","Scar_ReloadAIScripts","Setup_GetVictoryPointTickerOption","Setup_SetPlayerName","Setup_SetPlayerRace","Setup_SetPlayerTeam","SGroup_CallEntityFunction","SGroup_CallSquadFunction","SGroup_CallSquadFunctionAllOrAny","SitRep_PlayMovie","SitRep_PlaySpeech","SitRep_StopMovie","Sound_ContainerDebug","Sound_DisableSpeechEvent","Sound_IsPlaying","Sound_PerfTest_Play2D","Sound_Play2D","Sound_Play3D","Sound_PlayMusic","Sound_PlayStreamed","Sound_PreCacheSinglePlayerSpeech","Sound_PreCacheSound","Sound_PreCacheSoundFolder","Sound_SetGlobalControlSource","Sound_SetMusicCombatValue","Sound_SetVolume","Sound_SetVolumeDefault","Sound_SetVolumeInv","Sound_StartRecording","Sound_Stop","Sound_StopAll","Sound_StopMusic","Sound_StopRecording","Speech_SetGlobalStealthRead","statgraph","statgraph_channel","statgraph_channel_get_enabled","statgraph_channel_set_enabled","statgraph_clear","statgraph_list","statgraph_pause","Subtitle_EndAllSpeech","Subtitle_EndCurrentSpeech","Subtitle_PlaySpeech","Subtitle_UnstickCurrentSpeech","SyncWeapon_CanAttackNow","SyncWeapon_Exists","SyncWeapon_GetEntity","SyncWeapon_GetFromEGroup","SyncWeapon_GetFromSGroup","SyncWeapon_GetPosition","SyncWeapon_IsAttacking","SyncWeapon_IsOwnedByPlayer","SyncWeapon_SetAutoTargetting","Taskbar_IsVisible","Taskbar_SetVisibility","TaskCountActivePBG","TaskCountPBG","UI_AutosaveMessageHide","UI_AutosaveMessageShow","UI_ClearEventCues","UI_ClearModalAbilityPhaseCallback","UI_ClearNISEndCallback","UI_CoverPreviewHide","UI_CoverPreviewShow","UI_CreateColouredEntityKickerMessage","UI_CreateColouredPositionKickerMessage","UI_CreateColouredSquadKickerMessage","UI_CreateEntityKickerMessage","UI_CreatePositionKickerMessage","UI_CreateSquadKickerMessage","UI_EnableGameEventCueType","UI_EnableResourceTypeKicker","UI_EnableUIEventCueType","UI_FlashAbilityButton","UI_FlashConstructionButton","UI_FlashConstructionMenu","UI_FlashEntity","UI_FlashEntityCommandButton","UI_FlashEventCue","UI_FlashObjectiveCounter","UI_FlashObjectiveIcon","UI_FlashProductionBuildingButton","UI_FlashProductionButton","UI_FlashSquadCommandButton","UI_GetDecoratorsEnabled","UI_HideTacticalMap","UI_HighlightSquad","UI_IsTacticalMapShown","UI_MessageBoxHide","UI_MessageBoxSetButton","UI_MessageBoxSetText","UI_NewHUDFeature","UI_OutOfBoundsLinesHide","UI_OutOfBoundsLinesShow","UI_RestrictBuildingPlacement","UI_ScreenFade","UI_SetAbilityCardVisibility","UI_SetAlliedBandBoxSelection","UI_SetCPMeterVisibility","UI_SetDecoratorsEnabled","UI_SetForceShowSubtitles","UI_SetModalAbilityPhaseCallback","UI_SetNISEndCallback","UI_SetSoviet227Blinking","UI_SetSoviet227Visibility","UI_ShowTacticalMap","UI_StopFlashing","UI_SystemMessageHide","UI_SystemMessageShow","UI_TerritoryHide","UI_TerritoryShow","UI_TitleDestroy","UI_ToggleDecorators","UI_UnrestrictBuildingPlacement","UIWarning_Show","Util_AddProxCheck","Util_ClearProxChecks","Util_CreateEntities","Util_CreateSquads","Util_GetDistance","Util_GetOffsetPosition","Util_GetPlayerOwner","Util_GetRelationship","Util_GetRelativeOffset","Util_MonitorTerritory","Util_RemoveProxCheck","Util_RemoveProxCheckByID","Util_ScarPos","Util_SetPlayerOwner","Util_SpawnDemoCharge","Util_StartNIS","VIS_OccCullToggleOBB","Marker_CleanUpTheDead","Weather_SetType","World_AddPilferLockArea","World_CleanUpTheDead","World_ClearCasualties","World_DamageIce","World_DestroyWallsNearMarker","World_DistanceEGroupToPoint","World_DistancePointToPoint","World_DistanceSGroupToPoint","World_DistanceSquaredPointToPoint","World_EnableReplacementObjectForEmptyPlayers","World_EnableSharedLineOfSight","World_EndSP","World_GetClosest","World_GetCurrentInteractionStage","World_GetEntitiesNearMarker","World_GetEntitiesNearPoint","World_GetEntitiesWithinTerritorySector","World_GetEntity","World_GetFurthest","World_GetGameTime","World_GetHeightAt","World_GetHiddenPositionOnPath","World_GetLength","World_GetNearestInteractablePoint","World_GetNeutralEntitiesNearMarker","World_GetNeutralEntitiesNearPoint","World_GetNeutralEntitiesWithinTerritorySector","World_GetNumEntities","World_GetNumEntitiesNearPoint","World_GetNumStrategicPoints","World_GetNumVictoryPoints","World_GetOffsetPosition","World_GetPlayerAt","World_GetPlayerCount","World_GetPlayerIndex","World_GetPossibleSquadsBlueprint","World_GetPossibleSquadsCount","World_GetRaceIndex","World_GetRand","World_GetSpawnablePosition","World_GetSquadsNearMarker","World_GetSquadsNearPoint","World_GetSquadsWithinTerritorySector","World_GetStrategyPoints","World_GetTeamTerritoryGaps","World_GetTeamVictoryTicker","World_GetTerritorySectorID","World_GetTerritorySectorPosition","World_GetWidth","World_IncreaseInteractionStage","World_IsGameOver","World_IsInSupply","World_IsPointInPlayerTerritory","World_IsTerritorySectorOwnedByPlayer","World_IsWinterMap","World_OwnsEGroup","World_OwnsEntity","World_OwnsSGroup","World_OwnsSquad","World_PointPointProx","World_Pos","World_RemoveAllResourcePoints","World_RemovePilferLockArea","World_SetDesignerSupply","World_SetGameOver","World_SetIceHealingRate","World_SetPlayerCustomSkin","World_SetPlayerLose","World_SetPlayerWin","World_SetSnowHealingRate","World_SetTeamWin","World_SpawnDemolitionCharge","World_TeamTerritoryPointsConnected","Scar_AddInit","scartype","scartype_tostring","import","UI_GetViewportWidth","UI_GetViewportHeight","UI_ButtonAdd","UI_ButtonSetCallback","UI_ButtonSetEnabled","UI_ButtonSetIcon","UI_ButtonSetTag","UI_ButtonSetText","UI_LabelAdd","UI_LabelSetText","UI_IconAdd","UI_IconSetIcon","UI_PanelAdd","UI_StatusIndicatorAdd","UI_StatusIndicatorSetValue","UI_ControlSetColour","UI_ControlSetPosition","UI_ControlSetRect","UI_ControlRemove","UI_ControlClear","BS_NearBase","BS_Defend","BS_Secure","BS_Mines","BS_OuterBase","CPT_VictoryPoint","CPT_MunitionPoint","CPT_NullPoint","CPT_TacticalPoint","CPT_INVALID","CPT_FuelPoint","COMBAT_Default","COMBAT_Defend","COMBAT_Attack","MPT_VictoryPoint","MPT_NullPoint","MPT_NONE","MPT_MunitionPoint","MPT_COUNT","MPT_SupportStructure","MPT_Defence","MPT_Spawner","MPT_HQ","MPT_TacticalPoint","MPT_FuelPoint","MTARGET_Attack","MTARGET_Defend","AI_ProductionQueue","AI_CapturePoint","AI_Squad","AITacticTargetPreference_HighDamage","AITacticTargetPreference_LowHealth","AITacticTargetPreference_None","AITacticTargetPreference_Support","AITacticTargetPreference_Near","AITacticTargetPreference_NearAndBest","AITacticTargetPreference_Best","TACTIC_CapturePoint","TACTIC_Ability","TACTIC_Pickup","TACTIC_ForceAttack","TACTIC_Hold","TACTIC_MinRange","TACTIC_CaptureTeamWeapon","TACTIC_WarmUp","TACTIC_ProvideReinforcementPoint","TACTIC_RushAtTarget","TACTIC_Recrew","TACTIC_Vehicle","TACTIC_Avoid","TACTIC_Cover","TACTIC_FinishHealing","TASK_Leader","TASK_Production","TASK_Ability","TASK_PlayerAbility","TASK_Combat","TASK_Construction","TASK_Capture","TASK_ImmobileCombat","AII_LocalHumanTakeover","AII_RemoteAITakeover","AII_None","AII_RemoteHumanTakeover","AII_Normal","ITEM_REMOVED","ITEM_DEFAULT","ITEM_UNLOCKED","ITEM_LOCKED","BT_AttackHere","BT_SectorArtillery","BT_ObjectivePrimary","BT_Reveal","BT_Combat","BT_General","BT_CaptureHere","BT_DefendHere","BT_ObjectiveSecondary","BT_RallyPoint","BFS_Smoking","BFS_Burning","BFS_NotOnFire","TV_DeclinationEnabled","TV_DistMaxDead","TV_DistRateMouse","TV_NISletDistMin","TV_SlideOrbitRate","TV_PanScaleKeyboardDefZ","TV_PanScaleMouseDefZ","TV_SlideDeclThreshold","TV_PanStartSpeedScalar","TV_EntityMinViewAngle","TV_SlideTargetBase","TV_NearPlaneShifter","TV_DistMin","TV_PanScaleScreenDefZ","TV_NISletDistGroundMin","TV_DeclBelow","TV_SlideTargetThreshold","TV_DeclAbove","TV_DistScale","TV_NISletDistMax","TV_PanMaxSpeedScalar","TV_NISletDeclAbove","TV_NISletDistMinGround","TV_ZoomLocked","TV_CameraMode","TV_DefaultAngle","TV_PanScaleKeyboardMinZ","TV_PanScaleMouseMinZ","TV_DeclBelowClose","TV_TrackElastic","TV_DistExpWheel","TV_DistExpMouse","TV_DistMinGround","TV_DistGroundTargetHeight","TV_ClipFar","TV_DistGroundMin","TV_DistMinDead","TV_DistMax","TV_SlideDeclBase","TV_SlideOrbitThreshold","TV_SlideOrbitBase","TV_SlideDistThreshold","TV_SlideDistBase","TV_SlideTargetRate","TV_ClipNear","TV_PanScaleScreenMinZ","TV_DistRateWheelZoomIn","TV_SlideDistRate","TV_DistRateWheelZoomOut","TV_TrackBoundScale","TV_DefaultDeclination","TV_PanAccelerate","TV_DeclRateMouse","TV_DistExp","TV_DefaultHeight","TV_SlideDeclRate","TV_RotationEnabled","TV_OrbitRateMouse","TV_FieldOfView","TV_NISletDeclBelow","CANPRODUCE_PrerequisitesProducer","CANPRODUCE_Error","CANPRODUCE_ProductionQueueFull","CANPRODUCE_ProductionItemFull","CANPRODUCE_OutOfReinforceRadius","CANPRODUCE_Ok","CANPRODUCE_Disabled","CANPRODUCE_OutOfTerritory","CANPRODUCE_UpgradeItemFull","CANPRODUCE_PopulationCapFull","CANPRODUCE_NoResources","CANPRODUCE_PrerequisitesItem","CANPRODUCE_NoItem","CT_Medic","CT_Vehicle","CT_Personnel","CHECK_BOTH","CHECK_OFFCAMERA","CHECK_IN_FOW","CT_VehicleOpticsDamaged","CT_VehicleExhaustDamaged","CT_VehicleKillCommander","CT_VehicleDriverInjured","CT_VehicleEngineYellow","CT_VehicleBack","CT_VehicleLeft","CT_VehicleRight","CT_VehicleGunnerInjured","CT_VehicleEngineGreen","CT_VehicleCrewShocked","CT_VehicleFront","CT_VehicleEngineBurning","CT_VehicleEngineRed","CT_VehicleSecondaryWeapon","CT_VehicleLoseTreadsOrWheels","CT_VehicleOutOfControl","CT_VehiclePrimaryWeapon","Crush_Heavy","Crush_Off","Crush_Light","Crush_Medium","DB_Button3","DB_Button1","DB_Close","DB_Button2","CMD_InstantBuildSquad","CMD_InstantDeath","CMD_AttackStop","CMD_BuildStructure","CMD_Face","CMD_CancelProduction","CMD_RescueCasualty","CMD_SetHoldHeading","CMD_DefuseMine","CMD_AttackMove","CMD_Fidget","CMD_Stop","CMD_PlaceCharge","CMD_Paradrop","CMD_Destroy","CMD_Load","CMD_Ability","CMD_Move","CMD_InstantUpgrade","CMD_UnloadSquads","CMD_Casualty","CMD_BuildSquad","CMD_Halt","CMD_Attack","CMD_Capture","CMD_AttackForced","CMD_Death","CMD_Unload","CMD_Evacuate","CMD_BuildEntity","CMD_Vault","CMD_AttackFromHold","CMD_RallyPoint","CMD_DefaultAction","CMD_Upgrade","CMD_ChooseResource","CMD_Projectile","STATEID_Capture","STATEID_Idle","STATEID_Evacuate","STATEID_StructureBuilding","STATEID_RepairEngineer","STATEID_Move","STATEID_Dead","STATEID_DefuseMine","GE_ProjectileFired","GE_AIPlayer_Migrated","GE_EntityKilled","GE_TerritoryEntered","GE_ConstructionComplete","GE_NonGlobalCamoDetected","GE_SquadPinned","GE_BuildItemComplete","GE_PlayerKilled","GE_EntityCommandIssued","GE_StrategicPointChanged","GE_PlayerDonation","GE_AbilityExecuted","GE_PlayerDropped","GE_PlayerBeingAttacked","GE_UpgradeComplete","GE_PlayerSkipNIS","GE_AIPlayer_ObjectiveNotification","GE_ResourceDepleted","GE_CustomUIEvent","GE_SquadKilled","GE_PlayerSurrendered","GE_SquadCommandIssued","GE_EntityParadropComplete","GE_PlayerCheat","GE_InfoPointActivated","GE_SpawnActionComplete","GE_PlayerCommandIssued","GE_PlayerHostMigrated","GE_SquadParadropComplete","GE_PlayerPhaseUp","HPAT_Hint","HPAT_MovementLooping","HPAT_Bonus","HPAT_Vaulting","HPAT_Detonation","HPAT_CoverRed","HPAT_CoverYellow","HPAT_Artillery","HPAT_FormationSetup","HPAT_Movement","HPAT_Critical","HPAT_Objective","HPAT_AttackLooping","HPAT_DeepSnow","HPAT_CoverGreen","HPAT_Attack","HPAT_RallyPoint","HUDF_None","HUDF_AbilityCard","HUDF_Upgrades","HUDF_CommandCard","HUDF_MiniMap","LOOP_NORMAL","LOOP_TOGGLE_DIRECTION","LOOP_NONE","MAP_Confirmed","MAP_Placing","MAP_Facing","MAT_Entity","MAT_Player","MAT_Weapon","MAT_Upgrade","MAT_EntityType","MAT_Ability","MAT_Squad","MAT_WeaponType","MAT_SquadType","MUT_Multiplication","MUT_MultiplyAdd","MUT_Addition","MUT_Enable","PBG_Weapon","PBG_MoveType","PBG_SlotItem","PBG_UITacticalMap","PBG_HitMaterial","PBG_PassType","PBG_Race","PBG_UISelection","PBG_Critical","PBG_CamouflageStance","PBG_Material","PBG_Tuning","PBG_Ability","PBG_Upgrade","PBG_Posture","PBG_UITerritory","MM_ForceTense","MM_ForceCalm","MM_Auto","FN_OnShow","FN_OnCounterDisplay","FN_OnActivate","FN_LuaTableQuery","FN_OnSelect","OS_Complete","OS_Incomplete","OS_Off","OS_Failed","OT_Secondary","OT_Primary","OT_Ally","OT_Neutral","OT_Player","OT_Enemy","PCMD_MunitionDonation","PCMD_SlotItemRemove","PCMD_CriticalHit","PCMD_CheatBuildTime","PCMD_Ability","PCMD_SetCommander","PCMD_CheatRevealAll","PCMD_ManpowerDonation","PCMD_UpgradeRemove","PCMD_ConstructField","PCMD_CancelProduction","PCMD_CheatKillSelf","PCMD_Upgrade","PCMD_ConstructFence","PCMD_FuelDonation","PCMD_DetonateCharges","PCMD_CheatResources","PCMD_AIPlayer","PCMD_AIPlayer_ObjectiveNotification","PCMD_ConstructStructure","PCMD_InstantUpgrade","PITEM_SquadUpgrade","PITEM_SquadReinforce","PITEM_Spawn","PITEM_Upgrade","PT_Rectangle","PT_Circle","R_NEUTRAL","R_ENEMY","R_UNDEFINED","R_ALLY","RT_SovietOrder227","RT_Command","RT_SovietProgression","RT_Popcap","RT_Manpower","RT_Munition","RT_Fuel","RT_Action","RUIITEM_Population","RUIITEM_ResourceBar","RUIITEM_Munitions","RUIITEM_Manpower","RUIITEM_Fuel","ST_MARKER","ST_PBG","ST_SCARPOS","ST_AIPLAYER","ST_TABLE","ST_EGROUP","ST_AISTATSMILITARYPOINT","ST_AISQUAD","ST_ENTITY","ST_NUMBER","ST_FUNCTION","ST_SQUAD","ST_PLAYER","ST_BOOLEAN","ST_NIL","ST_CONSTPLAYER","ST_UNKNOWN","ST_SGROUP","ST_STRING","ST_AICAPTUREPOINT","PBG_TurnPlan","PBG_EntityProperties","PBG_SquadFormation","PBG_SquadProperties","PBG_Formation","DEBUG_SELECTOR","DEBUG_COMBATZONES","SCMD_Attack","SCMD_Upgrade","SCMD_StationaryAttack","SCMD_SlotItemRemove","SCMD_Pilfer","SCMD_SetMoveType","SCMD_Ability","SCMD_Move","SCMD_BuildStructure","SCMD_InstantLoad","SCMD_Merge","SCMD_UnloadSquads","SCMD_Retreat","SCMD_DefaultAction","SCMD_RescueCasualty","SCMD_Stop","SCMD_SetCamouflageStance","SCMD_AttackMove","SCMD_RevertFieldSupport","SCMD_CancelProduction","SCMD_Capture","SCMD_Surprise","SCMD_ReinforceUnit","SCMD_CaptureTeamWeapon","SCMD_Patrol","SCMD_Face","SCMD_Recrew","SCMD_DoPlan","SCMD_DefuseCharge","SCMD_PickUpSlotItem","SCMD_BuildSquad","SCMD_InstantReinforceUnit","SCMD_Load","SCMD_InstantSetupTeamWeapon","SCMD_RallyPoint","SCMD_AbandonTeamWeapon","SCMD_Unload","SCMD_DefuseMine","SCMD_Destroy","SCMD_PlaceCharge","SCMD_InstantUpgrade","SQUADSTATEID_Capture","SQUADSTATEID_CaptureTeamWeapon","SQUADSTATEID_Move","SQUADSTATEID_Retreat","SQUADSTATEID_Plan","SQUADSTATEID_AttackMove","SQUADSTATEID_Load","SQUADSTATEID_Defuse","SQUADSTATEID_DefuseMine","SQUADSTATEID_Stop","SQUADSTATEID_Patrol","SQUADSTATEID_Ability","SQUADSTATEID_CombatStance","SQUADSTATEID_RevertFieldSupport","SQUADSTATEID_Unload","SQUADSTATEID_HoldUnload","SQUADSTATEID_PickUpSlotItem","SQUADSTATEID_Construction","SQUADSTATEID_Idle","SQUADSTATEID_WeaponTransition","SQUADSTATEID_Recrew","SQUADSTATEID_PlaceCharges","SQUADSTATEID_Combat","UIE_UpgradeComplete","UIE_PlayerPingOfShameLocal","UIE_EnemyReveal","UIE_InfoPointActivated","UIE_AITakeOver","UIE_VehicleComplete","UIE_AllyAttacked","UIE_CommanderAbilityUnlocked","UIE_CommandersUnlocked","UIE_CommandPointGained","UIE_SquadFreezing","UIE_SquadCold","UIE_CasualtySquadSpawned","UIE_SquadVeterancy","UIE_VehicleReplaced","UIE_InfantryReplaced","UIE_Sniped","UIE_BoobyTrap","UIE_MineDetected","UIE_AbilityExectued","UIE_StrategicPointCaptured","UIE_StrategicPointReverting","UIE_EnemyTerritoryEntered","UIE_TerritoryEntered","UIE_PlayerSurrendered","UIE_PlayerAttacked","UIE_VehicleAttacked","UIE_PlayerKilled","UIE_PlayerKicked","UIE_PlayerLagComplaint","UIE_PlayerPingOfShame","UIE_PlayerDropped","UIE_ConstructionComplete","UIE_StrategicPointSecured","UIE_ResourceDepleted","UIE_SquadPinned","UIE_InfantryAttacked","UIE_InfantryComplete","UIE_PlayerCheated","UIE_PhaseUp","UIE_HostMigrated","UIE_Default","UI_Cinematic","UI_Fullscreen","UI_Normal","UOT_Player","UOT_Self","UOT_None","BIS_Icon","BIS_IconState","LAH_Justify","LAH_Left","LAH_Center","LAH_Right","LAV_None","LAV_Top","LAV_Center","LAV_Bottom","assert","collectgarbage","dofile","error","getmetatable","ipairs","load","loadfile","next","pairs","pcall","print","rawequal","rawget","rawlen","rawset","select","setmetatable","tonumber","tostring","type","xpcall","string.byte","string.char","string.dump","string.find","and","break","do","else","elseif","end","false","for","function","if","in","local","nil","not","or","repeat","return","then","true","until","while","math.huge","math.maxinteger","math.mininteger","math.pi","EBP.WRECKED_VEHICLES.FRONT_HULL01","EBP.WRECKED_VEHICLES.FROZEN_PANZER_IV","EBP.WRECKED_VEHICLES.FROZEN_STUG_III","EBP.WRECKED_VEHICLES.HORSA_COCKPIT","EBP.WRECKED_VEHICLES.HORSA_FRONT_HULL","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING","EBP.WRECKED_VEHICLES.HORSA_LEFT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_MID_HULL","EBP.WRECKED_VEHICLES.HORSA_REAR_HULL","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING","EBP.WRECKED_VEHICLES.HORSA_RIGHT_WING_TIP","EBP.WRECKED_VEHICLES.HORSA_TAIL","EBP.WRECKED_VEHICLES.LEFT_WING","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_105MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_76MM","EBP.WRECKED_VEHICLES.MAP_OBJECT_M4SHERMAN_DOZER","EBP.WRECKED_VEHICLES.MAP_OBJECT_OPELBLITZ","EBP.WRECKED_VEHICLES.MAP_OBJECT_PAK38","EBP.WRECKED_VEHICLES.MAP_OBJECT_PANZERIV","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_LONG","EBP.WRECKED_VEHICLES.MAP_OBJECT_STUGIII_SHORT","EBP.WRECKED_VEHICLES.PROPELLER","EBP.WRECKED_VEHICLES.RIGHT_WING","EBP.WRECKED_VEHICLES.STUKA_BODY","EBP.WRECKED_VEHICLES.STUKA_DEBRIS","EBP.WRECKED_VEHICLES.STUKA_TAIL","EBP.WRECKED_VEHICLES.STUKA_WING_LEFT","EBP.WRECKED_VEHICLES.STUKA_WING_RIGHT","EBP.WRECKED_VEHICLES.TAIL","EBP.WRECKED_VEHICLES.TAIL_SECTION_01","EBP.WRECKED_VEHICLES.WRECKED_50MM_PAK38_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_222_MP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_ARMORED_CAR_SDKFZ_234_PUMA_MP","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_17_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_45MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_75MM_PAK","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_B4_200MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_M1_57MM","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ML20","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_PAK43","EBP.WRECKED_VEHICLES.WRECKED_ATGUN_ZIS3","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING01_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING02_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03","EBP.WRECKED_VEHICLES.WRECKED_BASE_BUILDING03_SELF_DESTRUCT","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_AEC_ARMOURED_CAR_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_ATGUN_6_POUNDER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_BOFORS","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CENTAUR","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_AVRE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CHURCHILL_CROCODILE_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_COMET_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_CROMWELL_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_HQ_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_GLIDER_MP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SEXTON","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_SHERMAN_FIREFLY_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_UNIVERSAL_CARRIER","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_BRITISH_VALENTINE_COMMAND_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_02","EBP.WRECKED_VEHICLES.WRECKED_BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.WRECKED_VEHICLES.WRECKED_EARLY_WAR_TANK_01","EBP.WRECKED_VEHICLES.WRECKED_ELEFANT_SDKFZ_184","EBP.WRECKED_VEHICLES.WRECKED_FN63_4RM","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_250_MORTAR","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_17_FLAK","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_INFRARED","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_MP","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SDKFZ_251_WALKING_STUKA","EBP.WRECKED_VEHICLES.WRECKED_HALFTRACK_SWS","EBP.WRECKED_VEHICLES.WRECKED_HETZER","EBP.WRECKED_VEHICLES.WRECKED_HETZER_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_HOWITZER_105MM_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_IG18_SUPPORT_GUN","EBP.WRECKED_VEHICLES.WRECKED_IS_2_HEAVY_TANK","EBP.WRECKED_VEHICLES.WRECKED_ISU_152_SPG","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV","EBP.WRECKED_VEHICLES.WRECKED_JAGDPANZER_IV_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD","EBP.WRECKED_VEHICLES.WRECKED_JAGDTIGER_TD_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N","EBP.WRECKED_VEHICLES.WRECKED_KATYUSHA_BM_13N_MP","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER","EBP.WRECKED_VEHICLES.WRECKED_KING_TIGER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_KUBELWAGEN","EBP.WRECKED_VEHICLES.WRECKED_KV_1","EBP.WRECKED_VEHICLES.WRECKED_KV_1_MP","EBP.WRECKED_VEHICLES.WRECKED_KV_2","EBP.WRECKED_VEHICLES.WRECKED_KV_8","EBP.WRECKED_VEHICLES.WRECKED_LAND_MATTRESS","EBP.WRECKED_VEHICLES.WRECKED_M10","EBP.WRECKED_VEHICLES.WRECKED_M10_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M15A1_AA_HALFTRACK_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M20_UTILITY_CAR","EBP.WRECKED_VEHICLES.WRECKED_M21_MORTAR_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M26_PERSHING","EBP.WRECKED_VEHICLES.WRECKED_M3_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M36","EBP.WRECKED_VEHICLES.WRECKED_M36_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR","EBP.WRECKED_VEHICLES.WRECKED_M3A1_SCOUT_CAR_MP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_BULLDOZER_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_EASY_EIGHT_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_M4A3_SHERMAN_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK","EBP.WRECKED_VEHICLES.WRECKED_M5_HALFTRACK_MP","EBP.WRECKED_VEHICLES.WRECKED_M5A1_STUART","EBP.WRECKED_VEHICLES.WRECKED_M8_ARMORED_CAR","EBP.WRECKED_VEHICLES.WRECKED_M8_HMC","EBP.WRECKED_VEHICLES.WRECKED_OPEL_BLITZ_TRUCK","EBP.WRECKED_VEHICLES.WRECKED_OSTWIND_FLAK_PANZER","EBP.WRECKED_VEHICLES.WRECKED_PACK_HOWITZER","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171","EBP.WRECKED_VEHICLES.WRECKED_PANTHER_SDKFZ_171_BREWUP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS","EBP.WRECKED_VEHICLES.WRECKED_PANZER_II_LUCHS_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZER_III","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_COMMAND","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN","EBP.WRECKED_VEHICLES.WRECKED_PANZER_IV_SDKFZ_161_WEST_GERMAN_BREW_UP","EBP.WRECKED_VEHICLES.WRECKED_PANZERIV_MAP_OBJECT","EBP.WRECKED_VEHICLES.WRECKED_PANZERWERFER_SDKFZ_4_1","EBP.WRECKED_VEHICLES.WRECKED_PRIEST","EBP.WRECKED_VEHICLES.WRECKED_RAKETENWERFER","EBP.WRECKED_VEHICLES.WRECKED_SOVIET_76MM_SHERMAN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_E_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_FROZEN","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1","EBP.WRECKED_VEHICLES.WRECKED_STUG_III_G_SDKFZ_141_1_GAMEPLAY","EBP.WRECKED_VEHICLES.WRECKED_STURMTIGER","EBP.WRECKED_VEHICLES.WRECKED_SU_76M","EBP.WRECKED_VEHICLES.WRECKED_SU_85","EBP.WRECKED_VEHICLES.WRECKED_T_34_76","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_02","EBP.WRECKED_VEHICLES.WRECKED_T_34_76_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_MP","EBP.WRECKED_VEHICLES.WRECKED_T_34_85_RED_BANNER_TOW","EBP.WRECKED_VEHICLES.WRECKED_T34_CALLIOPE","EBP.WRECKED_VEHICLES.WRECKED_T70","EBP.WRECKED_VEHICLES.WRECKED_T70_MP","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181","EBP.WRECKED_VEHICLES.WRECKED_TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.WRECKED_VEHICLES.WRECKED_WC51","EBP.WRECKED_VEHICLES.WRECKED_WC54_AMBULANCE","EBP.AEF.AEF_AIRDROPPED_MINE_CONTACT_MP","EBP.AEF.AEF_AIRDROPPED_MINE_MP","EBP.AEF.AEF_ALLIEDSUPPLY_STACK_L_01_MP","EBP.AEF.AEF_ATTACK_PLANE","EBP.AEF.AEF_BARBED_WIRE_FENCE_MP","EBP.AEF.AEF_BARRACKS","EBP.AEF.AEF_BASE_STAMPER","EBP.AEF.AEF_GARRISON","EBP.AEF.AEF_MG_NEST","EBP.AEF.AEF_MG_NEST_AEF_BASE","EBP.AEF.AEF_MG_NEST_PERIMETER_MP","EBP.AEF.AEF_MINE_MP","EBP.AEF.AEF_MINE_RIFLEMEN_MP","EBP.AEF.AEF_SANDBAG_DIRTWALL_01","EBP.AEF.AEF_SANDBAG_FENCE","EBP.AEF.AEF_SANDBAGS","EBP.AEF.AEF_SANDBAGWALL","EBP.AEF.AEF_SANDBAGWALL_COVER_SPECIALIZATION","EBP.AEF.AEF_STORAGEBUNKER","EBP.AEF.AEF_SUPPLYTENT","EBP.AEF.AEF_TANK_TRAP_IMPASSABLE_MP","EBP.AEF.AEF_TANK_TRAP_MP","EBP.AEF.AEF_WEAPON_RACK_BAZOOKA_MP","EBP.AEF.AEF_WEAPON_RACK_BROWNING_AUTOMATIC_RIFLE_MP","EBP.AEF.AEF_WEAPON_RACK_DEFAULT_MP","EBP.AEF.AEF_WEAPON_RACK_M1919_LMG","EBP.AEF.AEF_WEAPON_RACK_M1C_GARAND","EBP.AEF.AEF_WEAPON_RACK_M9_BAZOOKA_MP","EBP.AEF.AIRBORNE_BEACON_MP","EBP.AEF.ARMOR_COMMAND_MP","EBP.AEF.ARMOR_COMMAND_SP","EBP.AEF.ARMOR_COMMAND_WRECK_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_MP","EBP.AEF.ARMORED_RIFLE_COMMAND_SP","EBP.AEF.ARMORED_RIFLE_COMMAND_WRECK_MP","EBP.AEF.ASSAULT_ENGINEER_MP","EBP.AEF.ASSAULT_ENGINEER_VEHICLE_CREW_MP","EBP.AEF.AT_TEAM_WEAPON_CREW_MP","EBP.AEF.CAPTAIN_MP","EBP.AEF.CAPTAIN_UNLOCK_MP","EBP.AEF.COMPANY_WEAPONS_POOL_MP","EBP.AEF.COMPANY_WEAPONS_POOL_SP","EBP.AEF.COMPANY_WEAPONS_POOL_WRECK_MP","EBP.AEF.DODGE_WC51_50CAL_MP","EBP.AEF.DODGE_WC51_50CAL_PARADROP","EBP.AEF.DODGE_WC51_AMBULANCE_MP","EBP.AEF.DODGE_WC51_MP","EBP.AEF.DODGE_WC51_MP_PATHFINDERS","EBP.AEF.FIGHTING_POSITION_MP","EBP.AEF.FIGHTING_POSITION_RIFLEMEN_MP","EBP.AEF.HMG_TEAM_WEAPON_CREW_MP","EBP.AEF.HOWITZER_TEAM_WEAPON_CREW_MP","EBP.AEF.INVISI_HEAL_STATION_MP","EBP.AEF.INVISI_REPAIR_STATION_MP","EBP.AEF.JACKSON","EBP.AEF.LIEUTENANT_MP","EBP.AEF.LIEUTENANT_UNLOCK_MP","EBP.AEF.M1_57MM_ANTITANK_GUN_MP","EBP.AEF.M1_75MM_PACK_HOWITZER_MP","EBP.AEF.M1_81MM_MORTAR_MP","EBP.AEF.M10_TANK_DESTROYER_MP","EBP.AEF.M15A1_AA_HALFTRACK_MP","EBP.AEF.M1919A4_30CAL_MACHINE_GUN_MP","EBP.AEF.M1919A4_TEAM_WEAPON_CREW_MP","EBP.AEF.M2_60MM_MORTAR_MP","EBP.AEF.M20_M6_AT_MINE_MP","EBP.AEF.M20_UTILITY_CAR_MP","EBP.AEF.M21_MORTAR_HALFTRACK_MP","EBP.AEF.M26_PERSHING_MP","EBP.AEF.M2HB_50CAL_MACHINE_GUN_MP","EBP.AEF.M3_HALFTRACK_ASSAULT_MP","EBP.AEF.M3_HALFTRACK_MP","EBP.AEF.M36_TANK_DESTROYER_MP","EBP.AEF.M4A3_76MM_SHERMAN_MP","EBP.AEF.M4A3_SHERMAN_BULLDOZER_MP","EBP.AEF.M4A3_SHERMAN_DEMO_BURNOUT","EBP.AEF.M4A3_SHERMAN_MP","EBP.AEF.M4A3E8_SHERMAN_EASY_8_MP","EBP.AEF.M5_HALFTRACK_USF_MP","EBP.AEF.M5A1_STUART_MP","EBP.AEF.M7B1_PRIEST_MP","EBP.AEF.M8_GREYHOUND_MP","EBP.AEF.M8A1_HMC_MP","EBP.AEF.MAJOR_MP","EBP.AEF.MAJOR_RETREAT_POINT_MP","EBP.AEF.MAJOR_UNLOCK_MP","EBP.AEF.MORTAR_TEAM_WEAPON_CREW_MP","EBP.AEF.OBSERVATION_POST_FUEL_AEF_MP","EBP.AEF.OBSERVATION_POST_MUNITION_AEF_MP","EBP.AEF.P47_RECON","EBP.AEF.P47_RECON_PLANE_SWEEP","EBP.AEF.P47_RECON_TRACKING","EBP.AEF.P47_ROCKETS","EBP.AEF.P47_STRAFE","EBP.AEF.PARATROOPER_MP","EBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","EBP.AEF.PARATROOPERS_PLANE","EBP.AEF.PARATROOPERS_PLANE_ATGUN","EBP.AEF.PARATROOPERS_PLANE_HMG","EBP.AEF.PARATROOPERS_PLANE_MINES","EBP.AEF.PARATROOPERS_PLANE_PARAS","EBP.AEF.PATHFINDER_IR_MP","EBP.AEF.PATHFINDER_RECON_MP","EBP.AEF.PM_AEF_AIR_SUPPORT_RECON","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET","EBP.AEF.PM_AEF_AIR_SUPPORT_ROCKET_ELITE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE","EBP.AEF.PM_AEF_AIR_SUPPORT_STRAFE_ELITE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","EBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_SPAWNER","EBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","EBP.AEF.PM_AEF_FIGHTING_POSITION_TEAMWEAPONS","EBP.AEF.PM_AEF_PINPOINT_ARTY_MARKER_MP","EBP.AEF.PM_AEF_PINPOINT_ARTY_THREE_MARKER_MP","EBP.AEF.PM_ARMOR_COMMAND_BAZOOKA_RACK","EBP.AEF.PM_ARMOR_COMMAND_LMG_RACK","EBP.AEF.PM_ATTACHED_MEDIC","EBP.AEF.PM_ATTACHED_SEARGENT","EBP.AEF.PM_P47_FLYBY","EBP.AEF.PM_P47_MG_STRAFE","EBP.AEF.PM_P47_ROCKET_STRAFE","EBP.AEF.RANGER_COMMANDER_MP","EBP.AEF.RANGER_MP","EBP.AEF.REAR_ECHELON_RADIOMAN_MP","EBP.AEF.REAR_ECHELON_RESERVE_TROOP_MP","EBP.AEF.REAR_ECHELON_TROOP_CAPT_MP","EBP.AEF.REAR_ECHELON_TROOP_MP","EBP.AEF.REPLACEMENT_ARMOR_COMMAND_MP","EBP.AEF.REPLACEMENT_ARMORED_RIFLE_COMMAND_MP","EBP.AEF.REPLACEMENT_COMPANY_WEAPONS_POOL_MP","EBP.AEF.RIFLE_COMMAND_MP","EBP.AEF.RIFLE_COMMAND_SP","EBP.AEF.RIFLE_COMMAND_WRECK_MP","EBP.AEF.RIFLEMAN_SOLDIER_CAPTAIN_MP","EBP.AEF.RIFLEMAN_SOLDIER_GROUP_MP","EBP.AEF.RIFLEMAN_SOLDIER_LIEUTENANT_MP","EBP.AEF.RIFLEMAN_SOLDIER_MP","EBP.AEF.SHERMAN_BARRIER_DEFORM_MP","EBP.AEF.SHERMAN_BARRIER_DIRT_MP","EBP.AEF.SHERMAN_BARRIER_MUD_MP","EBP.AEF.SHERMAN_BARRIER_RUBBLE_MP","EBP.AEF.SHERMAN_BARRIER_SNOW_MP","EBP.AEF.T34_CALLIOPE_MP","EBP.AEF.TEMP_ACTIVE_STRUCTURE_SEARCHLIGHT","EBP.AEF.USF_MEDIC_MP","EBP.AEF.VEHICLE_CREW_BAZOOKA_MP","EBP.AEF.VEHICLE_CREW_TROOP_MP","EBP.AEF.VEHICLE_CREW_TROOP_REPAIR_STATION_MP","SBP.AEF.AEF_AIR_SUPPORT_RECON","SBP.AEF.AEF_AIR_SUPPORT_ROCKET","SBP.AEF.AEF_AIR_SUPPORT_ROCKET_ELITE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE","SBP.AEF.AEF_AIR_SUPPORT_STRAFE_ELITE","SBP.AEF.AEF_ATTACK_PLANE_SQUAD","SBP.AEF.AEF_HALFTRACK_SQUAD_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_5_MAN_MP","SBP.AEF.ASSAULT_ENGINEER_SQUAD_MP","SBP.AEF.CAPTAIN_SQUAD_MP","SBP.AEF.DODGE_WC51_50CAL_SQUAD_MP","SBP.AEF.DODGE_WC51_AMBULANCE_SQUAD_MP","SBP.AEF.DODGE_WC51_PATHFINDER_SQUAD_MP","SBP.AEF.DODGE_WC51_SQUAD_MP","SBP.AEF.JACKSON_SQUAD","SBP.AEF.LIEUTENANT_SQUAD_MP","SBP.AEF.M1_57MM_AT_GUN_SQUAD_BOB","SBP.AEF.M1_57MM_AT_GUN_SQUAD_MP","SBP.AEF.M1_75MM_PACK_HOWITZER_SQUAD_MP","SBP.AEF.M1_81MM_MORTAR_SQUAD_MP","SBP.AEF.M10_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M15A1_AA_HALFTRACK_SQUAD_MP","SBP.AEF.M1919A4_HMG_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_CORE_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP","SBP.AEF.M2_60MM_MORTAR_SQUAD_MP_CLONE","SBP.AEF.M20_ASSAULT_ENGY_ANTITANK_SQUAD_MP","SBP.AEF.M20_UTILITY_CAR_SQUAD_MP","SBP.AEF.M21_MORTAR_HALFTRACK_SQUAD_MP","SBP.AEF.M26_PERSHING_MP","SBP.AEF.M2HB_50CAL_HMG_SQUAD_MP","SBP.AEF.M3_HALFTRACK_SQUAD_ASSAULT_MP","SBP.AEF.M3_HALFTRACK_SQUAD_MP","SBP.AEF.M36_TANK_DESTROYER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_BULLDOZER_SQUAD_MP","SBP.AEF.M4A3_76MM_SHERMAN_SQUAD_MP","SBP.AEF.M4A3_SHERMAN_SQUAD_DEMO_BURNOUT","SBP.AEF.M4A3_SHERMAN_SQUAD_MP","SBP.AEF.M4A3E8_SHERMAN_EASY_8_SQUAD_MP","SBP.AEF.M5A1_STUART_SQUAD_MP","SBP.AEF.M7B1_PRIEST_SQUAD_MP","SBP.AEF.M8_GREYHOUND_SQUAD_MP","SBP.AEF.M8A1_HMC_SQUAD_MP","SBP.AEF.MAJOR_SQUAD_MP","SBP.AEF.P47_FLYBY","SBP.AEF.P47_MG_STRAFE","SBP.AEF.P47_RECON","SBP.AEF.P47_RECON_PLANE_SWEEP","SBP.AEF.P47_RECON_TRACKING","SBP.AEF.P47_ROCKETS","SBP.AEF.P47_ROCKETS_STRAFE","SBP.AEF.P47_STRAFES","SBP.AEF.PARATROOPER_COMBAT_GROUP_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_MP","SBP.AEF.PARATROOPER_SQUAD_SUPPORT_MP","SBP.AEF.PARATROOPERS_COMBAT_GROUP_PLANE","SBP.AEF.PARATROOPERS_PLANE","SBP.AEF.PARATROOPERS_PLANE_ATGUN","SBP.AEF.PARATROOPERS_PLANE_HMG","SBP.AEF.PARATROOPERS_PLANE_MINES","SBP.AEF.PARATROOPERS_PLANE_PARAS","SBP.AEF.PATHFINDER_SQUAD_MP","SBP.AEF.PATHFINDER_SQUAD_RECON_MP","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_PARAS","SBP.AEF.PM_AEF_AIRBORNE_PARATROOPERS_PLANE_STRAFE","SBP.AEF.PM_AEF_AIRBORNE_SUPPLY_DROP_PLANE","SBP.AEF.PM_M3_HALFTRACK_SQUAD_OMCG","SBP.AEF.PM_RIFLEMEN_SQUAD_OMCG","SBP.AEF.RANGER_SQUAD_COMMANDER_MP","SBP.AEF.RANGER_SQUAD_MP","SBP.AEF.REAR_ECHELON_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_MP","SBP.AEF.RIFLEMEN_SQUAD_VETERAN_MP","SBP.AEF.T34_CALLIOPE_SQUAD_MP","SBP.AEF.USF_MEDIC_SQUAD_MP","SBP.AEF.VEHICLE_CREW_BAZOOKA_SQUAD_MP","SBP.AEF.VEHICLE_CREW_SQUAD_MP","ABILITY.AEF.ACTIVATE_REPAIR_STATION_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_ASSUALT_ENGINEERS_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.AEF.AEF_BARBED_WIRE_CUTTING_ABILITY_NO_REQUIREMENT_MP","ABILITY.AEF.AEF_HQ_ENGINEER_CALL_IN","ABILITY.AEF.AEF_REPAIR_ABILITY_REAR_ECHELON_MP","ABILITY.AEF.AEF_REPAIR_ABILITY_VEHICLE_CREW_MP","ABILITY.AEF.AEF_REPAIR_CRITICAL_MP","ABILITY.AEF.AIR_DROP_COMBAT_GROUP","ABILITY.AEF.AMBULANCE_HEAL_AREA","ABILITY.AEF.ARTILLERY_155MM","ABILITY.AEF.ARTILLERY_SMOKE_BARRAGE","ABILITY.AEF.ASSAULT_ENGINEER_DISPATCH","ABILITY.AEF.BAR_SUPPRESSION_ABILITY","ABILITY.AEF.BAZOOKA_DEPLOY_MP","ABILITY.AEF.BEACON_DISABLE","ABILITY.AEF.CALLIOPE_ROCKET_BARRAGE_MP","ABILITY.AEF.CAPTAIN_SUPERVISE","ABILITY.AEF.CMD_PARATROOPERS_FROM_PATHFINDERS","ABILITY.AEF.COMBAT_ENGINEER_TIMED_DEMO_MP","ABILITY.AEF.COMBINED_ARMS","ABILITY.AEF.DODGE_WC51_DISPATCH","ABILITY.AEF.ELITE_RIFLEMEN","ABILITY.AEF.ELITE_VEHICLE_CREWS","ABILITY.AEF.FATALITY_P47_ROCKET_ATTACK","ABILITY.AEF.FATALITY_PARATROOPERS_PARADROP","ABILITY.AEF.FATALITY_SMOKE_FLARES","ABILITY.AEF.FATALITY_WHITE_PHOSPHOROUS_BARRAGE","ABILITY.AEF.FLANKING_SPEED","ABILITY.AEF.FORWARD_OBSERVERS_ALWAYS_ON","ABILITY.AEF.FORWARD_OBSERVERS_UNLOCK_2","ABILITY.AEF.GREYHOUND_RECON_DISPATCH","ABILITY.AEF.LIEUTENANT_CAPTAIN_ON_ME_AURA_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M1_81MM_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.M1_ATGUN_PIERCING_ABILITY","ABILITY.AEF.M1_ATGUN_TAKE_AIM_ABILITY","ABILITY.AEF.M10_APCPC_SHELLS","ABILITY.AEF.M10_APCPC_SHELLS_VET","ABILITY.AEF.M10_DEPLOY","ABILITY.AEF.M15A1_AA_MODE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.AEF.M2_60MM_MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.AEF.M20_MARK_VEHICLE","ABILITY.AEF.M20_SMOKE","ABILITY.AEF.M21_HEAVY_HE_SHORT_DELAY_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_MP","ABILITY.AEF.M21_MORTAR_BARRAGE_VICTOR_TARGET_MP","ABILITY.AEF.M21_MORTAR_HALFTRACK_DISPATCH","ABILITY.AEF.M21_MORTAR_WHITE_PHOSPHOROUS_BARRAGE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_MP","ABILITY.AEF.M23_SMOKE_STREAM_RIFLE_GRENADE_VET_MP","ABILITY.AEF.M26_PERSHING_DISPATCH","ABILITY.AEF.M2HB_50CAL_AP_ROUNDS_MP","ABILITY.AEF.M2HB_HMG_SPRINT_MP","ABILITY.AEF.M3_HALFTRACK_GROUP","ABILITY.AEF.M3_HALFTRACK_SPEED_BOOST_MP","ABILITY.AEF.M36_M8_CONCEALING_SMOKE_VET","ABILITY.AEF.M5_QUAD_HALFTRACK_DISPATCH","ABILITY.AEF.M5_STUART_DAMAGE_ENGINE","ABILITY.AEF.M5_STUART_SHELL_SHOCK","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M7B1_PRIEST_105MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M7B1_PRIEST_105MM_SMOKE_BARRAGE_ABILITY_MP","ABILITY.AEF.M8_CANISTER_SHOT","ABILITY.AEF.M8_LAY_HEAVY_MINE","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.M8A1_HMC_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.M8A1_HMC_SMOKE_BARRAGE_MP","ABILITY.AEF.MAJOR_ARTILLERY","ABILITY.AEF.MAJOR_ARTILLERY_FAKE","ABILITY.AEF.MAJOR_QUICK_RECON_RUN","ABILITY.AEF.MAJOR_QUICK_RECON_RUN_IMPROVED","ABILITY.AEF.MEDIC_AUTO_HEAL","ABILITY.AEF.MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.OFF_MAP_SMOKE_ARTILLERY","ABILITY.AEF.OFFICER_RETREAT_POINT_MP","ABILITY.AEF.OFFICER_STOP_RETREAT_MP","ABILITY.AEF.OUT_OF_FUEL_SP","ABILITY.AEF.P47_RECON_MP","ABILITY.AEF.P47_ROCKET_ATTACK","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_HEAT_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VET3_MP","ABILITY.AEF.PACK_HOWITZER_75MM_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.AEF.PACK_HOWITZER_WHITE_PHOSPHOROUS_BARRAGE_ABILITY_MP","ABILITY.AEF.PARADROP_MACHINE_GUN","ABILITY.AEF.PARADROPS_ANTI_TANK_GUN","ABILITY.AEF.PARATROOPER_ASSAULT_MOVE_TEST_MP","ABILITY.AEF.PARATROOPER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.PARATROOPER_SUPPRESSING_FIRE_ABILITY_MP","ABILITY.AEF.PARATROOPER_TIMED_DEMO_MP","ABILITY.AEF.PARATROOPERS_PARADROP","ABILITY.AEF.PATHFINDER_ARTILLERY_UNLOCK","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_IMPROVED_MP","ABILITY.AEF.PATHFINDER_IN_COVER_STATIONARY_CAMOUFLAGE_MP","ABILITY.AEF.PATHFINDER_PLANT_BEACON","ABILITY.AEF.PATHFINDERS_DISPATCH","ABILITY.AEF.PATHFINDERS_RECON_DISPATCH","ABILITY.AEF.PERSHING_HVAP_PIERCING_SHOT_ABILITY","ABILITY.AEF.PRIEST_ARTILLERY_BARRAGE_CREEPING_MP","ABILITY.AEF.PRIEST_DISPATCH","ABILITY.AEF.RANGER_BUNDLED_GRENADE_MP","ABILITY.AEF.RANGER_LIMITED_DEMO_MP","ABILITY.AEF.RANGER_MK2_FRAGMENTATION_GRENADE_MP","ABILITY.AEF.RANGER_SPRINT_MP","ABILITY.AEF.RANGERS_DISPATCH","ABILITY.AEF.REAR_ECHELON_VOLLEY_FIRE_ABILITY_MP","ABILITY.AEF.RECON_SWEEP","ABILITY.AEF.REFUEL_TANK_SP","ABILITY.AEF.RIFLEMAN_AT_RIFLE_GRENADE_VET","ABILITY.AEF.RIFLEMAN_FIRE_UP","ABILITY.AEF.RIFLEMAN_FIRE_UP_MP","ABILITY.AEF.RIFLEMEN_30_CALIBER_LMG","ABILITY.AEF.RIFLEMEN_DEFENSIVE","ABILITY.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","ABILITY.AEF.RIFLEMEN_FIRE_FLARES_ABILITY_MP","ABILITY.AEF.RIFLEMEN_FLAMETHROWERS","ABILITY.AEF.RIFLEMEN_FLARES","ABILITY.AEF.SHERMAN_AMMO_SWITCH_AP_SHELL_MP","ABILITY.AEF.SHERMAN_AMMO_SWITCH_HE_SHELL_MP","ABILITY.AEF.SHERMAN_BULLDOZER_CONSTRUCT_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DESTROY_BARRIER_MP","ABILITY.AEF.SHERMAN_BULLDOZER_DISPATCH","ABILITY.AEF.SHERMAN_CALLIOPE_DISPATCH","ABILITY.AEF.SHERMAN_EASY8_DISPATCH","ABILITY.AEF.SIEGE_240MM_BARRAGE","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_BULLDOZER_MP","ABILITY.AEF.SMOKE_SHERMAN_MORTAR_BARRAGE_MP","ABILITY.AEF.SP_240MM_OFF_MAP_BARRAGE","ABILITY.AEF.SP_QUICK_RECON_RUN","ABILITY.AEF.SUPPORT_ARTILLERY","ABILITY.AEF.SUPPORT_ARTILLERY_DECOY","ABILITY.AEF.TANK_RIDERS_AUTO_UNLOAD_MP","ABILITY.AEF.TIME_ON_TARGET_ARTILLERY","ABILITY.AEF.USF_HOLD_FIRE_MP","ABILITY.AEF.USF_HOLD_FIRE_PACK_HOWITZER_MP","ABILITY.AEF.USF_MEDIC_HEAL_MP","ABILITY.AEF.USF_SHERMAN_BULLDOZER_HOLD_FIRE_MP","ABILITY.AEF.USF_STRAFING_RUN","ABILITY.AEF.USF_VEHICLE_HOLD_FIRE_MP","ABILITY.AEF.VEHICLE_CREW_AUTO_REPAIR","ABILITY.AEF.VEHICLE_DECREW_GENERIC_MP","ABILITY.AEF.VEHICLE_DECREW_M20_CREW_MP","ABILITY.AEF.VEHICLE_DECREW_MEDICS_MP","ABILITY.AEF.VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.AEF.WC51_SPEED_BOOST_MP","ABILITY.AEF.WITHDRAW_AND_REFIT","UPG.AEF.ABILITY_LOCK_OUT_CAPTAIN_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_LIEUTENANT_ABILITIES","UPG.AEF.ABILITY_LOCK_OUT_PARATROOPERS_LANDED","UPG.AEF.ABILITY_REFUEL_LOCKOUT","UPG.AEF.ABILITY_TRANSFER_ORDERS_LOCK_OUT","UPG.AEF.ARTILLERY_155MM","UPG.AEF.ARTILLERY_155MM_BLIND","UPG.AEF.ARTILLERY_WHITE_PHOSPHOROUS","UPG.AEF.ASSAULT_ENGINEER_DISPATCH","UPG.AEF.ASSAULT_ENGINEER_FLAMETHROWER","UPG.AEF.BAR_UPGRADE_MP","UPG.AEF.BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_BAZOOKA_UPGRADE_MP","UPG.AEF.CAPTAIN_DISPATCHED_UPGRADE_MP","UPG.AEF.COMBINED_ARMS_MP","UPG.AEF.DODGE_WC51_DISPATCH","UPG.AEF.ELITE_RIFLEMEN","UPG.AEF.ELITE_VEHICLE_CREWS","UPG.AEF.FIGHTING_POSITION_MG_ADDITION_MP","UPG.AEF.FIRE_UP_RIFLEMEN","UPG.AEF.FORWARD_OBSERVERS_UNLOCK","UPG.AEF.GREYHOUND_RECON_DISPATCH","UPG.AEF.LIEUTENANT_DISPATCHED_UPGRADE_MP","UPG.AEF.M10_DEPLOY","UPG.AEF.M20_SIDE_SKIRTS_MP","UPG.AEF.M21_MORTAR_HALFTRACK_DISPATCH","UPG.AEF.M26_PERSHING_DISPATCH","UPG.AEF.M3_HALFTRACK_GROUP","UPG.AEF.M3_REPAIR_STATION_MP","UPG.AEF.M5_HALFTRACK_DISPATCH","UPG.AEF.M8_GREYHOUND_SIDE_SKIRTS_MP","UPG.AEF.M8_TOP_GUNNER_MP","UPG.AEF.MAJOR_DISPATCHED_UPGRADE_MP","UPG.AEF.MEDIC_AUTO_HEAL_REFRESH","UPG.AEF.MINESWEEPER_UPGRADE_MP","UPG.AEF.NO_OFFICER_SPAWN_MP","UPG.AEF.OFF_SMOKE_BARRAGE","UPG.AEF.P47_RECON","UPG.AEF.P47_ROCKET_ATTACK","UPG.AEF.PARADROP_ANTI_TANK_GUN","UPG.AEF.PARADROP_MACHINE_GUN","UPG.AEF.PARADROPPED_SUPPORT_DROP","UPG.AEF.PARATROOPER_M1919A6_LMG_MP","UPG.AEF.PARATROOPER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.PARATROOPERS","UPG.AEF.PATHFINDERS","UPG.AEF.PATHFINDERS_RECON","UPG.AEF.PRIEST_DISPATCH","UPG.AEF.RANGER_DISPATCH","UPG.AEF.RANGER_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.REAR_ECHELON_HACK_WITHDRAWING","UPG.AEF.RECON_SWEEP","UPG.AEF.RIFLE_COMMAND_GRENADE_MP","UPG.AEF.RIFLEMEN_30_CALIBER_LMG","UPG.AEF.RIFLEMEN_DEFENSIVE_BUILDINGS","UPG.AEF.RIFLEMEN_FLAMETHROWER","UPG.AEF.RIFLEMEN_FLAMETHROWER_UNLOCK","UPG.AEF.RIFLEMEN_FLARES","UPG.AEF.SHERMAN_BULLDOZER_DISPATCH","UPG.AEF.SHERMAN_EASY8_DISPATCH","UPG.AEF.SHERMAN_HE_ROUNDS","UPG.AEF.SHERMAN_TOP_GUNNER_MP","UPG.AEF.SIEGE_240MM_ARTILLERY","UPG.AEF.SMOKE_BARRAGE","UPG.AEF.T34_SHERMAN_CALLIOPE_DISPATCH","UPG.AEF.TECH_TREE_V1","UPG.AEF.TEMP_SPAWN_BASE_STAMP_MP","UPG.AEF.TIME_ON_TARGET_ARTILLERY","UPG.AEF.TOP_GUNNER_UPGRADED","UPG.AEF.USF_M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.AEF.USF_STRAFING_RUN","UPG.AEF.VEHICLE_CREW_THOMPSON_SUB_MACHINE_GUN_UPGRADE_MP","UPG.AEF.WEAPON_RACK_UPGRADE_MP","UPG.AEF.WITHDRAW_AND_REFIT","EBP.BRITISH.AEC_ARMOURED_CAR_MP","EBP.BRITISH.AIR_SUPPORT_OFFICER_MP","EBP.BRITISH.AVRE_VEHICLE_CREW_MP","EBP.BRITISH.BRIT_17_POUNDER_GUN_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_COMMANDER_MP","EBP.BRITISH.BRIT_17_POUNDER_PIT_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_MP","EBP.BRITISH.BRIT_25_POUNDER_HOWITZER_TEMP_MP","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT","EBP.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_COMMANDER_MP","EBP.BRITISH.BRIT_6_POUNDER_AT_GUN_MP","EBP.BRITISH.BRIT_BARBED_WIRE_FENCE_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_COMMANDER_MP","EBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_MP","EBP.BRITISH.BRIT_EMPLACEMENT_SMALL","EBP.BRITISH.BRIT_FORWARD_HQ_COMMANDER_MP","EBP.BRITISH.BRIT_FORWARD_HQ_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_FWD_HQ_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_MP","EBP.BRITISH.BRIT_MEDIC_EXTRA_ENTITY_MP","EBP.BRITISH.BRIT_MEDIC_WITH_PISTOL_MP","EBP.BRITISH.BRIT_MINE_COMMANDER_MP","EBP.BRITISH.BRIT_MINE_MP","EBP.BRITISH.BRIT_RETREAT_POINT_MP","EBP.BRITISH.BRIT_SANDBAG_FENCE","EBP.BRITISH.BRIT_WEAPON_RACK_BREN_LMG_MP","EBP.BRITISH.BRIT_WEAPON_RACK_PIAT_LAUNCHER_MP","EBP.BRITISH.BRITISH_25LB_HOWITZER_GUN_CREW_MP","EBP.BRITISH.BRITISH_6LB_AT_GUN_CREW_MP","EBP.BRITISH.BRITISH_BASE_STAMPER","EBP.BRITISH.BRITISH_BUILDING_1_MP","EBP.BRITISH.BRITISH_BUILDING_1_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_1_WRECK_MP","EBP.BRITISH.BRITISH_BUILDING_2_MP","EBP.BRITISH.BRITISH_BUILDING_2_UNBUILT_MP","EBP.BRITISH.BRITISH_BUILDING_2_WRECK_MP","EBP.BRITISH.BRITISH_BUNKER_STARTING_POSITION_MP","EBP.BRITISH.BRITISH_HMG_PLANE","EBP.BRITISH.BRITISH_HMG_TEAM_CREW_MP","EBP.BRITISH.BRITISH_HQ_SANDBAGS_01_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_MP","EBP.BRITISH.BRITISH_HQ_TRUCK_WRECK_MP","EBP.BRITISH.BRITISH_LAND_MATTRESS_TEAM_CREW_MP","EBP.BRITISH.BRITISH_MACHINE_GUN_MP","EBP.BRITISH.BRITISH_MORTAR_TEAM_CREW_MP","EBP.BRITISH.BRITISH_RADIO_BEACON","EBP.BRITISH.BRITISH_SANDBAG_FENCE_MP","EBP.BRITISH.CENTAUR_AA_MK2_MP","EBP.BRITISH.CHURCHILL_AVRE_MP","EBP.BRITISH.CHURCHILL_CROCODILE_MP","EBP.BRITISH.CHURCHILL_DEFAULT_MP","EBP.BRITISH.COMET_MP","EBP.BRITISH.COMMANDO_AIR_LANDING_MP","EBP.BRITISH.COMMANDO_MP","EBP.BRITISH.COMMANDO_PIAT_MP","EBP.BRITISH.CROMWELL_MK4_75MM_MP","EBP.BRITISH.FIELD_HOSPITAL_MEDIC_MP","EBP.BRITISH.FORWARD_OBSERVATION_OFFICER_MP","EBP.BRITISH.GLIDER_COMMANDOS_ONLY","EBP.BRITISH.GLIDER_HEADQUARTERS","EBP.BRITISH.HQ_FIELD_ARTILLERY_MP","EBP.BRITISH.INVISIBLE_FLAME_MORTAR_ICON","EBP.BRITISH.M3_HALFTRACK_RESUPPLY_MP","EBP.BRITISH.PARATROOPERS_PLANE_ATGUN_MATT_TEST_MP","EBP.BRITISH.PARATROOPERS_PLANE_VICKERS_MATT_TEST_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","EBP.BRITISH.RECON_HAWKER_TYPHOON_MP","EBP.BRITISH.REPAIR_SAPPER_MP","EBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","EBP.BRITISH.SAPPER_MP","EBP.BRITISH.SAPPER_RECOVERY_MP","EBP.BRITISH.SEXTON_SPG_MP","EBP.BRITISH.SHERMAN_FIREFLY_M4A2_MP","EBP.BRITISH.SLIT_TRENCH_MP","EBP.BRITISH.SNIPER_BRITISH_MP","EBP.BRITISH.SPITFIRE_RECON_PLANE","EBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","EBP.BRITISH.TOMMY_MP","EBP.BRITISH.TOMMY_RECON_MP","EBP.BRITISH.UNIVERSAL_CARRIER_MP","EBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY_MP","EBP.BRITISH.VALENTINE_MORTAR","EBP.BRITISH.VALENTINE_OBSERVATION_MP","EBP.BRITISH.VEHICLE_CREW_MP","SBP.BRITISH.AEC_ARMOURED_CAR_SQUAD_MP","SBP.BRITISH.AIR_SUPPORT_OFFICER_SQUAD_MP","SBP.BRITISH.AVRE_VEHICLE_CREW_SQUAD_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_17_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_MP","SBP.BRITISH.BRIT_25_POUNDER_HOWITZER_SQUAD_TEMP_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_COMMANDER_MP","SBP.BRITISH.BRIT_3_INCH_MORTAR_TEAM_MP","SBP.BRITISH.BRIT_6_POUNDER_AT_GUN_SQUAD_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_COMMANDER_MP","SBP.BRITISH.BRIT_BOFORS_40MM_AUTOCANNON_SQUAD_MP","SBP.BRITISH.BRIT_BREN_LMG_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRIT_FORWARD_HQ_MP","SBP.BRITISH.BRIT_LAND_MATTRESS_LAUNCHER_SQUAD_MP","SBP.BRITISH.BRIT_MEDIC_SQUAD_MP","SBP.BRITISH.BRIT_PIAT_LAUNCHER_WEAPON_RACK_UI_FAKE_MP","SBP.BRITISH.BRITISH_CARGO_PLANE","SBP.BRITISH.BRITISH_HMG_PLANE","SBP.BRITISH.BRITISH_MACHINE_GUN_SQUAD_MP","SBP.BRITISH.CENTAUR_AA_MK2_SQUAD_MP","SBP.BRITISH.CHURCHILL_AVRE_SQUAD_MP","SBP.BRITISH.CHURCHILL_CROCODILE_MP","SBP.BRITISH.CHURCHILL_DEFAULT_SQUAD_MP","SBP.BRITISH.COMET_TANK_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_MP","SBP.BRITISH.COMMANDO_SQUAD_PIAT_MP","SBP.BRITISH.CROMWELL_MK4_75MM_SQUAD_MP","SBP.BRITISH.FORWARD_HQ_MP","SBP.BRITISH.FORWARD_OBSERVATION_SQUAD_MP","SBP.BRITISH.GLIDER_COMMANDOS_ONLY_MP","SBP.BRITISH.GLIDER_HEADQUARTERS_MP","SBP.BRITISH.INFILTRATION_COMMANDO_SQUAD_MP","SBP.BRITISH.M3_HALFTRACK_SQUAD__RESUPPLY_MP","SBP.BRITISH.PARATROOPERS_PLANE_ATGUN_BRITISH_MATT_TEST_MP","SBP.BRITISH.PARATROOPERS_PLANE_VICKERS_BRITISH_MATT_TEST_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_ASSAULT_MP","SBP.BRITISH.RECON_HAWKER_TYPHOON_MP","SBP.BRITISH.ROCKET_HAWKER_TYPHOON_MP","SBP.BRITISH.SAPPER_SQUAD_DEMOLITION_MP","SBP.BRITISH.SAPPER_SQUAD_MP","SBP.BRITISH.SAPPER_SQUAD_RECOVERY_MP","SBP.BRITISH.SEXTON_SPG_SQUAD_MP","SBP.BRITISH.SHERMAN_FIREFLY_SQUAD_MP","SBP.BRITISH.SNIPER_BRITISH_SQUAD_MP","SBP.BRITISH.SPITFIRE_RECON_PLANE","SBP.BRITISH.STRAFE_HAWKER_TYPHOON_MP","SBP.BRITISH.TOMMY_SQUAD_FLAME_MP","SBP.BRITISH.TOMMY_SQUAD_MP","SBP.BRITISH.TOMMY_SQUAD_RECON_MP","SBP.BRITISH.TOMMY_SQUAD_TANK_HUNTER_MP","SBP.BRITISH.UNIVERSAL_CARRIER_RESUPPLY","SBP.BRITISH.UNIVERSAL_CARRIER_SQUAD_MP","SBP.BRITISH.VALENTINE_MORTAR","SBP.BRITISH.VALENTINE_OBSERVATION_MP","SBP.BRITISH.VEHICLE_CREW_STANDARD_SQUAD_MP","ABILITY.BRITISH.ADVANCED_ASSEMBLY","ABILITY.BRITISH.ADVANCED_COVER_COMBAT","ABILITY.BRITISH.AEC_DEFENSIVE_SMOKE","ABILITY.BRITISH.AEC_TREAD_SHOTS_MP","ABILITY.BRITISH.ALLIED_STRATEGIC_BOMBING","ABILITY.BRITISH.ARTILLERY_COVER","ABILITY.BRITISH.ASSAULT","ABILITY.BRITISH.ASSAULT_GRENADES","ABILITY.BRITISH.AT_GUN_AIRDROP","ABILITY.BRITISH.AVRE_CREW_DEMOLITION_CHARGE_MP","ABILITY.BRITISH.AVRE_CREW_SHRAPNELL_GRENADE_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_ATTACK_VET_3_MP","ABILITY.BRITISH.AVRE_SPIGOT_MORTAR_RELOAD_MP","ABILITY.BRITISH.AVRE_VEHICLE_DECREW_VEHICLE_CREW_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.BOFORS_SUPPRESSIVE_BARRAGE_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BREAKTHROUGH_OPERATION","ABILITY.BRITISH.BRIT_17_POUNDER_FACING_ORDER_MP","ABILITY.BRITISH.BRIT_17_POUNDER_FLARES_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_MP","ABILITY.BRITISH.BRIT_17_POUNDER_PIERCING_SHELL_ABILITY_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.BRIT_3_INCH_MORTAR_EMPLACEMENT_SMOKE_BARRAGE_MP","ABILITY.BRITISH.BRIT_6_POUNDER_CRITICAL_SHOT_MP","ABILITY.BRITISH.BRIT_6_POUNDER_RAPID_MANEUVER_MP","ABILITY.BRITISH.BRIT_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.BRITISH.BRIT_BASE_BRACED_STATIC_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_OFF_MP","ABILITY.BRITISH.BRIT_BASE_BUILDING_BRACED_ON_MP","ABILITY.BRITISH.BRIT_EMPLACEMENT_BRACED_MP","ABILITY.BRITISH.BRIT_HQ_ENGINEER_CALL_IN","ABILITY.BRITISH.BRIT_MEDIC_HEAL_MP","ABILITY.BRITISH.BRIT_MEDIC_SQUAD_AUTO_HEAL","ABILITY.BRITISH.BRIT_MEDIC_TOMMY_TIMED_AREA_HEAL_MP","ABILITY.BRITISH.BRIT_MORTAR_EMPLACEMENT_HOLD_FIRE","ABILITY.BRITISH.BRIT_RADAR_SWEEP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_REPAIR_ABILITY_TOMMYS_MP","ABILITY.BRITISH.BRIT_REPAIR_EWS_ABILITY_SAPPERS_MP","ABILITY.BRITISH.BRIT_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.BRITISH.BRIT_TUNE_UP","ABILITY.BRITISH.BRIT_VEHICLE_HOLD_FIRE_MP","ABILITY.BRITISH.BRITISH_HOLD_THE_LINE","ABILITY.BRITISH.BRITISH_MORTAR_HOLD_FIRE_MP","ABILITY.BRITISH.CENTAUR_20MM_BARRAGE_MP","ABILITY.BRITISH.CENTAUR_AA_MODE_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_MP","ABILITY.BRITISH.CENTAUR_WEAPON_BURST_TEST_MP","ABILITY.BRITISH.CHURCHILL_AVRE","ABILITY.BRITISH.CHURCHILL_CREW_GRENADE_TARGETED","ABILITY.BRITISH.CHURCHILL_CROC_FLAME_BURST_MP","ABILITY.BRITISH.CHURCHILL_CROCODILE","ABILITY.BRITISH.CHURCHILL_INF_SUPPORT_SMOKE","ABILITY.BRITISH.COMET_CREW_GRENADE_TARGETED","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.COMET_SMOKE_SHELL_SHOT_WP_MP","ABILITY.BRITISH.COMMAND_HQ","ABILITY.BRITISH.COMMAND_HQ_HE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_RECON_PLANE","ABILITY.BRITISH.COMMAND_HQ_SMOKE_ARTILLERY","ABILITY.BRITISH.COMMAND_HQ_STRAFE_PLANE","ABILITY.BRITISH.COMMAND_VEHICLE","ABILITY.BRITISH.COMMAND_VEHICLE_PLANE","ABILITY.BRITISH.COMMANDO_ASSASSINATE_MP","ABILITY.BRITISH.COMMANDO_DEMO_MP","ABILITY.BRITISH.COMMANDO_INFILTRATION_CAMOUFLAGE_MP","ABILITY.BRITISH.COUNTER_BATTERY","ABILITY.BRITISH.COUNTER_BATTERYS","ABILITY.BRITISH.COVER_SMOKE_GRENADES","ABILITY.BRITISH.CREW_REPAIR","ABILITY.BRITISH.CREW_REPAIR_OPERATION","ABILITY.BRITISH.CROMWELL_SMOKE_SHELL_SHOT_MP","ABILITY.BRITISH.DEFENSIVE_OPERATIONS","ABILITY.BRITISH.DESTROY_COVER_MP","ABILITY.BRITISH.DIRECT_BARRAGE","ABILITY.BRITISH.EARLY_WARNING","ABILITY.BRITISH.ENGINEER_COVER_COMBAT_BONUS","ABILITY.BRITISH.FATALITY_BURN_THEM_OUT","ABILITY.BRITISH.FATALITY_MIGHT_OF_THE_AIR_FORCES","ABILITY.BRITISH.FATALITY_ZEROING_STRIKE","ABILITY.BRITISH.FIELD_RECOVERY","ABILITY.BRITISH.FIRE_SUPPORT_TEAM","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_MP","ABILITY.BRITISH.FIREFLY_TULIP_ROCKET_BARRAGE_SKILL_SHOT_MP","ABILITY.BRITISH.FORTIFY_OUR_POSITION","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_GLIDER_MP","ABILITY.BRITISH.FORWARD_HQ_RETREAT_POINT_MP","ABILITY.BRITISH.GLIDER_COMMANDOS_ONLY","ABILITY.BRITISH.GLIDER_HEADQUARTERS","ABILITY.BRITISH.GLIDER_RETREAT_POINT_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_ATTACK_COMMANDER_MP","ABILITY.BRITISH.HOWITZER_COUNTER_BARRAGE_COMMANDER_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_1_MP","ABILITY.BRITISH.HQ_BUILD_ANVIL_2_MP","ABILITY.BRITISH.IMPROVED_FORTIFCATIONS","ABILITY.BRITISH.INFANTRY_RECON_TACTICS","ABILITY.BRITISH.INFANTRY_SMOKE_GRENADE_RESPOSITION","ABILITY.BRITISH.INFILTRATION_COMMANDOS","ABILITY.BRITISH.LAND_MATTRESS","ABILITY.BRITISH.LAND_MATTRESS_25LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_60LB_ROCKET","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_SMOKE","ABILITY.BRITISH.LAND_MATTRESS_BARRAGE_VICTOR_TARGET_MP","ABILITY.BRITISH.LAND_MATTRESS_FIRE_ALL","ABILITY.BRITISH.LAND_MATTRESS_LOAD_ROCKETS_MP","ABILITY.BRITISH.LAND_MATTRESS_PHOSPHORUS_ROCKET","ABILITY.BRITISH.MEDIC_AUTO_HEAL_MP","ABILITY.BRITISH.MORTAR_ARTILLERY","ABILITY.BRITISH.MORTAR_FIRE_ARTILLERY","ABILITY.BRITISH.MORTAR_PIT_COUNTER_BATTERY_MP","ABILITY.BRITISH.OBSERVATION_MODE","ABILITY.BRITISH.OBSERVATION_VALENTINE","ABILITY.BRITISH.OFFICER_ARTILLERY","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_AIRBURST_BARRAGE_MP","ABILITY.BRITISH.OFFICER_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.OFFICER_CHARGE_MP","ABILITY.BRITISH.OFFICER_RECON_SWEEP","ABILITY.BRITISH.PASSIVE_17_POUNDER_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_BOFORS_EMPLACEMENT_MP","ABILITY.BRITISH.PASSIVE_MORTAR_EMPLACEMENT_MP","ABILITY.BRITISH.PEPPER_POT","ABILITY.BRITISH.PERCISION_BARRAGE","ABILITY.BRITISH.PIAT_DEPLOY_MP","ABILITY.BRITISH.QF_25_PDR_FLARE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_ANTITANK_ABILITY_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_BASE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_FWD_HQ_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_OFFICER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_SNIPER_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_FIRE_ORDER_VALENTINE_MP","ABILITY.BRITISH.QF_25LB_COORDINATED_SMOKE_SCREEN_BASE_MATT_TEST_VICTOR_TARGET_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_BASE_MP","ABILITY.BRITISH.QF_25LB_CREEPING_SMOKE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.QF_25LB_DIRECT_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_OVERWATCH_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_BASE_MP","ABILITY.BRITISH.QF_25LB_RAPID_RESPONSE_BARRAGE_MP","ABILITY.BRITISH.QF_25LB_SMOKE_SCREEN_BASE_MP","ABILITY.BRITISH.RAPID_ADVANCE","ABILITY.BRITISH.RAPID_RESPONSE_ARTILLERY","ABILITY.BRITISH.RECON_SECTION_SPRINT_MP","ABILITY.BRITISH.REINFORCE_THE_FRONT","ABILITY.BRITISH.REINFORCED_STRUCTURES","ABILITY.BRITISH.SAPPER_ANVIL_BOOBY_TRAP","ABILITY.BRITISH.SAPPER_FLAMETHROWERS","ABILITY.BRITISH.SAPPER_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.SAPPER_SALVAGE_WRECK","ABILITY.BRITISH.SEXTON_ARTILLERY_BARRAGE_CREEPING_VICTOR_TARGET_MP","ABILITY.BRITISH.SEXTON_DISPATCH_BRITISH","ABILITY.BRITISH.SEXTON_SPG_25_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_ARTILLERY_CREEPING_BARRAGE_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_AIRBURST_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SEXTON_SPG_25_PDR_SUPERCHARGE_BARRAGE_ABILITY_MP","ABILITY.BRITISH.SMOKE_ASSAULT","ABILITY.BRITISH.SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","ABILITY.BRITISH.STAND_FAST","ABILITY.BRITISH.STRAFING_RUN","ABILITY.BRITISH.SUPER_OVERWATCH_TEST","ABILITY.BRITISH.TANK_HUNTER","ABILITY.BRITISH.TOMMY_COVER_COMBAT_BONUS","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_HEAVY_MP","ABILITY.BRITISH.TOMMY_GAMMON_BOMB_MEDIUM_MP","ABILITY.BRITISH.TOMMY_HEAT_GRENADE_MP","ABILITY.BRITISH.TOMMY_MILLS_BOMB_MP","ABILITY.BRITISH.TOMMY_OFFICER_ARTILLERY","ABILITY.BRITISH.TOMMY_STAND_YOUR_GROUND","ABILITY.BRITISH.TUNE_UP_BONUS_MP","ABILITY.BRITISH.UEC_SELF_REPAIR","ABILITY.BRITISH.UEC_SELF_REPAIR_IMPROVED","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_LMG","ABILITY.BRITISH.UNIVERSAL_CARRIER_DROP_PIAT","ABILITY.BRITISH.UNIVERSAL_CARRIER_VICKERS_SUPPRESSION_MP","ABILITY.BRITISH.VALENTINE_ARTILLERY_SEXTON_VICTOR_TARGET_CONCENTRATION_BARRAGE_MP","ABILITY.BRITISH.VALENTINE_SMOKE_BARRAGE_MP","ABILITY.BRITISH.VICKERS_AIRDROP","ABILITY.BRITISH.VICKERS_HMG_VET_1_BONUS","UPG.BRITISH.ABILITY_LOCK_OUT_17_POUNDER_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_NOT_RELOADED","UPG.BRITISH.ABILITY_LOCK_OUT_AVRE_RELOADING","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_COUNTER_BARRAGE_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BASE_ARTILLERY_OVERWATCH_ABILITY_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_AA_MODE_ENABLED","UPG.BRITISH.ABILITY_LOCK_OUT_BOFORS_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_CUSTOM_LOADOUT_LAUNCH_AVAILABLE","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_HARD_LANDED","UPG.BRITISH.ABILITY_LOCK_OUT_GLIDER_NOT_STOPPED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_BARRAGE_ACTIVE","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_DEFAULT_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_1_LOADED","UPG.BRITISH.ABILITY_LOCK_OUT_MORTAR_EMPLACEMENT_SLOT_1_SPECIAL_2_LOADED","UPG.BRITISH.ADVANCED_ASSEMBLY","UPG.BRITISH.ADVANCED_ASSEMBLY_RESEARCH","UPG.BRITISH.ADVANCED_COVER","UPG.BRITISH.AEC_HE_ROUNDS_MP","UPG.BRITISH.AEC_HE_ROUNDS_UNLOCK_MP","UPG.BRITISH.AEC_RAPID_FIRE_MP","UPG.BRITISH.AEC_TARGET_OPTICS_MP","UPG.BRITISH.AEC_TARGET_TURRET_MP","UPG.BRITISH.AEC_TREAD_FIRST_SHOT_MP","UPG.BRITISH.AEC_TREAD_SECOND_SHOT_MP","UPG.BRITISH.ARTY_PIT_LOCKOUT_UPGRADE","UPG.BRITISH.ASSAULT","UPG.BRITISH.ASSAULT_ACTIVE","UPG.BRITISH.AVRE_MORTAR_RELOAD","UPG.BRITISH.BASE_BUILDING_BRACED_MP","UPG.BRITISH.BOYS_AT_RIFLE","UPG.BRITISH.BREN_LMG_UNLOCK_MP","UPG.BRITISH.BRITISH_TANK_COMMANDER","UPG.BRITISH.CAN_TUNE_UP_MP","UPG.BRITISH.COMMAND_HQ","UPG.BRITISH.COMMAND_VEHICLE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE","UPG.BRITISH.COMMAND_VEHICLE_ACTIVE_PLAYER","UPG.BRITISH.COMMANDO_RETREAT_SMOKE_DELAY","UPG.BRITISH.COMPANY_ANVIL_BUILDING_MP","UPG.BRITISH.COMPANY_ANVIL_MP","UPG.BRITISH.COMPANY_ANVIL_POINT_SIGHT_MP","UPG.BRITISH.COMPANY_HAMMER_BUILDING_MP","UPG.BRITISH.COMPANY_HAMMER_MP","UPG.BRITISH.COUNTER_BATTERY","UPG.BRITISH.COUNTER_BATTERY_MP","UPG.BRITISH.DEFENSIVE_OPERATIONS","UPG.BRITISH.EMPLACEMENT_DEACTIVATE_BRACE_DELAY","UPG.BRITISH.FIREFLY_TULIP_RELOAD","UPG.BRITISH.FIREFLY_TULIP_ROCKET","UPG.BRITISH.FLAMETHROWERS","UPG.BRITISH.FWD_HQ_RETREAT_MP","UPG.BRITISH.IMPROVED_FORTIFCATION","UPG.BRITISH.IMPROVED_FORTIFCATION_ASSSEMBLY_SQUAD","UPG.BRITISH.IMPROVED_FORTIFCATION_SQUAD","UPG.BRITISH.INFILTRATION_COMMANDOS","UPG.BRITISH.LAND_MATTRESS_FIRING","UPG.BRITISH.LAND_MATTRESS_LOADED_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_25LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_60LB_ROCKET","UPG.BRITISH.LAND_MATTRESS_LOADING_PHOS_ROCKET","UPG.BRITISH.PIAT","UPG.BRITISH.PIAT_UNLOCK_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_AEC_RESEARCH_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_BUILDING_MP","UPG.BRITISH.PLATOON_BOFORS_RESEARCH_MP","UPG.BRITISH.PRECISION_BARRAGE","UPG.BRITISH.QF_25LB_COORDINATED_FIRE_MP","UPG.BRITISH.QF_25LB_COUNTER_BATTERY_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_FIRE_SUPPORT_MP","UPG.BRITISH.QF_25LB_HE_SHELL_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_DELAY_MP","UPG.BRITISH.QF_25LB_RAPID_RESPONSE_MP","UPG.BRITISH.QF_25LB_SHELL_TOGGLE_ABILITY_DELAY_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_BASE_MP","UPG.BRITISH.QF_25LB_TACTICAL_SUPPORT_MP","UPG.BRITISH.QF_25LB_TARGET_ACQUISITION_MP","UPG.BRITISH.REINFORCED_STRUCTURE","UPG.BRITISH.SAPPER_FLAMETHROWER","UPG.BRITISH.SAPPERS_HEAVY_SQUAD_MP","UPG.BRITISH.SAPPERS_MINESWEEPER_UPGRADE_MP","UPG.BRITISH.SNIPER_BOYS_AT_RIFLE","UPG.BRITISH.TANK_HUNTER_ACTIVE","UPG.BRITISH.TECH_STRUCTURE_1_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_1_MP","UPG.BRITISH.TECH_STRUCTURE_2_CONSTRUCT_MP","UPG.BRITISH.TECH_STRUCTURE_2_MP","UPG.BRITISH.TOMMY_BOYS_AT_RIFLES","UPG.BRITISH.TOMMY_INCREASED_SQUAD_SIZE_MP","UPG.BRITISH.TOMMY_MEDICAL_SUPPLIES","UPG.BRITISH.TOMMY_MILLS_BOMB_MP","UPG.BRITISH.TOMMY_PYROTECHNICS_SUPPLIES","UPG.BRITISH.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_UPGRADE_MP","UPG.BRITISH.UNIVERSAL_CARRIER_WASP_PACKAGE_UPGRADE_MP","UPG.BRITISH.VALENTINE_OBSERVATION_MODE_MP","UPG.BRITISH.WEAPON_RACK_UNLOCK_MP","EBP.GERMAN.ANTITANK_88MM_PAK43_SANDBAGS","EBP.GERMAN.ARMORED_CAR_SDKFZ_222","EBP.GERMAN.ARMORED_CAR_SDKFZ_222_MP","EBP.GERMAN.ASSAULT_GRENADIERS_LEADER_MP","EBP.GERMAN.ASSAULT_GRENADIERS_MP","EBP.GERMAN.ASSAULT_OFFICER","EBP.GERMAN.ASSAULT_OFFICER_GRENADIERS_BODYGUARD_MP","EBP.GERMAN.ASSAULT_OFFICER_MP","EBP.GERMAN.ATGUN_CREW","EBP.GERMAN.ATGUN_CREW_MP","EBP.GERMAN.ATGUN88_CREW","EBP.GERMAN.ATGUN88_CREW_MP","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION","EBP.GERMAN.AXIS_BUNKER_STARTING_POSITION_MP","EBP.GERMAN.BEREICH_FESTUNG","EBP.GERMAN.BEREICH_FESTUNG_MP","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166","EBP.GERMAN.BRUMMBAR_STURMPANZER_IV_SDKFZ_166_MP","EBP.GERMAN.BUNKER","EBP.GERMAN.BUNKER_MP","EBP.GERMAN.BUNKER_OF_DEATH_MP","EBP.GERMAN.CARGO_PLANE","EBP.GERMAN.CARGO_PLANE_1","EBP.GERMAN.CARGO_PLANE_FUEL","EBP.GERMAN.CARGO_PLANE_MUNITIONS","EBP.GERMAN.DOLCH_AKTIONEN","EBP.GERMAN.DOLCH_AKTIONEN_MP","EBP.GERMAN.ELEFANT_SDKFZ_184","EBP.GERMAN.ELEFANT_SDKFZ_184_MP","EBP.GERMAN.FUEL_POST_GERMAN","EBP.GERMAN.FUEL_POST_GERMAN_MP","EBP.GERMAN.GERMAN_BASE_STAMPER","EBP.GERMAN.GERMAN_HQ","EBP.GERMAN.GERMAN_HQ_MP","EBP.GERMAN.GERMAN_HQ_WRECK","EBP.GERMAN.GERMAN_HQ_WRECK_MP","EBP.GERMAN.GERMAN_MEDIC","EBP.GERMAN.GERMAN_MEDIC_MP","EBP.GERMAN.GERMAN_MINE","EBP.GERMAN.GERMAN_MINE_MP","EBP.GERMAN.GERMAN_SANDBAG_FENCE","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR","EBP.GERMAN.GRANATEWERFER_34_81MM_MORTAR_MP","EBP.GERMAN.GRENADIERS","EBP.GERMAN.GRENADIERS_MP","EBP.GERMAN.GRENADIERS_SP","EBP.GERMAN.HACK_INVISI_PIONEER_MP","EBP.GERMAN.HALFTRACK_RIEGEL_43_MINE_MP","EBP.GERMAN.HALFTRACK_SDKFZ_251","EBP.GERMAN.HALFTRACK_SDKFZ_251_MP","EBP.GERMAN.HINTERE_PANZERWERK","EBP.GERMAN.HINTERE_PANZERWERK_MP","EBP.GERMAN.HINTERE_PANZERWERK_VORONEZH","EBP.GERMAN.HOWITZER_105MM_DUMMY","EBP.GERMAN.HOWITZER_105MM_LE_FH18","EBP.GERMAN.HOWITZER_105MM_LE_FH18_MP","EBP.GERMAN.HOWITZER_CREW","EBP.GERMAN.HOWITZER_CREW_MP","EBP.GERMAN.HULLDOWN_SANDBAG_WALL","EBP.GERMAN.HULLDOWN_SANDBAG_WALL_MP","EBP.GERMAN.INVISIBLE_RETREAT_POINT","EBP.GERMAN.LUFTWAFFE_OFFICER_TOW","EBP.GERMAN.M01_STUKA_DOGFIGHT","EBP.GERMAN.M01_STUKA_GROUND_ATTACK_FAST","EBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIER_MP","EBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","EBP.GERMAN.MG42_CREW","EBP.GERMAN.MG42_CREW_MP","EBP.GERMAN.MG42_CREW_SINGLE","EBP.GERMAN.MG42_HMG","EBP.GERMAN.MG42_HMG_ATTACK_GROUND","EBP.GERMAN.MG42_HMG_MP","EBP.GERMAN.MINE_FIELD","EBP.GERMAN.MINE_FIELD_BORDER","EBP.GERMAN.MINE_FIELD_BORDER_MP","EBP.GERMAN.MINE_FIELD_MINE","EBP.GERMAN.MINE_FIELD_MINE_M03","EBP.GERMAN.MINE_FIELD_MINE_MP","EBP.GERMAN.MINE_FIELD_MINE_TOW","EBP.GERMAN.MINE_FIELD_MP","EBP.GERMAN.MORTAR_CREW","EBP.GERMAN.MORTAR_CREW_MP","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7","EBP.GERMAN.MORTAR_LIGHT_HALFTRACK_250_7_MP","EBP.GERMAN.MUNITION_POST_GERMAN","EBP.GERMAN.MUNITION_POST_GERMAN_MP","EBP.GERMAN.OFFICER","EBP.GERMAN.OFFICER_MP","EBP.GERMAN.OFFICER_TOW_OCCUPATION","EBP.GERMAN.OPEL_BLITZ_SUPPLY_TRUCK_MP","EBP.GERMAN.OPEL_BLITZ_TRUCK","EBP.GERMAN.OSTRUPPEN_SOLDIER","EBP.GERMAN.OSTRUPPEN_SOLDIER_MP","EBP.GERMAN.OSTWIND_FLAK_PANZER","EBP.GERMAN.OSTWIND_FLAK_PANZER_MP","EBP.GERMAN.PAK40_75MM_AT_GUN","EBP.GERMAN.PAK40_75MM_AT_GUN_MP","EBP.GERMAN.PAK43_88MM_AT_GUN","EBP.GERMAN.PAK43_88MM_AT_GUN_MP","EBP.GERMAN.PANTHER_SDKFZ_171","EBP.GERMAN.PANTHER_SDKFZ_171_MP","EBP.GERMAN.PANZER_GRENADIERS","EBP.GERMAN.PANZER_GRENADIERS_MP","EBP.GERMAN.PANZER_III_MP","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161","EBP.GERMAN.PANZER_IV_COMMANDER_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161","EBP.GERMAN.PANZER_IV_SDKFZ_161_MP","EBP.GERMAN.PANZER_IV_SDKFZ_161_TUTORIAL","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1","EBP.GERMAN.PANZER_IV_SDKFZ_AUSF1_MP","EBP.GERMAN.PANZER_MG","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1","EBP.GERMAN.PANZERWERFER_SDKFZ_4_1_MP","EBP.GERMAN.PARADROP_SNIPER_SOLDIER_MP","EBP.GERMAN.PIONEER","EBP.GERMAN.PIONEER_MP","EBP.GERMAN.PUMA_EAST_GERMAN","EBP.GERMAN.REPAIR_PIONEER","EBP.GERMAN.REPAIR_PIONEER_MP","EBP.GERMAN.RIEGEL_43_MINE","EBP.GERMAN.RIEGEL_43_MINE_MP","EBP.GERMAN.SCHWERES_KRIEGSWERK","EBP.GERMAN.SCHWERES_KRIEGSWERK_MP","EBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","EBP.GERMAN.SLIT_TRENCH_GERMAN","EBP.GERMAN.SLIT_TRENCH_GERMAN_MP","EBP.GERMAN.SNIPER_COVER","EBP.GERMAN.SNIPER_DIGIN_COVER_MP","EBP.GERMAN.SNIPER_SOLDIER","EBP.GERMAN.SNIPER_SOLDIER_MP","EBP.GERMAN.STORMTROOPERS_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_COMMANDER_MP","EBP.GERMAN.STUG_III_E_SDKFZ_141_1_MP","EBP.GERMAN.STUG_III_G_SDKFZ_141_1","EBP.GERMAN.STUG_III_G_SDKFZ_141_1_MP","EBP.GERMAN.STUKA_AIR_RECON","EBP.GERMAN.STUKA_AIR_RECON_MP","EBP.GERMAN.STUKA_BOMBING_DIVE","EBP.GERMAN.STUKA_BOMBING_DIVE_MP","EBP.GERMAN.STUKA_BOMBING_RUN_SP","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB","EBP.GERMAN.STUKA_FRAGEMENTATION_BOMB_MP","EBP.GERMAN.STUKA_GROUND_ATTACK","EBP.GERMAN.STUKA_GROUND_ATTACK_LONG","EBP.GERMAN.STUKA_GROUND_ATTACK_M09","EBP.GERMAN.STUKA_GROUND_ATTACK_MP","EBP.GERMAN.STUKA_GROUND_ATTACK_WEST_AIRBORNE_ASSAULT","EBP.GERMAN.STUKA_INCENDIARY_BOMB","EBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY","EBP.GERMAN.STUKA_JU87_ANTI_TANK","EBP.GERMAN.STUKA_JU87_ANTI_TANK_M06","EBP.GERMAN.STUKA_JU87_ANTI_TANK_MP","EBP.GERMAN.STUKA_JU87_ANTI_TANK_SUPERIORITY","EBP.GERMAN.STUKA_SMOKE_BOMB","EBP.GERMAN.STUKA_SMOKE_BOMB_MP","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_01","EBP.GERMAN.SUPPLY_TRUCK_METAL_M_02","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_01","EBP.GERMAN.SUPPLY_TRUCK_MUNITIONS_CASE_AX_03","EBP.GERMAN.SUPPLY_TRUCK_SANDBAG_PILE_02","EBP.GERMAN.TACTICAL_BOMBER","EBP.GERMAN.TACTICAL_BOMBER_ACCURATE","EBP.GERMAN.TANK_TRAP","EBP.GERMAN.TELLER_MINE_MP","EBP.GERMAN.TIER1_MARKER","EBP.GERMAN.TIER2_MARKER","EBP.GERMAN.TIER3_MARKER","EBP.GERMAN.TIER4_MARKER","EBP.GERMAN.TIGER_ACE_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181","EBP.GERMAN.TIGER_SDKFZ_181_MP","EBP.GERMAN.TIGER_SDKFZ_181_SINGLEPLAYER_MISSION","EBP.GERMAN.TIGER_SDKFZ_181_TOW","EBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_MP","SBP.GERMAN.ASSAULT_GRENADIER_SQUAD_MP","SBP.GERMAN.ASSAULT_OFFICER_SQUAD","SBP.GERMAN.ASSAULT_OFFICER_SQUAD_MP","SBP.GERMAN.BRUMMBAR_SQUAD","SBP.GERMAN.BRUMMBAR_SQUAD_MP","SBP.GERMAN.CARGO_PLANE","SBP.GERMAN.CARGO_PLANE_FUEL","SBP.GERMAN.CARGO_PLANE_MUNITIONS","SBP.GERMAN.COMMAND_OFFICER_SQUAD_TOW","SBP.GERMAN.CONVOY_PIONEER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD","SBP.GERMAN.ELEFANT_TANK_DESTROYER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD","SBP.GERMAN.GRENADIER_SQUAD_M14","SBP.GERMAN.GRENADIER_SQUAD_MG42LMG_MP","SBP.GERMAN.GRENADIER_SQUAD_MP","SBP.GERMAN.GRENADIER_SQUAD_SP","SBP.GERMAN.HACK_INVISI_PIONEER_SQUAD_MP","SBP.GERMAN.HOWITZER_105MM_DUMMY_SQUAD","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY","SBP.GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.GERMAN.LUFTWAFFE_OFFICER_SQUAD_TOW","SBP.GERMAN.M01_MG42_HEAVY_MACHINE_GUN_SQUAD_SINGLE","SBP.GERMAN.M01_STUKA_DOGFIGHT","SBP.GERMAN.M01_STUKA_GROUND_ATTACK_SQUAD_FAST","SBP.GERMAN.MECHANIZED_250_HALFTRACK_GRENADIERS_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_MP","SBP.GERMAN.MECHANIZED_250_HALFTRACK_TOW","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD","SBP.GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD","SBP.GERMAN.MORTAR_250_HALFTRACK_SQUAD_MP","SBP.GERMAN.MORTAR_TEAM_81MM","SBP.GERMAN.MORTAR_TEAM_81MM_MP","SBP.GERMAN.OFFICER_SQUAD","SBP.GERMAN.OFFICER_SQUAD_MP","SBP.GERMAN.OPEL_BLITZ_SQUAD","SBP.GERMAN.OPEL_BLITZ_SUPPLY_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD","SBP.GERMAN.OSTRUPPEN_SQUAD_M14","SBP.GERMAN.OSTRUPPEN_SQUAD_MP","SBP.GERMAN.OSTRUPPEN_SQUAD_RESERVES_MP","SBP.GERMAN.OSTWIND_SQUAD","SBP.GERMAN.OSTWIND_SQUAD_MP","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD","SBP.GERMAN.PAK40_75MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD","SBP.GERMAN.PAK43_88MM_AT_GUN_SQUAD_MP","SBP.GERMAN.PANTHER_SQUAD","SBP.GERMAN.PANTHER_SQUAD_MP","SBP.GERMAN.PANZER_GRENADIER_SQUAD","SBP.GERMAN.PANZER_GRENADIER_SQUAD_M14","SBP.GERMAN.PANZER_GRENADIER_SQUAD_MP","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD","SBP.GERMAN.PANZER_IV_COMMAND_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD","SBP.GERMAN.PANZER_IV_SQUAD_MP","SBP.GERMAN.PANZER_IV_SQUAD_TUTORIAL","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD","SBP.GERMAN.PANZER_IV_STUBBY_SQUAD_MP","SBP.GERMAN.PANZER_MG_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD","SBP.GERMAN.PANZERWERFER_SQUAD_MP","SBP.GERMAN.PARTISAN_SQUAD_M13","SBP.GERMAN.PIONEER_SQUAD","SBP.GERMAN.PIONEER_SQUAD_MP","SBP.GERMAN.PIONEER_SQUAD_TOW","SBP.GERMAN.PUMA_EAST_GERMAN_MP","SBP.GERMAN.SCOUTCAR_SDKFZ222","SBP.GERMAN.SCOUTCAR_SDKFZ222_MP","SBP.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD","SBP.GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP","SBP.GERMAN.SNIPER_SQUAD","SBP.GERMAN.SNIPER_SQUAD_MP","SBP.GERMAN.STORMTROOPER_SQUAD_MP","SBP.GERMAN.STUG_III_E_COMMANDER_SQUAD_MP","SBP.GERMAN.STUG_III_E_SQUAD","SBP.GERMAN.STUG_III_E_SQUAD_MP","SBP.GERMAN.STUG_III_SQUAD","SBP.GERMAN.STUG_III_SQUAD_MP","SBP.GERMAN.STUKA_AIR_CAP_SQUAD","SBP.GERMAN.STUKA_AIR_CAP_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_M06","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ANTI_TANK_SQUAD_SUPERIORITY","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_LONG","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_M09","SBP.GERMAN.STUKA_GROUND_ATTACK_SQUAD_MP","SBP.GERMAN.STUKA_GROUND_ATTACK_WEST_GERMANS_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD","SBP.GERMAN.STUKA_GROUND_FRAGMENTATION_SQUAD_MP","SBP.GERMAN.STUKA_INCENDIARY_BOMB_SQUAD","SBP.GERMAN.STUKA_INCENDIARY_BOMB_VICTORY_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD","SBP.GERMAN.STUKA_SMOKE_SQUAD_MP","SBP.GERMAN.TACTICAL_BOMBERS","SBP.GERMAN.TACTICAL_BOMBERS_ACCURATE","SBP.GERMAN.TIGER_ACE_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD","SBP.GERMAN.TIGER_SQUAD_MP","SBP.GERMAN.TIGER_SQUAD_SP_A2_M02","SBP.GERMAN.TIGER_SQUAD_TOW","SBP.GERMAN.URBAN_ASSAULT_PANZER_GRENADIER_SQUAD_MP","ABILITY.GERMAN.AIR_DROPPED_MEDICAL_SUPPLIES","ABILITY.GERMAN.AIR_DROPPED_MUNITIONS","ABILITY.GERMAN.AMBUSH_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_AT","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_MORTAR","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_PIO","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UNLOCK","ABILITY.GERMAN.AMBUSH_CAMOUFLAGE_UPGRADE","ABILITY.GERMAN.ARMOR_COMMANDER","ABILITY.GERMAN.ASSAULT_FIELD_OFFICER","ABILITY.GERMAN.ASSAULT_GRENADIER_GRENADE","ABILITY.GERMAN.ASSAULT_GRENADIER_SPRINT_MP","ABILITY.GERMAN.ASSAULT_GRENADIERS","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION","ABILITY.GERMAN.ASSAULT_OFFICER_INSPIRATION_VET3","ABILITY.GERMAN.ASSAULT_OFFICER_VICTOR_TARGET","ABILITY.GERMAN.AXIS_SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.BLINDING_GRENADE","ABILITY.GERMAN.BLINDING_GRENADES_UNLOCK","ABILITY.GERMAN.BREAKTHROUGH","ABILITY.GERMAN.BRUMMBAR_BUNKER_BUSTER_MP","ABILITY.GERMAN.BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.BRUMMBAR_HOLD_FIRE_MP","ABILITY.GERMAN.CAMOUFLAGE_NETS","ABILITY.GERMAN.CAMOUFLAGE_NETS_UNLOCK","ABILITY.GERMAN.COMMAND_PANTHER_MARK_TARGET","ABILITY.GERMAN.CONVERT_TANK_WRECK","ABILITY.GERMAN.CONVERT_TANK_WRECK_UNLOCK","ABILITY.GERMAN.COUNTERATTACK_TACTICS","ABILITY.GERMAN.CRUSH_THE_POCKET","ABILITY.GERMAN.DEFENSIVE_FORTIFICATIONS","ABILITY.GERMAN.ELEFANT_CRITICAL_SHOTS_MP","ABILITY.GERMAN.ELEFANT_UNLOCK","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY","ABILITY.GERMAN.ELEPHANT_CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.GERMAN.FAST_MARCH","ABILITY.GERMAN.FATALITY_PANZERWERFER_BARRAGE","ABILITY.GERMAN.FATALITY_SMOKE_BARRAGE","ABILITY.GERMAN.FATALITY_STUKA_INCENDIARY_AIRSTRIKE","ABILITY.GERMAN.FATALITY_STUKA_SMOKE_STRAFE_AIRSTRIKE","ABILITY.GERMAN.FORWARD_REPAIR_STATION","ABILITY.GERMAN.GERMAN_HQ_PIONEER_CALL_IN","ABILITY.GERMAN.GERMAN_HULLDOWN_ABILITY","ABILITY.GERMAN.GERMAN_HULLDOWN_DISABLE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE","ABILITY.GERMAN.GERMAN_MORTAR_HOLD_FIRE_MP","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_CONVOY","ABILITY.GERMAN.GERMAN_SALVAGE_ABILITY_MP","ABILITY.GERMAN.GERMAN_WARNING_SMOKE","ABILITY.GERMAN.GOLIATH_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.GERMAN.GOLIATH_SELF_DESTRUCT_MP","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_ANTITANK_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_PANZERFAUST","ABILITY.GERMAN.GRENADIER_PANZERFAUST_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_MP","ABILITY.GERMAN.GRENADIER_RIFLE_GRENADE_ABILITY_TUTORIAL","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_INCENDIARY_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE","ABILITY.GERMAN.HALFTRACK_MORTAR_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE","ABILITY.GERMAN.HALFTRACK_SMOKE_BARRAGE_MP","ABILITY.GERMAN.HEAVY_AT_MINE_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_BARRAGE_VET3_ABILITY_MP","ABILITY.GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.HOWITZER_105MM_VICTORTARGET_BARRAGE_ABILITY_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.HOWITZER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.HOWITZER_DEFAULT_REFACE_ACTION","ABILITY.GERMAN.HULL_DOWN_UNLOCK","ABILITY.GERMAN.INFANTRY_MEDKITS","ABILITY.GERMAN.INFANTRY_MEDKITS_MP","ABILITY.GERMAN.JAEGER_INFANTRY_UNLOCK","ABILITY.GERMAN.JAEGER_INTERROGATION","ABILITY.GERMAN.LAY_HEAVY_AT_MINE","ABILITY.GERMAN.LIGHT_SUPPORT_ARTILLERY","ABILITY.GERMAN.MECHANIZED_ASSAULT_GROUP","ABILITY.GERMAN.MECHANIZED_GRENADIER_GROUP","ABILITY.GERMAN.MG42_CAMO_HOLD_FIRE_MP","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS","ABILITY.GERMAN.MG42_PHOSPHORUS_ROUNDS_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_MP","ABILITY.GERMAN.MORTAR_COUNTER_BARRAGE_WEAPON_MP","ABILITY.GERMAN.MORTAR_HALFTRACK","ABILITY.GERMAN.MORTAR_INCENDIARY_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_INCENDIARY_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE","ABILITY.GERMAN.MORTAR_TEAM_SMOKE_BARRAGE_MP","ABILITY.GERMAN.MUNITIONS_BLITZ","ABILITY.GERMAN.OFFICER_SMOKE_ARTILLERY","ABILITY.GERMAN.OPEL_SUPPLY_TERRITORY_CHECK","ABILITY.GERMAN.OSTRUPPEN","ABILITY.GERMAN.OSTRUPPEN_COVER_BONUS","ABILITY.GERMAN.OSTRUPPEN_RESERVES","ABILITY.GERMAN.PAK_43_EMPLACEMENT_UNLOCK","ABILITY.GERMAN.PAK40_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK40_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PAK43_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PAK43_TARGET_WEAK_POINT_MP","ABILITY.GERMAN.PANTHER_TIGER_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_COMMANDER_AURA_MP","ABILITY.GERMAN.PANZER_DEFENSIVE_SMOKE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_CAMPAIGN","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_GRENADE_MP","ABILITY.GERMAN.PANZER_GRENADIER_BUNDLED_TUTORIAL","ABILITY.GERMAN.PANZER_PANTHER_TIGER_DEFENSIVE_SMOKE_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_MP","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_BLITZKRIEG_TOW","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_FLARES_ABILITY","ABILITY.GERMAN.PANZER_PANTHER_TIGER_OSTWIND_REPAIR_TOW","ABILITY.GERMAN.PANZER_TACTICIAN_UNLOCK","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_ATTACK_MP","ABILITY.GERMAN.PANZERWERFER_COUNTER_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE","ABILITY.GERMAN.PANZERWERFER_ROCKET_BARRAGE_MP","ABILITY.GERMAN.PANZERWERFER_ROCKET_VICTORTARGET_BARRAGE_MP","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY","ABILITY.GERMAN.PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.GERMAN.PIONEER_FLAMETHROWER","ABILITY.GERMAN.PUMA_CRITICAL_SHOTS_MP","ABILITY.GERMAN.PUMA_DISPATCH","ABILITY.GERMAN.RAILWAY_GUN_ARTILLERY","ABILITY.GERMAN.REDISTRIBUTE_RESOURCES","ABILITY.GERMAN.RELIEF_INFANTRY","ABILITY.GERMAN.REMOVE_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.RESOURCE_REQUISITION","ABILITY.GERMAN.RETREAT_TO_FORWARD_HQ","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS","ABILITY.GERMAN.SCOUT_CAR_HALFTRACK_INFANTRY_AWARENESS_MP","ABILITY.GERMAN.SDKFZ_221_LIGHT_AT_HALFTRACK","ABILITY.GERMAN.SECTOR_ARTILLERY","ABILITY.GERMAN.SNIPER_INCENDIARY_ROUND_MP","ABILITY.GERMAN.SPRINT","ABILITY.GERMAN.STATIONARY_LOS_UNLOCK","ABILITY.GERMAN.STORMTROOPER_ASSAULT_AMBUSH_MP","ABILITY.GERMAN.STORMTROOPER_SPRINT_MP","ABILITY.GERMAN.STORMTROOPER_TANK_DETECTION_MP","ABILITY.GERMAN.STORMTROOPERS","ABILITY.GERMAN.STRATEGIC_BOMBING","ABILITY.GERMAN.STUG_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS","ABILITY.GERMAN.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOTS_MP","ABILITY.GERMAN.STUG_III_E","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.GERMAN.STUKA_AERIAL_SUPERIORITY_STRAFING_RUN","ABILITY.GERMAN.STUKA_AIR_RECON","ABILITY.GERMAN.STUKA_BOMBING_RUN_SP","ABILITY.GERMAN.STUKA_BOMBING_STRIKE","ABILITY.GERMAN.STUKA_BOMBING_STRIKE_TOW","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06","ABILITY.GERMAN.STUKA_CLOSE_AIR_M06_MP","ABILITY.GERMAN.STUKA_CLOSE_AIR_SUPPORT","ABILITY.GERMAN.STUKA_FRAGMENTATION_BOMB","ABILITY.GERMAN.STUKA_INCENDIARY_BOMBS","ABILITY.GERMAN.STUKA_SMOKE_BOMB","ABILITY.GERMAN.STUKA_STRAFING_RUN","ABILITY.GERMAN.SUPPLY_BREAK","ABILITY.GERMAN.SUPPLY_TRUCK","ABILITY.GERMAN.SUPPLY_TRUCK_LOCKDOWN","ABILITY.GERMAN.SUPPORT_TEAM_AMBUSH_CAMOUFLAGE","ABILITY.GERMAN.TANK_AWARENESS_UNLOCK","ABILITY.GERMAN.TANK_DETECTION_ABILITY_CONVOY","ABILITY.GERMAN.TIGER_ACE_CRITICAL_SHOTS_MP","ABILITY.GERMAN.TIGER_TANK","ABILITY.GERMAN.TIGER_TANK_ACE","ABILITY.GERMAN.TRENCH_UNLOCK","ABILITY.GERMAN.TROOP_TRAINING","ABILITY.GERMAN.URBAN_ASSAULT_GRENADIERS","ABILITY.GERMAN.URBAN_ASSAULT_SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE","ABILITY.GERMAN.URBAN_ASSAULT_SMOKE_GRENADE_2","ABILITY.GERMAN.WEHR_VEHICLE_HOLD_FIRE_MP","UPG.GERMAN.AERIAL_SUPERIORITY_RECON_PLANE","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.AERIAL_SUPERIORITY_STUKA_STRAFE","UPG.GERMAN.AIR_DROP_MEDICAL_SUPPLIES","UPG.GERMAN.AIR_DROP_RESOURCES","UPG.GERMAN.AMBUSH_CAMOU_PACKAGE","UPG.GERMAN.AMBUSH_CAMOUFLAGE","UPG.GERMAN.ARMOR_COMMANDER","UPG.GERMAN.ASSAULT_ARCHETYPE","UPG.GERMAN.ASSAULT_FIELD_OFFICER","UPG.GERMAN.ASSAULT_GRENADIERS","UPG.GERMAN.BATTLE_PHASE_2","UPG.GERMAN.BATTLE_PHASE_2_MP","UPG.GERMAN.BATTLE_PHASE_3","UPG.GERMAN.BATTLE_PHASE_3_MP","UPG.GERMAN.BATTLE_PHASE_4","UPG.GERMAN.BATTLE_PHASE_4_MP","UPG.GERMAN.BLINDING_GRENADES","UPG.GERMAN.BREAKTHROUGH","UPG.GERMAN.BRUMMBAR_TOP_GUNNER","UPG.GERMAN.BRUMMBAR_TOP_GUNNER_MP","UPG.GERMAN.BUNKER_COMMAND","UPG.GERMAN.BUNKER_COMMAND_MP","UPG.GERMAN.BUNKER_MEDIC_STATION","UPG.GERMAN.BUNKER_MEDIC_STATION_MP","UPG.GERMAN.BUNKER_MG42_ADDITION","UPG.GERMAN.BUNKER_MG42_ADDITION_MP","UPG.GERMAN.CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.CAMOUFLAGE_NETS","UPG.GERMAN.CAN_CAMOUFLAGE","UPG.GERMAN.COUNTERATTACK_TACTICS","UPG.GERMAN.CRUSH_THE_POCKET","UPG.GERMAN.DEFENSIVE_FORTIFICATIONS","UPG.GERMAN.ELEFANT_UNLOCK","UPG.GERMAN.FAST_MARCH","UPG.GERMAN.FESTUNG_ARCHETYPE","UPG.GERMAN.FORWARD_REPAIR_STATION","UPG.GERMAN.GRENADIER_MG42_LMG","UPG.GERMAN.GRENADIER_MG42_LMG_MP","UPG.GERMAN.HEAVY_AT_MINE","UPG.GERMAN.HOWITZER_105MM_EMPLACEMENT","UPG.GERMAN.HOWITZER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.HULL_DOWN","UPG.GERMAN.HULLDOWN_ACTIVATED","UPG.GERMAN.HULLDOWN_CONSTRUCTING","UPG.GERMAN.JAEGER_ARCHETYPE","UPG.GERMAN.JAEGER_LIGHT_INFANTRY","UPG.GERMAN.LIGHT_ARTILLERY_SUPPORT","UPG.GERMAN.LIGHT_INFANTRY_PACKAGE","UPG.GERMAN.LIGHT_INFANTRY_PANZERGREN_PACKAGE","UPG.GERMAN.MECHANIZED_GRENADIER_GROUP","UPG.GERMAN.MECHANIZED_GROUP","UPG.GERMAN.MG42_HOLDFIRE_CAMOUFLAGE_NET_ACTIVATED","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_COUNTER_BARRAGE_MP","UPG.GERMAN.MORTAR_HALFTRACK","UPG.GERMAN.MORTAR_HALFTRACK_250_UPGRADE","UPG.GERMAN.MORTAR_HALFTRACK_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.MORTAR_INCENDIARY_BARRAGE","UPG.GERMAN.MUNITION_BLITZ","UPG.GERMAN.OSTRUPPEN","UPG.GERMAN.OSTRUPPEN_RESERVES","UPG.GERMAN.PAK_43_EMPLACEMENT","UPG.GERMAN.PANTHER_TOP_GUNNER","UPG.GERMAN.PANTHER_TOP_GUNNER_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_1_SCHREK_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_SECOND_MP","UPG.GERMAN.PANZER_GRENADIER_PANZERSHRECK_ATW_ITEM_THIRD_MP","UPG.GERMAN.PANZER_TACTICIAN","UPG.GERMAN.PANZER_TOP_GUNNER","UPG.GERMAN.PANZER_TOP_GUNNER_MP","UPG.GERMAN.PANZERBUSCHE_39","UPG.GERMAN.PANZERBUSCHE_39_MP","UPG.GERMAN.PANZERWERFER_COUNTER_BARRAGE_COOLDOWN_MP","UPG.GERMAN.PIONEER_FLAMETHROWER","UPG.GERMAN.PIONEER_FLAMETHROWER_MP","UPG.GERMAN.PIONEER_MINESWEEPER","UPG.GERMAN.PIONEER_MINESWEEPER_MP","UPG.GERMAN.PUMA_DISPATCH","UPG.GERMAN.RAILWAY_ARTILLERY_SUPPORT","UPG.GERMAN.RECON_PLANE","UPG.GERMAN.REDISTRIBUTE_RESOURCES","UPG.GERMAN.RELIEF_INFANTRY","UPG.GERMAN.SDKFZ_222_20MM_GUN","UPG.GERMAN.SDKFZ_222_20MM_GUN_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE","UPG.GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP","UPG.GERMAN.SDKFZ_251_HALFTRACK_MOBILE_MEDIC_STATION_UPGRADE","UPG.GERMAN.SECTOR_ARTILLERY","UPG.GERMAN.SPRINT","UPG.GERMAN.STATIONARY_LOS_GAIN","UPG.GERMAN.STORMTROOPER_ANTITANK_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_ASSAULT_PACKAGE_MP","UPG.GERMAN.STORMTROOPER_PANZERSCHRECK_MP","UPG.GERMAN.STORMTROOPERS","UPG.GERMAN.STRATEGIC_BOMBING","UPG.GERMAN.STUG_III_E_UNLOCK","UPG.GERMAN.STUG_SHORT_BARREL","UPG.GERMAN.STUG_TOP_GUNNER","UPG.GERMAN.STUG_TOP_GUNNER_MP","UPG.GERMAN.STUKA_BOMBING_RUN_UPGRADE","UPG.GERMAN.STUKA_CLOSE_AIR_SUPPORT","UPG.GERMAN.STUKA_FLAME_STRIKE","UPG.GERMAN.STUKA_FRAGMENTATION_BOMB","UPG.GERMAN.STUKA_SMOKE_BOMB","UPG.GERMAN.STUKA_STRAFE","UPG.GERMAN.SUPPLY_BREAK","UPG.GERMAN.SUPPLY_TRUCK_ACTIVE","UPG.GERMAN.SUPPLY_TRUCK_EXIT","UPG.GERMAN.SUPPLY_TRUCK_FILL_STATE","UPG.GERMAN.SUPPLY_TRUCK_FULL","UPG.GERMAN.SUPPLY_TRUCK_LOCKDOWN","UPG.GERMAN.TANK_AWARENESS","UPG.GERMAN.TIGER_TANK","UPG.GERMAN.TIGER_TANK_ACE","UPG.GERMAN.TIGER_TANK_ACE_CALLIN_RESTRICTION","UPG.GERMAN.TIGER_TOP_GUNNER","UPG.GERMAN.TIGER_TOP_GUNNER_MP","UPG.GERMAN.TIGER_TOP_GUNNER_TOW","UPG.GERMAN.TOW_1941_GERMAN","UPG.GERMAN.TRENCH","UPG.GERMAN.TROOP_TRAINING","UPG.GERMAN.URBAN_ASSAULT_ARMOR_UPGRADE","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS","UPG.GERMAN.URBAN_ASSAULT_PANZER_GRENADIERS_FLAMETHROWER_MP","UPG.GERMAN.VEHICLES_OPTICS","UPG.GERMAN.XP1_GERMAN_DEMO_UPGRADE","EBP.PROXY.PROXY_MEDIC_MP","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_A","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_B","EBP.PROXY.PROXY_RIFLEMAN_SOLDIER_C","EBP.PROXY.PROXY_SNIPER_RECON_MP","SBP.PROXY.PROXY_HMG_SQUAD_MP","SBP.PROXY.PROXY_MECH_SQUAD_MP","SBP.PROXY.PROXY_RIFLEMEN_SQUAD_MP","SBP.PROXY.PROXY_SNIPER_SQUAD_MP","EBP.SOVIET._CIVILIAN_FEMALE","EBP.SOVIET._CIVILIAN_FEMALE_MP","EBP.SOVIET._CIVILIAN_MALE","EBP.SOVIET._CIVILIAN_MALE_MP","EBP.SOVIET.ANTI_PERSONNEL_MINES","EBP.SOVIET.ARTILLERY_203MM_B4","EBP.SOVIET.ATGUN53K_CREW","EBP.SOVIET.ATGUN53K_CREW_MP","EBP.SOVIET.ATGUNZIS_CREW","EBP.SOVIET.ATGUNZIS_CREW_MP","EBP.SOVIET.BARBED_WIRE_FENCE","EBP.SOVIET.BARBED_WIRE_FENCE_MP","EBP.SOVIET.BARBED_WIRE_FIELD","EBP.SOVIET.BARBED_WIRE_FIELD_MP","EBP.SOVIET.BARRACKS","EBP.SOVIET.BARRACKS_MP","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.BASE_CONSCRIPT_SOLDIER_MP","EBP.SOVIET.BOAT_01_ENTITY","EBP.SOVIET.CARGO_PLANE_SOVIET","EBP.SOVIET.COMBAT_ENGINEER","EBP.SOVIET.COMBAT_ENGINEER_MP","EBP.SOVIET.COMMISSAR","EBP.SOVIET.COMMISSAR_227","EBP.SOVIET.COMMISSAR_MP","EBP.SOVIET.COMMISSAR_OF_DEATH_227_MP","EBP.SOVIET.CONSCRIPT_SOLDIER","EBP.SOVIET.CONSCRIPT_SOLDIER_CONSCRIPT_BODYGUARD_MP","EBP.SOVIET.CONSCRIPT_SOLDIER_MP","EBP.SOVIET.DHSK_38_MACHINE_GUN","EBP.SOVIET.DHSK_38_MACHINE_GUN_MP","EBP.SOVIET.DSHK_WEAPON_CREW","EBP.SOVIET.DSHK_WEAPON_CREW_MP","EBP.SOVIET.FLARE_FIRE_MP","EBP.SOVIET.FLARE_MINE","EBP.SOVIET.FLARE_MINE_MP","EBP.SOVIET.FORWARD_HQ","EBP.SOVIET.GUARD_TROOPS","EBP.SOVIET.GUARD_TROOPS_ASSAULT_MP","EBP.SOVIET.GUARD_TROOPS_MP","EBP.SOVIET.HM_120_38_MORTAR","EBP.SOVIET.HM_120_38_MORTAR_MP","EBP.SOVIET.HOWITZER_CREW_SOVIET","EBP.SOVIET.HOWITZER_CREW_SOVIET_MP","EBP.SOVIET.HOWITZER_CREW203__SOVIET_MP","EBP.SOVIET.HQ","EBP.SOVIET.HQ_INVISIBLE_SP","EBP.SOVIET.HQ_MP","EBP.SOVIET.HQ_NO_WRECK","EBP.SOVIET.HQ_WRECK","EBP.SOVIET.HQ_WRECK_M06","EBP.SOVIET.HQ_WRECK_MP","EBP.SOVIET.IL_2_STURMOVIK","EBP.SOVIET.IL_2_STURMOVIK_ADVANCED_MP","EBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_MP","EBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_MP","EBP.SOVIET.IL_2_STURMOVIK_MP","EBP.SOVIET.IL_2_STURMOVIK_RECON","EBP.SOVIET.IL_2_STURMOVIK_RECON_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_MP","EBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP","EBP.SOVIET.IL_2_STURMOVIK_VICTORY_MP","EBP.SOVIET.IS_2_HEAVY_TANK","EBP.SOVIET.IS_2_HEAVY_TANK_MP","EBP.SOVIET.ISAKOVICH_A01_COMMANDER","EBP.SOVIET.ISAKOVICH_M06","EBP.SOVIET.ISU_152_SPG","EBP.SOVIET.ISU_152_SPG_MP","EBP.SOVIET.KATYUSHA_BM_13N","EBP.SOVIET.KATYUSHA_BM_13N_MP","EBP.SOVIET.KV_1","EBP.SOVIET.KV_1_COMMANDER_MP","EBP.SOVIET.KV_1_MP","EBP.SOVIET.KV_2","EBP.SOVIET.KV_2_MP","EBP.SOVIET.KV_2_TOW","EBP.SOVIET.KV_8","EBP.SOVIET.KV_8_MP","EBP.SOVIET.LIGHT_ANTI_VEHICLE_MINES","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_BASE_CONSCRIPT_SOLDIER_DURABLE","EBP.SOVIET.M01_CONSCRIPT_SOLDIER","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_DOCK","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS","EBP.SOVIET.M01_CONSCRIPT_SOLDIER_HARMLESS_DURABLE","EBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET","EBP.SOVIET.M01_IL2_DOGFIGHT","EBP.SOVIET.M01_MEDIC","EBP.SOVIET.M08_T_34_76_SMALLPATH","EBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT","EBP.SOVIET.M11_ANIA_SNIPER","EBP.SOVIET.M11_ISAKOVICH_RECON","EBP.SOVIET.M11_PARTISAN_TROOP_KAR98K","EBP.SOVIET.M11_PARTISAN_TROOP_NAGANT","EBP.SOVIET.M11_PARTISAN_TROOP_NOWEAPON","EBP.SOVIET.M11_SNIPER","EBP.SOVIET.M11_SNIPER_RECON","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN","EBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","EBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","EBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","EBP.SOVIET.M1937_53_K_45MM_AT_GUN","EBP.SOVIET.M1937_53_K_45MM_AT_GUN_MP","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3","EBP.SOVIET.M1942_76MM_DIVISIONAL_GUN_ZIS_3_MP","EBP.SOVIET.M3A1_SCOUT_CAR","EBP.SOVIET.M3A1_SCOUT_CAR_MP","EBP.SOVIET.M5_HALFTRACK","EBP.SOVIET.M5_HALFTRACK_ASSAULT_MP","EBP.SOVIET.M5_HALFTRACK_MP","EBP.SOVIET.MACHINE_GUN_NEST","EBP.SOVIET.MACHINE_GUN_NEST_MP","EBP.SOVIET.MAXIM_WEAPON_CREW","EBP.SOVIET.MAXIM_WEAPON_CREW_MP","EBP.SOVIET.MEDIC","EBP.SOVIET.MEDIC_MP","EBP.SOVIET.MORTAR_120MM_WEAPON_CREW_MP","EBP.SOVIET.MORTAR_WEAPON_CREW","EBP.SOVIET.MORTAR_WEAPON_CREW_MP","EBP.SOVIET.MOTORPOOL","EBP.SOVIET.MOTORPOOL_MP","EBP.SOVIET.OBSERVATION_POST_FUEL","EBP.SOVIET.OBSERVATION_POST_FUEL_MP","EBP.SOVIET.OBSERVATION_POST_MUNITION","EBP.SOVIET.OBSERVATION_POST_MUNITION_MP","EBP.SOVIET.PARTISAN_SNIPER","EBP.SOVIET.PARTISAN_TROOP_KAR98K","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2","EBP.SOVIET.PARTISAN_TROOP_KAR98K_2_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_MP","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_BD","EBP.SOVIET.PARTISAN_TROOP_KAR98K_TOW_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT","EBP.SOVIET.PARTISAN_TROOP_NAGANT_MP","EBP.SOVIET.PARTISAN_TROOP_NAGANT_TOW_MP","EBP.SOVIET.PARTISAN_TROOPS_ANTITANK","EBP.SOVIET.PARTISAN_TROOPS_LMG","EBP.SOVIET.PARTISAN_TROOPS_RIFLE","EBP.SOVIET.PARTISAN_TROOPS_SMG","EBP.SOVIET.PENAL_BATTALION_TROOPS","EBP.SOVIET.PENAL_BATTALION_TROOPS_MP","EBP.SOVIET.PM41_82MM_MORTAR","EBP.SOVIET.PM41_82MM_MORTAR_MP","EBP.SOVIET.REFUGEE_FEMALE","EBP.SOVIET.REFUGEE_FEMALE_MP","EBP.SOVIET.REFUGEE_MALE","EBP.SOVIET.REFUGEE_MALE_MP","EBP.SOVIET.REPAIR_ENGINEER","EBP.SOVIET.REPAIR_ENGINEER_MP","EBP.SOVIET.REPAIR_STATION_MP","EBP.SOVIET.SAND_BAG_SOVIET","EBP.SOVIET.SAND_BAG_SOVIET_MP","EBP.SOVIET.SAND_BAG_SOVIET_TUTORIAL","EBP.SOVIET.SHERMAN_SOVIET","EBP.SOVIET.SHOCK_TROOPS","EBP.SOVIET.SHOCK_TROOPS_MP","EBP.SOVIET.SNIPER","EBP.SOVIET.SNIPER_ATK_TARGET","EBP.SOVIET.SNIPER_MP","EBP.SOVIET.SNIPER_RECON","EBP.SOVIET.SNIPER_RECON_MP","EBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","EBP.SOVIET.SOVIET_BASE_STAMPER","EBP.SOVIET.SOVIET_MINE","EBP.SOVIET.SOVIET_MINE_M08","EBP.SOVIET.SOVIET_MINE_MP","EBP.SOVIET.SOVIET_MINE_SP","EBP.SOVIET.SOVIET_MINE_TOW","EBP.SOVIET.SOVIET_OFFICER","EBP.SOVIET.SOVIET_OFFICER_MP","EBP.SOVIET.STEAM_TRAIN","EBP.SOVIET.SU_76M","EBP.SOVIET.SU_76M_MP","EBP.SOVIET.SU_85","EBP.SOVIET.SU_85_MP","EBP.SOVIET.T_34_76","EBP.SOVIET.T_34_76_MP","EBP.SOVIET.T_34_85","EBP.SOVIET.T_34_85_MP","EBP.SOVIET.T_70M","EBP.SOVIET.T_70M_MP","EBP.SOVIET.TANK_DEPOT","EBP.SOVIET.TANK_DEPOT_MP","EBP.SOVIET.TANKTRAP","EBP.SOVIET.TOW_COLD_WEAETHER_GUARD_TROOPS","EBP.SOVIET.US6_TRUCK","EBP.SOVIET.US6_TRUCK_MP","EBP.SOVIET.WEAPON_SUPPORT_CENTER","EBP.SOVIET.WEAPON_SUPPORT_CENTER_MP","EBP.SOVIET.WIRE_FIELD","EBP.SOVIET.WIRE_FIELD_MP","EBP.SOVIET.ZIS_6_TRANSPORT","EBP.SOVIET.ZIS_6_TRANSPORT_MP","SBP.SOVIET.BASE_CONSCRIPT_SQUAD","SBP.SOVIET.BASE_CONSCRIPT_SQUAD_MP","SBP.SOVIET.BOAT_01","SBP.SOVIET.CARGO_PLANE_SOVIET","SBP.SOVIET.COMBAT_ENGINEER_SQUAD","SBP.SOVIET.COMBAT_ENGINEER_SQUAD_MP","SBP.SOVIET.COMMISSAR_227","SBP.SOVIET.COMMISSAR_SQUAD_BATTLE","SBP.SOVIET.COMMISSAR_SQUAD_MP","SBP.SOVIET.COMMISSAR_SQUAD_TOW","SBP.SOVIET.CONSCRIPT_SQUAD","SBP.SOVIET.CONSCRIPT_SQUAD_MP","SBP.SOVIET.CONSCRIPT_SQUAD_TUTORIAL","SBP.SOVIET.DSHK_38_HMG_SQUAD","SBP.SOVIET.DSHK_38_HMG_SQUAD_MP","SBP.SOVIET.GUARDS_TROOPS","SBP.SOVIET.GUARDS_TROOPS_ASSAULT_MP","SBP.SOVIET.GUARDS_TROOPS_M08","SBP.SOVIET.GUARDS_TROOPS_MP","SBP.SOVIET.HM_120_38_MORTAR_SQUAD","SBP.SOVIET.HM_120_38_MORTAR_SQUAD_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_ADVANCED_MP","SBP.SOVIET.IL_2_STUMOVIK_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ANTI_TANK_BOMB_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_MARK_VEHICLE_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_RECON_SQUAD_SP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SP_SQUAD_MP","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.IL_2_STURMOVIK_ROCKET_SQUAD_MP","SBP.SOVIET.IS_2","SBP.SOVIET.IS_2_MP","SBP.SOVIET.IS_2_TOW","SBP.SOVIET.ISU_152","SBP.SOVIET.ISU_152_MP","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD","SBP.SOVIET.KATYUSHA_BM_13N_SQUAD_MP","SBP.SOVIET.KV_1","SBP.SOVIET.KV_1_COMMANDER_MP","SBP.SOVIET.KV_1_MP","SBP.SOVIET.KV_1_SP","SBP.SOVIET.KV_2","SBP.SOVIET.KV_2_MP","SBP.SOVIET.KV_2_TOW","SBP.SOVIET.KV_2_TOW_BATTLE","SBP.SOVIET.KV_8","SBP.SOVIET.KV_8_MP","SBP.SOVIET.M01_CONSCRIPT_SQUAD_DOCKS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS","SBP.SOVIET.M01_CONSCRIPT_SQUAD_HARMLESS_DURABLE","SBP.SOVIET.M01_CONSCRIPT_SQUAD_WOUNDED","SBP.SOVIET.M01_IL_2_STURMOVIK_ROCKET_SQUAD","SBP.SOVIET.M01_IL2_DOGFIGHT","SBP.SOVIET.M01_MEDIC","SBP.SOVIET.M02_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M02_REFUGEE_SQUAD","SBP.SOVIET.M08_COMBAT_ENGINEER_SQUAD","SBP.SOVIET.M08_T_34_76_SQUAD_SMALLPATH","SBP.SOVIET.M08_TANK_BUSTER_CONSCRIPT_SQUAD","SBP.SOVIET.M11_ANIA_SNIPER_SQUAD","SBP.SOVIET.M11_ISAKOVICH_SQUAD","SBP.SOVIET.M11_PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.M11_PARTISAN_SQUAD_NOWEAPON","SBP.SOVIET.M11_SNIPER_TEAM","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD","SBP.SOVIET.M1910_MAXIM_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_COMMANDER_MP","SBP.SOVIET.M1931_203MM_B_4_HOWITZER_ARTILLERY_MP","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY","SBP.SOVIET.M1937_152MM_ML_20_ARTILLERY_MP","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD","SBP.SOVIET.M1937_53_K_45MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD","SBP.SOVIET.M1942_ZIS_3_76MM_AT_GUN_SQUAD_MP","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD","SBP.SOVIET.M3A1_SCOUT_CAR_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK__ASSAULT_SQUAD_MP","SBP.SOVIET.M5_HALFTRACK_SQUAD","SBP.SOVIET.M5_HALFTRACK_SQUAD_MP","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_GRANATEWERFER_34_81MM_MORTAR_MP","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG","SBP.SOVIET.PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG","SBP.SOVIET.PARTISAN_SQUAD_MG42_HMG_MP","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE","SBP.SOVIET.PARTISAN_SQUAD_NAGANT_RIFLE_MP","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR","SBP.SOVIET.PARTISAN_SQUAD_PM_82_41_MORTAR_MP","SBP.SOVIET.PARTISANS_LMG_MP","SBP.SOVIET.PARTISANS_PANZERSCHRECK_MP","SBP.SOVIET.PARTISANS_PTRS_MP","SBP.SOVIET.PARTISANS_RIFLE_MP","SBP.SOVIET.PARTISANS_SMG_MP","SBP.SOVIET.PENAL_BATTALION","SBP.SOVIET.PENAL_BATTALION_MP","SBP.SOVIET.PM_82_41_MORTAR_SQUAD","SBP.SOVIET.PM_82_41_MORTAR_SQUAD_MP","SBP.SOVIET.SHOCK_TROOPS","SBP.SOVIET.SHOCK_TROOPS_M11","SBP.SOVIET.SHOCK_TROOPS_MP","SBP.SOVIET.SNIPER_TEAM","SBP.SOVIET.SNIPER_TEAM_MALE","SBP.SOVIET.SNIPER_TEAM_MP","SBP.SOVIET.SOVIET_76MM_SHERMAN_MP","SBP.SOVIET.SOVIET_ALLIED_CARGO_PLANE","SBP.SOVIET.SOVIET_OFFICER_SQUAD","SBP.SOVIET.SOVIET_OFFICER_SQUAD_MP","SBP.SOVIET.STEAM_TRAIN","SBP.SOVIET.SU_76M","SBP.SOVIET.SU_76M_MP","SBP.SOVIET.SU_76M_TOW","SBP.SOVIET.SU_85","SBP.SOVIET.SU_85_MP","SBP.SOVIET.T_34_76_SQUAD","SBP.SOVIET.T_34_76_SQUAD_MP","SBP.SOVIET.T_34_85_ADVANCED_SQUAD_MP","SBP.SOVIET.T_34_85_SQUAD","SBP.SOVIET.T_34_85_SQUAD_MP","SBP.SOVIET.T_70M","SBP.SOVIET.T_70M_MP","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_AT","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_BASE","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MAXIM","SBP.SOVIET.TOW_BRIDGE_PARTISAN_SQUAD_MORTAR","SBP.SOVIET.TOW_COLD_WEATHER_GUARDS_TROOPS","SBP.SOVIET.TOW_PARTISAN_SQUAD_KAR98K_RIFLE_MP","SBP.SOVIET.TOW_PARTISAN_SQUAD_LMG_SQUAD","SBP.SOVIET.TOW_PARTISAN_SQUAD_MAXIM_HMG_MP","SBP.SOVIET.US6_TRUCK_SQUAD","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK","SBP.SOVIET.ZIS_6_TRANSPORT_TRUCK_MP","ABILITY.SOVIET.ALLIED_AIR_SUPPLIES","ABILITY.SOVIET.ANTI_PERSONNEL_MINES","ABILITY.SOVIET.ANTI_TANK_GRENADE","ABILITY.SOVIET.ANTI_TANK_GRENADE_ASSAULT","ABILITY.SOVIET.ANTI_TANK_GRENADE_MP","ABILITY.SOVIET.ANTI_TANK_GRENADE_NO_REQUIREMENTS_MP","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY","ABILITY.SOVIET.AT_76MM_HE_BARRAGE_ABILITY_MP","ABILITY.SOVIET.AT_GUN_AMBUSH_TACTICS","ABILITY.SOVIET.B4_203MM_BARRAGE","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_PRECISE_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VET3_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_COMMANDER_VICTORTARGET_MP","ABILITY.SOVIET.B4_203MM_BARRAGE_MP","ABILITY.SOVIET.B4_203MM_DIRECT_FIRE","ABILITY.SOVIET.B4_203MM_HOWITZER","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH","ABILITY.SOVIET.BASE_CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.BOMBARDMENT_FX","ABILITY.SOVIET.BOOBY_TRAP","ABILITY.SOVIET.BUTTON_VEHICLE","ABILITY.SOVIET.BUTTON_VEHICLE_MP","ABILITY.SOVIET.BUTTON_VEHICLE_TOW","ABILITY.SOVIET.CAMPAIGN_SHOCK_FIRE_SUPERIORITY","ABILITY.SOVIET.CMD_120MM_MORTAR_CREW","ABILITY.SOVIET.CMD_ADVANCED_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_AT_GUN_AMBUSH_TACTICS_MP","ABILITY.SOVIET.CMD_CONSCRIPT_ASSAULT_PACKAGE","ABILITY.SOVIET.CMD_CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CMD_CONSCRIPT_REPAIR_KIT","ABILITY.SOVIET.CMD_GUARD_TROOPS","ABILITY.SOVIET.CMD_IS2_HEAVY_TANK","ABILITY.SOVIET.CMD_ISU_152","ABILITY.SOVIET.CMD_KATYUSHA","ABILITY.SOVIET.CMD_KV_1_UNLOCK","ABILITY.SOVIET.CMD_KV_8_UNLOCK_MP","ABILITY.SOVIET.CMD_ML_20","ABILITY.SOVIET.CMD_PENAL_BATTALION","ABILITY.SOVIET.CMD_RADIO_INTERCEPT","ABILITY.SOVIET.CMD_SHOCK_TROOPS","ABILITY.SOVIET.CMD_SOVIET_INDUSTRY","ABILITY.SOVIET.CMD_T34_85_MEDIUM_TANK","ABILITY.SOVIET.CMD_VEHICLE_CREW_REPAIR_TRAINING","ABILITY.SOVIET.COMMISSAR_SQUAD_MP","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY","ABILITY.SOVIET.CONE_LOS_TOGGLE_ABILITY_MP","ABILITY.SOVIET.CONSCRIPT_ANTI_TANK_GRENADE_ASSAULT_MP","ABILITY.SOVIET.CONSCRIPT_DISPATCH_MP","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS","ABILITY.SOVIET.CONSCRIPT_EVASIVE_TACTICS_MP","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL","ABILITY.SOVIET.CONSCRIPT_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.CONSCRIPT_OORAH","ABILITY.SOVIET.CONSCRIPT_OORAH_MP","ABILITY.SOVIET.CONSCRIPT_PTRS_UPGRADE","ABILITY.SOVIET.DSHK_ARMOR_PIERCING","ABILITY.SOVIET.DSHK_MP","ABILITY.SOVIET.ENGINEER_SALVAGE_WRECK","ABILITY.SOVIET.FATALITY_FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FATALITY_INCENDIARY_ARTILLERY","ABILITY.SOVIET.FATALITY_KATYUSHA_ROCKETS","ABILITY.SOVIET.FEAR_PROPAGANDA_ARTILLERY","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE","ABILITY.SOVIET.FIELDCRAFT_TRIP_FLARE_MP","ABILITY.SOVIET.FIRE_ARTILLERY","ABILITY.SOVIET.FOR_MOTHER_RUSSIA_ABILITY","ABILITY.SOVIET.FORWARD_HQ","ABILITY.SOVIET.FRONTOVIKI_CONSCRIPT_DISPATCH","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE","ABILITY.SOVIET.GUARDS_THROW_DEFENSIVE_GRENADE_MP","ABILITY.SOVIET.HOLD_THE_LINE","ABILITY.SOVIET.IL_2_ANTI_TANK_BOMB_STRIKE","ABILITY.SOVIET.IL_2_ATTACK_STRAFE","ABILITY.SOVIET.IL_2_BOMBING_RUN_SP","ABILITY.SOVIET.IL_2_PRECISION_BOMB_STRIKE","ABILITY.SOVIET.IL_2_RECON","ABILITY.SOVIET.IL_2_RECON_SINGLEPASS_SP","ABILITY.SOVIET.IL_2_RECON_SP","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK","ABILITY.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","ABILITY.SOVIET.IL_2_SUPPORT","ABILITY.SOVIET.IL_2_SUPPORT_PRECISION_SP","ABILITY.SOVIET.IL_2_SUPPORT_SP","ABILITY.SOVIET.IS2_DISPATCH_SP","ABILITY.SOVIET.IS2_TANK_DEFENSIVE_WEAPON_MP","ABILITY.SOVIET.ISU_152_DISPATCH_SP","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY","ABILITY.SOVIET.ISU_152_PIERCING_SHOT_ABILITY_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.ISU152_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.ISU152_CONCRETE_PIERCING_ROUND_MP","ABILITY.SOVIET.KATUSHYA_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VET3_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_CREEPING_BARRAGE_MP","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE","ABILITY.SOVIET.KAYTUSHA_ROCKET_TRUCK_PRECISION_BARRAGE_MP","ABILITY.SOVIET.KV_2","ABILITY.SOVIET.KV_2_SEIGE_MODE","ABILITY.SOVIET.KV_8_FLAME_45MM_TOGGLE_MP","ABILITY.SOVIET.LIGHT_ANTI_VEHICLE_MINES","ABILITY.SOVIET.M_42_AT_GUN","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_KARK98K","ABILITY.SOVIET.M11_PARTISANS_DISPATCH_NAGANT","ABILITY.SOVIET.M11_SNIPER_DISPATCH02","ABILITY.SOVIET.M11_SNIPER_DISPATCH02_MP","ABILITY.SOVIET.M11_SNIPER_HOLD_FIRE","ABILITY.SOVIET.M3A1_M5_MOVING_ACCURACY_MP","ABILITY.SOVIET.M5_HALFTRACK_ASSAULT","ABILITY.SOVIET.M5_M3A1_OVERDRIVE","ABILITY.SOVIET.M5_M3A1_OVERDRIVE_MP","ABILITY.SOVIET.MANPOWER_BLITZ","ABILITY.SOVIET.MARK_VEHICLE","ABILITY.SOVIET.MAXIM_HMG_DISPATCH_SP","ABILITY.SOVIET.MERGE_ABILITY","ABILITY.SOVIET.MERGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_SLOW_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET_1_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VET3_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_ABILITY_VICTORTARGET_MP","ABILITY.SOVIET.ML_20_152MM_BARRAGE_PRECISON_ABILITY_MP","ABILITY.SOVIET.MORTAR_EXPLOSION_FX","ABILITY.SOVIET.MORTAR_EXPLOSION_FX_ICE","ABILITY.SOVIET.MORTAR_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_120MM_VET_MP","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM","ABILITY.SOVIET.MORTAR_PRECISION_BARRAGE_82MM_MP","ABILITY.SOVIET.NO_RETREAT_NO_SURRENDER","ABILITY.SOVIET.PARTISAN_DISPATCH","ABILITY.SOVIET.PARTISAN_DISPATCH_TOW","ABILITY.SOVIET.PARTISAN_MOLOTOV_COCKTAIL_MP","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_INFANTRY","ABILITY.SOVIET.PARTISANS_COMMANDER_ANTI_VEHICLE","ABILITY.SOVIET.PENAL_OORAH_MP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SINGLE_SP","ABILITY.SOVIET.PENAL_TROOP_DISPATCH_SP","ABILITY.SOVIET.RAPID_CONSCRIPTION","ABILITY.SOVIET.REPAIR_STATION","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE","ABILITY.SOVIET.RG_42_ANTI_PERSONNEL_GRENADE_MP","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE","ABILITY.SOVIET.RGD_1_SMOKE_GRENADE_MP","ABILITY.SOVIET.RGD_33_PARTISAN_GRENADE_MP","ABILITY.SOVIET.SALVAGE_KITS","ABILITY.SOVIET.SATCHEL_CHARGE_THROW_ABILITY_MP","ABILITY.SOVIET.SCORCHED_EARTH_POLICY","ABILITY.SOVIET.SCORCHED_EARTH_POLICY_MP","ABILITY.SOVIET.SHERMAN_SOVIET_DISPATCH","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_AP_SHELL_MP","ABILITY.SOVIET.SHERMAN76MM_AMMO_SWITCH_HE_SHELL_MP","ABILITY.SOVIET.SHOCK_TROOP_DISPATCH_SP","ABILITY.SOVIET.SHOCK_TROOP_SMOKE_GRENADES","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_120MM_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SMOKE_SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_DELAYED_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY","ABILITY.SOVIET.SNIPER_FIRE_FLARES_ABILITY_MP","ABILITY.SOVIET.SNIPER_HMG_SPRINT","ABILITY.SOVIET.SNIPER_HMG_SPRINT_MP","ABILITY.SOVIET.SNIPER_HOLD_FIRE","ABILITY.SOVIET.SNIPER_HOLD_FIRE_MP","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE","ABILITY.SOVIET.SNIPER_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY","ABILITY.SOVIET.SNIPER_SUPPRESSION_FIRE_ABILITY_MP","ABILITY.SOVIET.SOV_VEHICLE_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY","ABILITY.SOVIET.SOVIET_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.SOVIET.SOVIET_CAMO_HOLD_FIRE_MP","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_CONSCRIPT_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_HQ_ENGINEER_CALL_IN","ABILITY.SOVIET.SOVIET_INDUSTRY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY","ABILITY.SOVIET.SOVIET_REPAIR_ABILITY_MP","ABILITY.SOVIET.SOVIET_WAR_MACHINE_SP","ABILITY.SOVIET.SPY_NETWORK","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY","ABILITY.SOVIET.SU_76_BARRAGE_ABILITY_MP","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING","ABILITY.SOVIET.SU76_SU85_ZIS3_53K_ISU152_INFANTRY_TRACKING_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_120MM_VICTORTARGET_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_MP","ABILITY.SOVIET.SYNC_MORTAR_BARRAGE_VICTORTARGET_MP","ABILITY.SOVIET.T_34_RAMMING_ABILITY","ABILITY.SOVIET.T_34_RAMMING_ABILITY_MP","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY","ABILITY.SOVIET.T70_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.TANK_DETECTION_ABILITY","ABILITY.SOVIET.TANK_TRAPS","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY","ABILITY.SOVIET.TANK_VET_POINT_CAPTURE_ABILITY_MP","ABILITY.SOVIET.TO_THE_LAST_MAN_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_ABILITY_MP","ABILITY.SOVIET.VEHICLE_CREW_REPAIR_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_MP","ABILITY.SOVIET.VEHICLE_RECON_TOGGLE_VET2_MP","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT","UPG.SOVIET.ABILITY_LOCK_OUT_CONSCRIPT_MP","UPG.SOVIET.ALLIED_AIR_SUPPLIES","UPG.SOVIET.ANTI_PERSONNEL_MINES","UPG.SOVIET.ANTI_TANK_GUN_AMBUSH_TACTICS","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_AT_GRENADE_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_MOLOTOV_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK","UPG.SOVIET.BASE_CONSCRIPT_OORAH_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_REPAIR_UNLOCK_MP","UPG.SOVIET.BASE_CONSCRIPT_RIFLE_UNLOCK_MP","UPG.SOVIET.BOOBY_TRAP","UPG.SOVIET.CAMOUFLAGE_NET_ACTIVATED_SOVIET","UPG.SOVIET.COMMANDER_T34_85_MP","UPG.SOVIET.COMMISSAR_SQUAD","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE","UPG.SOVIET.CONSCRIPT_ASSAULT_PACKAGE_INGAME","UPG.SOVIET.CONSCRIPT_AT_GRENADE_ASSAULT","UPG.SOVIET.CONSCRIPT_DP_28_LMG_PACKAGE","UPG.SOVIET.CONSCRIPT_EVASIVE_TACTICS","UPG.SOVIET.CONSCRIPT_MOBILIZE_UNLOCK","UPG.SOVIET.CONSCRIPT_PTRS","UPG.SOVIET.CONSCRIPT_PTRS_PACKAGE","UPG.SOVIET.CONSCRIPT_REPAIR_KIT","UPG.SOVIET.DEMO_IL_2_STRAFING_RUN","UPG.SOVIET.DSHK_MACHINEGUN","UPG.SOVIET.ENGINEER_FLAMETHROWER","UPG.SOVIET.ENGINEER_FLAMETHROWER_MP","UPG.SOVIET.ENGINEER_MINESWEEPER","UPG.SOVIET.ENGINEER_MINESWEEPER_MP","UPG.SOVIET.ENGINEER_SALVAGE_KIT","UPG.SOVIET.ENGINEER_SALVAGE_KITS_UNLOCK","UPG.SOVIET.EVASIVE_TACTICS_IS_ON","UPG.SOVIET.FEAR_PROPAGANDA","UPG.SOVIET.FIRE_ARTILLERY","UPG.SOVIET.FOR_MOTHER_RUSSIA","UPG.SOVIET.FORWARD_HQ","UPG.SOVIET.FORWARD_HQ_AURA","UPG.SOVIET.GUARD_ARCHETYPE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE","UPG.SOVIET.GUARD_DP_28_LMG_PACKAGE_MP","UPG.SOVIET.GUARD_TROOPS","UPG.SOVIET.HM120_MORTAR_UNLOCK","UPG.SOVIET.HOLD_FIRE_SOVIET_CAMMO","UPG.SOVIET.HOLD_THE_LINE","UPG.SOVIET.HOWTIZER_203MM","UPG.SOVIET.HQ_ANTI_TANK_GRENADE","UPG.SOVIET.HQ_ANTI_TANK_GRENADE_MP","UPG.SOVIET.HQ_CONSCRIPT_REPAIR_KIT","UPG.SOVIET.HQ_HEALING_AURA","UPG.SOVIET.HQ_HEALING_AURA_M13","UPG.SOVIET.HQ_HEALING_AURA_MP","UPG.SOVIET.HQ_MOLOTOV_GRENADE_MP","UPG.SOVIET.IL_2_ANTI_TANK_BOMB","UPG.SOVIET.IL_2_BOMB_STRIKE","UPG.SOVIET.IL_2_RECON","UPG.SOVIET.IL_2_STURMOVIK_ATTACK","UPG.SOVIET.IL_2_STURMOVIK_ATTACK_ADVANCED","UPG.SOVIET.IL_2_SUPPORT","UPG.SOVIET.IS_2_SUPPORT","UPG.SOVIET.IS2_TOP_GUNNER","UPG.SOVIET.IS2_TOP_GUNNER_MP","UPG.SOVIET.ISAKOVICH_A01","UPG.SOVIET.ISU152_HE_ROUNDS","UPG.SOVIET.ISU152_TOP_GUNNER","UPG.SOVIET.ISU152_TOP_GUNNER_MP","UPG.SOVIET.ISU152_UNLOCK","UPG.SOVIET.KATYUSHA_UNLOCK","UPG.SOVIET.KV_1_UNLOCK_DEMO","UPG.SOVIET.KV_8_UNLOCK","UPG.SOVIET.KV1_UNLOCK","UPG.SOVIET.KV2_UNLOCK","UPG.SOVIET.LIGHT_ANTI_VEHICLE_MINES","UPG.SOVIET.M_42_AT_GUN","UPG.SOVIET.M3_HALFTRACK_ASSAULT","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE","UPG.SOVIET.M5_HALFTRACK_72K_AA_GUN_PACKAGE_MP","UPG.SOVIET.MANPOWER_BLITZ","UPG.SOVIET.MARK_VEHICLE","UPG.SOVIET.ML_20_HOWITZER_UNLOCK","UPG.SOVIET.NKVD_ARCHETYPE","UPG.SOVIET.ORDER_227_DISABLE","UPG.SOVIET.ORDER_227_LOCKDOWN","UPG.SOVIET.ORDER227","UPG.SOVIET.PARTISAN_COMMANDER_ANTIVEHICLE_TROOPS","UPG.SOVIET.PARTISAN_COMMANDER_TROOPS","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE","UPG.SOVIET.PARTISAN_HEALTH_UPGRADE_TANK_HUNTER","UPG.SOVIET.PARTISAN_TROOPS","UPG.SOVIET.PARTISAN_TROOPS_TOW","UPG.SOVIET.PENAL_BATTALION","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE","UPG.SOVIET.PENAL_BATTALION_FLAMETHROWER_PACKAGE_MP","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE","UPG.SOVIET.PPSH_41_SUB_MACHINE_GUN_UPGRADE_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_ASSAULT_MP","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_BETTER_BALANCED","UPG.SOVIET.PTRS_41_AT_RIFLE_PACKAGE_GUARD_TROOP_MP","UPG.SOVIET.RADIO_INTERCEPT","UPG.SOVIET.RAPID_CONSCRIPTION","UPG.SOVIET.REPAIR_BUNKER","UPG.SOVIET.SCORCHED_EARTH_POLICY","UPG.SOVIET.SCORCHED_EARTH_POLICY_MP","UPG.SOVIET.SHERMAN_SOVIET_DISPATCH","UPG.SOVIET.SHERMAN_SOVIET_TOP_GUNNER","UPG.SOVIET.SHOCK_ARCHETYPE","UPG.SOVIET.SHOCK_TROOPS","UPG.SOVIET.SHOCK_TROOPS_SP","UPG.SOVIET.SOVIET_GRENADES_LONG_TIMER","UPG.SOVIET.SOVIET_INDUSTRY","UPG.SOVIET.SPY_NETWORK","UPG.SOVIET.T34_85_ADVANCED_UNLOCK","UPG.SOVIET.T34_85_UNLOCK","UPG.SOVIET.TANK_DETECTION","UPG.SOVIET.TANK_RAID_ENABLED","UPG.SOVIET.TANK_TRAPS","UPG.SOVIET.TOW_1941_SOVIET","UPG.SOVIET.VEHICLE_SELF_REPAIR_TRAINING","EBP.WEST_GERMAN.ANTI_TANK_GUN_CREW_MP","EBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_223","EBP.WEST_GERMAN.ARTY_CREW_MP","EBP.WEST_GERMAN.ASSAULT_PIONEER_MP","EBP.WEST_GERMAN.ASSAULT_PIONEERS_HEAVY_MINE_MP","EBP.WEST_GERMAN.BASE_FLAK_GUN_MP","EBP.WEST_GERMAN.BASE_FLAK_SANDBAGS","EBP.WEST_GERMAN.BUNKER_WESTGERMAN_MP","EBP.WEST_GERMAN.FALLSCHIRMJAGER_MP","EBP.WEST_GERMAN.FIELD_OFFICER_MP","EBP.WEST_GERMAN.FLAK_EMPLACEMENT","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW","EBP.WEST_GERMAN.FLAK_EMPLACEMENT_CREW_BASE","EBP.WEST_GERMAN.GOLIATH_MP","EBP.WEST_GERMAN.GRANATWERFER_34_81MM_MORTAR_WG_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_17_FLAK_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_MP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_20_IR_SEARCHLIGHT_SP","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_MP_2","EBP.WEST_GERMAN.HALFTRACK_SDKFZ_251_WURFRAHMEN_40_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.HEAVY_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.HETZER_MP","EBP.WEST_GERMAN.HMG_CREW_MP","EBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_MINICHALLENGE","EBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","EBP.WEST_GERMAN.INFANTRY_SUPPORT_MP","EBP.WEST_GERMAN.INFANTRY_SUPPORT_PREPLACED","EBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON","EBP.WEST_GERMAN.JAGDPANZER_IV_SDKFZ_162_MP","EBP.WEST_GERMAN.JAGDTIGER_SDKFZ_186_MP","EBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","EBP.WEST_GERMAN.JU52_PLANE","EBP.WEST_GERMAN.KING_TIGER_SDKFZ_182_MP","EBP.WEST_GERMAN.KUBELWAGEN_TYPE_82_MP","EBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_MP","EBP.WEST_GERMAN.LIGHT_ARMOR_SUPPORT_PREPLACED","EBP.WEST_GERMAN.MED_SUPPLY_STASH","EBP.WEST_GERMAN.MG34_HMG_CREW","EBP.WEST_GERMAN.MG34_HMG_MP","EBP.WEST_GERMAN.MG42_HMG_WG_MP","EBP.WEST_GERMAN.MINE_FIELD_WESTGERMAN_MP","EBP.WEST_GERMAN.MORTAR_TEAM_CREW_MP","EBP.WEST_GERMAN.OBERSOLDATEN_MP","EBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_MP","EBP.WEST_GERMAN.OKW_HOWITZER_CREW_MP","EBP.WEST_GERMAN.OSTWIND_FLAK_PANZER_WEST_GERMAN_MP","EBP.WEST_GERMAN.PAK40_75MM_AT_GUN_WG_MP","EBP.WEST_GERMAN.PAK43_88MM_AT_GUN_WESTGERMAN_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_AUSF_G_MP","EBP.WEST_GERMAN.PANTHER_SDKFZ_171_COMMANDER_MP","EBP.WEST_GERMAN.PANZER_II_LUCHS_SDKFZ_123_MP","EBP.WEST_GERMAN.PANZER_IV_SDKFZ_AUSF_J_MP","EBP.WEST_GERMAN.PANZERFUSILIER_MP","EBP.WEST_GERMAN.PUMA_SDKFZ_234_MP","EBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.REINFORCED_BARBED_WIRE_TANK_TRAP_MP","EBP.WEST_GERMAN.SCHU_MINE_42_MP","EBP.WEST_GERMAN.SIPHON_STRUCTURE","EBP.WEST_GERMAN.STURMTIGER_606_38CM_RW_61_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_MP","EBP.WEST_GERMAN.SWS_HALFTRACK_SP","EBP.WEST_GERMAN.TERROR_OFFICER_GUARD_MP","EBP.WEST_GERMAN.TERROR_OFFICER_MP","EBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","EBP.WEST_GERMAN.VOLKSGRENADIER_MP","EBP.WEST_GERMAN.WEST_GERMAN_BASE_STAMPER","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_BARREL","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_CRATES_02","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_GENERATOR","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_01","EBP.WEST_GERMAN.WEST_GERMAN_COMMAND_POST_SANDBAG_02","EBP.WEST_GERMAN.WEST_GERMAN_HQ_MP","EBP.WEST_GERMAN.WEST_GERMAN_HQ_WRECK_MP","EBP.WEST_GERMAN.WEST_GERMAN_INVISI_REPAIR_STATION_MP","EBP.WEST_GERMAN.WG_BARBED_WIRE_FENCE_MP","EBP.WEST_GERMAN.WG_SANDBAG_FENCE_MP","SBP.WEST_GERMAN.ARMORED_CAR_SDKFZ_234_SQUAD_MP","SBP.WEST_GERMAN.ASSAULT_PIONEER_SQUAD_MP","SBP.WEST_GERMAN.COMMAND_KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.FALLSCHIRMJAGER_SQUAD_MP","SBP.WEST_GERMAN.FIELD_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.FLAK_EMPLACEMENT","SBP.WEST_GERMAN.FLAK_EMPLACEMENT_BASE","SBP.WEST_GERMAN.GOLIATH_MP","SBP.WEST_GERMAN.GRW34_81MM_MORTAR_SQUAD_MP","SBP.WEST_GERMAN.HETZER_SQUAD_MP","SBP.WEST_GERMAN.HOWITZER_105MM_LE_FH18_ARTILLERY_MINICHALLENGE","SBP.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE","SBP.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_SQUAD_MP","SBP.WEST_GERMAN.JAGDPANZER_TANK_DESTROYER_SQUAD_MP","SBP.WEST_GERMAN.JAGDTIGER_TD_SQUAD_MP","SBP.WEST_GERMAN.JU52_PARATROOPER_PLANE","SBP.WEST_GERMAN.JU52_PLANE","SBP.WEST_GERMAN.KING_TIGER_SQUAD_MP","SBP.WEST_GERMAN.KUBELWAGEN_SQUAD_MP","SBP.WEST_GERMAN.LE_IG_18_INF_SUPPORT_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG34_HEAVY_MACHINE_GUN_SQUAD_MP","SBP.WEST_GERMAN.MG42_HEAVY_MACHINE_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.MORTAR_250_HALFTRACK_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.OBERSOLDATEN_SQUAD_MP","SBP.WEST_GERMAN.OKW_HOWITZER_105MM_LE_FH18_ARTILLERY_MP","SBP.WEST_GERMAN.OSTWIND_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PAK40_75MM_AT_GUN_SQUAD_WG_MP","SBP.WEST_GERMAN.PAK43_88MM_AT_GUN_SQUAD_WESTGERMAN_MP","SBP.WEST_GERMAN.PANTHER_AUSF_G_SQUAD_MP","SBP.WEST_GERMAN.PANTHER_COMMANDER_SQUAD_MP","SBP.WEST_GERMAN.PANZER_II_LUCHS_SQUAD_MP","SBP.WEST_GERMAN.PANZER_IV_AUSF_J_BATTLE_GROUP_MP","SBP.WEST_GERMAN.PANZERFUSILIER_SQUAD_MP","SBP.WEST_GERMAN.RAKETENWERFER43_88MM_PUPPCHEN_ANTITANK_GUN_SQUAD_MP","SBP.WEST_GERMAN.SCOUTCAR_223_SQUAD","SBP.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SDKFZ_251_20_IR_SEARCHLIGHT_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.SDKFZ_251_HALFTRACK_SQUAD_MP_2","SBP.WEST_GERMAN.SDKFZ_251_WURFRAHMEN_40_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.STURMTIGER_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_MP","SBP.WEST_GERMAN.SWS_HALFTRACK_SQUAD_SP","SBP.WEST_GERMAN.TERROR_OFFICER_SQUAD_MP","SBP.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","SBP.WEST_GERMAN.VOLKSGRENADIER_SQUAD_MP","ABILITY.WEST_GERMAN.ADVANCED_SIPHON","ABILITY.WEST_GERMAN.AIRBORNE_ASSAULT","ABILITY.WEST_GERMAN.ARMOR_BLITZ_MP","ABILITY.WEST_GERMAN.ASSAULT_ARTILLERY","ABILITY.WEST_GERMAN.ASSAULT_MOVE_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_BARBED_WIRE_CUTTING_ABILITY_MP","ABILITY.WEST_GERMAN.ASSAULT_PIONEER_DROP_MEDPACK_ABILITY_MP","ABILITY.WEST_GERMAN.BARRAGE_ABILITY_MC","ABILITY.WEST_GERMAN.BASE_BUILDING_RETREAT_POINT_MP","ABILITY.WEST_GERMAN.BLENDKORPER_2H_WAFFEN_ELITE","ABILITY.WEST_GERMAN.BREAKTHROUGH_2","ABILITY.WEST_GERMAN.BREAKTHROUGH_TACTICS","ABILITY.WEST_GERMAN.BUILDING_SELF_DESTRUCT","ABILITY.WEST_GERMAN.BUILDING_SWITCH_FUEL","ABILITY.WEST_GERMAN.BUILDING_SWITCH_MUNITIONS","ABILITY.WEST_GERMAN.COMBAT_BLITZ_MP","ABILITY.WEST_GERMAN.COMMAND_MARK_VEHICLE","ABILITY.WEST_GERMAN.COMMAND_PANTHER","ABILITY.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","ABILITY.WEST_GERMAN.CONSTRUCT_ARMORED_INFANTRY_COMMAND","ABILITY.WEST_GERMAN.CONSTRUCT_INFANTRY_BARRACKS","ABILITY.WEST_GERMAN.CONSTRUCT_TANK_COMMAND","ABILITY.WEST_GERMAN.COORDINATED_BARRAGE","ABILITY.WEST_GERMAN.DEFENSIVE_MOVE_MP","ABILITY.WEST_GERMAN.EARLY_WARNING_FLARES","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_GREANDE","ABILITY.WEST_GERMAN.FALLSCHIRMJAEGER_PANZERFAUST","ABILITY.WEST_GERMAN.FALLSCHRIMJAEGER_CAMO","ABILITY.WEST_GERMAN.FATALITY_FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FATALITY_STUKA_FRAGMENTATION_AIRSTRIKE","ABILITY.WEST_GERMAN.FATALITY_STURMTIGER_SATURATION","ABILITY.WEST_GERMAN.FATALITY_WALKING_STUKA_BARRAGE","ABILITY.WEST_GERMAN.FIELD_DEFENSES","ABILITY.WEST_GERMAN.FLAK_EMPLACEMENT_SELF_REPAIR","ABILITY.WEST_GERMAN.FLAK_HALFTRACK_CONCEALING_SMOKE_MP","ABILITY.WEST_GERMAN.FLAME_HALTRACK_DISPATCH","ABILITY.WEST_GERMAN.FLARE_ARTILLERY","ABILITY.WEST_GERMAN.FLARE_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.FOR_THE_FATHERLAND","ABILITY.WEST_GERMAN.FORTIFY_POSITION_MP","ABILITY.WEST_GERMAN.FORWARD_RECIEVERS","ABILITY.WEST_GERMAN.GOLIATH_DISPATCH","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_ATTACK_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_COUNTER_BARRAGE_WEAPON_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_MORTAR_VICTORTARGET_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.GRW34_MORTAR_TEAM_SMOKE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_ABILITY_MP","ABILITY.WEST_GERMAN.HEAT_SHELLS_UNLOCK","ABILITY.WEST_GERMAN.HEAVY_FORTIFICATIONS","ABILITY.WEST_GERMAN.HETZER_DISPATCH","ABILITY.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_UNLOCK_OKW","ABILITY.WEST_GERMAN.HOWITZER_105MM_LONG_RANGE_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","ABILITY.WEST_GERMAN.HOWITZER_TOGGLE_FIRE_PM","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_GRENADE","ABILITY.WEST_GERMAN.INFILTRATION_TACTICS_UNLOCK","ABILITY.WEST_GERMAN.INFRARED_STG44","ABILITY.WEST_GERMAN.JAEGER_BOOBY_TRAP","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_CAMO","ABILITY.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","ABILITY.WEST_GERMAN.JAGDTIGER","ABILITY.WEST_GERMAN.JAGDTIGER_128MM_SUPPORTING_FIRE","ABILITY.WEST_GERMAN.JAGDTIGER_PIERCING_SHELL_ABILITY_MP","ABILITY.WEST_GERMAN.KING_TIGER_COMMAND_MODE_MP","ABILITY.WEST_GERMAN.KING_TIGER_DISPATCH","ABILITY.WEST_GERMAN.KUBELWAGEN_DETECTION_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.KUBELWAGEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_MP","ABILITY.WEST_GERMAN.LE_IG_18_HOLLOW_CHARGE_BARRAGE_WG_VET_MP","ABILITY.WEST_GERMAN.MG34_DISPATCH","ABILITY.WEST_GERMAN.MG34_PHOSPHORUS_ROUNDS_MP","ABILITY.WEST_GERMAN.MINESWEEPER_DEPLOY_MP","ABILITY.WEST_GERMAN.MINESWEEPER_PUT_AWAY_MP","ABILITY.WEST_GERMAN.MORTAR_HALFTRACK_WEST_GERMAN","ABILITY.WEST_GERMAN.OFFMAP_NEBEL_BARRAGE_MP","ABILITY.WEST_GERMAN.OKW_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_RATKEN_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OKW_SECTOR_ASSAULT","ABILITY.WEST_GERMAN.OKW_STUKA_AERIAL_SUPERIORITY_RECON","ABILITY.WEST_GERMAN.OKW_VEHICLE_HOLD_FIRE_MP","ABILITY.WEST_GERMAN.OSTWIND_DISPATCH","ABILITY.WEST_GERMAN.PAK40_CRITICAL_SHOTS_WG_MP","ABILITY.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIER_AT_RIFLE_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIER_GRENADE","ABILITY.WEST_GERMAN.PANZERFUSILIERS_DISPATCH","ABILITY.WEST_GERMAN.PANZERFUSILIERS_FLARE","ABILITY.WEST_GERMAN.PIONEER_STUN_GRENADE_MP","ABILITY.WEST_GERMAN.PIONEER_VOLKS_SALVAGE","ABILITY.WEST_GERMAN.PIONEER_VOLKS_THROUGH_SALVAGE","ABILITY.WEST_GERMAN.PUMA_AIMED_SHOT_MP","ABILITY.WEST_GERMAN.PUMA_SMOKE_SCREEN","ABILITY.WEST_GERMAN.PYRO_VOLKS","ABILITY.WEST_GERMAN.RADIO_SILENCE","ABILITY.WEST_GERMAN.RAKETEN_IN_COVER_AUTO_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RAKTEN_CAMOUFLAGE_MP","ABILITY.WEST_GERMAN.RECON_STANCE_MP","ABILITY.WEST_GERMAN.RECOUP_LOSSES","ABILITY.WEST_GERMAN.REFUEL_TANK_WG_SP","ABILITY.WEST_GERMAN.ROCKET_BARRAGE","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_DEFENS","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON","ABILITY.WEST_GERMAN.SDKFZ_251_17_FLAK_HALFTRACK_DEPLOY_WEAPON_VET","ABILITY.WEST_GERMAN.SIGNAL_FLAGS","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_ADVANCED_MP","ABILITY.WEST_GERMAN.SIPHON_INCREASE_RESOURCES_MP","ABILITY.WEST_GERMAN.SPEARHEAD_MP","ABILITY.WEST_GERMAN.STALKER_STATE_MP","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_ATTACK","ABILITY.WEST_GERMAN.STURMTIGER_380MM_ROCKET_RELOAD","ABILITY.WEST_GERMAN.STURMTIGER_DISPATCH","ABILITY.WEST_GERMAN.STURMTIGER_NAHVW_CLOSE_RANGE_GRENADE_TARGETED","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_GAIN_RESOURCECS","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_SETUP","ABILITY.WEST_GERMAN.SUPPORT_TRUCK_TARGET_UNSETUP","ABILITY.WEST_GERMAN.SUPPRESSIVE_FIRE_MP","ABILITY.WEST_GERMAN.SWS_HALFTRACK_DISPATCH","ABILITY.WEST_GERMAN.SWS_HALFTRACK_FORWARD_RECEIVERS","ABILITY.WEST_GERMAN.SWS_HALFTRACK_INTERVAL_DISPATCH","ABILITY.WEST_GERMAN.TANK_COMMANDER_UNLOCK","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_MP","ABILITY.WEST_GERMAN.TANK_THROW_DEFENSIVE_GRENADE_UNLOCK_MP","ABILITY.WEST_GERMAN.TERROR_OFFICER","ABILITY.WEST_GERMAN.TERROR_OFFICER_FORCE_RETREAT","ABILITY.WEST_GERMAN.TERROR_OFFICER_MARK_TARGET","ABILITY.WEST_GERMAN.THROUGH_SALVAGE","ABILITY.WEST_GERMAN.TIGER_PROWL_JAGDPANZER_MP","ABILITY.WEST_GERMAN.TIGER_PROWL_MP","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","ABILITY.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY_THROW_ABILITY_MP","ABILITY.WEST_GERMAN.VALIANT_ASSAULT","ABILITY.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR_UNLOCK","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.VEHICLE_EMERGENCY_REPAIR_ABILITY_SWS_MP","ABILITY.WEST_GERMAN.VOLKS_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_FIRE_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_GRENADE_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_MP","ABILITY.WEST_GERMAN.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","ABILITY.WEST_GERMAN.WAFFEN_BOOBY_TRAP_CAPTURE_POINT","ABILITY.WEST_GERMAN.WAFFEN_ELITE_BUNDLED_ASSAULT_GRENADE","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_MP","ABILITY.WEST_GERMAN.WALKING_STUKA_ROCKET_BARRAGE_CREEPING_NAPALM_MP","ABILITY.WEST_GERMAN.WEST_GERMAN_REPAIR_ABILITY_MP","ABILITY.WEST_GERMAN.WG_HQ_PIONEER_CALL_IN","ABILITY.WEST_GERMAN.ZEROING_ARTILLERY","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_NOT_RELOADED","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_STURMTIGER_RELOADING","UPG.WEST_GERMAN.ABILITY_LOCK_OUT_SWS_TRUCK","UPG.WEST_GERMAN.ADVANCED_SIPHON","UPG.WEST_GERMAN.AERIAL_SUPERIORITY_STUKA_RECON_PLANE","UPG.WEST_GERMAN.AIRBORNE_ASSAULT","UPG.WEST_GERMAN.ASSAULT_ARTILLERY","UPG.WEST_GERMAN.ASSAULT_PIONEER_COMBAT_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_PANZERSCHRECK_UPGRADE","UPG.WEST_GERMAN.ASSAULT_PIONEER_REPAIR_UPGRADE","UPG.WEST_GERMAN.BREAKTHROUGH_2","UPG.WEST_GERMAN.BREAKTHROUGH_TACTICS","UPG.WEST_GERMAN.BUILDING_1","UPG.WEST_GERMAN.BUILDING_2","UPG.WEST_GERMAN.BUILDING_3","UPG.WEST_GERMAN.COMMAND_PANTHER","UPG.WEST_GERMAN.COMMAND_ROYAL_TIGER_DISPATCH","UPG.WEST_GERMAN.CONSTRUCT_BASE_BUILDING_UPGRADE","UPG.WEST_GERMAN.FALLSCHRIMJAGER_DISPATCH","UPG.WEST_GERMAN.FIELD_DEFENSES","UPG.WEST_GERMAN.FIRST_SWS_HALFTRACK_LOCKOUT","UPG.WEST_GERMAN.FLAK_GUN_UNLOCK_UPGRADE","UPG.WEST_GERMAN.FLAK_PANZER_DEFENSIVES","UPG.WEST_GERMAN.FLAK_PANZER_IS_SETUP","UPG.WEST_GERMAN.FLAME_HALFTRACK_DISPATCH","UPG.WEST_GERMAN.FLAMMPANZER_38T_HETZER","UPG.WEST_GERMAN.FLARE_ARTILLERY","UPG.WEST_GERMAN.FOR_THE_FATHER_LAND","UPG.WEST_GERMAN.FORWARD_RECIEVERS","UPG.WEST_GERMAN.GOLIATH_REMOTE_CONTROLLED_BOMB","UPG.WEST_GERMAN.HEALING_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.HEAT_SHELLS","UPG.WEST_GERMAN.HEAVY_FORTIFICATIONS","UPG.WEST_GERMAN.HOWITZER_105MM_EMPLACEMENT_OKW","UPG.WEST_GERMAN.HOWITZER_105MM_OFFMAP_BARRAGE","UPG.WEST_GERMAN.INFILTRATION_TACTICS","UPG.WEST_GERMAN.INFRARED_STG44","UPG.WEST_GERMAN.JAEGER_LIGHT_INFANTRY_RECON_DISPATCH","UPG.WEST_GERMAN.JAGDTIGER","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_AP_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ABILITY_BARRAGE_LOCK_OUT","UPG.WEST_GERMAN.JAGDTIGER_ENGINE_IMPROVEMENTS_I_MP","UPG.WEST_GERMAN.KING_TIGER_TOP_GUNNER_MP","UPG.WEST_GERMAN.MEDIC_HEALING_MP","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_0_USES_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_1_USE_REMAINING","UPG.WEST_GERMAN.MEDICAL_SUPPLIES_2_USES_REMAINING","UPG.WEST_GERMAN.MG34_DISPATCH","UPG.WEST_GERMAN.OKW_SECTOR_ASSAULT","UPG.WEST_GERMAN.OSTWIND_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_GROUP_DISPATCH","UPG.WEST_GERMAN.PANZER_IV_SIDE_SKIRTS_MP","UPG.WEST_GERMAN.PANZERFUSILER_DISPATCH","UPG.WEST_GERMAN.PANZERFUSILIER_G43","UPG.WEST_GERMAN.PANZERSCHRECK_UNLOCKED","UPG.WEST_GERMAN.PYRO_VOLKS","UPG.WEST_GERMAN.RADIO_SILENCE","UPG.WEST_GERMAN.RECOUP_ACTIVE","UPG.WEST_GERMAN.RECOUP_LOSS","UPG.WEST_GERMAN.REPAIR_ENGINEERS_MP","UPG.WEST_GERMAN.REPAIR_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.RESOURCE_POINT_SIPHON","UPG.WEST_GERMAN.RETREAT_POINT_UNLOCK_UPGRADE","UPG.WEST_GERMAN.ROCKET_BARRAGE","UPG.WEST_GERMAN.SDKFZ_251_HALFTRACK_FLAMMPANZERWAGEN_UPGRADE_MP_2","UPG.WEST_GERMAN.SIGNAL_FLAGS","UPG.WEST_GERMAN.SIPHON_LOCK_OUT","UPG.WEST_GERMAN.STURMTIGER_DISPATCH","UPG.WEST_GERMAN.SWS_INTERVAL_UNLOCK","UPG.WEST_GERMAN.SWS_STARTING_DISPATCH_UNLOCK","UPG.WEST_GERMAN.TANK_COMMANDER","UPG.WEST_GERMAN.TANK_COMMANDER_UNLOCK","UPG.WEST_GERMAN.TANK_GRENADE","UPG.WEST_GERMAN.TERROR_OFFICER","UPG.WEST_GERMAN.THROUGH_SALVAGE","UPG.WEST_GERMAN.URBAN_ASSAULT_LIGHT_INFANTRY","UPG.WEST_GERMAN.VALIANT_ASSAULT","UPG.WEST_GERMAN.VEHICLE_CRITICAL_REPAIR","UPG.WEST_GERMAN.VOLKS_FLAMETHROWER_MP","UPG.WEST_GERMAN.VOLKS_STG44_UPGRADE","UPG.WEST_GERMAN.WAFFEN_INFRARED_STG44","UPG.WEST_GERMAN.WAFFEN_MG34_LMG_MP","UPG.WEST_GERMAN.WARNING_FLARES","UPG.WEST_GERMAN.WG_HETZER_TOP_GUNNER_MP","UPG.WEST_GERMAN.WG_PANTHER_TOP_GUNNER_MP","UPG.WEST_GERMAN.ZEROING_ARTILLERY","ABILITY.GLOBAL.ARMY_ITEM_GLOBAL_COVER_TRAINING","ABILITY.GLOBAL.ARMY_ITEM_SOVIET_NOT_GONNA_DIE_LIKE_THIS","ABILITY.GLOBAL.AT_76MM_SINGLE_SHOT_ACCURATE","ABILITY.GLOBAL.BLIZZARD_EFFECT","ABILITY.GLOBAL.BLIZZARD_EFFECT_DEEP_SNOW_CAMO","ABILITY.GLOBAL.BLIZZARD_EFFECT_MORTARS","ABILITY.GLOBAL.BLIZZARD_EFFECT_VEHICLE","ABILITY.GLOBAL.BLIZZARD_HOWITZER","ABILITY.GLOBAL.BONUS_0","ABILITY.GLOBAL.BONUS_1","ABILITY.GLOBAL.BONUS_2","ABILITY.GLOBAL.BONUS_2B","ABILITY.GLOBAL.BONUS_3","ABILITY.GLOBAL.BONUS_3B","ABILITY.GLOBAL.BONUS_3C","ABILITY.GLOBAL.BONUS_BACK","ABILITY.GLOBAL.BREAKTHROUGH_TOW","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION","ABILITY.GLOBAL.CAMOUFLAGE_CONSTRUCTION_ANIA","ABILITY.GLOBAL.CAMPAIGN_STUKA_STRAFE_LONG","ABILITY.GLOBAL.CAPTURE_SPEED","ABILITY.GLOBAL.COMMISSAR_SHOT_227","ABILITY.GLOBAL.COMMISSAR_SHOT_227_ENEMY","ABILITY.GLOBAL.COMMISSAR_SQUAD_TOW","ABILITY.GLOBAL.CONVOY_BUILDBARRICADE","ABILITY.GLOBAL.COVER_ANIMATION_TEST","ABILITY.GLOBAL.DIG_OUT_OF_MUD","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_AT","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_HMG","ABILITY.GLOBAL.DISPATCH_BRIDGE_PARTISAN_MORTAR","ABILITY.GLOBAL.DROP_WEAPONS","ABILITY.GLOBAL.FATALITY_BULLSEYE","ABILITY.GLOBAL.FATALITY_COORDINATED_MORTAR_BOMBARDMENT","ABILITY.GLOBAL.FATALITY_DEFAULT","ABILITY.GLOBAL.FATALITY_HOWITZER_105MM_BARRAGE","ABILITY.GLOBAL.FATALITY_HOWITZER_240MM","ABILITY.GLOBAL.FATALITY_LIGHT_SUPPORT_ARTILLERY","ABILITY.GLOBAL.FATALITY_PROTOTYPE","ABILITY.GLOBAL.FATALITY_RAILWAY_GUN_ARTILLERY","ABILITY.GLOBAL.FATALITY_TIME_ON_TARGET_ARTILLERY","ABILITY.GLOBAL.FIRE_DOT","ABILITY.GLOBAL.FLAME_THROWER_ABILITY","ABILITY.GLOBAL.FORWARD_REPAIR_STATION_TOW","ABILITY.GLOBAL.FROZEN_ICON_TEST","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING","ABILITY.GLOBAL.GARRISONED_SQUAD_FACING_UNSET","ABILITY.GLOBAL.HEAL_IN_COVER","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT","ABILITY.GLOBAL.HOWITZER_105MM_BARRAGE_SHORT_PRECISE","ABILITY.GLOBAL.HOWITZER_105MM_DUMMY","ABILITY.GLOBAL.IL_2_ATTACK_STRAFE_HMG","ABILITY.GLOBAL.IL_2_PRECISION_BOMB_STRIKE_TOW","ABILITY.GLOBAL.KV_2_TOW","ABILITY.GLOBAL.LIGHT_ARTILLERY_M10","ABILITY.GLOBAL.M01_IL2_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_IL2_PRECISION_BOMB_STRIKE","ABILITY.GLOBAL.M01_MEDIC_HEAL","ABILITY.GLOBAL.M01_MEDIC_HEAL_CONSTANT","ABILITY.GLOBAL.M01_MORTAR_SINGLE_PRECISE_HARMLESS","ABILITY.GLOBAL.M01_SPRINT_OUT_OF_COMBAT","ABILITY.GLOBAL.M01_STUKA_BOMBING_STRIKE","ABILITY.GLOBAL.M01_STUKA_DOGFIGHT_PASS","ABILITY.GLOBAL.M01_STUKA_STRAFE_FAST","ABILITY.GLOBAL.M01_WOUNDED","ABILITY.GLOBAL.M11_LIGHT_FIRE","ABILITY.GLOBAL.M12_HOWITZER_BARRAGE","ABILITY.GLOBAL.M14_GUARD_TROOP_DISPATCH","ABILITY.GLOBAL.M14_OFF_MAP_SMOKE_BARRAGE","ABILITY.GLOBAL.M24_ANTI_TANK_BUNDLED_GRENADE","ABILITY.GLOBAL.MECHANIZED_ASSAULT_GROUP_TOW","ABILITY.GLOBAL.MOLTKE_DET_PACK","ABILITY.GLOBAL.MUDDY_POINT","ABILITY.GLOBAL.NO_RETREAT_NO_SURRENDER_TOW","ABILITY.GLOBAL.OFF_MAP_ARTILLERY","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_FAST","ABILITY.GLOBAL.OFF_MAP_ARTILLERY_PERCISE_SEP","ABILITY.GLOBAL.OFF_MAP_ARTY_SINGLE_SHOT_INSTANT","ABILITY.GLOBAL.OFFICER_AIR_RECON","ABILITY.GLOBAL.OFFICER_CLOSE_AIR_SUPPORT","ABILITY.GLOBAL.OFFICER_FRAGMENTATION_BOMB","ABILITY.GLOBAL.PARTISAN_REPAIR_ABILITY","ABILITY.GLOBAL.PARTISAN_SPRINT","ABILITY.GLOBAL.PREVENT_SUPPRESSION","ABILITY.GLOBAL.PRODUCTION_SPEED","ABILITY.GLOBAL.RADIO_TOWER_REVEAL","ABILITY.GLOBAL.RAILWAY_GUN_ARTILLERY_SINGLE","ABILITY.GLOBAL.READY_UP","ABILITY.GLOBAL.REV_OUT_OF_MUD","ABILITY.GLOBAL.SHOCK_TROOP_FULL_AUTO","ABILITY.GLOBAL.SP_DROP_WEAPONS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_HARMLESS","ABILITY.GLOBAL.SP_OFF_MAP_ARTY_REAL","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR","ABILITY.GLOBAL.SP_SINGLE_SHOT_MORTAR_M01","ABILITY.GLOBAL.SP_SPRINT","ABILITY.GLOBAL.SP_SPRINT_TOGGLEABLE","ABILITY.GLOBAL.SPY_NETWORK_TOW","ABILITY.GLOBAL.STUKA_BOMBING_STRIKE_W_SMOKE","ABILITY.GLOBAL.STUKA_FAKE_BOMBING_STRIKE","ABILITY.GLOBAL.STUKA_FAKE_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE","ABILITY.GLOBAL.STUKA_STRAFE_M02","ABILITY.GLOBAL.STUKA_STRAFE_M09","ABILITY.GLOBAL.TANK_BUSTER_CONSCRIPT_DISPATCH","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV2","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_KV8","ABILITY.GLOBAL.TOW_AIRFIELD_DISPATCH_T34","ABILITY.GLOBAL.TOW_AIRFIELD_STUKA_BOMBING_RUN","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_IS2","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KAT","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_KV1","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_SU76","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T34","ABILITY.GLOBAL.TOW_STALINGRAD_DISPATCH_T70","ABILITY.GLOBAL.TRANSFER_ORDERS","ABILITY.GLOBAL.TROOP_TRAINING_TOW","ABILITY.GLOBAL.TUNSTEN_SHELLS_TOW","ABILITY.GLOBAL.WARMING_ANIMATION_TEST","ABILITY.GLOBAL.WE_SURRENDER","SLOT_ITEM.AEC_TARGET_OPTICS_SLOT_ITEM_MP","SLOT_ITEM.AEC_TARGET_TURRET_SLOT_ITEM_MP","SLOT_ITEM.AEC_TREAD_SHOT_MP","SLOT_ITEM.AEF_CALLIOPE_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_SHERMAN_DUMMY_SLOT_ITEM","SLOT_ITEM.AEF_VEHICLE_ENTERS_INFANTRY_BUFF_APPLIED","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_MORTAR_UI_ITEM","SLOT_ITEM.AEF_WHITE_PHOSPHOROUS_SHELLS_UI_ITEM","SLOT_ITEM.AEF_WRENCH_ICON_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_PORTRAIT_ICON_ITEM","SLOT_ITEM.AMBUSH_CAMO_SLOT_ITEM","SLOT_ITEM.AMBUSH_CAMO_VISUAL_ITEM","SLOT_ITEM.ARMOR_BLITZ_ITEM","SLOT_ITEM.ASSAULT_ENGINEER_FLAMETHROWER","SLOT_ITEM.ASSAULT_MOVE_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM","SLOT_ITEM.AT_76MM_HE_ROUND_ITEM_MP","SLOT_ITEM.AVRE_CREW_SHRAPNEL_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.AVRE_RELOAD_ACTIVE","SLOT_ITEM.AVRE_SPIGOT_MORTAR_MP","SLOT_ITEM.AVRE_SPIGOT_MORTAR_VET_3_MP","SLOT_ITEM.AXIS_ASSAULT_GRENADIER_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE","SLOT_ITEM.AXIS_BLINDING_GRENADE_MP","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE","SLOT_ITEM.AXIS_PANZER_GRENADIER_GRENADE_MP","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN","SLOT_ITEM.AXIS_PG_GRENADE_CAMPAIGN_MP","SLOT_ITEM.AXIS_PG_GRENADE_TUTORIAL","SLOT_ITEM.BAZOOKA_MP","SLOT_ITEM.BLENDKORPER_2H_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.BOFOR_40MM_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.BOFORS_HOLD_FULL","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_MP","SLOT_ITEM.BOFORS_SUPPRESSIVE_BARRAGE_ROUND_ITEM_VICTOR_TARGET_MP","SLOT_ITEM.BOOT_STOMP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_MP","SLOT_ITEM.BOYS_ANTI_TANK_RIFLE_SNIPER_MP","SLOT_ITEM.BOYS_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.BREN_LMG_ICON_DUMMY","SLOT_ITEM.BRIT_17_POUNDER_FLARE_MP","SLOT_ITEM.BRIT_17_POUNDER_HOLD_FULL","SLOT_ITEM.BRIT_17_POUNDER_PIERCING_SHOT_MP","SLOT_ITEM.BRIT_COMMAND_VEHICLE_ITEM","SLOT_ITEM.BRIT_CROC_DUMMY_SLOT_ITEM","SLOT_ITEM.BRIT_EMPLACEMENT_BRACED","SLOT_ITEM.BRIT_EMPLACEMENT_HOLD_FIRE","SLOT_ITEM.BRIT_FIREFLY_TULIP_SLOT_ITEM","SLOT_ITEM.BRIT_HOLD_THE_LINE","SLOT_ITEM.BRIT_MORTAR_PIT_HOLD_FULL","SLOT_ITEM.BRIT_REINFORCE_THE_FRONT","SLOT_ITEM.BRIT_SNIPER_BOYS_ANTI_TANK_CRITICAL_SHOT_MP","SLOT_ITEM.BRIT_UNIT_LOCK_OUT_SLOT_ITEM","SLOT_ITEM.BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.CAPTAIN_GARRISON_ITEM","SLOT_ITEM.CAPTURE_INTEL_SLOTITEM","SLOT_ITEM.CARRIER_SUPPRESS_ACTIVE","SLOT_ITEM.CAVALRY_AT_SATCHEL_ITEM","SLOT_ITEM.CENTUAR_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.CHURUCHILL_SUPPORT_NEGATE","SLOT_ITEM.COMET_SMOKE_SHELL_SHOT_MP","SLOT_ITEM.COMET_SMOKE_SHELL_WP_SHOT_MP","SLOT_ITEM.COMMAND_PANTHER_AURA","SLOT_ITEM.COMMANDO_BREN_LMG_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_MP","SLOT_ITEM.COMMANDO_DE_LISLE_CARBINE_SLOT_MP","SLOT_ITEM.COMMANDO_N69_GRENADE_MP","SLOT_ITEM.COMMANDO_THOMPSON_MP","SLOT_ITEM.COMMANDO_THOMPSON_SLOT_MP","SLOT_ITEM.COMMISSAR_SHOT_227","SLOT_ITEM.COMMISSAR_SHOT_227_ENEMY","SLOT_ITEM.CONSCRIPT_MOLOTOV","SLOT_ITEM.CONSCRIPT_MOLOTOV_MP","SLOT_ITEM.COVER_SMOKE_GRENADE_ITEM","SLOT_ITEM.DEF_MOVE_ITEM","SLOT_ITEM.DOUBLE_SWEEP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MOVING_NO_PRONE_MP","SLOT_ITEM.DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2","SLOT_ITEM.DSHK38_TURRET_MOUNTED_IS2_MP","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152","SLOT_ITEM.DSHK38_TURRET_MOUNTED_ISU152_MP","SLOT_ITEM.DUMMY_FORTIFIED__SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM","SLOT_ITEM.DUMMY_SLOT_ITEM_QUAD","SLOT_ITEM.ELEFANT_CRITICAL_SHOT_MP","SLOT_ITEM.ENGINEER_SALVAGE_KIT_DUMMY","SLOT_ITEM.FLAK_HALFTRACK_ICON_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ACCESSORY","SLOT_ITEM.FLAMETHROWER_ROKS3_FAKE","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM","SLOT_ITEM.FLAMETHROWER_ROKS3_ITEM_MP","SLOT_ITEM.FOR_THE_FATHERLAND_ACTIVE","SLOT_ITEM.FRWD_HQ_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.FWD_HQ_EMPLACEMENT_SUPPORT","SLOT_ITEM.G43_SNIPER_INCENDIARY_SLOT_ITEM_MP","SLOT_ITEM.GENERIC_MG34_LMG_MP","SLOT_ITEM.GRENADIER_MG42_LMG","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.GRENADIER_MG42_LMG_MP","SLOT_ITEM.GRENADIER_PANZERFAUST","SLOT_ITEM.GRENADIER_PANZERFAUST_MP","SLOT_ITEM.GROUND_ATTACK_SNIPER_RIFLE_ITEM","SLOT_ITEM.GUARD_TROOP_ASSAULT_PACKAGE","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_LEFT_MP","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT","SLOT_ITEM.HALFTRACK_FLAMETHROWER_RIGHT_MP","SLOT_ITEM.HETZER_FLAMETHROWER_ITEM_MP","SLOT_ITEM.HULLDOWN_SLOT_ITEM","SLOT_ITEM.INFRARED_SQUAD_SETUP","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM","SLOT_ITEM.ISU_PIERCING_SHOT_ROUND_ITEM_MP","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM","SLOT_ITEM.JAEGER_G43_RIFLE_ITEM_MP","SLOT_ITEM.JAEGER_LIGHT_RECON_G43","SLOT_ITEM.JAEGER_PANZERGREN_G43_RIFLE_ITEM_MP","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_ANTITANK_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.KAR_98K_RIFLE_GRENADE_SLOT_ITEM_TUTORIAL","SLOT_ITEM.KV_8_45MM_GUN_ITEM","SLOT_ITEM.KV_8_ATO_41_FLAMETHROWER_ITEM_MP","SLOT_ITEM.KWK_20MM_222_ARMORED_CAR_MP","SLOT_ITEM.LAND_MATTRESS_25LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_60LB_ROCKET","SLOT_ITEM.LAND_MATTRESS_EMPTY","SLOT_ITEM.LAND_MATTRESS_PHOSPHORUS_ROCKET","SLOT_ITEM.LAND_MATTRESS_ROCKET_MARKER","SLOT_ITEM.LEE_ENFIELD_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.LIEUTENANT_GARRISON_ITEM","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_HEAVY_VEHICLE","SLOT_ITEM.LIGHT_AT_MINE_RECENTLY_HIT_LIGHT_VEHICLE","SLOT_ITEM.M01_CONSCRIPT_MOSIN_NAGANT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_LEFT","SLOT_ITEM.M15A1_AA_MODE_ACTIVATED_MAIN_GUN","SLOT_ITEM.M17_RIFLE_GRENADE_SLOT_ITEM_MP","SLOT_ITEM.M1919A6_LMG_ICON_DUMMY","SLOT_ITEM.M1C_GARAND","SLOT_ITEM.M1C_PATHFINDER_GARAND","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ANTI_TANK_ITEM_MP","SLOT_ITEM.M23_SMOKE_STREAM_GRENADE_ITEM_MP","SLOT_ITEM.M24_ANTI_TANK_GRENADIER_GRENADE","SLOT_ITEM.M2HB_50CAL_SHERMAN","SLOT_ITEM.M2HB_TURRET_MOUNTED_M8_MP","SLOT_ITEM.M2HB_TURRET_MOUNTED_SHERMAN_MP","SLOT_ITEM.M5_STUART_DAMAGE_ENGINE_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M5_STUART_SHELL_SHOCK_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_CANISTER_SHOT_SLOT_ITEM_MP","SLOT_ITEM.M8_GREYHOUND_RECON_ACTIVATED","SLOT_ITEM.MAJOR_GARRISON_ITEM","SLOT_ITEM.MG34_PINTLE_HETZER","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR","SLOT_ITEM.MG42_TURRET_MOUNTED_BRUMMBAR_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_KING_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PANTHER_WG_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV","SLOT_ITEM.MG42_TURRET_MOUNTED_PZIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV","SLOT_ITEM.MG42_TURRET_MOUNTED_STUGIV_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_MP","SLOT_ITEM.MG42_TURRET_MOUNTED_TIGER_TOW","SLOT_ITEM.MINESWEEPER","SLOT_ITEM.MORTAR_FLARE_MP","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM","SLOT_ITEM.MOSIN_NAGANT_SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_MP","SLOT_ITEM.OBERSOLDATEN_MG34_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.OBERSOLDATEN_MP44_INFARED","SLOT_ITEM.OPEL_SUPPLY_SLOT_ITEM","SLOT_ITEM.PAK40_CRITICAL_SHOT_MP","SLOT_ITEM.PAK43_CRITICAL_SHOT_MP","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM","SLOT_ITEM.PANZER_GRENADIER_MP44_ITEM_MP","SLOT_ITEM.PANZERBUSCHE_39","SLOT_ITEM.PANZERBUSCHE_39_MP","SLOT_ITEM.PANZERFUISILIER_FLARE_MP","SLOT_ITEM.PANZERFUSILIER_AT_RIFLE_GRENADE","SLOT_ITEM.PANZERFUSILIER_G43","SLOT_ITEM.PANZERFUSILIER_GRENADE","SLOT_ITEM.PANZERSHRECK","SLOT_ITEM.PANZERSHRECK_AT_WEAPON_ITEM","SLOT_ITEM.PANZERSHRECK_DESTROY_ENGINE","SLOT_ITEM.PANZERSHRECK_MP","SLOT_ITEM.PANZERSHRECK_SLOT1","SLOT_ITEM.PANZERSHRECK_SLOT1_MP","SLOT_ITEM.PANZERSHRECK_SLOT2","SLOT_ITEM.PANZERSHRECK_SLOT2_MP","SLOT_ITEM.PARADROP_REINFORCE_ITEM","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MOVING_NO_PRONE_MP","SLOT_ITEM.PARATROOPER_M1919A6_LMG_MP","SLOT_ITEM.PARATROOPER_MK2_GRENADE_MP","SLOT_ITEM.PARATROOPER_THOMPSON_DUMMY","SLOT_ITEM.PARATROOPER_THOMPSON_MP","SLOT_ITEM.PARTISAN_DP_28_LIGHT_MACHINE_GUN_PACKAGE_MP","SLOT_ITEM.PARTISAN_MG42_LMG_MP","SLOT_ITEM.PATHFINDERS_SNIPER_ITEM","SLOT_ITEM.PENAL_TROOP_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.PERSHING_HVAP_PIERCING_ITEM_MP","SLOT_ITEM.PIAT_SPIGOT_MORTAR_MP","SLOT_ITEM.PIONEER_FLAMETHROWER","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY","SLOT_ITEM.PIONEER_FLAMETHROWER_ABILITY_MP","SLOT_ITEM.PIONEER_FLAMETHROWER_MP","SLOT_ITEM.PIONEER_STUN_GRENADE_MP","SLOT_ITEM.PM_AEF_OFFENSIVE_PUNCH_ITEM","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_DUMMY_ITEM_MP","SLOT_ITEM.PPSH41_ASSAULT_PACKAGE_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_CONSCRIPT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_ASSAULT_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_GUARD_TROOP_MP","SLOT_ITEM.PTRS_41_ANTI_TANK_RIFLE_PARTISAN_TROOP_MP","SLOT_ITEM.PUMA_AIMED_SHOT_MP","SLOT_ITEM.PUMA_CRITICAL_SHOT_MP","SLOT_ITEM.RANGER_PANZERSHRECK_MP","SLOT_ITEM.REAR_ECHELON_RIFLE_GRENADE_ACTIVATED","SLOT_ITEM.REAR_ECHELON_RIFLE_VOLLEY_FIRE","SLOT_ITEM.RECOUP_ACTIVE","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM","SLOT_ITEM.RGD_1_SMOKE_GRENADE_ITEM_MP","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_LONGTIMER","SLOT_ITEM.RGD_33_SLEEVED_GRENADE_ITEM_MP","SLOT_ITEM.RIFLEMAN_AT_RIFLE_GRENADE","SLOT_ITEM.RIFLEMEN_30_CAL","SLOT_ITEM.RIFLEMEN_FLARE","SLOT_ITEM.RIFLEMEN_M1918_BAR_MP","SLOT_ITEM.RIFLEMEN_MK2_GRENADE_MP","SLOT_ITEM.RIFLEMEN_TRAINING_DUMMY_CARBINE","SLOT_ITEM.RIFLEMEN_TRAINING_SATCHEL_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM","SLOT_ITEM.ROKS_2_FLAMETHROWER_ITEM_MP","SLOT_ITEM.RPG_40_ANTI_TANK_GRENADE_MP","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE","SLOT_ITEM.RPG_43_ANTI_TANK_GRENADE_MP","SLOT_ITEM.SAPPER_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SAPPER_STUN_GRENADE_MP","SLOT_ITEM.SAPPER_VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.SELF_REPAIR_DUMMY_SLOT_ITEM","SLOT_ITEM.SHERMAN_BATTLE_GROUP_ITEM_MP","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE","SLOT_ITEM.SHOCK_TROOP_RG_42_GRENADE_MP","SLOT_ITEM.SIPHON_ACTIVE","SLOT_ITEM.SNIPER_FLARE_MP","SLOT_ITEM.SNIPER_RIFLE_ITEM","SLOT_ITEM.SNIPER_RIFLE_ITEM_MP","SLOT_ITEM.SNIPER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.SNIPER_SUPPRESSIVE_VOLLEY_MP","SLOT_ITEM.SOVIET_FLAG","SLOT_ITEM.SPEARHEAD_ITEM","SLOT_ITEM.STALK_ITEM","SLOT_ITEM.STORMTROOPER_MP44_MP","SLOT_ITEM.STUG_CRITICAL_SHOT_MP","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT","SLOT_ITEM.STUG_ELEFANT_PAK40_PAK43_BRUMMBAR_CRITICAL_SHOT_MP","SLOT_ITEM.STURMTIGER_RELOAD_ACTIVE","SLOT_ITEM.SU76M_HE_ROUND_ITEM","SLOT_ITEM.SU76M_HE_ROUND_ITEM_MP","SLOT_ITEM.SUPPORT_SQUAD_SETUP","SLOT_ITEM.SUPPRESS_FIRE_ITEM","SLOT_ITEM.SWS_LOCKDOWN_SETUP","SLOT_ITEM.TANK_HUNTER_SHOCK_BAZOOKA_VET","SLOT_ITEM.TIGER_ACE_CRITICAL_SHOT_MP","SLOT_ITEM.TIGER_FLARE_TOW","SLOT_ITEM.TOMMY_BREN_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.TOMMY_FLAMETHROWER","SLOT_ITEM.TOMMY_GAMMON_BOMB_HEAVY","SLOT_ITEM.TOMMY_GAMMON_BOMB_MEDIUM","SLOT_ITEM.TOMMY_HEAT_GRENADE","SLOT_ITEM.TOMMY_MILLS_BOMB","SLOT_ITEM.TOMMY_MILLS_BOMB_ASSAULT","SLOT_ITEM.TOMMY_OFFICER_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.TOMMY_SCOPED_RIFLE_ITEM_MP","SLOT_ITEM.TOMMY_STEN_SMG","SLOT_ITEM.TROOP_SUPPORT_DUMMY_MEDIC","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_K_PACKAGE_MP","SLOT_ITEM.UNIVERSAL_CARRIER_VICKERS_MMG_SUPPRESSIVE_MP","SLOT_ITEM.URBAN_ASSAULT_FLAMETHROWER_MP","SLOT_ITEM.URBAN_ASSAULT_SATCHEL_CHARGE_ITEM_MP","SLOT_ITEM.VALENTINE_SMOKE_MARKER_GRENADE_MP","SLOT_ITEM.VICKERS_K_LIGHT_MACHINE_GUN_MP","SLOT_ITEM.VOLKSGRENADIER_FIRE_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_GRENADE_MP","SLOT_ITEM.VOLKSGRENADIER_MP44_ITEM_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_MP","SLOT_ITEM.VOLKSGRENADIER_PANZERFAUST_VET_4_MP","SLOT_ITEM.WAFFEN_BUNDLED_ASSAULT_GRENADE","SLOT_ITEM.WEST_GERMAN_MINESWEEPER","SLOT_ITEM.WG_BLENDKORPER_SMOKE_UI_ITEM","SLOT_ITEM.WG_PANZER_IV_ARMORED_SKIRTS","CRIT._NO_CRITICAL","CRIT._NO_CRITICAL_MINE","CRIT._NO_CRITICAL_REAR","CRIT._SP_ANIA_EXPLOSIVE","CRIT._SP_ANIA_KILLED","CRIT.ASSAULT_MODIFIERS","CRIT.ATTACK_PLAN_MODIFIERS","CRIT.AXIS_ASSAULT_MODIFIERS","CRIT.BRIDGE_DEMOLITION_MAKE_WRECK","CRIT.BRIDGE_MAKE_WRECK","CRIT.BUILDING_ABANDON","CRIT.BUILDING_BRACED","CRIT.BUILDING_DESTROY","CRIT.BUILDING_DESTROY_CONSTRUCTION","CRIT.BUILDING_DESTROY_SUPPLY_CENTER","CRIT.BUILDING_FIRE_DAMAGE_DOT","CRIT.BUILDING_FIRE_DAMAGE_PANEL","CRIT.BUILDING_PANEL_DAMAGE_CRITICAL","CRIT.BUILDING_RED_BUILD_TIME_INCREASE","CRIT.BUILDING_STRONG_CRITICAL","CRIT.BUILDING_WEAK_CRITICAL","CRIT.BUILDING_YELLOW_BUILD_TIME_INCREASE","CRIT.BULLET_HIT_CRITICAL","CRIT.BURN","CRIT.BURN_DEATH","CRIT.BURN_DEATH_OUT_OF_CONTROL","CRIT.BURN_WORLD_OBJECT","CRIT.BURN_WORLD_OBJECT_DEATH","CRIT.CAMOUFLAGE_MINE","CRIT.CHURCHILL_TANK_SHOCK_MODIFIERS","CRIT.DETONATE_BANGALORE","CRIT.DETONATE_DEMOLITION_CHARGE","CRIT.DETONATE_MINE","CRIT.EMPLACEMENT_EMPTY","CRIT.EMPLACEMENT_FLAME_CRITICAL","CRIT.EMPLACEMENT_KILL_LOADER","CRIT.EXPLOSIVE_DESTROY","CRIT.GOLIATH_DESTROY","CRIT.HEROIC_CHARGE_FATIGUE","CRIT.MAKE_CASUALTY","CRIT.SOLDIER_BLIND","CRIT.SOLDIER_EXECUTED","CRIT.SOLDIER_EXPLOSIVE_ROUND","CRIT.SOLDIER_FLAMETHROWER_EXPLODE","CRIT.SOLDIER_FORCE_RETREAT","CRIT.SOLDIER_FROZEN","CRIT.SOLDIER_KILLED","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_100","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_30","CRIT.SOLDIER_KILLED_DEATH_INTENSITY_60","CRIT.SOLDIER_KILLED_HMG_DEATH","CRIT.SOLDIER_PIN","CRIT.SOLDIER_SLOW","CRIT.SOLDIER_SNIPED","CRIT.SOLDIER_SNIPED_IN_HALFTRACK","CRIT.SOLDIER_SNIPED_MAKE_CASUALTY","CRIT.SOLDIER_SNIPED_STILL_ALIVE","CRIT.SOLDIER_STUN","CRIT.SOLDIER_SUPPRESS","CRIT.SQUAD_ITEM_DAMAGED","CRIT.STUNNED_CANNOT_SHOOT_10_SECONDS","CRIT.STUNNED_CANNOT_SHOOT_MOVE_10_SECONDS","CRIT.SUPPLY_DROP_BLOW_UP","CRIT.TANK_TRAP_DESTROY","CRIT.TEAM_WEAPON_DISABLING_SHOT","CRIT.VEHICLE_ABANDON","CRIT.VEHICLE_ABANDON_STURMTIGER","CRIT.VEHICLE_AEC_TEMP_ENGINE_DAMAGE","CRIT.VEHICLE_AEC_TEMP_IMMOBILITY","CRIT.VEHICLE_BLIND","CRIT.VEHICLE_CREW_DAZED_JAGDTIGER","CRIT.VEHICLE_CREW_SHOCKED","CRIT.VEHICLE_CREW_STUNNED","CRIT.VEHICLE_CREW_STUNNED_2","CRIT.VEHICLE_DAMAGE_ENGINE","CRIT.VEHICLE_DAMAGE_ENGINE_INCREMENTAL","CRIT.VEHICLE_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_DAMAGE_ENGINE_REAR_RAMMING","CRIT.VEHICLE_DAMAGE_ENGINE_SNARE","CRIT.VEHICLE_DECREW","CRIT.VEHICLE_DESTROY","CRIT.VEHICLE_DESTROY_BREW_UP","CRIT.VEHICLE_DESTROY_ENGINE","CRIT.VEHICLE_DESTROY_ENGINE_REAR","CRIT.VEHICLE_DESTROY_MAINGUN","CRIT.VEHICLE_DESTROY_MAINGUN_RAMMING","CRIT.VEHICLE_DESTROY_QUAD_50","CRIT.VEHICLE_DESTROY_SEARCHLIGHT_IR_HALFTRACK","CRIT.VEHICLE_DESTROY_WEAPON_TEAM","CRIT.VEHICLE_DRIVER_INJURED","CRIT.VEHICLE_ENGINE_BURNING","CRIT.VEHICLE_EXHAUST_DAMAGED","CRIT.VEHICLE_GUNNER_INJURED","CRIT.VEHICLE_KILL_BRIT_TANK_COMMANDER","CRIT.VEHICLE_KILL_COMMANDER","CRIT.VEHICLE_KILL_DRIVER_RUSSIAN","CRIT.VEHICLE_KILL_GUNNER_RUSSIAN","CRIT.VEHICLE_KILL_RELOADER_RUSSIAN","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_1","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_2","CRIT.VEHICLE_KILL_TOP_GUNNER_HARDPOINT_4","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE","CRIT.VEHICLE_LIGHT_DAMAGE_ENGINE_REAR","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE","CRIT.VEHICLE_LIGHT_DESTROY_ENGINE_REAR","CRIT.VEHICLE_LOADER_INJURED","CRIT.VEHICLE_LOSE_TREADS_OR_WHEELS","CRIT.VEHICLE_MAKE_WRECK","CRIT.VEHICLE_OPTICS_DAMAGED","CRIT.VEHICLE_OPTICS_DAMAGED_TEMP","CRIT.VEHICLE_OUT_OF_CONTROL_FAST","CRIT.VEHICLE_OUT_OF_CONTROL_SLOW","CRIT.VEHICLE_OUT_OF_FUEL_GERMAN_SP","CRIT.VEHICLE_SHELL_SHOCKED","CRIT.VEHICLE_SNIPER_SLOW","CRIT.VEHICLE_STUCK_IN_MUD","CRIT.VEHICLE_TANK_GRAB_ABANDON_SP","CRIT.VEHICLE_TEMP_IMMOBILITY","CRIT.VEHICLE_TURRET_DISABLED_TEMP","CRIT.VEHICLE_UNIVERSAL_CARRIER_FLAMETHROWER_EXPLODE","CRIT.VEHICLE_VISION","CRIT.VEHICLE_VISON_BLOCK_DAMAGED","CRIT.VEHICLE_WEAPON_DISABLED_TEMP","CRIT.WORLD_DESTROY_BARRIER","CRIT.WORLD_OBJECT_DESTROY","CRIT.WORLD_OWNED_VEHICLE_ABANDON","BridgeReplace_OnInit","SkinPreviewCapture_Init","SkinPreviewCapture_SpawnVehicles","SkinPreviewCapture_UIInit","SkinPreviewCapture_CycleAndCaptureScreenshots","SkinPreviewCapture_Begin","SkinPreviewCapture_BeginCountdown","SkinPreviewCapture_ExitCountdown","SkinPreviewCapture_Exit","SkinPreviewCapture_StartCountdown","Map_PreInit","SkinPreviewCapture_Configure","AOH_PreInit","AV_PreInit","AV_Init","AV_UpdateObjectiveTimer","AV_UIInit","AV_End","CCM_ActionSpawnUKFSpawner","CCM_ActionSpawnUKFMiscSpawner","Squad_ToClipboardData","Squad_FromClipboardData","Entity_FromClipboardData","Entity_ToDataParameters","Entity_GetHealthPointsString","Squad_ToDataParameters","Squad_GetHealthPointsString","Player_ToDataParameters","Player_GetSetting","Player_SetSetting","Player_GetSettings","LocalPlayer_GetSettings","Data_GetHealthModifiedString","Data_GetOwnerChangedString","CCM_EventCueClickManger","CCM_EventMessage","CCM_EventKickerMessage","CCM_EventKickerMessageEval","CCM_EventKickerHealthMessageEval","CCM_ErrorMessage","Item_GetEnemyPlayer","CCM_SpawnQueueTick","CCM_SpawnQueueInit","CCM_SpawnQueueAdd","CCM_DummyMessage","CCM_PlayerCommandIssued","CCM_SquadCommandIssued","CCM_EntityCommandIssued","CCM_CustomUIEvent","Variable_FromG","Ternary","CCM_PlayerCommandIssued2","CCM_ConfigInit","__subMenu_SetUpdateRate","__subMenu_SpawnUnits","__subMenu_ManipulateSquadMembers","__panel_SelectionHealth","TestFormAdd","TestFormRender","Test_SlotItemRemoveSpam","Test_SlotItemRemoveSpam_Tick","CCM_HealthMonitor_Tick","CCM_HealthMonitor_HandleHealthMessage","CCM_HealthMonitor_RegisterNewItem","CCM_HealthMonitorInit","CCM_SuppressionMonitor_Tick","CCM_SuppressionMonitor_HandleMessage","CCM_SuppressionhMonitor_RegisterNewItem","CCM_SuppressionMonitorInit","CCM_Init","CCM_UIInit","CCM_BroadcastMessageReceived","CCM_Broadcast","CCM_ShowCrosshair","CCM_HideCrosshair","CCM_DisableUI","CCM_EnableUI","CCM_KillSelection","CCM_DeleteSelection","CCM_KillSquad","CCM_DeleteSquad","CCM_KillEntity","CCM_DeleteEntity","CCM_EnableFOW","CCM_DisableFOW","CCM_EnableAI","CCM_DisableAI","CCM_SetAIDifficulty","CCM_SetSelectionHealth","CCM_AddSelectionHealthPercentage","CCM_AddSelectionHealthPoints","CCM_SetSelectionInvulnerability","CCM_SetSelectionOwner","CCM_AddResource","CCM_ResetResource","CCM_AddPopulationCap","CCM_SetInstantProductionEnabled","CCM_SetInstantConstructionEnabled","CCM_SetInstantAbilityRechargeEnabled","CCM_SpawnSquad","CCM_SpawnEntity","CCM_SpawnSlotItem","CCM_IncreaseSelectionXP","CCM_IncreaseSelectionVeterancyLevel","CCM_InstantReinforceSelection","CCM_SplitSelection","CCM_RemoveSelectionCriticals","CCM_RemoveSquadCritical","CCM_RemoveEntityCritical","CCM_ApplyCriticalToSelection","CCM_SetSquadAutoTargetting","CCM_RemoveSquadUpgrade","CCM_RemoveEntityUpgrade","CCM_RemoveSquadSlotItem","CCM_SetSelectionFacing","CCM_TeleportSelection","CCM_KillEverything","CCM_DeleteEverything","CCM_RotateEntity","CCM_SetHealthMonitorEnabled","CCM_SetSuppressionMonitorEnabled","CCM_SelectedTeamWeaponGarrisonFacePosition","CCM_CancelTeamWeaponGarrisonFacingOrder","CCM_AddSelectionSuppression","CCM_SetAllAIPlayersEnabled","CCM_ResetSelectionVeterancy","CCM_SetResourceIncomeEnabled","CCM_SetHealthMonitorUpdateRate","CCM_SetSuppressionMonitorUpdateRate","CCM_UnlockCommanderAbility","CCM_ClearCommanderAbilities","CCM_ModifySquadMovementSpeed","CCM_SetSelectionOwnerToEnemy","CCM_SquadToEntity","CCM_SetEntityAnimatorState","CCM_SetSquadAnimatorState","CCM_SetSelectionAnimatorState","CCM_SetSelectionSkinType","CCM_DropSelectionWeapons","CCM_CaptureAllTerritorySectors","CCM_NeutralizeAllTerritorySectors","CCM_SquadToSkinPreviewEntity","Enhanced_Init","Enhanced_SystemInit","Enhanced_BroadcastMessageReceived","Enhanced_UITick","Enhanced_SetButtonsEnabled","Enhanced_ResetButtonIcons","Enhanced_SetButtonsVisible","Enhanced_PreInit","Enhanced_UIInit","Dude","MyMap_OnInit","MyMap_BonusUnitKilled","prnt","toCharArray","export","include","getBlueprintIfItExists","getBlueprintName","instanceOf","parent","Loc_Create","broadcastMessage","delayedStart","Map_PlayerBonusUnitKilled","MyFunction","Map_OnInit","Gardeners_PreInit","AutoAbandonManager","AutoAbandon_Add","AutoAbandon_Remove","AutoDeleteManager","AutoDelete_Add","AutoDelete_Remove","AutoRetreatManager","AutoRetreat_Add","AutoRetreat_Remove","Parameters_ToStringData","Parameters_FromStringData","Player_FromStringData","Squad_FromStringData","Entity_FromStringData","Broadcast","Camera_MoveToCallback","Camera_MoveToCallback_Tick","CameraPosition","Class","Color","Margin","Padding","Player","Control","Button_CreateConfig","Button_GetIcon","Button","FormControl_Init","FormControl_Refresh","Form","Icon","Label","NumericUpDown_CreateIconConfig","NumericUpDownScroll_Tick","NumericUpDown_RegisterAutoScroll","NumericUpDown_UnregisterAutoScroll","NumericUpDown","MenuControl_Init","Menu_AutoRefresh","Menu_AutoCheckEnabledScan","Menu_AutoCheckCheckedScan","CloseMenus","Menu","Menu_CreateBorderImage","Panel_GetMultipartBackground","Panel","PanelColumn","PanelColumnCollection","Class_GetUniqueID","Class_CreateInstance","Construct","CompanyCommander_Create","ControlSystem_Init","Button_FromTag","ButtonCallbackHandler","Control_GetName","Control_GetX","Control_GetY","Control_GetPath","Control_GetText","Control_GetTag","BPData_GetExtensions","Loc_Get","EBP_HasExtension","EBPData_HasExtension","EBP_GetScreenName","EBP_GetIcon","EBPData_GetUIExt","EBPData_GetScreenName","EBPData_GetIcon","SBP_GetScreenName","SBP_GetIcon","SBPData_GetRaceUIExt","SBPData_GetScreenName","SBPData_GetIcon","Crit_GetScreenName","CritData_GetUIExt","CritData_GetScreenName","CritData_GetIcon","UPG_GetScreenName","UPGData_GetScreenName","SlotItem_GetScreenName","SlotItemData_GetScreenName","EGroup_ToTable","EGroup_IsAlive","EGroup_IsCapturedByTeam2","LocalImport","ImportSystem","ImportDataTables","Library_Load","Lib_EnableMessages","Lib_SetMessagesEnabled","Lib_SetupMod","Mod_GetIcon","Mod_GetAbilityBlueprint","Mod_GetSquadBlueprint","Mod_GetEntityBlueprint","Mod_GetUpgradeBlueprint","Msg_Pos","Msg_3D","Lib_GameOver","Debug_SetMessagesEnabled","TryCatch","Library_Setup","Entity_Validate","Entity_AddHealthPercentage","Entity_AddHealthPoints","Entity_GetOwnerString","Entity_GetBPName","Entity_GetCriticals","Entity_RemoveCriticals","Entity_IsTeamWeapon","Entity_IsValidSafe","Entity_GetUpgrades","Entity_Rotate","Entity_GetTypes","Entity_IsOfType2","Entity_HasUpgrades","EBP_GetTypes","EBP_IsOfType","Entity_Decrew","Entity_PrepareForScreenshot","Entity_SetSkinSeason","Entity_GetBlueprintName","Entity_HasModifierExt","Percentage_Normalize","Round","scientific","Player_GetIndex","Player_SetResourcesEnabled","Player_ResetResources","Player_GetAllSquads","Player_DestroyAllSquads","Player_GetDisplayRaceName","Player_GetDisplayRaceNameLong","Player_GetNameWithFaction","AIDifficulty_Tostring","Player_IsAI","Player_ForEachSquad","Pos_NormalizeHeight","Rule_AddIntervalAndRun","Rule_AddIfNotExists","Rule_AddIntervalIfNotExists","Rule_ChangeIntervalIfExists","Rule_AddDelayed","Rule_AddDelayedIfNotExists","Modify_SetSquadtAutoTargetting","Modify_SetEntityAutoTargetting","Modify_SetEntityAutoTargettingAllHardpoints","Modify_SetSquadAutoTargettingAllHardpoints","Modify_SetSGroupAutoTargettingAllHardpoints","Modify_SetEGroupAutoTargettingAllHardpoints","Modify_SquadTypeEnableCapturing","Selection_UnselectAll","Selection_IsOneEntity","Selection_IsOneSquad","Selection_IsOneSquadOrOneEntity","Selection_IsOneOrMoreSquads","Selection_IsOneOrMoreEntities","Selection_IsSquadsOrEntities","Selection_IsSquadOrEntity","Selection_GetSquad","Selection_GetEntity","Selection_GetSquads","Selection_GetEntities","Misc_SomethingIsSelected","Selection_ForEachSquad","Selection_ForEachEntity","Selection_IsNotInvulnerable","Selection_IsNotNeutralSquadOrEntity","Selection_CountInvulnerables","Selection_IsInvulnerable","SelectionMonitor_Init","SelectionMonitor","SelectionMonitor_GetID","SelectionMonitor_AddSquad","SelectionMonitor_AddEntity","SelectionMonitor_RemoveSquad","SelectionMonitor_RemoveEntity","SelectionMonitor_RemoveItemListener","SelectionMonitor_RemoveSquadLister","SelectionSystem_RemoveEntityLister","SGroup_ToTable","SGroup_SetPosition","SGroup_CountEntities","SGroup_IsAlive2","Squad_CountSpawned","Squad_IsPlane","Squad_SetSelectable","Squad_GetLastAttackerSquad","Squad_IsSelected","Squad_AddHealthPercentage","Squad_AddHealthPoints","Squad_Abandon","Squad_GetOwnerString","Squad_GetBPName","Squad_GetCriticals","Squad_RemoveCriticals","Squad_IsValidSafe","Squad_SetAutoTargetting","__RegisterSquadAutoTargettingModifier","__UnRegisterSquadAutoTargettingModifier","__RegisterEntityAutoTargettingModifier","__UnRegisterEntityAutoTargettingModifier","Squad_SetAllAutoTargetting","Squad_GetAutoTargetting","Squad_GetAllAutoTargetting","Squad_GetUpgrades","Squad_HasUpgrades","Squad_RemoveSlotItem","Squad_RemoveUpgradeFully","Squad_ForEachHeldSquad","Squad_DestroyHeldSquads","Squad_KillHeldSquads","Squad_ModifyVehicleSpeed","Squad_ModifyVehicleRotationSpeed","Squad_ModifyTurretHorizontalSpeed","Squad_ModifyMovementSpeed","Squad_GetTypes","Squad_IsOfType","SBP_GetTypes","SBP_IsOfType","Squad_GetEntityTable","Squad_ToEntities","Squad_ToEntity","Squad_AddMainGunHorizontalRotation","Squad_SetMainGunHorizontalRotation","Squad_Decrew","Squad_SetSkinSeason","Squad_RemoveSlotItems","Squad_GetEntityStateString","Squad_RemoveUpgradeIfPresent","Squad_RemoveUpgradesIfPResent","String_Match","String_Replace","String_AddGenetive","String_Split","Number_TrailingZeroes","Outpost","Outpost_Init","OutpostManager_Register","OutpostManager_Tick","OutpostPatrol","OutpostCaptureTrigger","OutpostPatrolAlarmedSquads_Register","OutpostPatrolAlarmedSquads_Tick","OutpostPatrolManager_Register","OutpostPatrolManager_Tick","OutpostRadioPost","OutpostRadioPostManager_Register","OutpostRadioPostManager_Tick","Table_AddTable","Table_GetSmallest","Table_GetLargest","Table_RemoveValue","Table_IsEmpty","Table_GetRandomBlueprint","Table_Remove","Table_ToIndexableList","Table_Count","Table_Compare","RangeTable_GetRandomValue","OutpostReinforcementsManager_Register","OutpostReinforcementsManager_Tick","Team_GetRandomPlayer","Team_GetRandomPlayers","Time_TicksToSeconds","Time_SecondsToTicks","Time_MinutesToTicks","UI_EnableSelectionVisuals","UI_EnableSquadSelectionVisuals","SelectionVisual_Tick","SelectionVisual_RegisterEntity","UI_ScalePoint","Util_DelaySeconds","Util_DelayMinutes","Util_DelayRandom","Util_DelayRandomSeconds","Util_GetRandomPosExtended","Util_GetRandomHeadingPos","UIFrame_Destroy","Misc_Tester","Util_DistanceFromLine","Util_DistancePointToTeamShortest","HintPoints_Remove","MapIcon_CreateAndFacePosition","toboolean","ResourceType_ToString","ResourceType_FromString","ResourceType_ToDisplayString","Selection_GetPlayer","Objective_UpdateTitle","Objective_StartLocally","Util_CallFunctionsWithParameters","World_ForEachEntity","World_DivideTerritoryBetweenTeams","World_GetWidthRange","World_GetLengthRange","World_RegisterPlayers","World_GetEverythingNearPoint","World_GetAll","World_GetAllSquads","World_ForEeachSquad","World_OneOrMoreAIPlayerIsEnabled","World_OneOrMoreAIPlayerIsDisabled","World_CleanUpTheDeadAll","World_GetAllTerritoryPointEntities","Villagers_PreInit","WarDrive_Init","_getPlayerMineEBP","_spawnMines","WarDrive_GetPlayerReconAbility","WarDrive_ReconSweepBetweenTeams","WarDrive_GetNextEffectDelay","WarDrive_PickRandomEffect","WarDrive_SplitTimeUnits","WarDrive_FormatTime","WarDrive_Monitor","Team_HasTerritoryPoint","WarDrive_EntityKilled","WarDrive_SquadKilled","TestEffect","WarDrive_EnableEffect","WarDrive_RemoveModifiers","WarDrive_GetIcon","WarDrive_RegisterModifier","Modify_SquadBuildTime","Modify_SquadReinforceTime","Modify_EntityCaptureTime","WarDrive_ObjectiveInit","WarDrive_ObjectiveAfterInt","WarDrive_Pager","WarDrive_AbilityExecuted","WarDrive_GetAbilityBlueprint","WarDrive_PreInit","CCM_AddInfiniteResourcesPopcap","CCM_ActionKillSelection","CCM_ActionDeleteSelection","CCM_ActionTeleportSelection","CCM_ActionIncreaseSelectionVeterancy","CCM_ActionIncreaseSelectionHealth","CCM_ActionDecreaseSelectionHealth","CCM_ModifySelectionHealth","CCM_ActionAbandonSelected","CCM_ActionRemoveCriticals","CCM_ActionDropSlotItems","CCM_ActionInstantReinforce","CCM_ActionAddPreciseManpower","CCM_ActionAddPreciseFuel","CCM_ActionAddPreciseMunition","_CCM_SpawnSpawnerSquad","CCM_ActionSpawnSovietSpawner","CCM_ActionSpawnAEFSpawner","CCM_ActionSpawnGermanSpawner","CCM_ActionSpawnWestGermanSpawner","CCM_ActionAddFullHealth","CCM_ActionKillOneEntity","CCM_ActionDeleteOneEntity","CCM_ActionSpawnGermanMiscSpawner","CCM_ActionSpawnSovietMiscSpawner","CCM_ActionSpawnWestGermanMiscSpawner","CCM_ActionSpawnAEFMiscSpawner","CCM_DataInit","CCM_CopySelection","CCM_PasteSelection","Clipboard_Clear","CCM_PreInit","CCM_SystemInit","CCM_PlayerResetAbilities","Player_GetSettingsKey","CCM_PlayerAbilityCompleteListener","CCM_PlayerAbilityListener","CCM_RegisterPlayerAction","Squad_GetSpawnerRaceIndex","Squad_GetSpawnerTable","Squad_GetSpawnAbilityPrefix","CCM_SquadAbilityListener","CCM_CountSpawnTableItems","_CCM_InitSpawnerSquad","CCM_AutoHideAbilities","Entity_CreateAndSpawnTowardTeamWeapon","Entity_GetUpgradeTable","Entity_ApplyCriticalHit","Entity_GetText","Entity_Abandon","EntityBP_IsBuilding","Util_Destroy","Util_GetBPName","Misc_CheckForParentSquad","Squad_GetTableKey","Entity_GetTableKey","Util_GetTablekey","Util_SetInvulnerable","Player_GetIDSafe","Table_ForEach","CCM_Msg","CCM_ClearMSG","CCM_GetAbilityBleprint","CCM_GetSquadBlueprint","CCM_GetEntityBlueprint","CCM_GetUpgradeBlueprint","CCM_GetIcon","CCM_EventCue","Misc_AddSpawnedItemToSystem","Util_AddHealth","Misc_DoPercentageSum","Util_SetPosition","Util_GetGameID","Util_DecodeGameID","Misc_SpawnSlotItemOnGround","Squad_ModifySpeed","Squad_GetHealthTable","Squad_ApplyHealthTable","Squad_GetPlayerOwnerSafe","Squad_GetHeadingTable","Squad_ApplyHeadingTable","Squad_GetUpgradesTable","Squad_GetText","Squad_GetCriticalsTable","Squad_ApplyCriticalHitTable","Squad_ModifyDamage","Squad_DropSlotItems","Squad_RemoveUpgrades","Squad_RemoveCritical","Squad_HasCritical","Squad_GetEntityPositionList","Squad_ApplyEntityPositionList","Squad_SetHealthPercentage","Squad_IsVehicle","CCM_ToggleInstantProduction","CCM_ToggleFOW","CCM_ToggleGlobalAI","CCM_ToggleSelectionInvulnerability","CCM_ToggleSelectionOwner","CCM_ToggleDisableWeapons","CCM_ToggleEngineOrPostureState","CCM_ToggleHealthMonitor","CCM_GetSquadKey","CCM_GetEntityKey","CCM_HealthMonitor","_CCM_HealthMonitor_HandleHealth","_CCM_HealthMonitor_KickerMessage","CTF_PreInit","CTFSystem_Init","CTF_GetRandomFlagSpawnPosition","CTF_FreeFlagSpawnPosition","CTFSystem_InitDelayed","CTF_StartCore","CTF_GetWinScoreLimit","CTF_FlagScoreMonitor","CTF_BlinkFlagCarriers","CTF_FlagRespawnMonitor","CTF_FlagStateMonitor","CTF_EnableResources","CTF_UpdateObjectiveUI","CTF_FixFlagColor","CTF_FixFlagColorDelayed","CTF_StopAlarm","CTF_FlagCarrierAbilityExecuted","CTF_DropFlagRequestManager","CTF_PreventFlagCarrierReCrewAndVehicleGarrisoning","CTF_FlagCaptured","CTF_FlagDropped","CTF_FlagScored","CTF_GetOpposingTeam","CTF_TeamFlagScore","CTF_ObjctiveInit","CTF_AddObjectiveUI","Entity_IsReCrewable","Squad_AddFlagCarrierEffects","Squad_RemoveFlagCarrierEffects","Squad_SetCaptureEnabled","Squad_EnableFlagCarrierUI","Squad_EnableCantHoldUI","Squad_ModifyInfantrySpeed","Squad_MonitorDeath","Squad_DisableFlagCarrierUI","isset","Squad_FlagCarrierDeath","Squad_DropFlag","Squad_CarriesFlag","Squad_IsRegisteredFlagCarrier","Squad_RegisterFlagCarrier","Squad_UnRegisterFlagCarrier","Squad_GetSlotItemTable","Player_EnableMoveFlagHereUI","Player_UnlockRetreat","Player_IsHoldingAnyFlags","SGroup_IsCarryingFlag","UI_LocalKickerMessage","UI_GlobalKickerMessage","CTF_Msg","ClearCTF_Msg","Listener","Table_Shuffle","Ability_GetUniqueKey","Player_AddPopulation","Player_ExecuteLocally","Player_GetEnemyPlayer","Player_SetResourceIncomeNumber","Team_GetFirstPlayer","Team_GetEntitiesNearPoint","Team_GetSquadsNearPoint","Team_GetPlayerCount","Team_ExecuteLocally","SGroup_CreateTemp","EGroup_CreateTemp","EGroup_GetClosest","EGroup_AddGroup","EGroup_FilterByUnitType","Entity_GetGarrisonedSquads","Entity_AutoAlign","Entity_CreateAndSpawnToward","Entity_CreateAndSpawnTowardDelayed","Entity_CreateAndSpawnTowardDelayedRandom","Entity_GetName","Entity_GetTempEGroup","Entity_GetOwnerSafe","Entity_Replace","Entity_IsSelected","Entity_HasProductionQueueItem","Entity_IsValidEntity","Squad_GetUniqueKey","Squad_GetName","Squad_IsIdle","Squad_IsConcstructing","Squad_IsHeadingToPosition","Squad_ForEachEntity","UI_FlashSquad","Util_Repeat","Util_Delay","Util_IsPositionInPolygon","Util_GetDirectionalOffset","Util_GetDirectionalOffsetPosition","Util_GetRandomPos","Util_GetAngleTowardsPos","Util_CopyPosition","Util_CreateUIFrame","Util_Tester","Misc_UnSelectAll","Util_DefaultValue","World_ForEachEntitiesByBlueprint","World_GetEntitiesOfType","Pos_AddHeight","Pos_GetString","dr_text3dpos","Heading_Rotate","Squad_InfraRedReveal","WinCondition_PreInit","WinCondition_MonitorVictoryPoints","Team_GetTitle","Team_GetOpposingTeam","OKWNoCache_PreInit","PK_SystemInit","PK_ScanPlayers","PK_PlayerAbilityListener","Player_RemoveTankDispatchAbilities","Squad_GetTempSGroup","Player_GetMapEntryPositionClosest","Util_SortPositionsByClosestImproved","Pos_GetXYZString","PK_Msg","PK_ClearMSG","PK_GetAbilityBleprint","PK_GetUpgradeBleprint","PK_GetSquadBleprint","PK_EventCue","Player_GetRaceIndex","PK_PreInit","RotateThings","TC_PreInit","TC_Init","TC_TogglePlayerCategory","System_PlayerAbilityComplete","System_PlayerAbilityExecuted","TC_UpdatePlayerCircle","TC_UpdatePlayerArrow","TC_GeneralManager","TC_GetAbilityBlueprint","TC_GetMineIcon","TC_GetMineIconScale","TC_MineIsAllowedToMark","TC_MineIsPartOfSMineField","TC_GetMineMarkerColor","TC_GetIcon","TC_MineMarkerManager","TC_BlibMinePlanted","System_EntityConstructionCompleted","System_EntityKilled","Player_IsLocalPlayer","Player_GetUniqueKey","Player_GetName","Players_ForEach","Players_ForEachInTeam","Entity_GetPlayerOwnerSafe","Entity_GetUniqueKey","Entity_CheckForParentSquad","EntityList_ContainsValidEntities","EGroup_GetEntityIds","Util_GlobalMessage","Util_CreateLocString","Util_GetBlueprint","Util_GetUnitOwner","Game_GetLocalPlayerID","World_OwnsUnit","World_GetEntitiesByBlueprint","World_ForEachEntities","Msg","TC_DataInit_Ebps","TC_DataInit","WinCondition_GameOver","WinCondition_Check","WinCondition_Init","$","AAGUID","ANGLE_instanced_arrays","AbstractWorker","AbstractWorkerEventMap","Account","ActiveXObject","AesCbcParams","AesCfbParams","AesCmacParams","AesCtrParams","AesDerivedKeyParams","AesGcmParams","AesKeyAlgorithm","AesKeyGenParams","Algorithm","AlgorithmIdentifier","AnalyserNode","AnimationEvent","AnimationEventInit","ApplicationCache","ApplicationCacheEventMap","Array","ArrayBuffer","ArrayBufferConstructor","ArrayBufferView","ArrayConstructor","ArrayLike","AssertionOptions","AssignedNodesOptions","Attr","Audio","AudioBuffer","AudioBufferSourceNode","AudioBufferSourceNodeEventMap","AudioContext","AudioContextBase","AudioContextEventMap","AudioDestinationNode","AudioListener","AudioNode","AudioParam","AudioProcessingEvent","AudioTrack","AudioTrackList","AudioTrackListEventMap","BarProp","BaseJQueryEventObject","BeforeUnloadEvent","BiquadFilterNode","Blob","BlobPropertyBag","Body","BodyInit","Boolean","BooleanConstructor","Buffer","BufferEncoding","BufferSource","ByteString","CDATASection","CSS","CSSConditionRule","CSSFontFaceRule","CSSGroupingRule","CSSImportRule","CSSKeyframeRule","CSSKeyframesRule","CSSMediaRule","CSSNamespaceRule","CSSPageRule","CSSRule","CSSRuleList","CSSStyleDeclaration","CSSStyleRule","CSSStyleSheet","CSSSupportsRule","Cache","CacheQueryOptions","CacheStorage","Canvas2DContextAttributes","CanvasGradient","CanvasPathMethods","CanvasPattern","CanvasRenderingContext2D","ChannelMergerNode","ChannelSplitterNode","CharacterData","ChildNode","ClassDecorator","ClientData","ClientRect","ClientRectList","ClipboardEvent","ClipboardEventInit","CloseEvent","CloseEventInit","Comment","CompositionEvent","CompositionEventInit","ConcatParams","ConfirmSiteSpecificExceptionsInformation","Console","ConstrainBoolean","ConstrainBooleanParameters","ConstrainDOMString","ConstrainDOMStringParameters","ConstrainDouble","ConstrainDoubleRange","ConstrainLong","ConstrainLongRange","ConstrainVideoFacingModeParameters","ConvolverNode","Coordinates","Crypto","CryptoKey","CryptoKeyPair","CryptoOperationData","CustomElementRegistry","CustomEvent","CustomEventInit","DOMError","DOMException","DOMImplementation","DOML2DeprecatedColorProperty","DOML2DeprecatedSizeProperty","DOMParser","DOMRectInit","DOMSettableTokenList","DOMStringList","DOMStringMap","DOMTokenList","DataCue","DataTransfer","DataTransferItem","DataTransferItemList","DataView","DataViewConstructor","Date","DateConstructor","DecodeErrorCallback","DecodeSuccessCallback","DeferredPermissionRequest","DelayNode","DeviceAcceleration","DeviceAccelerationDict","DeviceLightEvent","DeviceLightEventInit","DeviceMotionEvent","DeviceMotionEventInit","DeviceOrientationEvent","DeviceOrientationEventInit","DeviceRotationRate","DeviceRotationRateDict","DhImportKeyParams","DhKeyAlgorithm","DhKeyDeriveParams","DhKeyGenParams","Document","DocumentEvent","DocumentEventMap","DocumentFragment","DocumentOrShadowRoot","DocumentType","DoubleRange","DragEvent","DynamicsCompressorNode","EXT_frag_depth","EXT_texture_filter_anisotropic","EcKeyAlgorithm","EcKeyGenParams","EcKeyImportParams","EcdhKeyDeriveParams","EcdsaParams","Element","ElementDefinitionOptions","ElementEventMap","ElementListTagNameMap","ElementTagNameMap","ElementTraversal","Enumerator","EnumeratorConstructor","ErrnoException","Error","ErrorConstructor","ErrorEvent","ErrorEventHandler","ErrorEventInit","EvalError","EvalErrorConstructor","Event","EventEmitter","EventInit","EventListener","EventListenerObject","EventListenerOrEventListenerObject","EventModifierInit","EventTarget","ExceptionInformation","ExtensionScriptApis","External","FFF","FGHJK","File","FileList","FilePropertyBag","FileReader","Float32Array","Float32ArrayConstructor","Float64Array","Float64ArrayConstructor","FocusEvent","FocusEventInit","FocusNavigationEvent","FocusNavigationEventInit","FocusNavigationOrigin","Foo","Foos","ForEachCallback","FormData","FrameRequestCallback","Function","FunctionConstructor","FunctionStringCallback","GLbitfield","GLboolean","GLbyte","GLclampf","GLenum","GLfloat","GLint","GLintptr","GLshort","GLsizei","GLsizeiptr","GLubyte","GLuint","GLushort","GainNode","Gamepad","GamepadButton","GamepadEvent","GamepadEventInit","GeneratorFunction","GeneratorFunctionConstructor","Geolocation","GetNotificationOptions","GetSVGDocument","GlobalEventHandlers","GlobalEventHandlersEventMap","GlobalFetch","HTMLAllCollection","HTMLAnchorElement","HTMLAppletElement","HTMLAreaElement","HTMLAreasCollection","HTMLAudioElement","HTMLBRElement","HTMLBaseElement","HTMLBaseFontElement","HTMLBodyElement","HTMLBodyElementEventMap","HTMLButtonElement","HTMLCanvasElement","HTMLCollection","HTMLCollectionBase","HTMLCollectionOf","HTMLDListElement","HTMLDataElement","HTMLDataListElement","HTMLDirectoryElement","HTMLDivElement","HTMLDocument","HTMLElement","HTMLElementEventMap","HTMLElementTagNameMap","HTMLEmbedElement","HTMLFieldSetElement","HTMLFontElement","HTMLFormControlsCollection","HTMLFormElement","HTMLFrameElement","HTMLFrameElementEventMap","HTMLFrameSetElement","HTMLFrameSetElementEventMap","HTMLHRElement","HTMLHeadElement","HTMLHeadingElement","HTMLHtmlElement","HTMLIFrameElement","HTMLIFrameElementEventMap","HTMLImageElement","HTMLInputElement","HTMLLIElement","HTMLLabelElement","HTMLLegendElement","HTMLLinkElement","HTMLMapElement","HTMLMarqueeElement","HTMLMarqueeElementEventMap","HTMLMediaElement","HTMLMediaElementEventMap","HTMLMenuElement","HTMLMetaElement","HTMLMeterElement","HTMLModElement","HTMLOListElement","HTMLObjectElement","HTMLOptGroupElement","HTMLOptionElement","HTMLOptionsCollection","HTMLOutputElement","HTMLParagraphElement","HTMLParamElement","HTMLPictureElement","HTMLPreElement","HTMLProgressElement","HTMLQuoteElement","HTMLScriptElement","HTMLSelectElement","HTMLSlotElement","HTMLSourceElement","HTMLSpanElement","HTMLStyleElement","HTMLTableAlignment","HTMLTableCaptionElement","HTMLTableCellElement","HTMLTableColElement","HTMLTableDataCellElement","HTMLTableElement","HTMLTableHeaderCellElement","HTMLTableRowElement","HTMLTableSectionElement","HTMLTemplateElement","HTMLTextAreaElement","HTMLTimeElement","HTMLTitleElement","HTMLTrackElement","HTMLUListElement","HTMLUnknownElement","HTMLVideoElement","HTMLVideoElementEventMap","HashChangeEvent","HashChangeEventInit","Headers","HeadersInit","History","HkdfCtrParams","HmacImportParams","HmacKeyAlgorithm","HmacKeyGenParams","I","IArguments","IDBArrayKey","IDBCursor","IDBCursorWithValue","IDBDatabase","IDBDatabaseEventMap","IDBEnvironment","IDBFactory","IDBIndex","IDBIndexParameters","IDBKeyPath","IDBKeyRange","IDBObjectStore","IDBObjectStoreParameters","IDBOpenDBRequest","IDBOpenDBRequestEventMap","IDBRequest","IDBRequestEventMap","IDBTransaction","IDBTransactionEventMap","IDBValidKey","IDBVersionChangeEvent","IFoos","IIRFilterNode","ITextWriter","Image","ImageData","Infinity","Int16Array","Int16ArrayConstructor","Int32Array","Int32ArrayConstructor","Int8Array","Int8ArrayConstructor","IntersectionObserver","IntersectionObserverCallback","IntersectionObserverEntry","IntersectionObserverEntryInit","IntersectionObserverInit","Intl","Iterable","IterableIterator","Iterator","IteratorResult","JQuery","JQueryAjaxSettings","JQueryAnimationOptions","JQueryCallback","JQueryCoordinates","JQueryDeferred","JQueryEventConstructor","JQueryEventObject","JQueryGenericPromise","JQueryInputEventObject","JQueryKeyEventObject","JQueryMouseEventObject","JQueryParam","JQueryPromise","JQueryPromiseCallback","JQueryPromiseOperator","JQuerySerializeArrayElement","JQueryStatic","JQuerySupport","JQueryXHR","JSON","JSX","JsonWebKey","KeyAlgorithm","KeyFormat","KeyType","KeyUsage","KeyboardEvent","KeyboardEventInit","LinkStyle","ListeningStateChangedEvent","Location","LongRange","LongRunningScriptDetectedEvent","MSAccountInfo","MSApp","MSAppAsyncOperation","MSAppAsyncOperationEventMap","MSAssertion","MSAudioLocalClientEvent","MSAudioRecvPayload","MSAudioRecvSignal","MSAudioSendPayload","MSAudioSendSignal","MSBaseReader","MSBaseReaderEventMap","MSBlobBuilder","MSConnectivity","MSCredentialFilter","MSCredentialParameters","MSCredentialSpec","MSCredentials","MSDelay","MSDescription","MSExecAtPriorityFunctionCallback","MSFIDOCredentialAssertion","MSFIDOCredentialParameters","MSFIDOSignature","MSFIDOSignatureAssertion","MSFileSaver","MSGesture","MSGestureEvent","MSGraphicsTrust","MSHTMLWebViewElement","MSIPAddressInfo","MSIceWarningFlags","MSInboundPayload","MSInputMethodContext","MSInputMethodContextEventMap","MSJitter","MSLaunchUriCallback","MSLocalClientEvent","MSLocalClientEventBase","MSManipulationEvent","MSMediaKeyError","MSMediaKeyMessageEvent","MSMediaKeyNeededEvent","MSMediaKeySession","MSMediaKeys","MSNavigatorDoNotTrack","MSNetwork","MSNetworkConnectivityInfo","MSNetworkInterfaceType","MSOutboundNetwork","MSOutboundPayload","MSPacketLoss","MSPayloadBase","MSPointerEvent","MSPortRange","MSRangeCollection","MSRelayAddress","MSSignatureParameters","MSSiteModeEvent","MSStream","MSStreamReader","MSTransportDiagnosticsStats","MSUnsafeFunctionCallback","MSUtilization","MSVideoPayload","MSVideoRecvPayload","MSVideoResolutionDistribution","MSVideoSendPayload","MSWebViewAsyncOperation","MSWebViewAsyncOperationEventMap","MSWebViewSettings","Map","MapConstructor","Math","MediaDeviceInfo","MediaDevices","MediaDevicesEventMap","MediaElementAudioSourceNode","MediaEncryptedEvent","MediaEncryptedEventInit","MediaError","MediaKeyMessageEvent","MediaKeyMessageEventInit","MediaKeySession","MediaKeyStatusMap","MediaKeySystemAccess","MediaKeySystemConfiguration","MediaKeySystemMediaCapability","MediaKeys","MediaList","MediaQueryList","MediaQueryListListener","MediaSource","MediaStream","MediaStreamAudioSourceNode","MediaStreamConstraints","MediaStreamError","MediaStreamErrorEvent","MediaStreamErrorEventInit","MediaStreamEvent","MediaStreamEventInit","MediaStreamEventMap","MediaStreamTrack","MediaStreamTrackEvent","MediaStreamTrackEventInit","MediaStreamTrackEventMap","MediaTrackCapabilities","MediaTrackConstraintSet","MediaTrackConstraints","MediaTrackSettings","MediaTrackSupportedConstraints","MessageChannel","MessageEvent","MessageEventInit","MessagePort","MessagePortEventMap","MethodDecorator","MimeType","MimeTypeArray","Model123","Model456","MouseEvent","MouseEventInit","MouseWheelEvent","MsZoomToOptions","MutationCallback","MutationEvent","MutationObserver","MutationObserverInit","MutationRecord","NaN","NamedNodeMap","NavigationCompletedEvent","NavigationEvent","NavigationEventWithReferrer","Navigator","NavigatorBeacon","NavigatorConcurrentHardware","NavigatorContentUtils","NavigatorGeolocation","NavigatorID","NavigatorOnLine","NavigatorStorageUtils","NavigatorUserMedia","NavigatorUserMediaErrorCallback","NavigatorUserMediaSuccessCallback","Node","NodeBuffer","NodeFilter","NodeIterator","NodeJS","NodeList","NodeListOf","NodeModule","NodeProcess","NodeRequire","NodeRequireFunction","NodeSelector","Notification","NotificationEventMap","NotificationOptions","NotificationPermissionCallback","Number","NumberConstructor","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","Object","ObjectConstructor","ObjectURLOptions","OfflineAudioCompletionEvent","OfflineAudioContext","OfflineAudioContextEventMap","Option","OscillatorNode","OscillatorNodeEventMap","OverflowEvent","PageTransitionEvent","PannerNode","ParameterDecorator","ParentNode","Partial","Path2D","PaymentAddress","PaymentCurrencyAmount","PaymentDetails","PaymentDetailsModifier","PaymentItem","PaymentMethodData","PaymentOptions","PaymentRequest","PaymentRequestEventMap","PaymentRequestUpdateEvent","PaymentRequestUpdateEventInit","PaymentResponse","PaymentShippingOption","Pbkdf2Params","PerfWidgetExternal","Performance","PerformanceEntry","PerformanceMark","PerformanceMeasure","PerformanceNavigation","PerformanceNavigationTiming","PerformanceResourceTiming","PerformanceTiming","PeriodicWave","PeriodicWaveConstraints","PermissionRequest","PermissionRequestedEvent","Pick","Plugin","PluginArray","PointerEvent","PointerEventInit","PopStateEvent","PopStateEventInit","Position","PositionCallback","PositionError","PositionErrorCallback","PositionOptions","ProcessingInstruction","ProgressEvent","ProgressEventInit","Promise","PromiseConstructor","PromiseConstructorLike","PromiseLike","PromiseRejectionEvent","PromiseRejectionEventInit","PropertyDecorator","PropertyDescriptor","PropertyDescriptorMap","PropertyKey","Proxy","ProxyConstructor","ProxyHandler","PushManager","PushSubscription","PushSubscriptionOptions","PushSubscriptionOptionsInit","RTCConfiguration","RTCDTMFToneChangeEvent","RTCDTMFToneChangeEventInit","RTCDtlsFingerprint","RTCDtlsParameters","RTCDtlsTransport","RTCDtlsTransportEventMap","RTCDtlsTransportStateChangedEvent","RTCDtmfSender","RTCDtmfSenderEventMap","RTCIceCandidate","RTCIceCandidateAttributes","RTCIceCandidateComplete","RTCIceCandidateDictionary","RTCIceCandidateInit","RTCIceCandidatePair","RTCIceCandidatePairChangedEvent","RTCIceCandidatePairStats","RTCIceGatherCandidate","RTCIceGatherOptions","RTCIceGatherer","RTCIceGathererEvent","RTCIceGathererEventMap","RTCIceParameters","RTCIceServer","RTCIceTransport","RTCIceTransportEventMap","RTCIceTransportStateChangedEvent","RTCInboundRTPStreamStats","RTCMediaStreamTrackStats","RTCOfferOptions","RTCOutboundRTPStreamStats","RTCPeerConnection","RTCPeerConnectionErrorCallback","RTCPeerConnectionEventMap","RTCPeerConnectionIceEvent","RTCPeerConnectionIceEventInit","RTCRTPStreamStats","RTCRtcpFeedback","RTCRtcpParameters","RTCRtpCapabilities","RTCRtpCodecCapability","RTCRtpCodecParameters","RTCRtpContributingSource","RTCRtpEncodingParameters","RTCRtpFecParameters","RTCRtpHeaderExtension","RTCRtpHeaderExtensionParameters","RTCRtpParameters","RTCRtpReceiver","RTCRtpReceiverEventMap","RTCRtpRtxParameters","RTCRtpSender","RTCRtpSenderEventMap","RTCRtpUnhandled","RTCSessionDescription","RTCSessionDescriptionCallback","RTCSessionDescriptionInit","RTCSrtpKeyParam","RTCSrtpSdesParameters","RTCSrtpSdesTransport","RTCSrtpSdesTransportEventMap","RTCSsrcConflictEvent","RTCSsrcRange","RTCStats","RTCStatsCallback","RTCStatsProvider","RTCStatsReport","RTCTransport","RTCTransportStats","RandomSource","Range","RangeError","RangeErrorConstructor","React","ReadableStream","ReadableStreamReader","Readonly","ReadonlyArray","ReadonlyMap","ReadonlySet","Record","ReferenceError","ReferenceErrorConstructor","Reflect","RegExp","RegExpConstructor","RegExpExecArray","RegExpMatchArray","RegistrationOptions","Request","RequestInfo","RequestInit","Response","ResponseInit","RsaHashedImportParams","RsaHashedKeyAlgorithm","RsaHashedKeyGenParams","RsaKeyAlgorithm","RsaKeyGenParams","RsaOaepParams","RsaOtherPrimesInfo","RsaPssParams","SVGAElement","SVGAngle","SVGAnimatedAngle","SVGAnimatedBoolean","SVGAnimatedEnumeration","SVGAnimatedInteger","SVGAnimatedLength","SVGAnimatedLengthList","SVGAnimatedNumber","SVGAnimatedNumberList","SVGAnimatedPoints","SVGAnimatedPreserveAspectRatio","SVGAnimatedRect","SVGAnimatedString","SVGAnimatedTransformList","SVGCircleElement","SVGClipPathElement","SVGComponentTransferFunctionElement","SVGDefsElement","SVGDescElement","SVGElement","SVGElementEventMap","SVGElementInstance","SVGElementInstanceList","SVGEllipseElement","SVGFEBlendElement","SVGFEColorMatrixElement","SVGFEComponentTransferElement","SVGFECompositeElement","SVGFEConvolveMatrixElement","SVGFEDiffuseLightingElement","SVGFEDisplacementMapElement","SVGFEDistantLightElement","SVGFEFloodElement","SVGFEFuncAElement","SVGFEFuncBElement","SVGFEFuncGElement","SVGFEFuncRElement","SVGFEGaussianBlurElement","SVGFEImageElement","SVGFEMergeElement","SVGFEMergeNodeElement","SVGFEMorphologyElement","SVGFEOffsetElement","SVGFEPointLightElement","SVGFESpecularLightingElement","SVGFESpotLightElement","SVGFETileElement","SVGFETurbulenceElement","SVGFilterElement","SVGFilterPrimitiveStandardAttributes","SVGFitToViewBox","SVGForeignObjectElement","SVGGElement","SVGGradientElement","SVGGraphicsElement","SVGImageElement","SVGLength","SVGLengthList","SVGLineElement","SVGLinearGradientElement","SVGMarkerElement","SVGMaskElement","SVGMatrix","SVGMetadataElement","SVGNumber","SVGNumberList","SVGPathElement","SVGPathSeg","SVGPathSegArcAbs","SVGPathSegArcRel","SVGPathSegClosePath","SVGPathSegCurvetoCubicAbs","SVGPathSegCurvetoCubicRel","SVGPathSegCurvetoCubicSmoothAbs","SVGPathSegCurvetoCubicSmoothRel","SVGPathSegCurvetoQuadraticAbs","SVGPathSegCurvetoQuadraticRel","SVGPathSegCurvetoQuadraticSmoothAbs","SVGPathSegCurvetoQuadraticSmoothRel","SVGPathSegLinetoAbs","SVGPathSegLinetoHorizontalAbs","SVGPathSegLinetoHorizontalRel","SVGPathSegLinetoRel","SVGPathSegLinetoVerticalAbs","SVGPathSegLinetoVerticalRel","SVGPathSegList","SVGPathSegMovetoAbs","SVGPathSegMovetoRel","SVGPatternElement","SVGPoint","SVGPointList","SVGPolygonElement","SVGPolylineElement","SVGPreserveAspectRatio","SVGRadialGradientElement","SVGRect","SVGRectElement","SVGSVGElement","SVGSVGElementEventMap","SVGScriptElement","SVGStopElement","SVGStringList","SVGStyleElement","SVGSwitchElement","SVGSymbolElement","SVGTSpanElement","SVGTests","SVGTextContentElement","SVGTextElement","SVGTextPathElement","SVGTextPositioningElement","SVGTitleElement","SVGTransform","SVGTransformList","SVGURIReference","SVGUnitTypes","SVGUseElement","SVGViewElement","SVGZoomAndPan","SVGZoomEvent","ScopedCredential","ScopedCredentialDescriptor","ScopedCredentialInfo","ScopedCredentialOptions","ScopedCredentialParameters","Screen","ScreenEventMap","ScriptNotifyEvent","ScriptProcessorNode","ScriptProcessorNodeEventMap","ScrollBehavior","ScrollIntoViewOptions","ScrollLogicalPosition","ScrollOptions","ScrollRestoration","ScrollToOptions","Selection","ServiceWorker","ServiceWorkerContainer","ServiceWorkerContainerEventMap","ServiceWorkerEventMap","ServiceWorkerMessageEvent","ServiceWorkerMessageEventInit","ServiceWorkerRegistration","ServiceWorkerRegistrationEventMap","Set","SetConstructor","ShadowRoot","ShadowRootInit","SlowBuffer","SourceBuffer","SourceBufferList","SpeechSynthesis","SpeechSynthesisEvent","SpeechSynthesisEventInit","SpeechSynthesisEventMap","SpeechSynthesisUtterance","SpeechSynthesisUtteranceEventMap","SpeechSynthesisVoice","StereoPannerNode","Storage","StorageEvent","StorageEventInit","StoreExceptionsInformation","StoreSiteSpecificExceptionsInformation","String","StringConstructor","StyleMedia","StyleSheet","StyleSheetList","StyleSheetPageList","SubtleCrypto","Symbol","SymbolConstructor","SyncManager","SyntaxError","SyntaxErrorConstructor","TemplateStringsArray","Text","TextEvent","TextMetrics","TextStreamBase","TextStreamReader","TextStreamWriter","TextTrack","TextTrackCue","TextTrackCueEventMap","TextTrackCueList","TextTrackEventMap","TextTrackList","TextTrackListEventMap","Thenable","TimeRanges","Touch","TouchEvent","TouchList","TrackEvent","TrackEventInit","TransitionEvent","TransitionEventInit","TreeWalker","TypeError","TypeErrorConstructor","TypedPropertyDescriptor","UIEvent","UIEventInit","URIError","URIErrorConstructor","URL","URLSearchParams","USVString","Uint16Array","Uint16ArrayConstructor","Uint32Array","Uint32ArrayConstructor","Uint8Array","Uint8ArrayConstructor","Uint8ClampedArray","Uint8ClampedArrayConstructor","UnviewableContentIdentifiedEvent","VBArray","VBArrayConstructor","ValidityState","VarDate","VideoPlaybackQuality","VideoTrack","VideoTrackList","VideoTrackListEventMap","VoidFunction","WEBGL_compressed_texture_s3tc","WEBGL_debug_renderer_info","WEBGL_depth_texture","WScript","WaveShaperNode","WeakMap","WeakMapConstructor","WeakSet","WeakSetConstructor","WebAuthentication","WebAuthnAssertion","WebAuthnExtensions","WebGLActiveInfo","WebGLBuffer","WebGLContextAttributes","WebGLContextEvent","WebGLContextEventInit","WebGLFramebuffer","WebGLObject","WebGLProgram","WebGLRenderbuffer","WebGLRenderingContext","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebKitCSSMatrix","WebKitDirectoryEntry","WebKitDirectoryReader","WebKitEntriesCallback","WebKitEntry","WebKitErrorCallback","WebKitFileCallback","WebKitFileEntry","WebKitFileSystem","WebKitPoint","WebSocket","WebSocketEventMap","WheelEvent","WheelEventInit","Window","WindowBase64","WindowConsole","WindowEventMap","WindowLocalStorage","WindowSessionStorage","WindowTimers","WindowTimersExtension","Worker","WorkerEventMap","WritableStream","XMLDocument","XMLHttpRequest","XMLHttpRequestEventMap","XMLHttpRequestEventTarget","XMLHttpRequestEventTargetEventMap","XMLHttpRequestUpload","XMLSerializer","XPathEvaluator","XPathExpression","XPathNSResolver","XPathResult","XSLTProcessor","_","__dirname","__filename","a","abstract","addEventListener","alert","any","applicationCache","as","async","atob","await","b","blur","boolean","break","btoa","caches","cancelAnimationFrame","captureEvents","case","catch","class","clearImmediate","clearInterval","clearTimeout","clientInformation","close","closed","confirm","console","const","constructor","continue","count","crypto","customElements","dddd","debugger","declare","decodeURI","decodeURIComponent","default","defaultStatus","delete","departFocus","devicePixelRatio","dispatchEvent","do","doIt","doNotTrack","doUpdateSnippet","document","element","else","encodeURI","encodeURIComponent","enum","eval","event","export","exports","extends","external","false","fetch","finally","findSnippetById","focus","foo","foon","fooo","for","frameElement","frames","from","function","fuzzy_match","fuzzy_match_simple","get","getComputedStyle","getMatchedCSSRules","getSelection","global","global","history","if","implements","import","importScripts","in","indexedDB","innerHeight","innerWidth","instanceof","interface","is","isFinite","isNaN","isSecureContext","jQuery","keyof","length","let","localStorage","location","locationbar","matchMedia","menubar","module","module","more","moveBy","moveTo","msContentScript","msCredentials","msWriteProfilerMark","name","namespace","navigator","never","new","null","number","object","of","offscreenBuffering","onabort","onafterprint","onbeforeprint","onbeforeunload","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncompassneedscalibration","oncontextmenu","ondblclick","ondevicelight","ondevicemotion","ondeviceorientation","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onmsgesturechange","onmsgesturedoubletap","onmsgestureend","onmsgesturehold","onmsgesturestart","onmsgesturetap","onmsinertiastart","onmspointercancel","onmspointerdown","onmspointerenter","onmspointerleave","onmspointermove","onmspointerout","onmspointerover","onmspointerup","onoffline","ononline","onorientationchange","onpagehide","onpageshow","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onpopstate","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onunload","onvolumechange","onwaiting","onwheel","open","opener","orientation","outerHeight","outerWidth","package","pageXOffset","pageYOffset","parent","parseFloat","parseInt","payloadtype","performance","personalbar","postMessage","print","private","process","prompt","protected","public","readonly","releaseEvents","removeEventListener","requestAnimationFrame","require","require","resizeBy","resizeTo","return","screen","screenLeft","screenTop","screenX","screenY","scroll","scrollBy","scrollTo","scrollX","scrollY","scrollbars","self","sessionStorage","set","setImmediate","setInterval","setTimeout","speechSynthesis","static","status","statusbar","stop","string","styleMedia","super","switch","symbol","this","throw","toString","toolbar","top","true","try","type","typedoc","typeof","undefined","undefined","updateSnippet","uuid","vSomething","var","void","webkitCancelAnimationFrame","webkitConvertPointFromNodeToPage","webkitConvertPointFromPageToNode","webkitRTCPeerConnection","webkitRequestAnimationFrame","while","window","with","yield"] }; });
src/vs/base/test/common/filters.perf.data.js
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00016429020615760237, 0.00016429020615760237, 0.00016429020615760237, 0.00016429020615760237, 0 ]
{ "id": 1, "code_window": [ "\t\t\twebPreferences: {\n", "\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\tnodeIntegration: true,\n", "\t\t\t\tenableWebSQL: false,\n", "\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\timages: false,\n", "\t\t\t\twebgl: false,\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/sharedProcess.ts", "type": "add", "edit_start_line_idx": 47 }
{ "displayName": "Shaderlab Language Basics", "description": "Provides syntax highlighting and bracket matching in Shaderlab files." }
extensions/shaderlab/package.nls.json
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00016980679356493056, 0.00016980679356493056, 0.00016980679356493056, 0.00016980679356493056, 0 ]
{ "id": 2, "code_window": [ "\t\t\t\twebPreferences: {\n", "\t\t\t\t\tpreload: URI.parse(this.doGetPreloadUrl()).fsPath,\n", "\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\twebviewTag: true,\n", "\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel),\n", "\t\t\t\t\t...this.environmentService.sandbox ?\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/window.ts", "type": "add", "edit_start_line_idx": 171 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; import { memoize } from 'vs/base/common/decorators'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { BrowserWindow, ipcMain, WebContents, Event as ElectronEvent } from 'electron'; import { ISharedProcess } from 'vs/platform/ipc/electron-main/sharedProcessMainService'; import { Barrier } from 'vs/base/common/async'; import { ILogService } from 'vs/platform/log/common/log'; import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService'; import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService'; import { toDisposable, DisposableStore } from 'vs/base/common/lifecycle'; import { Event } from 'vs/base/common/event'; export class SharedProcess implements ISharedProcess { private barrier = new Barrier(); private window: BrowserWindow | null = null; private readonly _whenReady: Promise<void>; constructor( private readonly machineId: string, private userEnv: NodeJS.ProcessEnv, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService, @ILogService private readonly logService: ILogService, @IThemeMainService private readonly themeMainService: IThemeMainService ) { // overall ready promise when shared process signals initialization is done this._whenReady = new Promise<void>(c => ipcMain.once('vscode:shared-process->electron-main=init-done', () => c(undefined))); } @memoize private get _whenIpcReady(): Promise<void> { this.window = new BrowserWindow({ show: false, backgroundColor: this.themeMainService.getBackgroundColor(), webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, nodeIntegration: true, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, images: false, webgl: false, disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer } }); const config = { appRoot: this.environmentService.appRoot, machineId: this.machineId, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, userEnv: this.userEnv, windowId: this.window.id }; const url = `${require.toUrl('vs/code/electron-browser/sharedProcess/sharedProcess.html')}?config=${encodeURIComponent(JSON.stringify(config))}`; this.window.loadURL(url); // Prevent the window from dying const onClose = (e: ElectronEvent) => { this.logService.trace('SharedProcess#close prevented'); // We never allow to close the shared process unless we get explicitly disposed() e.preventDefault(); // Still hide the window though if visible if (this.window && this.window.isVisible()) { this.window.hide(); } }; this.window.on('close', onClose); const disposables = new DisposableStore(); this.lifecycleMainService.onWillShutdown(() => { disposables.dispose(); // Shut the shared process down when we are quitting // // Note: because we veto the window close, we must first remove our veto. // Otherwise the application would never quit because the shared process // window is refusing to close! // if (this.window) { this.window.removeListener('close', onClose); } // Electron seems to crash on Windows without this setTimeout :| setTimeout(() => { try { if (this.window) { this.window.close(); } } catch (err) { // ignore, as electron is already shutting down } this.window = null; }, 0); }); return new Promise<void>(c => { // send payload once shared process is ready to receive it disposables.add(Event.once(Event.fromNodeEventEmitter(ipcMain, 'vscode:shared-process->electron-main=ready-for-payload', ({ sender }: { sender: WebContents }) => sender))(sender => { sender.send('vscode:electron-main->shared-process=payload', { sharedIPCHandle: this.environmentService.sharedIPCHandle, args: this.environmentService.args, logLevel: this.logService.getLevel() }); // signal exit to shared process when we get disposed disposables.add(toDisposable(() => sender.send('vscode:electron-main->shared-process=exit'))); // complete IPC-ready promise when shared process signals this to us ipcMain.once('vscode:shared-process->electron-main=ipc-ready', () => c(undefined)); })); }); } spawn(userEnv: NodeJS.ProcessEnv): void { this.userEnv = { ...this.userEnv, ...userEnv }; this.barrier.open(); } async whenReady(): Promise<void> { await this.barrier.wait(); await this._whenReady; } async whenIpcReady(): Promise<void> { await this.barrier.wait(); await this._whenIpcReady; } toggle(): void { if (!this.window || this.window.isVisible()) { this.hide(); } else { this.show(); } } show(): void { if (this.window) { this.window.show(); this.window.webContents.openDevTools(); } } hide(): void { if (this.window) { this.window.webContents.closeDevTools(); this.window.hide(); } } }
src/vs/code/electron-main/sharedProcess.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0014246716164052486, 0.0003172334982082248, 0.00016343929746653885, 0.00017159721755888313, 0.00038658862467855215 ]
{ "id": 2, "code_window": [ "\t\t\t\twebPreferences: {\n", "\t\t\t\t\tpreload: URI.parse(this.doGetPreloadUrl()).fsPath,\n", "\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\twebviewTag: true,\n", "\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel),\n", "\t\t\t\t\t...this.environmentService.sandbox ?\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/window.ts", "type": "add", "edit_start_line_idx": 171 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import * as fs from 'fs'; import * as path from 'path'; import * as vfs from 'vinyl-fs'; import * as filter from 'gulp-filter'; import * as json from 'gulp-json-editor'; import * as _ from 'underscore'; import * as util from './util'; const electron = require('gulp-atom-electron'); const root = path.dirname(path.dirname(__dirname)); const product = JSON.parse(fs.readFileSync(path.join(root, 'product.json'), 'utf8')); const commit = util.getVersion(root); const darwinCreditsTemplate = product.darwinCredits && _.template(fs.readFileSync(path.join(root, product.darwinCredits), 'utf8')); function darwinBundleDocumentType(extensions: string[], icon: string) { return { name: product.nameLong + ' document', role: 'Editor', ostypes: ["TEXT", "utxt", "TUTX", "****"], extensions: extensions, iconFile: icon }; } export const config = { version: util.getElectronVersion(), productAppName: product.nameLong, companyName: 'Microsoft Corporation', copyright: 'Copyright (C) 2019 Microsoft. All rights reserved', darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', darwinHelpBookFolder: 'VS Code HelpBook', darwinHelpBookName: 'VS Code HelpBook', darwinBundleDocumentTypes: [ darwinBundleDocumentType(["bat", "cmd"], 'resources/darwin/bat.icns'), darwinBundleDocumentType(["bowerrc"], 'resources/darwin/bower.icns'), darwinBundleDocumentType(["c", "h"], 'resources/darwin/c.icns'), darwinBundleDocumentType(["config", "editorconfig", "gitattributes", "gitconfig", "gitignore", "ini"], 'resources/darwin/config.icns'), darwinBundleDocumentType(["cc", "cpp", "cxx", "c++", "hh", "hpp", "hxx", "h++"], 'resources/darwin/cpp.icns'), darwinBundleDocumentType(["cs", "csx"], 'resources/darwin/csharp.icns'), darwinBundleDocumentType(["css"], 'resources/darwin/css.icns'), darwinBundleDocumentType(["go"], 'resources/darwin/go.icns'), darwinBundleDocumentType(["asp", "aspx", "cshtml", "htm", "html", "jshtm", "jsp", "phtml", "shtml"], 'resources/darwin/html.icns'), darwinBundleDocumentType(["jade"], 'resources/darwin/jade.icns'), darwinBundleDocumentType(["jav", "java"], 'resources/darwin/java.icns'), darwinBundleDocumentType(["js", "jscsrc", "jshintrc", "mjs", "cjs"], 'resources/darwin/javascript.icns'), darwinBundleDocumentType(["json"], 'resources/darwin/json.icns'), darwinBundleDocumentType(["less"], 'resources/darwin/less.icns'), darwinBundleDocumentType(["markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn"], 'resources/darwin/markdown.icns'), darwinBundleDocumentType(["php"], 'resources/darwin/php.icns'), darwinBundleDocumentType(["ps1", "psd1", "psm1"], 'resources/darwin/powershell.icns'), darwinBundleDocumentType(["py"], 'resources/darwin/python.icns'), darwinBundleDocumentType(["gemspec", "rb"], 'resources/darwin/ruby.icns'), darwinBundleDocumentType(["scss"], 'resources/darwin/sass.icns'), darwinBundleDocumentType(["bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "profile", "rhistory", "rprofile", "sh", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"], 'resources/darwin/shell.icns'), darwinBundleDocumentType(["sql"], 'resources/darwin/sql.icns'), darwinBundleDocumentType(["ts"], 'resources/darwin/typescript.icns'), darwinBundleDocumentType(["tsx", "jsx"], 'resources/darwin/react.icns'), darwinBundleDocumentType(["vue"], 'resources/darwin/vue.icns'), darwinBundleDocumentType(["ascx", "csproj", "dtd", "wxi", "wxl", "wxs", "xml", "xaml"], 'resources/darwin/xml.icns'), darwinBundleDocumentType(["eyaml", "eyml", "yaml", "yml"], 'resources/darwin/yaml.icns'), darwinBundleDocumentType(["clj", "cljs", "cljx", "clojure", "code-workspace", "coffee", "containerfile", "ctp", "dockerfile", "dot", "edn", "fs", "fsi", "fsscript", "fsx", "handlebars", "hbs", "lua", "m", "makefile", "ml", "mli", "pl", "pl6", "pm", "pm6", "pod", "pp", "properties", "psgi", "pug", "r", "rs", "rt", "svg", "svgz", "t", "txt", "vb", "xcodeproj", "xcworkspace"], 'resources/darwin/default.icns') ], darwinBundleURLTypes: [{ role: 'Viewer', name: product.nameLong, urlSchemes: [product.urlProtocol] }], darwinForceDarkModeSupport: true, darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined, linuxExecutableName: product.applicationName, winIcon: 'resources/win32/code.ico', token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined, repo: product.electronRepository || undefined }; function getElectron(arch: string): () => NodeJS.ReadWriteStream { return () => { const electronOpts = _.extend({}, config, { platform: process.platform, arch, ffmpegChromium: true, keepDefaultApp: true }); return vfs.src('package.json') .pipe(json({ name: product.nameShort })) .pipe(electron(electronOpts)) .pipe(filter(['**', '!**/app/package.json'])) .pipe(vfs.dest('.build/electron')); }; } async function main(arch = process.arch): Promise<void> { const version = util.getElectronVersion(); const electronPath = path.join(root, '.build', 'electron'); const versionFile = path.join(electronPath, 'version'); const isUpToDate = fs.existsSync(versionFile) && fs.readFileSync(versionFile, 'utf8') === `${version}`; if (!isUpToDate) { await util.rimraf(electronPath)(); await util.streamToPromise(getElectron(arch)()); } } if (require.main === module) { main(process.argv[2]).catch(err => { console.error(err); process.exit(1); }); }
build/lib/electron.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0001740860752761364, 0.00017056238721124828, 0.0001674024242674932, 0.00017079003737308085, 0.000002253017783004907 ]
{ "id": 2, "code_window": [ "\t\t\t\twebPreferences: {\n", "\t\t\t\t\tpreload: URI.parse(this.doGetPreloadUrl()).fsPath,\n", "\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\twebviewTag: true,\n", "\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel),\n", "\t\t\t\t\t...this.environmentService.sandbox ?\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/window.ts", "type": "add", "edit_start_line_idx": 171 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import * as path from 'vs/base/common/path'; import { getPathFromAmdModule } from 'vs/base/common/amd'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import * as glob from 'vs/base/common/glob'; import { URI } from 'vs/base/common/uri'; import { deserializeSearchError, IFolderQuery, ISearchRange, ITextQuery, ITextSearchContext, ITextSearchMatch, QueryType, SearchErrorCode, ISerializedFileMatch } from 'vs/workbench/services/search/common/search'; import { TextSearchEngineAdapter } from 'vs/workbench/services/search/node/textSearchAdapter'; const TEST_FIXTURES = path.normalize(getPathFromAmdModule(require, './fixtures')); const EXAMPLES_FIXTURES = path.join(TEST_FIXTURES, 'examples'); const MORE_FIXTURES = path.join(TEST_FIXTURES, 'more'); const TEST_ROOT_FOLDER: IFolderQuery = { folder: URI.file(TEST_FIXTURES) }; const ROOT_FOLDER_QUERY: IFolderQuery[] = [ TEST_ROOT_FOLDER ]; const MULTIROOT_QUERIES: IFolderQuery[] = [ { folder: URI.file(EXAMPLES_FIXTURES) }, { folder: URI.file(MORE_FIXTURES) } ]; function doSearchTest(query: ITextQuery, expectedResultCount: number | Function): Promise<ISerializedFileMatch[]> { const engine = new TextSearchEngineAdapter(query); let c = 0; const results: ISerializedFileMatch[] = []; return engine.search(new CancellationTokenSource().token, _results => { if (_results) { c += _results.reduce((acc, cur) => acc + cur.numMatches!, 0); results.push(..._results); } }, () => { }).then(() => { if (typeof expectedResultCount === 'function') { assert(expectedResultCount(c)); } else { assert.equal(c, expectedResultCount, `rg ${c} !== ${expectedResultCount}`); } return results; }); } suite('TextSearch-integration', function () { this.timeout(1000 * 60); // increase timeout for this suite test('Text: GameOfLife', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'GameOfLife' }, }; return doSearchTest(config, 4); }); test('Text: GameOfLife (RegExp)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'Game.?fL\\w?fe', isRegExp: true } }; return doSearchTest(config, 4); }); test('Text: GameOfLife (unicode escape sequences)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'G\\u{0061}m\\u0065OfLife', isRegExp: true } }; return doSearchTest(config, 4); }); test('Text: GameOfLife (unicode escape sequences, force PCRE2)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: '(?<!a)G\\u{0061}m\\u0065OfLife', isRegExp: true } }; return doSearchTest(config, 4); }); test('Text: GameOfLife (PCRE2 RegExp)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, usePCRE2: true, contentPattern: { pattern: 'Life(?!P)', isRegExp: true } }; return doSearchTest(config, 8); }); test('Text: GameOfLife (RegExp to EOL)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'GameOfLife.*', isRegExp: true } }; return doSearchTest(config, 4); }); test('Text: GameOfLife (Word Match, Case Sensitive)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'GameOfLife', isWordMatch: true, isCaseSensitive: true } }; return doSearchTest(config, 4); }); test('Text: GameOfLife (Word Match, Spaces)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: ' GameOfLife ', isWordMatch: true } }; return doSearchTest(config, 1); }); test('Text: GameOfLife (Word Match, Punctuation and Spaces)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: ', as =', isWordMatch: true } }; return doSearchTest(config, 1); }); test('Text: Helvetica (UTF 16)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'Helvetica' } }; return doSearchTest(config, 3); }); test('Text: e', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'e' } }; return doSearchTest(config, 788); }); test('Text: e (with excludes)', () => { const config: any = { folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'e' }, excludePattern: { '**/examples': true } }; return doSearchTest(config, 394); }); test('Text: e (with includes)', () => { const config: any = { folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'e' }, includePattern: { '**/examples/**': true } }; return doSearchTest(config, 394); }); // TODO // test('Text: e (with absolute path excludes)', () => { // const config: any = { // folderQueries: ROOT_FOLDER_QUERY, // contentPattern: { pattern: 'e' }, // excludePattern: makeExpression(path.join(TEST_FIXTURES, '**/examples')) // }; // return doSearchTest(config, 394); // }); // test('Text: e (with mixed absolute/relative path excludes)', () => { // const config: any = { // folderQueries: ROOT_FOLDER_QUERY, // contentPattern: { pattern: 'e' }, // excludePattern: makeExpression(path.join(TEST_FIXTURES, '**/examples'), '*.css') // }; // return doSearchTest(config, 310); // }); test('Text: sibling exclude', () => { const config: any = { folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'm' }, includePattern: makeExpression('**/site*'), excludePattern: { '*.css': { when: '$(basename).less' } } }; return doSearchTest(config, 1); }); test('Text: e (with includes and exclude)', () => { const config: any = { folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'e' }, includePattern: { '**/examples/**': true }, excludePattern: { '**/examples/small.js': true } }; return doSearchTest(config, 371); }); test('Text: a (capped)', () => { const maxResults = 520; const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'a' }, maxResults }; return doSearchTest(config, maxResults); }); test('Text: a (no results)', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'ahsogehtdas' } }; return doSearchTest(config, 0); }); test('Text: -size', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: '-size' } }; return doSearchTest(config, 9); }); test('Multiroot: Conway', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: MULTIROOT_QUERIES, contentPattern: { pattern: 'conway' } }; return doSearchTest(config, 8); }); test('Multiroot: e with partial global exclude', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: MULTIROOT_QUERIES, contentPattern: { pattern: 'e' }, excludePattern: makeExpression('**/*.txt') }; return doSearchTest(config, 394); }); test('Multiroot: e with global excludes', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: MULTIROOT_QUERIES, contentPattern: { pattern: 'e' }, excludePattern: makeExpression('**/*.txt', '**/*.js') }; return doSearchTest(config, 0); }); test('Multiroot: e with folder exclude', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: [ { folder: URI.file(EXAMPLES_FIXTURES), excludePattern: makeExpression('**/e*.js') }, { folder: URI.file(MORE_FIXTURES) } ], contentPattern: { pattern: 'e' } }; return doSearchTest(config, 298); }); test('Text: 语', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: '语' } }; return doSearchTest(config, 1).then(results => { const matchRange = (<ITextSearchMatch>results[0].results![0]).ranges; assert.deepEqual(matchRange, [{ startLineNumber: 0, startColumn: 1, endLineNumber: 0, endColumn: 2 }]); }); }); test('Multiple matches on line: h\\d,', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'h\\d,', isRegExp: true } }; return doSearchTest(config, 15).then(results => { assert.equal(results.length, 3); assert.equal(results[0].results!.length, 1); const match = <ITextSearchMatch>results[0].results![0]; assert.equal((<ISearchRange[]>match.ranges).length, 5); }); }); test('Search with context matches', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'compiler.typeCheck();' }, beforeContext: 1, afterContext: 2 }; return doSearchTest(config, 4).then(results => { assert.equal(results.length, 4); assert.equal((<ITextSearchContext>results[0].results![0]).lineNumber, 25); assert.equal((<ITextSearchContext>results[0].results![0]).text, ' compiler.addUnit(prog,"input.ts");'); // assert.equal((<ITextSearchMatch>results[1].results[0]).preview.text, ' compiler.typeCheck();\n'); // See https://github.com/BurntSushi/ripgrep/issues/1095 assert.equal((<ITextSearchContext>results[2].results![0]).lineNumber, 27); assert.equal((<ITextSearchContext>results[2].results![0]).text, ' compiler.emit();'); assert.equal((<ITextSearchContext>results[3].results![0]).lineNumber, 28); assert.equal((<ITextSearchContext>results[3].results![0]).text, ''); }); }); suite('error messages', () => { test('invalid encoding', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: [ { ...TEST_ROOT_FOLDER, fileEncoding: 'invalidEncoding' } ], contentPattern: { pattern: 'test' }, }; return doSearchTest(config, 0).then(() => { throw new Error('expected fail'); }, err => { const searchError = deserializeSearchError(err); assert.equal(searchError.message, 'Unknown encoding: invalidEncoding'); assert.equal(searchError.code, SearchErrorCode.unknownEncoding); }); }); test('invalid regex case 1', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: ')', isRegExp: true }, }; return doSearchTest(config, 0).then(() => { throw new Error('expected fail'); }, err => { const searchError = deserializeSearchError(err); const regexParseErrorForUnclosedParenthesis = 'Regex parse error: unmatched closing parenthesis'; assert.equal(searchError.message, regexParseErrorForUnclosedParenthesis); assert.equal(searchError.code, SearchErrorCode.regexParseError); }); }); test('invalid regex case 2', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: '(?<!a.*)', isRegExp: true }, }; return doSearchTest(config, 0).then(() => { throw new Error('expected fail'); }, err => { const searchError = deserializeSearchError(err); const regexParseErrorForLookAround = 'Regex parse error: lookbehind assertion is not fixed length'; assert.equal(searchError.message, regexParseErrorForLookAround); assert.equal(searchError.code, SearchErrorCode.regexParseError); }); }); test('invalid glob', () => { const config: ITextQuery = { type: QueryType.Text, folderQueries: ROOT_FOLDER_QUERY, contentPattern: { pattern: 'foo' }, includePattern: { '{{}': true } }; return doSearchTest(config, 0).then(() => { throw new Error('expected fail'); }, err => { const searchError = deserializeSearchError(err); assert.equal(searchError.message, 'Error parsing glob \'/{{}\': nested alternate groups are not allowed'); assert.equal(searchError.code, SearchErrorCode.globParseError); }); }); }); }); function makeExpression(...patterns: string[]): glob.IExpression { return patterns.reduce((glob, pattern) => { // glob.ts needs forward slashes pattern = pattern.replace(/\\/g, '/'); glob[pattern] = true; return glob; }, Object.create(null)); }
src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0003531930560711771, 0.0001760053273756057, 0.00016559513460379094, 0.0001725529582472518, 0.000026790039555635303 ]
{ "id": 2, "code_window": [ "\t\t\t\twebPreferences: {\n", "\t\t\t\t\tpreload: URI.parse(this.doGetPreloadUrl()).fsPath,\n", "\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\twebviewTag: true,\n", "\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel),\n", "\t\t\t\t\t...this.environmentService.sandbox ?\n" ], "labels": [ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/code/electron-main/window.ts", "type": "add", "edit_start_line_idx": 171 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; import { URI } from 'vs/base/common/uri'; import { toResource, IEditorCommandsContext, SideBySideEditor, IEditorIdentifier, SaveReason, SideBySideEditorInput, EditorsOrder } from 'vs/workbench/common/editor'; import { IWindowOpenable, IOpenWindowOptions, isWorkspaceToOpen, IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerFocusCondition, TextFileContentProvider, VIEWLET_ID, IExplorerService, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, ExplorerCompressedLastFocusContext, FilesExplorerFocusCondition, ExplorerFolderContext } from 'vs/workbench/contrib/files/common/files'; import { ExplorerViewPaneContainer } from 'vs/workbench/contrib/files/browser/explorerViewlet'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { IListService } from 'vs/platform/list/browser/listService'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IFileService } from 'vs/platform/files/common/files'; import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; import { isWindows } from 'vs/base/common/platform'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { getResourceForCommand, getMultiSelectedResources, getOpenEditorsViewMultiSelection } from 'vs/workbench/contrib/files/browser/files'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspaces/common/workspaceEditing'; import { getMultiSelectedEditorContexts } from 'vs/workbench/browser/parts/editor/editorCommands'; import { Schemas } from 'vs/base/common/network'; import { INotificationService } from 'vs/platform/notification/common/notification'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IEditorService, SIDE_GROUP, ISaveEditorsOptions } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupsService, GroupsOrder, IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; import { ILabelService } from 'vs/platform/label/common/label'; import { basename, joinPath, isEqual } from 'vs/base/common/resources'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { UNTITLED_WORKSPACE_NAME } from 'vs/platform/workspaces/common/workspaces'; import { coalesce } from 'vs/base/common/arrays'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeEditorWidget'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; import { IUriIdentityService } from 'vs/workbench/services/uriIdentity/common/uriIdentity'; import { openEditorWith } from 'vs/workbench/services/editor/common/editorOpenWith'; // Commands export const REVEAL_IN_EXPLORER_COMMAND_ID = 'revealInExplorer'; export const REVERT_FILE_COMMAND_ID = 'workbench.action.files.revert'; export const OPEN_TO_SIDE_COMMAND_ID = 'explorer.openToSide'; export const OPEN_WITH_EXPLORER_COMMAND_ID = 'explorer.openWith'; export const SELECT_FOR_COMPARE_COMMAND_ID = 'selectForCompare'; export const COMPARE_SELECTED_COMMAND_ID = 'compareSelected'; export const COMPARE_RESOURCE_COMMAND_ID = 'compareFiles'; export const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.action.compareWithSaved'; export const COPY_PATH_COMMAND_ID = 'copyFilePath'; export const COPY_RELATIVE_PATH_COMMAND_ID = 'copyRelativeFilePath'; export const SAVE_FILE_AS_COMMAND_ID = 'workbench.action.files.saveAs'; export const SAVE_FILE_AS_LABEL = nls.localize('saveAs', "Save As..."); export const SAVE_FILE_COMMAND_ID = 'workbench.action.files.save'; export const SAVE_FILE_LABEL = nls.localize('save', "Save"); export const SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID = 'workbench.action.files.saveWithoutFormatting'; export const SAVE_FILE_WITHOUT_FORMATTING_LABEL = nls.localize('saveWithoutFormatting', "Save without Formatting"); export const SAVE_ALL_COMMAND_ID = 'saveAll'; export const SAVE_ALL_LABEL = nls.localize('saveAll', "Save All"); export const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.files.action.saveAllInGroup'; export const SAVE_FILES_COMMAND_ID = 'workbench.action.files.saveFiles'; export const OpenEditorsGroupContext = new RawContextKey<boolean>('groupFocusedInOpenEditors', false); export const OpenEditorsDirtyEditorContext = new RawContextKey<boolean>('dirtyEditorFocusedInOpenEditors', false); export const OpenEditorsReadonlyEditorContext = new RawContextKey<boolean>('readonlyEditorFocusedInOpenEditors', false); export const ResourceSelectedForCompareContext = new RawContextKey<boolean>('resourceSelectedForCompare', false); export const REMOVE_ROOT_FOLDER_COMMAND_ID = 'removeRootFolder'; export const REMOVE_ROOT_FOLDER_LABEL = nls.localize('removeFolderFromWorkspace', "Remove Folder from Workspace"); export const PREVIOUS_COMPRESSED_FOLDER = 'previousCompressedFolder'; export const NEXT_COMPRESSED_FOLDER = 'nextCompressedFolder'; export const FIRST_COMPRESSED_FOLDER = 'firstCompressedFolder'; export const LAST_COMPRESSED_FOLDER = 'lastCompressedFolder'; export const NEW_UNTITLED_FILE_COMMAND_ID = 'workbench.action.files.newUntitledFile'; export const NEW_UNTITLED_FILE_LABEL = nls.localize('newUntitledFile', "New Untitled File"); export const openWindowCommand = (accessor: ServicesAccessor, toOpen: IWindowOpenable[], options?: IOpenWindowOptions) => { if (Array.isArray(toOpen)) { const hostService = accessor.get(IHostService); const environmentService = accessor.get(IEnvironmentService); // rewrite untitled: workspace URIs to the absolute path on disk toOpen = toOpen.map(openable => { if (isWorkspaceToOpen(openable) && openable.workspaceUri.scheme === Schemas.untitled) { return { workspaceUri: joinPath(environmentService.untitledWorkspacesHome, openable.workspaceUri.path, UNTITLED_WORKSPACE_NAME) }; } return openable; }); hostService.openWindow(toOpen, options); } }; export const newWindowCommand = (accessor: ServicesAccessor, options?: IOpenEmptyWindowOptions) => { const hostService = accessor.get(IHostService); hostService.openWindow(options); }; // Command registration KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib, when: ExplorerFocusCondition, primary: KeyMod.CtrlCmd | KeyCode.Enter, mac: { primary: KeyMod.WinCtrl | KeyCode.Enter }, id: OPEN_TO_SIDE_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const editorService = accessor.get(IEditorService); const listService = accessor.get(IListService); const fileService = accessor.get(IFileService); const explorerService = accessor.get(IExplorerService); const resources = getMultiSelectedResources(resource, listService, editorService, explorerService); // Set side input if (resources.length) { const untitledResources = resources.filter(resource => resource.scheme === Schemas.untitled); const fileResources = resources.filter(resource => resource.scheme !== Schemas.untitled); const resolved = await fileService.resolveAll(fileResources.map(resource => ({ resource }))); const editors = resolved.filter(r => r.stat && r.success && !r.stat.isDirectory).map(r => ({ resource: r.stat!.resource })).concat(...untitledResources.map(untitledResource => ({ resource: untitledResource }))); await editorService.openEditors(editors, SIDE_GROUP); } } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib + 10, when: ContextKeyExpr.and(ExplorerFocusCondition, ExplorerFolderContext.toNegated()), primary: KeyCode.Enter, mac: { primary: KeyMod.CtrlCmd | KeyCode.DownArrow }, id: 'explorer.openAndPassFocus', handler: async (accessor, _resource: URI | object) => { const editorService = accessor.get(IEditorService); const explorerService = accessor.get(IExplorerService); const resources = explorerService.getContext(true); if (resources.length) { await editorService.openEditors(resources.map(r => ({ resource: r.resource, options: { preserveFocus: false } }))); } } }); const COMPARE_WITH_SAVED_SCHEMA = 'showModifications'; let providerDisposables: IDisposable[] = []; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: COMPARE_WITH_SAVED_COMMAND_ID, when: undefined, weight: KeybindingWeight.WorkbenchContrib, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D), handler: async (accessor, resource: URI | object) => { const instantiationService = accessor.get(IInstantiationService); const textModelService = accessor.get(ITextModelService); const editorService = accessor.get(IEditorService); const fileService = accessor.get(IFileService); // Register provider at first as needed let registerEditorListener = false; if (providerDisposables.length === 0) { registerEditorListener = true; const provider = instantiationService.createInstance(TextFileContentProvider); providerDisposables.push(provider); providerDisposables.push(textModelService.registerTextModelContentProvider(COMPARE_WITH_SAVED_SCHEMA, provider)); } // Open editor (only resources that can be handled by file service are supported) const uri = getResourceForCommand(resource, accessor.get(IListService), editorService); if (uri && fileService.canHandleResource(uri)) { const name = basename(uri); const editorLabel = nls.localize('modifiedLabel', "{0} (in file) ↔ {1}", name, name); try { await TextFileContentProvider.open(uri, COMPARE_WITH_SAVED_SCHEMA, editorLabel, editorService); // Dispose once no more diff editor is opened with the scheme if (registerEditorListener) { providerDisposables.push(editorService.onDidVisibleEditorsChange(() => { if (!editorService.editors.some(editor => !!toResource(editor, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: COMPARE_WITH_SAVED_SCHEMA }))) { providerDisposables = dispose(providerDisposables); } })); } } catch { providerDisposables = dispose(providerDisposables); } } } }); let globalResourceToCompare: URI | undefined; let resourceSelectedForCompareContext: IContextKey<boolean>; CommandsRegistry.registerCommand({ id: SELECT_FOR_COMPARE_COMMAND_ID, handler: (accessor, resource: URI | object) => { const listService = accessor.get(IListService); globalResourceToCompare = getResourceForCommand(resource, listService, accessor.get(IEditorService)); if (!resourceSelectedForCompareContext) { resourceSelectedForCompareContext = ResourceSelectedForCompareContext.bindTo(accessor.get(IContextKeyService)); } resourceSelectedForCompareContext.set(true); } }); CommandsRegistry.registerCommand({ id: COMPARE_SELECTED_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const editorService = accessor.get(IEditorService); const explorerService = accessor.get(IExplorerService); const resources = getMultiSelectedResources(resource, accessor.get(IListService), editorService, explorerService); if (resources.length === 2) { return editorService.openEditor({ leftResource: resources[0], rightResource: resources[1] }); } return true; } }); CommandsRegistry.registerCommand({ id: COMPARE_RESOURCE_COMMAND_ID, handler: (accessor, resource: URI | object) => { const editorService = accessor.get(IEditorService); const listService = accessor.get(IListService); const rightResource = getResourceForCommand(resource, listService, editorService); if (globalResourceToCompare && rightResource) { editorService.openEditor({ leftResource: globalResourceToCompare, rightResource }); } } }); async function resourcesToClipboard(resources: URI[], relative: boolean, clipboardService: IClipboardService, notificationService: INotificationService, labelService: ILabelService): Promise<void> { if (resources.length) { const lineDelimiter = isWindows ? '\r\n' : '\n'; const text = resources.map(resource => labelService.getUriLabel(resource, { relative, noPrefix: true })) .join(lineDelimiter); await clipboardService.writeText(text); } else { notificationService.info(nls.localize('openFileToCopy', "Open a file first to copy its path")); } } KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib, when: EditorContextKeys.focus.toNegated(), primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C, win: { primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C }, id: COPY_PATH_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IExplorerService)); await resourcesToClipboard(resources, false, accessor.get(IClipboardService), accessor.get(INotificationService), accessor.get(ILabelService)); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib, when: EditorContextKeys.focus.toNegated(), primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_C, win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C) }, id: COPY_RELATIVE_PATH_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IExplorerService)); await resourcesToClipboard(resources, true, accessor.get(IClipboardService), accessor.get(INotificationService), accessor.get(ILabelService)); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib, when: undefined, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_P), id: 'workbench.action.files.copyPathOfActiveFile', handler: async (accessor) => { const editorService = accessor.get(IEditorService); const activeInput = editorService.activeEditor; const resource = activeInput ? activeInput.resource : null; const resources = resource ? [resource] : []; await resourcesToClipboard(resources, false, accessor.get(IClipboardService), accessor.get(INotificationService), accessor.get(ILabelService)); } }); CommandsRegistry.registerCommand({ id: REVEAL_IN_EXPLORER_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const viewletService = accessor.get(IViewletService); const contextService = accessor.get(IWorkspaceContextService); const explorerService = accessor.get(IExplorerService); const uri = getResourceForCommand(resource, accessor.get(IListService), accessor.get(IEditorService)); const viewlet = (await viewletService.openViewlet(VIEWLET_ID, false))?.getViewPaneContainer() as ExplorerViewPaneContainer; if (uri && contextService.isInsideWorkspace(uri)) { const explorerView = viewlet.getExplorerView(); if (explorerView) { explorerView.setExpanded(true); await explorerService.select(uri, true); explorerView.focus(); } } else { const openEditorsView = viewlet.getOpenEditorsView(); if (openEditorsView) { openEditorsView.setExpanded(true); openEditorsView.focus(); } } } }); CommandsRegistry.registerCommand({ id: OPEN_WITH_EXPLORER_COMMAND_ID, handler: async (accessor, resource: URI | object) => { const editorService = accessor.get(IEditorService); const editorGroupsService = accessor.get(IEditorGroupsService); const configurationService = accessor.get(IConfigurationService); const quickInputService = accessor.get(IQuickInputService); const uri = getResourceForCommand(resource, accessor.get(IListService), accessor.get(IEditorService)); if (uri) { const input = editorService.createEditorInput({ resource: uri }); openEditorWith(input, undefined, undefined, editorGroupsService.activeGroup, editorService, configurationService, quickInputService); } } }); // Save / Save As / Save All / Revert async function saveSelectedEditors(accessor: ServicesAccessor, options?: ISaveEditorsOptions): Promise<void> { const listService = accessor.get(IListService); const editorGroupService = accessor.get(IEditorGroupsService); const codeEditorService = accessor.get(ICodeEditorService); const textFileService = accessor.get(ITextFileService); // Retrieve selected or active editor let editors = getOpenEditorsViewMultiSelection(listService, editorGroupService); if (!editors) { const activeGroup = editorGroupService.activeGroup; if (activeGroup.activeEditor) { editors = []; // Special treatment for side by side editors: if the active editor // has 2 sides, we consider both, to support saving both sides. // We only allow this when saving, not for "Save As" and not if any // editor is untitled which would bring up a "Save As" dialog too. // See also https://github.com/microsoft/vscode/issues/4180 // See also https://github.com/microsoft/vscode/issues/106330 if ( activeGroup.activeEditor instanceof SideBySideEditorInput && !options?.saveAs && !(activeGroup.activeEditor.primary.isUntitled() || activeGroup.activeEditor.secondary.isUntitled()) ) { editors.push({ groupId: activeGroup.id, editor: activeGroup.activeEditor.primary }); editors.push({ groupId: activeGroup.id, editor: activeGroup.activeEditor.secondary }); } else { editors.push({ groupId: activeGroup.id, editor: activeGroup.activeEditor }); } } } if (!editors || editors.length === 0) { return; // nothing to save } // Save editors await doSaveEditors(accessor, editors, options); // Special treatment for embedded editors: if we detect that focus is // inside an embedded code editor, we save that model as well if we // find it in our text file models. Currently, only textual editors // support embedded editors. const focusedCodeEditor = codeEditorService.getFocusedCodeEditor(); if (focusedCodeEditor instanceof EmbeddedCodeEditorWidget) { const resource = focusedCodeEditor.getModel()?.uri; // Check that the resource of the model was not saved already if (resource && !editors.some(({ editor }) => isEqual(toResource(editor, { supportSideBySide: SideBySideEditor.PRIMARY }), resource))) { const model = textFileService.files.get(resource); if (!model?.isReadonly()) { await textFileService.save(resource, options); } } } } function saveDirtyEditorsOfGroups(accessor: ServicesAccessor, groups: ReadonlyArray<IEditorGroup>, options?: ISaveEditorsOptions): Promise<void> { const dirtyEditors: IEditorIdentifier[] = []; for (const group of groups) { for (const editor of group.getEditors(EditorsOrder.MOST_RECENTLY_ACTIVE)) { if (editor.isDirty()) { dirtyEditors.push({ groupId: group.id, editor }); } } } return doSaveEditors(accessor, dirtyEditors, options); } async function doSaveEditors(accessor: ServicesAccessor, editors: IEditorIdentifier[], options?: ISaveEditorsOptions): Promise<void> { const editorService = accessor.get(IEditorService); const notificationService = accessor.get(INotificationService); try { await editorService.save(editors, options); } catch (error) { notificationService.error(nls.localize({ key: 'genericSaveError', comment: ['{0} is the resource that failed to save and {1} the error message'] }, "Failed to save '{0}': {1}", editors.map(({ editor }) => editor.getName()).join(', '), toErrorMessage(error, false))); } } KeybindingsRegistry.registerCommandAndKeybindingRule({ when: undefined, weight: KeybindingWeight.WorkbenchContrib, primary: KeyMod.CtrlCmd | KeyCode.KEY_S, id: SAVE_FILE_COMMAND_ID, handler: accessor => { return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, force: true /* force save even when non-dirty */ }); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ when: undefined, weight: KeybindingWeight.WorkbenchContrib, primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_S), win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S) }, id: SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, handler: accessor => { return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, force: true /* force save even when non-dirty */, skipSaveParticipants: true }); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: SAVE_FILE_AS_COMMAND_ID, weight: KeybindingWeight.WorkbenchContrib, when: undefined, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S, handler: accessor => { return saveSelectedEditors(accessor, { reason: SaveReason.EXPLICIT, saveAs: true }); } }); CommandsRegistry.registerCommand({ id: SAVE_ALL_COMMAND_ID, handler: (accessor) => { return saveDirtyEditorsOfGroups(accessor, accessor.get(IEditorGroupsService).getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE), { reason: SaveReason.EXPLICIT }); } }); CommandsRegistry.registerCommand({ id: SAVE_ALL_IN_GROUP_COMMAND_ID, handler: (accessor, _: URI | object, editorContext: IEditorCommandsContext) => { const editorGroupService = accessor.get(IEditorGroupsService); const contexts = getMultiSelectedEditorContexts(editorContext, accessor.get(IListService), accessor.get(IEditorGroupsService)); let groups: ReadonlyArray<IEditorGroup> | undefined = undefined; if (!contexts.length) { groups = editorGroupService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE); } else { groups = coalesce(contexts.map(context => editorGroupService.getGroup(context.groupId))); } return saveDirtyEditorsOfGroups(accessor, groups, { reason: SaveReason.EXPLICIT }); } }); CommandsRegistry.registerCommand({ id: SAVE_FILES_COMMAND_ID, handler: accessor => { const editorService = accessor.get(IEditorService); return editorService.saveAll({ includeUntitled: false, reason: SaveReason.EXPLICIT }); } }); CommandsRegistry.registerCommand({ id: REVERT_FILE_COMMAND_ID, handler: async accessor => { const notificationService = accessor.get(INotificationService); const listService = accessor.get(IListService); const editorGroupService = accessor.get(IEditorGroupsService); const editorService = accessor.get(IEditorService); // Retrieve selected or active editor let editors = getOpenEditorsViewMultiSelection(listService, editorGroupService); if (!editors) { const activeGroup = editorGroupService.activeGroup; if (activeGroup.activeEditor) { editors = [{ groupId: activeGroup.id, editor: activeGroup.activeEditor }]; } } if (!editors || editors.length === 0) { return; // nothing to revert } try { await editorService.revert(editors.filter(({ editor }) => !editor.isUntitled() /* all except untitled */), { force: true }); } catch (error) { notificationService.error(nls.localize('genericRevertError', "Failed to revert '{0}': {1}", editors.map(({ editor }) => editor.getName()).join(', '), toErrorMessage(error, false))); } } }); CommandsRegistry.registerCommand({ id: REMOVE_ROOT_FOLDER_COMMAND_ID, handler: (accessor, resource: URI | object) => { const workspaceEditingService = accessor.get(IWorkspaceEditingService); const contextService = accessor.get(IWorkspaceContextService); const uriIdentityService = accessor.get(IUriIdentityService); const workspace = contextService.getWorkspace(); const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IExplorerService)).filter(resource => workspace.folders.some(folder => uriIdentityService.extUri.isEqual(folder.uri, resource)) // Need to verify resources are workspaces since multi selection can trigger this command on some non workspace resources ); return workspaceEditingService.removeFolders(resources); } }); // Compressed item navigation KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib + 10, when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext.negate()), primary: KeyCode.LeftArrow, id: PREVIOUS_COMPRESSED_FOLDER, handler: (accessor) => { const viewletService = accessor.get(IViewletService); const viewlet = viewletService.getActiveViewlet(); if (viewlet?.getId() !== VIEWLET_ID) { return; } const explorer = viewlet.getViewPaneContainer() as ExplorerViewPaneContainer; const view = explorer.getExplorerView(); view.previousCompressedStat(); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib + 10, when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerCompressedFocusContext, ExplorerCompressedLastFocusContext.negate()), primary: KeyCode.RightArrow, id: NEXT_COMPRESSED_FOLDER, handler: (accessor) => { const viewletService = accessor.get(IViewletService); const viewlet = viewletService.getActiveViewlet(); if (viewlet?.getId() !== VIEWLET_ID) { return; } const explorer = viewlet.getViewPaneContainer() as ExplorerViewPaneContainer; const view = explorer.getExplorerView(); view.nextCompressedStat(); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib + 10, when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext.negate()), primary: KeyCode.Home, id: FIRST_COMPRESSED_FOLDER, handler: (accessor) => { const viewletService = accessor.get(IViewletService); const viewlet = viewletService.getActiveViewlet(); if (viewlet?.getId() !== VIEWLET_ID) { return; } const explorer = viewlet.getViewPaneContainer() as ExplorerViewPaneContainer; const view = explorer.getExplorerView(); view.firstCompressedStat(); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib + 10, when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerCompressedFocusContext, ExplorerCompressedLastFocusContext.negate()), primary: KeyCode.End, id: LAST_COMPRESSED_FOLDER, handler: (accessor) => { const viewletService = accessor.get(IViewletService); const viewlet = viewletService.getActiveViewlet(); if (viewlet?.getId() !== VIEWLET_ID) { return; } const explorer = viewlet.getViewPaneContainer() as ExplorerViewPaneContainer; const view = explorer.getExplorerView(); view.lastCompressedStat(); } }); KeybindingsRegistry.registerCommandAndKeybindingRule({ weight: KeybindingWeight.WorkbenchContrib, when: null, primary: KeyMod.CtrlCmd | KeyCode.KEY_N, id: NEW_UNTITLED_FILE_COMMAND_ID, description: { description: NEW_UNTITLED_FILE_LABEL, args: [ { name: 'viewType', description: 'The editor view type', schema: { 'type': 'object', 'required': ['viewType'], 'properties': { 'viewType': { 'type': 'string' } } } } ] }, handler: async (accessor, args?: { viewType: string }) => { const editorService = accessor.get(IEditorService); if (typeof args?.viewType === 'string') { const editorGroupsService = accessor.get(IEditorGroupsService); const configurationService = accessor.get(IConfigurationService); const quickInputService = accessor.get(IQuickInputService); const textInput = editorService.createEditorInput({ options: { pinned: true } }); const group = editorGroupsService.activeGroup; await openEditorWith(textInput, args.viewType, { pinned: true }, group, editorService, configurationService, quickInputService); } else { await editorService.openEditor({ options: { pinned: true } }); // untitled are always pinned } } });
src/vs/workbench/contrib/files/browser/fileCommands.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.006757392082363367, 0.00027056410908699036, 0.0001638460817048326, 0.00017201316950377077, 0.0007984907715581357 ]
{ "id": 3, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n", "\t\t\t\t\t\t\t\t// Sandbox\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 201 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as path from 'vs/base/common/path'; import * as objects from 'vs/base/common/objects'; import * as nls from 'vs/nls'; import { Emitter } from 'vs/base/common/event'; import { URI } from 'vs/base/common/uri'; import { screen, BrowserWindow, systemPreferences, app, TouchBar, nativeImage, Rectangle, Display, TouchBarSegmentedControl, NativeImage, BrowserWindowConstructorOptions, SegmentedControlSegment, nativeTheme, Event, Details } from 'electron'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv'; import { NativeParsedArgs } from 'vs/platform/environment/common/argv'; import product from 'vs/platform/product/common/product'; import { IWindowSettings, MenuBarVisibility, getTitleBarStyle, getMenuBarVisibility, zoomLevelToZoomFactor, INativeWindowConfiguration } from 'vs/platform/windows/common/windows'; import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService'; import { IBackupMainService } from 'vs/platform/backup/electron-main/backup'; import { ISerializableCommandAction } from 'vs/platform/actions/common/actions'; import * as perf from 'vs/base/common/performance'; import { resolveMarketplaceHeaders } from 'vs/platform/extensionManagement/common/extensionGalleryService'; import { IThemeMainService } from 'vs/platform/theme/electron-main/themeMainService'; import { RunOnceScheduler } from 'vs/base/common/async'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs'; import { mnemonicButtonLabel } from 'vs/base/common/labels'; import { ThemeIcon } from 'vs/platform/theme/common/themeService'; import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService'; import { IStorageMainService } from 'vs/platform/storage/node/storageMainService'; import { IFileService } from 'vs/platform/files/common/files'; import { ColorScheme } from 'vs/platform/theme/common/theme'; export interface IWindowCreationOptions { state: IWindowState; extensionDevelopmentPath?: string[]; isExtensionTestHost?: boolean; } export const defaultWindowState = function (mode = WindowMode.Normal): IWindowState { return { width: 1024, height: 768, mode }; }; interface ITouchBarSegment extends SegmentedControlSegment { id: string; } const enum WindowError { UNRESPONSIVE = 1, CRASHED = 2 } const enum ReadyState { /** * This window has not loaded any HTML yet */ NONE, /** * This window is loading HTML */ LOADING, /** * This window is navigating to another HTML */ NAVIGATING, /** * This window is done loading HTML */ READY } export class CodeWindow extends Disposable implements ICodeWindow { private static readonly MIN_WIDTH = 600; private static readonly MIN_HEIGHT = 270; private static readonly MAX_URL_LENGTH = 2 * 1024 * 1024; // https://cs.chromium.org/chromium/src/url/url_constants.cc?l=32 private readonly _onLoad = this._register(new Emitter<void>()); readonly onLoad = this._onLoad.event; private readonly _onReady = this._register(new Emitter<void>()); readonly onReady = this._onReady.event; private readonly _onClose = this._register(new Emitter<void>()); readonly onClose = this._onClose.event; private readonly _onDestroy = this._register(new Emitter<void>()); readonly onDestroy = this._onDestroy.event; private hiddenTitleBarStyle: boolean | undefined; private showTimeoutHandle: NodeJS.Timeout | undefined; private _lastFocusTime: number; private _readyState: ReadyState; private windowState: IWindowState; private currentMenuBarVisibility: MenuBarVisibility | undefined; private representedFilename: string | undefined; private documentEdited: boolean | undefined; private readonly whenReadyCallbacks: { (window: ICodeWindow): void }[]; private pendingLoadConfig?: INativeWindowConfiguration; private marketplaceHeadersPromise: Promise<object>; private readonly touchBarGroups: TouchBarSegmentedControl[]; private currentHttpProxy?: string; private currentNoProxy?: string; constructor( config: IWindowCreationOptions, @ILogService private readonly logService: ILogService, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @IFileService private readonly fileService: IFileService, @IStorageMainService private readonly storageService: IStorageMainService, @IConfigurationService private readonly configurationService: IConfigurationService, @IThemeMainService private readonly themeMainService: IThemeMainService, @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, @IBackupMainService private readonly backupMainService: IBackupMainService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IDialogMainService private readonly dialogMainService: IDialogMainService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService ) { super(); this.touchBarGroups = []; this._lastFocusTime = -1; this._readyState = ReadyState.NONE; this.whenReadyCallbacks = []; //#region create browser window { // Load window state const [state, hasMultipleDisplays] = this.restoreWindowState(config.state); this.windowState = state; this.logService.trace('window#ctor: using window state', state); // in case we are maximized or fullscreen, only show later after the call to maximize/fullscreen (see below) const isFullscreenOrMaximized = (this.windowState.mode === WindowMode.Maximized || this.windowState.mode === WindowMode.Fullscreen); const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); const options: BrowserWindowConstructorOptions = { width: this.windowState.width, height: this.windowState.height, x: this.windowState.x, y: this.windowState.y, backgroundColor: this.themeMainService.getBackgroundColor(), minWidth: CodeWindow.MIN_WIDTH, minHeight: CodeWindow.MIN_HEIGHT, show: !isFullscreenOrMaximized, title: product.nameLong, webPreferences: { preload: URI.parse(this.doGetPreloadUrl()).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, webviewTag: true, zoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }; // Apply icon to window // Linux: always // Windows: only when running out of sources, otherwise an icon is set by us on the executable if (isLinux) { options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); } else if (isWindows && !this.environmentService.isBuilt) { options.icon = path.join(this.environmentService.appRoot, 'resources/win32/code_150x150.png'); } if (isMacintosh && !this.useNativeFullScreen()) { options.fullscreenable = false; // enables simple fullscreen mode } if (isMacintosh) { options.acceptFirstMouse = true; // enabled by default if (windowConfig?.clickThroughInactive === false) { options.acceptFirstMouse = false; } } const useNativeTabs = isMacintosh && windowConfig?.nativeTabs === true; if (useNativeTabs) { options.tabbingIdentifier = product.nameShort; // this opts in to sierra tabs } const useCustomTitleStyle = getTitleBarStyle(this.configurationService, this.environmentService, !!config.extensionDevelopmentPath) === 'custom'; if (useCustomTitleStyle) { options.titleBarStyle = 'hidden'; this.hiddenTitleBarStyle = true; if (!isMacintosh) { options.frame = false; } } // Create the browser window. this._win = new BrowserWindow(options); this._id = this._win.id; // Open devtools if instructed from command line args if (this.environmentService.args['open-devtools'] === true) { this._win.webContents.openDevTools(); } if (isMacintosh && useCustomTitleStyle) { this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any } // TODO@Ben (Electron 4 regression): when running on multiple displays where the target display // to open the window has a larger resolution than the primary display, the window will not size // correctly unless we set the bounds again (https://github.com/microsoft/vscode/issues/74872) // // However, when running with native tabs with multiple windows we cannot use this workaround // because there is a potential that the new window will be added as native tab instead of being // a window on its own. In that case calling setBounds() would cause https://github.com/microsoft/vscode/issues/75830 if (isMacintosh && hasMultipleDisplays && (!useNativeTabs || BrowserWindow.getAllWindows().length === 1)) { if ([this.windowState.width, this.windowState.height, this.windowState.x, this.windowState.y].every(value => typeof value === 'number')) { const ensuredWindowState = this.windowState as Required<IWindowState>; this._win.setBounds({ width: ensuredWindowState.width, height: ensuredWindowState.height, x: ensuredWindowState.x, y: ensuredWindowState.y }); } } if (isFullscreenOrMaximized) { this._win.maximize(); if (this.windowState.mode === WindowMode.Fullscreen) { this.setFullScreen(true); } if (!this._win.isVisible()) { this._win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize } } this._lastFocusTime = Date.now(); // since we show directly, we need to set the last focus time too } //#endregion // respect configured menu bar visibility this.onConfigurationUpdated(); // macOS: touch bar support this.createTouchBar(); // Request handling const that = this; this.marketplaceHeadersPromise = resolveMarketplaceHeaders(product.version, this.environmentService, this.fileService, { get(key) { return that.storageService.get(key); }, store(key, value) { that.storageService.store(key, value); } }); // Eventing this.registerListeners(); } private currentConfig: INativeWindowConfiguration | undefined; get config(): INativeWindowConfiguration | undefined { return this.currentConfig; } private _id: number; get id(): number { return this._id; } private _win: BrowserWindow; get win(): BrowserWindow { return this._win; } get hasHiddenTitleBarStyle(): boolean { return !!this.hiddenTitleBarStyle; } get isExtensionDevelopmentHost(): boolean { return !!(this.config && this.config.extensionDevelopmentPath); } get isExtensionTestHost(): boolean { return !!(this.config && this.config.extensionTestsPath); } get isExtensionDevelopmentTestFromCli(): boolean { return this.isExtensionDevelopmentHost && this.isExtensionTestHost && !this.config?.debugId; } setRepresentedFilename(filename: string): void { if (isMacintosh) { this.win.setRepresentedFilename(filename); } else { this.representedFilename = filename; } } getRepresentedFilename(): string | undefined { if (isMacintosh) { return this.win.getRepresentedFilename(); } return this.representedFilename; } setDocumentEdited(edited: boolean): void { if (isMacintosh) { this._win.setDocumentEdited(edited); } this.documentEdited = edited; } isDocumentEdited(): boolean { if (isMacintosh) { return this._win.isDocumentEdited(); } return !!this.documentEdited; } focus(options?: { force: boolean }): void { // macOS: Electron >6.x changed its behaviour to not // bring the application to the foreground when a window // is focused programmatically. Only via `app.focus` and // the option `steal: true` can you get the previous // behaviour back. The only reason to use this option is // when a window is getting focused while the application // is not in the foreground. if (isMacintosh && options?.force) { app.focus({ steal: true }); } if (!this._win) { return; } if (this._win.isMinimized()) { this._win.restore(); } this._win.focus(); } get lastFocusTime(): number { return this._lastFocusTime; } get backupPath(): string | undefined { return this.currentConfig ? this.currentConfig.backupPath : undefined; } get openedWorkspace(): IWorkspaceIdentifier | undefined { return this.currentConfig ? this.currentConfig.workspace : undefined; } get openedFolderUri(): URI | undefined { return this.currentConfig ? this.currentConfig.folderUri : undefined; } get remoteAuthority(): string | undefined { return this.currentConfig ? this.currentConfig.remoteAuthority : undefined; } setReady(): void { this._readyState = ReadyState.READY; // inform all waiting promises that we are ready now while (this.whenReadyCallbacks.length) { this.whenReadyCallbacks.pop()!(this); } // Events this._onReady.fire(); } ready(): Promise<ICodeWindow> { return new Promise<ICodeWindow>(resolve => { if (this.isReady) { return resolve(this); } // otherwise keep and call later when we are ready this.whenReadyCallbacks.push(resolve); }); } get isReady(): boolean { return this._readyState === ReadyState.READY; } get whenClosedOrLoaded(): Promise<void> { return new Promise<void>(resolve => { function handle() { closeListener.dispose(); loadListener.dispose(); resolve(); } const closeListener = this.onClose(() => handle()); const loadListener = this.onLoad(() => handle()); }); } private registerListeners(): void { // Crashes & Unrsponsive this._win.webContents.on('render-process-gone', (event, details) => this.onWindowError(WindowError.CRASHED, details)); this._win.on('unresponsive', () => this.onWindowError(WindowError.UNRESPONSIVE)); // Window close this._win.on('closed', () => { this._onClose.fire(); this.dispose(); }); // Prevent loading of svgs this._win.webContents.session.webRequest.onBeforeRequest(null!, (details, callback) => { if (details.url.indexOf('.svg') > 0) { const uri = URI.parse(details.url); if (uri && !uri.scheme.match(/file/i) && uri.path.endsWith('.svg')) { return callback({ cancel: true }); } } return callback({}); }); this._win.webContents.session.webRequest.onHeadersReceived(null!, (details, callback) => { const responseHeaders = details.responseHeaders as Record<string, (string) | (string[])>; const contentType = (responseHeaders['content-type'] || responseHeaders['Content-Type']); if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) { return callback({ cancel: true }); } return callback({ cancel: false }); }); // Remember that we loaded this._win.webContents.on('did-finish-load', () => { this._readyState = ReadyState.LOADING; // Associate properties from the load request if provided if (this.pendingLoadConfig) { this.currentConfig = this.pendingLoadConfig; this.pendingLoadConfig = undefined; } }); // Window Focus this._win.on('focus', () => { this._lastFocusTime = Date.now(); }); if (isMacintosh) { const displayChangedScheduler = this._register(new RunOnceScheduler(() => { if (!this._win) { return; // disposed } // Notify renderers about displays changed this.sendWhenReady('vscode:displayChanged'); // Simple fullscreen doesn't resize automatically when the resolution changes so as a workaround // we need to detect when display metrics change or displays are added/removed and toggle the // fullscreen manually. if (!this.useNativeFullScreen() && this.isFullScreen) { this.setFullScreen(false); this.setFullScreen(true); } }, 100)); const displayChangedListener = (event: Event, display: Display, changedMetrics?: string[]) => { if (Array.isArray(changedMetrics) && changedMetrics.length === 1 && changedMetrics[0] === 'workArea') { // Electron will emit 'display-metrics-changed' events even when actually // going fullscreen, because the dock hides. However, we do not want to // react on this event as there is no change in display bounds. return; } displayChangedScheduler.schedule(); }; screen.on('display-metrics-changed', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-metrics-changed', displayChangedListener))); screen.on('display-added', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-added', displayChangedListener))); screen.on('display-removed', displayChangedListener); this._register(toDisposable(() => screen.removeListener('display-removed', displayChangedListener))); } // Window (Un)Maximize this._win.on('maximize', (e: Event) => { if (this.currentConfig) { this.currentConfig.maximized = true; } app.emit('browser-window-maximize', e, this._win); }); this._win.on('unmaximize', (e: Event) => { if (this.currentConfig) { this.currentConfig.maximized = false; } app.emit('browser-window-unmaximize', e, this._win); }); // Window Fullscreen this._win.on('enter-full-screen', () => { this.sendWhenReady('vscode:enterFullScreen'); }); this._win.on('leave-full-screen', () => { this.sendWhenReady('vscode:leaveFullScreen'); }); // Window Failed to load this._win.webContents.on('did-fail-load', (event: Event, errorCode: number, errorDescription: string, validatedURL: string, isMainFrame: boolean) => { this.logService.warn('[electron event]: fail to load, ', errorDescription); }); // Handle configuration changes this._register(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated())); // Handle Workspace events this._register(this.workspacesMainService.onUntitledWorkspaceDeleted(e => this.onUntitledWorkspaceDeleted(e))); // Inject headers when requests are incoming const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*']; this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) => this.marketplaceHeadersPromise.then(headers => cb({ cancel: false, requestHeaders: Object.assign(details.requestHeaders, headers) }))); } private onWindowError(error: WindowError.UNRESPONSIVE): void; private onWindowError(error: WindowError.CRASHED, details: Details): void; private onWindowError(error: WindowError, details?: Details): void { this.logService.error(error === WindowError.CRASHED ? `[VS Code]: renderer process crashed (detail: ${details?.reason})` : '[VS Code]: detected unresponsive'); // If we run extension tests from CLI, showing a dialog is not // very helpful in this case. Rather, we bring down the test run // to signal back a failing run. if (this.isExtensionDevelopmentTestFromCli) { this.lifecycleMainService.kill(1); return; } // Telemetry type WindowErrorClassification = { type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true }; }; type WindowErrorEvent = { type: WindowError; }; this.telemetryService.publicLog2<WindowErrorEvent, WindowErrorClassification>('windowerror', { type: error }); // Unresponsive if (error === WindowError.UNRESPONSIVE) { if (this.isExtensionDevelopmentHost || this.isExtensionTestHost || (this._win && this._win.webContents && this._win.webContents.isDevToolsOpened())) { // TODO@Ben Workaround for https://github.com/Microsoft/vscode/issues/56994 // In certain cases the window can report unresponsiveness because a breakpoint was hit // and the process is stopped executing. The most typical cases are: // - devtools are opened and debugging happens // - window is an extensions development host that is being debugged // - window is an extension test development host that is being debugged return; } // Show Dialog this.dialogMainService.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(nls.localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(nls.localize({ key: 'wait', comment: ['&& denotes a mnemonic'] }, "&&Keep Waiting")), mnemonicButtonLabel(nls.localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message: nls.localize('appStalled', "The window is no longer responding"), detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true }, this._win).then(result => { if (!this._win) { return; // Return early if the window has been going down already } if (result.response === 0) { this.reload(); } else if (result.response === 2) { this.destroyWindow(); } }); } // Crashed else { let message: string; if (details && details.reason !== 'crashed') { message = nls.localize('appCrashedDetails', "The window has crashed (reason: '{0}')", details?.reason); } else { message = nls.localize('appCrashed', "The window has crashed", details?.reason); } this.dialogMainService.showMessageBox({ title: product.nameLong, type: 'warning', buttons: [mnemonicButtonLabel(nls.localize({ key: 'reopen', comment: ['&& denotes a mnemonic'] }, "&&Reopen")), mnemonicButtonLabel(nls.localize({ key: 'close', comment: ['&& denotes a mnemonic'] }, "&&Close"))], message, detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true }, this._win).then(result => { if (!this._win) { return; // Return early if the window has been going down already } if (result.response === 0) { this.reload(); } else if (result.response === 1) { this.destroyWindow(); } }); } } private destroyWindow(): void { this._onDestroy.fire(); // 'close' event will not be fired on destroy(), so signal crash via explicit event this._win.destroy(); // make sure to destroy the window as it has crashed } private onUntitledWorkspaceDeleted(workspace: IWorkspaceIdentifier): void { // Make sure to update our workspace config if we detect that it // was deleted if (this.openedWorkspace && this.openedWorkspace.id === workspace.id && this.currentConfig) { this.currentConfig.workspace = undefined; } } private onConfigurationUpdated(): void { const newMenuBarVisibility = this.getMenuBarVisibility(); if (newMenuBarVisibility !== this.currentMenuBarVisibility) { this.currentMenuBarVisibility = newMenuBarVisibility; this.setMenuBarVisibility(newMenuBarVisibility); } // Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options: const env = process.env; let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim() || (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized. || undefined; if (newHttpProxy?.endsWith('/')) { newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1); } const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized. if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) { this.currentHttpProxy = newHttpProxy; this.currentNoProxy = newNoProxy; const proxyRules = newHttpProxy || ''; const proxyBypassRules = newNoProxy ? `${newNoProxy},<local>` : '<local>'; this.logService.trace(`Setting proxy to '${proxyRules}', bypassing '${proxyBypassRules}'`); this._win.webContents.session.setProxy({ proxyRules, proxyBypassRules, pacScript: '', }); } } addTabbedWindow(window: ICodeWindow): void { if (isMacintosh) { this._win.addTabbedWindow(window.win); } } load(config: INativeWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void { // If this is the first time the window is loaded, we associate the paths // directly with the window because we assume the loading will just work if (this._readyState === ReadyState.NONE) { this.currentConfig = config; } // Otherwise, the window is currently showing a folder and if there is an // unload handler preventing the load, we cannot just associate the paths // because the loading might be vetoed. Instead we associate it later when // the window load event has fired. else { this.pendingLoadConfig = config; this._readyState = ReadyState.NAVIGATING; } // Add disable-extensions to the config, but do not preserve it on currentConfig or // pendingLoadConfig so that it is applied only on this load const configuration = { ...config }; if (disableExtensions !== undefined) { configuration['disable-extensions'] = disableExtensions; } // Clear Document Edited if needed if (this.isDocumentEdited()) { if (!isReload || !this.backupMainService.isHotExitEnabled()) { this.setDocumentEdited(false); } } // Clear Title and Filename if needed if (!isReload) { if (this.getRepresentedFilename()) { this.setRepresentedFilename(''); } this._win.setTitle(product.nameLong); } // Load URL perf.mark('main:loadWindow'); this._win.loadURL(this.getUrl(configuration)); // Make window visible if it did not open in N seconds because this indicates an error // Only do this when running out of sources and not when running tests if (!this.environmentService.isBuilt && !this.environmentService.extensionTestsLocationURI) { this.showTimeoutHandle = setTimeout(() => { if (this._win && !this._win.isVisible() && !this._win.isMinimized()) { this._win.show(); this.focus({ force: true }); this._win.webContents.openDevTools(); } }, 10000); } // Event this._onLoad.fire(); } reload(configurationIn?: INativeWindowConfiguration, cli?: NativeParsedArgs): void { // If config is not provided, copy our current one const configuration = configurationIn ? configurationIn : objects.mixin({}, this.currentConfig); // Delete some properties we do not want during reload delete configuration.filesToOpenOrCreate; delete configuration.filesToDiff; delete configuration.filesToWait; // Some configuration things get inherited if the window is being reloaded and we are // in extension development mode. These options are all development related. if (this.isExtensionDevelopmentHost && cli) { configuration.verbose = cli.verbose; configuration['inspect-extensions'] = cli['inspect-extensions']; configuration['inspect-brk-extensions'] = cli['inspect-brk-extensions']; configuration.debugId = cli.debugId; configuration['extensions-dir'] = cli['extensions-dir']; } configuration.isInitialStartup = false; // since this is a reload // Load config const disableExtensions = cli ? cli['disable-extensions'] : undefined; this.load(configuration, true, disableExtensions); } private getUrl(windowConfiguration: INativeWindowConfiguration): string { // Set window ID windowConfiguration.windowId = this._win.id; windowConfiguration.sessionId = `window:${this._win.id}`; windowConfiguration.logLevel = this.logService.getLevel(); // Set zoomlevel const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); const zoomLevel = windowConfig?.zoomLevel; if (typeof zoomLevel === 'number') { windowConfiguration.zoomLevel = zoomLevel; } // Set fullscreen state windowConfiguration.fullscreen = this.isFullScreen; // Set Accessibility Config windowConfiguration.colorScheme = (nativeTheme.shouldUseInvertedColorScheme || nativeTheme.shouldUseHighContrastColors) ? ColorScheme.HIGH_CONTRAST : nativeTheme.shouldUseDarkColors ? ColorScheme.DARK : ColorScheme.LIGHT; windowConfiguration.autoDetectHighContrast = windowConfig?.autoDetectHighContrast ?? true; windowConfiguration.accessibilitySupport = app.accessibilitySupportEnabled; // Title style related windowConfiguration.maximized = this._win.isMaximized(); // Dump Perf Counters windowConfiguration.perfEntries = perf.exportEntries(); // Parts splash windowConfiguration.partsSplashPath = path.join(this.environmentService.userDataPath, 'rapid_render.json'); // Config (combination of process.argv and window configuration) const environment = parseArgs(process.argv, OPTIONS); const config = Object.assign(environment, windowConfiguration) as unknown as { [key: string]: unknown }; for (const key in config) { const configValue = config[key]; if (configValue === undefined || configValue === null || configValue === '' || configValue === false) { delete config[key]; // only send over properties that have a true value } } // In the unlikely event of the URL becoming larger than 2MB, remove parts of // it that are not under our control. Mainly, the user environment can be very // large depending on user configuration, so we can only remove it in that case. let configUrl = this.doGetUrl(config); if (configUrl.length > CodeWindow.MAX_URL_LENGTH) { delete config.userEnv; this.logService.warn('Application URL exceeds maximum of 2MB and was shortened.'); configUrl = this.doGetUrl(config); if (configUrl.length > CodeWindow.MAX_URL_LENGTH) { this.logService.error('Application URL exceeds maximum of 2MB and cannot be loaded.'); } } return configUrl; } private doGetUrl(config: object): string { let workbench: string; if (this.environmentService.sandbox) { workbench = 'vs/code/electron-sandbox/workbench/workbench.html'; } else { workbench = 'vs/code/electron-browser/workbench/workbench.html'; } return `${require.toUrl(workbench)}?config=${encodeURIComponent(JSON.stringify(config))}`; } private doGetPreloadUrl(): string { return require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js'); } serializeWindowState(): IWindowState { if (!this._win) { return defaultWindowState(); } // fullscreen gets special treatment if (this.isFullScreen) { let display: Display | undefined; try { display = screen.getDisplayMatching(this.getBounds()); } catch (error) { // Electron has weird conditions under which it throws errors // e.g. https://github.com/microsoft/vscode/issues/100334 when // large numbers are passed in } const defaultState = defaultWindowState(); const res = { mode: WindowMode.Fullscreen, display: display ? display.id : undefined, // Still carry over window dimensions from previous sessions // if we can compute it in fullscreen state. // does not seem possible in all cases on Linux for example // (https://github.com/Microsoft/vscode/issues/58218) so we // fallback to the defaults in that case. width: this.windowState.width || defaultState.width, height: this.windowState.height || defaultState.height, x: this.windowState.x || 0, y: this.windowState.y || 0 }; return res; } const state: IWindowState = Object.create(null); let mode: WindowMode; // get window mode if (!isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; } else { mode = WindowMode.Normal; } // we don't want to save minimized state, only maximized or normal if (mode === WindowMode.Maximized) { state.mode = WindowMode.Maximized; } else { state.mode = WindowMode.Normal; } // only consider non-minimized window states if (mode === WindowMode.Normal || mode === WindowMode.Maximized) { let bounds: Rectangle; if (mode === WindowMode.Normal) { bounds = this.getBounds(); } else { bounds = this._win.getNormalBounds(); // make sure to persist the normal bounds when maximized to be able to restore them } state.x = bounds.x; state.y = bounds.y; state.width = bounds.width; state.height = bounds.height; } return state; } private restoreWindowState(state?: IWindowState): [IWindowState, boolean? /* has multiple displays */] { let hasMultipleDisplays = false; if (state) { try { const displays = screen.getAllDisplays(); hasMultipleDisplays = displays.length > 1; state = this.validateWindowState(state, displays); } catch (err) { this.logService.warn(`Unexpected error validating window state: ${err}\n${err.stack}`); // somehow display API can be picky about the state to validate } } return [state || defaultWindowState(), hasMultipleDisplays]; } private validateWindowState(state: IWindowState, displays: Display[]): IWindowState | undefined { this.logService.trace(`window#validateWindowState: validating window state on ${displays.length} display(s)`, state); if (typeof state.x !== 'number' || typeof state.y !== 'number' || typeof state.width !== 'number' || typeof state.height !== 'number' ) { this.logService.trace('window#validateWindowState: unexpected type of state values'); return undefined; } if (state.width <= 0 || state.height <= 0) { this.logService.trace('window#validateWindowState: unexpected negative values'); return undefined; } // Single Monitor: be strict about x/y positioning // macOS & Linux: these OS seem to be pretty good in ensuring that a window is never outside of it's bounds. // Windows: it is possible to have a window with a size that makes it fall out of the window. our strategy // is to try as much as possible to keep the window in the monitor bounds. we are not as strict as // macOS and Linux and allow the window to exceed the monitor bounds as long as the window is still // some pixels (128) visible on the screen for the user to drag it back. if (displays.length === 1) { const displayWorkingArea = this.getWorkingArea(displays[0]); if (displayWorkingArea) { this.logService.trace('window#validateWindowState: 1 monitor working area', displayWorkingArea); function ensureStateInDisplayWorkingArea(): void { if (!state || typeof state.x !== 'number' || typeof state.y !== 'number' || !displayWorkingArea) { return; } if (state.x < displayWorkingArea.x) { // prevent window from falling out of the screen to the left state.x = displayWorkingArea.x; } if (state.y < displayWorkingArea.y) { // prevent window from falling out of the screen to the top state.y = displayWorkingArea.y; } } // ensure state is not outside display working area (top, left) ensureStateInDisplayWorkingArea(); if (state.width > displayWorkingArea.width) { // prevent window from exceeding display bounds width state.width = displayWorkingArea.width; } if (state.height > displayWorkingArea.height) { // prevent window from exceeding display bounds height state.height = displayWorkingArea.height; } if (state.x > (displayWorkingArea.x + displayWorkingArea.width - 128)) { // prevent window from falling out of the screen to the right with // 128px margin by positioning the window to the far right edge of // the screen state.x = displayWorkingArea.x + displayWorkingArea.width - state.width; } if (state.y > (displayWorkingArea.y + displayWorkingArea.height - 128)) { // prevent window from falling out of the screen to the bottom with // 128px margin by positioning the window to the far bottom edge of // the screen state.y = displayWorkingArea.y + displayWorkingArea.height - state.height; } // again ensure state is not outside display working area // (it may have changed from the previous validation step) ensureStateInDisplayWorkingArea(); } return state; } // Multi Montior (fullscreen): try to find the previously used display if (state.display && state.mode === WindowMode.Fullscreen) { const display = displays.find(d => d.id === state.display); if (display && typeof display.bounds?.x === 'number' && typeof display.bounds?.y === 'number') { this.logService.trace('window#validateWindowState: restoring fullscreen to previous display'); const defaults = defaultWindowState(WindowMode.Fullscreen); // make sure we have good values when the user restores the window defaults.x = display.bounds.x; // carefull to use displays x/y position so that the window ends up on the correct monitor defaults.y = display.bounds.y; return defaults; } } // Multi Monitor (non-fullscreen): ensure window is within display bounds let display: Display | undefined; let displayWorkingArea: Rectangle | undefined; try { display = screen.getDisplayMatching({ x: state.x, y: state.y, width: state.width, height: state.height }); displayWorkingArea = this.getWorkingArea(display); } catch (error) { // Electron has weird conditions under which it throws errors // e.g. https://github.com/microsoft/vscode/issues/100334 when // large numbers are passed in } if ( display && // we have a display matching the desired bounds displayWorkingArea && // we have valid working area bounds state.x + state.width > displayWorkingArea.x && // prevent window from falling out of the screen to the left state.y + state.height > displayWorkingArea.y && // prevent window from falling out of the screen to the top state.x < displayWorkingArea.x + displayWorkingArea.width && // prevent window from falling out of the screen to the right state.y < displayWorkingArea.y + displayWorkingArea.height // prevent window from falling out of the screen to the bottom ) { this.logService.trace('window#validateWindowState: multi-monitor working area', displayWorkingArea); return state; } return undefined; } private getWorkingArea(display: Display): Rectangle | undefined { // Prefer the working area of the display to account for taskbars on the // desktop being positioned somewhere (https://github.com/Microsoft/vscode/issues/50830). // // Linux X11 sessions sometimes report wrong display bounds, so we validate // the reported sizes are positive. if (display.workArea.width > 0 && display.workArea.height > 0) { return display.workArea; } if (display.bounds.width > 0 && display.bounds.height > 0) { return display.bounds; } return undefined; } getBounds(): Rectangle { const pos = this._win.getPosition(); const dimension = this._win.getSize(); return { x: pos[0], y: pos[1], width: dimension[0], height: dimension[1] }; } toggleFullScreen(): void { this.setFullScreen(!this.isFullScreen); } private setFullScreen(fullscreen: boolean): void { // Set fullscreen state if (this.useNativeFullScreen()) { this.setNativeFullScreen(fullscreen); } else { this.setSimpleFullScreen(fullscreen); } // Events this.sendWhenReady(fullscreen ? 'vscode:enterFullScreen' : 'vscode:leaveFullScreen'); // Respect configured menu bar visibility or default to toggle if not set if (this.currentMenuBarVisibility) { this.setMenuBarVisibility(this.currentMenuBarVisibility, false); } } get isFullScreen(): boolean { return this._win.isFullScreen() || this._win.isSimpleFullScreen(); } private setNativeFullScreen(fullscreen: boolean): void { if (this._win.isSimpleFullScreen()) { this._win.setSimpleFullScreen(false); } this._win.setFullScreen(fullscreen); } private setSimpleFullScreen(fullscreen: boolean): void { if (this._win.isFullScreen()) { this._win.setFullScreen(false); } this._win.setSimpleFullScreen(fullscreen); this._win.webContents.focus(); // workaround issue where focus is not going into window } private useNativeFullScreen(): boolean { const windowConfig = this.configurationService.getValue<IWindowSettings>('window'); if (!windowConfig || typeof windowConfig.nativeFullScreen !== 'boolean') { return true; // default } if (windowConfig.nativeTabs) { return true; // https://github.com/electron/electron/issues/16142 } return windowConfig.nativeFullScreen !== false; } isMinimized(): boolean { return this._win.isMinimized(); } private getMenuBarVisibility(): MenuBarVisibility { let menuBarVisibility = getMenuBarVisibility(this.configurationService, this.environmentService, !!this.config?.extensionDevelopmentPath); if (['visible', 'toggle', 'hidden'].indexOf(menuBarVisibility) < 0) { menuBarVisibility = 'default'; } return menuBarVisibility; } private setMenuBarVisibility(visibility: MenuBarVisibility, notify: boolean = true): void { if (isMacintosh) { return; // ignore for macOS platform } if (visibility === 'toggle') { if (notify) { this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the Alt-key.")); } } if (visibility === 'hidden') { // for some weird reason that I have no explanation for, the menu bar is not hiding when calling // this without timeout (see https://github.com/Microsoft/vscode/issues/19777). there seems to be // a timing issue with us opening the first window and the menu bar getting created. somehow the // fact that we want to hide the menu without being able to bring it back via Alt key makes Electron // still show the menu. Unable to reproduce from a simple Hello World application though... setTimeout(() => { this.doSetMenuBarVisibility(visibility); }); } else { this.doSetMenuBarVisibility(visibility); } } private doSetMenuBarVisibility(visibility: MenuBarVisibility): void { const isFullscreen = this.isFullScreen; switch (visibility) { case ('default'): this._win.setMenuBarVisibility(!isFullscreen); this._win.autoHideMenuBar = isFullscreen; break; case ('visible'): this._win.setMenuBarVisibility(true); this._win.autoHideMenuBar = false; break; case ('toggle'): this._win.setMenuBarVisibility(false); this._win.autoHideMenuBar = true; break; case ('hidden'): this._win.setMenuBarVisibility(false); this._win.autoHideMenuBar = false; break; } } handleTitleDoubleClick(): void { // Respect system settings on mac with regards to title click on windows title if (isMacintosh) { const action = systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string'); switch (action) { case 'Minimize': this.win.minimize(); break; case 'None': break; case 'Maximize': default: if (this.win.isMaximized()) { this.win.unmaximize(); } else { this.win.maximize(); } } } // Linux/Windows: just toggle maximize/minimized state else { if (this.win.isMaximized()) { this.win.unmaximize(); } else { this.win.maximize(); } } } close(): void { if (this._win) { this._win.close(); } } sendWhenReady(channel: string, ...args: any[]): void { if (this.isReady) { this.send(channel, ...args); } else { this.ready().then(() => this.send(channel, ...args)); } } send(channel: string, ...args: any[]): void { if (this._win) { this._win.webContents.send(channel, ...args); } } updateTouchBar(groups: ISerializableCommandAction[][]): void { if (!isMacintosh) { return; // only supported on macOS } // Update segments for all groups. Setting the segments property // of the group directly prevents ugly flickering from happening this.touchBarGroups.forEach((touchBarGroup, index) => { const commands = groups[index]; touchBarGroup.segments = this.createTouchBarGroupSegments(commands); }); } private createTouchBar(): void { if (!isMacintosh) { return; // only supported on macOS } // To avoid flickering, we try to reuse the touch bar group // as much as possible by creating a large number of groups // for reusing later. for (let i = 0; i < 10; i++) { const groupTouchBar = this.createTouchBarGroup(); this.touchBarGroups.push(groupTouchBar); } this._win.setTouchBar(new TouchBar({ items: this.touchBarGroups })); } private createTouchBarGroup(items: ISerializableCommandAction[] = []): TouchBarSegmentedControl { // Group Segments const segments = this.createTouchBarGroupSegments(items); // Group Control const control = new TouchBar.TouchBarSegmentedControl({ segments, mode: 'buttons', segmentStyle: 'automatic', change: (selectedIndex) => { this.sendWhenReady('vscode:runAction', { id: (control.segments[selectedIndex] as ITouchBarSegment).id, from: 'touchbar' }); } }); return control; } private createTouchBarGroupSegments(items: ISerializableCommandAction[] = []): ITouchBarSegment[] { const segments: ITouchBarSegment[] = items.map(item => { let icon: NativeImage | undefined; if (item.icon && !ThemeIcon.isThemeIcon(item.icon) && item.icon?.dark?.scheme === 'file') { icon = nativeImage.createFromPath(URI.revive(item.icon.dark).fsPath); if (icon.isEmpty()) { icon = undefined; } } let title: string; if (typeof item.title === 'string') { title = item.title; } else { title = item.title.value; } return { id: item.id, label: !icon ? title : undefined, icon }; }); return segments; } dispose(): void { super.dispose(); if (this.showTimeoutHandle) { clearTimeout(this.showTimeoutHandle); } this._win = null!; // Important to dereference the window object to allow for GC } }
src/vs/code/electron-main/window.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.02826867252588272, 0.000520000234246254, 0.00015954775153659284, 0.0001683320733718574, 0.002497802022844553 ]
{ "id": 3, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n", "\t\t\t\t\t\t\t\t// Sandbox\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 201 }
name: "Rich Navigation Indexing" on: pull_request: push: branches: - master jobs: richnav: runs-on: windows-latest steps: - uses: actions/checkout@v2 - name: Install dependencies run: yarn --frozen-lockfile env: CHILD_CONCURRENCY: 1 - uses: microsoft/[email protected] with: languages: typescript repo-token: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true
.github/workflows/rich-navigation.yml
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0001750884111970663, 0.00017185782780870795, 0.00016777554992586374, 0.00017270950775127858, 0.0000030455989872280043 ]
{ "id": 3, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n", "\t\t\t\t\t\t\t\t// Sandbox\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 201 }
{ "editor": [ { "name": "vs/platform", "project": "vscode-editor" }, { "name": "vs/editor/contrib", "project": "vscode-editor" }, { "name": "vs/editor", "project": "vscode-editor" }, { "name": "vs/base", "project": "vscode-editor" } ], "workbench": [ { "name": "vs/code", "project": "vscode-workbench" }, { "name": "vs/workbench", "project": "vscode-workbench" }, { "name": "vs/workbench/api/common", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/backup", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/bulkEdit", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/cli", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/codeEditor", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/callHierarchy", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/codeActions", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/comments", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/debug", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/emmet", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/experiments", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/extensions", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/externalTerminal", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/feedback", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/files", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/html", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/issue", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/keybindings", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/markers", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/localizations", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/logs", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/output", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/performance", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/preferences", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/notebook", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/quickaccess", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/userData", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/remote", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/relauncher", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/sash", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/scm", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/search", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/searchEditor", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/snippets", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/format", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/tags", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/surveys", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/tasks", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/terminal", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/themes", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/trust", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/update", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/url", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/watermark", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/webview", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/customEditor", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/welcome", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/outline", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/userDataSync", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/views", "project": "vscode-workbench" }, { "name": "vs/workbench/services/actions", "project": "vscode-workbench" }, { "name": "vs/workbench/services/authToken", "project": "vscode-workbench" }, { "name": "vs/workbench/services/bulkEdit", "project": "vscode-workbench" }, { "name": "vs/workbench/services/commands", "project": "vscode-workbench" }, { "name": "vs/workbench/services/configuration", "project": "vscode-workbench" }, { "name": "vs/workbench/services/configurationResolver", "project": "vscode-workbench" }, { "name": "vs/workbench/services/dialogs", "project": "vscode-workbench" }, { "name": "vs/workbench/services/editor", "project": "vscode-workbench" }, { "name": "vs/workbench/services/extensions", "project": "vscode-workbench" }, { "name": "vs/workbench/services/extensionManagement", "project": "vscode-workbench" }, { "name": "vs/workbench/services/files", "project": "vscode-workbench" }, { "name": "vs/workbench/services/log", "project": "vscode-workbench" }, { "name": "vs/workbench/services/integrity", "project": "vscode-workbench" }, { "name": "vs/workbench/services/keybinding", "project": "vscode-workbench" }, { "name": "vs/workbench/services/lifecycle", "project": "vscode-workbench" }, { "name": "vs/workbench/services/mode", "project": "vscode-workbench" }, { "name": "vs/workbench/services/progress", "project": "vscode-workbench" }, { "name": "vs/workbench/services/remote", "project": "vscode-workbench" }, { "name": "vs/workbench/services/search", "project": "vscode-workbench" }, { "name": "vs/workbench/services/textfile", "project": "vscode-workbench" }, { "name": "vs/workbench/services/themes", "project": "vscode-workbench" }, { "name": "vs/workbench/services/textMate", "project": "vscode-workbench" }, { "name": "vs/workbench/services/workingCopy", "project": "vscode-workbench" }, { "name": "vs/workbench/services/workspaces", "project": "vscode-workbench" }, { "name": "vs/workbench/services/decorations", "project": "vscode-workbench" }, { "name": "vs/workbench/services/label", "project": "vscode-workbench" }, { "name": "vs/workbench/services/preferences", "project": "vscode-preferences" }, { "name": "vs/workbench/services/notification", "project": "vscode-workbench" }, { "name": "vs/workbench/services/userData", "project": "vscode-workbench" }, { "name": "vs/workbench/services/userDataSync", "project": "vscode-workbench" }, { "name": "vs/workbench/services/views", "project": "vscode-workbench" }, { "name": "vs/workbench/contrib/timeline", "project": "vscode-workbench" }, { "name": "vs/workbench/services/authentication", "project": "vscode-workbench" } ] }
build/lib/i18n.resources.json
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017362127255182713, 0.00017158107948489487, 0.00016923880320973694, 0.0001712781231617555, 0.000001351671812699351 ]
{ "id": 3, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n", "\t\t\t\t\t\t\t\t// Sandbox\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 201 }
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M1.51087 2L1.01087 2.5V6.24821C1.31813 5.99577 1.65323 5.77599 2.01087 5.59417V3H6.30003L7.15283 3.8528L7.50638 3.99925H14.0011V5.00311H7.50051L7.14695 5.14956L6.79587 5.50064C7.11147 5.64581 7.41097 5.81999 7.69096 6.01976L7.70761 6.00311H13.9903V7.49588H13.9906V11.4929H13.9903V13.0021H9.39923C9.21613 13.3599 8.99498 13.695 8.74113 14.0021H14.4903L14.9903 13.5021V9.00599L15.0011 8.99512V3.49925L14.5011 2.99925H7.71349L6.86069 2.14645L6.50713 2H1.51087Z" fill="#424242"/> <path d="M6 10.5C6 11.3284 5.32843 12 4.5 12C3.67157 12 3 11.3284 3 10.5C3 9.67157 3.67157 9 4.5 9C5.32843 9 6 9.67157 6 10.5Z" fill="#424242"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M8 10.5C8 12.433 6.433 14 4.5 14C2.567 14 1 12.433 1 10.5C1 8.567 2.567 7 4.5 7C6.433 7 8 8.567 8 10.5ZM4.5 13C5.88071 13 7 11.8807 7 10.5C7 9.11929 5.88071 8 4.5 8C3.11929 8 2 9.11929 2 10.5C2 11.8807 3.11929 13 4.5 13Z" fill="#424242"/> </svg>
extensions/theme-defaults/fileicons/images/root-folder-light.svg
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0005835660267621279, 0.0005835660267621279, 0.0005835660267621279, 0.0005835660267621279, 0 ]
{ "id": 4, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 266 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; import * as os from 'os'; import product from 'vs/platform/product/common/product'; import * as objects from 'vs/base/common/objects'; import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv'; import { ICommonIssueService, IssueReporterData, IssueReporterFeatures, ProcessExplorerData } from 'vs/platform/issue/common/issue'; import { BrowserWindow, ipcMain, screen, IpcMainEvent, Display, shell } from 'electron'; import { ILaunchMainService } from 'vs/platform/launch/electron-main/launchMainService'; import { PerformanceInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics'; import { IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { isMacintosh, IProcessEnvironment } from 'vs/base/common/platform'; import { ILogService } from 'vs/platform/log/common/log'; import { IWindowState } from 'vs/platform/windows/electron-main/windows'; import { listProcesses } from 'vs/base/node/ps'; import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs'; import { URI } from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { zoomLevelToZoomFactor } from 'vs/platform/windows/common/windows'; const DEFAULT_BACKGROUND_COLOR = '#1E1E1E'; export const IIssueMainService = createDecorator<IIssueMainService>('issueMainService'); export interface IIssueMainService extends ICommonIssueService { } export class IssueMainService implements ICommonIssueService { declare readonly _serviceBrand: undefined; _issueWindow: BrowserWindow | null = null; _issueParentWindow: BrowserWindow | null = null; _processExplorerWindow: BrowserWindow | null = null; _processExplorerParentWindow: BrowserWindow | null = null; constructor( private machineId: string, private userEnv: IProcessEnvironment, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @ILaunchMainService private readonly launchMainService: ILaunchMainService, @ILogService private readonly logService: ILogService, @IDiagnosticsService private readonly diagnosticsService: IDiagnosticsService, @IDialogMainService private readonly dialogMainService: IDialogMainService ) { this.registerListeners(); } private registerListeners(): void { ipcMain.on('vscode:issueSystemInfoRequest', async (event: IpcMainEvent) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getSystemInfo(info, remoteData).then(msg => { event.sender.send('vscode:issueSystemInfoResponse', msg); }); }); }); ipcMain.on('vscode:listProcesses', async (event: IpcMainEvent) => { const processes = []; try { const mainPid = await this.launchMainService.getMainProcessId(); processes.push({ name: localize('local', "Local"), rootProcess: await listProcesses(mainPid) }); (await this.launchMainService.getRemoteDiagnostics({ includeProcesses: true })) .forEach(data => { if (isRemoteDiagnosticError(data)) { processes.push({ name: data.hostName, rootProcess: data }); } else { if (data.processes) { processes.push({ name: data.hostName, rootProcess: data.processes }); } } }); } catch (e) { this.logService.error(`Listing processes failed: ${e}`); } event.sender.send('vscode:listProcessesResponse', processes); }); ipcMain.on('vscode:issueReporterClipboard', (event: IpcMainEvent) => { const messageOptions = { message: localize('issueReporterWriteToClipboard', "There is too much data to send to GitHub directly. The data will be copied to the clipboard, please paste it into the GitHub issue page that is opened."), type: 'warning', buttons: [ localize('ok', "OK"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { event.sender.send('vscode:issueReporterClipboardResponse', result.response === 0); }); } }); ipcMain.on('vscode:issuePerformanceInfoRequest', (event: IpcMainEvent) => { this.getPerformanceInfo().then(msg => { event.sender.send('vscode:issuePerformanceInfoResponse', msg); }); }); ipcMain.on('vscode:issueReporterConfirmClose', () => { const messageOptions = { message: localize('confirmCloseIssueReporter', "Your input will not be saved. Are you sure you want to close this window?"), type: 'warning', buttons: [ localize('yes', "Yes"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { if (result.response === 0) { if (this._issueWindow) { this._issueWindow.destroy(); this._issueWindow = null; } } }); } }); ipcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any; }) => { const { id, from, args } = commandInfo; let parentWindow: BrowserWindow | null; switch (from) { case 'issueReporter': parentWindow = this._issueParentWindow; break; case 'processExplorer': parentWindow = this._processExplorerParentWindow; break; default: throw new Error(`Unexpected command source: ${from}`); } if (parentWindow) { parentWindow.webContents.send('vscode:runAction', { id, from, args }); } }); ipcMain.on('vscode:openExternal', (_: unknown, arg: string) => { shell.openExternal(arg); }); ipcMain.on('vscode:closeIssueReporter', (event: IpcMainEvent) => { if (this._issueWindow) { this._issueWindow.close(); } }); ipcMain.on('vscode:closeProcessExplorer', (event: IpcMainEvent) => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); } }); ipcMain.on('vscode:windowsInfoRequest', (event: IpcMainEvent) => { this.launchMainService.getMainProcessInfo().then(info => { event.sender.send('vscode:windowsInfoResponse', info.windows); }); }); } openReporter(data: IssueReporterData): Promise<void> { return new Promise(_ => { if (!this._issueWindow) { this._issueParentWindow = BrowserWindow.getFocusedWindow(); if (this._issueParentWindow) { const position = this.getWindowPosition(this._issueParentWindow, 700, 800); this._issueWindow = new BrowserWindow({ fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, title: localize('issueReporter', "Issue Reporter"), backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR, webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._issueWindow.setMenuBarVisibility(false); // workaround for now, until a menu is implemented // Modified when testing UI const features: IssueReporterFeatures = {}; this.logService.trace('issueService#openReporter: opening issue reporter'); this._issueWindow.loadURL(this.getIssueReporterPath(data, features)); this._issueWindow.on('close', () => this._issueWindow = null); this._issueParentWindow.on('closed', () => { if (this._issueWindow) { this._issueWindow.close(); this._issueWindow = null; } }); } } if (this._issueWindow) { this._issueWindow.focus(); } }); } openProcessExplorer(data: ProcessExplorerData): Promise<void> { return new Promise(_ => { // Create as singleton if (!this._processExplorerWindow) { this._processExplorerParentWindow = BrowserWindow.getFocusedWindow(); if (this._processExplorerParentWindow) { const position = this.getWindowPosition(this._processExplorerParentWindow, 800, 500); this._processExplorerWindow = new BrowserWindow({ skipTaskbar: true, resizable: true, fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, backgroundColor: data.styles.backgroundColor, title: localize('processExplorer', "Process Explorer"), webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._processExplorerWindow.setMenuBarVisibility(false); const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._processExplorerWindow.id, userEnv: this.userEnv, machineId: this.machineId, data }; this._processExplorerWindow.loadURL( toLauchUrl('vs/code/electron-sandbox/processExplorer/processExplorer.html', windowConfiguration)); this._processExplorerWindow.on('close', () => this._processExplorerWindow = null); this._processExplorerParentWindow.on('close', () => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); this._processExplorerWindow = null; } }); } } // Focus if (this._processExplorerWindow) { this._processExplorerWindow.focus(); } }); } public async getSystemStatus(): Promise<string> { return Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; return this.diagnosticsService.getDiagnostics(info, remoteData); }); } private getWindowPosition(parentWindow: BrowserWindow, defaultWidth: number, defaultHeight: number): IWindowState { // We want the new window to open on the same display that the parent is in let displayToUse: Display | undefined; const displays = screen.getAllDisplays(); // Single Display if (displays.length === 1) { displayToUse = displays[0]; } // Multi Display else { // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is if (isMacintosh) { const cursorPoint = screen.getCursorScreenPoint(); displayToUse = screen.getDisplayNearestPoint(cursorPoint); } // if we have a last active window, use that display for the new window if (!displayToUse && parentWindow) { displayToUse = screen.getDisplayMatching(parentWindow.getBounds()); } // fallback to primary display or first display if (!displayToUse) { displayToUse = screen.getPrimaryDisplay() || displays[0]; } } const state: IWindowState = { width: defaultWidth, height: defaultHeight }; const displayBounds = displayToUse.bounds; state.x = displayBounds.x + (displayBounds.width / 2) - (state.width! / 2); state.y = displayBounds.y + (displayBounds.height / 2) - (state.height! / 2); if (displayBounds.width > 0 && displayBounds.height > 0 /* Linux X11 sessions sometimes report wrong display bounds */) { if (state.x < displayBounds.x) { state.x = displayBounds.x; // prevent window from falling out of the screen to the left } if (state.y < displayBounds.y) { state.y = displayBounds.y; // prevent window from falling out of the screen to the top } if (state.x > (displayBounds.x + displayBounds.width)) { state.x = displayBounds.x; // prevent window from falling out of the screen to the right } if (state.y > (displayBounds.y + displayBounds.height)) { state.y = displayBounds.y; // prevent window from falling out of the screen to the bottom } if (state.width! > displayBounds.width) { state.width = displayBounds.width; // prevent window from exceeding display bounds width } if (state.height! > displayBounds.height) { state.height = displayBounds.height; // prevent window from exceeding display bounds height } } return state; } private getPerformanceInfo(): Promise<PerformanceInfo> { return new Promise(async (resolve, reject) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: true, includeWorkspaceMetadata: true })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getPerformanceInfo(info, remoteData) .then(diagnosticInfo => { resolve(diagnosticInfo); }) .catch(err => { this.logService.warn('issueService#getPerformanceInfo ', err.message); reject(err); }); }); }); } private getIssueReporterPath(data: IssueReporterData, features: IssueReporterFeatures): string { if (!this._issueWindow) { throw new Error('Issue window has been disposed'); } const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._issueWindow.id, machineId: this.machineId, userEnv: this.userEnv, data, features, disableExtensions: this.environmentService.disableExtensions, os: { type: os.type(), arch: os.arch(), release: os.release(), }, product: { nameShort: product.nameShort, version: product.version, commit: product.commit, date: product.date, reportIssueUrl: product.reportIssueUrl } }; return toLauchUrl('vs/code/electron-sandbox/issue/issueReporter.html', windowConfiguration); } } function toLauchUrl<T>(pathToHtml: string, windowConfiguration: T): string { const environment = parseArgs(process.argv, OPTIONS); const config = objects.assign(environment, windowConfiguration); for (const keyValue of Object.keys(config)) { const key = keyValue as keyof typeof config; if (config[key] === undefined || config[key] === null || config[key] === '') { delete config[key]; // only send over properties that have a true value } } return `${require.toUrl(pathToHtml)}?config=${encodeURIComponent(JSON.stringify(config))}`; }
src/vs/platform/issue/electron-main/issueMainService.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.9944487810134888, 0.043064266443252563, 0.00016331591177731752, 0.0001699859567452222, 0.19915775954723358 ]
{ "id": 4, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 266 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { CancellationToken } from 'vs/base/common/cancellation'; import { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostWebview, ExtHostWebviews } from 'vs/workbench/api/common/extHostWebview'; import type * as vscode from 'vscode'; import * as extHostProtocol from './extHost.protocol'; import * as extHostTypes from './extHostTypes'; class ExtHostWebviewView extends Disposable implements vscode.WebviewView { readonly #handle: extHostProtocol.WebviewHandle; readonly #proxy: extHostProtocol.MainThreadWebviewViewsShape; readonly #viewType: string; readonly #webview: ExtHostWebview; #isDisposed = false; #isVisible: boolean; #title: string | undefined; #description: string | undefined; constructor( handle: extHostProtocol.WebviewHandle, proxy: extHostProtocol.MainThreadWebviewViewsShape, viewType: string, title: string | undefined, webview: ExtHostWebview, isVisible: boolean, ) { super(); this.#viewType = viewType; this.#title = title; this.#handle = handle; this.#proxy = proxy; this.#webview = webview; this.#isVisible = isVisible; } public dispose() { if (this.#isDisposed) { return; } this.#isDisposed = true; this.#onDidDispose.fire(); super.dispose(); } readonly #onDidChangeVisibility = this._register(new Emitter<void>()); public readonly onDidChangeVisibility = this.#onDidChangeVisibility.event; readonly #onDidDispose = this._register(new Emitter<void>()); public readonly onDidDispose = this.#onDidDispose.event; public get title(): string | undefined { this.assertNotDisposed(); return this.#title; } public set title(value: string | undefined) { this.assertNotDisposed(); if (this.#title !== value) { this.#title = value; this.#proxy.$setWebviewViewTitle(this.#handle, value); } } public get description(): string | undefined { this.assertNotDisposed(); return this.#description; } public set description(value: string | undefined) { this.assertNotDisposed(); if (this.#description !== value) { this.#description = value; this.#proxy.$setWebviewViewDescription(this.#handle, value); } } public get visible(): boolean { return this.#isVisible; } public get webview(): vscode.Webview { return this.#webview; } public get viewType(): string { return this.#viewType; } /* internal */ _setVisible(visible: boolean) { if (visible === this.#isVisible) { return; } this.#isVisible = visible; this.#onDidChangeVisibility.fire(); } public show(preserveFocus?: boolean): void { this.assertNotDisposed(); this.#proxy.$show(this.#handle, !!preserveFocus); } private assertNotDisposed() { if (this.#isDisposed) { throw new Error('Webview is disposed'); } } } export class ExtHostWebviewViews implements extHostProtocol.ExtHostWebviewViewsShape { private readonly _proxy: extHostProtocol.MainThreadWebviewViewsShape; private readonly _viewProviders = new Map<string, { readonly provider: vscode.WebviewViewProvider; readonly extension: IExtensionDescription; }>(); private readonly _webviewViews = new Map<extHostProtocol.WebviewHandle, ExtHostWebviewView>(); constructor( mainContext: extHostProtocol.IMainContext, private readonly _extHostWebview: ExtHostWebviews, ) { this._proxy = mainContext.getProxy(extHostProtocol.MainContext.MainThreadWebviewViews); } public registerWebviewViewProvider( extension: IExtensionDescription, viewType: string, provider: vscode.WebviewViewProvider, webviewOptions?: { retainContextWhenHidden?: boolean }, ): vscode.Disposable { if (this._viewProviders.has(viewType)) { throw new Error(`View provider for '${viewType}' already registered`); } this._viewProviders.set(viewType, { provider, extension }); this._proxy.$registerWebviewViewProvider(viewType, webviewOptions); return new extHostTypes.Disposable(() => { this._viewProviders.delete(viewType); this._proxy.$unregisterWebviewViewProvider(viewType); }); } async $resolveWebviewView( webviewHandle: string, viewType: string, title: string | undefined, state: any, cancellation: CancellationToken, ): Promise<void> { const entry = this._viewProviders.get(viewType); if (!entry) { throw new Error(`No view provider found for '${viewType}'`); } const { provider, extension } = entry; const webview = this._extHostWebview.createNewWebview(webviewHandle, { /* todo */ }, extension); const revivedView = new ExtHostWebviewView(webviewHandle, this._proxy, viewType, title, webview, true); this._webviewViews.set(webviewHandle, revivedView); await provider.resolveWebviewView(revivedView, { state }, cancellation); } async $onDidChangeWebviewViewVisibility( webviewHandle: string, visible: boolean ) { const webviewView = this.getWebviewView(webviewHandle); webviewView._setVisible(visible); } async $disposeWebviewView(webviewHandle: string) { const webviewView = this.getWebviewView(webviewHandle); this._webviewViews.delete(webviewHandle); webviewView.dispose(); } private getWebviewView(handle: string): ExtHostWebviewView { const entry = this._webviewViews.get(handle); if (!entry) { throw new Error('No webview found'); } return entry; } }
src/vs/workbench/api/common/extHostWebviewView.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017425381520297378, 0.00017093183123506606, 0.0001655534579185769, 0.00017098666285164654, 0.000002214776941400487 ]
{ "id": 4, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 266 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import * as interfaces from './interfaces'; import ContentProvider from './contentProvider'; import { loadMessageBundle } from 'vscode-nls'; const localize = loadMessageBundle(); interface IDocumentMergeConflictNavigationResults { canNavigate: boolean; conflict?: interfaces.IDocumentMergeConflict; } enum NavigationDirection { Forwards, Backwards } export default class CommandHandler implements vscode.Disposable { private disposables: vscode.Disposable[] = []; private tracker: interfaces.IDocumentMergeConflictTracker; constructor(trackerService: interfaces.IDocumentMergeConflictTrackerService) { this.tracker = trackerService.createTracker('commands'); } begin() { this.disposables.push( this.registerTextEditorCommand('merge-conflict.accept.current', this.acceptCurrent), this.registerTextEditorCommand('merge-conflict.accept.incoming', this.acceptIncoming), this.registerTextEditorCommand('merge-conflict.accept.selection', this.acceptSelection), this.registerTextEditorCommand('merge-conflict.accept.both', this.acceptBoth), this.registerTextEditorCommand('merge-conflict.accept.all-current', this.acceptAllCurrent, this.acceptAllCurrentResources), this.registerTextEditorCommand('merge-conflict.accept.all-incoming', this.acceptAllIncoming, this.acceptAllIncomingResources), this.registerTextEditorCommand('merge-conflict.accept.all-both', this.acceptAllBoth), this.registerTextEditorCommand('merge-conflict.next', this.navigateNext), this.registerTextEditorCommand('merge-conflict.previous', this.navigatePrevious), this.registerTextEditorCommand('merge-conflict.compare', this.compare) ); } private registerTextEditorCommand(command: string, cb: (editor: vscode.TextEditor, ...args: any[]) => Promise<void>, resourceCB?: (uris: vscode.Uri[]) => Promise<void>) { return vscode.commands.registerCommand(command, (...args) => { if (resourceCB && args.length && args.every(arg => arg && arg.resourceUri)) { return resourceCB.call(this, args.map(arg => arg.resourceUri)); } const editor = vscode.window.activeTextEditor; return editor && cb.call(this, editor, ...args); }); } acceptCurrent(editor: vscode.TextEditor, ...args: any[]): Promise<void> { return this.accept(interfaces.CommitType.Current, editor, ...args); } acceptIncoming(editor: vscode.TextEditor, ...args: any[]): Promise<void> { return this.accept(interfaces.CommitType.Incoming, editor, ...args); } acceptBoth(editor: vscode.TextEditor, ...args: any[]): Promise<void> { return this.accept(interfaces.CommitType.Both, editor, ...args); } acceptAllCurrent(editor: vscode.TextEditor): Promise<void> { return this.acceptAll(interfaces.CommitType.Current, editor); } acceptAllIncoming(editor: vscode.TextEditor): Promise<void> { return this.acceptAll(interfaces.CommitType.Incoming, editor); } acceptAllCurrentResources(resources: vscode.Uri[]): Promise<void> { return this.acceptAllResources(interfaces.CommitType.Current, resources); } acceptAllIncomingResources(resources: vscode.Uri[]): Promise<void> { return this.acceptAllResources(interfaces.CommitType.Incoming, resources); } acceptAllBoth(editor: vscode.TextEditor): Promise<void> { return this.acceptAll(interfaces.CommitType.Both, editor); } async compare(editor: vscode.TextEditor, conflict: interfaces.IDocumentMergeConflict | null) { // No conflict, command executed from command palette if (!conflict) { conflict = await this.findConflictContainingSelection(editor); // Still failed to find conflict, warn the user and exit if (!conflict) { vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); return; } } const conflicts = await this.tracker.getConflicts(editor.document); // Still failed to find conflict, warn the user and exit if (!conflicts) { vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); return; } const scheme = editor.document.uri.scheme; let range = conflict.current.content; let leftRanges = conflicts.map(conflict => [conflict.current.content, conflict.range]); let rightRanges = conflicts.map(conflict => [conflict.incoming.content, conflict.range]); const leftUri = editor.document.uri.with({ scheme: ContentProvider.scheme, query: JSON.stringify({ scheme, range: range, ranges: leftRanges }) }); range = conflict.incoming.content; const rightUri = leftUri.with({ query: JSON.stringify({ scheme, ranges: rightRanges }) }); let mergeConflictLineOffsets = 0; for (let nextconflict of conflicts) { if (nextconflict.range.isEqual(conflict.range)) { break; } else { mergeConflictLineOffsets += (nextconflict.range.end.line - nextconflict.range.start.line) - (nextconflict.incoming.content.end.line - nextconflict.incoming.content.start.line); } } const selection = new vscode.Range( conflict.range.start.line - mergeConflictLineOffsets, conflict.range.start.character, conflict.range.start.line - mergeConflictLineOffsets, conflict.range.start.character ); const docPath = editor.document.uri.path; const fileName = docPath.substring(docPath.lastIndexOf('/') + 1); // avoid NodeJS path to keep browser webpack small const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName); const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict'); const openToTheSide = mergeConflictConfig.get<string>('diffViewPosition'); const opts: vscode.TextDocumentShowOptions = { viewColumn: openToTheSide === 'Beside' ? vscode.ViewColumn.Beside : vscode.ViewColumn.Active, selection }; if (openToTheSide === 'Below') { await vscode.commands.executeCommand('workbench.action.newGroupBelow'); } await vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title, opts); } navigateNext(editor: vscode.TextEditor): Promise<void> { return this.navigate(editor, NavigationDirection.Forwards); } navigatePrevious(editor: vscode.TextEditor): Promise<void> { return this.navigate(editor, NavigationDirection.Backwards); } async acceptSelection(editor: vscode.TextEditor): Promise<void> { let conflict = await this.findConflictContainingSelection(editor); if (!conflict) { vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); return; } let typeToAccept: interfaces.CommitType; let tokenAfterCurrentBlock: vscode.Range = conflict.splitter; if (conflict.commonAncestors.length > 0) { tokenAfterCurrentBlock = conflict.commonAncestors[0].header; } // Figure out if the cursor is in current or incoming, we do this by seeing if // the active position is before or after the range of the splitter or common // ancestors marker. We can use this trick as the previous check in // findConflictByActiveSelection will ensure it's within the conflict range, so // we don't falsely identify "current" or "incoming" if outside of a conflict range. if (editor.selection.active.isBefore(tokenAfterCurrentBlock.start)) { typeToAccept = interfaces.CommitType.Current; } else if (editor.selection.active.isAfter(conflict.splitter.end)) { typeToAccept = interfaces.CommitType.Incoming; } else if (editor.selection.active.isBefore(conflict.splitter.start)) { vscode.window.showWarningMessage(localize('cursorOnCommonAncestorsRange', 'Editor cursor is within the common ancestors block, please move it to either the "current" or "incoming" block')); return; } else { vscode.window.showWarningMessage(localize('cursorOnSplitterRange', 'Editor cursor is within the merge conflict splitter, please move it to either the "current" or "incoming" block')); return; } this.tracker.forget(editor.document); conflict.commitEdit(typeToAccept, editor); } dispose() { this.disposables.forEach(disposable => disposable.dispose()); this.disposables = []; } private async navigate(editor: vscode.TextEditor, direction: NavigationDirection): Promise<void> { let navigationResult = await this.findConflictForNavigation(editor, direction); if (!navigationResult) { // Check for autoNavigateNextConflict, if it's enabled(which indicating no conflict remain), then do not show warning const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict'); if (mergeConflictConfig.get<boolean>('autoNavigateNextConflict.enabled')) { return; } vscode.window.showWarningMessage(localize('noConflicts', 'No merge conflicts found in this file')); return; } else if (!navigationResult.canNavigate) { vscode.window.showWarningMessage(localize('noOtherConflictsInThisFile', 'No other merge conflicts within this file')); return; } else if (!navigationResult.conflict) { // TODO: Show error message? return; } // Move the selection to the first line of the conflict editor.selection = new vscode.Selection(navigationResult.conflict.range.start, navigationResult.conflict.range.start); editor.revealRange(navigationResult.conflict.range, vscode.TextEditorRevealType.Default); } private async accept(type: interfaces.CommitType, editor: vscode.TextEditor, ...args: any[]): Promise<void> { let conflict: interfaces.IDocumentMergeConflict | null; // If launched with known context, take the conflict from that if (args[0] === 'known-conflict') { conflict = args[1]; } else { // Attempt to find a conflict that matches the current cursor position conflict = await this.findConflictContainingSelection(editor); } if (!conflict) { vscode.window.showWarningMessage(localize('cursorNotInConflict', 'Editor cursor is not within a merge conflict')); return; } // Tracker can forget as we know we are going to do an edit this.tracker.forget(editor.document); conflict.commitEdit(type, editor); // navigate to the next merge conflict const mergeConflictConfig = vscode.workspace.getConfiguration('merge-conflict'); if (mergeConflictConfig.get<boolean>('autoNavigateNextConflict.enabled')) { this.navigateNext(editor); } } private async acceptAll(type: interfaces.CommitType, editor: vscode.TextEditor): Promise<void> { let conflicts = await this.tracker.getConflicts(editor.document); if (!conflicts || conflicts.length === 0) { vscode.window.showWarningMessage(localize('noConflicts', 'No merge conflicts found in this file')); return; } // For get the current state of the document, as we know we are doing to do a large edit this.tracker.forget(editor.document); // Apply all changes as one edit await editor.edit((edit) => conflicts.forEach(conflict => { conflict.applyEdit(type, editor.document, edit); })); } private async acceptAllResources(type: interfaces.CommitType, resources: vscode.Uri[]): Promise<void> { const documents = await Promise.all(resources.map(resource => vscode.workspace.openTextDocument(resource))); const edit = new vscode.WorkspaceEdit(); for (const document of documents) { const conflicts = await this.tracker.getConflicts(document); if (!conflicts || conflicts.length === 0) { continue; } // For get the current state of the document, as we know we are doing to do a large edit this.tracker.forget(document); // Apply all changes as one edit conflicts.forEach(conflict => { conflict.applyEdit(type, document, { replace: (range, newText) => edit.replace(document.uri, range, newText) }); }); } vscode.workspace.applyEdit(edit); } private async findConflictContainingSelection(editor: vscode.TextEditor, conflicts?: interfaces.IDocumentMergeConflict[]): Promise<interfaces.IDocumentMergeConflict | null> { if (!conflicts) { conflicts = await this.tracker.getConflicts(editor.document); } if (!conflicts || conflicts.length === 0) { return null; } for (const conflict of conflicts) { if (conflict.range.contains(editor.selection.active)) { return conflict; } } return null; } private async findConflictForNavigation(editor: vscode.TextEditor, direction: NavigationDirection, conflicts?: interfaces.IDocumentMergeConflict[]): Promise<IDocumentMergeConflictNavigationResults | null> { if (!conflicts) { conflicts = await this.tracker.getConflicts(editor.document); } if (!conflicts || conflicts.length === 0) { return null; } let selection = editor.selection.active; if (conflicts.length === 1) { if (conflicts[0].range.contains(selection)) { return { canNavigate: false }; } return { canNavigate: true, conflict: conflicts[0] }; } let predicate: (_conflict: any) => boolean; let fallback: () => interfaces.IDocumentMergeConflict; if (direction === NavigationDirection.Forwards) { predicate = (conflict) => selection.isBefore(conflict.range.start); fallback = () => conflicts![0]; } else if (direction === NavigationDirection.Backwards) { predicate = (conflict) => selection.isAfter(conflict.range.start); fallback = () => conflicts![conflicts!.length - 1]; } else { throw new Error(`Unsupported direction ${direction}`); } for (const conflict of conflicts) { if (predicate(conflict) && !conflict.range.contains(selection)) { return { canNavigate: true, conflict: conflict }; } } // Went all the way to the end, return the head return { canNavigate: true, conflict: fallback() }; } }
extensions/merge-conflict/src/commandHandler.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.0001891865103971213, 0.0001729004579829052, 0.00016712906653992832, 0.000172963147633709, 0.000003488265292617143 ]
{ "id": 4, "code_window": [ "\t\t\t\t\t\t\tpreload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,\n", "\t\t\t\t\t\t\tenableWebSQL: false,\n", "\t\t\t\t\t\t\tenableRemoteModule: false,\n", "\t\t\t\t\t\t\tnativeWindowOpen: true,\n", "\t\t\t\t\t\t\tzoomFactor: zoomLevelToZoomFactor(data.zoomLevel),\n", "\t\t\t\t\t\t\t...this.environmentService.sandbox ?\n", "\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep", "keep" ], "after_edit": [ "\t\t\t\t\t\t\tspellcheck: false,\n" ], "file_path": "src/vs/platform/issue/electron-main/issueMainService.ts", "type": "add", "edit_start_line_idx": 266 }
{ "information_for_contributors": [ "This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/daaain/Handlebars/commit/85a153a6f759df4e8da7533e1b3651f007867c51", "name": "Handlebars", "scopeName": "text.html.handlebars", "patterns": [ { "include": "#yfm" }, { "include": "#extends" }, { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#end_block" }, { "include": "#else_token" }, { "include": "#partial_and_var" }, { "include": "#inline_script" }, { "include": "#html_tags" }, { "include": "text.html.basic" } ], "repository": { "html_tags": { "patterns": [ { "begin": "(<)([a-zA-Z0-9:-]+)(?=[^>]*></\\2>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(>(<)/)(\\2)(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "meta.scope.between-tag-pair.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.html" } }, "name": "meta.tag.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "patterns": [ { "include": "#tag_generic_attribute" }, { "include": "#string" } ] }, { "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "end": "--\\s*>", "name": "comment.block.html", "patterns": [ { "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ] }, { "begin": "<!", "captures": { "0": { "name": "punctuation.definition.tag.html" } }, "end": ">", "name": "meta.tag.sgml.html", "patterns": [ { "begin": "(DOCTYPE|doctype)", "captures": { "1": { "name": "entity.name.tag.doctype.html" } }, "end": "(?=>)", "name": "meta.tag.sgml.doctype.html", "patterns": [ { "match": "\"[^\">]*\"", "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" } ] }, { "begin": "\\[CDATA\\[", "end": "]](?=>)", "name": "constant.other.inline-data.html" }, { "match": "(\\s*)(?!--|>)\\S(\\s*)", "name": "invalid.illegal.bad-comments-or-CDATA.html" } ] }, { "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } }, "end": "(</)((?i:style))(>)(?:\\s*\\n)?", "name": "source.css.embedded.html", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" } }, "end": "(?=</(?i:style))", "patterns": [ { "include": "source.css" } ] } ] }, { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "name": "source.js.embedded.html", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "end": "(</)((?i:script))", "patterns": [ { "captures": { "1": { "name": "punctuation.definition.comment.js" } }, "match": "(//).*?((?=</script)|$\\n?)", "name": "comment.line.double-slash.js" }, { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.js" } }, "end": "\\*/|(?=</script)", "name": "comment.block.js" }, { "include": "source.js" } ] } ] }, { "begin": "(</?)((?i:body|head|html)\\b)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.structure.any.html" } }, "end": "(>)", "name": "meta.tag.structure.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:address|blockquote|dd|div|header|section|footer|aside|nav|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.block.any.html" } }, "end": "(>)", "name": "meta.tag.block.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.inline.any.html" } }, "end": "((?: ?/)?>)", "name": "meta.tag.inline.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)([a-zA-Z0-9:-]+)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.other.html" } }, "end": "(>)", "name": "meta.tag.other.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(</?)([a-zA-Z0-9{}:-]+)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.tokenised.html" } }, "end": "(>)", "name": "meta.tag.tokenised.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "include": "#entities" }, { "match": "<>", "name": "invalid.illegal.incomplete.html" }, { "match": "<", "name": "invalid.illegal.bad-angle-bracket.html" } ] }, "entities": { "patterns": [ { "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "name": "constant.character.entity.html", "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)" }, { "name": "invalid.illegal.bad-ampersand.html", "match": "&" } ] }, "end_block": { "begin": "(\\{\\{)(~?/)([a-zA-Z0-9/_\\.-]+)\\s*", "end": "(~?\\}\\})", "name": "meta.function.block.end.handlebars", "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "2": { "name": "support.constant.handlebars keyword.control" }, "3": { "name": "support.constant.handlebars keyword.control" } }, "patterns": [] }, "yfm": { "patterns": [ { "patterns": [ { "include": "source.yaml" } ], "begin": "(?<!\\s)---\\n$", "end": "^---\\s", "name": "markup.raw.yaml.front-matter" } ] }, "comments": { "patterns": [ { "patterns": [ { "name": "keyword.annotation.handlebars", "match": "@\\w*" }, { "include": "#comments" } ], "begin": "\\{\\{!", "end": "\\}\\}", "name": "comment.block.handlebars" }, { "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "begin": "<!--", "end": "-{2,3}\\s*>", "name": "comment.block.html", "patterns": [ { "name": "invalid.illegal.bad-comments-or-CDATA.html", "match": "--" } ] } ] }, "block_comments": { "patterns": [ { "patterns": [ { "name": "keyword.annotation.handlebars", "match": "@\\w*" }, { "include": "#comments" } ], "begin": "\\{\\{!--", "end": "--\\}\\}", "name": "comment.block.handlebars" }, { "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "begin": "<!--", "end": "-{2,3}\\s*>", "name": "comment.block.html", "patterns": [ { "name": "invalid.illegal.bad-comments-or-CDATA.html", "match": "--" } ] } ] }, "block_helper": { "begin": "(\\{\\{)(~?\\#)([-a-zA-Z0-9_\\./>]+)\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*", "end": "(~?\\}\\})", "name": "meta.function.block.start.handlebars", "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "2": { "name": "support.constant.handlebars keyword.control" }, "3": { "name": "support.constant.handlebars keyword.control" }, "4": { "name": "variable.parameter.handlebars" }, "5": { "name": "support.constant.handlebars" }, "6": { "name": "variable.parameter.handlebars" }, "7": { "name": "support.constant.handlebars" } }, "patterns": [ { "include": "#string" }, { "include": "#handlebars_attribute" } ] }, "string-single-quoted": { "begin": "'", "end": "'", "name": "string.quoted.single.handlebars", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "patterns": [ { "include": "#escaped-single-quote" }, { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#else_token" }, { "include": "#end_block" }, { "include": "#partial_and_var" } ] }, "string": { "patterns": [ { "include": "#string-single-quoted" }, { "include": "#string-double-quoted" } ] }, "escaped-single-quote": { "name": "constant.character.escape.js", "match": "\\\\'" }, "escaped-double-quote": { "name": "constant.character.escape.js", "match": "\\\\\"" }, "partial_and_var": { "begin": "(\\{\\{~?\\{*(>|!<)*)\\s*(@?[-a-zA-Z0-9$_\\./]+)*", "end": "(~?\\}\\}\\}*)", "name": "meta.function.inline.other.handlebars", "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "3": { "name": "variable.parameter.handlebars" } }, "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "patterns": [ { "include": "#string" }, { "include": "#handlebars_attribute" } ] }, "handlebars_attribute_name": { "begin": "\\b([-a-zA-Z0-9_\\.]+)\\b=", "captures": { "1": { "name": "variable.parameter.handlebars" } }, "end": "(?='|\"|)", "name": "entity.other.attribute-name.handlebars" }, "handlebars_attribute_value": { "begin": "([-a-zA-Z0-9_\\./]+)\\b", "captures": { "1": { "name": "variable.parameter.handlebars" } }, "end": "('|\"|)", "name": "entity.other.attribute-value.handlebars", "patterns": [ { "include": "#string" } ] }, "handlebars_attribute": { "patterns": [ { "include": "#handlebars_attribute_name" }, { "include": "#handlebars_attribute_value" } ] }, "extends": { "patterns": [ { "end": "(\\}\\})", "begin": "(\\{\\{!<)\\s([-a-zA-Z0-9_\\./]+)", "beginCaptures": { "1": { "name": "support.function.handlebars" }, "2": { "name": "support.class.handlebars" } }, "endCaptures": { "1": { "name": "support.function.handlebars" } }, "name": "meta.preprocessor.handlebars" } ] }, "else_token": { "begin": "(\\{\\{)(~?else)(@?\\s(if)\\s([-a-zA-Z0-9_\\.\\(\\s\\)/]+))?", "end": "(~?\\}\\}\\}*)", "name": "meta.function.inline.else.handlebars", "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "2": { "name": "support.constant.handlebars keyword.control" }, "3": { "name": "support.constant.handlebars" }, "4": { "name": "variable.parameter.handlebars" } }, "endCaptures": { "1": { "name": "support.constant.handlebars" } } }, "string-double-quoted": { "begin": "\"", "end": "\"", "name": "string.quoted.double.handlebars", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "patterns": [ { "include": "#escaped-double-quote" }, { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#else_token" }, { "include": "#end_block" }, { "include": "#partial_and_var" } ] }, "inline_script": { "begin": "(?:^\\s+)?(<)((?i:script))\\b(?:.*(type)=([\"'](?:text/x-handlebars-template|text/x-handlebars|text/template|x-tmpl-handlebars)[\"']))(?![^>]*/>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" }, "3": { "name": "entity.other.attribute-name.html" }, "4": { "name": "string.quoted.double.html" } }, "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", "endCaptures": { "2": { "name": "punctuation.definition.tag.html" } }, "name": "source.handlebars.embedded.html", "patterns": [ { "include": "#tag-stuff" }, { "begin": "(?<!</(?:script|SCRIPT))(>)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "end": "(</)((?i:script))", "patterns": [ { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#end_block" }, { "include": "#else_token" }, { "include": "#partial_and_var" }, { "include": "#html_tags" }, { "include": "text.html.basic" } ] } ] }, "tag_generic_attribute": { "begin": "\\b([a-zA-Z0-9_-]+)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.generic.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "patterns": [ { "include": "#string" } ], "name": "entity.other.attribute-name.html", "end": "(?<='|\"|)" }, "tag_id_attribute": { "begin": "\\b(id)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "end": "(?<='|\"|)", "name": "meta.attribute-with-value.id.html", "patterns": [ { "include": "#string" } ] }, "tag-stuff": { "patterns": [ { "include": "#tag_id_attribute" }, { "include": "#tag_generic_attribute" }, { "include": "#string" }, { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#end_block" }, { "include": "#else_token" }, { "include": "#partial_and_var" } ] } } }
extensions/handlebars/syntaxes/Handlebars.tmLanguage.json
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017574105004314333, 0.00017125310841947794, 0.00016647060692775995, 0.00017121314886026084, 0.0000014545987596648047 ]
{ "id": 5, "code_window": [ "\t\t\tnodeIntegration: true,\n", "\t\t\tenableWebSQL: false,\n", "\t\t\tenableRemoteModule: false,\n", "\t\t\tnativeWindowOpen: true,\n", "\t\t\twebviewTag: true\n", "\t\t}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\tspellcheck: false,\n" ], "file_path": "test/unit/electron/index.js", "type": "add", "edit_start_line_idx": 123 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; import * as os from 'os'; import product from 'vs/platform/product/common/product'; import * as objects from 'vs/base/common/objects'; import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv'; import { ICommonIssueService, IssueReporterData, IssueReporterFeatures, ProcessExplorerData } from 'vs/platform/issue/common/issue'; import { BrowserWindow, ipcMain, screen, IpcMainEvent, Display, shell } from 'electron'; import { ILaunchMainService } from 'vs/platform/launch/electron-main/launchMainService'; import { PerformanceInfo, isRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics'; import { IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService'; import { IEnvironmentService, INativeEnvironmentService } from 'vs/platform/environment/common/environment'; import { isMacintosh, IProcessEnvironment } from 'vs/base/common/platform'; import { ILogService } from 'vs/platform/log/common/log'; import { IWindowState } from 'vs/platform/windows/electron-main/windows'; import { listProcesses } from 'vs/base/node/ps'; import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogs'; import { URI } from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { zoomLevelToZoomFactor } from 'vs/platform/windows/common/windows'; const DEFAULT_BACKGROUND_COLOR = '#1E1E1E'; export const IIssueMainService = createDecorator<IIssueMainService>('issueMainService'); export interface IIssueMainService extends ICommonIssueService { } export class IssueMainService implements ICommonIssueService { declare readonly _serviceBrand: undefined; _issueWindow: BrowserWindow | null = null; _issueParentWindow: BrowserWindow | null = null; _processExplorerWindow: BrowserWindow | null = null; _processExplorerParentWindow: BrowserWindow | null = null; constructor( private machineId: string, private userEnv: IProcessEnvironment, @IEnvironmentService private readonly environmentService: INativeEnvironmentService, @ILaunchMainService private readonly launchMainService: ILaunchMainService, @ILogService private readonly logService: ILogService, @IDiagnosticsService private readonly diagnosticsService: IDiagnosticsService, @IDialogMainService private readonly dialogMainService: IDialogMainService ) { this.registerListeners(); } private registerListeners(): void { ipcMain.on('vscode:issueSystemInfoRequest', async (event: IpcMainEvent) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getSystemInfo(info, remoteData).then(msg => { event.sender.send('vscode:issueSystemInfoResponse', msg); }); }); }); ipcMain.on('vscode:listProcesses', async (event: IpcMainEvent) => { const processes = []; try { const mainPid = await this.launchMainService.getMainProcessId(); processes.push({ name: localize('local', "Local"), rootProcess: await listProcesses(mainPid) }); (await this.launchMainService.getRemoteDiagnostics({ includeProcesses: true })) .forEach(data => { if (isRemoteDiagnosticError(data)) { processes.push({ name: data.hostName, rootProcess: data }); } else { if (data.processes) { processes.push({ name: data.hostName, rootProcess: data.processes }); } } }); } catch (e) { this.logService.error(`Listing processes failed: ${e}`); } event.sender.send('vscode:listProcessesResponse', processes); }); ipcMain.on('vscode:issueReporterClipboard', (event: IpcMainEvent) => { const messageOptions = { message: localize('issueReporterWriteToClipboard', "There is too much data to send to GitHub directly. The data will be copied to the clipboard, please paste it into the GitHub issue page that is opened."), type: 'warning', buttons: [ localize('ok', "OK"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { event.sender.send('vscode:issueReporterClipboardResponse', result.response === 0); }); } }); ipcMain.on('vscode:issuePerformanceInfoRequest', (event: IpcMainEvent) => { this.getPerformanceInfo().then(msg => { event.sender.send('vscode:issuePerformanceInfoResponse', msg); }); }); ipcMain.on('vscode:issueReporterConfirmClose', () => { const messageOptions = { message: localize('confirmCloseIssueReporter', "Your input will not be saved. Are you sure you want to close this window?"), type: 'warning', buttons: [ localize('yes', "Yes"), localize('cancel', "Cancel") ] }; if (this._issueWindow) { this.dialogMainService.showMessageBox(messageOptions, this._issueWindow) .then(result => { if (result.response === 0) { if (this._issueWindow) { this._issueWindow.destroy(); this._issueWindow = null; } } }); } }); ipcMain.on('vscode:workbenchCommand', (_: unknown, commandInfo: { id: any; from: any; args: any; }) => { const { id, from, args } = commandInfo; let parentWindow: BrowserWindow | null; switch (from) { case 'issueReporter': parentWindow = this._issueParentWindow; break; case 'processExplorer': parentWindow = this._processExplorerParentWindow; break; default: throw new Error(`Unexpected command source: ${from}`); } if (parentWindow) { parentWindow.webContents.send('vscode:runAction', { id, from, args }); } }); ipcMain.on('vscode:openExternal', (_: unknown, arg: string) => { shell.openExternal(arg); }); ipcMain.on('vscode:closeIssueReporter', (event: IpcMainEvent) => { if (this._issueWindow) { this._issueWindow.close(); } }); ipcMain.on('vscode:closeProcessExplorer', (event: IpcMainEvent) => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); } }); ipcMain.on('vscode:windowsInfoRequest', (event: IpcMainEvent) => { this.launchMainService.getMainProcessInfo().then(info => { event.sender.send('vscode:windowsInfoResponse', info.windows); }); }); } openReporter(data: IssueReporterData): Promise<void> { return new Promise(_ => { if (!this._issueWindow) { this._issueParentWindow = BrowserWindow.getFocusedWindow(); if (this._issueParentWindow) { const position = this.getWindowPosition(this._issueParentWindow, 700, 800); this._issueWindow = new BrowserWindow({ fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, title: localize('issueReporter', "Issue Reporter"), backgroundColor: data.styles.backgroundColor || DEFAULT_BACKGROUND_COLOR, webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._issueWindow.setMenuBarVisibility(false); // workaround for now, until a menu is implemented // Modified when testing UI const features: IssueReporterFeatures = {}; this.logService.trace('issueService#openReporter: opening issue reporter'); this._issueWindow.loadURL(this.getIssueReporterPath(data, features)); this._issueWindow.on('close', () => this._issueWindow = null); this._issueParentWindow.on('closed', () => { if (this._issueWindow) { this._issueWindow.close(); this._issueWindow = null; } }); } } if (this._issueWindow) { this._issueWindow.focus(); } }); } openProcessExplorer(data: ProcessExplorerData): Promise<void> { return new Promise(_ => { // Create as singleton if (!this._processExplorerWindow) { this._processExplorerParentWindow = BrowserWindow.getFocusedWindow(); if (this._processExplorerParentWindow) { const position = this.getWindowPosition(this._processExplorerParentWindow, 800, 500); this._processExplorerWindow = new BrowserWindow({ skipTaskbar: true, resizable: true, fullscreen: false, width: position.width, height: position.height, minWidth: 300, minHeight: 200, x: position.x, y: position.y, backgroundColor: data.styles.backgroundColor, title: localize('processExplorer', "Process Explorer"), webPreferences: { preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath, enableWebSQL: false, enableRemoteModule: false, nativeWindowOpen: true, zoomFactor: zoomLevelToZoomFactor(data.zoomLevel), ...this.environmentService.sandbox ? // Sandbox { sandbox: true, contextIsolation: true } : // No Sandbox { nodeIntegration: true } } }); this._processExplorerWindow.setMenuBarVisibility(false); const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._processExplorerWindow.id, userEnv: this.userEnv, machineId: this.machineId, data }; this._processExplorerWindow.loadURL( toLauchUrl('vs/code/electron-sandbox/processExplorer/processExplorer.html', windowConfiguration)); this._processExplorerWindow.on('close', () => this._processExplorerWindow = null); this._processExplorerParentWindow.on('close', () => { if (this._processExplorerWindow) { this._processExplorerWindow.close(); this._processExplorerWindow = null; } }); } } // Focus if (this._processExplorerWindow) { this._processExplorerWindow.focus(); } }); } public async getSystemStatus(): Promise<string> { return Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: false, includeWorkspaceMetadata: false })]) .then(result => { const [info, remoteData] = result; return this.diagnosticsService.getDiagnostics(info, remoteData); }); } private getWindowPosition(parentWindow: BrowserWindow, defaultWidth: number, defaultHeight: number): IWindowState { // We want the new window to open on the same display that the parent is in let displayToUse: Display | undefined; const displays = screen.getAllDisplays(); // Single Display if (displays.length === 1) { displayToUse = displays[0]; } // Multi Display else { // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is if (isMacintosh) { const cursorPoint = screen.getCursorScreenPoint(); displayToUse = screen.getDisplayNearestPoint(cursorPoint); } // if we have a last active window, use that display for the new window if (!displayToUse && parentWindow) { displayToUse = screen.getDisplayMatching(parentWindow.getBounds()); } // fallback to primary display or first display if (!displayToUse) { displayToUse = screen.getPrimaryDisplay() || displays[0]; } } const state: IWindowState = { width: defaultWidth, height: defaultHeight }; const displayBounds = displayToUse.bounds; state.x = displayBounds.x + (displayBounds.width / 2) - (state.width! / 2); state.y = displayBounds.y + (displayBounds.height / 2) - (state.height! / 2); if (displayBounds.width > 0 && displayBounds.height > 0 /* Linux X11 sessions sometimes report wrong display bounds */) { if (state.x < displayBounds.x) { state.x = displayBounds.x; // prevent window from falling out of the screen to the left } if (state.y < displayBounds.y) { state.y = displayBounds.y; // prevent window from falling out of the screen to the top } if (state.x > (displayBounds.x + displayBounds.width)) { state.x = displayBounds.x; // prevent window from falling out of the screen to the right } if (state.y > (displayBounds.y + displayBounds.height)) { state.y = displayBounds.y; // prevent window from falling out of the screen to the bottom } if (state.width! > displayBounds.width) { state.width = displayBounds.width; // prevent window from exceeding display bounds width } if (state.height! > displayBounds.height) { state.height = displayBounds.height; // prevent window from exceeding display bounds height } } return state; } private getPerformanceInfo(): Promise<PerformanceInfo> { return new Promise(async (resolve, reject) => { Promise.all([this.launchMainService.getMainProcessInfo(), this.launchMainService.getRemoteDiagnostics({ includeProcesses: true, includeWorkspaceMetadata: true })]) .then(result => { const [info, remoteData] = result; this.diagnosticsService.getPerformanceInfo(info, remoteData) .then(diagnosticInfo => { resolve(diagnosticInfo); }) .catch(err => { this.logService.warn('issueService#getPerformanceInfo ', err.message); reject(err); }); }); }); } private getIssueReporterPath(data: IssueReporterData, features: IssueReporterFeatures): string { if (!this._issueWindow) { throw new Error('Issue window has been disposed'); } const windowConfiguration = { appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, windowId: this._issueWindow.id, machineId: this.machineId, userEnv: this.userEnv, data, features, disableExtensions: this.environmentService.disableExtensions, os: { type: os.type(), arch: os.arch(), release: os.release(), }, product: { nameShort: product.nameShort, version: product.version, commit: product.commit, date: product.date, reportIssueUrl: product.reportIssueUrl } }; return toLauchUrl('vs/code/electron-sandbox/issue/issueReporter.html', windowConfiguration); } } function toLauchUrl<T>(pathToHtml: string, windowConfiguration: T): string { const environment = parseArgs(process.argv, OPTIONS); const config = objects.assign(environment, windowConfiguration); for (const keyValue of Object.keys(config)) { const key = keyValue as keyof typeof config; if (config[key] === undefined || config[key] === null || config[key] === '') { delete config[key]; // only send over properties that have a true value } } return `${require.toUrl(pathToHtml)}?config=${encodeURIComponent(JSON.stringify(config))}`; }
src/vs/platform/issue/electron-main/issueMainService.ts
1
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00027169493841938674, 0.0001720293948892504, 0.0001634859072510153, 0.00016881604096852243, 0.00001585690915817395 ]
{ "id": 5, "code_window": [ "\t\t\tnodeIntegration: true,\n", "\t\t\tenableWebSQL: false,\n", "\t\t\tenableRemoteModule: false,\n", "\t\t\tnativeWindowOpen: true,\n", "\t\t\twebviewTag: true\n", "\t\t}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\tspellcheck: false,\n" ], "file_path": "test/unit/electron/index.js", "type": "add", "edit_start_line_idx": 123 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import 'vs/css!./currentLineHighlight'; import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import * as arrays from 'vs/base/common/arrays'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { Selection } from 'vs/editor/common/core/selection'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; let isRenderedUsingBorder = true; export abstract class AbstractLineHighlightOverlay extends DynamicViewOverlay { private readonly _context: ViewContext; protected _lineHeight: number; protected _renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; protected _contentLeft: number; protected _contentWidth: number; protected _selectionIsEmpty: boolean; protected _renderLineHightlightOnlyWhenFocus: boolean; protected _focused: boolean; private _cursorLineNumbers: number[]; private _selections: Selection[]; private _renderData: string[] | null; constructor(context: ViewContext) { super(); this._context = context; const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); this._lineHeight = options.get(EditorOption.lineHeight); this._renderLineHighlight = options.get(EditorOption.renderLineHighlight); this._renderLineHightlightOnlyWhenFocus = options.get(EditorOption.renderLineHighlightOnlyWhenFocus); this._contentLeft = layoutInfo.contentLeft; this._contentWidth = layoutInfo.contentWidth; this._selectionIsEmpty = true; this._focused = false; this._cursorLineNumbers = []; this._selections = []; this._renderData = null; this._context.addEventHandler(this); } public dispose(): void { this._context.removeEventHandler(this); super.dispose(); } private _readFromSelections(): boolean { let hasChanged = false; // Only render the first selection when using border const renderSelections = isRenderedUsingBorder ? this._selections.slice(0, 1) : this._selections; const cursorsLineNumbers = renderSelections.map(s => s.positionLineNumber); cursorsLineNumbers.sort((a, b) => a - b); if (!arrays.equals(this._cursorLineNumbers, cursorsLineNumbers)) { this._cursorLineNumbers = cursorsLineNumbers; hasChanged = true; } const selectionIsEmpty = renderSelections.every(s => s.isEmpty()); if (this._selectionIsEmpty !== selectionIsEmpty) { this._selectionIsEmpty = selectionIsEmpty; hasChanged = true; } return hasChanged; } // --- begin event handlers public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { return this._readFromSelections(); } public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { const options = this._context.configuration.options; const layoutInfo = options.get(EditorOption.layoutInfo); this._lineHeight = options.get(EditorOption.lineHeight); this._renderLineHighlight = options.get(EditorOption.renderLineHighlight); this._renderLineHightlightOnlyWhenFocus = options.get(EditorOption.renderLineHighlightOnlyWhenFocus); this._contentLeft = layoutInfo.contentLeft; this._contentWidth = layoutInfo.contentWidth; return true; } public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._selections = e.selections; return this._readFromSelections(); } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { return true; } public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollWidthChanged || e.scrollTopChanged; } public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { if (!this._renderLineHightlightOnlyWhenFocus) { return false; } this._focused = e.isFocused; return true; } // --- end event handlers public prepareRender(ctx: RenderingContext): void { if (!this._shouldRenderThis()) { this._renderData = null; return; } const renderedLine = this._renderOne(ctx); const visibleStartLineNumber = ctx.visibleRange.startLineNumber; const visibleEndLineNumber = ctx.visibleRange.endLineNumber; const len = this._cursorLineNumbers.length; let index = 0; const renderData: string[] = []; for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { const lineIndex = lineNumber - visibleStartLineNumber; while (index < len && this._cursorLineNumbers[index] < lineNumber) { index++; } if (index < len && this._cursorLineNumbers[index] === lineNumber) { renderData[lineIndex] = renderedLine; } else { renderData[lineIndex] = ''; } } this._renderData = renderData; } public render(startLineNumber: number, lineNumber: number): string { if (!this._renderData) { return ''; } const lineIndex = lineNumber - startLineNumber; if (lineIndex >= this._renderData.length) { return ''; } return this._renderData[lineIndex]; } protected abstract _shouldRenderThis(): boolean; protected abstract _shouldRenderOther(): boolean; protected abstract _renderOne(ctx: RenderingContext): string; } export class CurrentLineHighlightOverlay extends AbstractLineHighlightOverlay { protected _renderOne(ctx: RenderingContext): string { const className = 'current-line' + (this._shouldRenderOther() ? ' current-line-both' : ''); return `<div class="${className}" style="width:${Math.max(ctx.scrollWidth, this._contentWidth)}px; height:${this._lineHeight}px;"></div>`; } protected _shouldRenderThis(): boolean { return ( (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') && this._selectionIsEmpty && (!this._renderLineHightlightOnlyWhenFocus || this._focused) ); } protected _shouldRenderOther(): boolean { return ( (this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') && (!this._renderLineHightlightOnlyWhenFocus || this._focused) ); } } export class CurrentLineMarginHighlightOverlay extends AbstractLineHighlightOverlay { protected _renderOne(ctx: RenderingContext): string { const className = 'current-line current-line-margin' + (this._shouldRenderOther() ? ' current-line-margin-both' : ''); return `<div class="${className}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`; } protected _shouldRenderThis(): boolean { return ( (this._renderLineHighlight === 'gutter' || this._renderLineHighlight === 'all') && (!this._renderLineHightlightOnlyWhenFocus || this._focused) ); } protected _shouldRenderOther(): boolean { return ( (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') && this._selectionIsEmpty && (!this._renderLineHightlightOnlyWhenFocus || this._focused) ); } } registerThemingParticipant((theme, collector) => { isRenderedUsingBorder = false; const lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`); collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); } if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) { const lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { isRenderedUsingBorder = true; collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); if (theme.type === 'hc') { collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`); collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`); } } } });
src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00021695945179089904, 0.00017135503003373742, 0.0001636300003156066, 0.00016924718511290848, 0.000010172623660764657 ]
{ "id": 5, "code_window": [ "\t\t\tnodeIntegration: true,\n", "\t\t\tenableWebSQL: false,\n", "\t\t\tenableRemoteModule: false,\n", "\t\t\tnativeWindowOpen: true,\n", "\t\t\twebviewTag: true\n", "\t\t}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\tspellcheck: false,\n" ], "file_path": "test/unit/electron/index.js", "type": "add", "edit_start_line_idx": 123 }
{ "registrations": [ { "component": { "type": "git", "git": { "name": "Colorsublime-Themes", "repositoryUrl": "https://github.com/Colorsublime/Colorsublime-Themes", "commitHash": "c10fdd8b144486b7a4f3cb4e2251c66df222a825" } }, "version": "0.1.0" } ], "version": 1 }
extensions/theme-monokai-dimmed/cgmanifest.json
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017116416711360216, 0.00017031095921993256, 0.00016945776587817818, 0.00017031095921993256, 8.532006177119911e-7 ]
{ "id": 5, "code_window": [ "\t\t\tnodeIntegration: true,\n", "\t\t\tenableWebSQL: false,\n", "\t\t\tenableRemoteModule: false,\n", "\t\t\tnativeWindowOpen: true,\n", "\t\t\twebviewTag: true\n", "\t\t}\n" ], "labels": [ "keep", "keep", "add", "keep", "keep", "keep" ], "after_edit": [ "\t\t\tspellcheck: false,\n" ], "file_path": "test/unit/electron/index.js", "type": "add", "edit_start_line_idx": 123 }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { KeyboardLayoutContribution } from 'vs/workbench/services/keybinding/browser/keyboardLayouts/_.contribution'; KeyboardLayoutContribution.INSTANCE.registerKeyboardLayout({ layout: { id: 'com.google.inputmethod.Japanese.Roman', lang: 'en', localizedName: 'Alphanumeric (Google)' }, secondaryLayouts: [], mapping: { KeyA: ['a', 'A', '¯', '̄', 4], KeyB: ['b', 'B', '˘', '̆', 4], KeyC: ['c', 'C', '¸', '̧', 4], KeyD: ['d', 'D', 'ð', 'Ð', 0], KeyE: ['e', 'E', '´', '́', 4], KeyF: ['f', 'F', 'ƒ', '', 0], KeyG: ['g', 'G', '©', '‸', 8], KeyH: ['h', 'H', 'ˍ', '̱', 4], KeyI: ['i', 'I', 'ʼ', '̛', 4], KeyJ: ['j', 'J', '˝', '̋', 4], KeyK: ['k', 'K', '˚', '̊', 4], KeyL: ['l', 'L', '-', '̵', 4], KeyM: ['m', 'M', '˛', '̨', 4], KeyN: ['n', 'N', '˜', '̃', 4], KeyO: ['o', 'O', 'ø', 'Ø', 0], KeyP: ['p', 'P', ',', '̦', 4], KeyQ: ['q', 'Q', 'œ', 'Œ', 0], KeyR: ['r', 'R', '®', '‰', 0], KeyS: ['s', 'S', 'ß', '', 0], KeyT: ['t', 'T', 'þ', 'Þ', 0], KeyU: ['u', 'U', '¨', '̈', 4], KeyV: ['v', 'V', 'ˇ', '̌', 4], KeyW: ['w', 'W', '˙', '̇', 4], KeyX: ['x', 'X', '.', '̣', 4], KeyY: ['y', 'Y', '¥', '', 0], KeyZ: ['z', 'Z', 'ˀ', '̉', 4], Digit1: ['1', '!', '¡', '⁄', 0], Digit2: ['2', '@', '™', '€', 0], Digit3: ['3', '#', '£', '‹', 0], Digit4: ['4', '$', '¢', '›', 0], Digit5: ['5', '%', '§', '†', 0], Digit6: ['6', '^', 'ˆ', '̂', 4], Digit7: ['7', '&', '¶', '‡', 0], Digit8: ['8', '*', '•', '°', 0], Digit9: ['9', '(', 'ª', '·', 0], Digit0: ['0', ')', 'º', '‚', 0], Enter: [], Escape: [], Backspace: [], Tab: [], Space: [' ', ' ', ' ', ' ', 0], Minus: ['-', '_', '–', '—', 0], Equal: ['=', '+', '≠', '±', 0], BracketLeft: ['[', '{', '“', '”', 0], BracketRight: [']', '}', '‘', '’', 0], Backslash: ['\\', '|', '«', '»', 0], Semicolon: [';', ':', '…', '№', 8], Quote: ['\'', '"', 'æ', 'Æ', 0], Backquote: ['`', '~', '`', '̀', 4], Comma: [',', '<', '≤', '„', 0], Period: ['.', '>', '≥', 'ʔ', 8], Slash: ['/', '?', '÷', '¿', 0], CapsLock: [], F1: [], F2: [], F3: [], F4: [], F5: [], F6: [], F7: [], F8: [], F9: [], F10: [], F11: [], F12: [], Insert: [], Home: [], PageUp: [], Delete: [], End: [], PageDown: [], ArrowRight: [], ArrowLeft: [], ArrowDown: [], ArrowUp: [], NumLock: [], NumpadDivide: ['/', '/', '/', '/', 0], NumpadMultiply: ['*', '*', '*', '*', 0], NumpadSubtract: ['-', '-', '-', '-', 0], NumpadAdd: ['+', '+', '+', '+', 0], NumpadEnter: [], Numpad1: ['1', '1', '1', '1', 0], Numpad2: ['2', '2', '2', '2', 0], Numpad3: ['3', '3', '3', '3', 0], Numpad4: ['4', '4', '4', '4', 0], Numpad5: ['5', '5', '5', '5', 0], Numpad6: ['6', '6', '6', '6', 0], Numpad7: ['7', '7', '7', '7', 0], Numpad8: ['8', '8', '8', '8', 0], Numpad9: ['9', '9', '9', '9', 0], Numpad0: ['0', '0', '0', '0', 0], NumpadDecimal: ['.', '.', '.', '.', 0], IntlBackslash: ['§', '±', '§', '±', 0], ContextMenu: [], NumpadEqual: ['=', '=', '=', '=', 0], F13: [], F14: [], F15: [], F16: [], F17: [], F18: [], F19: [], F20: [], AudioVolumeMute: [], AudioVolumeUp: ['', '=', '', '=', 0], AudioVolumeDown: [], NumpadComma: [], IntlRo: [], KanaMode: [], IntlYen: [], ControlLeft: [], ShiftLeft: [], AltLeft: [], MetaLeft: [], ControlRight: [], ShiftRight: [], AltRight: [], MetaRight: [] } });
src/vs/workbench/services/keybinding/browser/keyboardLayouts/jp-roman.darwin.ts
0
https://github.com/microsoft/vscode/commit/87847325a66f098621f6650a16d665c9cd07f15a
[ 0.00017505252617411315, 0.00016966011025942862, 0.00016384296759497374, 0.0001695601677056402, 0.000002757137735898141 ]
{ "id": 0, "code_window": [ " node.accept(_metaVisitor);\n", " if (node.implementsClause != null &&\n", " node.implementsClause.interfaces != null &&\n", " node.implementsClause.interfaces.isNotEmpty) {\n", " writer.print(''', 'interfaces': const [''');\n", " node.implementsClause.interfaces.forEach((interface) {\n", " writer.print('${interface.name}');\n", " });\n", " writer.print(']');\n", " }\n", " writer.print('})');\n", " return null;\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " writer.print(node.implementsClause.interfaces\n", " .map((interface) => interface.name)\n", " .join(', '));\n" ], "file_path": "modules/angular2/src/transform/directive_processor/rewriter.dart", "type": "replace", "edit_start_line_idx": 195 }
library angular2.transform.directive_processor.rewriter; import 'dart:async'; import 'package:analyzer/analyzer.dart'; import 'package:angular2/src/render/xhr.dart' show XHR; import 'package:angular2/src/transform/common/annotation_matcher.dart'; import 'package:angular2/src/transform/common/asset_reader.dart'; import 'package:angular2/src/transform/common/async_string_writer.dart'; import 'package:angular2/src/transform/common/logging.dart'; import 'package:angular2/src/transform/common/names.dart'; import 'package:angular2/src/transform/common/xhr_impl.dart'; import 'package:barback/barback.dart' show AssetId; import 'package:path/path.dart' as path; import 'visitors.dart'; /// Generates a file registering all Angular 2 `Directive`s found in `code` in /// ngDeps format [TODO(kegluneq): documentation reference needed]. `assetId` is /// the id of the asset containing `code`. /// /// If no Angular 2 `Directive`s are found in `code`, returns the empty /// string unless `forceGenerate` is true, in which case an empty ngDeps /// file is created. Future<String> createNgDeps(AssetReader reader, AssetId assetId, AnnotationMatcher annotationMatcher, bool inlineViews) async { // TODO(kegluneq): Shortcut if we can determine that there are no // [Directive]s present, taking into account `export`s. var writer = new AsyncStringWriter(); var visitor = new CreateNgDepsVisitor(writer, assetId, new XhrImpl(reader, assetId), annotationMatcher, inlineViews); var code = await reader.readAsString(assetId); parseCompilationUnit(code, name: assetId.path).accept(visitor); // If this library does not define an `@Injectable` and it does not import // any libaries that could, then we do not need to generate a `.ng_deps // .dart` file for it. if (!visitor._foundNgInjectable && !visitor._usesNonLangLibs) return null; return await writer.asyncToString(); } /// Visitor responsible for processing [CompilationUnit] and creating an /// associated .ng_deps.dart file. class CreateNgDepsVisitor extends Object with SimpleAstVisitor<Object> { final AsyncStringWriter writer; /// Whether an Angular 2 `Injectable` has been found. bool _foundNgInjectable = false; /// Whether this library `imports` or `exports` any non-'dart:' libraries. bool _usesNonLangLibs = false; /// Whether we have written an import of base file /// (the file we are processing). bool _wroteBaseLibImport = false; final ToSourceVisitor _copyVisitor; final FactoryTransformVisitor _factoryVisitor; final ParameterTransformVisitor _paramsVisitor; final AnnotationsTransformVisitor _metaVisitor; final AnnotationMatcher _annotationMatcher; /// The assetId for the file which we are parsing. final AssetId assetId; CreateNgDepsVisitor(AsyncStringWriter writer, this.assetId, XHR xhr, this._annotationMatcher, inlineViews) : writer = writer, _copyVisitor = new ToSourceVisitor(writer), _factoryVisitor = new FactoryTransformVisitor(writer), _paramsVisitor = new ParameterTransformVisitor(writer), _metaVisitor = new AnnotationsTransformVisitor( writer, xhr, inlineViews); void _visitNodeListWithSeparator(NodeList<AstNode> list, String separator) { if (list == null) return; for (var i = 0, iLen = list.length; i < iLen; ++i) { if (i != 0) { writer.print(separator); } list[i].accept(this); } } @override Object visitCompilationUnit(CompilationUnit node) { _visitNodeListWithSeparator(node.directives, " "); _openFunctionWrapper(); _visitNodeListWithSeparator(node.declarations, " "); _closeFunctionWrapper(); return null; } /// Write the import to the file the .ng_deps.dart file is based on if it /// has not yet been written. void _maybeWriteImport() { if (_wroteBaseLibImport) return; _wroteBaseLibImport = true; writer.print('''import '${path.basename(assetId.path)}';'''); } void _updateUsesNonLangLibs(UriBasedDirective directive) { _usesNonLangLibs = _usesNonLangLibs || !stringLiteralToString(directive.uri).startsWith('dart:'); } @override Object visitImportDirective(ImportDirective node) { _maybeWriteImport(); _updateUsesNonLangLibs(node); return node.accept(_copyVisitor); } @override Object visitExportDirective(ExportDirective node) { _maybeWriteImport(); _updateUsesNonLangLibs(node); return node.accept(_copyVisitor); } void _openFunctionWrapper() { _maybeWriteImport(); writer.print('var _visited = false;' 'void ${SETUP_METHOD_NAME}(${REFLECTOR_VAR_NAME}) {' 'if (_visited) return; _visited = true;'); } void _closeFunctionWrapper() { if (_foundNgInjectable) { writer.print(';'); } writer.print('}'); } ConstructorDeclaration _getCtor(ClassDeclaration node) { int numCtorsFound = 0; var ctor = null; for (ClassMember classMember in node.members) { if (classMember is ConstructorDeclaration) { numCtorsFound++; ConstructorDeclaration constructor = classMember; // Use the unnnamed constructor if it is present. // Otherwise, use the first encountered. if (ctor == null) { ctor = constructor; } else if (constructor.name == null) { ctor = constructor; } } } if (numCtorsFound > 1) { var ctorName = ctor.name; ctorName = ctorName == null ? 'the unnamed constructor' : 'constructor "${ctorName}"'; logger.warning('Found ${numCtorsFound} ctors for class ${node.name},' 'Using ${ctorName}.'); } return ctor; } void _generateEmptyFactory(String typeName) { writer.print('() => new ${typeName}()'); } void _generateEmptyParams() => writer.print('const []'); @override Object visitClassDeclaration(ClassDeclaration node) { if (!node.metadata.any((a) => _annotationMatcher.hasMatch(a, assetId))) { return null; } var ctor = _getCtor(node); _maybeWriteReflector(); writer.print('..registerType('); node.name.accept(this); writer.print(''', {'factory': '''); if (ctor == null) { _generateEmptyFactory(node.name.toString()); } else { ctor.accept(_factoryVisitor); } writer.print(''', 'parameters': '''); if (ctor == null) { _generateEmptyParams(); } else { ctor.accept(_paramsVisitor); } writer.print(''', 'annotations': '''); node.accept(_metaVisitor); if (node.implementsClause != null && node.implementsClause.interfaces != null && node.implementsClause.interfaces.isNotEmpty) { writer.print(''', 'interfaces': const ['''); node.implementsClause.interfaces.forEach((interface) { writer.print('${interface.name}'); }); writer.print(']'); } writer.print('})'); return null; } Object _nodeToSource(AstNode node) { if (node == null) return null; return node.accept(_copyVisitor); } @override Object visitLibraryDirective(LibraryDirective node) { if (node != null && node.name != null) { writer.print('library '); _nodeToSource(node.name); writer.print('$DEPS_EXTENSION;'); } return null; } @override Object visitPartOfDirective(PartOfDirective node) { // TODO(kegluneq): Consider importing [node.libraryName]. logger.warning('[${assetId}]: ' 'Found `part of` directive while generating ${DEPS_EXTENSION} file, ' 'Transform may fail due to missing imports in generated file.'); return null; } @override Object visitPrefixedIdentifier(PrefixedIdentifier node) => _nodeToSource(node); @override Object visitSimpleIdentifier(SimpleIdentifier node) => _nodeToSource(node); @override bool visitFunctionDeclaration(FunctionDeclaration node) { if (!node.metadata.any((a) => _annotationMatcher.hasMatch(a, assetId))) { return null; } _maybeWriteReflector(); writer.print('..registerFunction('); node.name.accept(this); writer.print(''', {'parameters': const ['''); node.functionExpression.parameters.accept(_paramsVisitor); writer.print('''], 'annotations': '''); node.metadata.accept(_metaVisitor); writer.print('})'); return null; } /// Writes out the reflector variable the first time it is called. void _maybeWriteReflector() { if (_foundNgInjectable) return; _foundNgInjectable = true; // The receiver for cascaded calls. writer.print(REFLECTOR_VAR_NAME); } }
modules/angular2/src/transform/directive_processor/rewriter.dart
1
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.9978862404823303, 0.038095567375421524, 0.00016600220988038927, 0.0002552426012698561, 0.18824687600135803 ]
{ "id": 0, "code_window": [ " node.accept(_metaVisitor);\n", " if (node.implementsClause != null &&\n", " node.implementsClause.interfaces != null &&\n", " node.implementsClause.interfaces.isNotEmpty) {\n", " writer.print(''', 'interfaces': const [''');\n", " node.implementsClause.interfaces.forEach((interface) {\n", " writer.print('${interface.name}');\n", " });\n", " writer.print(']');\n", " }\n", " writer.print('})');\n", " return null;\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " writer.print(node.implementsClause.interfaces\n", " .map((interface) => interface.name)\n", " .join(', '));\n" ], "file_path": "modules/angular2/src/transform/directive_processor/rewriter.dart", "type": "replace", "edit_start_line_idx": 195 }
/** * @module * @public * @description * Errors thrown by the {@link Injector}. */
modules/angular2/di_errors.ts
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00016898338799364865, 0.00016898338799364865, 0.00016898338799364865, 0.00016898338799364865, 0 ]
{ "id": 0, "code_window": [ " node.accept(_metaVisitor);\n", " if (node.implementsClause != null &&\n", " node.implementsClause.interfaces != null &&\n", " node.implementsClause.interfaces.isNotEmpty) {\n", " writer.print(''', 'interfaces': const [''');\n", " node.implementsClause.interfaces.forEach((interface) {\n", " writer.print('${interface.name}');\n", " });\n", " writer.print(']');\n", " }\n", " writer.print('})');\n", " return null;\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " writer.print(node.implementsClause.interfaces\n", " .map((interface) => interface.name)\n", " .join(', '));\n" ], "file_path": "modules/angular2/src/transform/directive_processor/rewriter.dart", "type": "replace", "edit_start_line_idx": 195 }
#!/usr/bin/env node /** * this script is just a temporary solution to deal with the issue of npm outputting the npm * shrinkwrap file in an unstable manner. * * See: https://github.com/npm/npm/issues/3581 */ var _ = require('lodash'); var sorted = require('sorted-object'); var fs = require('fs'); var path = require('path'); function cleanModule(moduleRecord, name) { // keep `resolve` properties for git dependencies, delete otherwise delete moduleRecord.from; if (!(moduleRecord.resolved && moduleRecord.resolved.match(/^git(\+[a-z]+)?:\/\//))) { delete moduleRecord.resolved; } _.forEach(moduleRecord.dependencies, function(mod, name) { cleanModule(mod, name); }); } console.log('Reading npm-shrinkwrap.json'); var shrinkwrap = require('../../npm-shrinkwrap.json'); console.log('Cleaning shrinkwrap object'); cleanModule(shrinkwrap, shrinkwrap.name); var cleanShrinkwrapPath = path.join(__dirname, '..', '..', 'npm-shrinkwrap.clean.json'); console.log('Writing cleaned to', cleanShrinkwrapPath); fs.writeFileSync(cleanShrinkwrapPath, JSON.stringify(sorted(shrinkwrap), null, 2) + "\n");
tools/npm/clean-shrinkwrap.js
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017243192996829748, 0.00016912887804210186, 0.00016182762919925153, 0.0001711279765004292, 0.000004295188773539849 ]
{ "id": 0, "code_window": [ " node.accept(_metaVisitor);\n", " if (node.implementsClause != null &&\n", " node.implementsClause.interfaces != null &&\n", " node.implementsClause.interfaces.isNotEmpty) {\n", " writer.print(''', 'interfaces': const [''');\n", " node.implementsClause.interfaces.forEach((interface) {\n", " writer.print('${interface.name}');\n", " });\n", " writer.print(']');\n", " }\n", " writer.print('})');\n", " return null;\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " writer.print(node.implementsClause.interfaces\n", " .map((interface) => interface.name)\n", " .join(', '));\n" ], "file_path": "modules/angular2/src/transform/directive_processor/rewriter.dart", "type": "replace", "edit_start_line_idx": 195 }
import {ListWrapper, MapWrapper, List} from 'angular2/src/facade/collection'; import * as viewModule from './view'; export class DomViewContainer { // The order in this list matches the DOM order. views: List<viewModule.DomView> = []; contentTagContainers(): List<viewModule.DomView> { return this.views; } nodes(): List</*node*/ any> { var r = []; for (var i = 0; i < this.views.length; ++i) { r = ListWrapper.concat(r, this.views[i].rootNodes); } return r; } }
modules/angular2/src/render/dom/view/view_container.ts
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.0002134098467649892, 0.00019256860832683742, 0.00017172735533677042, 0.00019256860832683742, 0.00002084124571410939 ]
{ "id": 1, "code_window": [ " reflector\n", " ..registerType(ChangingSoupComponent, {\n", " 'factory': () => new ChangingSoupComponent(),\n", " 'parameters': const [],\n", " 'annotations': const [const Component(selector: '[soup]')],\n", " 'interfaces': const [OnChange]\n", " });\n", "}" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " 'interfaces': const [OnChange, AnotherInterface]\n" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart", "type": "replace", "edit_start_line_idx": 14 }
library dinner.soup.ng_deps.dart; import 'soup.dart'; import 'package:angular2/src/core/annotations_impl/annotations.dart'; var _visited = false; void initReflector(reflector) { if (_visited) return; _visited = true; reflector ..registerType(ChangingSoupComponent, { 'factory': () => new ChangingSoupComponent(), 'parameters': const [], 'annotations': const [const Component(selector: '[soup]')], 'interfaces': const [OnChange] }); }
modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart
1
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.99297696352005, 0.496603786945343, 0.00023062893887981772, 0.496603786945343, 0.49637317657470703 ]
{ "id": 1, "code_window": [ " reflector\n", " ..registerType(ChangingSoupComponent, {\n", " 'factory': () => new ChangingSoupComponent(),\n", " 'parameters': const [],\n", " 'annotations': const [const Component(selector: '[soup]')],\n", " 'interfaces': const [OnChange]\n", " });\n", "}" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " 'interfaces': const [OnChange, AnotherInterface]\n" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart", "type": "replace", "edit_start_line_idx": 14 }
name: benchmarks_external environment: sdk: '>=1.4.0' dependencies: angular: '>=1.0.0 <2.0.0' browser: '>=0.10.0 <0.11.0' dev_dependencies: angular2: path: ../angular2 transformers: - angular: $exclude: "web/e2e_test" html_files: - web/src/naive_infinite_scroll/scroll_area.html - web/src/naive_infinite_scroll/scroll_item.html - $dart2js: commandLineOptions: - --show-package-warnings
modules/benchmarks_external/pubspec.yaml
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017674345872364938, 0.0001753818360157311, 0.00017402019875589758, 0.0001753818360157311, 0.0000013616299838759005 ]
{ "id": 1, "code_window": [ " reflector\n", " ..registerType(ChangingSoupComponent, {\n", " 'factory': () => new ChangingSoupComponent(),\n", " 'parameters': const [],\n", " 'annotations': const [const Component(selector: '[soup]')],\n", " 'interfaces': const [OnChange]\n", " });\n", "}" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " 'interfaces': const [OnChange, AnotherInterface]\n" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart", "type": "replace", "edit_start_line_idx": 14 }
library benchpress.test.firefox_extension.conf; //empty as we don't have a version for dart
modules/benchpress/test/firefox_extension/conf.dart
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017377677431795746, 0.00017377677431795746, 0.00017377677431795746, 0.00017377677431795746, 0 ]
{ "id": 1, "code_window": [ " reflector\n", " ..registerType(ChangingSoupComponent, {\n", " 'factory': () => new ChangingSoupComponent(),\n", " 'parameters': const [],\n", " 'annotations': const [const Component(selector: '[soup]')],\n", " 'interfaces': const [OnChange]\n", " });\n", "}" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep" ], "after_edit": [ " 'interfaces': const [OnChange, AnotherInterface]\n" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart", "type": "replace", "edit_start_line_idx": 14 }
import {CONST} from 'angular2/src/facade/lang'; /** * * * @exportedAs angular2/di */ @CONST() export class OpaqueToken { _desc: string; constructor(desc: string) { this._desc = 'Token(' + desc + ')'; } toString(): string { return this._desc; } }
modules/angular2/src/di/opaque_token.ts
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017534117796458304, 0.00017361773643642664, 0.00017189429490827024, 0.00017361773643642664, 0.0000017234415281563997 ]
{ "id": 2, "code_window": [ "\n", "import 'package:angular2/src/core/annotations_impl/annotations.dart';\n", "\n", "@Component(selector: '[soup]')\n", "class ChangingSoupComponent implements OnChange {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace" ], "after_edit": [ "class ChangingSoupComponent implements OnChange, AnotherInterface {}" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/soup.dart", "type": "replace", "edit_start_line_idx": 5 }
library dinner.soup.ng_deps.dart; import 'soup.dart'; import 'package:angular2/src/core/annotations_impl/annotations.dart'; var _visited = false; void initReflector(reflector) { if (_visited) return; _visited = true; reflector ..registerType(ChangingSoupComponent, { 'factory': () => new ChangingSoupComponent(), 'parameters': const [], 'annotations': const [const Component(selector: '[soup]')], 'interfaces': const [OnChange] }); }
modules/angular2/test/transform/directive_processor/interfaces_files/expected/soup.ng_deps.dart
1
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.999299168586731, 0.5002007484436035, 0.0011023643892258406, 0.5002007484436035, 0.49909842014312744 ]
{ "id": 2, "code_window": [ "\n", "import 'package:angular2/src/core/annotations_impl/annotations.dart';\n", "\n", "@Component(selector: '[soup]')\n", "class ChangingSoupComponent implements OnChange {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace" ], "after_edit": [ "class ChangingSoupComponent implements OnChange, AnotherInterface {}" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/soup.dart", "type": "replace", "edit_start_line_idx": 5 }
// Tun on full stack traces in errors to help debugging Error.stackTraceLimit=Infinity; // Use "register" extension from systemjs. // That's what Traceur outputs: `System.register()`. register(System); cjs(System); jasmine.DEFAULT_TIMEOUT_INTERVAL = 100; // Cancel Karma's synchronous start, // we will call `__karma__.start()` later, once all the specs are loaded. __karma__.loaded = function() {}; System.baseURL = '/base/'; // So that we can import packages like `core/foo`, instead of `core/src/foo`. System.paths = { '*': './*.js', 'benchpress/*': 'dist/js/dev/es5/benchpress/*.js', 'angular2/*': 'dist/js/dev/es5/angular2/*.js', 'rtts_assert/*': 'dist/js/dev/es5/rtts_assert/*.js', 'rx': 'node_modules/rx/dist/rx.js' }; // Import all the specs, execute their `main()` method and kick off Karma (Jasmine). System.import('angular2/src/dom/browser_adapter').then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); }).then(function() { return Promise.all( Object.keys(window.__karma__.files) // All files served by Karma. .filter(onlySpecFiles) .map(window.file2moduleName) // Normalize paths to module names. .map(function(path) { return System.import(path).then(function(module) { if (module.hasOwnProperty('main')) { module.main(); } else { throw new Error('Module ' + path + ' does not implement main() method.'); } }); })); }) .then(function() { __karma__.start(); }, function(error) { console.error(error.stack || error); __karma__.start(); }); function onlySpecFiles(path) { return /_spec\.js$/.test(path); }
test-main.js
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017526278679724783, 0.0001708282361505553, 0.00016654458886478096, 0.0001709863863652572, 0.000002769585535133956 ]
{ "id": 2, "code_window": [ "\n", "import 'package:angular2/src/core/annotations_impl/annotations.dart';\n", "\n", "@Component(selector: '[soup]')\n", "class ChangingSoupComponent implements OnChange {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace" ], "after_edit": [ "class ChangingSoupComponent implements OnChange, AnotherInterface {}" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/soup.dart", "type": "replace", "edit_start_line_idx": 5 }
library change_detection.jit_proto_change_detector; import 'interfaces.dart' show ChangeDetector, ProtoChangeDetector; class JitProtoChangeDetector implements ProtoChangeDetector { JitProtoChangeDetector(definition) : super(); static bool isSupported() => false; ChangeDetector instantiate(dispatcher) { throw "Jit Change Detection not supported in Dart"; } }
modules/angular2/src/change_detection/jit_proto_change_detector.dart
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00020347567624412477, 0.00018496662960387766, 0.00016645759751554579, 0.00018496662960387766, 0.000018509039364289492 ]
{ "id": 2, "code_window": [ "\n", "import 'package:angular2/src/core/annotations_impl/annotations.dart';\n", "\n", "@Component(selector: '[soup]')\n", "class ChangingSoupComponent implements OnChange {}\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace" ], "after_edit": [ "class ChangingSoupComponent implements OnChange, AnotherInterface {}" ], "file_path": "modules/angular2/test/transform/directive_processor/interfaces_files/soup.dart", "type": "replace", "edit_start_line_idx": 5 }
import {describe, it, expect, beforeEach, ddescribe, iit, xit, el} from 'angular2/test_lib'; import { isPresent, RegExpWrapper, RegExpMatcherWrapper, StringWrapper, CONST_EXPR } from 'angular2/src/facade/lang'; export function main() { describe('RegExp', () => { it('should expose the index for each match', () => { var re = RegExpWrapper.create('(!)'); var matcher = RegExpWrapper.matcher(re, '0!23!567!!'); var indexes = []; var m; while (isPresent(m = RegExpMatcherWrapper.next(matcher))) { indexes.push(m.index); expect(m[0]).toEqual('!'); expect(m[1]).toEqual('!'); expect(m.length).toBe(2); } expect(indexes).toEqual([1, 4, 8, 9]); }); }); describe('const', () => { it('should support const expressions both in TS and Dart', () => { const numbers = CONST_EXPR([1, 2, 3]); expect(numbers).toEqual([1, 2, 3]); }); }); describe('String', () => { var upper, lower; beforeEach(() => { upper = 'SOMETHING'; lower = 'something'; }); it('should upper case a string', () => { var str = StringWrapper.toUpperCase(lower); expect(str).toEqual(upper); }); it('should lower case a string', () => { var str = StringWrapper.toLowerCase(upper); expect(str).toEqual(lower); }); }); }
modules/angular2/test/facade/lang_spec.ts
0
https://github.com/angular/angular/commit/ac50ffca5e079db0b3e30a1feed20915d4476959
[ 0.00017137239046860486, 0.00016947324911598116, 0.000167070422321558, 0.00016948441043496132, 0.0000013202945865486981 ]
{ "id": 0, "code_window": [ "import { Menu } from './menu';\n", "import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture';\n", "import { SlideData } from '../../gestures/slide-gesture';\n", "import { assign } from '../../util/util';\n", "import { GesturePriority } from '../../gestures/gesture-controller';\n", "\n", "/**\n", " * Gesture attached to the content which the menu is assigned to\n", " */\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { GestureController, GesturePriority } from '../../gestures/gesture-controller';\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 4 }
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, NgZone, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core'; import { Backdrop } from '../backdrop/backdrop'; import { Config } from '../../config/config'; import { isTrueProperty } from '../../util/util'; import { Keyboard } from '../../util/keyboard'; import { MenuContentGesture } from './menu-gestures'; import { MenuController } from './menu-controller'; import { MenuType } from './menu-types'; import { Platform } from '../../platform/platform'; import { GestureController } from '../../gestures/gesture-controller'; import { UIEventManager } from '../../util/ui-event-manager'; import { Content } from '../content/content'; /** * @name Menu * @description * The Menu component is a navigation drawer that slides in from the side of the current * view. By default, it slides in from the left, but the side can be overridden. The menu * will be displayed differently based on the mode, however the display type can be changed * to any of the available [menu types](#menu-types). The menu element should be a sibling * to the app's content element. There can be any number of menus attached to the content. * These can be controlled from the templates, or programmatically using the [MenuController](../MenuController). * * * ### Opening/Closing Menus * * There are several ways to open or close a menu. The menu can be **toggled** open or closed * from the template using the [MenuToggle](../MenuToggle) directive. It can also be * **closed** from the template using the [MenuClose](../MenuClose) directive. To display a menu * programmatically, inject the [MenuController](../MenuController) provider and call any of the * `MenuController` methods. * * * ### Menu Types * * The menu supports several display types: `overlay`, `reveal` and `push`. By default, * it will use the correct type based on the mode, but this can be changed. The default * type for both Material Design and Windows mode is `overlay`, and `reveal` is the default * type for iOS mode. The menu type can be changed in the app's [config](../../config/Config) * via the `menuType` property, or passed in the `type` property on the `<ion-menu>` element. * See [usage](#usage) below for examples of changing the menu type. * * * ### Navigation Bar Behavior * * If a [MenuToggle](../MenuToggle) button is added to the [Navbar](../../navbar/Navbar) of * a page, the button will only appear when the page it's in is currently a root page. The * root page is the initial page loaded in the app, or a page that has been set as the root * using the [setRoot](../../nav/NavController/#setRoot) method on the [NavController](../../nav/NavController). * * For example, say the application has two pages, `Page1` and `Page2`, and both have a * `MenuToggle` button in their navigation bars. Assume the initial page loaded into the app * is `Page1`, making it the root page. `Page1` will display the `MenuToggle` button, but once * `Page2` is pushed onto the navigation stack, the `MenuToggle` will not be displayed. * * * ### Persistent Menus * * Persistent menus display the [MenuToggle](../MenuToggle) button in the [Navbar](../../navbar/Navbar) * on all pages in the navigation stack. To make a menu persistent set `persistent` to `true` on the * `<ion-menu>` element. Note that this will only affect the `MenuToggle` button in the `Navbar` attached * to the `Menu` with `persistent` set to true, any other `MenuToggle` buttons will not be affected. * * * @usage * * To add a menu to an application, the `<ion-menu>` element should be added as a sibling to * the content it belongs to. A [local variable](https://angular.io/docs/ts/latest/guide/user-input.html#local-variables) * should be added to the content element and passed to the menu element in the `content` property. * This tells the menu which content it is attached to, so it knows which element to watch for * gestures. In the below example, `content` is using [property binding](https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding) * because `mycontent` is a reference to the `<ion-nav>` element, and not a string. * * ```html * <ion-menu [content]="mycontent"> * <ion-content> * <ion-list> * ... * </ion-list> * </ion-content> * </ion-menu> * * <ion-nav #mycontent [root]="rootPage"></ion-nav> * ``` * * ### Menu Side * * By default, menus slide in from the left, but this can be overridden by passing `right` * to the `side` property: * * ```html * <ion-menu side="right" [content]="mycontent">...</ion-menu> * ``` * * * ### Menu Type * * The menu type can be changed by passing the value to `type` on the `<ion-menu>`: * * ```html * <ion-menu type="overlay" [content]="mycontent">...</ion-menu> * ``` * * It can also be set in the app's config. The below will set the menu type to * `push` for all modes, and then set the type to `overlay` for the `ios` mode. * * ```ts * // in NgModules * * imports: [ * IonicModule.forRoot(MyApp,{ * menuType: 'push', * platforms: { * ios: { * menuType: 'overlay', * } * } * }) * ], * ``` * * * ### Displaying the Menu * * To toggle a menu from the template, add a button with the `menuToggle` * directive anywhere in the page's template: * * ```html * <button ion-button menuToggle>Toggle Menu</button> * ``` * * To close a menu, add the `menuClose` button. It can be added anywhere * in the content, or even the menu itself. Below it is added to the menu's * content: * * ```html * <ion-menu [content]="mycontent"> * <ion-content> * <ion-list> * <button ion-button menuClose ion-item detail-none>Close Menu</button> * </ion-list> * </ion-content> * </ion-menu> * ``` * * See the [MenuToggle](../MenuToggle) and [MenuClose](../MenuClose) docs * for more information on these directives. * * The menu can also be controlled from the Page by using the `MenuController`. * Inject the `MenuController` provider into the page and then call any of its * methods. In the below example, the `openMenu` method will open the menu * when it is called. * * ```ts * import { Component } from '@angular/core'; * import { MenuController } from 'ionic-angular'; * * @Component({...}) * export class MyPage { * constructor(public menuCtrl: MenuController) {} * * openMenu() { * this.menuCtrl.open(); * } * } * ``` * * See the [MenuController](../MenuController) API docs for all of the methods * and usage information. * * * @demo /docs/v2/demos/src/menu/ * * @see {@link /docs/v2/components#menus Menu Component Docs} * @see {@link ../MenuController MenuController API Docs} * @see {@link ../../nav/Nav Nav API Docs} * @see {@link ../../nav/NavController NavController API Docs} */ @Component({ selector: 'ion-menu', template: '<div class="menu-inner"><ng-content></ng-content></div>' + '<ion-backdrop disableScroll="false"></ion-backdrop>', host: { 'role': 'navigation' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class Menu { private _cntEle: HTMLElement; private _cntGesture: MenuContentGesture; private _type: MenuType; private _resizeUnreg: Function; private _isEnabled: boolean = true; private _isSwipeEnabled: boolean = true; private _isAnimating: boolean = false; private _isPers: boolean = false; private _init: boolean = false; private _events: UIEventManager = new UIEventManager(); /** * @private */ isOpen: boolean = false; /** * @private */ @ViewChild(Backdrop) backdrop: Backdrop; /** * @private */ @ContentChild(Content) menuContent: Content; /** * @input {any} A reference to the content element the menu should use. */ @Input() content: any; /** * @input {string} An id for the menu. */ @Input() id: string; /** * @input {string} Which side of the view the menu should be placed. Default `"left"`. */ @Input() side: string; /** * @input {string} The display type of the menu. Default varies based on the mode, * see the `menuType` in the [config](../../config/Config). Available options: * `"overlay"`, `"reveal"`, `"push"`. */ @Input() type: string; /** * @input {boolean} Whether or not the menu should be enabled. Default `true`. */ @Input() get enabled(): boolean { return this._isEnabled; } set enabled(val: boolean) { this._isEnabled = isTrueProperty(val); this._setListeners(); } /** * @input {boolean} Whether or not swiping the menu should be enabled. Default `true`. */ @Input() get swipeEnabled(): boolean { return this._isSwipeEnabled; } set swipeEnabled(val: boolean) { this._isSwipeEnabled = isTrueProperty(val); this._setListeners(); } /** * @input {string} Whether or not the menu should persist on child pages. Default `false`. */ @Input() get persistent(): boolean { return this._isPers; } set persistent(val: boolean) { this._isPers = isTrueProperty(val); } /** * @private */ @Input() maxEdgeStart: number; /** * @output {event} When the menu is being dragged open. */ @Output() ionDrag: EventEmitter<number> = new EventEmitter<number>(); /** * @output {event} When the menu has been opened. */ @Output() ionOpen: EventEmitter<boolean> = new EventEmitter<boolean>(); /** * @output {event} When the menu has been closed. */ @Output() ionClose: EventEmitter<boolean> = new EventEmitter<boolean>(); constructor( public _menuCtrl: MenuController, private _elementRef: ElementRef, private _config: Config, private _platform: Platform, private _renderer: Renderer, private _keyboard: Keyboard, private _zone: NgZone, public gestureCtrl: GestureController ) {} /** * @private */ ngOnInit() { this._init = true; let content = this.content; this._cntEle = (content instanceof Node) ? content : content && content.getNativeElement && content.getNativeElement(); // requires content element if (!this._cntEle) { return console.error('Menu: must have a [content] element to listen for drag events on. Example:\n\n<ion-menu [content]="content"></ion-menu>\n\n<ion-nav #content></ion-nav>'); } // normalize the "side" if (this.side !== 'left' && this.side !== 'right') { this.side = 'left'; } this.setElementAttribute('side', this.side); // normalize the "type" if (!this.type) { this.type = this._config.get('menuType'); } this.setElementAttribute('type', this.type); // add the gestures this._cntGesture = new MenuContentGesture(this, document.body); // register listeners if this menu is enabled // check if more than one menu is on the same side let hasEnabledSameSideMenu = this._menuCtrl.getMenus().some(m => { return m.side === this.side && m.enabled; }); if (hasEnabledSameSideMenu) { // auto-disable if another menu on the same side is already enabled this._isEnabled = false; } this._setListeners(); this._cntEle.classList.add('menu-content'); this._cntEle.classList.add('menu-content-' + this.type); // register this menu with the app's menu controller this._menuCtrl.register(this); } /** * @private */ onBackdropClick(ev: UIEvent): boolean { ev.preventDefault(); ev.stopPropagation(); this._menuCtrl.close(); return false; } /** * @private */ private _setListeners() { if (!this._init) { return; } // only listen/unlisten if the menu has initialized if (this._isEnabled && this._isSwipeEnabled && !this._cntGesture.isListening) { // should listen, but is not currently listening console.debug('menu, gesture listen', this.side); this._cntGesture.listen(); } else if (this._cntGesture.isListening && (!this._isEnabled || !this._isSwipeEnabled)) { // should not listen, but is currently listening console.debug('menu, gesture unlisten', this.side); this._cntGesture.unlisten(); } } /** * @private */ private _getType(): MenuType { if (!this._type) { this._type = MenuController.create(this.type, this, this._platform); if (this._config.get('animate') === false) { this._type.ani.duration(0); } } return this._type; } /** * @private */ setOpen(shouldOpen: boolean, animated: boolean = true): Promise<boolean> { // _isPrevented is used to prevent unwanted opening/closing after swiping open/close // or swiping open the menu while pressing down on the MenuToggle button if ((shouldOpen && this.isOpen) || !this._isEnabled || this._isAnimating) { return Promise.resolve(this.isOpen); } this._before(); return new Promise(resolve => { this._getType().setOpen(shouldOpen, animated, () => { this._after(shouldOpen); resolve(this.isOpen); }); }); } /** * @private */ canSwipe(): boolean { return this._isEnabled && this._isSwipeEnabled && !this._isAnimating; } /** * @private */ swipeStart() { // user started swiping the menu open/close if (this.canSwipe()) { this._before(); this._getType().setProgressStart(this.isOpen); } } /** * @private */ swipeProgress(stepValue: number) { // user actively dragging the menu if (!this._isAnimating) { return; } this._getType().setProgessStep(stepValue); this.ionDrag.emit(stepValue); } /** * @private */ swipeEnd(shouldCompleteLeft: boolean, shouldCompleteRight: boolean, stepValue: number) { if (!this._isAnimating) { return; } // user has finished dragging the menu let opening = !this.isOpen; let shouldComplete = false; if (opening) { shouldComplete = (this.side === 'right') ? shouldCompleteLeft : shouldCompleteRight; } else { shouldComplete = (this.side === 'right') ? shouldCompleteRight : shouldCompleteLeft; } this._getType().setProgressEnd(shouldComplete, stepValue, (isOpen: boolean) => { console.debug('menu, swipeEnd', this.side); this._after(isOpen); }); } private _before() { // this places the menu into the correct location before it animates in // this css class doesn't actually kick off any animations this.menuContent && this.menuContent.resize(); this.setElementClass('show-menu', true); this.backdrop.setElementClass('show-backdrop', true); this._keyboard.close(); this._isAnimating = true; } private _after(isOpen: boolean) { // keep opening/closing the menu disabled for a touch more yet // only add listeners/css if it's enabled and isOpen // and only remove listeners/css if it's not open // emit opened/closed events this.isOpen = isOpen; this._isAnimating = false; this._events.unlistenAll(); if (isOpen) { this._cntEle.classList.add('menu-content-open'); let callback = this.onBackdropClick.bind(this); this._events.pointerEvents({ element: this._cntEle, pointerDown: callback }); this._events.pointerEvents({ element: this.backdrop.getNativeElement(), pointerDown: callback }); this.ionOpen.emit(true); } else { this._cntEle.classList.remove('menu-content-open'); this.setElementClass('show-menu', false); this.backdrop.setElementClass('show-menu', false); this.ionClose.emit(true); } } /** * @private */ open() { return this.setOpen(true); } /** * @private */ close() { return this.setOpen(false); } /** * @private */ toggle() { return this.setOpen(!this.isOpen); } /** * @private */ enable(shouldEnable: boolean): Menu { this.enabled = shouldEnable; if (!shouldEnable && this.isOpen) { // close if this menu is open, and should not be enabled this.close(); } if (shouldEnable) { // if this menu should be enabled // then find all the other menus on this same side // and automatically disable other same side menus this._menuCtrl.getMenus() .filter(m => m.side === this.side && m !== this) .map(m => m.enabled = false); } // TODO // what happens if menu is disabled while swipping? return this; } /** * @private */ swipeEnable(shouldEnable: boolean): Menu { this.swipeEnabled = shouldEnable; // TODO // what happens if menu swipe is disabled while swipping? return this; } /** * @private */ getNativeElement(): HTMLElement { return this._elementRef.nativeElement; } /** * @private */ getMenuElement(): HTMLElement { return <HTMLElement>this.getNativeElement().querySelector('.menu-inner'); } /** * @private */ getContentElement(): HTMLElement { return this._cntEle; } /** * @private */ getBackdropElement(): HTMLElement { return this.backdrop.getNativeElement(); } /** * @private */ width(): number { return this.getMenuElement().offsetWidth; } /** * @private */ getMenuController(): MenuController { return this._menuCtrl; } /** * @private */ setElementClass(className: string, add: boolean) { this._renderer.setElementClass(this._elementRef.nativeElement, className, add); } /** * @private */ setElementAttribute(attributeName: string, value: string) { this._renderer.setElementAttribute(this._elementRef.nativeElement, attributeName, value); } /** * @private */ ngOnDestroy() { this._menuCtrl.unregister(this); this._events.unlistenAll(); this._cntGesture && this._cntGesture.destroy(); this._type && this._type.destroy(); this._resizeUnreg && this._resizeUnreg(); this._cntGesture = null; this._type = null; this._cntEle = null; this._resizeUnreg = null; } }
src/components/menu/menu.ts
1
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00192943774163723, 0.00024038212723098695, 0.00016124494140967727, 0.00017195199325215071, 0.0002543770824559033 ]
{ "id": 0, "code_window": [ "import { Menu } from './menu';\n", "import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture';\n", "import { SlideData } from '../../gestures/slide-gesture';\n", "import { assign } from '../../util/util';\n", "import { GesturePriority } from '../../gestures/gesture-controller';\n", "\n", "/**\n", " * Gesture attached to the content which the menu is assigned to\n", " */\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { GestureController, GesturePriority } from '../../gestures/gesture-controller';\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 4 }
<ion-header> <ion-navbar> <ion-buttons end> <button ion-button (click)="skip()"> {{continueText}} </button> </ion-buttons> <ion-title>Slides</ion-title> </ion-navbar> </ion-header> <ion-content> <ion-slides pager [options]="mySlideOptions" (ionDidChange)="onSlideChanged($event)" (ionWillChange)="onSlideChangeStart($event)" (ionDrag)="onSlideMove($event)"> <ion-slide> <h3>Thank you for choosing the Awesome App!</h3> <div id="logo"> <img src="appicon.png" style="max-width: 128px"> </div> <p> The number one app for everything awesome. </p> </ion-slide> <ion-slide> <h3>Using Awesome</h3> <div id="list"> <h5>Just three steps:</h5> <ol> <li>Be awesome</li> <li>Stay awesome</li> <li>There is no step 3</li> </ol> </div> <button ion-button (click)="toggleLastSlide()">Toggle Last Slide</button> </ion-slide> <ion-slide *ngIf="showSlide"> <h3>Any questions?</h3> </ion-slide> </ion-slides> </ion-content> <style> .slide { color: #000; text-align: center; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300; } #logo { margin: 30px 0px; } #list { width: 170px; margin: 30px auto; font-size: 20px; } #list ol { margin-top: 30px; } #list ol li { text-align: left; list-style: decimal; margin: 10px 0px; } .button.ng-hide{ display:none; } </style>
src/components/slides/test/intro/main.html
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0001760373852448538, 0.0001720341679174453, 0.00016658984532114118, 0.0001731052907416597, 0.0000032288685360981617 ]
{ "id": 0, "code_window": [ "import { Menu } from './menu';\n", "import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture';\n", "import { SlideData } from '../../gestures/slide-gesture';\n", "import { assign } from '../../util/util';\n", "import { GesturePriority } from '../../gestures/gesture-controller';\n", "\n", "/**\n", " * Gesture attached to the content which the menu is assigned to\n", " */\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { GestureController, GesturePriority } from '../../gestures/gesture-controller';\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 4 }
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, Output, Optional, Renderer, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; import { App } from '../app/app'; import { Config } from '../../config/config'; import { Content } from '../content/content'; import { DeepLinker } from '../../navigation/deep-linker'; import { Ion } from '../ion'; import { isBlank } from '../../util/util'; import { NavController } from '../../navigation/nav-controller'; import { NavControllerBase } from '../../navigation/nav-controller-base'; import { NavOptions, DIRECTION_SWITCH } from '../../navigation/nav-util'; import { Platform } from '../../platform/platform'; import { Tab } from './tab'; import { TabHighlight } from './tab-highlight'; import { ViewController } from '../../navigation/view-controller'; /** * @name Tabs * @description * Tabs make it easy to navigate between different pages or functional * aspects of an app. The Tabs component, written as `<ion-tabs>`, is * a container of individual [Tab](../Tab/) components. Each individual `ion-tab` * is a declarative component for a [NavController](../../../navigation/NavController/) * * For more information on using nav controllers like Tab or [Nav](../../nav/Nav/), * take a look at the [NavController API Docs](../../../navigation/NavController/). * * ### Placement * * The position of the tabs relative to the content varies based on * the mode. The tabs are placed at the bottom of the screen * for iOS and Android, and at the top for Windows by default. The position can * be configured using the `tabsPlacement` attribute on the `<ion-tabs>` component, * or in an app's [config](../../config/Config/). * See the [Input Properties](#input-properties) below for the available * values of `tabsPlacement`. * * ### Layout * * The layout for all of the tabs can be defined using the `tabsLayout` * property. If the individual tab has a title and icon, the icons will * show on top of the title by default. All tabs can be changed by setting * the value of `tabsLayout` on the `<ion-tabs>` element, or in your * app's [config](../../config/Config/). For example, this is useful if * you want to show tabs with a title only on Android, but show icons * and a title for iOS. See the [Input Properties](#input-properties) * below for the available values of `tabsLayout`. * * ### Selecting a Tab * * There are different ways you can select a specific tab from the tabs * component. You can use the `selectedIndex` property to set the index * on the `<ion-tabs>` element, or you can call `select()` from the `Tabs` * instance after creation. See [usage](#usage) below for more information. * * @usage * * You can add a basic tabs template to a `@Component` using the following * template: * * ```html * <ion-tabs> * <ion-tab [root]="tab1Root"></ion-tab> * <ion-tab [root]="tab2Root"></ion-tab> * <ion-tab [root]="tab3Root"></ion-tab> * </ion-tabs> * ``` * * Where `tab1Root`, `tab2Root`, and `tab3Root` are each a page: * *```ts * @Component({ * templateUrl: 'build/pages/tabs/tabs.html' * }) * export class TabsPage { * // this tells the tabs component which Pages * // should be each tab's root Page * tab1Root = Page1; * tab2Root = Page2; * tab3Root = Page3; * * constructor() { * * } * } *``` * * By default, the first tab will be selected upon navigation to the * Tabs page. We can change the selected tab by using `selectedIndex` * on the `<ion-tabs>` element: * * ```html * <ion-tabs selectedIndex="2"> * <ion-tab [root]="tab1Root"></ion-tab> * <ion-tab [root]="tab2Root"></ion-tab> * <ion-tab [root]="tab3Root"></ion-tab> * </ion-tabs> * ``` * * Since the index starts at `0`, this will select the 3rd tab which has * root set to `tab3Root`. If you wanted to change it dynamically from * your class, you could use [property binding](https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding). * * Alternatively, you can grab the `Tabs` instance and call the `select()` * method. This requires the `<ion-tabs>` element to have an `id`. For * example, set the value of `id` to `myTabs`: * * ```html * <ion-tabs #myTabs> * <ion-tab [root]="tab1Root"></ion-tab> * <ion-tab [root]="tab2Root"></ion-tab> * <ion-tab [root]="tab3Root"></ion-tab> * </ion-tabs> * ``` * * Then in your class you can grab the `Tabs` instance and call `select()`, * passing the index of the tab as the argument. Here we're grabbing the tabs * by using ViewChild. * *```ts * export class TabsPage { * * @ViewChild('myTabs') tabRef: Tabs; * * ionViewDidEnter() { * this.tabRef.select(2); * } * * } *``` * * You can also switch tabs from a child component by calling `select()` on the * parent view using the `NavController` instance. For example, assuming you have * a `TabsPage` component, you could call the following from any of the child * components to switch to `TabsRoot3`: * *```ts * switchTabs() { * this.navCtrl.parent.switch(2); * } *``` * @demo /docs/v2/demos/src/tabs/ * * @see {@link /docs/v2/components#tabs Tabs Component Docs} * @see {@link ../Tab Tab API Docs} * @see {@link ../../config/Config Config API Docs} * */ @Component({ selector: 'ion-tabs', template: '<div class="tabbar" role="tablist" #tabbar>' + '<a *ngFor="let t of _tabs" [tab]="t" class="tab-button" [class.tab-disabled]="!t.enabled" [class.tab-hidden]="!t.show" role="tab" href="#" (ionSelect)="select($event)">' + '<ion-icon *ngIf="t.tabIcon" [name]="t.tabIcon" [isActive]="t.isSelected" class="tab-button-icon"></ion-icon>' + '<span *ngIf="t.tabTitle" class="tab-button-text">{{t.tabTitle}}</span>' + '<ion-badge *ngIf="t.tabBadge" class="tab-badge" [color]="t.tabBadgeStyle">{{t.tabBadge}}</ion-badge>' + '<div class="button-effect"></div>' + '</a>' + '<div class="tab-highlight"></div>' + '</div>' + '<ng-content></ng-content>' + '<div #portal tab-portal></div>', encapsulation: ViewEncapsulation.None, }) export class Tabs extends Ion implements AfterViewInit { /** @internal */ _ids: number = -1; /** @internal */ _tabs: Tab[] = []; /** @internal */ _sbPadding: boolean; /** @internal */ _top: number; /** @internal */ _bottom: number; /** @internal */ id: string; /** @internal */ _selectHistory: string[] = []; /** @internal */ _subPages: boolean; /** * @input {string} The predefined color to use. For example: `"primary"`, `"secondary"`, `"danger"`. */ @Input() set color(value: string) { this._setColor('tabs', value); } /** * @input {string} The mode to apply to this component. */ @Input() set mode(val: string) { this._setMode('tabs', val); } /** * @input {number} The default selected tab index when first loaded. If a selected index isn't provided then it will use `0`, the first tab. */ @Input() selectedIndex: number; /** * @input {string} Set the tabbar layout: `icon-top`, `icon-left`, `icon-right`, `icon-bottom`, `icon-hide`, `title-hide`. */ @Input() tabsLayout: string; /** * @input {string} Set position of the tabbar: `top`, `bottom`. */ @Input() tabsPlacement: string; /** * @input {boolean} Whether to show the tab highlight bar under the selected tab. Default: `false`. */ @Input() tabsHighlight: boolean; /** * @input {any} Expression to evaluate when the tab changes. */ @Output() ionChange: EventEmitter<Tab> = new EventEmitter<Tab>(); /** * @internal */ @ViewChild(TabHighlight) _highlight: TabHighlight; /** * @internal */ @ViewChild('tabbar') _tabbar: ElementRef; /** * @internal */ @ViewChild('portal', {read: ViewContainerRef}) portal: ViewContainerRef; /** * @private */ parent: NavControllerBase; constructor( @Optional() parent: NavController, @Optional() public viewCtrl: ViewController, private _app: App, config: Config, elementRef: ElementRef, private _platform: Platform, renderer: Renderer, private _linker: DeepLinker ) { super(config, elementRef, renderer); this.mode = config.get('mode'); this.parent = <NavControllerBase>parent; this.id = 't' + (++tabIds); this._sbPadding = config.getBoolean('statusbarPadding'); this._subPages = config.getBoolean('tabsHideOnSubPages'); this.tabsHighlight = config.getBoolean('tabsHighlight'); if (this.parent) { // this Tabs has a parent Nav this.parent.registerChildNav(this); } else if (viewCtrl && viewCtrl.getNav()) { // this Nav was opened from a modal this.parent = <any>viewCtrl.getNav(); this.parent.registerChildNav(this); } else if (this._app) { // this is the root navcontroller for the entire app this._app._setRootNav(this); } // Tabs may also be an actual ViewController which was navigated to // if Tabs is static and not navigated to within a NavController // then skip this and don't treat it as it's own ViewController if (viewCtrl) { viewCtrl._setContent(this); viewCtrl._setContentRef(elementRef); } } ngOnDestroy() { this.parent.unregisterChildNav(this); } /** * @internal */ ngAfterViewInit() { this._setConfig('tabsPlacement', 'bottom'); this._setConfig('tabsLayout', 'icon-top'); this._setConfig('tabsHighlight', this.tabsHighlight); if (this.tabsHighlight) { this._platform.onResize(() => { this._highlight.select(this.getSelected()); }); } this.initTabs(); } /** * @internal */ initTabs() { // get the selected index from the input // otherwise default it to use the first index let selectedIndex = (isBlank(this.selectedIndex) ? 0 : parseInt(<any>this.selectedIndex, 10)); // now see if the deep linker can find a tab index const tabsSegment = this._linker.initNav(this); if (tabsSegment && isBlank(tabsSegment.component)) { // we found a segment which probably represents which tab to select selectedIndex = this._linker.getSelectedTabIndex(this, tabsSegment.name, selectedIndex); } // get the selectedIndex and ensure it isn't hidden or disabled let selectedTab = this._tabs.find((t, i) => i === selectedIndex && t.enabled && t.show); if (!selectedTab) { // wasn't able to select the tab they wanted // try to find the first tab that's available selectedTab = this._tabs.find(t => t.enabled && t.show); } if (selectedTab) { // we found a tab to select // get the segment the deep linker says this tab should load with let pageId: string = null; if (tabsSegment) { let selectedTabSegment = this._linker.initNav(selectedTab); if (selectedTabSegment && selectedTabSegment.component) { selectedTab.root = selectedTabSegment.component; selectedTab.rootParams = selectedTabSegment.data; pageId = selectedTabSegment.id; } } this.select(selectedTab, { id: pageId }); } // set the initial href attribute values for each tab this._tabs.forEach(t => { t.updateHref(t.root, t.rootParams); }); } /** * @internal */ _setConfig(attrKey: string, fallback: any) { let val = (<any>this)[attrKey]; if (isBlank(val)) { val = this._config.get(attrKey, fallback); } this.setElementAttribute(attrKey, val); } /** * @private */ add(tab: Tab) { this._tabs.push(tab); return this.id + '-' + (++this._ids); } /** * @param {number|Tab} tabOrIndex Index, or the Tab instance, of the tab to select. */ select(tabOrIndex: number | Tab, opts: NavOptions = {}) { const selectedTab: Tab = (typeof tabOrIndex === 'number' ? this.getByIndex(tabOrIndex) : tabOrIndex); if (isBlank(selectedTab)) { return; } const deselectedTab = this.getSelected(); if (selectedTab === deselectedTab) { // no change return this._touchActive(selectedTab); } let deselectedPage: ViewController; if (deselectedTab) { deselectedPage = deselectedTab.getActive(); deselectedPage && deselectedPage._willLeave(); } opts.animate = false; const selectedPage = selectedTab.getActive(); selectedPage && selectedPage._willEnter(); selectedTab.load(opts, (alreadyLoaded: boolean) => { selectedTab.ionSelect.emit(selectedTab); this.ionChange.emit(selectedTab); if (selectedTab.root) { // only show the selectedTab if it has a root // it's possible the tab is only for opening modal's or signing out // and doesn't actually have content. In the case there's no content // for a tab then do nothing and leave the current view as is this._tabs.forEach(tab => { tab.setSelected(tab === selectedTab); }); if (this.tabsHighlight) { this._highlight.select(selectedTab); } if (opts.updateUrl !== false) { this._linker.navChange(DIRECTION_SWITCH); } } selectedPage && selectedPage._didEnter(); deselectedPage && deselectedPage._didLeave(); // track the order of which tabs have been selected, by their index // do not track if the tab index is the same as the previous if (this._selectHistory[this._selectHistory.length - 1] !== selectedTab.id) { this._selectHistory.push(selectedTab.id); } // if this is not the Tab's initial load then we need // to refresh the tabbar and content dimensions to be sure // they're lined up correctly if (alreadyLoaded && selectedPage) { let content = <Content>selectedPage.getIONContent(); if (content) { content.resize(); } } }); } /** * Get the previously selected Tab which is currently not disabled or hidden. * @param {boolean} trimHistory If the selection history should be trimmed up to the previous tab selection or not. * @returns {Tab} */ previousTab(trimHistory: boolean = true): Tab { // walk backwards through the tab selection history // and find the first previous tab that is enabled and shown console.debug('run previousTab', this._selectHistory); for (var i = this._selectHistory.length - 2; i >= 0; i--) { var tab = this._tabs.find(t => t.id === this._selectHistory[i]); if (tab && tab.enabled && tab.show) { if (trimHistory) { this._selectHistory.splice(i + 1); } return tab; } } return null; } /** * @param {number} index Index of the tab you want to get * @returns {Tab} Returns the tab who's index matches the one passed */ getByIndex(index: number): Tab { return this._tabs[index]; } /** * @return {Tab} Returns the currently selected tab */ getSelected(): Tab { for (var i = 0; i < this._tabs.length; i++) { if (this._tabs[i].isSelected) { return this._tabs[i]; } } return null; } /** * @internal */ getActiveChildNav() { return this.getSelected(); } /** * @internal */ getIndex(tab: Tab): number { return this._tabs.indexOf(tab); } /** * @internal */ length(): number { return this._tabs.length; } /** * "Touch" the active tab, going back to the root view of the tab * or optionally letting the tab handle the event */ private _touchActive(tab: Tab) { const active = tab.getActive(); if (active) { if (active._cmp && active._cmp.instance.ionSelected) { // if they have a custom tab selected handler, call it active._cmp.instance.ionSelected(); } else if (tab.length() > 1) { // if we're a few pages deep, pop to root tab.popToRoot(null, null); } else if (tab.root !== active.component) { // Otherwise, if the page we're on is not our real root, reset it to our // default root type tab.setRoot(tab.root); } } } /** * @internal * DOM WRITE */ setTabbarPosition(top: number, bottom: number) { if (this._top !== top || this._bottom !== bottom) { const tabbarEle = <HTMLElement>this._tabbar.nativeElement; tabbarEle.style.top = (top > -1 ? top + 'px' : ''); tabbarEle.style.bottom = (bottom > -1 ? bottom + 'px' : ''); tabbarEle.classList.add('show-tabbar'); this._top = top; this._bottom = bottom; } } } let tabIds = -1;
src/components/tabs/tabs.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0002469913742970675, 0.00017167349869851023, 0.00016098792548291385, 0.00017132092034444213, 0.000010920482054643799 ]
{ "id": 0, "code_window": [ "import { Menu } from './menu';\n", "import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture';\n", "import { SlideData } from '../../gestures/slide-gesture';\n", "import { assign } from '../../util/util';\n", "import { GesturePriority } from '../../gestures/gesture-controller';\n", "\n", "/**\n", " * Gesture attached to the content which the menu is assigned to\n", " */\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { GestureController, GesturePriority } from '../../gestures/gesture-controller';\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 4 }
@import "../../themes/ionic.globals.ios"; // iOS App // -------------------------------------------------- ion-app.ios { font-family: $font-family-ios-base; font-size: $font-size-ios-base; background-color: $background-ios-color; }
src/components/app/app.ios.scss
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0001729296491248533, 0.0001704255846561864, 0.0001679215201875195, 0.0001704255846561864, 0.000002504064468666911 ]
{ "id": 1, "code_window": [ " */\n", "export class MenuContentGesture extends SlideEdgeGesture {\n", "\n", " constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) {\n", " super(contentEle, assign({\n", " direction: 'x',\n", " edge: menu.side,\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " constructor(\n", " public menu: Menu,\n", " gestureCtrl: GestureController,\n", " contentEle: HTMLElement,\n", " options: any = {}) {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 11 }
import { Menu } from './menu'; import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture'; import { SlideData } from '../../gestures/slide-gesture'; import { assign } from '../../util/util'; import { GesturePriority } from '../../gestures/gesture-controller'; /** * Gesture attached to the content which the menu is assigned to */ export class MenuContentGesture extends SlideEdgeGesture { constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) { super(contentEle, assign({ direction: 'x', edge: menu.side, threshold: 0, maxEdgeStart: menu.maxEdgeStart || 50, maxAngle: 40, gesture: menu.gestureCtrl.create('menu-swipe', { priority: GesturePriority.MenuSwipe, }) }, options)); } canStart(ev: any): boolean { let menu = this.menu; if (!menu.canSwipe()) { return false; } if (menu.isOpen) { return true; } else if (menu.getMenuController().getOpen()) { return false; } return super.canStart(ev); } // Set CSS, then wait one frame for it to apply before sliding starts onSlideBeforeStart(ev: any) { console.debug('menu gesture, onSlideBeforeStart', this.menu.side); this.menu.swipeStart(); } onSlide(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let stepValue = (slide.distance / z); console.debug('menu gesture, onSlide', this.menu.side, 'distance', slide.distance, 'min', slide.min, 'max', slide.max, 'z', z, 'stepValue', stepValue); ev.preventDefault(); this.menu.swipeProgress(stepValue); } onSlideEnd(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let currentStepValue = (slide.distance / z); let velocity = slide.velocity; z = Math.abs(z * 0.5); let shouldCompleteRight = (velocity >= 0) && (velocity > 0.2 || slide.delta > z); let shouldCompleteLeft = (velocity <= 0) && (velocity < -0.2 || slide.delta < -z); console.debug('menu gesture, onSlideEnd', this.menu.side, 'distance', slide.distance, 'delta', slide.delta, 'velocity', velocity, 'min', slide.min, 'max', slide.max, 'shouldCompleteLeft', shouldCompleteLeft, 'shouldCompleteRight', shouldCompleteRight, 'currentStepValue', currentStepValue); this.menu.swipeEnd(shouldCompleteLeft, shouldCompleteRight, currentStepValue); } getElementStartPos(slide: SlideData, ev: any) { if (this.menu.side === 'right') { return this.menu.isOpen ? slide.min : slide.max; } // left menu return this.menu.isOpen ? slide.max : slide.min; } getSlideBoundaries(): {min: number, max: number} { if (this.menu.side === 'right') { return { min: -this.menu.width(), max: 0 }; } // left menu return { min: 0, max: this.menu.width() }; } }
src/components/menu/menu-gestures.ts
1
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.9782545566558838, 0.36632707715034485, 0.0002372630697209388, 0.021000267937779427, 0.40255048871040344 ]
{ "id": 1, "code_window": [ " */\n", "export class MenuContentGesture extends SlideEdgeGesture {\n", "\n", " constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) {\n", " super(contentEle, assign({\n", " direction: 'x',\n", " edge: menu.side,\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " constructor(\n", " public menu: Menu,\n", " gestureCtrl: GestureController,\n", " contentEle: HTMLElement,\n", " options: any = {}) {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 11 }
<ion-header> <ion-toolbar> <ion-title>Block Buttons</ion-title> </ion-toolbar> </ion-header> <ion-content padding style="text-align:center"> <p> <a ion-button block href="#">a[ion-button][block]</a> <button ion-button block>button[ion-button][block]</button> </p> <p> <a ion-button block href="#" icon-left><ion-icon name="help-circle"></ion-icon> a[ion-button][block] icon</a> <button ion-button block icon-left><ion-icon name="help-circle"></ion-icon> button[ion-button][block] icon</button> </p> <p> <a ion-button block outline color="secondary" href="#">a[ion-button][block][outline][secondary]</a> <button ion-button block outline color="secondary">button[ion-button][block][outline][secondary]</button> </p> <p> <a ion-button block clear color="dark" href="#">a[ion-button][block][clear][dark]</a> <button ion-button block clear color="dark">button[ion-button][clear][block][dark]</button> </p> <p> <a ion-button block round href="#">a[ion-button][block][round]</a> <button ion-button block round>button[ion-button][block][round]</button> </p> <p> <a ion-button block round outline href="#">a[ion-button][block][round][outline]</a> <button ion-button block round outline>button[ion-button][block][round][outline]</button> </p> <p> <button ion-button [block]="blockButton" (click)="toggleBlock()">Toggle Block</button> </p> </ion-content>
src/components/button/test/block/main.html
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017203119932673872, 0.0001695131213637069, 0.0001665347517700866, 0.00016976016922853887, 0.0000018492884237275575 ]
{ "id": 1, "code_window": [ " */\n", "export class MenuContentGesture extends SlideEdgeGesture {\n", "\n", " constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) {\n", " super(contentEle, assign({\n", " direction: 'x',\n", " edge: menu.side,\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " constructor(\n", " public menu: Menu,\n", " gestureCtrl: GestureController,\n", " contentEle: HTMLElement,\n", " options: any = {}) {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 11 }
src/components/list/test/headers/e2e.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017440822557546198, 0.00017440822557546198, 0.00017440822557546198, 0.00017440822557546198, 0 ]
{ "id": 1, "code_window": [ " */\n", "export class MenuContentGesture extends SlideEdgeGesture {\n", "\n", " constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) {\n", " super(contentEle, assign({\n", " direction: 'x',\n", " edge: menu.side,\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " constructor(\n", " public menu: Menu,\n", " gestureCtrl: GestureController,\n", " contentEle: HTMLElement,\n", " options: any = {}) {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 11 }
import { platformBrowser } from '@angular/platform-browser'; import { enableProdMode } from '@angular/core'; import { AppModuleNgFactory } from './app.module.ngfactory'; enableProdMode(); platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
demos/src/tabs/main.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017553874931763858, 0.00017553874931763858, 0.00017553874931763858, 0.00017553874931763858, 0 ]
{ "id": 2, "code_window": [ " edge: menu.side,\n", " threshold: 0,\n", " maxEdgeStart: menu.maxEdgeStart || 50,\n", " maxAngle: 40,\n", " gesture: menu.gestureCtrl.create('menu-swipe', {\n", " priority: GesturePriority.MenuSwipe,\n", " })\n", " }, options));\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " gesture: gestureCtrl.create('menu-swipe', {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 18 }
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, NgZone, Output, Renderer, ViewChild, ViewEncapsulation } from '@angular/core'; import { Backdrop } from '../backdrop/backdrop'; import { Config } from '../../config/config'; import { isTrueProperty } from '../../util/util'; import { Keyboard } from '../../util/keyboard'; import { MenuContentGesture } from './menu-gestures'; import { MenuController } from './menu-controller'; import { MenuType } from './menu-types'; import { Platform } from '../../platform/platform'; import { GestureController } from '../../gestures/gesture-controller'; import { UIEventManager } from '../../util/ui-event-manager'; import { Content } from '../content/content'; /** * @name Menu * @description * The Menu component is a navigation drawer that slides in from the side of the current * view. By default, it slides in from the left, but the side can be overridden. The menu * will be displayed differently based on the mode, however the display type can be changed * to any of the available [menu types](#menu-types). The menu element should be a sibling * to the app's content element. There can be any number of menus attached to the content. * These can be controlled from the templates, or programmatically using the [MenuController](../MenuController). * * * ### Opening/Closing Menus * * There are several ways to open or close a menu. The menu can be **toggled** open or closed * from the template using the [MenuToggle](../MenuToggle) directive. It can also be * **closed** from the template using the [MenuClose](../MenuClose) directive. To display a menu * programmatically, inject the [MenuController](../MenuController) provider and call any of the * `MenuController` methods. * * * ### Menu Types * * The menu supports several display types: `overlay`, `reveal` and `push`. By default, * it will use the correct type based on the mode, but this can be changed. The default * type for both Material Design and Windows mode is `overlay`, and `reveal` is the default * type for iOS mode. The menu type can be changed in the app's [config](../../config/Config) * via the `menuType` property, or passed in the `type` property on the `<ion-menu>` element. * See [usage](#usage) below for examples of changing the menu type. * * * ### Navigation Bar Behavior * * If a [MenuToggle](../MenuToggle) button is added to the [Navbar](../../navbar/Navbar) of * a page, the button will only appear when the page it's in is currently a root page. The * root page is the initial page loaded in the app, or a page that has been set as the root * using the [setRoot](../../nav/NavController/#setRoot) method on the [NavController](../../nav/NavController). * * For example, say the application has two pages, `Page1` and `Page2`, and both have a * `MenuToggle` button in their navigation bars. Assume the initial page loaded into the app * is `Page1`, making it the root page. `Page1` will display the `MenuToggle` button, but once * `Page2` is pushed onto the navigation stack, the `MenuToggle` will not be displayed. * * * ### Persistent Menus * * Persistent menus display the [MenuToggle](../MenuToggle) button in the [Navbar](../../navbar/Navbar) * on all pages in the navigation stack. To make a menu persistent set `persistent` to `true` on the * `<ion-menu>` element. Note that this will only affect the `MenuToggle` button in the `Navbar` attached * to the `Menu` with `persistent` set to true, any other `MenuToggle` buttons will not be affected. * * * @usage * * To add a menu to an application, the `<ion-menu>` element should be added as a sibling to * the content it belongs to. A [local variable](https://angular.io/docs/ts/latest/guide/user-input.html#local-variables) * should be added to the content element and passed to the menu element in the `content` property. * This tells the menu which content it is attached to, so it knows which element to watch for * gestures. In the below example, `content` is using [property binding](https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding) * because `mycontent` is a reference to the `<ion-nav>` element, and not a string. * * ```html * <ion-menu [content]="mycontent"> * <ion-content> * <ion-list> * ... * </ion-list> * </ion-content> * </ion-menu> * * <ion-nav #mycontent [root]="rootPage"></ion-nav> * ``` * * ### Menu Side * * By default, menus slide in from the left, but this can be overridden by passing `right` * to the `side` property: * * ```html * <ion-menu side="right" [content]="mycontent">...</ion-menu> * ``` * * * ### Menu Type * * The menu type can be changed by passing the value to `type` on the `<ion-menu>`: * * ```html * <ion-menu type="overlay" [content]="mycontent">...</ion-menu> * ``` * * It can also be set in the app's config. The below will set the menu type to * `push` for all modes, and then set the type to `overlay` for the `ios` mode. * * ```ts * // in NgModules * * imports: [ * IonicModule.forRoot(MyApp,{ * menuType: 'push', * platforms: { * ios: { * menuType: 'overlay', * } * } * }) * ], * ``` * * * ### Displaying the Menu * * To toggle a menu from the template, add a button with the `menuToggle` * directive anywhere in the page's template: * * ```html * <button ion-button menuToggle>Toggle Menu</button> * ``` * * To close a menu, add the `menuClose` button. It can be added anywhere * in the content, or even the menu itself. Below it is added to the menu's * content: * * ```html * <ion-menu [content]="mycontent"> * <ion-content> * <ion-list> * <button ion-button menuClose ion-item detail-none>Close Menu</button> * </ion-list> * </ion-content> * </ion-menu> * ``` * * See the [MenuToggle](../MenuToggle) and [MenuClose](../MenuClose) docs * for more information on these directives. * * The menu can also be controlled from the Page by using the `MenuController`. * Inject the `MenuController` provider into the page and then call any of its * methods. In the below example, the `openMenu` method will open the menu * when it is called. * * ```ts * import { Component } from '@angular/core'; * import { MenuController } from 'ionic-angular'; * * @Component({...}) * export class MyPage { * constructor(public menuCtrl: MenuController) {} * * openMenu() { * this.menuCtrl.open(); * } * } * ``` * * See the [MenuController](../MenuController) API docs for all of the methods * and usage information. * * * @demo /docs/v2/demos/src/menu/ * * @see {@link /docs/v2/components#menus Menu Component Docs} * @see {@link ../MenuController MenuController API Docs} * @see {@link ../../nav/Nav Nav API Docs} * @see {@link ../../nav/NavController NavController API Docs} */ @Component({ selector: 'ion-menu', template: '<div class="menu-inner"><ng-content></ng-content></div>' + '<ion-backdrop disableScroll="false"></ion-backdrop>', host: { 'role': 'navigation' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class Menu { private _cntEle: HTMLElement; private _cntGesture: MenuContentGesture; private _type: MenuType; private _resizeUnreg: Function; private _isEnabled: boolean = true; private _isSwipeEnabled: boolean = true; private _isAnimating: boolean = false; private _isPers: boolean = false; private _init: boolean = false; private _events: UIEventManager = new UIEventManager(); /** * @private */ isOpen: boolean = false; /** * @private */ @ViewChild(Backdrop) backdrop: Backdrop; /** * @private */ @ContentChild(Content) menuContent: Content; /** * @input {any} A reference to the content element the menu should use. */ @Input() content: any; /** * @input {string} An id for the menu. */ @Input() id: string; /** * @input {string} Which side of the view the menu should be placed. Default `"left"`. */ @Input() side: string; /** * @input {string} The display type of the menu. Default varies based on the mode, * see the `menuType` in the [config](../../config/Config). Available options: * `"overlay"`, `"reveal"`, `"push"`. */ @Input() type: string; /** * @input {boolean} Whether or not the menu should be enabled. Default `true`. */ @Input() get enabled(): boolean { return this._isEnabled; } set enabled(val: boolean) { this._isEnabled = isTrueProperty(val); this._setListeners(); } /** * @input {boolean} Whether or not swiping the menu should be enabled. Default `true`. */ @Input() get swipeEnabled(): boolean { return this._isSwipeEnabled; } set swipeEnabled(val: boolean) { this._isSwipeEnabled = isTrueProperty(val); this._setListeners(); } /** * @input {string} Whether or not the menu should persist on child pages. Default `false`. */ @Input() get persistent(): boolean { return this._isPers; } set persistent(val: boolean) { this._isPers = isTrueProperty(val); } /** * @private */ @Input() maxEdgeStart: number; /** * @output {event} When the menu is being dragged open. */ @Output() ionDrag: EventEmitter<number> = new EventEmitter<number>(); /** * @output {event} When the menu has been opened. */ @Output() ionOpen: EventEmitter<boolean> = new EventEmitter<boolean>(); /** * @output {event} When the menu has been closed. */ @Output() ionClose: EventEmitter<boolean> = new EventEmitter<boolean>(); constructor( public _menuCtrl: MenuController, private _elementRef: ElementRef, private _config: Config, private _platform: Platform, private _renderer: Renderer, private _keyboard: Keyboard, private _zone: NgZone, public gestureCtrl: GestureController ) {} /** * @private */ ngOnInit() { this._init = true; let content = this.content; this._cntEle = (content instanceof Node) ? content : content && content.getNativeElement && content.getNativeElement(); // requires content element if (!this._cntEle) { return console.error('Menu: must have a [content] element to listen for drag events on. Example:\n\n<ion-menu [content]="content"></ion-menu>\n\n<ion-nav #content></ion-nav>'); } // normalize the "side" if (this.side !== 'left' && this.side !== 'right') { this.side = 'left'; } this.setElementAttribute('side', this.side); // normalize the "type" if (!this.type) { this.type = this._config.get('menuType'); } this.setElementAttribute('type', this.type); // add the gestures this._cntGesture = new MenuContentGesture(this, document.body); // register listeners if this menu is enabled // check if more than one menu is on the same side let hasEnabledSameSideMenu = this._menuCtrl.getMenus().some(m => { return m.side === this.side && m.enabled; }); if (hasEnabledSameSideMenu) { // auto-disable if another menu on the same side is already enabled this._isEnabled = false; } this._setListeners(); this._cntEle.classList.add('menu-content'); this._cntEle.classList.add('menu-content-' + this.type); // register this menu with the app's menu controller this._menuCtrl.register(this); } /** * @private */ onBackdropClick(ev: UIEvent): boolean { ev.preventDefault(); ev.stopPropagation(); this._menuCtrl.close(); return false; } /** * @private */ private _setListeners() { if (!this._init) { return; } // only listen/unlisten if the menu has initialized if (this._isEnabled && this._isSwipeEnabled && !this._cntGesture.isListening) { // should listen, but is not currently listening console.debug('menu, gesture listen', this.side); this._cntGesture.listen(); } else if (this._cntGesture.isListening && (!this._isEnabled || !this._isSwipeEnabled)) { // should not listen, but is currently listening console.debug('menu, gesture unlisten', this.side); this._cntGesture.unlisten(); } } /** * @private */ private _getType(): MenuType { if (!this._type) { this._type = MenuController.create(this.type, this, this._platform); if (this._config.get('animate') === false) { this._type.ani.duration(0); } } return this._type; } /** * @private */ setOpen(shouldOpen: boolean, animated: boolean = true): Promise<boolean> { // _isPrevented is used to prevent unwanted opening/closing after swiping open/close // or swiping open the menu while pressing down on the MenuToggle button if ((shouldOpen && this.isOpen) || !this._isEnabled || this._isAnimating) { return Promise.resolve(this.isOpen); } this._before(); return new Promise(resolve => { this._getType().setOpen(shouldOpen, animated, () => { this._after(shouldOpen); resolve(this.isOpen); }); }); } /** * @private */ canSwipe(): boolean { return this._isEnabled && this._isSwipeEnabled && !this._isAnimating; } /** * @private */ swipeStart() { // user started swiping the menu open/close if (this.canSwipe()) { this._before(); this._getType().setProgressStart(this.isOpen); } } /** * @private */ swipeProgress(stepValue: number) { // user actively dragging the menu if (!this._isAnimating) { return; } this._getType().setProgessStep(stepValue); this.ionDrag.emit(stepValue); } /** * @private */ swipeEnd(shouldCompleteLeft: boolean, shouldCompleteRight: boolean, stepValue: number) { if (!this._isAnimating) { return; } // user has finished dragging the menu let opening = !this.isOpen; let shouldComplete = false; if (opening) { shouldComplete = (this.side === 'right') ? shouldCompleteLeft : shouldCompleteRight; } else { shouldComplete = (this.side === 'right') ? shouldCompleteRight : shouldCompleteLeft; } this._getType().setProgressEnd(shouldComplete, stepValue, (isOpen: boolean) => { console.debug('menu, swipeEnd', this.side); this._after(isOpen); }); } private _before() { // this places the menu into the correct location before it animates in // this css class doesn't actually kick off any animations this.menuContent && this.menuContent.resize(); this.setElementClass('show-menu', true); this.backdrop.setElementClass('show-backdrop', true); this._keyboard.close(); this._isAnimating = true; } private _after(isOpen: boolean) { // keep opening/closing the menu disabled for a touch more yet // only add listeners/css if it's enabled and isOpen // and only remove listeners/css if it's not open // emit opened/closed events this.isOpen = isOpen; this._isAnimating = false; this._events.unlistenAll(); if (isOpen) { this._cntEle.classList.add('menu-content-open'); let callback = this.onBackdropClick.bind(this); this._events.pointerEvents({ element: this._cntEle, pointerDown: callback }); this._events.pointerEvents({ element: this.backdrop.getNativeElement(), pointerDown: callback }); this.ionOpen.emit(true); } else { this._cntEle.classList.remove('menu-content-open'); this.setElementClass('show-menu', false); this.backdrop.setElementClass('show-menu', false); this.ionClose.emit(true); } } /** * @private */ open() { return this.setOpen(true); } /** * @private */ close() { return this.setOpen(false); } /** * @private */ toggle() { return this.setOpen(!this.isOpen); } /** * @private */ enable(shouldEnable: boolean): Menu { this.enabled = shouldEnable; if (!shouldEnable && this.isOpen) { // close if this menu is open, and should not be enabled this.close(); } if (shouldEnable) { // if this menu should be enabled // then find all the other menus on this same side // and automatically disable other same side menus this._menuCtrl.getMenus() .filter(m => m.side === this.side && m !== this) .map(m => m.enabled = false); } // TODO // what happens if menu is disabled while swipping? return this; } /** * @private */ swipeEnable(shouldEnable: boolean): Menu { this.swipeEnabled = shouldEnable; // TODO // what happens if menu swipe is disabled while swipping? return this; } /** * @private */ getNativeElement(): HTMLElement { return this._elementRef.nativeElement; } /** * @private */ getMenuElement(): HTMLElement { return <HTMLElement>this.getNativeElement().querySelector('.menu-inner'); } /** * @private */ getContentElement(): HTMLElement { return this._cntEle; } /** * @private */ getBackdropElement(): HTMLElement { return this.backdrop.getNativeElement(); } /** * @private */ width(): number { return this.getMenuElement().offsetWidth; } /** * @private */ getMenuController(): MenuController { return this._menuCtrl; } /** * @private */ setElementClass(className: string, add: boolean) { this._renderer.setElementClass(this._elementRef.nativeElement, className, add); } /** * @private */ setElementAttribute(attributeName: string, value: string) { this._renderer.setElementAttribute(this._elementRef.nativeElement, attributeName, value); } /** * @private */ ngOnDestroy() { this._menuCtrl.unregister(this); this._events.unlistenAll(); this._cntGesture && this._cntGesture.destroy(); this._type && this._type.destroy(); this._resizeUnreg && this._resizeUnreg(); this._cntGesture = null; this._type = null; this._cntEle = null; this._resizeUnreg = null; } }
src/components/menu/menu.ts
1
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.007697402499616146, 0.0008789532002992928, 0.0001630975748412311, 0.0002901658299379051, 0.0014645933406427503 ]
{ "id": 2, "code_window": [ " edge: menu.side,\n", " threshold: 0,\n", " maxEdgeStart: menu.maxEdgeStart || 50,\n", " maxAngle: 40,\n", " gesture: menu.gestureCtrl.create('menu-swipe', {\n", " priority: GesturePriority.MenuSwipe,\n", " })\n", " }, options));\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " gesture: gestureCtrl.create('menu-swipe', {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 18 }
<!DOCTYPE html> <html dir="ltr" lang="en"> <head> <title>Ionic E2E</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="apple-mobile-web-app-capable" content="yes"> <link id="ionicLink" href="../../css/ionic.css" rel="stylesheet"> <link href="../../css/e2e.shared.css" rel="stylesheet"> <script> var port; if (location.href.indexOf('snapshot=true') > -1) { port = 8876; document.documentElement.classList.add('snapshot'); } else { port = 8000; document.documentElement.classList.remove('snapshot'); } if (location.href.indexOf('cordova=true') > -1) { window.cordova = {}; } if (location.href.indexOf('rtl=true') > -1) { document.dir = 'rtl'; } else { document.dir = 'ltr'; } if (location.href.indexOf('theme=dark') > -1) { var link = document.getElementById('ionicLink'); link.setAttribute('href', link.getAttribute('href').replace('.css', '.dark.css')); } </script> <script src="/node_modules/systemjs/dist/system.src.js"></script> <script> System.config({ map: { '@angular/core': '/node_modules/@angular/core/bundles/core.umd.js', '@angular/compiler': '/node_modules/@angular/compiler/bundles/compiler.umd.js', '@angular/common': '/node_modules/@angular/common/bundles/common.umd.js', '@angular/forms': '/node_modules/@angular/forms/bundles/forms.umd.js', '@angular/http': '/node_modules/@angular/http/bundles/http.umd.js', '@angular/platform-browser': '/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js', '@angular/platform-browser-dynamic': '/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', 'ionic-angular': 'http://localhost:' + port, 'rxjs': '/node_modules/rxjs' }, packages: { 'ionic-angular': { main: 'index', defaultExtension: false }, 'rxjs': { defaultExtension: 'js' } } }); </script> <script src="../../polyfills/polyfills.ng.js"></script> <script src="../../../bundles/ionic.system.js"></script> </head> <body> <ion-app></ion-app> <script> System.import('@angular/platform-browser-dynamic').then(function(platformBrowserDynamic) { System.import('app-module.js').then(function(appModule) { platformBrowserDynamic.platformBrowserDynamic().bootstrapModule(appModule.AppModule); }, console.error.bind(console)); }, console.error.bind(console)); </script> </body> </html>
scripts/e2e/e2e.template.dev.html
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0001740512379910797, 0.0001713551173452288, 0.00016879061877261847, 0.00017155584646388888, 0.000001417261501046596 ]
{ "id": 2, "code_window": [ " edge: menu.side,\n", " threshold: 0,\n", " maxEdgeStart: menu.maxEdgeStart || 50,\n", " maxAngle: 40,\n", " gesture: menu.gestureCtrl.create('menu-swipe', {\n", " priority: GesturePriority.MenuSwipe,\n", " })\n", " }, options));\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " gesture: gestureCtrl.create('menu-swipe', {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 18 }
<a name="2.0.0-rc.1"></a> # [2.0.0-rc.1](https://github.com/driftyco/ionic/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2016-10-13) ### Package.json Updates `package.json` has been upated to include Angular dependencies and the latest version of app-scripts. Please update your package.json to reflect these changes and then run `npm install`. ``` "dependencies": { "@angular/common": "^2.0.0", "@angular/compiler": "^2.0.0", "@angular/compiler-cli": "0.6.2", "@angular/core": "^2.0.0", "@angular/forms": "^2.0.0", "@angular/http": "^2.0.0", "@angular/platform-browser": "^2.0.0", "@angular/platform-browser-dynamic": "^2.0.0", "@angular/platform-server": "^2.0.0", "@ionic/storage": "^1.0.3", "ionic-angular": "^2.0.0-rc.1", "ionic-native": "^2.2.3", "ionicons": "^3.0.0", "rxjs": "5.0.0-beta.12", "zone.js": "^0.6.21" }, "devDependencies": { "@ionic/app-scripts": "^0.0.34", "typescript": "^2.0.3" }, ``` ### Bug Fixes * **content:** move $text-ios-color to content ([#8421](https://github.com/driftyco/ionic/issues/8421)) ([91168af](https://github.com/driftyco/ionic/commit/91168af)) * **datetime-util:** add missing date property conditions ([2aea1cb](https://github.com/driftyco/ionic/commit/2aea1cb)) * **demos:** double quote in script tag ([424b9e0](https://github.com/driftyco/ionic/commit/424b9e0)) * **fab:** center fab list for larger buttons ([267a77b](https://github.com/driftyco/ionic/commit/267a77b)) * **fab:** not using change detection ([47e1e17](https://github.com/driftyco/ionic/commit/47e1e17)), closes [#8424](https://github.com/driftyco/ionic/issues/8424) * **icon:** isActive="false" with ios mode ([bcbe03c](https://github.com/driftyco/ionic/commit/bcbe03c)), closes [#8435](https://github.com/driftyco/ionic/issues/8435) * **input:** detect value when it is zero ([d02e14c](https://github.com/driftyco/ionic/commit/d02e14c)), closes [#8019](https://github.com/driftyco/ionic/issues/8019) * **input:** text input width calculation ([#8063](https://github.com/driftyco/ionic/issues/8063)) ([21fa5cd](https://github.com/driftyco/ionic/commit/21fa5cd)) * **item:** regression in expandable sliding option button ([695d25c](https://github.com/driftyco/ionic/commit/695d25c)), closes [#8460](https://github.com/driftyco/ionic/issues/8460) * **item:** sliding item should not close when clicking an option button ([ec6615d](https://github.com/driftyco/ionic/commit/ec6615d)), closes [#8481](https://github.com/driftyco/ionic/issues/8481) * **item-divider:** fabs have higher z-index than item-dividers ([14e668c](https://github.com/driftyco/ionic/commit/14e668c)), closes [#8489](https://github.com/driftyco/ionic/issues/8489) * **list:** consecutive inset lists with headers ([93616c4](https://github.com/driftyco/ionic/commit/93616c4)), closes [#8412](https://github.com/driftyco/ionic/issues/8412) [#6164](https://github.com/driftyco/ionic/issues/6164) * **menu:** backdrop click without 300ms delay ([9bbe485](https://github.com/driftyco/ionic/commit/9bbe485)), closes [#6405](https://github.com/driftyco/ionic/issues/6405) * **menu:** console.debug statements are one line ([a06bd69](https://github.com/driftyco/ionic/commit/a06bd69)) * **menu:** menu's content is resized properly ([db72a7d](https://github.com/driftyco/ionic/commit/db72a7d)), closes [#8504](https://github.com/driftyco/ionic/issues/8504) * **modal:** alerts do not trigger modal lifecycle events ([e2704a4](https://github.com/driftyco/ionic/commit/e2704a4)), closes [#8616](https://github.com/driftyco/ionic/issues/8616) * **modal:** canEnter is called in modals ([a40b42c](https://github.com/driftyco/ionic/commit/a40b42c)) * **nav:** ionViewCanLeave does not break navigation ([c8954d8](https://github.com/driftyco/ionic/commit/c8954d8)), closes [#8408](https://github.com/driftyco/ionic/issues/8408) * **nav:** ionViewDidLoad is called in modals ([451ffe1](https://github.com/driftyco/ionic/commit/451ffe1)), closes [#8449](https://github.com/driftyco/ionic/issues/8449) * **nav:** push-pop pages too quickly ([9b65022](https://github.com/driftyco/ionic/commit/9b65022)), closes [#8319](https://github.com/driftyco/ionic/issues/8319) * **nav:** remove incorrectly used removeStart as a starting index in for loop. Fixes [#8442](https://github.com/driftyco/ionic/issues/8442) ([6496c7a](https://github.com/driftyco/ionic/commit/6496c7a)) * **navbar:** Don't fade out navbars. Fixes [#8060](https://github.com/driftyco/ionic/issues/8060) ([eab5726](https://github.com/driftyco/ionic/commit/eab5726)) * **popover:** flipped arrow on iOS ([#8462](https://github.com/driftyco/ionic/issues/8462)) ([c996d85](https://github.com/driftyco/ionic/commit/c996d85)) * **reorder:** not trigger click event when reordering ([9b2ae8a](https://github.com/driftyco/ionic/commit/9b2ae8a)), closes [#8362](https://github.com/driftyco/ionic/issues/8362) * **reorder:** several reorder lists in the same view ([e75d9be](https://github.com/driftyco/ionic/commit/e75d9be)) * **ripple:** always remove the activated class ([d893441](https://github.com/driftyco/ionic/commit/d893441)) * **searchbar:** autocomplete, autocorrect and type works again ([7e63650](https://github.com/driftyco/ionic/commit/7e63650)), closes [#7744](https://github.com/driftyco/ionic/issues/7744) * **searchbar:** clear button makes keyboard dismissal fail on iOS ([6aaa601](https://github.com/driftyco/ionic/commit/6aaa601)), closes [#7527](https://github.com/driftyco/ionic/issues/7527) * **searchbar:** ENTER does not clear when it is inside a form ([2e1bb4b](https://github.com/driftyco/ionic/commit/2e1bb4b)), closes [#7010](https://github.com/driftyco/ionic/issues/7010) * **segment:** add missing input ([0052480](https://github.com/driftyco/ionic/commit/0052480)), closes [#8371](https://github.com/driftyco/ionic/issues/8371) * **spinner:** add input mode fix [#8598](https://github.com/driftyco/ionic/issues/8598) ([8ee895f](https://github.com/driftyco/ionic/commit/8ee895f)) * **spinner:** works in iOS8 ([a2ffa63](https://github.com/driftyco/ionic/commit/a2ffa63)), closes [#8145](https://github.com/driftyco/ionic/issues/8145) * **tabs:** add TabHighlight to IONIC_DIRECTIVES ([ac88547](https://github.com/driftyco/ionic/commit/ac88547)), closes [#8294](https://github.com/driftyco/ionic/issues/8294) * **tabs:** remove from parent nav when destroyed ([5156917](https://github.com/driftyco/ionic/commit/5156917)) * **tap-click:** null is not an object when scrolling after focusing an input on iOS ([21eae2e](https://github.com/driftyco/ionic/commit/21eae2e)), closes [#7964](https://github.com/driftyco/ionic/issues/7964) * **transition:** ios-transition can be used in MD/WP ([fcc515f](https://github.com/driftyco/ionic/commit/fcc515f)), closes [#7171](https://github.com/driftyco/ionic/issues/7171) * **view-controller:** dismiss does not crash when called more than once ([d5f71a4](https://github.com/driftyco/ionic/commit/d5f71a4)), closes [#8395](https://github.com/driftyco/ionic/issues/8395) * **view-controller:** avoid deep copy in dismiss() that can turn into an infinite loop ([9227310](https://github.com/driftyco/ionic/commit/9227310)) * **virtual-scroll:** set this.approxItemHeight before update(true) is called first ([#8350](https://github.com/driftyco/ionic/issues/8350)) ([b16228b](https://github.com/driftyco/ionic/commit/b16228b)) ### Features * **events:** handler argument is optional in unsubscribe() ([8878e70](https://github.com/driftyco/ionic/commit/8878e70)), closes [#8235](https://github.com/driftyco/ionic/issues/8235) * **haptic:** add haptic/taptic support to toggle/range/picker ([713e2a1](https://github.com/driftyco/ionic/commit/713e2a1)) * **infinite-scroll:** it can be enabled/disabled from a ng input ([#8385](https://github.com/driftyco/ionic/issues/8385)) ([fd5cdf0](https://github.com/driftyco/ionic/commit/fd5cdf0)), closes [#8380](https://github.com/driftyco/ionic/issues/8380) ### Performance Improvements * **searchbar:** searchbar animation is disabled by default ([d03182e](https://github.com/driftyco/ionic/commit/d03182e)), closes [#6023](https://github.com/driftyco/ionic/issues/6023) <a name="2.0.0-rc.0"></a> # [2.0.0-rc.0](https://github.com/driftyco/ionic/compare/v2.0.0-beta.11...v2.0.0-rc.0) (2016-09-28) RC0 requires changes to the structure of your app. To get started updating your app see the [Steps to Upgrade](#steps-to-upgrade-to-rc0) below. * Ionic 2 API finalized for `2.0.0` release * Angular `2.0.0` final! * `ionViewCanEnter` / `ionViewCanLeave` lifecycle events * Floating Action Button (FAB) lists * Ahead of Time (AoT) compiler ready * Components can now individually set a mode, which means an app can mix and match iOS / Material Design / Windows Platform modes if that’s desired * Typescript 2.0 * `@types` support for third-party libraries * Move away from `gulp` ([ionic-gulp-tasks](https://github.com/driftyco/ionic-gulp-tasks)) to `npm scripts` ([ionic-app-scripts](https://github.com/driftyco/ionic-app-scripts)) * Use [Rollup](http://rollupjs.org) for bundling instead of `browserify` or `webpack` ### BREAKING CHANGES * Angular upgrade to [2.0.0](https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html) * [Renamed Lifecycle events](#lifecycle-events-renamed). * Storage has been removed from `ionic-angular` and placed into a separate module, `@ionic/storage`. Starters have been updated to add this, make sure to add it to your `package.json` if you’re using the storage system. See more [details here](#storage). * Nav transitions are queued. For more info on what this means for you see [this section](#nav-transitions). * Removed Tabs `preloadTabs` ability. This is no longer needed with the Ahead of Time (AoT) compiler. * Icons in buttons require an attribute on the parent button in order to style them. * Platform and mode CSS classes have been moved from the `<body>` element to the `<ion-app>` element. * Select’s `alertOptions` input has been renamed to `selectOptions`. See more [details here](#select-changes). * Colors should be passed in the `color` input on components, not added individually as an attribute on the component. See more [details here](#component-colors). * buttons: `<button>` becomes `<button ion-button>`. See more [details here](#new-behavior-of-button) and [here](#new-behavior-of-icons-in-buttons). * Head link tags for CSS files are no longer dynamically updated, but one CSS file is imported. (Future build processes will narrow down the CSS file further to only include what’s used). See more [details here](#update-css-link-tags). * The `<scroll-content>` element, which is internal to `<ion-content>`, has been renamed to `<div class="scroll-content">` since it was neither a directive nor a web component. * `<ion-fixed>` has been removed, use `<div ion-fixed>` instead. * Sass: Changes to how Sass is imported. See more [details here](#sass-import). * Typings: We have stopped using the `typings` tool and have migrated to `npm @types`. See more [details here](#typings). * Components no longer get a CSS class added based on the component class name. This should be added using the Component selector. See the [Steps to Upgrade](#steps-to-upgrade-to-rc0) for more information on this change. #### Lifecycle Events Renamed * Renamed `ionViewLoaded` to `ionViewDidLoad` * Removed `ionViewDidUnload` * Removed `fireOtherLifecycles` from `ViewController` #### Nav Transitions Nav transitions are now queued. Meaning if you run: ``` navCtrl.push(Page1); navCtrl.push(Page2); ``` `Page1` will transition in, then immediately `Page2` will transition in. There can never be two transitions happening at the same time. Page transition promises can now possibly reject the returned promises. Used mainly for `ionViewCanEnter` and `ionViewCanLeave`. #### Component Colors Colors are no longer added directly to a component, they should instead be passed in the `color` attribute. For example: ``` <ion-tabs primary> ``` Becomes ``` <ion-tabs color="primary"> ``` Or to bind an expression to color: ``` <ion-navbar [color]="barColor"> ... </ion-navbar> ``` ```ts @Component({ templateUrl: 'build/pages/about/about.html' }) export class AboutPage { barColor: string; constructor(private nav: NavController, platform: Platform) { this.barColor = platform.is('android') ? 'primary' : 'light'; } } ``` Components with this property: - Badge - Button - Checkbox - Chip - FAB - Icon - Item (Item, Item Divider, List Header) - Label - Navbar - Radio - Searchbar - Segment - Spinner - Tabs - Toggle - Toolbar - Typography (headers, paragraphs, spans, etc.) **Reason for this change:** - It was difficult to dynamically add colors to components, especially if the name of the color attribute was unknown in the template. - This change keeps the css flat since we aren’t chaining color attributes on components and instead we assign a class to the component which includes the color’s name. - This allows you to easily toggle a component between multiple colors. - Speeds up performance because we are no longer reading through all of the attributes to grab the color ones. #### Select Changes Select’s `alertOptions` input has been renamed to `selectOptions`. It now allows you to pass options for either the alert or action-sheet interface. Refer to their documentation for the options each of them accept. - [ActionSheet](http://ionicframework.com/docs/v2/api/components/action-sheet/ActionSheetController/#create) - [Alert](http://ionicframework.com/docs/v2/api/components/alert/AlertController/#create) #### New Behavior of Button - `<button>` becomes `<button ion-button>` - `<a button>` becomes `<a ion-button>` - `<button ion-item>` does not get the `ion-button` attribute - Buttons inside of `<ion-item-options>` do get the `ion-button` attribute - Removed the `category` attribute, this should be passed in `ion-button` instead. **Reason for this change:** - It was difficult to have custom buttons since buttons automatically received the Ionic styles. The user can now take advantage of adding their own styling to a button if they want it to behave differently than the Ionic button. Keeping the `<a>` and `<button>` element and adding `ion-button` as an attribute gives us the ability to take advantage of the native functionality and built-in accessibility of native elements. If Ionic provided an `<ion-button>` we’d have to copy over all the possible attributes and events to the real nested button/link (`type=submit`, `formnovalidate`, `value`, `autofocus`, `href`, `target`, `focus`/`blur`, `download`, `nofollow`, `ping`, etc). Additionally, Angular 2 does not have the "replace" directive where `<ion-button>` could be turned into `<a ion-button>`. - Since `button` was already being used as an attribute to the `<a>` element, this is more consistent between the two. - If a navPush or navPop directive is on an `<a ion-button>`, Ionic can automatically add the `href` attribute. - [A few reasons why we didn’t create `<ion-button>`](https://www.youtube.com/watch?list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g&v=CZGqnp06DnI) #### New Behavior of Icons in Buttons 1. Icon only buttons ``` <button> <ion-icon name="rainy"></ion-icon> </button> ``` becomes ``` <button ion-button icon-only> <ion-icon name="rainy"></ion-icon> </button> ``` 2. Icon left of text in a button ``` <button> <ion-icon name="rainy"></ion-icon> Rainy </button> ``` becomes ``` <button ion-button icon-left> <ion-icon name="rainy"></ion-icon> Rainy </button> ``` 3. Icon right of text in a button ``` <button> Rainy <ion-icon name="rainy"></ion-icon> </button> ``` becomes ``` <button ion-button icon-right> Rainy <ion-icon name="rainy"></ion-icon> </button> ``` 4. Item option buttons - the `icon-left` attribute should still be added to the `<ion-item-options>` container and not the button itself. 5. `menuToggle` buttons should not get the `icon-only` attribute **Reason for this change:** There was a noticeable performance decrease from us reading in each button to determine where icons were placed and how to style them. This change improves performance. This adds styling so that the buttons and icons will be padded a certain amount, but the user is free to leave these attributes off and style the components themselves. #### Update CSS Link Tags Ionic stylesheets are no longer dynamically loaded per platform. Instead there will be one CSS file to import. Note that future build processes will slim down the CSS file even further to only include component CSS actually used. In the head of your `index.html` file, replace: ``` <!-- ionic dynamically decides which stylesheet to load --> <link ios-href="build/css/app.ios.css" rel="stylesheet"> <link md-href="build/css/app.md.css" rel="stylesheet"> <link wp-href="build/css/app.wp.css" rel="stylesheet"> ``` With: ``` <link href="build/main.css" rel="stylesheet"> ``` #### Sass Import The default configuration will be updated, but if your existing app is using Sass and importing Ionic Sass files directly you’ll need to update the `includePaths` of Node Sass. ``` node_modules/ionic-angular/themes ``` Next, to include Ionic into your custom Sass file you’ll need to update the Ionic import to this: ``` @import "ionic.theme.default"; ``` #### Typings Any type definitions for third party libraries that are included via the `typings` tool and are included in the the `typings.json` file should be updated to use `npm @types`. An example of how this looks is: ``` npm install @types/lodash --save-dev --save-exact ``` Delete the `typings.json` file, and the `typings` directory. #### Storage The storage utilities have been moved outside of the framework to a separate library called `@ionic/storage`. This library can be installed by executing the following command: ``` npm install @ionic/storage --save --save-exact ``` It must be included in the app's `NgModule` list of `providers`: ``` import { Storage } from '@ionic/storage'; ... @NgModule({ ... providers: [Storage] }) ``` It can then be injected into any class that needs access to it: ``` import { Storage } from '@ionic/storage'; ... export class MyAwesomePage { constructor(public storage: Storage) { } ionViewDidEnter() { this.storage.get('myKey').then( (value:any) => { console.log('My value is:', value); }); } } ``` #### Deployment Changes `ionic-angular` package includes es5 code with es2015 module import/exports, `umd` modules, and pure `es2015` code. The `package.json` is set up using the `main` and `module` options to make this work seamlessly. ### Steps to Upgrade to RC0 We are providing 2 ways to update your app with this release: [Copying your Project to a New Project](#copying-your-project-to-a-new-project) and [Modifying your Existing Project](#modifying-your-existing-project). The first way will guide you through creating a new Ionic 2 project and copying your project files to it. This is the easiest way to update your app in our opinion. The second way will step through how to update your existing project. There are a lot of steps involved with this way, and we recommend viewing our conference app for any clarification if you choose this way. This is it! We don’t plan on making any more major API changes after this version. Note: For details on NgModules you can read the Angular docs on them [here](https://angular.io/docs/ts/latest/guide/ngmodule.html) #### Copying your Project to a New Project 1. Ensure that you're using npm version 3.x by running: ``` npm --version ``` If you are not running 3.x, the easiest way to update is to install the [latest version of Node.js](https://nodejs.org/en/). You can also update `npm` by following [these instructions](https://docs.npmjs.com/getting-started/installing-node#updating-npm). 2. Install the latest Ionic CLI: **Important:** if you have installed the `beta` cli you should run `npm uninstall -g ionic` first. You need version `2.1.0` for this release. Check your `cli` version by running `ionic -v` in the command line. ``` npm install -g ionic ``` 3. Create a new Ionic 2 RC0 app: ``` ionic start --v2 myApp ``` 4. Copy/paste all of your pages from `app/pages/` of your `beta.11` app to `src/pages/`, providers from `app/providers` to `src/providers`, pipes from `app/pipes` to `src/pipes` and any custom components to `src/components` in the new RC0 app. 5. Modify all `templateUrl`'s to be relative to the `.ts` file. For example in `app.component.ts` the url should change from `build/app.html` to `app.html` and in a page referencing `about.html` from `build/pages/about/about.html` to `about.html`. 6. Import and add each of your pages to the `declarations` array and the `entryComponents` array in `src/app/app.module.ts`. 7. Import and add each of your custom components and pipes to the `declarations` array in `src/app/app.module.ts`. 8. Import and add each of your providers to the `providers` array in `src/app/app.module.ts`. 9. Remove any use of the `providers`, `pipes` and `directives` arrays in `@Component`. 10. Change any uses of the `private` TypeScript keyword to `public` ONLY for component variables that are needed in the associated template. Note: For details as to why this change has to be made, there is a discussion about it [here](https://forum.ionicframework.com/t/rc0-typescript-private-vs-public-keyword/64863/4?u=mhartington). 11. Change `<button>` to `<button ion-button>` according to [these instructions](#new-behavior-of-button). 12. Pass colors to the `color` attribute : `<button primary>` changes to `<button color="primary">`. See [component colors](#component-colors) above. 13. Move any Ionic config to the `IonicModule.forRoot` in `app.module.ts`. For example, the config should go where it says `configObject` here: `IonicModule.forRoot(MyApp, {configObject})`. 14. Move any variables from the mode specific sass files in your `beta.11` app into the `theme/variables.scss` file under each comment section for the specific mode in the new RC0 app: [ios section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L35-L37), [md section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L42-L44), [wp section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L49-L51). 15. Add selectors to each of your components that you would like to add custom styling for. These element selectors will be used for scoped sass. Previously a CSS class was dynamically added with the component class name, this is now the proper way to scope your sass for an individual page. For example, adding the `page-about` selector: In your component's stylesheet: ``` page-about { #title { color: blue; } } ``` In your component: ``` @Component({ selector: 'page-about', templateUrl: 'about.html' }) ``` #### Modifying your Existing Project 1. Ensure that you're using npm version 3.x by running: ``` npm --version ``` If you are not running 3.x, the easiest way to update is to install the [latest version of Node.js](https://nodejs.org/en/). You can also update `npm` by following [these instructions](https://docs.npmjs.com/getting-started/installing-node#updating-npm). 2. Install the latest Ionic CLI: **Important:** if you have installed the `beta` cli you should run `npm uninstall -g ionic` first. You need version `2.1.0` for this release. Check your `cli` version by running `ionic -v` in the command line. ``` npm install -g ionic ``` 3. Update `package.json` dependencies and devDependencies to match the [ionic2-app-base package.json](https://github.com/driftyco/ionic2-app-base/blob/master/package.json#L15-L24), and then run `npm install` in your project folder. 4. Copy the `npm scripts` from the [ionic2-app-base package.json](https://github.com/driftyco/ionic2-app-base/blob/master/package.json#L6-L14) to your `package.json`. 5. Delete the `gulpfile.js`. 6. Rename the `app` folder to `src`. 7. Create a new directory called `app` inside of `src`. 8. Move the `app.html` and `app.ts` files inside of `src/app`. 9. Rename `app.ts` to `app.component.ts`. 10. Add an `app.module.ts` file and copy content from [ionic2-starter-blank](https://github.com/driftyco/ionic2-starter-blank/blob/master/src/app/app.module.ts). 11. Move any providers from `ionicBootstrap` in your `app.component.ts` file to the providers in `app.module.ts`. Make sure to copy imports, too. 12. Import and add any of your custom components to the `declarations` array in `src/app/app.module.ts`. 13. Move any Ionic config to the `IonicModule.forRoot` in `app.module.ts`. For example, the config should go where it says `configObject` here: `IonicModule.forRoot(MyApp, {configObject})`. 14. Remove the `ionicBootstrap` code from `app.component.ts`. 15. Export the main app class in `app.component.ts` and then rename all uses of `MyApp` in `app.module.ts` to your main app class (or rename the export to `MyApp` in `app.component.ts`). 16. Fix any imports in `app.component.ts` to use the correct path. For example, `./pages` becomes `../pages`. 17. Modify `app.module.ts` to import your page specific classes. See `HomePage`, for example. All pages should be included here. 18. Fix any import paths in `app.module.ts`. For example, `./providers` becomes `../providers`. 19. Add `main.dev.ts` and `main.prod.ts` files from [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/tree/master/src/app) to `app/`. 20. Move `www/index.html` to `src/index.html` and modify it to look like [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/src/index.html), make sure to keep any external scripts you have added. 21. Move `www/assets` to `src/assets`. 22. Move `www/img` to `src/assets/img`. 23. Move any other resources you have in `www/` to `src/assets/`. 24. Modify all `templateUrl`'s to be relative to the `.ts` file. For example in `app.component.ts` the url should change from `build/app.html` to `app.html` and in a page referencing `about.html` from `build/pages/about/about.html` to `about.html`. 25. Update .gitignore to match [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/.gitignore). 26. Delete the `typings/` folder and `typings.json` file. 27. Update `tsconfig.json` to match [ionic2-app-base](https://github.com/driftyco/ionic2-app-base/blob/master/tsconfig.json). 28. Rename and relocate `app/theme/app.variables.scss` to `src/theme/variables.scss`. 29. Move app Sass rule files from `app/theme` to `src/app`. This includes `app.core.scss`, `app.ios.scss`, etc. 30. Move any variables from the mode specific sass files in your `beta.11` app into the `theme/variables.scss` file under each comment section for the specific mode in the new RC0 app: [ios section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L35-L37), [md section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L42-L44), [wp section](https://github.com/driftyco/ionic2-app-base/blob/master/src/theme/variables.scss#L49-L51). 31. Fix any paths to images in your app. For example, before the path may look like `<img src="img/myImg.png">` and now it should be `<img src="assets/img/myImg.png">`. 32. Change any uses of the `private` TypeScript keyword to `public` ONLY for component variables that are needed in the associated template. Note: For details as to why this change has to be made, there is a discussion about it [here](https://forum.ionicframework.com/t/rc0-typescript-private-vs-public-keyword/64863/4?u=mhartington). 33. Change any Ionic buttons from `<button>` to `<button ion-button>`. [See New Behavior of Button](#new-behavior-of-button). 34. Pass colors to the `color` attribute: `<button primary>` changes to `<button color="primary">`. 35. Add appropriate icon attributes, if the icon is on the left of the text in a button it should get `icon-left`, if the icon is on the right add `icon-right`, and if the button only has an icon in it, add the `icon-only` attribute to the button. [See New Behavior of Icons in Buttons](#new-behavior-of-icons-in-buttons). 36. Add selectors to each of your components that you would like to add custom styling for. These element selectors will be used for scoped sass. Previously a CSS class was dynamically added with the component class name, this is now the proper way to scope your sass for an individual page. For example, adding the `page-about` selector: In your component's stylesheet: ``` page-about { #title { color: blue; } } ``` In your component: ``` @Component({ selector: 'page-about', templateUrl: 'about.html' }) ``` 37. Remove any use of the `providers`, `pipes` and `directives` arrays in `@Component`. ### Bug Fixes * **action-sheet:** add icon-left to the button if an icon exists ([a731528](https://github.com/driftyco/ionic/commit/a731528)) * **animation:** prevent possible raf null errors ([0e8ebe5](https://github.com/driftyco/ionic/commit/0e8ebe5)) * **app:** corrected paths to theme from app.scss ([001c1c9](https://github.com/driftyco/ionic/commit/001c1c9)) * **checkbox:** disabled toggle should not fire events or animate ([3324e32](https://github.com/driftyco/ionic/commit/3324e32)) * **di:** update dependency injection and default configs ([7c05d0c](https://github.com/driftyco/ionic/commit/7c05d0c)) * **exports:** update module exports ([6784f5e](https://github.com/driftyco/ionic/commit/6784f5e)) * **fab:** colors in speed dial buttons ([b70614b](https://github.com/driftyco/ionic/commit/b70614b)) * **gestures:** fixes scroll issue with hammer config ([174efc1](https://github.com/driftyco/ionic/commit/174efc1)), closes [#6897](https://github.com/driftyco/ionic/issues/6897) * **ion-fixed:** ion-fixed directive is not longer needed ([75d5526](https://github.com/driftyco/ionic/commit/75d5526)) * **item:** regression in sliding item introduced by 52ada1c ([e0c2129](https://github.com/driftyco/ionic/commit/e0c2129)) * **item:** sliding item events are zone wrapped ([47491fb](https://github.com/driftyco/ionic/commit/47491fb)), closes [#7630](https://github.com/driftyco/ionic/issues/7630) * **item:** sliding item with icon-only buttons ([1d3d5a1](https://github.com/driftyco/ionic/commit/1d3d5a1)) * **menu:** open/close race condition ([8585427](https://github.com/driftyco/ionic/commit/8585427)), closes [#7629](https://github.com/driftyco/ionic/issues/7629) [#8001](https://github.com/driftyco/ionic/issues/8001) * **nav:** move null assignment of `_onWillDismiss` ([35193c4](https://github.com/driftyco/ionic/commit/35193c4)) * **nav:** setRoot() and setPages() should not animate ([7012734](https://github.com/driftyco/ionic/commit/7012734)) * **nav:** move onWillDismiss and onDidDismiss, add unit tests ([e26c425](https://github.com/driftyco/ionic/commit/e26c425)) * **platform:** fire platform ready on app init ([963e835](https://github.com/driftyco/ionic/commit/963e835)) * **reorder:** adjust reorder icon style for iOS and MD ([f3bb2dc](https://github.com/driftyco/ionic/commit/f3bb2dc)) * **templates:** add template tabs [#8207](https://github.com/driftyco/ionic/issues/8207) ([#8208](https://github.com/driftyco/ionic/issues/8208)) ([0f6ce28](https://github.com/driftyco/ionic/commit/0f6ce28)) * **urlSerializer:** improve findLinkByComponentData ([9d563f5](https://github.com/driftyco/ionic/commit/9d563f5)) ### Code Refactoring * **button:** add ion-button attribute and icon attributes to style buttons ([938864e](https://github.com/driftyco/ionic/commit/938864e)), closes [#7466](https://github.com/driftyco/ionic/issues/7466) * **colors:** color should be added as an input instead of directly adding the color to the component ([55a0257](https://github.com/driftyco/ionic/commit/55a0257)), closes [#7087](https://github.com/driftyco/ionic/issues/7087) [#7401](https://github.com/driftyco/ionic/issues/7401) [#7523](https://github.com/driftyco/ionic/issues/7523) * **select:** rename alertOptions to selectOptions, add ability to pass them for action-sheet ([b8285b7](https://github.com/driftyco/ionic/commit/b8285b7)), closes [#7764](https://github.com/driftyco/ionic/issues/7764) ### Features * **action-sheet:** add ability to pass multiple classes to cssClass ([68ab261](https://github.com/driftyco/ionic/commit/68ab261)) * **chips:** added Chip component ([421f637](https://github.com/driftyco/ionic/commit/421f637)) * **chips:** finished Component ([0dece72](https://github.com/driftyco/ionic/commit/0dece72)) * **fab:** update floating action buttons ([490a06d](https://github.com/driftyco/ionic/commit/490a06d)) * **reorder:** animate reorder button ([1f78487](https://github.com/driftyco/ionic/commit/1f78487)) * **loading:** add ability to pass multiple classes to cssClass ([466dea3](https://github.com/driftyco/ionic/commit/466dea3)) * **loading:** add setContent function ([c750847](https://github.com/driftyco/ionic/commit/c750847)) * add polyfill task ([ce78194](https://github.com/driftyco/ionic/commit/ce78194)) * **nav:** component url navigation ([f477aa2](https://github.com/driftyco/ionic/commit/f477aa2)) * **nav:** set default stack history on app init ([ca8cc0a](https://github.com/driftyco/ionic/commit/ca8cc0a)) * **polyfills:** split up code and source polyfill task ([#8130](https://github.com/driftyco/ionic/issues/8130)) ([bcec66c](https://github.com/driftyco/ionic/commit/bcec66c)) * **popover:** add ability to pass multiple classes to cssClass ([a685cdc](https://github.com/driftyco/ionic/commit/a685cdc)) * **toast:** add ability to pass multiple classes to cssClass ([79e25a3](https://github.com/driftyco/ionic/commit/79e25a3)) ### Performance Improvements * **item:** apply will-change only when list is active ([4bcd815](https://github.com/driftyco/ionic/commit/4bcd815)) * **reorder:** reorder icon is display: none by default ([26441ec](https://github.com/driftyco/ionic/commit/26441ec)) * **ripple:** md ripple effect update to not affect layout ([14a3ea2](https://github.com/driftyco/ionic/commit/14a3ea2)) <a name="2.0.0-beta.11"></a> # [2.0.0-beta.11](https://github.com/driftyco/ionic/compare/v2.0.0-beta.10...v2.0.0-beta.11) (2016-08-05) ### BREAKING CHANGES - Angular2 has been updated to [RC4](https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc4-2016-06-30). - ViewController’s `onDismiss` has been renamed to `onDidDismiss` - Forms have been upgraded to `@angular/forms` - [Angular2 Forms Changes](https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub). - [Overlay components](#overlays) should now be created with their injected provider. - The [Select Options](#select--option-7334) `checked` attribute has been renamed to `selected`. - [Tab’s input and config variables](#tab-inputconfig-7143) have been renamed. - [Material Design tabs](#material-design-tabs-7455) have been updated to resemble Material Design’s bottom navigation spec: https://material.google.com/components/bottom-navigation.html - [Input highlight](#input-highlight-6449) was added as an option for `ios` and `wp` mode, but defaults to false. - Please review the [Steps to Upgrade](#steps-to-upgrade-to-beta-11) below. #### Overlays - Overlay components, such as Alert or Modals, should now be created using its injected provider. - Overlays now have the `present()` method on the overlay’s instance, rather than using `nav.present(overlayInstance)`. - All overlays now present on top of all app content, to include menus. - Below is an example of the change to `Alert`, but the pattern is the same for all overlays: ActionSheet, Loading, Modal, Picker, Popover, Toast WAS: ``` import { NavController, Alert } from ‘ionic-angular’; constructor(public nav: NavController) { } doAlert() { let alert = Alert.create({ title: 'Alert', }); this.nav.present(alert); } ``` NOW: ``` import { AlertController } from ‘ionic-angular’; constructor(public alertCtrl: AlertController) { } doAlert() { let alert = this.alertCtrl.create({ title: 'Alert' }); alert.present(); } ``` #### Select / Option [#7334](https://github.com/driftyco/ionic/issues/7334) The Option component’s `checked` attribute has been renamed to `selected` in order to make an option selected. This follows the MDN spec for a select option: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option If a `ngModel` is added to the Select component the value of the `ngModel` will take precedence over the `selected` attribute. See the [Select](http://ionicframework.com/docs/v2/api/components/select/Select/) and [Option](http://ionicframework.com/docs/v2/api/components/option/Option/) documentation for usage examples. #### Tab Input/Config [#7143](https://github.com/driftyco/ionic/issues/7143) Tab input/config options have been renamed. The following options were renamed: - `tabbarHighlight` -> `tabsHighlight` - `tabbarLayout` -> `tabsLayout` - `tabSubPages` -> `tabsHideOnSubPages` - `tabbarPlacement` -> `tabsPlacement` The previous names have been deprecated. They will still work in the current release but will be removed in the future so please update to the new names. #### Material Design Tabs [#7455](https://github.com/driftyco/ionic/issues/7455) Material Design mode defaults have changed to the following: ``` tabsHighlight: false, tabsPlacement: 'bottom', tabsHideOnSubPages: false ``` `tabsHighlight` can now be passed as an attribute on the `ion-tabs` element, this allows for tabs to be added in multiple places inside of an app and enable the highlight on some of them. Styling of the Material Design tabs reflects the spec for bottom navigation: https://material.google.com/components/bottom-navigation.html To get the old style of tabs, override the config in your bootstrap, for example: ``` ionicBootstrap(ConferenceApp, [ConferenceData, UserData], { platforms: { android: { tabsPlacement: 'top', tabsHideOnSubPages: true, tabsHighlight: true } } }); ``` And optionally override any of the Sass variables for `md` mode in `theme/app.md.scss`: ``` $tabs-md-tab-text-capitalization: uppercase; $tabs-md-tab-font-weight: 500; $tabs-md-tab-text-transform: scale(1); ``` For a searchable list of all of the Sass variables, see the theming documentation: http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/ #### Input Highlight [#6449](https://github.com/driftyco/ionic/issues/6449) Fixed typos in the input highlight variables: - `$text-input-md-hightlight-color-valid` -> `$text-input-md-highlight-color-valid` - `$text-input-wp-hightlight-color-valid` -> `$text-input-wp-highlight-color-valid` Modified variables to turn on/off the highlight: ios (defaults to false for all): ``` $text-input-ios-show-focus-highlight: false !default; $text-input-ios-show-valid-highlight: $text-input-ios-show-focus-highlight !default; $text-input-ios-show-invalid-highlight: $text-input-ios-show-focus-highlight !default; ``` md (defaults to true for all): ``` $text-input-md-show-focus-highlight: true !default; $text-input-md-show-valid-highlight: $text-input-md-show-focus-highlight !default; $text-input-md-show-invalid-highlight: $text-input-md-show-focus-highlight !default; ``` wp (defaults to true for all): ``` $text-input-wp-show-focus-highlight: true !default; $text-input-wp-show-valid-highlight: $text-input-wp-show-focus-highlight !default; $text-input-wp-show-invalid-highlight: $text-input-wp-show-focus-highlight !default; ``` #### Steps to Upgrade to Beta 11 1. Run the following command in a terminal to update the npm dependencies: ``` npm install --save --save-exact [email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] [email protected] [email protected] ``` 2. Update all Overlay components to be presented by their controller instead of `NavController`. For example, to update the popover component, the following code: ``` constructor(private nav: NavController) {} presentPopover(event) { let popover = Popover.create(PopoverPage); this.nav.present(popover, { ev: event }); } ``` becomes: ``` constructor(private popoverCtrl: PopoverController) {} presentPopover(event) { let popover = this.popoverCtrl.create(PopoverPage); popover.present({ ev: event }); } ``` 3. Update any uses of `ViewController.onDismiss` to `ViewController.onDidDismiss`. The following code on dismiss of a modal: ``` modal.onDismiss(() => { }); ``` becomes: ``` modal.onDidDismiss(() => { }); ``` 4. Update any uses of `checked` on an `<ion-option>` to use `selected`. 5. If you are using any of the tab config variables, update them to reflect the new names [above](#tab-inputconfig-7143). 6. If you are using any of the Sass Variables to override [tabs](#material-design-tabs-7455) or [input highlights](#input-highlight-6449), update them to reflect the new names above. 7. Please see the [Ionic Conference App](https://github.com/driftyco/ionic-conference-app) for an example of upgrading to Beta 11. ### Bug Fixes * **activator:** do not activate elements while scrolling ([845a516](https://github.com/driftyco/ionic/commit/845a516)), closes [#7141](https://github.com/driftyco/ionic/issues/7141) * **animation:** ele as string selector ([9fa31a1](https://github.com/driftyco/ionic/commit/9fa31a1)) * **animation:** fix easing timing function ([0cb093e](https://github.com/driftyco/ionic/commit/0cb093e)), closes [#7130](https://github.com/driftyco/ionic/issues/7130) * **app:** add status bar padding when tab subpages are hidden ([d01ee4b](https://github.com/driftyco/ionic/commit/d01ee4b)), closes [#7203](https://github.com/driftyco/ionic/issues/7203) * **backdrop:** flicker in UIWebView ([44ab527](https://github.com/driftyco/ionic/commit/44ab527)) * **backdrop:** use raf when adding/removing disable-scroll css ([941cb1d](https://github.com/driftyco/ionic/commit/941cb1d)) * **bootstrap:** return promise and resolve ionicBootstrap ([aebdf2f](https://github.com/driftyco/ionic/commit/aebdf2f)), closes [#7145](https://github.com/driftyco/ionic/issues/7145) * **bootstrap:** tapclick is injected, probably ([7358072](https://github.com/driftyco/ionic/commit/7358072)) * **button:** apply css for buttons w/ ngIf ([816a648](https://github.com/driftyco/ionic/commit/816a648)), closes [#5927](https://github.com/driftyco/ionic/issues/5927) * **button:** outline buttons do not have hairline borders in iOS ([4e88f89](https://github.com/driftyco/ionic/commit/4e88f89)) * **datetime:** format seconds token ([4fff262](https://github.com/driftyco/ionic/commit/4fff262)), closes [#6951](https://github.com/driftyco/ionic/issues/6951) * **datetime-util:** fix convertDataToISO to handle negative timezone offsets ([ba53a23](https://github.com/driftyco/ionic/commit/ba53a23)) * **generator:** change nav to navCtrl ([b19547c](https://github.com/driftyco/ionic/commit/b19547c)) * **gestures:** detecting swipe angle correctly + sliding item logic fix ([d230cb4](https://github.com/driftyco/ionic/commit/d230cb4)) * **input:** add input highlight for ios, fix the highlight size ([11a24b9](https://github.com/driftyco/ionic/commit/11a24b9)), closes [#6449](https://github.com/driftyco/ionic/issues/6449) * **item:** sliding item is closed when tapped ([7aa559a](https://github.com/driftyco/ionic/commit/7aa559a)), closes [#7094](https://github.com/driftyco/ionic/issues/7094) * **loading:** clear timeout if dismissed before timeout fires ([5bbe31a](https://github.com/driftyco/ionic/commit/5bbe31a)) * **loading:** fix loading overlay during app init ([b615c60](https://github.com/driftyco/ionic/commit/b615c60)), closes [#6209](https://github.com/driftyco/ionic/issues/6209) * **menu:** add statusbarPadding to the header and content in a menu ([a468fde](https://github.com/driftyco/ionic/commit/a468fde)), closes [#7385](https://github.com/driftyco/ionic/issues/7385) * **menu:** fix content going under header ([3cd31c3](https://github.com/driftyco/ionic/commit/3cd31c3)), closes [#7084](https://github.com/driftyco/ionic/issues/7084) * **menu:** getBackdropElement ([cac1d4f](https://github.com/driftyco/ionic/commit/cac1d4f)) * **menu:** only one menu can be opened at a time ([cac378f](https://github.com/driftyco/ionic/commit/cac378f)), closes [#6826](https://github.com/driftyco/ionic/issues/6826) * **menu:** swipe menu is triggered when the swipe |angle| < 40º ([32a70a6](https://github.com/driftyco/ionic/commit/32a70a6)) * **nav:** fire lifecycle events from app root portal ([a4e393b](https://github.com/driftyco/ionic/commit/a4e393b)) * **nav:** fix menuCtrl reference in swipe back ([55a5e83](https://github.com/driftyco/ionic/commit/55a5e83)) * **nav:** register child nav when created from modal ([61a8625](https://github.com/driftyco/ionic/commit/61a8625)) * **picker:** fix iOS 8 picker display ([86fd8a4](https://github.com/driftyco/ionic/commit/86fd8a4)), closes [#7319](https://github.com/driftyco/ionic/issues/7319) * **popover:** remove min-height from ios, add sass variables ([55bc32d](https://github.com/driftyco/ionic/commit/55bc32d)), closes [#7215](https://github.com/driftyco/ionic/issues/7215) * **range:** add mouse listeners to document ([267ced6](https://github.com/driftyco/ionic/commit/267ced6)) * **range:** align the label in an item range to the center ([d675d39](https://github.com/driftyco/ionic/commit/d675d39)), closes [#7046](https://github.com/driftyco/ionic/issues/7046) * **range:** ion-label stacked with ion-range ([5a8fe82](https://github.com/driftyco/ionic/commit/5a8fe82)), closes [#7046](https://github.com/driftyco/ionic/issues/7046) * **range:** set ticks to an empty array to prevent errors ([7a2ad99](https://github.com/driftyco/ionic/commit/7a2ad99)) * **reorder:** better style ([f289ac6](https://github.com/driftyco/ionic/commit/f289ac6)) * **reorder:** canceled reorder is animated smoothly back ([8483a43](https://github.com/driftyco/ionic/commit/8483a43)) * **reorder:** non ion-item elements can be reordered ([ea9dd02](https://github.com/driftyco/ionic/commit/ea9dd02)), closes [#7339](https://github.com/driftyco/ionic/issues/7339) * **reorder:** reorder can be used with any element ([d993a1b](https://github.com/driftyco/ionic/commit/d993a1b)) * **scroll:** fix scrolling after switching tabs ([e4bbcc6](https://github.com/driftyco/ionic/commit/e4bbcc6)), closes [#7154](https://github.com/driftyco/ionic/issues/7154) * **select:** add the cssClass passed by the user to the alert for a select ([81ddd7f](https://github.com/driftyco/ionic/commit/81ddd7f)), closes [#6835](https://github.com/driftyco/ionic/issues/6835) * **slides:** delay loading slides until view ready ([580b8d5](https://github.com/driftyco/ionic/commit/580b8d5)), closes [#7089](https://github.com/driftyco/ionic/issues/7089) * **sliding:** much better UX + performance ([d6f62bc](https://github.com/driftyco/ionic/commit/d6f62bc)), closes [#6913](https://github.com/driftyco/ionic/issues/6913) [#6958](https://github.com/driftyco/ionic/issues/6958) * **tabs:** add sass variable for inactive opacity and pass it to the colors loop ([99efa36](https://github.com/driftyco/ionic/commit/99efa36)) * **tabs:** center tabbar content ([997d54e](https://github.com/driftyco/ionic/commit/997d54e)) * **tabs:** fix preloadTabs null element reference ([2d19308](https://github.com/driftyco/ionic/commit/2d19308)), closes [#7109](https://github.com/driftyco/ionic/issues/7109) * **tabs:** make the text color opaque instead of the entire button ([dd969a2](https://github.com/driftyco/ionic/commit/dd969a2)), closes [#6638](https://github.com/driftyco/ionic/issues/6638) * **util:** UIEventManager should handle touchcancel event ([b805602](https://github.com/driftyco/ionic/commit/b805602)) ### Features * **alert:** allow smooth overflow scrolling ([5542a93](https://github.com/driftyco/ionic/commit/5542a93)) * **content:** add a resize function to recalculate the content size ([1fe1c1e](https://github.com/driftyco/ionic/commit/1fe1c1e)) * **footer:** apply shadow on MD footer and tabbar bottom ([686c262](https://github.com/driftyco/ionic/commit/686c262)) * **gesture:** Introducing new gesture controller ([9f19023](https://github.com/driftyco/ionic/commit/9f19023)) * **gesture-controller:** disable/enable scrolling ([72c24bc](https://github.com/driftyco/ionic/commit/72c24bc)) * **header:** apply shadow on MD headers ([6fa2faf](https://github.com/driftyco/ionic/commit/6fa2faf)) * **ion-content:** iOS only scroll bounce ([5c80445](https://github.com/driftyco/ionic/commit/5c80445)) * **select:** add disabled status in select options ([76619cf](https://github.com/driftyco/ionic/commit/76619cf)) * **tabs:** apply shadow on MD tabbar top ([1f4b3e2](https://github.com/driftyco/ionic/commit/1f4b3e2)) * **tabs:** add the transition for material design tabs ([eea7e6b](https://github.com/driftyco/ionic/commit/eea7e6b)) * **toolbar:** add attributes to hide all borders and box shadows ([88b637b](https://github.com/driftyco/ionic/commit/88b637b)), closes [#7237](https://github.com/driftyco/ionic/issues/7237) * **viewcontroller:** add onWillDismiss callback ([ec99bfd](https://github.com/driftyco/ionic/commit/ec99bfd)), closes [#6702](https://github.com/driftyco/ionic/issues/6702) ### Performance Improvements * **animation:** using will-change when using progressStep() ([267aa32](https://github.com/driftyco/ionic/commit/267aa32)) * **menu:** several improvements ([86c5aaf](https://github.com/driftyco/ionic/commit/86c5aaf)) <a name="2.0.0-beta.10"></a> # [2.0.0-beta.10](https://github.com/driftyco/ionic/compare/v2.0.0-beta.9...v2.0.0-beta.10) (2016-06-27) ### BREAKING CHANGES - `ion-content` now takes up 100% of the viewport height, but it has margin added to the top and bottom to adjust for headers, footers, and tabs. - `ion-content` now accepts `fullscreen` as an attribute to to tell the content to scroll behind the header. This allows for transparent toolbars and tab pages without navbars! - `ion-navbar` no longer has the `*navbar` attribute. - `ion-navbar` should now be wrapped in an `ion-header` ``` <ion-header> <ion-navbar></ion-navbar> </ion-header> ``` - `ios` only: `ion-toolbar`/`ion-navbar` will always have borders to both the top and bottom of the element. Use the attributes `no-border-top` and `no-border-bottom` to remove the respective borders. - An `ion-nav` or `ion-tabs` is required in the root component. If one of these does not exist your content may be pushed up behind your header. - The `position` attribute has been removed from the `ion-toolbar`, it should now be placed in an `ion-header` or an `ion-footer`. It can also be placed inside of an `ion-content`. - The only elements that should be children of a page are `ion-header`, `ion-content`, and `ion-footer`. #### Steps to Upgrade to Beta 10 1. Run the following command from your command prompt/terminal to update to the latest version of the Ionic framework 2: ``` npm install --save [email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected] ``` 2. Remove the `*navbar` attribute so this: ``` <ion-navbar *navbar> ``` becomes this: ``` <ion-navbar> ``` 3. Wrap any toolbars/navbars above the `ion-content` in an `ion-header`. The following: ``` <ion-navbar> <ion-title> Navbar Title </ion-title> </ion-navbar> <ion-toolbar> <ion-title> Toolbar Title </ion-title> </ion-toolbar> <ion-content> </ion-content> ``` becomes: ``` <ion-header> <ion-navbar> <ion-title> Navbar Title </ion-title> </ion-navbar> <ion-toolbar> <ion-title> Toolbar Title </ion-title> </ion-toolbar> </ion-header> <ion-content> </ion-content> ``` 4. Wrap any toolbars/navbars after the `ion-content` in an `ion-footer`. The following: ``` <ion-content> </ion-content> <ion-toolbar position="bottom"> <ion-title>Footer Toolbar</ion-title> </ion-toolbar> ``` becomes: ``` <ion-content> </ion-content> <ion-footer> <ion-toolbar> <ion-title>Footer Toolbar</ion-title> </ion-toolbar> </ion-footer> ``` ### Bug Fixes * **animation:** correctly apply will-change: transform ([a1223da](https://github.com/driftyco/ionic/commit/a1223da)) * **bootstrap:** only add customProviders when present ([0e9e85c](https://github.com/driftyco/ionic/commit/0e9e85c)) * **content:** adjust footer bottom based on the tabbar without padding ([4567de2](https://github.com/driftyco/ionic/commit/4567de2)) * **content:** set footer height to 0 so it won't be undefined ([3db67f9](https://github.com/driftyco/ionic/commit/3db67f9)) * **cordova:** fix the status bar padding with the new structure ([15642e4](https://github.com/driftyco/ionic/commit/15642e4)) * **demos:** updates @angular paths ([b7826ba](https://github.com/driftyco/ionic/commit/b7826ba)) * **footer:** show footer toolbar w/ tabbar bottom ([99c50a1](https://github.com/driftyco/ionic/commit/99c50a1)) * **generator:** fix closing tag for header ([47e09a1](https://github.com/driftyco/ionic/commit/47e09a1)) * **header:** optional ViewController injection ([5a85d82](https://github.com/driftyco/ionic/commit/5a85d82)) * **input:** allow button click when input has focus ([ae86ab8](https://github.com/driftyco/ionic/commit/ae86ab8)), closes [#6514](https://github.com/driftyco/ionic/issues/6514) [#6944](https://github.com/driftyco/ionic/issues/6944) * **input:** check if there is a value when setting value ([d0b1930](https://github.com/driftyco/ionic/commit/d0b1930)) * **input:** fix the clear input button to always be vertically aligned ([e4cc672](https://github.com/driftyco/ionic/commit/e4cc672)) * **item:** inherit overflow and text-overflow from the parent item in a paragraph ([4009575](https://github.com/driftyco/ionic/commit/4009575)) * **item:** listEle does not longer exist ([22fad4c](https://github.com/driftyco/ionic/commit/22fad4c)) * **item:** sliding item works with and without borders ([2303c16](https://github.com/driftyco/ionic/commit/2303c16)), closes [#7081](https://github.com/driftyco/ionic/issues/7081) * **item:** sliding items don't fire (click) when swiped ([38ab17b](https://github.com/driftyco/ionic/commit/38ab17b)) * **modal:** add class name to modal ([6e34739](https://github.com/driftyco/ionic/commit/6e34739)), closes [#7000](https://github.com/driftyco/ionic/issues/7000) * **nav:** auto set iOS black transition bg via css ([7842991](https://github.com/driftyco/ionic/commit/7842991)) * **picker:** adds align to the PickerColumn interface ([b8551de](https://github.com/driftyco/ionic/commit/b8551de)) * **refresher:** adjust location after layout updates ([603000f](https://github.com/driftyco/ionic/commit/603000f)) * **refresher:** only listen for mousemove/touchmove when needed ([1a58a41](https://github.com/driftyco/ionic/commit/1a58a41)) * **tabs:** don't add outline to the class name if it is a logo icon ([af22287](https://github.com/driftyco/ionic/commit/af22287)), closes [#6899](https://github.com/driftyco/ionic/issues/6899) * **tabs:** fix tabs rootNav ([ae40edf](https://github.com/driftyco/ionic/commit/ae40edf)) * **tabs:** hide tab's navbar when a page comes without a navbar ([2d68089](https://github.com/driftyco/ionic/commit/2d68089)), closes [#5556](https://github.com/driftyco/ionic/issues/5556) * **tabs:** reference parent instead of parentTabs ([ed6d0fa](https://github.com/driftyco/ionic/commit/ed6d0fa)) * **tabs:** swipeBackEnabled works with tabs as expected ([2bff535](https://github.com/driftyco/ionic/commit/2bff535)) * **toggle:** host listeners are not longer needed ([4aa322d](https://github.com/driftyco/ionic/commit/4aa322d)) * **toolbar:** place iOS border on ion-header/footer ([48c1ffd](https://github.com/driftyco/ionic/commit/48c1ffd)) * **toolbar:** position toolbar relative and add z-index ([1d8ba4a](https://github.com/driftyco/ionic/commit/1d8ba4a)) * **virtualScroll:** first node should use clientTop/clientLeft ([2197d49](https://github.com/driftyco/ionic/commit/2197d49)) ### Features * **feature-detect:** detect if backdrop-filter is supported ([89564f1](https://github.com/driftyco/ionic/commit/89564f1)) * **fullscreen:** add fullscreen property to ion-content ([f20c7e4](https://github.com/driftyco/ionic/commit/f20c7e4)) * **item:** sliding items work with list reorder ([bfdc898](https://github.com/driftyco/ionic/commit/bfdc898)) * **list:** add list headers and item dividers as items ([712ff81](https://github.com/driftyco/ionic/commit/712ff81)), closes [#5561](https://github.com/driftyco/ionic/issues/5561) * **list:** reorder list items ([5c38921](https://github.com/driftyco/ionic/commit/5c38921)) * **range:** add debounce input for ionChange event ([55eccb3](https://github.com/driftyco/ionic/commit/55eccb3)), closes [#6894](https://github.com/driftyco/ionic/issues/6894) * **toolbar:** control toolbar borders on top/bottom ([3a7addf](https://github.com/driftyco/ionic/commit/3a7addf)) ### Performance Improvements * **reorder:** hit test refactored ([6a52a4a](https://github.com/driftyco/ionic/commit/6a52a4a)) <a name="2.0.0-beta.9"></a> # [2.0.0-beta.9](https://github.com/driftyco/ionic/compare/v2.0.0-beta.8...v2.0.0-beta.9) (2016-06-16) ### BREAKING CHANGES #### Searchbar Refactored - Searchbar's events no longer emit the Searchbar itself, they now emit the input's `$event` for each native input event. Instead of grabbing the value from the searchbar, you should grab it from the event target. For example: Previously when an event was called the function called would look similar to this: ``` getItems(searchbar) { // set q to the value of the searchbar input var q = searchbar.value; } ``` Now it should be similar to this: ``` getItems(ev) { // set q to the value of the searchbar input var q = ev.target.value; } ``` - `ngModel` is no longer required on Searchbar, but it can still be used. You can get the value of the input through Searchbar's [Output Events](http://ionicframework.com/docs/v2/api/components/searchbar/Searchbar/#output-events). - Added the ability to pass `autocomplete`, `autocorrect`, `spellcheck`, and `type` to the searchbar which is passed to the input. - The `hideCancelButton` attribute was removed in favor of `showCancelButton` which is set to `false` by default. ### Features * **backButton:** register back button actions ([84f37cf](https://github.com/driftyco/ionic/commit/84f37cf)) * **item:** add the ability to show a forward arrow on md and wp modes ([c41f24d](https://github.com/driftyco/ionic/commit/c41f24d)) * **item:** two-way sliding of items ([c28aa53](https://github.com/driftyco/ionic/commit/c28aa53)), closes [#5073](https://github.com/driftyco/ionic/issues/5073) * **item-sliding:** two-way item sliding gestures ([5d873ff](https://github.com/driftyco/ionic/commit/5d873ff)) * **modal:** background click and escape key dismiss (#6831) ([e5473b6](https://github.com/driftyco/ionic/commit/e5473b6)), closes [#6738](https://github.com/driftyco/ionic/issues/6738) * **navPop:** add nav pop method on the app instance ([9f293e8](https://github.com/driftyco/ionic/commit/9f293e8)) * **popover:** background dismiss, escape dismiss ([1d78f78](https://github.com/driftyco/ionic/commit/1d78f78)), closes [#6817](https://github.com/driftyco/ionic/issues/6817) * **range:** range can be disabled ([ccd926b](https://github.com/driftyco/ionic/commit/ccd926b)) * **select:** add placeholder as an input for select ([461ba11](https://github.com/driftyco/ionic/commit/461ba11)), closes [#6862](https://github.com/driftyco/ionic/issues/6862) * **tabs:** track tab selecting history, create previousTab() method ([d98f3c9](https://github.com/driftyco/ionic/commit/d98f3c9)) ### Bug Fixes * **button:** check for icon and add css after content checked ([f7b2ea2](https://github.com/driftyco/ionic/commit/f7b2ea2)), closes [#6662](https://github.com/driftyco/ionic/issues/6662) * **click-block:** click block is now showing on all screns. ([761a1f6](https://github.com/driftyco/ionic/commit/761a1f6)) * **click-block:** fix for the click block logic ([9b78aeb](https://github.com/driftyco/ionic/commit/9b78aeb)) * **datetime:** add styling for datetime with different labels ([adcd2fc](https://github.com/driftyco/ionic/commit/adcd2fc)), closes [#6764](https://github.com/driftyco/ionic/issues/6764) * **decorators:** change to match angular style guide ([9315c68](https://github.com/driftyco/ionic/commit/9315c68)) * **item:** change ion-item-swiping to use .item-wrapper css instead ([31f62e7](https://github.com/driftyco/ionic/commit/31f62e7)) * **item:** encode hex value in the detail arrow so it works on firefox ([03986d4](https://github.com/driftyco/ionic/commit/03986d4)), closes [#6830](https://github.com/driftyco/ionic/issues/6830) * **item:** improve open/close logic, update demos ([db9fa7e](https://github.com/driftyco/ionic/commit/db9fa7e)) * **item:** item-options width calculated correctly ([64af0c8](https://github.com/driftyco/ionic/commit/64af0c8)) * **item:** sliding item supports dynamic options + tests ([14d29e6](https://github.com/driftyco/ionic/commit/14d29e6)), closes [#5192](https://github.com/driftyco/ionic/issues/5192) * **item:** sliding item's width must be 100% ([efcdd20](https://github.com/driftyco/ionic/commit/efcdd20)) * **menu:** push/overlay working correctly in landscape ([0c88589](https://github.com/driftyco/ionic/commit/0c88589)) * **menu:** swiping menu distinguishes between opening and closing direction ([29791f8](https://github.com/driftyco/ionic/commit/29791f8)), closes [#5511](https://github.com/driftyco/ionic/issues/5511) * **Menu:** fix right overlay menu when rotating device ([07d55c5](https://github.com/driftyco/ionic/commit/07d55c5)) * **modal:** add status bar padding to modal ([181129b](https://github.com/driftyco/ionic/commit/181129b)) * **modal:** change modal display so you can scroll the entire height ([01bbc94](https://github.com/driftyco/ionic/commit/01bbc94)), closes [#6839](https://github.com/driftyco/ionic/issues/6839) * **navigation:** keep the click block up longer if the keyboard is open (#6884) ([d6b7d5d](https://github.com/driftyco/ionic/commit/d6b7d5d)) * **popover:** allow target element to be positioned at left:0 ([ea450d4](https://github.com/driftyco/ionic/commit/ea450d4)), closes [#6896](https://github.com/driftyco/ionic/issues/6896) * **popover:** hide arrow if no event was passed ([8350df0](https://github.com/driftyco/ionic/commit/8350df0)), closes [#6796](https://github.com/driftyco/ionic/issues/6796) * **range:** bar height for ios should be 1px, add disabled for wp ([f2a9f2d](https://github.com/driftyco/ionic/commit/f2a9f2d)) * **range:** stop sliding after releasing mouse outside the window ([9b2e934](https://github.com/driftyco/ionic/commit/9b2e934)), closes [#6802](https://github.com/driftyco/ionic/issues/6802) * **scrollView:** ensure scroll element exists for event listeners ([1188730](https://github.com/driftyco/ionic/commit/1188730)) * **searchbar:** add opacity so the searchbar doesn't show when it's moved over ([b5f93f9](https://github.com/driftyco/ionic/commit/b5f93f9)) * **searchbar:** only trigger the input event on clear if there is a value ([99fdcc0](https://github.com/driftyco/ionic/commit/99fdcc0)), closes [#6382](https://github.com/driftyco/ionic/issues/6382) * **searchbar:** position elements when the value changes not after content checked ([31c7e59](https://github.com/driftyco/ionic/commit/31c7e59)) * **searchbar:** set a negative tabindex for the cancel button ([614ace4](https://github.com/driftyco/ionic/commit/614ace4)) * **searchbar:** use the contrast color for the background in a toolbar ([b4028c6](https://github.com/driftyco/ionic/commit/b4028c6)), closes [#6379](https://github.com/driftyco/ionic/issues/6379) * **tabs:** reduce padding on tabs for ios ([fd9cdc7](https://github.com/driftyco/ionic/commit/fd9cdc7)), closes [#6679](https://github.com/driftyco/ionic/issues/6679) * **tap:** export isActivatable as a const so its transpiled correctly ([ce3da97](https://github.com/driftyco/ionic/commit/ce3da97)) * **toast:** close toasts when two or more are open (#6814) ([8ff2476](https://github.com/driftyco/ionic/commit/8ff2476)), closes [(#6814](https://github.com/(/issues/6814) * **toast:** toast will now be enabled (#6904) ([c068828](https://github.com/driftyco/ionic/commit/c068828)) * **virtualScroll:** detect changes in individual nodes ([f049521](https://github.com/driftyco/ionic/commit/f049521)), closes [#6137](https://github.com/driftyco/ionic/issues/6137) ### Performance Improvements * **virtualScroll:** improve UIWebView virtual scroll ([ff1daa6](https://github.com/driftyco/ionic/commit/ff1daa6)) <a name="2.0.0-beta.8"></a> # [2.0.0-beta.8](https://github.com/driftyco/ionic/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2016-06-06) ### BREAKING CHANGES #### Ionic Decorators Removed We’ve started the process of optimizing Ionic 2 to improve our support for Progressive Web Apps and upcoming Angular tooling. Because of this, we have removed the Ionic decorators in favor of using Angular's `Component` decorator. The following changes need to be made. For a step by step guide, see the [Steps to Upgrade to Beta 8 section](https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#steps-to-upgrade-to-beta-8). - `@App` and `@Page` should be replaced with `@Component`. - `IonicApp` has been renamed to `App`. - `ionicBootstrap` is required to bootstrap the app. - Config is now the 3rd parameter in `ionicBootstrap(rootComponent, providers, config)`. - Property `prodMode` is now a config option, enabling or disabling production mode. #### Ionic Lifecycle Events Renamed All Ionic lifecycle events have been renamed from starting with `onPage` to starting with `ionView`. These changes were made to make it more clear that the events belong to Ionic on each view. - `onPageLoaded` renamed to `ionViewLoaded` - `onPageWillEnter` renamed to `ionViewWillEnter` - `onPageDidEnter` renamed to `ionViewDidEnter` - `onPageWillLeave` renamed to `ionViewWillLeave` - `onPageDidLeave` renamed to `ionViewDidLeave` - `onPageWillUnload` renamed to `ionViewWillUnload` - `onPageDidUnload` renamed to `ionViewDidUnload` #### Ionic Component Events Renamed All Ionic component events have been renamed to start with `ion`. This is to prevent the Ionic events from clashing with native HTML events. - **Checkbox** - `change` -> `ionChange` - **DateTime** - `change` -> `ionChange` - `cancel` -> `ionCancel` - **InfiniteScroll** - `infinite` -> `ionInfinite` - **Menu** - `opening` -> `ionDrag` - `opened` -> `ionOpen` - `closed` -> `ionClose` - **Option** - `select` -> `ionSelect` - **Picker** - `change` -> `ionChange` - **RadioButton** - `select` -> `ionSelect` - **RadioGroup** - `change` -> `ionChange` - **Refresher** - `refresh` -> `ionRefresh` - `pulling` -> `ionPull` - `start` -> `ionStart` - **Searchbar** - `input` -> `ionInput` - `blur` -> `ionBlur` - `focus` -> `ionFocus` - `cancel` -> `ionCancel` - `clear` -> `ionClear` - **Segment** - `change` -> `ionChange` - `select` -> `ionSelect` - **Select** - `change` -> `ionChange` - `cancel` -> `ionCancel` - **Slides** - `willChange` -> `ionWillChange` - `didChange` -> `ionDidChange` - `move` -> `ionDrag` - **TabButton** - `select` -> `ionSelect` - **Tab** - `select` -> `ionSelect` - **Tabs** - `change` -> `ionChange` - **Toggle** - `change` -> `ionChange` #### Steps to Upgrade to Beta 8 1. Upgrade to `Beta 8` by running the following command: ``` npm install --save [email protected] ``` _or_ modify the following line to use `beta.8` in your `package.json` and then run `npm install`: ``` "ionic-angular": "^2.0.0-beta.8", ``` **This is the way to update Ionic to any version, more information can be found in the [docs](http://ionicframework.com/docs/v2/resources/using-npm/).** 2. Replace all instances of `@Page` with `@Component`: ``` import {Page} from 'ionic-angular'; @Page({ }) ``` becomes ``` import {Component} from '@angular/core'; @Component({ }) ``` 3. Replace `@App` with `@Component` and then bootstrap it. Move any `config` properties into the bootstrap: ``` import {App, Platform} from 'ionic-angular'; @App({ templateUrl: 'build/app.html', providers: [ConferenceData, UserData], config: { tabbarPlacement: 'bottom' } export class MyApp { } ``` becomes ``` import {Component} from '@angular/core'; import {ionicBootstrap, Platform} from 'ionic-angular'; @Component({ templateUrl: 'build/app.html', }) export class MyApp { } // Pass the main app component as the first argument // Pass any providers for your app in the second argument // Set any config for your app as the third argument: // http://ionicframework.com/docs/v2/api/config/Config/ ionicBootstrap(MyApp, [ConferenceData, UserData], { tabbarPlacement: 'bottom' }); ``` 4. Rename any uses of `IonicApp` to `App`: ``` import {IonicApp} from 'ionic-angular'; constructor( private app: IonicApp ) { ``` becomes ``` import {App} from 'ionic-angular'; constructor( private app: App ) { ``` 5. Rename any uses of the lifecycle events, for example: ``` onPageDidEnter() { console.log("Entered page!"); } ``` becomes ``` ionViewDidEnter() { console.log("Entered page!"); } ``` The full list of lifecycle name changes is in the [section above](https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#ionic-lifecycle-events-renamed). 6. Rename any Ionic events, for example: ``` <ion-slides (slideChangeStart)="onSlideChangeStart($event)"> ``` becomes ``` <ion-slides (ionWillChange)="onSlideChangeStart($event)"> ``` The full list of event name changes is in the [section above](https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#ionic-component-events-renamed). ### Bug Fixes * **build:** correct link in output.wp.scss file to old ionic directory. ([6113daf](https://github.com/driftyco/ionic/commit/6113daf)) * **button:** style disabled anchor/button elements ([d0abbaf](https://github.com/driftyco/ionic/commit/d0abbaf)), closes [#6108](https://github.com/driftyco/ionic/issues/6108) * **config:** pass custom providers in the bootstrap of the app ([c74b3f7](https://github.com/driftyco/ionic/commit/c74b3f7)) * **config:** set the properties for each mode and add defaults ([7def98c](https://github.com/driftyco/ionic/commit/7def98c)), closes [#6132](https://github.com/driftyco/ionic/issues/6132) * **datetime:** clear out existing datetime data ([c1ad804](https://github.com/driftyco/ionic/commit/c1ad804)), closes [#6614](https://github.com/driftyco/ionic/issues/6614) * **datetime:** fix ISO format when w/out timezone data ([272daf2](https://github.com/driftyco/ionic/commit/272daf2)), closes [#6608](https://github.com/driftyco/ionic/issues/6608) * **infiniteScroll:** ensure infinite doesn't fire when already loading ([f7b1f37](https://github.com/driftyco/ionic/commit/f7b1f37)) * **input:** add form validation classes to the item ([5498a36](https://github.com/driftyco/ionic/commit/5498a36)) * **input:** fix material design success/error highlighting on inputs ([702a882](https://github.com/driftyco/ionic/commit/702a882)) * **input:** fix the clear input placement on wp mode ([4ba999e](https://github.com/driftyco/ionic/commit/4ba999e)) * **input:** pass the control classes down to the native input ([6180cb8](https://github.com/driftyco/ionic/commit/6180cb8)) * **ion-backdrop:** new ion-backdrop can prevent background scrolling ([a1a582b](https://github.com/driftyco/ionic/commit/a1a582b)), closes [#6656](https://github.com/driftyco/ionic/issues/6656) * **item:** remove border for the last item in an item-group ([6b3e7ac](https://github.com/driftyco/ionic/commit/6b3e7ac)), closes [#6518](https://github.com/driftyco/ionic/issues/6518) * **label:** make all ion-labels stacked or floating stretch ([b742e1f](https://github.com/driftyco/ionic/commit/b742e1f)), closes [#6134](https://github.com/driftyco/ionic/issues/6134) * **menu:** fix swipe to go back and left menu conflict ([f18a624](https://github.com/driftyco/ionic/commit/f18a624)), closes [#5575](https://github.com/driftyco/ionic/issues/5575) * **menu:** pass platform to menu type ([7f597a0](https://github.com/driftyco/ionic/commit/7f597a0)) * **modal:** fix onPageWillEnter ([01110af](https://github.com/driftyco/ionic/commit/01110af)), closes [#6597](https://github.com/driftyco/ionic/issues/6597) * **picker:** safari fired pointerEnd() twice (#6708) ([170cf8c](https://github.com/driftyco/ionic/commit/170cf8c)), closes [#6704](https://github.com/driftyco/ionic/issues/6704) * **picker:** use sanitizer on translate3d css prop ([8598a2e](https://github.com/driftyco/ionic/commit/8598a2e)) * **platform:** pass original event in EventEmitter ([cc93366](https://github.com/driftyco/ionic/commit/cc93366)) * **popover:** allow popover to have an ion-content wrapping it ([c801d18](https://github.com/driftyco/ionic/commit/c801d18)) * **popover:** position MD popover on top of element clicked ([6bd91f0](https://github.com/driftyco/ionic/commit/6bd91f0)), closes [#6683](https://github.com/driftyco/ionic/issues/6683) * **popover:** style the ion-content background in a popover to match popover bg ([9ea89ea](https://github.com/driftyco/ionic/commit/9ea89ea)) * **range:** fix styling on range, add demo ([d24b080](https://github.com/driftyco/ionic/commit/d24b080)) * **range:** prevent change detection exception ([7e4b13d](https://github.com/driftyco/ionic/commit/7e4b13d)) * **range:** update range left/right margin on ios ([27fa22f](https://github.com/driftyco/ionic/commit/27fa22f)) * **range:** update the styling for all modes ([061af93](https://github.com/driftyco/ionic/commit/061af93)) * **ripple:** do not activate ripple if pointer moved ([d57833c](https://github.com/driftyco/ionic/commit/d57833c)) * **slides:** Removing a slide via *ngIf now properly removes the slide and the bullet from th ([dbe54b5](https://github.com/driftyco/ionic/commit/dbe54b5)), closes [#6651](https://github.com/driftyco/ionic/issues/6651) * **toast:** remove backdrop, allow user interaction when up ([d4d1f70](https://github.com/driftyco/ionic/commit/d4d1f70)), closes [#6291](https://github.com/driftyco/ionic/issues/6291) * **toast:** remove the enableBackdropDismiss option on toast ([aeeae3f](https://github.com/driftyco/ionic/commit/aeeae3f)) * **toggle:** do not fire change when initializing ([cd2afb3](https://github.com/driftyco/ionic/commit/cd2afb3)), closes [#6144](https://github.com/driftyco/ionic/issues/6144) * **transition:** reduce transition delay on MD ([908fa03](https://github.com/driftyco/ionic/commit/908fa03)) ### Features * **alert:** add Sass variables for the radio/checkbox labels when checked ([9cc0dc7](https://github.com/driftyco/ionic/commit/9cc0dc7)), closes [#6289](https://github.com/driftyco/ionic/issues/6289) * **item:** add item-content attr selector ([839adf8](https://github.com/driftyco/ionic/commit/839adf8)), closes [#6643](https://github.com/driftyco/ionic/issues/6643) * **menu:** add opened/closed events ([51ee8b7](https://github.com/driftyco/ionic/commit/51ee8b7)) * **popover:** add height auto for safari and remove ability to scroll on backdrop ([620b7c8](https://github.com/driftyco/ionic/commit/620b7c8)) * **popover:** add MD animation ([1d0d755](https://github.com/driftyco/ionic/commit/1d0d755)) * **popover:** add popover component ([53fd3c3](https://github.com/driftyco/ionic/commit/53fd3c3)) * **popover:** add styling for the md pin ([a25a552](https://github.com/driftyco/ionic/commit/a25a552)) * **popover:** adjust popover to position in the center with no event ([1e7b572](https://github.com/driftyco/ionic/commit/1e7b572)) * **popover:** change MD animation and use for WP also ([44a7da8](https://github.com/driftyco/ionic/commit/44a7da8)) * **popover:** change popover item background color to match wrapper ([b0d71da](https://github.com/driftyco/ionic/commit/b0d71da)) * **popover:** change template in popover to a page similar to modal ([a96e36a](https://github.com/driftyco/ionic/commit/a96e36a)) * **popover:** fix long popovers that go off the page ([4db72cf](https://github.com/driftyco/ionic/commit/4db72cf)) * **popover:** fix MD animations and start from the right side ([e419ec6](https://github.com/driftyco/ionic/commit/e419ec6)) * **popover:** modify the animation for each mode ([57a1274](https://github.com/driftyco/ionic/commit/57a1274)) * **popover:** position popover in the top middle if no event ([438a389](https://github.com/driftyco/ionic/commit/438a389)) * **popover:** position the popover on transition instead of create ([2cd1b51](https://github.com/driftyco/ionic/commit/2cd1b51)) * **range:** add ability to add labels to the left/right of range ([fc819dd](https://github.com/driftyco/ionic/commit/fc819dd)) * **range:** add md and wp styling, tweak ios styling ([af6d5e4](https://github.com/driftyco/ionic/commit/af6d5e4)) * **range:** add styling for range-left/range-right md and wp ([21753a8](https://github.com/driftyco/ionic/commit/21753a8)) * **range:** add styling for the range when knob is minimum md ([c59c656](https://github.com/driftyco/ionic/commit/c59c656)) * **range:** create ion-range input ([2c6e11b](https://github.com/driftyco/ionic/commit/2c6e11b)) * **range:** fix the knob on md so the transform isn't blurry ([cffa84c](https://github.com/driftyco/ionic/commit/cffa84c)) * **range:** only increase knob size when pin doesn't exist ([47174df](https://github.com/driftyco/ionic/commit/47174df)) <a name="2.0.0-beta.7"></a> # [2.0.0-beta.7](https://github.com/driftyco/ionic/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2016-05-19) ### Features * **datetime:** add ion-datetime ([1e331c9](https://github.com/driftyco/ionic/commit/1e331c9)) * **input:** added functionality for clear input option on ion-input ([d8e2849](https://github.com/driftyco/ionic/commit/d8e2849)) * **modal:** add inset modal feature ([a658524](https://github.com/driftyco/ionic/commit/a658524)), closes [#5423](https://github.com/driftyco/ionic/issues/5423) * **modal:** start of inset modals ([a1a594d](https://github.com/driftyco/ionic/commit/a1a594d)) * **picker:** add ios/md/wp picker styles ([aa9a667](https://github.com/driftyco/ionic/commit/aa9a667)) * **picker:** init picker ([d5068f8](https://github.com/driftyco/ionic/commit/d5068f8)) * **platform:** add a readySource as ready resolved value ([f68ac8a](https://github.com/driftyco/ionic/commit/f68ac8a)) * **platform:** cordova pause/resume events ([532096b](https://github.com/driftyco/ionic/commit/532096b)) ### Bug Fixes * **app:** add status bar padding to navbar when a tab subpage ([62b97ce](https://github.com/driftyco/ionic/commit/62b97ce)), closes [#6368](https://github.com/driftyco/ionic/issues/6368) * **app:** fix status bar padding for inset modals ([4d27680](https://github.com/driftyco/ionic/commit/4d27680)) * **build:** fix e2e, demos, and karma tests to use new angular module setup. ([4c19d15](https://github.com/driftyco/ionic/commit/4c19d15)) * **button:** add the solid class to bar buttons ([658b29b](https://github.com/driftyco/ionic/commit/658b29b)) * **button:** add transparent background for clear/outline windows buttons ([da5c065](https://github.com/driftyco/ionic/commit/da5c065)) * **button:** exclude solid from getting added to the button in the class ([4252448](https://github.com/driftyco/ionic/commit/4252448)) * **button:** remove unnecessary ion-button-effect elements ([369d78b](https://github.com/driftyco/ionic/commit/369d78b)) * **checkbox:** add ability to align checkboxes to the right ([e075ccd](https://github.com/driftyco/ionic/commit/e075ccd)), closes [#5925](https://github.com/driftyco/ionic/issues/5925) * **datetime:** fix property dayNames (it was using dayShort) ([0bd736d](https://github.com/driftyco/ionic/commit/0bd736d)) * **datetime:** improve parseTemplate ([55ec80a](https://github.com/driftyco/ionic/commit/55ec80a)) * **grid:** add ion-grid element which wraps the rows/cols and adds padding ([a0c0228](https://github.com/driftyco/ionic/commit/a0c0228)) * **input:** clear text input ([bde103d](https://github.com/driftyco/ionic/commit/bde103d)) * **input:** remove old clearInput code and clean up UI, added onChange calls ([71cd297](https://github.com/driftyco/ionic/commit/71cd297)) * **loading:** include cssClass in the Loading options ([4c8ee95](https://github.com/driftyco/ionic/commit/4c8ee95)), closes [#6365](https://github.com/driftyco/ionic/issues/6365) * **nav:** transition toolbars on iOS ([daa4ccc](https://github.com/driftyco/ionic/commit/daa4ccc)), closes [#5692](https://github.com/driftyco/ionic/issues/5692) * **picker:** number of dom children != number of options (#6551) ([28cf16a](https://github.com/driftyco/ionic/commit/28cf16a)) * **radio:** add styling for radio when item-left/item-right is added ([4c5dd0b](https://github.com/driftyco/ionic/commit/4c5dd0b)) * **raf:** test for undefined raf ([1c16008](https://github.com/driftyco/ionic/commit/1c16008)) * **segment:** add disabled property to segment and segment button ([4fca31e](https://github.com/driftyco/ionic/commit/4fca31e)) * **select:** add min height to select text for windows since it shows border ([e9c1442](https://github.com/driftyco/ionic/commit/e9c1442)) * **show-hide-when:** add !important to display as this should always take precedence ([617b7ac](https://github.com/driftyco/ionic/commit/617b7ac)), closes [#6270](https://github.com/driftyco/ionic/issues/6270) * **slides:** make slide method parameters optional ([f355087](https://github.com/driftyco/ionic/commit/f355087)) * **slides:** set class using renderer instead of host ([132d8e9](https://github.com/driftyco/ionic/commit/132d8e9)), closes [#6275](https://github.com/driftyco/ionic/issues/6275) * **tabs:** move border to top for windows positioned bottom tabs ([af2085e](https://github.com/driftyco/ionic/commit/af2085e)), closes [#6526](https://github.com/driftyco/ionic/issues/6526) * **tabs:** remove min-width from tab so 5 tabs will fit ([b4647cd](https://github.com/driftyco/ionic/commit/b4647cd)), closes [#6056](https://github.com/driftyco/ionic/issues/6056) * **toast:** add toast back to the components export ([d7d4742](https://github.com/driftyco/ionic/commit/d7d4742)) * **toggle:** add styling for toggle when placed left ([ab82d53](https://github.com/driftyco/ionic/commit/ab82d53)) * **toolbar:** add the mode to the inverse function for a toolbar ([3ca3027](https://github.com/driftyco/ionic/commit/3ca3027)), closes [#6364](https://github.com/driftyco/ionic/issues/6364) * **toolbar:** md mode use the color contrast for toolbar button/title ([9f54f16](https://github.com/driftyco/ionic/commit/9f54f16)) * **toolbar:** remove color change from outline buttons in toolbar ([6759074](https://github.com/driftyco/ionic/commit/6759074)) * **toolbar:** set the text color of the toolbar based on the contrast of the background ([74afc18](https://github.com/driftyco/ionic/commit/74afc18)) * **toolbar:** wp get title/button color from the contrast of toolbar background ([62bd13b](https://github.com/driftyco/ionic/commit/62bd13b)) * **virtual-scroll:** fixes from rc1 breaking changes ([158f717](https://github.com/driftyco/ionic/commit/158f717)) ### BREAKING CHANGES #### Angular Update to 2.0.0-rc.1 Angular has been updated to 2.0.0-rc.1, follow these steps to update Angular. 1. Edit your `package.json` and **remove** the `angular2` entry: ``` "angular2": "2.0.0-beta.15" ``` 2. Then, run the following command from a terminal to update Ionic and Angular, or take a look at the starter's [package.json](https://github.com/driftyco/ionic2-app-base/commit/4861c099e2cc509eeb0eff4548554b34116c22a5) changes and update each version: ``` npm install --save [email protected] @angular/core @angular/compiler @angular/common @angular/platform-browser @angular/platform-browser-dynamic @angular/router @angular/http [email protected] [email protected] reflect-metadata ``` 3. Run the following command from a terminal to update the gulp task for `ionic-gulp-scripts-copy`: ``` npm install --save-dev [email protected] ``` 4. Then, change any imports in your application from `angular2` to `@angular`. For example, the following: ```javascript import {ViewChild} from 'angular2/core'; import {Http} from 'angular2/http'; ``` becomes ```javascript import {ViewChild} from '@angular/core'; import {Http} from '@angular/http'; ``` 5. Remove the import for `angular2-polyfills` in `index.html`: ```html <script src="build/js/angular2-polyfills.js"></script> ``` and replace it with the following scripts: ```html <script src="build/js/zone.js"></script> <script src="build/js/Reflect.js"></script> ``` 6. Replace all template variables in `ngFor` with `let`. For example: ``` *ngFor="#session of group.sessions" ``` becomes ``` *ngFor="let session of group.sessions" ``` 7. Replace all template variables in `virtualScroll`. For example: ``` *virtualItem="#item" ``` becomes ``` *virtualItem="let item" ``` 8. View the [Angular Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md) for more in depth changes. #### IonicApp ([df32836](https://github.com/driftyco/ionic/commit/df32836)) references [#6199](https://github.com/driftyco/ionic/issues/6199) The `getComponent` method of `IonicApp` has been removed. Please use Angular's [ViewChild](https://angular.io/docs/ts/latest/api/core/ViewChild-var.html) instead. For example, the following: ```html <ion-nav id="nav" [root]="rootPage" #content></ion-nav> ``` ```javascript import {IonicApp} from 'ionic-angular'; @App({ templateUrl: 'build/app.html' }) class MyApp { constructor(private app: IonicApp) {} setPage() { let nav = this.app.getComponent('nav'); nav.push(MyPage); } } ``` Should be changed (in TypeScript) to use the `Nav` ViewChild: ```html <ion-nav [root]="rootPage" #content></ion-nav> ``` ```javascript import {ViewChild} from '@angular/core'; import {Nav} from 'ionic-angular'; @App({ templateUrl: 'build/app.html' }) class MyApp { @ViewChild(Nav) nav: Nav; constructor() {} setPage() { this.nav.push(MyPage); } } ``` and the same example (in JavaScript): ```javascript import {ViewChild} from '@angular/core'; @App({ templateUrl: 'build/app.html', queries: { nav: new ViewChild('content') } }) class MyApp { constructor() {} setPage() { this.nav.push(MyPage); } } ``` Please see the [Ionic Conference App](https://github.com/driftyco/ionic-conference-app) for more usage examples. #### Router The Angular router is currently under heavy development and refactoring. As a result of this, Angular’s router is currently disabled within Ionic. If your app requires use of the router we recommend waiting until a future release of Ionic when Angular has completed work on the new router. However, this does not affect Ionic’s navigation system and it continues to work with the same API from previous versions. #### Sass Changes ##### Toolbar [#6364](https://github.com/driftyco/ionic/issues/6364) **iOS Mode** - `$toolbar-ios-button-color` now has a default value of `color-contrast($colors-ios, $toolbar-ios-background, ios)` which will evaluate to the primary color for light background toolbars and white for dark background toolbars. - `$bar-button-ios-color` has been renamed to `$toolbar-ios-button-color` - `$bar-button-ios-border-radius` has been renamed to `$toolbar-ios-button-border-radius` - added variables for the toolbar ios title for easier styling: ``` $toolbar-ios-title-font-weight $toolbar-ios-title-text-align $toolbar-ios-title-text-color ``` **Windows Mode** - `$bar-button-wp-color` was renamed to `$toolbar-wp-button-color` - `$bar-button-wp-border-radius` was renamed to `$toolbar-wp-button-border-radius` - Added `$toolbar-wp-title-text-color` for better control of the title color - Removed `$toolbar-wp-button-color` from the default themes **Material Design Mode** - `$toolbar-md-button-color` no longer gets passed to the function that sets the contrast color for toolbar buttons, but it can still be used to set the default button color. - `$bar-button-md-color` was renamed to `$toolbar-md-button-color` - `$bar-button-md-border-radius` was renamed to `$toolbar-md-button-border-radius` ##### Toggle, Checkbox, Radio ([4c5dd0b](https://github.com/driftyco/ionic/commit/4c5dd0b)), ([e075ccd](https://github.com/driftyco/ionic/commit/e075ccd)), ([ab82d53](https://github.com/driftyco/ionic/commit/ab82d53)) references [#5925](https://github.com/driftyco/ionic/issues/5925) Renamed Sass variables in toggle, checkbox, and radio. Changed the word `media` in `component-mode-media-padding` (for example) to `item-left`.
CHANGELOG.md
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0021265188697725534, 0.0001899006892926991, 0.00015869823982939124, 0.00016807738575153053, 0.00015912612434476614 ]
{ "id": 2, "code_window": [ " edge: menu.side,\n", " threshold: 0,\n", " maxEdgeStart: menu.maxEdgeStart || 50,\n", " maxAngle: 40,\n", " gesture: menu.gestureCtrl.create('menu-swipe', {\n", " priority: GesturePriority.MenuSwipe,\n", " })\n", " }, options));\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " gesture: gestureCtrl.create('menu-swipe', {\n" ], "file_path": "src/components/menu/menu-gestures.ts", "type": "replace", "edit_start_line_idx": 18 }
<!-- Generated template for the $CLASSNAME page. See http://ionicframework.com/docs/v2/components/#navigation for more info on Ionic pages and navigation. --> <ion-header> <ion-navbar> <ion-title>$SUPPLIEDNAME</ion-title> </ion-navbar> </ion-header> <ion-content padding> </ion-content>
scripts/templates/page/html.tmpl
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00016824639169499278, 0.000166450219694525, 0.00016465406224597245, 0.000166450219694525, 0.000001796164724510163 ]
{ "id": 3, "code_window": [ " private _renderer: Renderer,\n", " private _keyboard: Keyboard,\n", " private _zone: NgZone,\n", " public gestureCtrl: GestureController\n", " ) {}\n", "\n", " /**\n", " * @private\n", " */\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " private _gestureCtrl: GestureController\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 305 }
import { Menu } from './menu'; import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture'; import { SlideData } from '../../gestures/slide-gesture'; import { assign } from '../../util/util'; import { GesturePriority } from '../../gestures/gesture-controller'; /** * Gesture attached to the content which the menu is assigned to */ export class MenuContentGesture extends SlideEdgeGesture { constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) { super(contentEle, assign({ direction: 'x', edge: menu.side, threshold: 0, maxEdgeStart: menu.maxEdgeStart || 50, maxAngle: 40, gesture: menu.gestureCtrl.create('menu-swipe', { priority: GesturePriority.MenuSwipe, }) }, options)); } canStart(ev: any): boolean { let menu = this.menu; if (!menu.canSwipe()) { return false; } if (menu.isOpen) { return true; } else if (menu.getMenuController().getOpen()) { return false; } return super.canStart(ev); } // Set CSS, then wait one frame for it to apply before sliding starts onSlideBeforeStart(ev: any) { console.debug('menu gesture, onSlideBeforeStart', this.menu.side); this.menu.swipeStart(); } onSlide(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let stepValue = (slide.distance / z); console.debug('menu gesture, onSlide', this.menu.side, 'distance', slide.distance, 'min', slide.min, 'max', slide.max, 'z', z, 'stepValue', stepValue); ev.preventDefault(); this.menu.swipeProgress(stepValue); } onSlideEnd(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let currentStepValue = (slide.distance / z); let velocity = slide.velocity; z = Math.abs(z * 0.5); let shouldCompleteRight = (velocity >= 0) && (velocity > 0.2 || slide.delta > z); let shouldCompleteLeft = (velocity <= 0) && (velocity < -0.2 || slide.delta < -z); console.debug('menu gesture, onSlideEnd', this.menu.side, 'distance', slide.distance, 'delta', slide.delta, 'velocity', velocity, 'min', slide.min, 'max', slide.max, 'shouldCompleteLeft', shouldCompleteLeft, 'shouldCompleteRight', shouldCompleteRight, 'currentStepValue', currentStepValue); this.menu.swipeEnd(shouldCompleteLeft, shouldCompleteRight, currentStepValue); } getElementStartPos(slide: SlideData, ev: any) { if (this.menu.side === 'right') { return this.menu.isOpen ? slide.min : slide.max; } // left menu return this.menu.isOpen ? slide.max : slide.min; } getSlideBoundaries(): {min: number, max: number} { if (this.menu.side === 'right') { return { min: -this.menu.width(), max: 0 }; } // left menu return { min: 0, max: this.menu.width() }; } }
src/components/menu/menu-gestures.ts
1
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.8483766317367554, 0.07731432467699051, 0.0001657357206568122, 0.0001738163991831243, 0.2438313215970993 ]
{ "id": 3, "code_window": [ " private _renderer: Renderer,\n", " private _keyboard: Keyboard,\n", " private _zone: NgZone,\n", " public gestureCtrl: GestureController\n", " ) {}\n", "\n", " /**\n", " * @private\n", " */\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " private _gestureCtrl: GestureController\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 305 }
<!DOCTYPE html> <html dir="ltr" lang="en"> <head> <title>Demo</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="apple-mobile-web-app-capable" content="yes"> <link href="../../css/ionic.min.css" rel="stylesheet"> <link href="../scrollbar-fix.css" rel="stylesheet"> </head> <body> <ion-app></ion-app> <script src="../../polyfills/polyfills.js"></script> <script src="../scrollbar-fix.js"></script> <script src="./main.bundle.js"></script> </body> </html>
demos/src/action-sheet/index.html
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017306888184975833, 0.00017193148960359395, 0.00017079409735742956, 0.00017193148960359395, 0.0000011373922461643815 ]
{ "id": 3, "code_window": [ " private _renderer: Renderer,\n", " private _keyboard: Keyboard,\n", " private _zone: NgZone,\n", " public gestureCtrl: GestureController\n", " ) {}\n", "\n", " /**\n", " * @private\n", " */\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " private _gestureCtrl: GestureController\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 305 }
import { NgModule } from '@angular/core'; import { IonicApp, IonicModule } from 'ionic-angular'; import { ApiDemoApp, ApiDemoPage } from './app.component'; @NgModule({ declarations: [ ApiDemoApp, ApiDemoPage ], imports: [ IonicModule.forRoot(ApiDemoApp) ], bootstrap: [IonicApp], entryComponents: [ ApiDemoPage ] }) export class AppModule {}
demos/src/refresher/app.module.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017572930664755404, 0.00017367447435390204, 0.00017161964206025004, 0.00017367447435390204, 0.000002054832293651998 ]
{ "id": 3, "code_window": [ " private _renderer: Renderer,\n", " private _keyboard: Keyboard,\n", " private _zone: NgZone,\n", " public gestureCtrl: GestureController\n", " ) {}\n", "\n", " /**\n", " * @private\n", " */\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " private _gestureCtrl: GestureController\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 305 }
import { Component, ViewEncapsulation, NgModule } from '@angular/core'; import { IonicApp, IonicModule } from '../../../..'; @Component({ templateUrl: 'main.html', encapsulation: ViewEncapsulation.None }) export class E2EPage { lastMonth: number; items = []; constructor() { var utcSeconds = 787523438; // Dec 15, 1994 var d = new Date(0); d.setUTCSeconds(utcSeconds); for (var i = 0; i < 1000; i++) { this.items.push({ index: i, date: d, imgSrc: `../../img/img/${images[rotateImg]}.jpg?${Math.random()}`, }); rotateImg++; if (rotateImg === images.length) rotateImg = 0; if (i < 100) { utcSeconds += 237600; // 2.75 days } else { utcSeconds += (Math.random() * 237600) + 86400; } d = new Date(0); d.setUTCSeconds(utcSeconds); } } headerFn(record: any, recordIndex: number, records: any[]) { if (this.lastMonth !== record.date.getMonth()) { this.lastMonth = record.date.getMonth(); return { date: monthNames[this.lastMonth] + ' ' + record.date.getFullYear() }; } return null; } footerFn(record: any, recordIndex: number, records: any[]) { if (recordIndex === records.length - 1) { return true; } else { if (records[recordIndex + 1].date.getMonth() !== this.lastMonth) { return true; } } return null; } ngDoCheck() { console.log('DoCheck'); } reload() { window.location.reload(true); } } @Component({ template: '<ion-nav [root]="root"></ion-nav>', }) export class E2EApp { root = E2EPage; } @NgModule({ declarations: [ E2EApp, E2EPage ], imports: [ IonicModule.forRoot(E2EApp) ], bootstrap: [IonicApp], entryComponents: [ E2EApp, E2EPage ] }) export class AppModule {} var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; const images = [ 'bandit', 'batmobile', 'blues-brothers', 'bueller', 'delorean', 'eleanor', 'general-lee', 'ghostbusters', 'knight-rider', 'mirth-mobile', ]; let rotateImg = 0;
src/components/virtual-scroll/test/image-gallery/app-module.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0001769294322002679, 0.0001723091263556853, 0.0001686987525317818, 0.00017217252752743661, 0.00000255431632467662 ]
{ "id": 4, "code_window": [ " this.type = this._config.get('menuType');\n", " }\n", " this.setElementAttribute('type', this.type);\n", "\n", " // add the gestures\n", " this._cntGesture = new MenuContentGesture(this, document.body);\n", "\n", " // register listeners if this menu is enabled\n", " // check if more than one menu is on the same side\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " this._cntGesture = new MenuContentGesture(this, this._gestureCtrl, document.body);\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 335 }
import { Menu } from './menu'; import { SlideEdgeGesture } from '../../gestures/slide-edge-gesture'; import { SlideData } from '../../gestures/slide-gesture'; import { assign } from '../../util/util'; import { GesturePriority } from '../../gestures/gesture-controller'; /** * Gesture attached to the content which the menu is assigned to */ export class MenuContentGesture extends SlideEdgeGesture { constructor(public menu: Menu, contentEle: HTMLElement, options: any = {}) { super(contentEle, assign({ direction: 'x', edge: menu.side, threshold: 0, maxEdgeStart: menu.maxEdgeStart || 50, maxAngle: 40, gesture: menu.gestureCtrl.create('menu-swipe', { priority: GesturePriority.MenuSwipe, }) }, options)); } canStart(ev: any): boolean { let menu = this.menu; if (!menu.canSwipe()) { return false; } if (menu.isOpen) { return true; } else if (menu.getMenuController().getOpen()) { return false; } return super.canStart(ev); } // Set CSS, then wait one frame for it to apply before sliding starts onSlideBeforeStart(ev: any) { console.debug('menu gesture, onSlideBeforeStart', this.menu.side); this.menu.swipeStart(); } onSlide(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let stepValue = (slide.distance / z); console.debug('menu gesture, onSlide', this.menu.side, 'distance', slide.distance, 'min', slide.min, 'max', slide.max, 'z', z, 'stepValue', stepValue); ev.preventDefault(); this.menu.swipeProgress(stepValue); } onSlideEnd(slide: SlideData, ev: any) { let z = (this.menu.side === 'right' ? slide.min : slide.max); let currentStepValue = (slide.distance / z); let velocity = slide.velocity; z = Math.abs(z * 0.5); let shouldCompleteRight = (velocity >= 0) && (velocity > 0.2 || slide.delta > z); let shouldCompleteLeft = (velocity <= 0) && (velocity < -0.2 || slide.delta < -z); console.debug('menu gesture, onSlideEnd', this.menu.side, 'distance', slide.distance, 'delta', slide.delta, 'velocity', velocity, 'min', slide.min, 'max', slide.max, 'shouldCompleteLeft', shouldCompleteLeft, 'shouldCompleteRight', shouldCompleteRight, 'currentStepValue', currentStepValue); this.menu.swipeEnd(shouldCompleteLeft, shouldCompleteRight, currentStepValue); } getElementStartPos(slide: SlideData, ev: any) { if (this.menu.side === 'right') { return this.menu.isOpen ? slide.min : slide.max; } // left menu return this.menu.isOpen ? slide.max : slide.min; } getSlideBoundaries(): {min: number, max: number} { if (this.menu.side === 'right') { return { min: -this.menu.width(), max: 0 }; } // left menu return { min: 0, max: this.menu.width() }; } }
src/components/menu/menu-gestures.ts
1
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0020347461104393005, 0.0009248009300790727, 0.00016466129454784095, 0.0008089198963716626, 0.000583385000936687 ]
{ "id": 4, "code_window": [ " this.type = this._config.get('menuType');\n", " }\n", " this.setElementAttribute('type', this.type);\n", "\n", " // add the gestures\n", " this._cntGesture = new MenuContentGesture(this, document.body);\n", "\n", " // register listeners if this menu is enabled\n", " // check if more than one menu is on the same side\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " this._cntGesture = new MenuContentGesture(this, this._gestureCtrl, document.body);\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 335 }
import { nativeTimeout } from '../util/dom'; import { Platform } from '../platform/platform'; import { ScrollView } from '../util/scroll-view'; /** * @name Events * @description * Events is a publish-subscribe style event system for sending and responding to application-level * events across your app. * * @usage * ```ts * import { Events } from 'ionic-angular'; * * constructor(public events: Events) {} * * // first page (publish an event when a user is created) * function createUser(user) { * console.log('User created!') * events.publish('user:created', user); * } * * // second page (listen for the user created event) * events.subscribe('user:created', (userEventData) => { * // userEventData is an array of parameters, so grab our first and only arg * console.log('Welcome', userEventData[0]); * }); * * ``` * @demo /docs/v2/demos/src/events/ */ export class Events { private _channels: Array<any> = []; /** * Subscribe to an event topic. Events that get posted to that topic will trigger the provided handler. * * @param {string} topic the topic to subscribe to * @param {function} handler the event handler */ subscribe(topic: string, ...handlers: Function[]) { if (!this._channels[topic]) { this._channels[topic] = []; } handlers.forEach((handler) => { this._channels[topic].push(handler); }); } /** * Unsubscribe from the given topic. Your handler will no longer receive events published to this topic. * * @param {string} topic the topic to unsubscribe from * @param {function} handler the event handler * * @return true if a handler was removed */ unsubscribe(topic: string, handler: Function = null) { let t = this._channels[topic]; if (!t) { // Wasn't found, wasn't removed return false; } if (!handler) { // Remove all handlers for this topic delete this._channels[topic]; return true; } // We need to find and remove a specific handler let i = t.indexOf(handler); if (i < 0) { // Wasn't found, wasn't removed return false; } t.splice(i, 1); // If the channel is empty now, remove it from the channel map if (!t.length) { delete this._channels[topic]; } return true; } /** * Publish an event to the given topic. * * @param {string} topic the topic to publish to * @param {any} eventData the data to send as the event */ publish(topic: string, ...args: any[]) { var t = this._channels[topic]; if (!t) { return null; } let responses: any[] = []; t.forEach((handler: any) => { responses.push(handler(args)); }); return responses; } } /** * @private */ export function setupEvents(platform: Platform): Events { const events = new Events(); // start listening for resizes XXms after the app starts nativeTimeout(() => { window.addEventListener('online', (ev) => { events.publish('app:online', ev); }, false); window.addEventListener('offline', (ev) => { events.publish('app:offline', ev); }, false); window.addEventListener('orientationchange', (ev) => { events.publish('app:rotated', ev); }); // When that status taps, we respond window.addEventListener('statusTap', (ev) => { // TODO: Make this more better let el = <HTMLElement>document.elementFromPoint(platform.width() / 2, platform.height() / 2); if (!el) { return; } let content = <HTMLElement>el.closest('.scroll-content'); if (content) { var scroll = new ScrollView(content); scroll.scrollTo(0, 0, 300); } }); window.addEventListener('resize', () => { platform.windowResize(); }); }, 2000); return events; } /** * @private */ export function setupProvideEvents(platform: Platform) { return function() { return setupEvents(platform); }; }
src/util/events.ts
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00018161936895921826, 0.00017118026153184474, 0.00016488721303176135, 0.0001697866537142545, 0.000003903406650351826 ]
{ "id": 4, "code_window": [ " this.type = this._config.get('menuType');\n", " }\n", " this.setElementAttribute('type', this.type);\n", "\n", " // add the gestures\n", " this._cntGesture = new MenuContentGesture(this, document.body);\n", "\n", " // register listeners if this menu is enabled\n", " // check if more than one menu is on the same side\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " this._cntGesture = new MenuContentGesture(this, this._gestureCtrl, document.body);\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 335 }
module.exports = function parseOptional() { return { $runBefore: ['rendering-docs'], $process: function(docs) { docs.forEach(function(doc) { if(doc.members && doc.members.length) { for (var i in doc.members) { if(doc.members[i].params && doc.members[i].params.length) { for (var ii in doc.members[i].params) { if(doc.members[i].params[ii].optional){ doc.members[i].params[ii].description += '<strong class="tag">Optional</strong>'; } } } } } }); return docs; } } };
scripts/docs/processors/parse-optional.js
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.00017414103785995394, 0.0001706796610960737, 0.00016892264829948545, 0.00016897532623261213, 0.0000024476505586790154 ]
{ "id": 4, "code_window": [ " this.type = this._config.get('menuType');\n", " }\n", " this.setElementAttribute('type', this.type);\n", "\n", " // add the gestures\n", " this._cntGesture = new MenuContentGesture(this, document.body);\n", "\n", " // register listeners if this menu is enabled\n", " // check if more than one menu is on the same side\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ], "after_edit": [ " this._cntGesture = new MenuContentGesture(this, this._gestureCtrl, document.body);\n" ], "file_path": "src/components/menu/menu.ts", "type": "replace", "edit_start_line_idx": 335 }
exports.config = { groupId: 'ionic2', appId: 'snapshots', domain: 'ionic-snapshot-go.appspot.com', //domain: 'localhost:8080', sleepBetweenSpecs: 300, platformDefaults: { browser: 'chrome', platform: 'linux', params: { platform_id: 'chrome_400x800', platform_index: 0, platform_count: 1, width: 400, height: 800 } }, accessKey: process.env.IONIC_SNAPSHOT_KEY };
scripts/snapshot/snapshot.config.js
0
https://github.com/ionic-team/ionic-framework/commit/8dd66735abe6be1dfcf509d64200330b37ea7813
[ 0.0012233840534463525, 0.0005238955491222441, 0.0001713452656986192, 0.00017695725546218455, 0.0004946183762513101 ]
{ "id": 0, "code_window": [ " _createTextVNode(_toDisplayString(world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " ok\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 18 }
import { createStructuralDirectiveTransform, TransformContext, traverseNode } from '../transform' import { NodeTypes, ElementTypes, ElementNode, DirectiveNode, IfBranchNode, SimpleExpressionNode, createCallExpression, createConditionalExpression, createSimpleExpression, createObjectProperty, createObjectExpression, IfConditionalExpression, BlockCodegenNode, IfNode, createVNodeCall } from '../ast' import { createCompilerError, ErrorCodes } from '../errors' import { processExpression } from './transformExpression' import { CREATE_BLOCK, FRAGMENT, CREATE_COMMENT, OPEN_BLOCK } from '../runtimeHelpers' import { injectProp } from '../utils' export const transformIf = createStructuralDirectiveTransform( /^(if|else|else-if)$/, (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { // Exit callback. Complete the codegenNode when all children have been // transformed. return () => { if (isRoot) { ifNode.codegenNode = createCodegenNodeForBranch( branch, 0, context ) as IfConditionalExpression } else { // attach this branch's codegen node to the v-if root. let parentCondition = ifNode.codegenNode! while ( parentCondition.alternate.type === NodeTypes.JS_CONDITIONAL_EXPRESSION ) { parentCondition = parentCondition.alternate } parentCondition.alternate = createCodegenNodeForBranch( branch, ifNode.branches.length - 1, context ) } } }) } ) // target-agnostic transform used for both Client and SSR export function processIf( node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: ( node: IfNode, branch: IfBranchNode, isRoot: boolean ) => (() => void) | undefined ) { if ( dir.name !== 'else' && (!dir.exp || !(dir.exp as SimpleExpressionNode).content.trim()) ) { const loc = dir.exp ? dir.exp.loc : node.loc context.onError( createCompilerError(ErrorCodes.X_V_IF_NO_EXPRESSION, dir.loc) ) dir.exp = createSimpleExpression(`true`, false, loc) } if (!__BROWSER__ && context.prefixIdentifiers && dir.exp) { // dir.exp can only be simple expression because vIf transform is applied // before expression transform. dir.exp = processExpression(dir.exp as SimpleExpressionNode, context) } if (dir.name === 'if') { const branch = createIfBranch(node, dir) const ifNode: IfNode = { type: NodeTypes.IF, loc: node.loc, branches: [branch] } context.replaceNode(ifNode) if (processCodegen) { return processCodegen(ifNode, branch, true) } } else { // locate the adjacent v-if const siblings = context.parent!.children const comments = [] let i = siblings.indexOf(node) while (i-- >= -1) { const sibling = siblings[i] if (__DEV__ && sibling && sibling.type === NodeTypes.COMMENT) { context.removeNode(sibling) comments.unshift(sibling) continue } if (sibling && sibling.type === NodeTypes.IF) { // move the node to the if node's branches context.removeNode() const branch = createIfBranch(node, dir) if (__DEV__ && comments.length) { branch.children = [...comments, ...branch.children] } sibling.branches.push(branch) const onExit = processCodegen && processCodegen(sibling, branch, false) // since the branch was removed, it will not be traversed. // make sure to traverse here. traverseNode(branch, context) // call on exit if (onExit) onExit() // make sure to reset currentNode after traversal to indicate this // node has been removed. context.currentNode = null } else { context.onError( createCompilerError(ErrorCodes.X_V_ELSE_NO_ADJACENT_IF, node.loc) ) } break } } } function createIfBranch(node: ElementNode, dir: DirectiveNode): IfBranchNode { return { type: NodeTypes.IF_BRANCH, loc: node.loc, condition: dir.name === 'else' ? undefined : dir.exp, children: node.tagType === ElementTypes.TEMPLATE ? node.children : [node] } } function createCodegenNodeForBranch( branch: IfBranchNode, index: number, context: TransformContext ): IfConditionalExpression | BlockCodegenNode { if (branch.condition) { return createConditionalExpression( branch.condition, createChildrenCodegenNode(branch, index, context), // make sure to pass in asBlock: true so that the comment node call // closes the current block. createCallExpression(context.helper(CREATE_COMMENT), [ __DEV__ ? '"v-if"' : '""', 'true' ]) ) as IfConditionalExpression } else { return createChildrenCodegenNode(branch, index, context) } } function createChildrenCodegenNode( branch: IfBranchNode, index: number, context: TransformContext ): BlockCodegenNode { const { helper } = context const keyProperty = createObjectProperty( `key`, createSimpleExpression(index + '', false) ) const { children } = branch const firstChild = children[0] const needFragmentWrapper = children.length !== 1 || firstChild.type !== NodeTypes.ELEMENT if (needFragmentWrapper) { if (children.length === 1 && firstChild.type === NodeTypes.FOR) { // optimize away nested fragments when child is a ForNode const vnodeCall = firstChild.codegenNode! injectProp(vnodeCall, keyProperty, context) return vnodeCall } else { return createVNodeCall( context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, undefined, undefined, undefined, true, false, branch.loc ) } } else { const vnodeCall = (firstChild as ElementNode) .codegenNode as BlockCodegenNode // Change createVNode to createBlock. if (vnodeCall.type === NodeTypes.VNODE_CALL) { vnodeCall.isBlock = true helper(OPEN_BLOCK) helper(CREATE_BLOCK) } // inject branch key injectProp(vnodeCall, keyProperty, context) return vnodeCall } }
packages/compiler-core/src/transforms/vIf.ts
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.000173745138454251, 0.00016907609824556857, 0.0001636412343941629, 0.00016986024274956435, 0.000002986476147270878 ]
{ "id": 0, "code_window": [ " _createTextVNode(_toDisplayString(world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " ok\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 18 }
import { compileTemplate } from '../src/compileTemplate' import { parse, SFCTemplateBlock } from '../src/parse' test('should work', () => { const source = `<div><p>{{ render }}</p></div>` const result = compileTemplate({ filename: 'example.vue', source }) expect(result.errors.length).toBe(0) expect(result.source).toBe(source) // should expose render fn expect(result.code).toMatch(`export function render(`) }) test('preprocess pug', () => { const template = parse( ` <template lang="pug"> body h1 Pug Examples div.container p Cool Pug example! </template> `, { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock const result = compileTemplate({ filename: 'example.vue', source: template.content, preprocessLang: template.lang }) expect(result.errors.length).toBe(0) }) test('warn missing preprocessor', () => { const template = parse(`<template lang="unknownLang">hi</template>\n`, { filename: 'example.vue', sourceMap: true }).descriptor.template as SFCTemplateBlock const result = compileTemplate({ filename: 'example.vue', source: template.content, preprocessLang: template.lang }) expect(result.errors.length).toBe(1) }) test('transform asset url options', () => { const input = { source: `<foo bar="~baz"/>`, filename: 'example.vue' } // Object option const { code: code1 } = compileTemplate({ ...input, transformAssetUrls: { foo: ['bar'] } }) expect(code1).toMatch(`import _imports_0 from 'baz'\n`) // false option const { code: code2 } = compileTemplate({ ...input, transformAssetUrls: false }) expect(code2).not.toMatch(`import _imports_0 from 'baz'\n`) }) test('source map', () => { const template = parse( ` <template> <div><p>{{ render }}</p></div> </template> `, { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock const result = compileTemplate({ filename: 'example.vue', source: template.content }) expect(result.map).toMatchSnapshot() }) test('template errors', () => { const result = compileTemplate({ filename: 'example.vue', source: `<div :foo :bar="a[" v-model="baz"/>` }) expect(result.errors).toMatchSnapshot() }) test('preprocessor errors', () => { const template = parse( ` <template lang="pug"> div(class='class) </template> `, { filename: 'example.vue', sourceMap: true } ).descriptor.template as SFCTemplateBlock const result = compileTemplate({ filename: 'example.vue', source: template.content, preprocessLang: template.lang }) expect(result.errors.length).toBe(1) const message = result.errors[0].toString() expect(message).toMatch(`Error: example.vue:3:1`) expect(message).toMatch( `The end of the string reached with no closing bracket ) found.` ) })
packages/compiler-sfc/__tests__/compileTemplate.spec.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017456364003010094, 0.00017255981219932437, 0.00017023381951730698, 0.00017230154480785131, 0.000001435765739188355 ]
{ "id": 0, "code_window": [ " _createTextVNode(_toDisplayString(world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " ok\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 18 }
import { isObject } from '@vue/shared' import { warn } from '../warning' // For prefixing keys in v-on="obj" with "on" export function toHandlers(obj: Record<string, any>): Record<string, any> { const ret: Record<string, any> = {} if (__DEV__ && !isObject(obj)) { warn(`v-on with no argument expects an object value.`) return ret } for (const key in obj) { ret[`on${key}`] = obj[key] } return ret }
packages/runtime-core/src/helpers/toHandlers.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017515270155854523, 0.00017118702817242593, 0.00016722135478630662, 0.00017118702817242593, 0.000003965673386119306 ]
{ "id": 0, "code_window": [ " _createTextVNode(_toDisplayString(world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " ok\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 18 }
import { VNode, VNodeChild, isVNode } from './vnode' import { reactive, ReactiveEffect, shallowReadonly, pauseTracking, resetTracking } from '@vue/reactivity' import { PublicInstanceProxyHandlers, ComponentPublicInstance, runtimeCompiledRenderProxyHandlers } from './componentProxy' import { ComponentPropsOptions, resolveProps } from './componentProps' import { Slots, resolveSlots } from './componentSlots' import { warn } from './warning' import { ErrorCodes, callWithErrorHandling, callWithAsyncErrorHandling } from './errorHandling' import { AppContext, createAppContext, AppConfig } from './apiCreateApp' import { Directive, validateDirectiveName } from './directives' import { applyOptions, ComponentOptions } from './apiOptions' import { EMPTY_OBJ, isFunction, capitalize, NOOP, isObject, NO, makeMap, isPromise, isArray, hyphenate, ShapeFlags } from '@vue/shared' import { SuspenseBoundary } from './components/Suspense' import { CompilerOptions } from '@vue/compiler-core' import { currentRenderingInstance, markAttrsAccessed } from './componentRenderUtils' export type Data = { [key: string]: unknown } export interface SFCInternalOptions { __scopeId?: string __cssModules?: Data __hmrId?: string __hmrUpdated?: boolean } export interface FunctionalComponent<P = {}> extends SFCInternalOptions { (props: P, ctx: SetupContext): VNodeChild props?: ComponentPropsOptions<P> inheritAttrs?: boolean displayName?: string } export interface ClassComponent { new (...args: any[]): ComponentPublicInstance<any, any, any, any, any> __vccOpts: ComponentOptions } export type Component = ComponentOptions | FunctionalComponent // A type used in public APIs where a component type is expected. // The constructor type is an artificial type returned by defineComponent(). export type PublicAPIComponent = | Component | { new (...args: any[]): ComponentPublicInstance<any, any, any, any, any> } export { ComponentOptions } type LifecycleHook = Function[] | null export const enum LifecycleHooks { BEFORE_CREATE = 'bc', CREATED = 'c', BEFORE_MOUNT = 'bm', MOUNTED = 'm', BEFORE_UPDATE = 'bu', UPDATED = 'u', BEFORE_UNMOUNT = 'bum', UNMOUNTED = 'um', DEACTIVATED = 'da', ACTIVATED = 'a', RENDER_TRIGGERED = 'rtg', RENDER_TRACKED = 'rtc', ERROR_CAPTURED = 'ec' } export type Emit = (event: string, ...args: unknown[]) => any[] export interface SetupContext { attrs: Data slots: Slots emit: Emit } export type RenderFunction = { (): VNodeChild _rc?: boolean // isRuntimeCompiled } export interface ComponentInternalInstance { type: Component parent: ComponentInternalInstance | null appContext: AppContext root: ComponentInternalInstance vnode: VNode next: VNode | null subTree: VNode update: ReactiveEffect render: RenderFunction | null effects: ReactiveEffect[] | null provides: Data // cache for proxy access type to avoid hasOwnProperty calls accessCache: Data | null // cache for render function values that rely on _ctx but won't need updates // after initialized (e.g. inline handlers) renderCache: (Function | VNode)[] // assets for fast resolution components: Record<string, Component> directives: Record<string, Directive> // the rest are only for stateful components renderContext: Data data: Data props: Data attrs: Data vnodeHooks: Data slots: Slots proxy: ComponentPublicInstance | null // alternative proxy used only for runtime-compiled render functions using // `with` block withProxy: ComponentPublicInstance | null propsProxy: Data | null setupContext: SetupContext | null refs: Data emit: Emit // suspense related asyncDep: Promise<any> | null asyncResolved: boolean // storage for any extra properties sink: { [key: string]: any } // lifecycle isMounted: boolean isUnmounted: boolean isDeactivated: boolean [LifecycleHooks.BEFORE_CREATE]: LifecycleHook [LifecycleHooks.CREATED]: LifecycleHook [LifecycleHooks.BEFORE_MOUNT]: LifecycleHook [LifecycleHooks.MOUNTED]: LifecycleHook [LifecycleHooks.BEFORE_UPDATE]: LifecycleHook [LifecycleHooks.UPDATED]: LifecycleHook [LifecycleHooks.BEFORE_UNMOUNT]: LifecycleHook [LifecycleHooks.UNMOUNTED]: LifecycleHook [LifecycleHooks.RENDER_TRACKED]: LifecycleHook [LifecycleHooks.RENDER_TRIGGERED]: LifecycleHook [LifecycleHooks.ACTIVATED]: LifecycleHook [LifecycleHooks.DEACTIVATED]: LifecycleHook [LifecycleHooks.ERROR_CAPTURED]: LifecycleHook // hmr marker (dev only) renderUpdated?: boolean } const emptyAppContext = createAppContext() export function createComponentInstance( vnode: VNode, parent: ComponentInternalInstance | null ) { // inherit parent app context - or - if root, adopt from root vnode const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext const instance: ComponentInternalInstance = { vnode, parent, appContext, type: vnode.type as Component, root: null!, // set later so it can point to itself next: null, subTree: null!, // will be set synchronously right after creation update: null!, // will be set synchronously right after creation render: null, proxy: null, withProxy: null, propsProxy: null, setupContext: null, effects: null, provides: parent ? parent.provides : Object.create(appContext.provides), accessCache: null!, renderCache: [], // setup context properties renderContext: EMPTY_OBJ, data: EMPTY_OBJ, props: EMPTY_OBJ, attrs: EMPTY_OBJ, vnodeHooks: EMPTY_OBJ, slots: EMPTY_OBJ, refs: EMPTY_OBJ, // per-instance asset storage (mutable during options resolution) components: Object.create(appContext.components), directives: Object.create(appContext.directives), // async dependency management asyncDep: null, asyncResolved: false, // user namespace for storing whatever the user assigns to `this` // can also be used as a wildcard storage for ad-hoc injections internally sink: {}, // lifecycle hooks // not using enums here because it results in computed properties isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: null, emit: (event, ...args): any[] => { const props = instance.vnode.props || EMPTY_OBJ let handler = props[`on${event}`] || props[`on${capitalize(event)}`] if (!handler && event.indexOf('update:') === 0) { event = hyphenate(event) handler = props[`on${event}`] || props[`on${capitalize(event)}`] } if (handler) { const res = callWithAsyncErrorHandling( handler, instance, ErrorCodes.COMPONENT_EVENT_HANDLER, args ) return isArray(res) ? res : [res] } else { return [] } } } instance.root = parent ? parent.root : instance return instance } export let currentInstance: ComponentInternalInstance | null = null export let currentSuspense: SuspenseBoundary | null = null export const getCurrentInstance: () => ComponentInternalInstance | null = () => currentInstance || currentRenderingInstance export const setCurrentInstance = ( instance: ComponentInternalInstance | null ) => { currentInstance = instance } const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component') export function validateComponentName(name: string, config: AppConfig) { const appIsNativeTag = config.isNativeTag || NO if (isBuiltInTag(name) || appIsNativeTag(name)) { warn( 'Do not use built-in or reserved HTML elements as component id: ' + name ) } } export let isInSSRComponentSetup = false export function setupComponent( instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null, isSSR = false ) { isInSSRComponentSetup = isSSR const propsOptions = instance.type.props const { props, children, shapeFlag } = instance.vnode resolveProps(instance, props, propsOptions) resolveSlots(instance, children) // setup stateful logic let setupResult if (shapeFlag & ShapeFlags.STATEFUL_COMPONENT) { setupResult = setupStatefulComponent(instance, parentSuspense, isSSR) } isInSSRComponentSetup = false return setupResult } function setupStatefulComponent( instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null, isSSR: boolean ) { const Component = instance.type as ComponentOptions if (__DEV__) { if (Component.name) { validateComponentName(Component.name, instance.appContext.config) } if (Component.components) { const names = Object.keys(Component.components) for (let i = 0; i < names.length; i++) { validateComponentName(names[i], instance.appContext.config) } } if (Component.directives) { const names = Object.keys(Component.directives) for (let i = 0; i < names.length; i++) { validateDirectiveName(names[i]) } } } // 0. create render proxy property access cache instance.accessCache = {} // 1. create public instance / render proxy instance.proxy = new Proxy(instance, PublicInstanceProxyHandlers) // 2. create props proxy // the propsProxy is a reactive AND readonly proxy to the actual props. // it will be updated in resolveProps() on updates before render const propsProxy = (instance.propsProxy = isSSR ? instance.props : shallowReadonly(instance.props)) // 3. call setup() const { setup } = Component if (setup) { const setupContext = (instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null) currentInstance = instance currentSuspense = parentSuspense pauseTracking() const setupResult = callWithErrorHandling( setup, instance, ErrorCodes.SETUP_FUNCTION, [propsProxy, setupContext] ) resetTracking() currentInstance = null currentSuspense = null if (isPromise(setupResult)) { if (isSSR) { // return the promise so server-renderer can wait on it return setupResult.then((resolvedResult: unknown) => { handleSetupResult(instance, resolvedResult, parentSuspense, isSSR) }) } else if (__FEATURE_SUSPENSE__) { // async setup returned Promise. // bail here and wait for re-entry. instance.asyncDep = setupResult } else if (__DEV__) { warn( `setup() returned a Promise, but the version of Vue you are using ` + `does not support it yet.` ) } } else { handleSetupResult(instance, setupResult, parentSuspense, isSSR) } } else { finishComponentSetup(instance, parentSuspense, isSSR) } } export function handleSetupResult( instance: ComponentInternalInstance, setupResult: unknown, parentSuspense: SuspenseBoundary | null, isSSR: boolean ) { if (isFunction(setupResult)) { // setup returned an inline render function instance.render = setupResult as RenderFunction } else if (isObject(setupResult)) { if (__DEV__ && isVNode(setupResult)) { warn( `setup() should not return VNodes directly - ` + `return a render function instead.` ) } // setup returned bindings. // assuming a render function compiled from template is present. instance.renderContext = reactive(setupResult) } else if (__DEV__ && setupResult !== undefined) { warn( `setup() should return an object. Received: ${ setupResult === null ? 'null' : typeof setupResult }` ) } finishComponentSetup(instance, parentSuspense, isSSR) } type CompileFunction = ( template: string | object, options?: CompilerOptions ) => RenderFunction let compile: CompileFunction | undefined // exported method uses any to avoid d.ts relying on the compiler types. export function registerRuntimeCompiler(_compile: any) { compile = _compile } function finishComponentSetup( instance: ComponentInternalInstance, parentSuspense: SuspenseBoundary | null, isSSR: boolean ) { const Component = instance.type as ComponentOptions // template / render function normalization if (__NODE_JS__ && isSSR) { if (Component.render) { instance.render = Component.render as RenderFunction } } else if (!instance.render) { if (compile && Component.template && !Component.render) { Component.render = compile(Component.template, { isCustomElement: instance.appContext.config.isCustomElement || NO }) // mark the function as runtime compiled ;(Component.render as RenderFunction)._rc = true } if (__DEV__ && !Component.render) { /* istanbul ignore if */ if (!compile && Component.template) { warn( `Component provides template but the build of Vue you are running ` + `does not support runtime template compilation. Either use the ` + `full build or pre-compile the template using Vue CLI.` ) } else { warn(`Component is missing template or render function.`) } } instance.render = (Component.render || NOOP) as RenderFunction // for runtime-compiled render functions using `with` blocks, the render // proxy used needs a different `has` handler which is more performant and // also only allows a whitelist of globals to fallthrough. if (instance.render._rc) { instance.withProxy = new Proxy( instance, runtimeCompiledRenderProxyHandlers ) } } // support for 2.x options if (__FEATURE_OPTIONS__) { currentInstance = instance currentSuspense = parentSuspense applyOptions(instance, Component) currentInstance = null currentSuspense = null } } // used to identify a setup context proxy export const SetupProxySymbol = Symbol() const SetupProxyHandlers: { [key: string]: ProxyHandler<any> } = {} ;['attrs', 'slots'].forEach((type: string) => { SetupProxyHandlers[type] = { get: (instance, key) => { if (__DEV__) { markAttrsAccessed() } // if the user pass the slots proxy to h(), normalizeChildren should not // attempt to attach ctx to the object if (key === '_') return 1 return instance[type][key] }, has: (instance, key) => key === SetupProxySymbol || key in instance[type], ownKeys: instance => Reflect.ownKeys(instance[type]), // this is necessary for ownKeys to work properly getOwnPropertyDescriptor: (instance, key) => Reflect.getOwnPropertyDescriptor(instance[type], key), set: () => false, deleteProperty: () => false } }) function createSetupContext(instance: ComponentInternalInstance): SetupContext { const context = { // attrs & slots are non-reactive, but they need to always expose // the latest values (instance.xxx may get replaced during updates) so we // need to expose them through a proxy attrs: new Proxy(instance, SetupProxyHandlers.attrs), slots: new Proxy(instance, SetupProxyHandlers.slots), get emit() { return instance.emit } } return __DEV__ ? Object.freeze(context) : context } // record effects created during a component's setup() so that they can be // stopped when the component unmounts export function recordInstanceBoundEffect(effect: ReactiveEffect) { if (currentInstance) { ;(currentInstance.effects || (currentInstance.effects = [])).push(effect) } }
packages/runtime-core/src/component.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017462657706346363, 0.00017069523164536804, 0.00016592847532592714, 0.00017071040929295123, 0.000002013651965171448 ]
{ "id": 1, "code_window": [ " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 42 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: v-if codegen basic v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [ _createVNode(\\"div\\"), \\"hello\\", _createVNode(\\"p\\") ])) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if w/ single <slot/> child 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : (_openBlock(), _createBlock(\\"p\\", { key: 1 })) } }" `; exports[`compiler: v-if codegen v-if + v-else-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\"fine\\"])) } }" `; exports[`compiler: v-if codegen v-if + v-else-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if on <slot/> 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if with key 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: \\"some-key\\" })) : _createCommentVNode(\\"v-if\\", true) } }" `;
packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.007086768746376038, 0.002842159243300557, 0.00016406370559707284, 0.0026613911613821983, 0.002228689845651388 ]
{ "id": 1, "code_window": [ " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 42 }
{ "name": "@vue/compiler-ssr", "version": "3.0.0-alpha.9", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", "files": [ "dist" ], "buildOptions": { "prod": false, "formats": [ "cjs" ] }, "repository": { "type": "git", "url": "git+https://github.com/vuejs/vue-next.git" }, "keywords": [ "vue" ], "author": "Evan You", "license": "MIT", "bugs": { "url": "https://github.com/vuejs/vue-next/issues" }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-ssr#readme", "dependencies": { "@vue/shared": "3.0.0-alpha.9", "@vue/compiler-dom": "3.0.0-alpha.9" } }
packages/compiler-ssr/package.json
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017422973178327084, 0.00017232094251085073, 0.00016915395099204034, 0.00017295003635808825, 0.0000020002955807285616 ]
{ "id": 1, "code_window": [ " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 42 }
import { NodeTransform, TransformContext } from '../transform' import { NodeTypes, CallExpression, createCallExpression, ExpressionNode, SlotOutletNode } from '../ast' import { isSlotOutlet, findProp } from '../utils' import { buildProps, PropsExpression } from './transformElement' import { createCompilerError, ErrorCodes } from '../errors' import { RENDER_SLOT } from '../runtimeHelpers' export const transformSlotOutlet: NodeTransform = (node, context) => { if (isSlotOutlet(node)) { const { children, loc } = node const { slotName, slotProps } = processSlotOutlet(node, context) const slotArgs: CallExpression['arguments'] = [ context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, slotName ] if (slotProps) { slotArgs.push(slotProps) } if (children.length) { if (!slotProps) { slotArgs.push(`{}`) } slotArgs.push(children) } node.codegenNode = createCallExpression( context.helper(RENDER_SLOT), slotArgs, loc ) } } interface SlotOutletProcessResult { slotName: string | ExpressionNode slotProps: PropsExpression | undefined } export function processSlotOutlet( node: SlotOutletNode, context: TransformContext ): SlotOutletProcessResult { let slotName: string | ExpressionNode = `"default"` let slotProps: PropsExpression | undefined = undefined // check for <slot name="xxx" OR :name="xxx" /> const name = findProp(node, 'name') if (name) { if (name.type === NodeTypes.ATTRIBUTE && name.value) { // static name slotName = JSON.stringify(name.value.content) } else if (name.type === NodeTypes.DIRECTIVE && name.exp) { // dynamic name slotName = name.exp } } const propsWithoutName = name ? node.props.filter(p => p !== name) : node.props if (propsWithoutName.length > 0) { const { props, directives } = buildProps(node, context, propsWithoutName) slotProps = props if (directives.length) { context.onError( createCompilerError( ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET, directives[0].loc ) ) } } return { slotName, slotProps } }
packages/compiler-core/src/transforms/transformSlotOutlet.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00028083950746804476, 0.00018244149396196008, 0.00016672539641149342, 0.00017070096509996802, 0.00003483524778857827 ]
{ "id": 1, "code_window": [ " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 42 }
import { baseParse as parse, transform, generate, CompilerOptions } from '@vue/compiler-core' import { transformElement } from '../../../compiler-core/src/transforms/transformElement' import { transformShow } from '../../src/transforms/vShow' import { DOMErrorCodes } from '../../src/errors' function transformWithShow(template: string, options: CompilerOptions = {}) { const ast = parse(template) transform(ast, { nodeTransforms: [transformElement], directiveTransforms: { show: transformShow }, ...options }) return ast } describe('compiler: v-show transform', () => { test('simple expression', () => { const ast = transformWithShow(`<div v-show="a"/>`) expect(generate(ast).code).toMatchSnapshot() }) test('should raise error if has no expression', () => { const onError = jest.fn() transformWithShow(`<div v-show/>`, { onError }) expect(onError).toHaveBeenCalledTimes(1) expect(onError).toHaveBeenCalledWith( expect.objectContaining({ code: DOMErrorCodes.X_V_SHOW_NO_EXPRESSION }) ) }) })
packages/compiler-dom/__tests__/transforms/vShow.spec.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017672205285634845, 0.00017360113270115107, 0.00016673177015036345, 0.00017468768055550754, 0.0000035244599985162495 ]
{ "id": 2, "code_window": [ " _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 65 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: v-if codegen basic v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [ _createVNode(\\"div\\"), \\"hello\\", _createVNode(\\"p\\") ])) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if w/ single <slot/> child 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : (_openBlock(), _createBlock(\\"p\\", { key: 1 })) } }" `; exports[`compiler: v-if codegen v-if + v-else-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\"fine\\"])) } }" `; exports[`compiler: v-if codegen v-if + v-else-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if on <slot/> 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if with key 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: \\"some-key\\" })) : _createCommentVNode(\\"v-if\\", true) } }" `;
packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00501239113509655, 0.001843578414991498, 0.00016296295507345349, 0.0013554744655266404, 0.0016878563910722733 ]
{ "id": 2, "code_window": [ " _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 65 }
import { locStub, generate, NodeTypes, RootNode, createSimpleExpression, createObjectExpression, createObjectProperty, createArrayExpression, createCompoundExpression, createInterpolation, createCallExpression, createConditionalExpression, ForCodegenNode, createCacheExpression, createTemplateLiteral, createBlockStatement, createIfStatement, createAssignmentExpression, IfConditionalExpression, createVNodeCall, VNodeCall, DirectiveArguments } from '../src' import { CREATE_VNODE, TO_DISPLAY_STRING, RESOLVE_DIRECTIVE, helperNameMap, RESOLVE_COMPONENT, CREATE_COMMENT, FRAGMENT, RENDER_LIST } from '../src/runtimeHelpers' import { createElementWithCodegen } from './testUtils' import { PatchFlags } from '@vue/shared' function createRoot(options: Partial<RootNode> = {}): RootNode { return { type: NodeTypes.ROOT, children: [], helpers: [], components: [], directives: [], imports: [], hoists: [], cached: 0, temps: 0, codegenNode: createSimpleExpression(`null`, false), loc: locStub, ...options } } describe('compiler: codegen', () => { test('module mode preamble', () => { const root = createRoot({ helpers: [CREATE_VNODE, RESOLVE_DIRECTIVE] }) const { code } = generate(root, { mode: 'module' }) expect(code).toMatch( `import { ${helperNameMap[CREATE_VNODE]} as _${ helperNameMap[CREATE_VNODE] }, ${helperNameMap[RESOLVE_DIRECTIVE]} as _${ helperNameMap[RESOLVE_DIRECTIVE] } } from "vue"` ) expect(code).toMatchSnapshot() }) test('module mode preamble w/ optimizeBindings: true', () => { const root = createRoot({ helpers: [CREATE_VNODE, RESOLVE_DIRECTIVE] }) const { code } = generate(root, { mode: 'module', optimizeBindings: true }) expect(code).toMatch( `import { ${helperNameMap[CREATE_VNODE]}, ${ helperNameMap[RESOLVE_DIRECTIVE] } } from "vue"` ) expect(code).toMatch( `const _${helperNameMap[CREATE_VNODE]} = ${ helperNameMap[CREATE_VNODE] }, _${helperNameMap[RESOLVE_DIRECTIVE]} = ${ helperNameMap[RESOLVE_DIRECTIVE] }` ) expect(code).toMatchSnapshot() }) test('function mode preamble', () => { const root = createRoot({ helpers: [CREATE_VNODE, RESOLVE_DIRECTIVE] }) const { code } = generate(root, { mode: 'function' }) expect(code).toMatch(`const _Vue = Vue`) expect(code).toMatch( `const { ${helperNameMap[CREATE_VNODE]}: _${ helperNameMap[CREATE_VNODE] }, ${helperNameMap[RESOLVE_DIRECTIVE]}: _${ helperNameMap[RESOLVE_DIRECTIVE] } } = _Vue` ) expect(code).toMatchSnapshot() }) test('function mode preamble w/ prefixIdentifiers: true', () => { const root = createRoot({ helpers: [CREATE_VNODE, RESOLVE_DIRECTIVE] }) const { code } = generate(root, { mode: 'function', prefixIdentifiers: true }) expect(code).not.toMatch(`const _Vue = Vue`) expect(code).toMatch( `const { ${helperNameMap[CREATE_VNODE]}: _${ helperNameMap[CREATE_VNODE] }, ${helperNameMap[RESOLVE_DIRECTIVE]}: _${ helperNameMap[RESOLVE_DIRECTIVE] } } = Vue` ) expect(code).toMatchSnapshot() }) test('assets + temps', () => { const root = createRoot({ components: [`Foo`, `bar-baz`, `barbaz`], directives: [`my_dir_0`, `my_dir_1`], temps: 3 }) const { code } = generate(root, { mode: 'function' }) expect(code).toMatch( `const _component_Foo = _${helperNameMap[RESOLVE_COMPONENT]}("Foo")\n` ) expect(code).toMatch( `const _component_bar_baz = _${ helperNameMap[RESOLVE_COMPONENT] }("bar-baz")\n` ) expect(code).toMatch( `const _component_barbaz = _${ helperNameMap[RESOLVE_COMPONENT] }("barbaz")\n` ) expect(code).toMatch( `const _directive_my_dir_0 = _${ helperNameMap[RESOLVE_DIRECTIVE] }("my_dir_0")\n` ) expect(code).toMatch( `const _directive_my_dir_1 = _${ helperNameMap[RESOLVE_DIRECTIVE] }("my_dir_1")\n` ) expect(code).toMatch(`let _temp0, _temp1, _temp2`) expect(code).toMatchSnapshot() }) test('hoists', () => { const root = createRoot({ hoists: [ createSimpleExpression(`hello`, false, locStub), createObjectExpression( [ createObjectProperty( createSimpleExpression(`id`, true, locStub), createSimpleExpression(`foo`, true, locStub) ) ], locStub ) ] }) const { code } = generate(root) expect(code).toMatch(`const _hoisted_1 = hello`) expect(code).toMatch(`const _hoisted_2 = { id: "foo" }`) expect(code).toMatchSnapshot() }) test('temps', () => { const root = createRoot({ temps: 3 }) const { code } = generate(root) expect(code).toMatch(`let _temp0, _temp1, _temp2`) expect(code).toMatchSnapshot() }) test('static text', () => { const { code } = generate( createRoot({ codegenNode: { type: NodeTypes.TEXT, content: 'hello', loc: locStub } }) ) expect(code).toMatch(`return "hello"`) expect(code).toMatchSnapshot() }) test('interpolation', () => { const { code } = generate( createRoot({ codegenNode: createInterpolation(`hello`, locStub) }) ) expect(code).toMatch(`return _${helperNameMap[TO_DISPLAY_STRING]}(hello)`) expect(code).toMatchSnapshot() }) test('comment', () => { const { code } = generate( createRoot({ codegenNode: { type: NodeTypes.COMMENT, content: 'foo', loc: locStub } }) ) expect(code).toMatch(`return _${helperNameMap[CREATE_COMMENT]}("foo")`) expect(code).toMatchSnapshot() }) test('compound expression', () => { const { code } = generate( createRoot({ codegenNode: createCompoundExpression([ `_ctx.`, createSimpleExpression(`foo`, false, locStub), ` + `, { type: NodeTypes.INTERPOLATION, loc: locStub, content: createSimpleExpression(`bar`, false, locStub) }, // nested compound createCompoundExpression([` + `, `nested`]) ]) }) ) expect(code).toMatch( `return _ctx.foo + _${helperNameMap[TO_DISPLAY_STRING]}(bar) + nested` ) expect(code).toMatchSnapshot() }) test('ifNode', () => { const { code } = generate( createRoot({ codegenNode: { type: NodeTypes.IF, loc: locStub, branches: [], codegenNode: createConditionalExpression( createSimpleExpression('foo', false), createSimpleExpression('bar', false), createSimpleExpression('baz', false) ) as IfConditionalExpression } }) ) expect(code).toMatch(/return foo\s+\? bar\s+: baz/) expect(code).toMatchSnapshot() }) test('forNode', () => { const { code } = generate( createRoot({ codegenNode: { type: NodeTypes.FOR, loc: locStub, source: createSimpleExpression('foo', false), valueAlias: undefined, keyAlias: undefined, objectIndexAlias: undefined, children: [], parseResult: {} as any, codegenNode: { type: NodeTypes.VNODE_CALL, tag: FRAGMENT, isBlock: true, isForBlock: true, props: undefined, children: createCallExpression(RENDER_LIST), patchFlag: '1', dynamicProps: undefined, directives: undefined, loc: locStub } as ForCodegenNode } }) ) expect(code).toMatch(`openBlock(true)`) expect(code).toMatchSnapshot() }) test('Element (callExpression + objectExpression + TemplateChildNode[])', () => { const { code } = generate( createRoot({ codegenNode: createElementWithCodegen( // string `"div"`, // ObjectExpression createObjectExpression( [ createObjectProperty( createSimpleExpression(`id`, true, locStub), createSimpleExpression(`foo`, true, locStub) ), createObjectProperty( createSimpleExpression(`prop`, false, locStub), createSimpleExpression(`bar`, false, locStub) ), // compound expression as computed key createObjectProperty( { type: NodeTypes.COMPOUND_EXPRESSION, loc: locStub, children: [ `foo + `, createSimpleExpression(`bar`, false, locStub) ] }, createSimpleExpression(`bar`, false, locStub) ) ], locStub ), // ChildNode[] [ createElementWithCodegen( `"p"`, createObjectExpression( [ createObjectProperty( // should quote the key! createSimpleExpression(`some-key`, true, locStub), createSimpleExpression(`foo`, true, locStub) ) ], locStub ) ) ], // flag PatchFlags.FULL_PROPS + '' ) }) ) expect(code).toMatch(` return _${helperNameMap[CREATE_VNODE]}("div", { id: "foo", [prop]: bar, [foo + bar]: bar }, [ _${helperNameMap[CREATE_VNODE]}("p", { "some-key": "foo" }) ], ${PatchFlags.FULL_PROPS})`) expect(code).toMatchSnapshot() }) test('ArrayExpression', () => { const { code } = generate( createRoot({ codegenNode: createArrayExpression([ createSimpleExpression(`foo`, false), createCallExpression(`bar`, [`baz`]) ]) }) ) expect(code).toMatch(`return [ foo, bar(baz) ]`) expect(code).toMatchSnapshot() }) test('ConditionalExpression', () => { const { code } = generate( createRoot({ codegenNode: createConditionalExpression( createSimpleExpression(`ok`, false), createCallExpression(`foo`), createConditionalExpression( createSimpleExpression(`orNot`, false), createCallExpression(`bar`), createCallExpression(`baz`) ) ) }) ) expect(code).toMatch( `return ok ? foo() : orNot ? bar() : baz()` ) expect(code).toMatchSnapshot() }) test('CacheExpression', () => { const { code } = generate( createRoot({ cached: 1, codegenNode: createCacheExpression( 1, createSimpleExpression(`foo`, false) ) }), { mode: 'module', prefixIdentifiers: true } ) expect(code).toMatch(`_cache[1] || (_cache[1] = foo)`) expect(code).toMatchSnapshot() }) test('CacheExpression w/ isVNode: true', () => { const { code } = generate( createRoot({ cached: 1, codegenNode: createCacheExpression( 1, createSimpleExpression(`foo`, false), true ) }), { mode: 'module', prefixIdentifiers: true } ) expect(code).toMatch( ` _cache[1] || ( _setBlockTracking(-1), _cache[1] = foo, _setBlockTracking(1), _cache[1] ) `.trim() ) expect(code).toMatchSnapshot() }) test('TemplateLiteral', () => { const { code } = generate( createRoot({ codegenNode: createCallExpression(`_push`, [ createTemplateLiteral([ `foo`, createCallExpression(`_renderAttr`, ['id', 'foo']), `bar` ]) ]) }), { ssr: true, mode: 'module' } ) expect(code).toMatchInlineSnapshot(` " export function ssrRender(_ctx, _push, _parent) { _push(\`foo\${_renderAttr(id, foo)}bar\`) }" `) }) describe('IfStatement', () => { test('if', () => { const { code } = generate( createRoot({ codegenNode: createBlockStatement([ createIfStatement( createSimpleExpression('foo', false), createBlockStatement([createCallExpression(`ok`)]) ) ]) }), { ssr: true, mode: 'module' } ) expect(code).toMatchInlineSnapshot(` " export function ssrRender(_ctx, _push, _parent) { if (foo) { ok() } }" `) }) test('if/else', () => { const { code } = generate( createRoot({ codegenNode: createBlockStatement([ createIfStatement( createSimpleExpression('foo', false), createBlockStatement([createCallExpression(`foo`)]), createBlockStatement([createCallExpression('bar')]) ) ]) }), { ssr: true, mode: 'module' } ) expect(code).toMatchInlineSnapshot(` " export function ssrRender(_ctx, _push, _parent) { if (foo) { foo() } else { bar() } }" `) }) test('if/else-if', () => { const { code } = generate( createRoot({ codegenNode: createBlockStatement([ createIfStatement( createSimpleExpression('foo', false), createBlockStatement([createCallExpression(`foo`)]), createIfStatement( createSimpleExpression('bar', false), createBlockStatement([createCallExpression(`bar`)]) ) ) ]) }), { ssr: true, mode: 'module' } ) expect(code).toMatchInlineSnapshot(` " export function ssrRender(_ctx, _push, _parent) { if (foo) { foo() } else if (bar) { bar() } }" `) }) test('if/else-if/else', () => { const { code } = generate( createRoot({ codegenNode: createBlockStatement([ createIfStatement( createSimpleExpression('foo', false), createBlockStatement([createCallExpression(`foo`)]), createIfStatement( createSimpleExpression('bar', false), createBlockStatement([createCallExpression(`bar`)]), createBlockStatement([createCallExpression('baz')]) ) ) ]) }), { ssr: true, mode: 'module' } ) expect(code).toMatchInlineSnapshot(` " export function ssrRender(_ctx, _push, _parent) { if (foo) { foo() } else if (bar) { bar() } else { baz() } }" `) }) }) test('AssignmentExpression', () => { const { code } = generate( createRoot({ codegenNode: createAssignmentExpression( createSimpleExpression(`foo`, false), createSimpleExpression(`bar`, false) ) }) ) expect(code).toMatchInlineSnapshot(` " return function render(_ctx, _cache) { with (_ctx) { return foo = bar } }" `) }) describe('VNodeCall', () => { function genCode(node: VNodeCall) { return generate( createRoot({ codegenNode: node }) ).code.match(/with \(_ctx\) \{\s+([^]+)\s+\}\s+\}$/)![1] } const mockProps = createObjectExpression([ createObjectProperty(`foo`, createSimpleExpression(`bar`, true)) ]) const mockChildren = createCompoundExpression(['children']) const mockDirs = createArrayExpression([ createArrayExpression([`foo`, createSimpleExpression(`bar`, false)]) ]) as DirectiveArguments test('tag only', () => { expect(genCode(createVNodeCall(null, `"div"`))).toMatchInlineSnapshot(` "return _createVNode(\\"div\\") " `) expect(genCode(createVNodeCall(null, FRAGMENT))).toMatchInlineSnapshot(` "return _createVNode(_Fragment) " `) }) test('with props', () => { expect(genCode(createVNodeCall(null, `"div"`, mockProps))) .toMatchInlineSnapshot(` "return _createVNode(\\"div\\", { foo: \\"bar\\" }) " `) }) test('with children, no props', () => { expect(genCode(createVNodeCall(null, `"div"`, undefined, mockChildren))) .toMatchInlineSnapshot(` "return _createVNode(\\"div\\", null, children) " `) }) test('with children + props', () => { expect(genCode(createVNodeCall(null, `"div"`, mockProps, mockChildren))) .toMatchInlineSnapshot(` "return _createVNode(\\"div\\", { foo: \\"bar\\" }, children) " `) }) test('with patchFlag and no children/props', () => { expect(genCode(createVNodeCall(null, `"div"`, undefined, undefined, '1'))) .toMatchInlineSnapshot(` "return _createVNode(\\"div\\", null, null, 1) " `) }) test('as block', () => { expect( genCode( createVNodeCall( null, `"div"`, mockProps, mockChildren, undefined, undefined, undefined, true ) ) ).toMatchInlineSnapshot(` "return (_openBlock(), _createBlock(\\"div\\", { foo: \\"bar\\" }, children)) " `) }) test('as for block', () => { expect( genCode( createVNodeCall( null, `"div"`, mockProps, mockChildren, undefined, undefined, undefined, true, true ) ) ).toMatchInlineSnapshot(` "return (_openBlock(true), _createBlock(\\"div\\", { foo: \\"bar\\" }, children)) " `) }) test('with directives', () => { expect( genCode( createVNodeCall( null, `"div"`, mockProps, mockChildren, undefined, undefined, mockDirs ) ) ).toMatchInlineSnapshot(` "return _withDirectives(_createVNode(\\"div\\", { foo: \\"bar\\" }, children), [ [foo, bar] ]) " `) }) test('block + directives', () => { expect( genCode( createVNodeCall( null, `"div"`, mockProps, mockChildren, undefined, undefined, mockDirs, true ) ) ).toMatchInlineSnapshot(` "return _withDirectives((_openBlock(), _createBlock(\\"div\\", { foo: \\"bar\\" }, children)), [ [foo, bar] ]) " `) }) }) })
packages/compiler-core/__tests__/codegen.spec.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.0006892987294122577, 0.00018766960420180112, 0.00016390516248065978, 0.00017120024131145328, 0.00007555229967692867 ]
{ "id": 2, "code_window": [ " _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 65 }
import { isObject } from '@vue/shared' import { warn } from '../warning' // For prefixing keys in v-on="obj" with "on" export function toHandlers(obj: Record<string, any>): Record<string, any> { const ret: Record<string, any> = {} if (__DEV__ && !isObject(obj)) { warn(`v-on with no argument expects an object value.`) return ret } for (const key in obj) { ret[`on${key}`] = obj[key] } return ret }
packages/runtime-core/src/helpers/toHandlers.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.0001750016090227291, 0.00016927931574173272, 0.0001635570079088211, 0.00016927931574173272, 0.000005722300556953996 ]
{ "id": 2, "code_window": [ " _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\\\\" \\\\\", 1 /* TEXT */),\n", " (_ctx.ok)\n", " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }, \\\\\"yes\\\\\"))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [\n", " _createTextVNode(\\\\\"no\\\\\")\n", " ])),\n", " (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {\n", " return (_openBlock(), _createBlock(\\\\\"div\\\\\", null, [\n", " _createVNode(\\\\\"span\\\\\", null, _toDisplayString(value + index), 1 /* TEXT */)\n", " ]))\n", " }), 256 /* UNKEYED_FRAGMENT */))\n" ], "labels": [ "keep", "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */)),\n" ], "file_path": "packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap", "type": "replace", "edit_start_line_idx": 65 }
import { baseParse as parse, transform, NodeTypes, generate, CompilerOptions } from '../../src' import { transformOnce } from '../../src/transforms/vOnce' import { transformElement } from '../../src/transforms/transformElement' import { RENDER_SLOT, SET_BLOCK_TRACKING } from '../../src/runtimeHelpers' import { transformBind } from '../../src/transforms/vBind' import { transformSlotOutlet } from '../../src/transforms/transformSlotOutlet' function transformWithOnce(template: string, options: CompilerOptions = {}) { const ast = parse(template) transform(ast, { nodeTransforms: [transformOnce, transformElement, transformSlotOutlet], directiveTransforms: { bind: transformBind }, ...options }) return ast } describe('compiler: v-once transform', () => { test('as root node', () => { const root = transformWithOnce(`<div :id="foo" v-once />`) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect(root.codegenNode).toMatchObject({ type: NodeTypes.JS_CACHE_EXPRESSION, index: 1, value: { type: NodeTypes.VNODE_CALL, tag: `"div"` } }) expect(generate(root).code).toMatchSnapshot() }) test('on nested plain element', () => { const root = transformWithOnce(`<div><div :id="foo" v-once /></div>`) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect((root.children[0] as any).children[0].codegenNode).toMatchObject({ type: NodeTypes.JS_CACHE_EXPRESSION, index: 1, value: { type: NodeTypes.VNODE_CALL, tag: `"div"` } }) expect(generate(root).code).toMatchSnapshot() }) test('on component', () => { const root = transformWithOnce(`<div><Comp :id="foo" v-once /></div>`) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect((root.children[0] as any).children[0].codegenNode).toMatchObject({ type: NodeTypes.JS_CACHE_EXPRESSION, index: 1, value: { type: NodeTypes.VNODE_CALL, tag: `_component_Comp` } }) expect(generate(root).code).toMatchSnapshot() }) test('on slot outlet', () => { const root = transformWithOnce(`<div><slot v-once /></div>`) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect((root.children[0] as any).children[0].codegenNode).toMatchObject({ type: NodeTypes.JS_CACHE_EXPRESSION, index: 1, value: { type: NodeTypes.JS_CALL_EXPRESSION, callee: RENDER_SLOT } }) expect(generate(root).code).toMatchSnapshot() }) // cached nodes should be ignored by hoistStatic transform test('with hoistStatic: true', () => { const root = transformWithOnce(`<div><div v-once /></div>`, { hoistStatic: true }) expect(root.cached).toBe(1) expect(root.helpers).toContain(SET_BLOCK_TRACKING) expect(root.hoists.length).toBe(0) expect((root.children[0] as any).children[0].codegenNode).toMatchObject({ type: NodeTypes.JS_CACHE_EXPRESSION, index: 1, value: { type: NodeTypes.VNODE_CALL, tag: `"div"` } }) expect(generate(root).code).toMatchSnapshot() }) })
packages/compiler-core/__tests__/transforms/vOnce.spec.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017489217862021178, 0.00016945035895332694, 0.00016180911916308105, 0.0001706470939097926, 0.000003593359906517435 ]
{ "id": 3, "code_window": [ " ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n", " _createVNode(\\\\\"div\\\\\"),\n", " \\\\\"hello\\\\\",\n", " _createVNode(\\\\\"p\\\\\")\n", " ]))\n", " : _createCommentVNode(\\\\\"v-if\\\\\", true)\n", " }\n", "}\"\n", "`;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 28 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: integration tests function mode 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = _Vue return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: bar.baz }, [ _createTextVNode(_toDisplayString(world.burn()) + \\" \\", 1 /* TEXT */), ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) } }" `; exports[`compiler: integration tests function mode w/ prefixIdentifiers: true 1`] = ` "const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = Vue return function render(_ctx, _cache) { return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: _ctx.bar.baz }, [ _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), (_ctx.ok) ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) }" `; exports[`compiler: integration tests module mode 1`] = ` "import { toDisplayString as _toDisplayString, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList } from \\"vue\\" export function render(_ctx, _cache) { return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: _ctx.bar.baz }, [ _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), (_ctx.ok) ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) }" `;
packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.012805701233446598, 0.004138344898819923, 0.0002110437781084329, 0.002143397694453597, 0.004395502619445324 ]
{ "id": 3, "code_window": [ " ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n", " _createVNode(\\\\\"div\\\\\"),\n", " \\\\\"hello\\\\\",\n", " _createVNode(\\\\\"p\\\\\")\n", " ]))\n", " : _createCommentVNode(\\\\\"v-if\\\\\", true)\n", " }\n", "}\"\n", "`;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 28 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: transform text <template v-for> 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderList: _renderList, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock, createTextVNode: _createTextVNode } = _Vue return (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (i) => { return (_openBlock(), _createBlock(_Fragment, null, [ _createTextVNode(\\"foo\\") ], 64 /* STABLE_FRAGMENT */)) }), 256 /* UNKEYED_FRAGMENT */)) } }" `; exports[`compiler: transform text consecutive text 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { toDisplayString: _toDisplayString } = _Vue return _toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz) } }" `; exports[`compiler: transform text consecutive text between elements 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock } = _Vue return (_openBlock(), _createBlock(_Fragment, null, [ _createVNode(\\"div\\"), _createTextVNode(_toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz), 1 /* TEXT */), _createVNode(\\"div\\") ], 64 /* STABLE_FRAGMENT */)) } }" `; exports[`compiler: transform text consecutive text mixed with elements 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, toDisplayString: _toDisplayString, createTextVNode: _createTextVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock } = _Vue return (_openBlock(), _createBlock(_Fragment, null, [ _createVNode(\\"div\\"), _createTextVNode(_toDisplayString(foo) + \\" bar \\" + _toDisplayString(baz), 1 /* TEXT */), _createVNode(\\"div\\"), _createTextVNode(\\"hello\\"), _createVNode(\\"div\\") ], 64 /* STABLE_FRAGMENT */)) } }" `; exports[`compiler: transform text no consecutive text 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { toDisplayString: _toDisplayString } = _Vue return _toDisplayString(foo) } }" `; exports[`compiler: transform text text between elements (static) 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock } = _Vue return (_openBlock(), _createBlock(_Fragment, null, [ _createVNode(\\"div\\"), _createTextVNode(\\"hello\\"), _createVNode(\\"div\\") ], 64 /* STABLE_FRAGMENT */)) } }" `; exports[`compiler: transform text with prefixIdentifiers: true 1`] = ` "const { toDisplayString: _toDisplayString } = Vue return function render(_ctx, _cache) { return _toDisplayString(_ctx.foo) + \\" bar \\" + _toDisplayString(_ctx.baz + _ctx.qux) }" `;
packages/compiler-core/__tests__/transforms/__snapshots__/transformText.spec.ts.snap
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.01089528575539589, 0.002657442819327116, 0.0001649837795412168, 0.0009161001071333885, 0.0038653730880469084 ]
{ "id": 3, "code_window": [ " ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n", " _createVNode(\\\\\"div\\\\\"),\n", " \\\\\"hello\\\\\",\n", " _createVNode(\\\\\"p\\\\\")\n", " ]))\n", " : _createCommentVNode(\\\\\"v-if\\\\\", true)\n", " }\n", "}\"\n", "`;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 28 }
# @vue/compiler-sfc > Lower level utilities for compiling Vue single file components This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue single file components into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader). The API surface is intentionally minimal - the goal is to reuse as much as possible while being as flexible as possible. ## API TODO
packages/compiler-sfc/README.md
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00016878402675502002, 0.00016720544954296201, 0.000165626872330904, 0.00016720544954296201, 0.0000015785772120580077 ]
{ "id": 3, "code_window": [ " ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n", " _createVNode(\\\\\"div\\\\\"),\n", " \\\\\"hello\\\\\",\n", " _createVNode(\\\\\"p\\\\\")\n", " ]))\n", " : _createCommentVNode(\\\\\"v-if\\\\\", true)\n", " }\n", "}\"\n", "`;\n" ], "labels": [ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " ], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 28 }
import { ref, isRef } from '../src/ref' import { reactive, isReactive, toRaw, markNonReactive, shallowReactive } from '../src/reactive' import { mockWarn } from '@vue/shared' import { computed } from '../src/computed' describe('reactivity/reactive', () => { mockWarn() test('Object', () => { const original = { foo: 1 } const observed = reactive(original) expect(observed).not.toBe(original) expect(isReactive(observed)).toBe(true) expect(isReactive(original)).toBe(false) // get expect(observed.foo).toBe(1) // has expect('foo' in observed).toBe(true) // ownKeys expect(Object.keys(observed)).toEqual(['foo']) }) test('nested reactives', () => { const original = { nested: { foo: 1 }, array: [{ bar: 2 }] } const observed = reactive(original) expect(isReactive(observed.nested)).toBe(true) expect(isReactive(observed.array)).toBe(true) expect(isReactive(observed.array[0])).toBe(true) }) test('observed value should proxy mutations to original (Object)', () => { const original: any = { foo: 1 } const observed = reactive(original) // set observed.bar = 1 expect(observed.bar).toBe(1) expect(original.bar).toBe(1) // delete delete observed.foo expect('foo' in observed).toBe(false) expect('foo' in original).toBe(false) }) test('setting a property with an unobserved value should wrap with reactive', () => { const observed = reactive<{ foo?: object }>({}) const raw = {} observed.foo = raw expect(observed.foo).not.toBe(raw) expect(isReactive(observed.foo)).toBe(true) }) test('observing already observed value should return same Proxy', () => { const original = { foo: 1 } const observed = reactive(original) const observed2 = reactive(observed) expect(observed2).toBe(observed) }) test('observing the same value multiple times should return same Proxy', () => { const original = { foo: 1 } const observed = reactive(original) const observed2 = reactive(original) expect(observed2).toBe(observed) }) test('should not pollute original object with Proxies', () => { const original: any = { foo: 1 } const original2 = { bar: 2 } const observed = reactive(original) const observed2 = reactive(original2) observed.bar = observed2 expect(observed.bar).toBe(observed2) expect(original.bar).toBe(original2) }) test('unwrap', () => { const original = { foo: 1 } const observed = reactive(original) expect(toRaw(observed)).toBe(original) expect(toRaw(original)).toBe(original) }) test('should not unwrap Ref<T>', () => { const observedNumberRef = reactive(ref(1)) const observedObjectRef = reactive(ref({ foo: 1 })) expect(isRef(observedNumberRef)).toBe(true) expect(isRef(observedObjectRef)).toBe(true) }) test('should unwrap computed refs', () => { // readonly const a = computed(() => 1) // writable const b = computed({ get: () => 1, set: () => {} }) const obj = reactive({ a, b }) // check type obj.a + 1 obj.b + 1 expect(typeof obj.a).toBe(`number`) expect(typeof obj.b).toBe(`number`) }) test('non-observable values', () => { const assertValue = (value: any) => { reactive(value) expect( `value cannot be made reactive: ${String(value)}` ).toHaveBeenWarnedLast() } // number assertValue(1) // string assertValue('foo') // boolean assertValue(false) // null assertValue(null) // undefined assertValue(undefined) // symbol const s = Symbol() assertValue(s) // built-ins should work and return same value const p = Promise.resolve() expect(reactive(p)).toBe(p) const r = new RegExp('') expect(reactive(r)).toBe(r) const d = new Date() expect(reactive(d)).toBe(d) }) test('markNonReactive', () => { const obj = reactive({ foo: { a: 1 }, bar: markNonReactive({ b: 2 }) }) expect(isReactive(obj.foo)).toBe(true) expect(isReactive(obj.bar)).toBe(false) }) describe('shallowReactive', () => { test('should not make non-reactive properties reactive', () => { const props = shallowReactive({ n: { foo: 1 } }) expect(isReactive(props.n)).toBe(false) }) test('should keep reactive properties reactive', () => { const props: any = shallowReactive({ n: reactive({ foo: 1 }) }) props.n = reactive({ foo: 2 }) expect(isReactive(props.n)).toBe(true) }) }) })
packages/reactivity/__tests__/reactive.spec.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.0003404627786949277, 0.0001838881435105577, 0.00016956152103375643, 0.00017498221131972969, 0.00003803065192187205 ]
{ "id": 4, "code_window": [ " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }))\n", " : orNot\n", " ? (_openBlock(), _createBlock(\\\\\"p\\\\\", { key: 1 }))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"]))\n", " }\n", "}\"\n", "`;\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 73 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: v-if codegen basic v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [ _createVNode(\\"div\\"), \\"hello\\", _createVNode(\\"p\\") ])) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen template v-if w/ single <slot/> child 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : (_openBlock(), _createBlock(\\"p\\", { key: 1 })) } }" `; exports[`compiler: v-if codegen v-if + v-else-if + v-else 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\"fine\\"])) } }" `; exports[`compiler: v-if codegen v-if + v-else-if 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 })) : orNot ? (_openBlock(), _createBlock(\\"p\\", { key: 1 })) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if on <slot/> 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue return ok ? _renderSlot($slots, \\"default\\", { key: 0 }) : _createCommentVNode(\\"v-if\\", true) } }" `; exports[`compiler: v-if codegen v-if with key 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode } = _Vue return ok ? (_openBlock(), _createBlock(\\"div\\", { key: \\"some-key\\" })) : _createCommentVNode(\\"v-if\\", true) } }" `;
packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.9664953947067261, 0.09766983985900879, 0.0001625740114832297, 0.000518975080922246, 0.261812686920166 ]
{ "id": 4, "code_window": [ " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }))\n", " : orNot\n", " ? (_openBlock(), _createBlock(\\\\\"p\\\\\", { key: 1 }))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"]))\n", " }\n", "}\"\n", "`;\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 73 }
# Vue.js Contributing Guide Hi! I'm really excited that you are interested in contributing to Vue.js. Before submitting your contribution, please make sure to take a moment and read through the following guidelines: - [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md) - [Issue Reporting Guidelines](#issue-reporting-guidelines) - [Pull Request Guidelines](#pull-request-guidelines) - [Development Setup](#development-setup) - [Project Structure](#project-structure) - [Contributing Tests](#contributing-tests) - [Financial Contribution](#financial-contribution) ## Issue Reporting Guidelines - Always use [https://new-issue.vuejs.org/](https://new-issue.vuejs.org/) to create new issues. ## Pull Request Guidelines - Checkout a topic branch from a base branch, e.g. `master`, and merge back against that branch. - If adding a new feature: - Add accompanying test case. - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. - If fixing bug: - If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`. - Provide a detailed description of the bug in the PR. Live demo preferred. - Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `yarn test --coverage`. - It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging. - Make sure tests pass! - Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)). - No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)). ## Development Setup You will need [Node.js](http://nodejs.org) **version 10+**, and [Yarn](https://yarnpkg.com/en/docs/install). After cloning the repo, run: ```bash $ yarn # install the dependencies of the project ``` A high level overview of tools used: - [TypeScript](https://www.typescriptlang.org/) as the development language - [Rollup](https://rollupjs.org) for bundling - [Jest](https://jestjs.io/) for unit testing - [Prettier](https://prettier.io/) for code formatting ## Scripts ### `yarn build` The `build` script builds all public packages (packages without `private: true` in their `package.json`). Packages to build can be specified with fuzzy matching: ```bash # build runtime-core only yarn build runtime-core # build all packages matching "runtime" yarn build runtime --all ``` #### Build Formats By default, each package will be built in multiple distribution formats as specified in the `buildOptions.formats` field in its `package.json`. These can be overwritten via the `-f` flag. The following formats are supported: - **`global`**: - For direct use via `<script>` in the browser. The global variable exposed is specified via the `buildOptions.name` field in a package's `package.json`. - Note: global builds are not [UMD](https://github.com/umdjs/umd) builds. Instead they are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE). - **`esm-bundler`**: - Leaves prod/dev branches with `process.env.NODE_ENV` guards (to be replaced by bundler) - Does not ship a minified build (to be done together with the rest of the code after bundling) - For use with bundlers like `webpack`, `rollup` and `parcel`. - Imports dependencies (e.g. `@vue/runtime-core`, `@vue/runtime-compiler`) - Imported dependencies are also `esm-bundler` builds and will in turn import their dependencies (e.g. `@vue/runtime-core` imports `@vue/reactivity`) - This means you **can** install/import these deps without ending up with different instances of these dependencies - **`esm`**: - For usage via native ES modules imports (in browser via `<script type="module">`, or via Node.js native ES modules support in the future) - Inlines all dependencies - i.e. it's a single ES module with no imports from other files - This means you **must** import everything from this file and this file only to ensure you are getting the same instance of code. - Hard-coded prod/dev branches, and the prod build is pre-minified (you will have to use different paths/aliases for dev/prod) - **`cjs`**: - For use in Node.js server-side rendering via `require()`. - The dev/prod files are pre-built, but are dynamically required based on `process.env.NODE_ENV` in `index.js`, which is the default entry when you do `require('vue')`. For example, to build `runtime-core` with the global build only: ```bash yarn build runtime-core -f global ``` Multiple formats can be specified as a comma-separated list: ```bash yarn build runtime-core -f esm,cjs ``` #### Build with Source Maps Use the `--sourcemap` or `-s` flag to build with source maps. Note this will make the build much slower. #### Build with Type Declarations The `--types` or `-t` flag will generate type declarations during the build and in addition: - Roll the declarations into a single `.d.ts` file for each package; - Generate an API report in `<projectRoot>/temp/<packageName>.api.md`. This report contains potential warnings emitted by [api-extractor](https://api-extractor.com/). - Generate an API model json in `<projectRoot>/temp/<packageName>.api.json`. This file can be used to generate a Markdown version of the exported APIs. ### `yarn dev` The `dev` script bundles a target package (default: `vue`) in a specified format (default: `global`) in dev mode and watches for changes. This is useful when you want to load up a build in an HTML page for quick debugging: ```bash $ yarn dev > rollup v1.19.4 > bundles packages/vue/src/index.ts → packages/vue/dist/vue.global.js... ``` - The `dev` script also supports fuzzy match for the target package, but will only match the first package matched. - The `dev` script supports specifying build format via the `-f` flag just like the `build` script. - The `dev` script also supports the `-s` flag for generating source maps, but it will make rebuilds slower. ### `yarn test` The `yarn test` script simply calls the `jest` binary, so all [Jest CLI Options](https://jestjs.io/docs/en/cli) can be used. Some examples: ```bash # run all tests $ yarn test # run tests in watch mode $ yarn test --watch # run all tests under the runtime-core package $ yarn test runtime-core # run tests in a specific file $ yarn test fileName # run a specific test in a specific file $ yarn test fileName -t 'test name' ``` ## Project Structure This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) setup which hosts a number of associated packages under the `packages` directory: - `reactivity`: The reactivity system. It can be used standalone as a framework-agnostic package. - `runtime-core`: The platform-agnostic runtime core. Includes code for the virtual dom renderer, component implementation and JavaScript APIs. Higher-order runtimes (i.e. custom renderers) targeting specific platforms can be created using this package. - `runtime-dom`: The runtime targeting the browser. Includes handling of native DOM API, attributes, properties, event handlers etc. - `runtime-test`: The lightweight runtime for testing. Can be used in any JavaScript environment since it "renders" a tree of plain JavaScript objects. The tree can be used to assert correct render output. Also provides utilities for serializing the tree, triggering events, and recording actual node operations performed during an update. - `server-renderer`: Package for server-side rendering. - `compiler-core`: The platform-agnostic compiler core. Includes the extensible base of the compiler and all platform-agnostic plugins. - `compiler-dom`: Compiler with additional plugins specifically targeting the browser. - `compiler-ssr`: Compiler that produces render functions optimized for server-side rendering. - `template-explorer`: A development tool for debugging compiler output. You can run `yarn dev template-explorer` and open its `index.html` to get a repl of template compilation based on current source code. A [live version](https://vue-next-template-explorer.netlify.com) of the template explorer is also available, which can be used for providing reproductions for compiler bugs. You can also pick the deployment for a specific commit from the [deploy logs](https://app.netlify.com/sites/vue-next-template-explorer/deploys). - `shared`: Internal utilities shared across multiple packages (especially environment-agnostic utils used by both runtime and compiler packages). - `vue`: The public facing "full build" which includes both the runtime AND the compiler. ### Importing Packages The packages can import each other directly using their package names. Note that when importing a package, the name listed in its `package.json` should be used. Most of the time the `@vue/` prefix is needed: ```js import { h } from '@vue/runtime-core' ``` This is made possible via several configurations: - For TypeScript, `compilerOptions.path` in `tsconfig.json` - For Jest, `moduleNameMapper` in `jest.config.js` - For plain Node.js, they are linked using [Yarn Workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/). ### Package Dependencies ``` +---------------------+ | | | @vue/compiler-sfc | | | +-----+--------+------+ | | v v +---------------------+ +----------------------+ | | | | +------------>| @vue/compiler-dom +--->| @vue/compiler-core | | | | | | +----+----+ +---------------------+ +----------------------+ | | | vue | | | +----+----+ +---------------------+ +----------------------+ +-------------------+ | | | | | | | +------------>| @vue/runtime-dom +--->| @vue/runtime-core +--->| @vue/reactivity | | | | | | | +---------------------+ +----------------------+ +-------------------+ ``` There are some rules to follow when importing across package boundaries: - Never use direct relative paths when importing items from another package - export it in the source package and import it at the package level. - Compiler packages should not import items from the runtime, and vice versa. If something needs to be shared between the compiler-side and runtime-side, it should be extracted into `@vue/shared` instead. - If a package (A) has a non-type import from another package (B), package (B) should be listed as a dependency in the `package.json` of package (A). This is because the packages are externalized in the ESM-bundler/CJS builds and type declaration files, so the dependency packages must be actually installed as a dependency when consumed from package registries. ## Contributing Tests Unit tests are collocated with the code being tested in each package, inside directories named `__tests__`. Consult the [Jest docs](https://jestjs.io/docs/en/using-matchers) and existing test cases for how to write new test specs. Here are some additional guidelines: - Use the minimal API needed for a test case. For example, if a test can be written without involving the reactivity system or a component, it should be written so. This limits the test's exposure to changes in unrelated parts and makes it more stable. - If testing platform agnostic behavior or asserting low-level virtual DOM operations, use `@vue/runtime-test`. - Only use platform-specific runtimes if the test is asserting platform-specific behavior. ### Testing Type Definition Correctness This project uses [tsd](https://github.com/SamVerschueren/tsd) to test the built definition files (`*.d.ts`). Type tests are located in the `test-dts` directory. To run the dts tests, run `yarn test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by simply running `./node_modules/.bin/tsd`. ## Financial Contribution As a pure community-driven project without major corporate backing, we also welcome financial contributions via Patreon and OpenCollective. - [Become a backer or sponsor on Patreon](https://www.patreon.com/evanyou) - [Become a backer or sponsor on OpenCollective](https://opencollective.com/vuejs) ### What's the difference between Patreon and OpenCollective funding? Funds donated via Patreon go directly to support Evan You's full-time work on Vue.js. Funds donated via OpenCollective are managed with transparent expenses and will be used for compensating work and expenses for core team members or sponsoring community events. Your name/logo will receive proper recognition and exposure by donating on either platform. ## Credits Thank you to all the people who have already contributed to Vue.js! <a href="https://github.com/vuejs/vue/graphs/contributors"><img src="https://opencollective.com/vuejs/contributors.svg?width=890" /></a>
.github/contributing.md
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00017568693147040904, 0.0001698652922641486, 0.0001608534948900342, 0.0001705674803815782, 0.0000031086465241969563 ]
{ "id": 4, "code_window": [ " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }))\n", " : orNot\n", " ? (_openBlock(), _createBlock(\\\\\"p\\\\\", { key: 1 }))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"]))\n", " }\n", "}\"\n", "`;\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 73 }
{ "name": "@vue/runtime-dom", "version": "3.0.0-alpha.9", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", "types": "dist/runtime-dom.d.ts", "unpkg": "dist/runtime-dom.global.js", "files": [ "index.js", "dist" ], "sideEffects": false, "buildOptions": { "name": "VueRuntimeDOM", "formats": [ "esm-bundler", "cjs", "global", "esm" ], "dts": [ "jsx.d.ts" ] }, "repository": { "type": "git", "url": "git+https://github.com/vuejs/vue-next.git" }, "keywords": [ "vue" ], "author": "Evan You", "license": "MIT", "bugs": { "url": "https://github.com/vuejs/vue-next/issues" }, "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-dom#readme", "dependencies": { "@vue/shared": "3.0.0-alpha.9", "@vue/runtime-core": "3.0.0-alpha.9", "csstype": "^2.6.8" } }
packages/runtime-dom/package.json
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.0001761950843501836, 0.0001741701562423259, 0.00017127700266428292, 0.00017440822557546198, 0.0000016257311017398024 ]
{ "id": 4, "code_window": [ " ? (_openBlock(), _createBlock(\\\\\"div\\\\\", { key: 0 }))\n", " : orNot\n", " ? (_openBlock(), _createBlock(\\\\\"p\\\\\", { key: 1 }))\n", " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"]))\n", " }\n", "}\"\n", "`;\n", "\n" ], "labels": [ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ], "after_edit": [ " : (_openBlock(), _createBlock(_Fragment, { key: 2 }, [\\\\\"fine\\\\\"], 64 /* STABLE_FRAGMENT */))\n" ], "file_path": "packages/compiler-core/__tests__/transforms/__snapshots__/vIf.spec.ts.snap", "type": "replace", "edit_start_line_idx": 73 }
import { registerRuntimeHelpers } from '@vue/compiler-dom' export const SSR_INTERPOLATE = Symbol(`ssrInterpolate`) export const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`) export const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`) export const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`) export const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`) export const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`) export const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`) export const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`) export const SSR_RENDER_LIST = Symbol(`ssrRenderList`) export const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`) export const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`) export const SSR_RENDER_DYNAMIC_MODEL = Symbol(`ssrRenderDynamicModel`) export const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`ssrGetDynamicModelProps`) export const SSR_RENDER_PORTAL = Symbol(`ssrRenderPortal`) export const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`) export const ssrHelpers = { [SSR_INTERPOLATE]: `ssrInterpolate`, [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, [SSR_RENDER_SLOT]: `ssrRenderSlot`, [SSR_RENDER_CLASS]: `ssrRenderClass`, [SSR_RENDER_STYLE]: `ssrRenderStyle`, [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, [SSR_RENDER_ATTR]: `ssrRenderAttr`, [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, [SSR_RENDER_LIST]: `ssrRenderList`, [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, [SSR_RENDER_PORTAL]: `ssrRenderPortal`, [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense` } // Note: these are helpers imported from @vue/server-renderer // make sure the names match! registerRuntimeHelpers(ssrHelpers)
packages/compiler-ssr/src/runtimeHelpers.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.00021346521680243313, 0.0001911167346406728, 0.00016754711396060884, 0.0001917272893479094, 0.000021623834982165135 ]
{ "id": 5, "code_window": [ " FRAGMENT,\n", " CREATE_COMMENT,\n", " OPEN_BLOCK\n", "} from '../runtimeHelpers'\n", "import { injectProp } from '../utils'\n", "\n", "export const transformIf = createStructuralDirectiveTransform(\n", " /^(if|else|else-if)$/,\n", " (node, dir, context) => {\n", " return processIf(node, dir, context, (ifNode, branch, isRoot) => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { PatchFlags, PatchFlagNames } from '@vue/shared'\n" ], "file_path": "packages/compiler-core/src/transforms/vIf.ts", "type": "add", "edit_start_line_idx": 31 }
// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`compiler: integration tests function mode 1`] = ` "const _Vue = Vue return function render(_ctx, _cache) { with (_ctx) { const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = _Vue return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: bar.baz }, [ _createTextVNode(_toDisplayString(world.burn()) + \\" \\", 1 /* TEXT */), ok ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) } }" `; exports[`compiler: integration tests function mode w/ prefixIdentifiers: true 1`] = ` "const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = Vue return function render(_ctx, _cache) { return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: _ctx.bar.baz }, [ _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), (_ctx.ok) ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) }" `; exports[`compiler: integration tests module mode 1`] = ` "import { toDisplayString as _toDisplayString, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList } from \\"vue\\" export function render(_ctx, _cache) { return (_openBlock(), _createBlock(\\"div\\", { id: \\"foo\\", class: _ctx.bar.baz }, [ _createTextVNode(_toDisplayString(_ctx.world.burn()) + \\" \\", 1 /* TEXT */), (_ctx.ok) ? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\")) : (_openBlock(), _createBlock(_Fragment, { key: 1 }, [ _createTextVNode(\\"no\\") ])), (_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => { return (_openBlock(), _createBlock(\\"div\\", null, [ _createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */) ])) }), 256 /* UNKEYED_FRAGMENT */)) ], 2 /* CLASS */)) }" `;
packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap
1
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.000457543705124408, 0.00024974916595965624, 0.00016460461483802646, 0.0001975683553609997, 0.00011140044080093503 ]
{ "id": 5, "code_window": [ " FRAGMENT,\n", " CREATE_COMMENT,\n", " OPEN_BLOCK\n", "} from '../runtimeHelpers'\n", "import { injectProp } from '../utils'\n", "\n", "export const transformIf = createStructuralDirectiveTransform(\n", " /^(if|else|else-if)$/,\n", " (node, dir, context) => {\n", " return processIf(node, dir, context, (ifNode, branch, isRoot) => {\n" ], "labels": [ "keep", "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ], "after_edit": [ "import { PatchFlags, PatchFlagNames } from '@vue/shared'\n" ], "file_path": "packages/compiler-core/src/transforms/vIf.ts", "type": "add", "edit_start_line_idx": 31 }
import { NodeTransform, NodeTypes, ElementTypes, createCallExpression, resolveComponentType, buildProps, ComponentNode, SlotFnBuilder, createFunctionExpression, buildSlots, FunctionExpression, TemplateChildNode, PORTAL, createIfStatement, createSimpleExpression, getBaseTransformPreset, DOMNodeTransforms, DOMDirectiveTransforms, createReturnStatement, ReturnStatement, Namespaces, locStub, RootNode, TransformContext, CompilerOptions, TransformOptions, createRoot, createTransformContext, traverseNode, ExpressionNode, TemplateNode, SUSPENSE, TRANSITION_GROUP } from '@vue/compiler-dom' import { SSR_RENDER_COMPONENT } from '../runtimeHelpers' import { SSRTransformContext, processChildren, processChildrenAsStatement } from '../ssrCodegenTransform' import { ssrProcessPortal } from './ssrTransformPortal' import { ssrProcessSuspense, ssrTransformSuspense } from './ssrTransformSuspense' import { isSymbol, isObject, isArray } from '@vue/shared' // We need to construct the slot functions in the 1st pass to ensure proper // scope tracking, but the children of each slot cannot be processed until // the 2nd pass, so we store the WIP slot functions in a weakmap during the 1st // pass and complete them in the 2nd pass. const wipMap = new WeakMap<ComponentNode, WIPSlotEntry[]>() interface WIPSlotEntry { fn: FunctionExpression children: TemplateChildNode[] vnodeBranch: ReturnStatement } const componentTypeMap = new WeakMap<ComponentNode, symbol>() // ssr component transform is done in two phases: // In phase 1. we use `buildSlot` to analyze the children of the component into // WIP slot functions (it must be done in phase 1 because `buildSlot` relies on // the core transform context). // In phase 2. we convert the WIP slots from phase 1 into ssr-specific codegen // nodes. export const ssrTransformComponent: NodeTransform = (node, context) => { if ( node.type !== NodeTypes.ELEMENT || node.tagType !== ElementTypes.COMPONENT ) { return } const component = resolveComponentType(node, context, true /* ssr */) if (isSymbol(component)) { componentTypeMap.set(node, component) if (component === SUSPENSE) { return ssrTransformSuspense(node, context) } return // built-in component: fallthrough } // Build the fallback vnode-based branch for the component's slots. // We need to clone the node into a fresh copy and use the buildSlots' logic // to get access to the children of each slot. We then compile them with // a child transform pipeline using vnode-based transforms (instead of ssr- // based ones), and save the result branch (a ReturnStatement) in an array. // The branch is retrieved when processing slots again in ssr mode. const vnodeBranches: ReturnStatement[] = [] const clonedNode = clone(node) return function ssrPostTransformComponent() { // Using the cloned node, build the normal VNode-based branches (for // fallback in case the child is render-fn based). Store them in an array // for later use. buildSlots(clonedNode, context, (props, children) => { vnodeBranches.push(createVNodeSlotBranch(props, children, context)) return createFunctionExpression(undefined) }) const props = node.props.length > 0 ? // note we are not passing ssr: true here because for components, v-on // handlers should still be passed buildProps(node, context).props || `null` : `null` const wipEntries: WIPSlotEntry[] = [] wipMap.set(node, wipEntries) const buildSSRSlotFn: SlotFnBuilder = (props, children, loc) => { const fn = createFunctionExpression( [props || `_`, `_push`, `_parent`, `_scopeId`], undefined, // no return, assign body later true, // newline true, // isSlot loc ) wipEntries.push({ fn, children, // also collect the corresponding vnode branch built earlier vnodeBranch: vnodeBranches[wipEntries.length] }) return fn } const slots = node.children.length ? buildSlots(node, context, buildSSRSlotFn).slots : `null` node.ssrCodegenNode = createCallExpression( context.helper(SSR_RENDER_COMPONENT), [component, props, slots, `_parent`] ) } } export function ssrProcessComponent( node: ComponentNode, context: SSRTransformContext ) { if (!node.ssrCodegenNode) { // this is a built-in component that fell-through. const component = componentTypeMap.get(node)! if (component === PORTAL) { return ssrProcessPortal(node, context) } else if (component === SUSPENSE) { return ssrProcessSuspense(node, context) } else { // real fall-through (e.g. KeepAlive): just render its children. processChildren(node.children, context, component === TRANSITION_GROUP) } } else { // finish up slot function expressions from the 1st pass. const wipEntries = wipMap.get(node) || [] for (let i = 0; i < wipEntries.length; i++) { const { fn, children, vnodeBranch } = wipEntries[i] // For each slot, we generate two branches: one SSR-optimized branch and // one normal vnode-based branch. The branches are taken based on the // presence of the 2nd `_push` argument (which is only present if the slot // is called by `_ssrRenderSlot`. fn.body = createIfStatement( createSimpleExpression(`_push`, false), processChildrenAsStatement( children, context, false, true /* withSlotScopeId */ ), vnodeBranch ) } context.pushStatement(createCallExpression(`_push`, [node.ssrCodegenNode])) } } export const rawOptionsMap = new WeakMap<RootNode, CompilerOptions>() const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset( true ) const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms] const vnodeDirectiveTransforms = { ...baseDirectiveTransforms, ...DOMDirectiveTransforms } function createVNodeSlotBranch( props: ExpressionNode | undefined, children: TemplateChildNode[], parentContext: TransformContext ): ReturnStatement { // apply a sub-transform using vnode-based transforms. const rawOptions = rawOptionsMap.get(parentContext.root)! const subOptions = { ...rawOptions, // overwrite with vnode-based transforms nodeTransforms: [ ...vnodeNodeTransforms, ...(rawOptions.nodeTransforms || []) ], directiveTransforms: { ...vnodeDirectiveTransforms, ...(rawOptions.directiveTransforms || {}) } } // wrap the children with a wrapper template for proper children treatment. const wrapperNode: TemplateNode = { type: NodeTypes.ELEMENT, ns: Namespaces.HTML, tag: 'template', tagType: ElementTypes.TEMPLATE, isSelfClosing: false, // important: provide v-slot="props" on the wrapper for proper // scope analysis props: [ { type: NodeTypes.DIRECTIVE, name: 'slot', exp: props, arg: undefined, modifiers: [], loc: locStub } ], children, loc: locStub, codegenNode: undefined } subTransform(wrapperNode, subOptions, parentContext) return createReturnStatement(children) } function subTransform( node: TemplateChildNode, options: TransformOptions, parentContext: TransformContext ) { const childRoot = createRoot([node]) const childContext = createTransformContext(childRoot, options) // this sub transform is for vnode fallback branch so it should be handled // like normal render functions childContext.ssr = false // inherit parent scope analysis state childContext.scopes = { ...parentContext.scopes } childContext.identifiers = { ...parentContext.identifiers } // traverse traverseNode(childRoot, childContext) // merge helpers/components/directives/imports into parent context ;(['helpers', 'components', 'directives', 'imports'] as const).forEach( key => { childContext[key].forEach((value: any) => { ;(parentContext[key] as any).add(value) }) } ) } function clone(v: any): any { if (isArray(v)) { return v.map(clone) } else if (isObject(v)) { const res: any = {} for (const key in v) { res[key] = clone(v[key]) } return res } else { return v } }
packages/compiler-ssr/src/transforms/ssrTransformComponent.ts
0
https://github.com/vuejs/core/commit/a1da9c28a0a7030124b1deb9369685760c67be47
[ 0.0008603372843936086, 0.00025040845503099263, 0.00016643726848997176, 0.00020535907242447138, 0.00013527122791856527 ]