conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import { markdownLinkBuilder } from '../../../../../../../storybook-utilities/markdownLinkBuilder';
=======
import { SprkMastheadAccordionComponent } from './sprk-masthead-accordion/sprk-masthead-accordion.component';
import { SprkMastheadAccordionItemComponent } from './sprk-masthead-accordion-item/sprk-masthead-accordion-item.component';
>>>>>>>
import { markdownLinkBuilder } from '../../../../../../../storybook-utilities/markdownLinkBuilder';
import { SprkMastheadAccordionComponent } from './sprk-masthead-accordion/sprk-masthead-accordion.component';
import { SprkMastheadAccordionItemComponent } from './sprk-masthead-accordion-item/sprk-masthead-accordion-item.component';
<<<<<<<
info: markdownLinkBuilder('masthead'),
=======
subcomponents: {
SprkMastheadAccordionComponent,
SprkMastheadAccordionItemComponent,
},
info: `
##### For design and usage information check out the [documentation.](https://spark-docs.netlify.com/using-spark/components/masthead)
`,
>>>>>>>
subcomponents: {
SprkMastheadAccordionComponent,
SprkMastheadAccordionItemComponent,
},
info: markdownLinkBuilder('masthead'), |
<<<<<<<
import { SprkLabelDirective } from './directives/inputs/sprk-label/sprk-label.directive';
import { SprkSelectionLabelDirective } from './directives/inputs/sprk-selection-label/sprk-selection-label.directive';
import { SprkInputDirective } from './directives/inputs/sprk-input/sprk-input.directive';
import { SprkSelectionInputDirective } from './directives/inputs/sprk-selection-input/sprk-selection-input.directive';
import { SprkHelperTextDirective} from './directives/inputs/sprk-helper-text/sprk-helper-text.directive';
import { SprkFieldErrorDirective } from './directives/inputs/sprk-field-error/sprk-field-error.directive';
import { SprkFormatterPhoneNumberDirective } from './directives/inputs/formatters/sprk-formatter-phone-number/sprk-formatter-phone-number.directive';
import { SprkFormatterDateDirective } from './directives/inputs/formatters/sprk-formatter-date/sprk-formatter-date.directive';
import { SprkFormatterMonetaryDirective } from './directives/inputs/formatters/sprk-formatter-monetary/sprk-formatter-monetary.directive';
import { SprkFormatterSsnDirective } from './directives/inputs/formatters/sprk-formatter-ssn/sprk-formatter-ssn.directive';
import TinyDatePicker from 'tiny-date-picker';
=======
import { SparkPromoComponent } from './components/sprk-promo/sprk-promo.component';
>>>>>>>
import { SprkLabelDirective } from './directives/inputs/sprk-label/sprk-label.directive';
import { SprkSelectionLabelDirective } from './directives/inputs/sprk-selection-label/sprk-selection-label.directive';
import { SprkInputDirective } from './directives/inputs/sprk-input/sprk-input.directive';
import { SprkSelectionInputDirective } from './directives/inputs/sprk-selection-input/sprk-selection-input.directive';
import { SprkHelperTextDirective} from './directives/inputs/sprk-helper-text/sprk-helper-text.directive';
import { SprkFieldErrorDirective } from './directives/inputs/sprk-field-error/sprk-field-error.directive';
import { SprkFormatterPhoneNumberDirective } from './directives/inputs/formatters/sprk-formatter-phone-number/sprk-formatter-phone-number.directive';
import { SprkFormatterDateDirective } from './directives/inputs/formatters/sprk-formatter-date/sprk-formatter-date.directive';
import { SprkFormatterMonetaryDirective } from './directives/inputs/formatters/sprk-formatter-monetary/sprk-formatter-monetary.directive';
import { SprkFormatterSsnDirective } from './directives/inputs/formatters/sprk-formatter-ssn/sprk-formatter-ssn.directive';
import TinyDatePicker from 'tiny-date-picker';
import { SparkPromoComponent } from './components/sprk-promo/sprk-promo.component';
<<<<<<<
SparkStackItemDirective,
SparkInputContainerComponent,
SparkSelectionContainerComponent,
SparkSelectionItemContainerComponent,
SparkMastheadComponent,
SprkInputDirective,
SprkSelectionInputDirective,
SprkHelperTextDirective,
SprkLabelDirective,
SprkSelectionLabelDirective,
SprkFieldErrorDirective,
SprkFormatterPhoneNumberDirective,
SprkFormatterDateDirective,
SprkFormatterMonetaryDirective,
SprkFormatterSsnDirective,
SprkDatepickerDirective,
=======
SparkStackItemDirective,
SparkPromoComponent
>>>>>>>
SparkStackItemDirective,
SparkInputContainerComponent,
SparkSelectionContainerComponent,
SparkSelectionItemContainerComponent,
SparkMastheadComponent,
SprkInputDirective,
SprkSelectionInputDirective,
SprkHelperTextDirective,
SprkLabelDirective,
SprkSelectionLabelDirective,
SprkFieldErrorDirective,
SprkFormatterPhoneNumberDirective,
SprkFormatterDateDirective,
SprkFormatterMonetaryDirective,
SprkFormatterSsnDirective,
SprkDatepickerDirective,
SparkStackItemDirective,
SparkPromoComponent
<<<<<<<
SparkStackItemDirective,
SparkMastheadComponent,
SprkInputDirective,
SprkSelectionInputDirective,
SprkHelperTextDirective,
SprkLabelDirective,
SprkSelectionLabelDirective,
SprkFieldErrorDirective,
SprkFormatterPhoneNumberDirective,
SprkFormatterDateDirective,
SprkFormatterMonetaryDirective,
SprkFormatterSsnDirective,
SprkDatepickerDirective,
=======
SparkStackItemDirective,
SparkPromoComponent
>>>>>>>
SparkStackItemDirective,
SparkPromoComponent,
SparkStackItemDirective,
SparkMastheadComponent,
SprkInputDirective,
SprkSelectionInputDirective,
SprkHelperTextDirective,
SprkLabelDirective,
SprkSelectionLabelDirective,
SprkFieldErrorDirective,
SprkFormatterPhoneNumberDirective,
SprkFormatterDateDirective,
SprkFormatterMonetaryDirective,
SprkFormatterSsnDirective,
SprkDatepickerDirective, |
<<<<<<<
import { dismissAlert } from '@sparkdesignsystem/spark-core/es5/alerts';
=======
>>>>>>>
import { dismissAlert } from '@sparkdesignsystem/spark-core/es5/alerts'; |
<<<<<<<
import { SparkTabbedNavigationComponent } from './components/sprk-tabbed-navigation/sprk-tabbed-navigation.component';
import { SprkTabbedNavigationTabDirective } from './directives/tabbed-navigation/sprk-tabbed-navigation-tab/sprk-tabbed-navigation-tab.directive';
import { SprkTabbedNavigationPanelDirective } from './directives/tabbed-navigation/sprk-tabbed-navigation-panel/sprk-tabbed-navigation-panel.directive';
=======
import { SparkDictionaryComponent } from './components/sprk-dictionary/sprk-dictionary.component';
>>>>>>>
import { SparkTabbedNavigationComponent } from './components/sprk-tabbed-navigation/sprk-tabbed-navigation.component';
import { SprkTabbedNavigationTabDirective } from './directives/tabbed-navigation/sprk-tabbed-navigation-tab/sprk-tabbed-navigation-tab.directive';
import { SprkTabbedNavigationPanelDirective } from './directives/tabbed-navigation/sprk-tabbed-navigation-panel/sprk-tabbed-navigation-panel.directive';
import { SparkDictionaryComponent } from './components/sprk-dictionary/sprk-dictionary.component';
<<<<<<<
SparkToggleComponent,
SparkTabbedNavigationComponent,
SprkTabbedNavigationTabDirective,
SprkTabbedNavigationPanelDirective
=======
SparkToggleComponent,
SparkDictionaryComponent
>>>>>>>
SparkToggleComponent,
SparkTabbedNavigationComponent,
SprkTabbedNavigationTabDirective,
SprkTabbedNavigationPanelDirective,
SparkToggleComponent,
SparkDictionaryComponent
<<<<<<<
SparkToggleComponent,
SparkTabbedNavigationComponent,
SprkTabbedNavigationTabDirective,
SprkTabbedNavigationPanelDirective
=======
SparkToggleComponent,
SparkDictionaryComponent
>>>>>>>
SparkToggleComponent,
SparkTabbedNavigationComponent,
SprkTabbedNavigationTabDirective,
SprkTabbedNavigationPanelDirective,
SparkToggleComponent,
SparkDictionaryComponent |
<<<<<<<
import { NavigationDocsComponent } from './navigation-docs/navigation-docs.component';
=======
import { DividerDocsComponent } from './divider-docs/divider-docs.component';
>>>>>>>
import { DividerDocsComponent } from './divider-docs/divider-docs.component';
import { NavigationDocsComponent } from './navigation-docs/navigation-docs.component';
<<<<<<<
NavigationDocsComponent
=======
DividerDocsComponent,
>>>>>>>
NavigationDocsComponent,
DividerDocsComponent, |
<<<<<<<
import { InputDocsComponent } from './input-docs/input-docs.component';
=======
import { CardDocsComponent } from './card-docs/card-docs.component';
import { StackDocsComponent } from './stack-docs/stack-docs.component';
>>>>>>>
import { InputDocsComponent } from './input-docs/input-docs.component';
import { CardDocsComponent } from './card-docs/card-docs.component';
import { StackDocsComponent } from './stack-docs/stack-docs.component';
<<<<<<<
{ path: 'inputs', component: InputDocsComponent },
=======
{ path: 'stack', component: StackDocsComponent },
>>>>>>>
{ path: 'inputs', component: InputDocsComponent },
{ path: 'stack', component: StackDocsComponent },
<<<<<<<
ListDocsComponent,
InputDocsComponent
=======
ListDocsComponent,
StackDocsComponent,
>>>>>>>
ListDocsComponent,
InputDocsComponent,
ListDocsComponent,
StackDocsComponent, |
<<<<<<<
let dropdownElement: HTMLElement;
let dropdownIconElement: HTMLElement;
let dropdownComponent: SprkMastheadSelectorComponent;
let dropdownTriggerElement: HTMLElement;
=======
let mastheadSelectorElement: HTMLElement;
let mastheadSelectorTriggerTextElement: HTMLElement;
let mastheadSelectorIconElement: HTMLElement;
let mastheadSelectorComponent: SprkMastheadSelectorComponent;
let mastheadSelectorTriggerElement: HTMLElement;
>>>>>>>
let mastheadSelectorElement: HTMLElement;
let mastheadSelectorTriggerTextElement: HTMLElement;
let mastheadSelectorIconElement: HTMLElement;
let mastheadSelectorComponent: SprkMastheadSelectorComponent;
let mastheadSelectorTriggerElement: HTMLElement;
<<<<<<<
dropdownTriggerElement = fixture.nativeElement.querySelector('a');
dropdownIconElement = fixture.nativeElement.querySelector('svg');
dropdownElement = fixture.nativeElement.querySelector('div');
=======
mastheadSelectorTriggerElement = fixture.nativeElement.querySelector('a');
mastheadSelectorIconElement = fixture.nativeElement.querySelector('svg');
mastheadSelectorTriggerTextElement = fixture.nativeElement.querySelector(
'span',
);
mastheadSelectorElement = fixture.nativeElement.querySelector('div');
>>>>>>>
mastheadSelectorTriggerElement = fixture.nativeElement.querySelector('a');
mastheadSelectorIconElement = fixture.nativeElement.querySelector('svg');
mastheadSelectorTriggerTextElement = fixture.nativeElement.querySelector(
'span',
);
mastheadSelectorElement = fixture.nativeElement.querySelector('div');
<<<<<<<
=======
it('should add the correct classes if additionalClasses are supplied', () => {
wrapperComponent.additionalClasses = 'sprk-u-pam sprk-u-man';
fixture.detectChanges();
expect(mastheadSelectorComponent.getClasses()).toEqual(
'sprk-c-Dropdown sprk-c-Masthead__selector-dropdown sprk-u-pam sprk-u-man',
);
});
>>>>>>>
<<<<<<<
it('should add data-analytics when analyticsString has a value', () => {
const testString = 'element-id';
wrapperComponent.analyticsString = testString;
fixture.detectChanges();
expect(dropdownTriggerElement.getAttribute('data-analytics')).toEqual(
testString,
);
});
it('should not add data-analytics when analyticsString has no value', () => {
wrapperComponent.analyticsString = null;
fixture.detectChanges();
expect(dropdownTriggerElement.getAttribute('data-analytics')).toBeNull();
});
it('should open the dropdown on click', () => {
dropdownTriggerElement.click();
=======
it('should open the Masthead Selector on click', () => {
mastheadSelectorTriggerElement.click();
>>>>>>>
it('should add data-analytics when analyticsString has a value', () => {
const testString = 'element-id';
wrapperComponent.analyticsString = testString;
fixture.detectChanges();
expect(
mastheadSelectorTriggerElement.getAttribute('data-analytics'),
).toEqual(testString);
});
it('should not add data-analytics when analyticsString has no value', () => {
wrapperComponent.analyticsString = null;
fixture.detectChanges();
expect(
mastheadSelectorTriggerElement.getAttribute('data-analytics'),
).toBeNull();
});
it('should open the Masthead Selector on click', () => {
mastheadSelectorTriggerElement.click();
<<<<<<<
=======
it('should set a value if triggerAdditionalClasses has a value', () => {
wrapperComponent.triggerAdditionalClasses = 'sprk-u-man';
fixture.detectChanges();
expect(
mastheadSelectorTriggerElement.classList.contains('sprk-u-man'),
).toEqual(true);
});
it('should set a value if triggerTextAdditionalClasses has a value', () => {
wrapperComponent.triggerTextAdditionalClasses = 'sprk-u-man';
fixture.detectChanges();
expect(
mastheadSelectorTriggerTextElement.classList.contains('sprk-u-man'),
).toEqual(true);
});
>>>>>>>
<<<<<<<
=======
it('should apply an aria-label to listbox when heading provided', () => {
fixture.detectChanges();
wrapperComponent.heading = 'test';
mastheadSelectorTriggerElement.click();
fixture.detectChanges();
const listBoxAria = fixture.nativeElement
.querySelector('.sprk-c-Dropdown__links')
.getAttribute('aria-label');
expect(listBoxAria).toEqual('test');
});
it('should apply an aria-label to listbox when screenReaderText is provided', () => {
fixture.detectChanges();
wrapperComponent.screenReaderText = 'test';
mastheadSelectorTriggerElement.click();
fixture.detectChanges();
const listBoxAria = fixture.nativeElement
.querySelector('.sprk-c-Dropdown__links')
.getAttribute('aria-label');
expect(listBoxAria).toEqual('test');
});
>>>>>>>
<<<<<<<
=======
it('should correctly add classes from iconAdditionalClasses', () => {
wrapperComponent.iconAdditionalClasses = 'testClass';
fixture.detectChanges();
expect(mastheadSelectorIconElement.classList.toString()).toContain(
'testClass',
);
});
>>>>>>> |
<<<<<<<
import { InputDocsComponent } from './input-docs/input-docs.component';
=======
import { MastheadDocsComponent } from './masthead-docs/masthead-docs.component';
>>>>>>>
import { MastheadDocsComponent } from './masthead-docs/masthead-docs.component';
import { InputDocsComponent } from './input-docs/input-docs.component';
<<<<<<<
{ path: 'inputs', component: InputDocsComponent },
=======
{ path: 'masthead', component: MastheadDocsComponent },
>>>>>>>
{ path: 'masthead', component: MastheadDocsComponent },
{ path: 'inputs', component: InputDocsComponent },
<<<<<<<
ListDocsComponent,
InputDocsComponent
=======
MastheadDocsComponent,
ListDocsComponent
>>>>>>>
MastheadDocsComponent,
ListDocsComponent
ListDocsComponent,
InputDocsComponent |
<<<<<<<
import { FormsModule } from '@angular/forms'
import { ReactiveFormsModule } from '@angular/forms';
=======
import { RouterModule } from '@angular/router';
>>>>>>>
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms'
import { ReactiveFormsModule } from '@angular/forms';
<<<<<<<
SparkInputContainerComponent,
SparkListItemComponent,
SparkMastheadComponent,
SprkInputDirective,
SprkLabelDirective,
SprkErrorDirective
=======
SparkMastheadComponent,
SparkStackComponent,
SparkStackItemDirective
>>>>>>>
SparkMastheadComponent,
SparkStackComponent,
SparkStackItemDirective,
SparkInputContainerComponent,
SparkListItemComponent,
SparkMastheadComponent,
SprkInputDirective,
SprkLabelDirective,
SprkErrorDirective
<<<<<<<
SparkMastheadComponent,
SprkInputDirective,
SprkLabelDirective,
SprkErrorDirective
=======
SparkMastheadComponent,
SparkStackComponent,
SparkStackItemDirective
>>>>>>>
SparkMastheadComponent,
SparkStackComponent,
SparkStackItemDirective,
SparkMastheadComponent,
SprkInputDirective,
SprkLabelDirective,
SprkErrorDirective |
<<<<<<<
import { Inject, Injectable, forwardRef } from "@angular/core";
import { AccessToken, AccessTokenCache, ServerError } from "@batch-flask/core";
import { fetch, log } from "@batch-flask/utils";
=======
import { AccessToken, ServerError } from "@batch-flask/core";
import { log } from "@batch-flask/utils";
>>>>>>>
import { Inject, Injectable, forwardRef } from "@angular/core";
import { AccessToken, AccessTokenCache, ServerError } from "@batch-flask/core";
import { log } from "@batch-flask/utils";
import { BlIpcMain } from "client/core";
<<<<<<<
import { BlIpcMain } from "client/core/bl-ipc-main";
import { LocalDataStore } from "client/core/local-data-store";
=======
import { fetch } from "client/core/fetch";
import { localStorage } from "client/core/local-storage";
>>>>>>>
import { fetch } from "client/core/fetch";
import { LocalDataStore } from "client/core/local-data-store"; |
<<<<<<<
import { ServerError } from "@batch-flask/core";
import { FileSystemService } from "@batch-flask/electron";
=======
import { ServerError, isNotNullOrUndefined } from "@batch-flask/core";
import { FileSystemService } from "@batch-flask/ui/electron";
>>>>>>>
import { ServerError, isNotNullOrUndefined } from "@batch-flask/core";
import { FileSystemService } from "@batch-flask/electron"; |
<<<<<<<
import { Observable } from "rxjs";
import { TaskCreateBasicDialogComponent, TerminateTaskDialogComponent } from "../action";
=======
import { Observable } from "rxjs/Observable";
import { TaskCreateBasicDialogComponent } from "../action";
>>>>>>>
import { Observable } from "rxjs";
import { TaskCreateBasicDialogComponent } from "../action"; |
<<<<<<<
private _initializer: BatchLabsInitializer;
=======
private _initializer = new BatchLabsInitializer(this);
private _currentlyAskingForCredentials: Promise<any>;
>>>>>>>
private _initializer: BatchLabsInitializer;
private _currentlyAskingForCredentials: Promise<any>;
<<<<<<<
ipcMain.on(IpcEvent.fetch, async ({ url, options }) => {
const response = await fetch(url, options);
return {
status: response.status,
statusText: response.statusText,
};
});
ipcMain.on(IpcEvent.logoutAndLogin, () => {
=======
BlIpcMain.on(IpcEvent.AAD.accessTokenData, ({ tenantId, resource }) => {
return this.aadService.accessTokenData(tenantId, resource);
});
BlIpcMain.on(IpcEvent.logoutAndLogin, () => {
>>>>>>>
ipcMain.on(IpcEvent.logoutAndLogin, () => { |
<<<<<<<
import { fillsPreprocessor } from '../helpers/fillsPreprocessor';
=======
import { saveStyleMixin } from '../mixins/saveStyleMixin';
>>>>>>>
import { fillsPreprocessor } from '../helpers/fillsPreprocessor';
import { saveStyleMixin } from '../mixins/saveStyleMixin'; |
<<<<<<<
import { InstanceProps } from './src/components/component/Instance';
import { ComponentProps } from './src/components/component/Component';
import { StarProps } from './src/components/star/Star';
import { VectorProps } from './src/components/vector/Vector';
import { SliceProps } from './src/components/slice/Slice';
=======
import {InstanceProps} from "./src/components/component/Instance";
import {ComponentProps} from "./src/components/component/Component"
import {StarProps} from "./src/components/star/Star";
import {VectorProps} from "./src/components/vector/Vector";
import {ComponentSetProps} from "./src/components/component/ComponentSet";
>>>>>>>
import { InstanceProps } from './src/components/component/Instance';
import { ComponentProps } from './src/components/component/Component';
import { StarProps } from './src/components/star/Star';
import { VectorProps } from './src/components/vector/Vector';
import { SliceProps } from './src/components/slice/Slice';
import {ComponentSetProps} from "./src/components/component/ComponentSet";
<<<<<<<
vector: VectorProps;
instance: InstanceProps;
slice: SliceProps;
=======
vector: VectorProps,
instance: InstanceProps,
componentset: ComponentSetProps
>>>>>>>
vector: VectorProps;
instance: InstanceProps;
slice: SliceProps;
componentset: ComponentSetProps |
<<<<<<<
import { saveStyleMixin } from '../mixins/saveStyleMixin';
=======
import { propsAssign } from '../helpers/propsAssign';
const textNodeProps = [
'textAlignHorizontal',
'textAlignVertical',
'textAlignVertical',
'textAutoResize',
'paragraphIndent',
'paragraphSpacing',
'autoRename',
'fontSize',
'fontName',
'textCase',
'textDecoration',
'letterSpacing',
'lineHeight'
];
const textNodePropsAssign = propsAssign(textNodeProps);
>>>>>>>
import { saveStyleMixin } from '../mixins/saveStyleMixin';
import { propsAssign } from '../helpers/propsAssign';
const textNodeProps = [
'textAlignHorizontal',
'textAlignVertical',
'textAlignVertical',
'textAutoResize',
'paragraphIndent',
'paragraphSpacing',
'autoRename',
'fontSize',
'fontName',
'textCase',
'textDecoration',
'letterSpacing',
'lineHeight'
];
const textNodePropsAssign = propsAssign(textNodeProps); |
<<<<<<<
import { ATNConfigSet } from './atn/Stub_ATNConfigSet';
import { BitSet } from './misc/BitSet';
import { DFA } from './dfa/Stub_DFA';
=======
import { ATNConfigSet } from './atn/ATNConfigSet';
import { BitSet } from './misc/Stub_BitSet';
import { DFA } from './dfa/DFA';
>>>>>>>
import { ATNConfigSet } from './atn/ATNConfigSet';
import { BitSet } from './misc/BitSet';
import { DFA } from './dfa/DFA'; |
<<<<<<<
comparator: AbstractEqualityComparator<T> = null,
initialCapacity: number = INITAL_CAPACITY,
initialBucketCapacity: number = INITAL_BUCKET_CAPACITY) {
=======
comparator: EqualityComparator<T> = null,
initialCapacity: number = Array2DHashSet.INITAL_CAPACITY,
initialBucketCapacity: number = Array2DHashSet.INITAL_BUCKET_CAPACITY) {
>>>>>>>
comparator: EqualityComparator<T> = null,
initialCapacity: number = INITAL_CAPACITY,
initialBucketCapacity: number = INITAL_BUCKET_CAPACITY) { |
<<<<<<<
// By the way...
//
// This file is just an experiment, not a well-thought out concept
//
// It was convenient for ConvertTo-TS to write these reexport declarations
// while processing a file, so I did it. I'm not sure we'll need it in the end.
//
export * from './ErrorNode';
export * from './ParseTree';
export * from './ParseTreeVisitor';
export * from './RuleNode';
export * from './SyntaxTree';
export * from './TerminalNode';
export * from './Tree';
=======
// export * from './AbstractParseTreeVisitor';
// export * from './ErrorNode';
// export * from './ErrorNodeImpl';
// export * from './ParseTree';
// export * from './ParseTreeListener';
// export * from './ParseTreeProperty';
// export * from './ParseTreeVisitor';
// export * from './ParseTreeWalker';
// export * from './RuleNode';
// export * from './SyntaxTree';
// export * from './TerminalNode';
// export * from './TerminalNodeImpl';
export * from './Tree';
// export * from './Trees';
>>>>>>>
// export * from './AbstractParseTreeVisitor';
export * from './ErrorNode';
// export * from './ErrorNodeImpl';
export * from './ParseTree';
// export * from './ParseTreeListener';
// export * from './ParseTreeProperty';
export * from './ParseTreeVisitor';
// export * from './ParseTreeWalker';
export * from './RuleNode';
export * from './SyntaxTree';
export * from './TerminalNode';
// export * from './TerminalNodeImpl';
export * from './Tree';
// export * from './Trees'; |
<<<<<<<
import { ATNConfigSet } from './atn/Stub_ATNConfigSet';
import { BitSet } from './misc/BitSet';
import { DFA } from './dfa/Stub_DFA';
=======
import { ATNConfigSet } from './atn/ATNConfigSet';
import { BitSet } from './misc/Stub_BitSet';
import { DFA } from './dfa/DFA';
>>>>>>>
import { ATNConfigSet } from './atn/ATNConfigSet';
import { BitSet } from './misc/BitSet';
import { DFA } from './dfa/DFA'; |
<<<<<<<
import { Arrays } from "../misc/Arrays";
=======
import { ATN } from '../atn/Stub_ATN';
import { Parser } from '../Stub_Parser';
import { ParserRuleContext } from '../Stub_ParserRuleContext';
import { NotNull } from "../Decorators";
import {Arrays} from "../misc/Arrays";
import {RuleNode} from "./RuleNode";
import {RuleContext} from "../RuleContext";
import {ErrorNode} from "./ErrorNode";
import {TerminalNode} from "./TerminalNode";
import {Token} from "../Token";
import {ParseTree} from "./ParseTree";
import {Interval} from "../misc/Interval";
>>>>>>>
import { Arrays } from "../misc/Arrays";
import { ATN } from '../atn/Stub_ATN'; |
<<<<<<<
getText(): string {
return this.getTextFromInterval(Interval.of(0, this.size() - 1));
}
=======
getText(interval?: Interval | RuleContext): string {
if (interval === undefined) {
this.fill();
interval = Interval.of(0, this.size - 1);
} else if (!(interval instanceof Interval)) {
// Note: the more obvious check for 'instanceof RuleContext' results in a circular dependency problem
interval = interval.sourceInterval;
}
>>>>>>>
getText(interval?: Interval | RuleContext): string {
if (interval === undefined) {
interval = Interval.of(0, this.size - 1);
} else if (!(interval instanceof Interval)) {
// Note: the more obvious check for 'instanceof RuleContext' results in a circular dependency problem
interval = interval.sourceInterval;
} |
<<<<<<<
declare module "util/IAspectExports" {
export interface IAspectExports {
__call(pointer: number): void;
}
}
=======
declare module "test/IWarning" {
export interface IWarning {
type: string;
message: string;
stackTrace: string;
}
}
>>>>>>>
declare module "util/IAspectExports" {
export interface IAspectExports {
__call(pointer: number): void;
}
}
declare module "test/IWarning" {
export interface IWarning {
type: string;
message: string;
stackTrace: string;
}
}
<<<<<<<
import { IAspectExports } from "util/IAspectExports";
=======
import { IWarning } from "test/IWarning";
>>>>>>>
import { IAspectExports } from "util/IAspectExports";
import { IWarning } from "test/IWarning"; |
<<<<<<<
import { IAspectExports } from "../util/IAspectExports";
=======
import { IWarning } from "./IWarning";
>>>>>>>
import { IAspectExports } from "../util/IAspectExports";
import { IWarning } from "./IWarning";
<<<<<<<
public run(wasm: ASUtil & IAspectExports): void {
=======
public run(wasm: ASUtil): void {
if (this.errors.length > 0) return;
this.ready = true;
>>>>>>>
public run(wasm: ASUtil & IAspectExports): void {
if (this.errors.length > 0) return;
this.ready = true; |
<<<<<<<
public fit_transform(doc: string[] = []): number[] {
=======
public fit_transform(doc: string[]): number[][] {
>>>>>>>
public fit_transform(doc: string[] = []): number[][] {
<<<<<<<
public transform(doc: string[] = []): number[] {
=======
public transform(doc: string[]): number[][] {
>>>>>>>
public transform(doc: string[] = []): number[][] { |
<<<<<<<
l = (l)eave a breadcrumb
Calls the leaveBreadcrumb() method.
o = calling notify with an (o)n error callback
Runs custom logic before an event is sent. This contrived example will
pseudo-randomly prevent 50% of the events from sending.
=======
b = calling notify with a (b)efore send callback
Runs custom logic before a report is sent. This contrived example will
pseudo-randomly prevent 50% of the reports from sending.
>>>>>>>
o = calling notify with an (o)n error callback
Runs custom logic before an event is sent. This contrived example will
pseudo-randomly prevent 50% of the events from sending.
<<<<<<<
case 'l': return leaveBreadcrumb()
case 'o': return onError()
=======
//case 'l': return leaveBreadcrumb()
case 'b': return beforeSend()
>>>>>>>
//case 'l': return leaveBreadcrumb()
case 'o': return onError() |
<<<<<<<
orientationBreadcrumbsEnabled?: boolean;
=======
// options for all bundled expo plugins
consoleBreadcrumbsEnabled?: boolean;
networkBreadcrumbsEnabled?: boolean;
navigationBreadcrumbsEnabled?: boolean;
connectivityBreadcrumbsEnabled?: boolean;
>>>>>>>
// options for all bundled expo plugins
consoleBreadcrumbsEnabled?: boolean;
networkBreadcrumbsEnabled?: boolean;
navigationBreadcrumbsEnabled?: boolean;
connectivityBreadcrumbsEnabled?: boolean;
orientationBreadcrumbsEnabled?: boolean; |
<<<<<<<
import {
AppInsightsService,
BlobStorageService,
BotService,
ConnectedService,
CosmosDbService,
DispatchService,
EndpointService,
FileService,
GenericService,
LuisService,
QnaMakerService
} from './models';
import {
IAppInsightsService,
IBlobStorageService,
IBotConfiguration,
IBotService,
IConnectedService,
ICosmosDBService,
IDispatchService,
IEndpointService,
IFileService,
IGenericService,
ILuisService,
IQnAService,
ServiceTypes
} from './schema';
interface InternalBotConfig {
=======
import { ConnectedService } from './models';
import { IBotConfiguration, IConnectedService, IDispatchService, ServiceTypes } from './schema';
interface internalBotConfig {
>>>>>>>
import { ConnectedService } from './models';
import { IBotConfiguration, IConnectedService, IDispatchService, ServiceTypes } from './schema';
interface InternalBotConfig {
<<<<<<<
for (const service of this.services) {
(<ConnectedService>service).encrypt(secret);
=======
for (let service of this.services) {
(<ConnectedService>service).encrypt(secret, encrypt.encryptString);
>>>>>>>
for (const service of this.services) {
(<ConnectedService>service).encrypt(secret, encrypt.encryptString);
<<<<<<<
for (const connected_service of this.services) {
(<ConnectedService>connected_service).decrypt(secret);
=======
for (let service of this.services) {
(<ConnectedService>service).decrypt(secret, encrypt.decryptString);
>>>>>>>
for (const connected_service of this.services) {
(<ConnectedService>connected_service).decrypt(secret, encrypt.decryptString);
<<<<<<<
for (const service of this.services) {
for (const prop of encryptedProperties[service.type]) {
const val: string = <string>(<any>service)[prop];
(<any>service)[prop] = this.legacyDecrypt(val, secret);
=======
for (var service of this.services) {
for (let i = 0; i < encryptedProperties[service.type].length; i++) {
let prop = encryptedProperties[service.type][i];
let val = <string>(<any>service)[prop];
(<any>service)[prop] = encrypt.legacyDecrypt(val, secret);
>>>>>>>
for (const service of this.services) {
for (const prop of encryptedProperties[service.type]) {
const val: string = <string>(<any>service)[prop];
(<any>service)[prop] = encrypt.legacyDecrypt(val, secret);
<<<<<<<
// return the path that this config was loaded from. .save() will save to this path
public getPath() : string {
=======
// return the path that this config was loaded from. .save() will save to this path
public getPath(): string {
>>>>>>>
// return the path that this config was loaded from. .save() will save to this path
public getPath(): string {
<<<<<<<
// find a service by id
public findService(id: string): IConnectedService {
for (const service of this.services) {
if (service.id === id) {
return service;
}
}
return null;
}
// find a service by name or id (checks ids first)
public findServiceByNameOrId(nameOrId: string): IConnectedService {
for (const service of this.services) {
if (service.id === nameOrId) {
return service;
}
}
for (const service of this.services) {
if (service.name === nameOrId) {
return service;
}
}
return null;
}
// remove service by name or id
public disconnectServiceByNameOrId(nameOrId: string): IConnectedService {
const { services = [] } = this;
let i: number = services.length;
while (i--) {
const service: IConnectedService = services[i];
if (service.id === nameOrId || service.name === nameOrId) {
return services.splice(i, 1)[0];
}
}
throw new Error(`a service with id or name of [${nameOrId}] was not found`);
}
// remove a service
public disconnectService(id: string): void {
const { services = [] } = this;
let i: number = services.length;
while (i--) {
const service: IConnectedService = services[i];
if (service.id === id) {
services.splice(i, 1); // TODO: What is the purpose of this? Previously services.splice(i,1)[0]; <-- why have array access?
return;
}
}
}
=======
>>>>>>>
<<<<<<<
private _savePrep(secret?: string): void {
if (!!secret) {
this.validateSecretKey(secret);
}
// make sure that all dispatch serviceIds still match services that are in the bot
for (const service of this.services) {
if (service.type === ServiceTypes.Dispatch) {
const dispatchService: IDispatchService = <IDispatchService>service;
const validServices: string[] = [];
for (const dispatchServiceId of dispatchService.serviceIds) {
for (const this_service of this.services) {
if (this_service.id === dispatchServiceId) {
validServices.push(dispatchServiceId);
}
}
}
dispatchService.serviceIds = validServices;
}
}
}
private legacyDecrypt(encryptedValue: string, secret: string): string {
// LEGACY for pre standardized SHA256 encryption, this uses some undocumented nodejs MD5 hash internally and is deprecated
const decipher: crypto.Decipher = crypto.createDecipher('aes192', secret);
let value: string = decipher.update(encryptedValue, 'hex', 'utf8');
value += decipher.final('utf8');
return value;
}
}
=======
}
>>>>>>>
// save the config file to specificed botpath
public async saveAs(botpath: string, secret?: string): Promise<void> {
if (!botpath) {
throw new Error(`missing path`);
}
this._savePrep(secret);
const hasSecret: boolean = !!this.secretKey;
if (hasSecret) {
this.encrypt(secret);
}
await fsx.writeJson(botpath, this.toJSON(), { spaces: 4 });
if (hasSecret) {
this.decrypt(secret);
}
}
// save the config file to specificed botpath
public saveAsSync(botpath: string, secret?: string): void {
this._savePrep(secret);
const hasSecret: boolean = !!this.secretKey;
if (hasSecret) {
this.encrypt(secret);
}
fsx.writeJsonSync(botpath, this.toJSON(), { spaces: 4 });
if (hasSecret) {
this.decrypt(secret);
}
}
// save the config file back over original
public async save(secret?: string): Promise<void> {
return this.saveAs(this.internal.location, secret);
}
// save the config file back over original (blocking)
public saveSync(secret?: string): void {
return this.saveAsSync(this.internal.location, secret);
}
private _savePrep(secret?: string): void {
if (!!secret) {
this.validateSecretKey(secret);
}
// make sure that all dispatch serviceIds still match services that are in the bot
for (const service of this.services) {
if (service.type === ServiceTypes.Dispatch) {
const dispatchService: IDispatchService = <IDispatchService>service;
const validServices: string[] = [];
for (const dispatchServiceId of dispatchService.serviceIds) {
for (const this_service of this.services) {
if (this_service.id === dispatchServiceId) {
validServices.push(dispatchServiceId);
}
}
}
dispatchService.serviceIds = validServices;
}
}
}
} |
<<<<<<<
export * from './numberWithUnits';
export * from './qnamaker-interfaces/index'
=======
export * from './numberWithUnits';
export * from './ordinalV2';
>>>>>>>
export * from './numberWithUnits';
export * from './qnamaker-interfaces/index'
export * from './ordinalV2'; |
<<<<<<<
const defaultTextColor = new Color(options.android.color || '#000');
const defaultTextNativeColor = defaultTextColor.android
? defaultTextColor.android
: android.graphics.Color.BLACK;
const defaultDetailsNativeColor = new Color(
255 * 0.8,
defaultTextColor.r,
defaultTextColor.g,
defaultTextColor.b
).android;
=======
const defaultTextColor = new Color(options.android.color || 'black');
const defaultTextNativeColor = defaultTextColor.android ? defaultTextColor.android : android.graphics.Color.BLACK;
const defaultDetailsNativeColor = new Color(255 * .8, defaultTextColor.r, defaultTextColor.g, defaultTextColor.b).android;
>>>>>>>
const defaultTextColor = new Color(options.android.color || 'black');
const defaultTextNativeColor = defaultTextColor.android
? defaultTextColor.android
: android.graphics.Color.BLACK;
const defaultDetailsNativeColor = new Color(
255 * 0.8,
defaultTextColor.r,
defaultTextColor.g,
defaultTextColor.b
).android; |
<<<<<<<
<div *ngIf="formList.enabled && !readonly" class="remove-icon">
<i ct-tooltip="Delete" class="fa fa-trash clickable" data-test="base-command-remove" (click)="removeEntry(i)"></i>
=======
<div *ngIf="formControl.enabled && !readonly" class="remove-icon">
<i ct-tooltip="Delete" class="fa fa-trash clickable" (click)="removeEntry(i)"></i>
>>>>>>>
<div *ngIf="formControl.enabled && !readonly" class="remove-icon">
<i ct-tooltip="Delete" class="fa fa-trash clickable" data-test="base-command-remove" (click)="removeEntry(i)"></i> |
<<<<<<<
import {EventHubService} from "../../../../services/event-hub/event-hub.service";
import {OpenInputInspector} from "../../../../action-events/index";
import {CommandLineToolModel} from "cwlts/models/d2sb";
import {FormSectionComponent} from "../../../form-section/form-section.component";
=======
import {CommandLineToolModel} from "cwlts/models/d2sb";
import {InputSidebarService} from "../../../../services/sidebars/input-sidebar.service";
import {CommandInputParameterModel as InputProperty} from "cwlts/models/d2sb";
>>>>>>>
import {EventHubService} from "../../../../services/event-hub/event-hub.service";
import {OpenInputInspector} from "../../../../action-events/index";
import {CommandLineToolModel} from "cwlts/models/d2sb";
import {FormSectionComponent} from "../../../form-section/form-section.component";
import {InputSidebarService} from "../../../../services/sidebars/input-sidebar.service";
import {CommandInputParameterModel as InputProperty} from "cwlts/models/d2sb"; |
<<<<<<<
import {WorkboxTab} from "../core/workbox/workbox-tab.interface";
import {ProceedToEditingModalComponent} from "../core/modals/proceed-to-editing-modal/proceed-to-editing-modal.component";
=======
>>>>>>>
import {ProceedToEditingModalComponent} from "../core/modals/proceed-to-editing-modal/proceed-to-editing-modal.component"; |
<<<<<<<
import {CommandOutputParameterModel as OutProperty} from "cwlts/models/d2sb";
import {CommandOutputBindingModel} from "cwlts/models/d2sb/CommandOutputBindingModel";
import {DirectiveBase} from "../../../../util/directive-base/directive-base";
=======
import {ComponentBase} from "../../../../components/common/component-base";
import {CommandOutputParameterModel} from "cwlts/models";
>>>>>>>
import {CommandOutputParameterModel} from "cwlts/models";
import {DirectiveBase} from "../../../../util/directive-base/directive-base";
<<<<<<<
/**
* TODO: add the load content property on the model
* */
export class OutputEvalSectionComponent extends DirectiveBase implements ControlValueAccessor {
=======
export class OutputEvalSectionComponent extends ComponentBase implements ControlValueAccessor {
>>>>>>>
export class OutputEvalSectionComponent extends DirectiveBase implements ControlValueAccessor { |
<<<<<<<
import {CommandOutputParameterModel as OutputProperty, SBDraft2ExpressionModel, SBDraft2CommandInputParameterModel} from "cwlts/models/d2sb";
=======
import {ComponentBase} from "../../../../components/common/component-base";
import {CommandInputParameterModel} from "cwlts/models";
import {SBDraft2ExpressionModel, SBDraft2CommandOutputParameterModel} from "cwlts/models/d2sb";
>>>>>>>
import {CommandInputParameterModel} from "cwlts/models";
import {SBDraft2ExpressionModel, SBDraft2CommandOutputParameterModel} from "cwlts/models/d2sb"; |
<<<<<<<
=======
AppExecutionContextModalComponent,
AppExecutionPreviewComponent,
AppInfoComponent,
BlankToolStateComponent,
CommonDocumentControlsComponent,
CommonReportPanelComponent,
CommonStatusControlsComponent,
>>>>>>>
AppExecutionContextModalComponent,
AppExecutionPreviewComponent,
AppInfoComponent,
CommonDocumentControlsComponent,
CommonReportPanelComponent,
CommonStatusControlsComponent,
<<<<<<<
MapListComponent,
=======
AppExecutionPreviewComponent,
AppInfoComponent,
BlankToolStateComponent,
CommonDocumentControlsComponent,
CommonReportPanelComponent,
CommonStatusControlsComponent,
>>>>>>>
AppExecutionPreviewComponent,
AppInfoComponent,
CommonDocumentControlsComponent,
CommonReportPanelComponent,
MapListComponent,
CommonStatusControlsComponent, |
<<<<<<<
import {ContextService} from "../../core/ui/context/context.service";
=======
import {GuidService} from "../../services/guid.service";
import {IpcService} from "../../services/ipc.service";
import {LocalDataSourceService} from "../../sources/local/local.source.service";
import {PublicAppService} from "../../platform-providers/public-apps/public-app.service";
import {ElectronPublicAppService} from "../../platform-providers/public-apps/electron-public-app.service";
import {UserProjectsService} from "../../platform-providers/user-projects/user-projects.service";
import {ElectronUserProjectsService} from "../../platform-providers/user-projects/electron-user-projects.service";
>>>>>>>
import {ContextService} from "../../core/ui/context/context.service";
import {GuidService} from "../../services/guid.service";
import {IpcService} from "../../services/ipc.service";
import {LocalDataSourceService} from "../../sources/local/local.source.service";
import {PublicAppService} from "../../platform-providers/public-apps/public-app.service";
import {ElectronPublicAppService} from "../../platform-providers/public-apps/electron-public-app.service";
import {UserProjectsService} from "../../platform-providers/user-projects/user-projects.service";
import {ElectronUserProjectsService} from "../../platform-providers/user-projects/electron-user-projects.service";
<<<<<<<
ContextService
=======
UserPreferencesService,
ContextService,
// FIXME: this needs to be handled in a system-specific way
GuidService,
IpcService,
LocalDataSourceService,
{provide: PublicAppService, useClass: ElectronPublicAppService},
{provide: UserProjectsService, useClass: ElectronUserProjectsService}
>>>>>>>
ContextService
UserPreferencesService,
// FIXME: this needs to be handled in a system-specific way
GuidService,
IpcService,
LocalDataSourceService,
{provide: PublicAppService, useClass: ElectronPublicAppService},
{provide: UserProjectsService, useClass: ElectronUserProjectsService} |
<<<<<<<
import {CompactListComponent} from "../components/compact-list/compact-list.component";
import {EditableDirective} from "../directives/editable.directive";
import {FileDefInspectorComponent} from "./sections/file-def-list/file-def-inspector.component";
import {LiteralExpressionInputComponent} from "./sections/file-def-list/literal-expression-input.component";
=======
//import {SecondaryFilesComponent} from "./object-inspector/common-sections/secondary-files-sections/secondary-files.component";
import {SecondaryFilesComponent} from "./object-inspector/secondary-files/secondary-files.component";
>>>>>>>
import {CompactListComponent} from "../components/compact-list/compact-list.component";
import {EditableDirective} from "../directives/editable.directive";
import {FileDefInspectorComponent} from "./sections/file-def-list/file-def-inspector.component";
import {LiteralExpressionInputComponent} from "./sections/file-def-list/literal-expression-input.component";
//import {SecondaryFilesComponent} from "./object-inspector/common-sections/secondary-files-sections/secondary-files.component";
import {SecondaryFilesComponent} from "./object-inspector/secondary-files/secondary-files.component";
<<<<<<<
CompactListComponent,
EditableDirective,
LiteralExpressionInputComponent
=======
OutputEvalSectionComponent,
>>>>>>>
OutputEvalSectionComponent,
CompactListComponent,
EditableDirective,
LiteralExpressionInputComponent
<<<<<<<
OutputMetaDataSectionComponent,
CompactListComponent,
EditableDirective,
LiteralExpressionInputComponent
=======
OutputMetaDataSectionComponent
>>>>>>>
OutputMetaDataSectionComponent,
CompactListComponent,
EditableDirective,
LiteralExpressionInputComponent
OutputMetaDataSectionComponent |
<<<<<<<
import {HTTP_PROVIDERS} from '@angular/http';
=======
import {FileStateService} from "../../state/file.state.service";
>>>>>>>
import {HTTP_PROVIDERS} from '@angular/http';
import {FileStateService} from "../../state/file.state.service";
<<<<<<<
StateUpdates,
UrlValidator,
HTTP_PROVIDERS
=======
StateUpdates,
FileStateService
>>>>>>>
StateUpdates,
FileStateService
StateUpdates,
UrlValidator,
HTTP_PROVIDERS |
<<<<<<<
<button type="button" data-test="get-support-btn" class="btn btn-outline-primary"
(click)="openFeedbackModal()">
=======
<button type="button" class="btn btn-secondary" (click)="openFeedbackModal()">
>>>>>>>
<button type="button" data-test="get-support-btn" class="btn btn-secondary" (click)="openFeedbackModal()"> |
<<<<<<<
<button type="button" class="btn btn-secondary" data-test='cancel-button'
(click)="closeModal()">Cancel
</button>
<button type="button" class="btn btn-success" data-test='send-button'
[disabled]="!feedbackTextControl.valid"
=======
<button type="button" class="btn btn-secondary" (click)="onCancel()">Cancel</button>
<button type="button" class="btn btn-primary" [disabled]="!feedbackTextControl.valid"
>>>>>>>
<button type="button" class="btn btn-secondary" data-test='cancel-button'
(click)="closeModal()">Cancel
</button>
<button type="button" class="btn btn-primary" data-test='send-button'
[disabled]="!feedbackTextControl.valid" |
<<<<<<<
import {GettingStartedComponent} from "./onboarding/getting-started.component";
import {WelcomeTabComponent} from "./onboarding/welcome.component";
=======
import {UpdatePlatformModalComponent} from "./modals/update-platform-modal/update-platform-modal.component";
import {GettingStartedComponent} from "./onboarding/getting-started.component";
import {WelcomeTabComponent} from "./onboarding/welcome.component";
>>>>>>>
import {UpdatePlatformModalComponent} from "./modals/update-platform-modal/update-platform-modal.component";
import {GettingStartedComponent} from "./onboarding/getting-started.component";
import {WelcomeTabComponent} from "./onboarding/welcome.component";
<<<<<<<
=======
import {AboutPageModalComponent} from "./modals/about-page-modal/about-page-modal.component";
>>>>>>>
<<<<<<<
ExecutorService,
=======
MarkdownService,
>>>>>>>
ExecutorService,
MarkdownService, |
<<<<<<<
import {Component, OnInit, ElementRef, ViewChild, Input, OnDestroy, Output} from "@angular/core";
import {Subscription, Observable, Subject} from "rxjs/Rx";
=======
import {Component, OnInit, ElementRef, ViewChild, Input, OnDestroy} from "@angular/core";
import {FileModel} from "../../store/models/fs.models";
import {Subscription, Observable} from "rxjs/Rx";
import {EventHubService} from "../../services/event-hub/event-hub.service";
import {UpdateFileAction} from "../../action-events/index";
>>>>>>>
import {Component, OnInit, ElementRef, ViewChild, Input, OnDestroy} from "@angular/core";
import {FileModel} from "../../store/models/fs.models";
import {Subscription, Observable} from "rxjs/Rx";
import {EventHubService} from "../../services/event-hub/event-hub.service";
import {UpdateFileAction} from "../../action-events/index";
import {Component, OnInit, ElementRef, ViewChild, Input, OnDestroy, Output} from "@angular/core";
import {Subscription, Observable, Subject} from "rxjs/Rx";
<<<<<<<
private subs: Subscription[] = [];
=======
private subs: Subscription[];
>>>>>>>
private subs: Subscription[] = [];
<<<<<<<
=======
constructor(private eventHub: EventHubService) {
this.subs = [];
this.isLoaded = false;
}
>>>>>>>
<<<<<<<
this.editor = new CodeEditor(
ace.edit(this.aceContainer.nativeElement),
this.rawInput,
this.language,
{
readOnly: this.readOnly
}
=======
this.editor = new CodeEditor(ace.edit(this.aceContainer.nativeElement), this.fileStream);
// Also, we want to turn off the loading spinner and might as well bring our own file up to date
this.subs.push(this.fileStream.subscribe(file => {
this.isLoaded = true;
this.file = file;
}));
this.subs.push(
this.editor.contentChanges.skip(1).subscribe((file) => {
this.eventHub.publish(new UpdateFileAction(file));
})
>>>>>>>
this.editor = new CodeEditor(
ace.edit(this.aceContainer.nativeElement),
this.rawInput,
this.language,
{
readOnly: this.readOnly
}
<<<<<<<
this.editor.contentChanges.subscribe(this.contentChanges);
=======
>>>>>>>
this.editor.contentChanges.subscribe(this.contentChanges); |
<<<<<<<
private update<T extends RepositoryType>(profile: string,
data: Partial<T>,
callback: (err?: Error, data?: T) => void = () => {
}) {
=======
private getUpdateDiff(main, patch): UpdateChanges {
const patchMap = new Map();
Object.keys(patch).forEach((key) => {
patchMap.set(key, {
newValue: patch[key],
oldValue: main[key]
});
});
return patchMap;
}
private update<T extends RepositoryType>(profile: string, data: Partial<T>, callback?: (err?: Error, data?: T) => void) {
>>>>>>>
private getUpdateDiff(main, patch): UpdateChanges {
const patchMap = new Map();
Object.keys(patch).forEach((key) => {
patchMap.set(key, {
newValue: patch[key],
oldValue: main[key]
});
});
return patchMap;
}
private update<T extends RepositoryType>(profile: string,
data: Partial<T>,
callback: (err?: Error, data?: T) => void = () => {
}) { |
<<<<<<<
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component"
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
import {CompactListComponent} from "./app/components/compact-list/compact-list.component";
import {EditableDirective} from "./app/components/compact-list/directives/editable.directive";
=======
import {BlankToolStateComponent} from "./app/components/clt-editor/common/blank-tool-state.component";
>>>>>>>
import {BlankToolStateComponent} from "./app/components/clt-editor/common/blank-tool-state.component";
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component"
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
import {CompactListComponent} from "./app/components/compact-list/compact-list.component";
import {EditableDirective} from "./app/components/compact-list/directives/editable.directive"; |
<<<<<<<
} from "../../action-events";
import {
CommandInputParameterModel as InputProperty,
CommandLineToolModel
} from "cwlts/models/d2sb";
=======
} from "../../action-events/index";
import {CommandLineToolModel} from "cwlts/models/d2sb";
>>>>>>>
} from "../../action-events/index";
import {CommandInputParameterModel as InputProperty, CommandLineToolModel} from "cwlts/lib/models/d2sb";
<<<<<<<
[formGroup]="cltEditorGroup">
<docker-input-form class="input-form"
=======
*ngIf="cltEditorGroup"
[formGroup]="cltEditorGroup">
<docker-input-form [@formPosition]="formPosition"
class="input-form"
>>>>>>>
[formGroup]="cltEditorGroup">
<docker-input-form class="input-form"
<<<<<<<
<base-command-form class="input-form"
[group]="cltEditorGroup"
[baseCommand]="model.baseCommand">
=======
<base-command-form [@formPosition]="formPosition"
class="input-form"
[toolBaseCommand]="model.baseCommand"
[baseCommandForm]="cltEditorGroup.controls.baseCommandGroup">
>>>>>>>
<base-command-form class="input-form"
[toolBaseCommand]="model.baseCommand"
[baseCommandForm]="cltEditorGroup.controls.baseCommandGroup">
<<<<<<<
=======
/** Positions of the listed properties */
private formPosition: FormPosition = "center";
>>>>>>>
/** Positions of the listed properties */
private formPosition: FormPosition = "center"; |
<<<<<<<
import {ReplaySubject, BehaviorSubject, Observable} from "rxjs/Rx";
=======
import {FormGroup, FormBuilder} from "@angular/forms";
import {ReplaySubject, BehaviorSubject} from "rxjs/Rx";
import {CommandLinePart} from "cwlts/models/helpers/CommandLinePart";
>>>>>>>
import {FormGroup, FormBuilder} from "@angular/forms";
import {ReplaySubject, BehaviorSubject} from "rxjs/Rx";
import {CommandLinePart} from "cwlts/models/helpers/CommandLinePart";
import {ReplaySubject, BehaviorSubject, Observable} from "rxjs/Rx";
<<<<<<<
=======
import {ComponentBase} from "../common/component-base";
>>>>>>>
import {ComponentBase} from "../common/component-base";
<<<<<<<
import {ValidationResponse} from "../../services/web-worker/json-schema/json-schema.service";
import {CommandLinePart} from "cwlts/models/helpers/CommandLinePart";
import {WebWorkerService} from "../../services/web-worker/web-worker.service";
import {ToolSidebarService} from "../../services/sidebars/tool-sidebar.service";
=======
>>>>>>>
import {ValidationResponse} from "../../services/web-worker/json-schema/json-schema.service";
import {CommandLinePart} from "cwlts/models/helpers/CommandLinePart";
import {WebWorkerService} from "../../services/web-worker/web-worker.service";
import {ToolSidebarService} from "../../services/sidebars/tool-sidebar.service";
<<<<<<<
import {ComponentBase} from "../common/component-base";
=======
>>>>>>>
import {ComponentBase} from "../common/component-base";
<<<<<<<
this.tracked = this.webWorkerService.validationResultStream
.map(r => {
if (!r.isValidCwl) return r;
=======
this.tracked = this.webWorkerService.validationResultStream.subscribe(this.schemaValidation);
>>>>>>>
this.tracked = this.webWorkerService.validationResultStream
.map(r => {
if (!r.isValidCwl) return r;
<<<<<<<
this.toolModel = new CommandLineToolModel(json);
this.commandLineParts = this.toolModel.getCommandLineParts();
=======
try {
let json = Yaml.safeLoad(content, {json: true});
>>>>>>>
this.toolModel = new CommandLineToolModel(json);
this.commandLineParts = this.toolModel.getCommandLineParts(); |
<<<<<<<
import {Component, Input} from "@angular/core";
=======
import {Component, Input, OnInit} from "@angular/core";
>>>>>>>
import {Component, Input} from "@angular/core";
<<<<<<<
import {EventHubService} from "../../services/event-hub/event-hub.service";
import {
OpenInputInspector,
OpenExpressionEditor,
CloseInputInspector,
CloseExpressionEditor
} from "../../action-events";
import {CommandInputParameterModel as InputProperty, CommandLineToolModel} from "cwlts/models/d2sb";
=======
import {CommandLineToolModel} from "cwlts/models/d2sb";
>>>>>>>
import {EventHubService} from "../../services/event-hub/event-hub.service";
import {
OpenInputInspector,
OpenExpressionEditor,
CloseInputInspector,
CloseExpressionEditor
} from "../../action-events";
import {CommandInputParameterModel as InputProperty, CommandLineToolModel} from "cwlts/models/d2sb";
import {CommandLineToolModel} from "cwlts/models/d2sb";
<<<<<<<
[formGroup]="cltEditorGroup">
<docker-input-form [group]="cltEditorGroup"
=======
*ngIf="cltEditorGroup"
[formGroup]="cltEditorGroup">
<docker-input-form class="input-form"
[group]="cltEditorGroup"
>>>>>>>
[formGroup]="cltEditorGroup">
<docker-input-form class="input-form"
[group]="cltEditorGroup"
<<<<<<<
<base-command-form [toolBaseCommand]="model.baseCommand"
=======
<base-command-form class="input-form"
[toolBaseCommand]="model.baseCommand"
>>>>>>>
<base-command-form [toolBaseCommand]="model.baseCommand"
<<<<<<<
<inputs-ports-form [cltModel]="model">
=======
<inputs-ports-form [cltModel]="model"
class="input-form">
>>>>>>>
<inputs-ports-form [cltModel]="model">
<<<<<<<
=======
private file: FileModel;
>>>>>>>
<<<<<<<
private closeSidebarActions = [];
constructor(private formBuilder: FormBuilder,
private eventHubService: EventHubService) {
/* Opening the sidebar */
this.eventHubService.on(OpenInputInspector).subscribe(() => {
this.closeSidebarActions.push(CloseInputInspector);
});
this.eventHubService.on(OpenExpressionEditor).subscribe(() => {
this.closeSidebarActions.push(CloseExpressionEditor);
});
/* Closing the sidebar */
this.eventHubService.on(CloseInputInspector).subscribe(() => {
this.deleteSidebarActionFromArray(CloseInputInspector);
});
this.eventHubService.on(CloseExpressionEditor).subscribe(() => {
this.deleteSidebarActionFromArray(CloseExpressionEditor);
});
}
deleteSidebarActionFromArray(action) {
this.closeSidebarActions = this.closeSidebarActions.filter(sidebarAction => {
return sidebarAction !== action;
});
}
=======
constructor(private formBuilder: FormBuilder) { }
>>>>>>>
constructor(private formBuilder: FormBuilder) { } |
<<<<<<<
import {Component, OnDestroy} from "@angular/core";
import {DynamicState} from "../runtime-compiler/dynamic-state.interface";
=======
import {Component, OnInit, Input} from "@angular/core";
>>>>>>>
import {Component, OnInit, Input} from "@angular/core";
<<<<<<<
selector: 'tab-manager',
providers: [WebWorkerService],
=======
selector: "tab-manager",
>>>>>>>
selector: "tab-manager",
providers: [WebWorkerService],
<<<<<<<
</div>`
})
export class TabManagerComponent implements DynamicState, OnDestroy {
private fileStream: Observable<FileModel>;
=======
>>>>>>>
<<<<<<<
constructor(private fileRegistry: FileRegistry,
private webWorkerService: WebWorkerService) { }
=======
private subs: Subscription[] = [];
constructor() {
this.webWorkerService = new WebWorkerService();
}
ngOnInit() {
>>>>>>>
private subs: Subscription[] = [];
constructor(private fileRegistry: FileRegistry,
private webWorkerService: WebWorkerService) { }
ngOnInit() {
<<<<<<<
ngOnDestroy(): void {
this.webWorkerService.dispose();
}
=======
ngOnDestroy() {
this.subs.forEach(s => s.unsubscribe());
}
>>>>>>>
ngOnDestroy() {
this.subs.forEach(s => s.unsubscribe());
this.webWorkerService.dispose();
} |
<<<<<<<
import {CommandLineBindingModel} from "cwlts/models/d2sb/CommandLineBindingModel";
import {EditorInspectorService} from "../../../editor-common/inspector/editor-inspector.service";
=======
import {Validation} from "cwlts/models/helpers/validation";
>>>>>>>
import {CommandLineBindingModel} from "cwlts/models/d2sb/CommandLineBindingModel";
import {EditorInspectorService} from "../../../editor-common/inspector/editor-inspector.service";
import {Validation} from "cwlts/models/helpers/validation";
<<<<<<<
[ct-editor-inspector]="inspector"
[ct-editor-inspector-target]="entry.model"
class="gui-section-list-item clickable validatable row">
=======
[ct-validation-class]="entry.validation"
class="gui-section-list-item clickable row">
>>>>>>>
[ct-validation-class]="entry.validation"
class="gui-section-list-item clickable row">
[ct-editor-inspector]="inspector"
[ct-editor-inspector-target]="entry.model"
class="gui-section-list-item clickable validatable row">
<<<<<<<
/** Model location entry, used for tracing the path in the json document */
@Input()
public location = "";
private arguments: {
value: string,
prefix: string,
position: number,
separate: boolean,
model: CommandArgumentModel
}[] = [];
=======
private arguments: CommandArgumentModel[] = [];
>>>>>>>
/** Model location entry, used for tracing the path in the json document */
@Input()
public location = "";
private arguments: {
value: string,
prefix: string,
position: number,
separate: boolean,
model: CommandArgumentModel
}[] = [];
private arguments: CommandArgumentModel[] = [];
<<<<<<<
const newEntryLocation = `${this.location}[${this.entries.length}]`;
const newEntry = new CommandArgumentModel({}, newEntryLocation);
const entries = this.entries.concat(newEntry);
this.update.next(entries);
=======
this.arguments = this.arguments.concat([new CommandArgumentModel()]);
>>>>>>>
this.arguments = this.arguments.concat([new CommandArgumentModel()]);
const newEntryLocation = `${this.location}[${this.entries.length}]`;
const newEntry = new CommandArgumentModel({}, newEntryLocation);
const entries = this.entries.concat(newEntry);
this.update.next(entries);
<<<<<<<
debugger;
this.arguments = changes["entries"].currentValue.map(entry => ({
value: typeof entry.valueFrom.value === "object" ? entry.valueFrom.value.script : entry.valueFrom.value,
prefix: entry.arg.prefix,
position: entry.arg.position || 0,
separate: !!entry.arg.separate,
model: entry,
})).sort((a, b) => a.position - b.position);
=======
this.arguments = changes["entries"].currentValue.map(entry => entry)
.sort((a, b) => a.position - b.position);
>>>>>>>
this.arguments = changes["entries"].currentValue.map(entry => entry)
.sort((a, b) => a.position - b.position);
debugger;
this.arguments = changes["entries"].currentValue.map(entry => ({
value: typeof entry.valueFrom.value === "object" ? entry.valueFrom.value.script : entry.valueFrom.value,
prefix: entry.arg.prefix,
position: entry.arg.position || 0,
separate: !!entry.arg.separate,
model: entry,
})).sort((a, b) => a.position - b.position); |
<<<<<<<
<inputs-ports-form [@formPosition]="formPosition"
class="input-form"></inputs-ports-form>
=======
<inputs-ports-form @formPosition="formPosition"
class="input-form"
[cltModel]="model"
[inputPorts]="toolInputPorts"></inputs-ports-form>
>>>>>>>
<inputs-ports-form [@formPosition]="formPosition"
class="input-form"
[cltModel]="model"
[inputPorts]="toolInputPorts"></inputs-ports-form>
<<<<<<<
=======
private toolInputPorts: BehaviorSubject<InputProperty[]> = new BehaviorSubject<InputProperty[]>([]);
@Input()
private model: CommandLineToolModel;
>>>>>>>
private toolInputPorts: BehaviorSubject<InputProperty[]> = new BehaviorSubject<InputProperty[]>([]);
@Input()
private model: CommandLineToolModel; |
<<<<<<<
import {LocalRepositoryService} from "../../../repository/local-repository.service";
import {Subject} from "rxjs/Subject";
=======
import {AppHelper} from "../../helpers/AppHelper";
>>>>>>>
import {LocalRepositoryService} from "../../../repository/local-repository.service";
import {Subject} from "rxjs/Subject";
import {AppHelper} from "../../helpers/AppHelper"; |
<<<<<<<
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component"
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
=======
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component";
import {CodeEditorDirective} from "./app/directives/code-editor.directive";
import {OutputPortsComponent} from "./app/components/clt-editor/output-ports/output-ports.component";
import {ToolEditorModule} from "./app/tool-editor/tool-editor.module";
import {CoreModule} from "./app/core/core.module";
import {CWLModule} from "./app/cwl/cwl.module";
import {HintListComponent} from "./app/components/clt-editor/hints/hint-list.component";
>>>>>>>
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component";
import {CodeEditorDirective} from "./app/directives/code-editor.directive";
import {OutputPortsComponent} from "./app/components/clt-editor/output-ports/output-ports.component";
import {ToolEditorModule} from "./app/tool-editor/tool-editor.module";
import {CoreModule} from "./app/core/core.module";
import {CWLModule} from "./app/cwl/cwl.module";
import {HintListComponent} from "./app/components/clt-editor/hints/hint-list.component";
import {StandaloneCodeEditorComponent} from "./app/components/standalone-code-editor/standalone-code-editor.component"
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
<<<<<<<
ToggleComponent,
QuickPickComponent
=======
>>>>>>>
ToggleComponent,
QuickPickComponent |
<<<<<<<
import {TreeNodeIconComponent} from "./app/components/tree-view/tree-node-icon.component";
=======
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
import {CompactListComponent} from "./app/components/compact-list/compact-list.component";
import {EditableDirective} from "./app/directives/editable.directive";
>>>>>>>
import {QuickPickComponent} from "./app/components/quick-pick/quick-pick.component";
import {CompactListComponent} from "./app/components/compact-list/compact-list.component";
import {EditableDirective} from "./app/directives/editable.directive";
import {TreeNodeIconComponent} from "./app/components/tree-view/tree-node-icon.component";
<<<<<<<
TreeNodeIconComponent,
QuickPickComponent
=======
QuickPickComponent,
CompactListComponent,
EditableDirective
>>>>>>>
QuickPickComponent,
CompactListComponent,
EditableDirective,
TreeNodeIconComponent, |
<<<<<<<
import {ToggleComponent} from "./components/toggle-slider/toggle-slider.component";
import {ExpressionInputComponent} from "./components/expression-input/expression-input.component";
=======
import {CoreModule} from "../core/core.module";
import {ModelExpressionEditorComponent} from "./expression-editor/model-expression-editor.component";
>>>>>>>
import {ToggleComponent} from "./components/toggle-slider/toggle-slider.component";
import {ExpressionInputComponent} from "./components/expression-input/expression-input.component";
import {CoreModule} from "../core/core.module";
import {ModelExpressionEditorComponent} from "./expression-editor/model-expression-editor.component";
<<<<<<<
ToggleComponent,
ExpressionInputComponent
=======
ModelExpressionEditorComponent,
>>>>>>>
ToggleComponent,
ExpressionInputComponent
ModelExpressionEditorComponent,
<<<<<<<
ToggleComponent,
ExpressionInputComponent
=======
ModelExpressionEditorComponent,
>>>>>>>
ToggleComponent,
ExpressionInputComponent
ModelExpressionEditorComponent, |
<<<<<<<
import {Component, OnInit, Input, OnDestroy} from "@angular/core";
=======
import {Component, Input} from "@angular/core";
>>>>>>>
import {Component, OnInit, Input, OnDestroy} from "@angular/core";
<<<<<<<
providers: [WebWorkerService],
directives: [CodeEditorComponent, ToolContainerComponent],
=======
directives: [CodeEditorComponent, ToolContainerComponent, WorkflowContainerComponent],
>>>>>>>
providers: [WebWorkerService],
directives: [CodeEditorComponent, ToolContainerComponent, WorkflowContainerComponent],
<<<<<<<
export class TabManagerComponent implements OnInit, OnDestroy {
=======
export class TabManagerComponent {
>>>>>>>
export class TabManagerComponent implements OnInit, OnDestroy { |
<<<<<<<
<input #checkbox type="checkbox" [checked]="isChecked" (change)="toggleCheck()">
<div class="slider round" [class.disabled]="isDisabled"></div>
=======
<input type="checkbox" [checked]="value" (change)="toggleCheck()">
<div class="slider round"></div>
>>>>>>>
<input type="checkbox" [checked]="value" (change)="toggleCheck()">
<div class="slider round" [class.disabled]="isDisabled"></div>
<<<<<<<
private isChecked: boolean = false;
private isDisabled: boolean = false;
=======
>>>>>>>
private isDisabled: boolean = false;
<<<<<<<
@ViewChild('checkbox') checkbox;
constructor(private renderer: Renderer) {
}
=======
@Input()
public value = false;
>>>>>>>
@Input()
public value = false;
@ViewChild('checkbox') checkbox;
constructor(private renderer: Renderer) {
} |
<<<<<<<
import {BaseCommandService, BaseCommand} from "../../../../services/base-command/base-command.service";
import {BehaviorSubject} from "rxjs/BehaviorSubject";
import {ExpressionModel} from "cwlts/models/d2sb";
=======
import {FormSectionComponent} from "../../../form-section/form-section.component";
>>>>>>>
import {FormSectionComponent} from "../../../form-section/form-section.component";
import {BaseCommandService, BaseCommand} from "../../../../services/base-command/base-command.service";
import {BehaviorSubject} from "rxjs/BehaviorSubject";
import {ExpressionModel} from "cwlts/models/d2sb";
<<<<<<<
<form *ngIf="baseCommandForm" [formGroup]="baseCommandForm">
<fieldset class="form-group">
<button type="button" class="btn btn-link hide-btn">Hide</button>
<label>Base Command</label>
<label class="secondary-label">What command do you want to call from the image</label>
<div *ngIf="baseCommandFormList.length > 0">
<div *ngFor="let baseCommand of baseCommandFormList; let i = index; trackBy:trackByIndex"
class="base-command-list">
<expression-input class="col-sm-11"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(value)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
</expression-input>
<span class="close-icon col-sm-1">
<i class="fa fa-times" (click)="removeBaseCommand(i)"></i>
</span>
</div> <!-- base-command-list-->
</div> <!-- list container-->
<div *ngIf="baseCommandFormList.length === 0" class="col-sm-12">
No base command defined.
</div>
</fieldset>
<button type="button"
class="btn btn-secondary add-input-btn"
(click)="addBaseCommand()">Add base command</button>
</form>
=======
<ct-form-section>
<fs-header>
Base Command
</fs-header>
<fs-body>
<form [formGroup]="baseCommandForm">
<label class="form-control-label">What command do you want to call from the image</label>
<expression-input [inputControl]="baseCommandForm.controls['baseCommand']"
[expressionType]="expressionInputType">
</expression-input>
<button type="button" class="btn btn-link add-btn-link">
<i class="fa fa-plus"></i> Add base command
</button>
</form>
</fs-body>
</ct-form-section>
>>>>>>>
<ct-form-section>
<fs-header>
Base Command
</fs-header>
<fs-body>
<form *ngIf="baseCommandForm" [formGroup]="baseCommandForm">
<fieldset class="form-group">
<button type="button" class="btn btn-link hide-btn">Hide</button>
<label>Base Command</label>
<label class="secondary-label">What command do you want to call from the image</label>
<div *ngIf="baseCommandFormList.length > 0">
<div *ngFor="let baseCommand of baseCommandFormList; let i = index; trackBy:trackByIndex"
class="base-command-list">
<expression-input class="col-sm-11"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(value)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
</expression-input>
<span class="close-icon col-sm-1">
<i class="fa fa-times" (click)="removeBaseCommand(i)"></i>
</span>
</div> <!-- base-command-list-->
</div> <!-- list container-->
<div *ngIf="baseCommandFormList.length === 0" class="col-sm-12">
No base command defined.
</div>
</fieldset>
<button type="button"
class="btn btn-secondary add-input-btn"
(click)="addBaseCommand()">Add base command</button>
</form>
<form [formGroup]="baseCommandForm">
<label class="form-control-label">What command do you want to call from the image</label>
<expression-input [inputControl]="baseCommandForm.controls['baseCommand']"
[expressionType]="expressionInputType">
</expression-input>
<button type="button" class="btn btn-link add-btn-link">
<i class="fa fa-plus"></i> Add base command
</button>
</form>
</fs-body>
</ct-form-section> |
<<<<<<<
import {SBDraft2ExpressionModel} from "cwlts/models/d2sb";
=======
import {ExpressionModel} from "cwlts/models";
import {ComponentBase} from "../../../components/common/component-base";
>>>>>>>
import {ExpressionModel} from "cwlts/models"; |
<<<<<<<
import {Component, Input, OnInit, OnDestroy} from "@angular/core";
import {FormGroup, REACTIVE_FORM_DIRECTIVES, FORM_DIRECTIVES, Validators, FormControl} from "@angular/forms";
=======
import {Component, Input, OnInit, OnDestroy, Output} from "@angular/core";
import {FormGroup, REACTIVE_FORM_DIRECTIVES, FORM_DIRECTIVES, Validators, FormBuilder} from "@angular/forms";
>>>>>>>
import {Component, Input, OnInit, OnDestroy, Output} from "@angular/core";
import {FormGroup, REACTIVE_FORM_DIRECTIVES, FORM_DIRECTIVES, Validators, FormBuilder} from "@angular/forms";
<<<<<<<
<expression-input class="col-sm-11"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(expression)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
=======
<expression-input class="col-sm-11"
[context]="context"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(value)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
>>>>>>>
<expression-input class="col-sm-11"
[context]="context"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(expression)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
<<<<<<<
expression: selectedBaseCommand,
newExpressionChange: newExpression
=======
expression: expression,
newExpressionChange: newExpression,
context: this.context
>>>>>>>
expression: selectedBaseCommand,
newExpressionChange: newExpression,
context: this.context |
<<<<<<<
import {ToolContainerComponent} from "../tool-container/tool-container.component";
import {FileTreeComponent} from "../file-tree/file-tree.component";
=======
import {TabManagerComponent} from "../tab-manager/tab-manager.component";
>>>>>>>
import {TabManagerComponent} from "../tab-manager/tab-manager.component";
<<<<<<<
this.registry.registerComponent(ToolContainerComponent);
const tabs = this.layout.root.contentItems[0].contentItems[0];
=======
this.registry.registerComponent(TabManagerComponent);
const tabs = this.layout.root.contentItems[0].contentItems[1];
>>>>>>>
this.registry.registerComponent(TabManagerComponent);
const tabs = this.layout.root.contentItems[0].contentItems[0]; |
<<<<<<<
// TODO: Account changes pending
private user: User;
=======
>>>>>>>
<<<<<<<
=======
// Set the callback
this.tokenReceivedCallback = callback;
>>>>>>>
// Set the callback
this.tokenReceivedCallback = callback;
<<<<<<<
=======
>>>>>>> |
<<<<<<<
import {CompactListComponent} from "./components/compact-list/compact-list.component";
import {EditableDirective} from "./directives/editable.directive";
import {ExpressionModelListComponent} from "./components/expression-model-list/expression-model-list.componen";
=======
import {ValidationComponent} from "./components/validation-preview/validation-preview.component";
import {ValidationTextPipe} from "./pipes/validation-text.pipes";
import {ValidationClassDirective} from "./components/validation-preview/validation-class.directive";
>>>>>>>
import {CompactListComponent} from "./components/compact-list/compact-list.component";
import {EditableDirective} from "./directives/editable.directive";
import {ExpressionModelListComponent} from "./components/expression-model-list/expression-model-list.componen";
import {ValidationComponent} from "./components/validation-preview/validation-preview.component";
import {ValidationTextPipe} from "./pipes/validation-text.pipes";
import {ValidationClassDirective} from "./components/validation-preview/validation-class.directive";
<<<<<<<
ExpressionInputComponent,
=======
ExpressionInputComponent,
ValidationComponent,
ValidationClassDirective,
>>>>>>>
ValidationComponent,
ValidationClassDirective,
<<<<<<<
QuickPickComponent,
CompactListComponent,
EditableDirective,
ExpressionModelListComponent
=======
QuickPickComponent,
ValidationComponent,
ValidationClassDirective
>>>>>>>
QuickPickComponent,
CompactListComponent,
EditableDirective,
ExpressionModelListComponent
QuickPickComponent,
ValidationComponent,
ValidationClassDirective |
<<<<<<<
import {Component} from "@angular/core";
=======
import {Component, OnDestroy} from "@angular/core";
import {InputProperty} from "../../../../models/input-property.model";
>>>>>>>
import {Component, OnDestroy} from "@angular/core";
<<<<<<<
import {CommandInputParameterModel as InputProperty} from "cwlts/lib/models/d2sb";
=======
import {Subscription} from "rxjs/Subscription";
>>>>>>>
import {CommandInputParameterModel as InputProperty} from "cwlts/lib/models/d2sb";
import {Subscription} from "rxjs/Subscription"; |
<<<<<<<
modal.appID = this.dataModel.id;
const originalSubmit = modal.onSubmit;
modal.onSubmit = (...args: any[]) => {
return originalSubmit.apply(modal, args).then(appID => {
=======
>>>>>>>
modal.appID = this.dataModel.id; |
<<<<<<<
<expression-input class="col-sm-11"
[context]="context"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[(expression)]="baseCommandFormList[i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onEdit)="editBaseCommand(i)"
(onClear)="clearBaseCommand(i)">
=======
<expression-input class="col-sm-11"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onSelect)="editBaseCommand(i)">
>>>>>>>
<expression-input class="col-sm-11"
*ngIf="baseCommandForm.controls['baseCommand' + i]"
[control]="baseCommandForm.controls['baseCommand' + i]"
(onEdit)="editBaseCommand(i)"
(onClear)="clearBaseCommand(i)">
<<<<<<<
<span class="col-sm-1">
<i class="fa fa-trash clear-icon" (click)="removeBaseCommand(i)"></i>
</span>
=======
<span class="close-icon col-sm-1">
<i class="fa fa-times" (click)="removeBaseCommand(i)"></i>
</span>
>>>>>>>
<span class="col-sm-1">
<i class="fa fa-trash clear-icon" (click)="removeBaseCommand(i)"></i>
</span> |
<<<<<<<
import {BasicInputSectionComponent} from "./object-inspector/basic-section/basic-input-section.component";
import {InputTypeSelectComponent} from "./common/type-select/type-select.component";
import {ReactiveFormsModule, FormsModule} from "@angular/forms";
import {InputDescriptionComponent} from "./object-inspector/input-description/input-description.component";
import {InputBindingSectionComponent} from "./object-inspector/input-binding/input-binding-section.component";
import {SymbolsComponent} from "./object-inspector/sybols-component/symbols.component";
import {StageInputSectionComponent} from "./object-inspector/stage-input-section/stage-input-section.component";
=======
import {ToolInputListComponent} from "./sections/inputs/tool-input-list.component";
import {CWLModule} from "../cwl/cwl.module";
import {ToolInputInspector} from "./sections/inputs/tool-input-inspector.component";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
>>>>>>>
import {ToolInputListComponent} from "./sections/inputs/tool-input-list.component";
import {CWLModule} from "../cwl/cwl.module";
import {ToolInputInspector} from "./sections/inputs/tool-input-inspector.component";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {BasicInputSectionComponent} from "./object-inspector/basic-section/basic-input-section.component";
import {InputTypeSelectComponent} from "./common/type-select/type-select.component";
import {ReactiveFormsModule, FormsModule} from "@angular/forms";
import {InputDescriptionComponent} from "./object-inspector/input-description/input-description.component";
import {InputBindingSectionComponent} from "./object-inspector/input-binding/input-binding-section.component";
import {SymbolsComponent} from "./object-inspector/sybols-component/symbols.component";
import {StageInputSectionComponent} from "./object-inspector/stage-input-section/stage-input-section.component";
<<<<<<<
BasicInputSectionComponent,
InputTypeSelectComponent,
InputDescriptionComponent,
InputBindingSectionComponent,
SymbolsComponent,
StageInputSectionComponent
=======
ToolInputListComponent,
ToolInputInspector,
>>>>>>>
ToolInputListComponent,
ToolInputInspector,
BasicInputSectionComponent,
InputTypeSelectComponent,
InputDescriptionComponent,
InputBindingSectionComponent,
SymbolsComponent,
StageInputSectionComponent
<<<<<<<
BasicInputSectionComponent,
InputDescriptionComponent,
StageInputSectionComponent
=======
ToolInputListComponent,
ToolInputInspector,
>>>>>>>
ToolInputListComponent,
ToolInputInspector,
BasicInputSectionComponent,
InputDescriptionComponent,
StageInputSectionComponent
<<<<<<<
CoreModule,
FormsModule,
ReactiveFormsModule
=======
ReactiveFormsModule,
FormsModule,
>>>>>>>
FormsModule,
ReactiveFormsModule, |
<<<<<<<
constructor(private toolValidator: ToolValidator) { }
ngOnInit(): void {
this.isValidTool = this.toolValidator.isSupportedFileFormat(this.file);
}
changeViewMode(viewMode: string): void {
=======
private changeViewMode(viewMode: string) {
>>>>>>>
private changeViewMode(viewMode: string) {
constructor(private toolValidator: ToolValidator) { }
ngOnInit(): void {
this.isValidTool = this.toolValidator.isSupportedFileFormat(this.file);
}
changeViewMode(viewMode: string): void { |
<<<<<<<
import {ComponentBase} from "../common/component-base";
import {IpcService} from "../../services/ipc.service";
=======
import {MenuItem} from "../menu/menu-item";
import {ComponentBase} from "../common/component-base";
>>>>>>>
import {ComponentBase} from "../common/component-base";
import {IpcService} from "../../services/ipc.service";
import {MenuItem} from "../menu/menu-item";
<<<<<<<
private el: Element;
constructor(private eventHub: EventHubService,
private ipc: IpcService,
el: ElementRef) {
super();
this.el = el.nativeElement;
=======
constructor(private eventHub: EventHubService) {
super();
>>>>>>>
private el: Element;
constructor(private eventHub: EventHubService
private ipc: IpcService,
el: ElementRef) {
super();
this.el = el.nativeElement;
<<<<<<<
=======
/**
* Removes all tabs except the tab with index
* @param index
*/
private removeOtherTabs(index: Number) {
const tab = this.tabs.splice(index, 1)[0];
this.activeTab = tab;
this.tabs = [tab];
}
/**
* Removes all tabs
* @param index
*/
private removeAllTabs() {
this.tabs = [];
}
private createContextMenu(index): MenuItem[] {
const closeOthers = new MenuItem("Close Others", {
click: () => this.removeOtherTabs(index)
});
const closeAll = new MenuItem("Close All", {
click: () => this.removeAllTabs()
});
return [closeOthers, closeAll];
}
>>>>>>>
/**
* Removes all tabs except the tab with index
* @param index
*/
private removeOtherTabs(index: Number) {
const tab = this.tabs.splice(index, 1)[0];
this.activeTab = tab;
this.tabs = [tab];
}
/**
* Removes all tabs
* @param index
*/
private removeAllTabs() {
this.tabs = [];
}
private createContextMenu(index): MenuItem[] {
const closeOthers = new MenuItem("Close Others", {
click: () => this.removeOtherTabs(index)
});
const closeAll = new MenuItem("Close All", {
click: () => this.removeAllTabs()
});
return [closeOthers, closeAll];
} |
<<<<<<<
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/require-await */
=======
>>>>>>>
<<<<<<<
import { Constructable, DI, IContainer, ILogConfig, LoggerConfiguration, LogLevel, Registration, Writable } from '@aurelia/kernel';
import {
CustomElement,
customElement,
ICustomElementController,
IPlatform,
IViewModel,
LifecycleFlags as LF,
IHydratedController as HC,
IHydratedParentController as HPC,
Aurelia,
} from '@aurelia/runtime-html';
import {
IRouterOptions,
ResolutionMode,
SwapStrategy,
IRouter,
Params as P,
RouteNode as RN,
NavigationInstruction as NI,
RouterConfiguration,
} from '@aurelia/router';
import { assert, TestContext } from '@aurelia/testing';
import { TestRouterConfiguration } from './_shared/configuration.js';
function join(sep: string, ...parts: string[]): string {
return parts.filter(function (x) {
return x?.split('@')[0];
}).join(sep);
}
const hookNames = ['binding', 'bound', 'attaching', 'attached', 'detaching', 'unbinding', 'canLoad', 'load', 'canUnload', 'unload'] as const;
type HookName = typeof hookNames[number] | 'dispose';
class DelayedInvokerFactory<T extends HookName> {
public constructor(
public readonly name: T,
public readonly ticks: number,
) {}
public create(mgr: INotifierManager, p: IPlatform): DelayedInvoker<T> {
return new DelayedInvoker(mgr, p, this.name, this.ticks);
=======
import { CustomElement, customElement } from '@aurelia/runtime-html';
import { IRouterActivateOptions, IRouter } from '@aurelia/router';
import { assert } from '@aurelia/testing';
import { IHookInvocationAggregator, IHIAConfig, HookName } from './_shared/hook-invocation-tracker.js';
import { TestRouteViewModelBase, HookSpecs } from './_shared/view-models.js';
import { hookSpecsMap } from './_shared/hook-spec.js';
import { createFixture, DeferralJuncture, SwapStrategy, translateOptions, transformNotifications, IRouterOptionsSpec } from './_shared/create-fixture.js';
import { IContainer } from '@aurelia/kernel';
import { addHooks, assertHooks, getParentChildHooks, getSingleHooks, getStartHooks, getStopHooks, removeHooks } from './_shared/hooks.js';
function vp(count: number, name = ''): string {
if (count === 1) {
return `<au-viewport${name.length > 0 ? ` name="${name}"` : ''}></au-viewport>`;
>>>>>>>
import { Constructable, DI, IContainer, ILogConfig, LogLevel, Registration, Writable } from '@aurelia/kernel';
import {
CustomElement,
customElement,
ICustomElementController,
IPlatform,
IViewModel,
LifecycleFlags as LF,
IHydratedController as HC,
IHydratedParentController as HPC,
Aurelia,
} from '@aurelia/runtime-html';
import {
IRouterOptions,
ResolutionMode,
SwapStrategy,
IRouter,
Params as P,
RouteNode as RN,
NavigationInstruction as NI,
RouterConfiguration,
} from '@aurelia/router';
import { assert, TestContext } from '@aurelia/testing';
import { TestRouterConfiguration } from './_shared/configuration.js';
function join(sep: string, ...parts: string[]): string {
return parts.filter(function (x) {
return x?.split('@')[0];
}).join(sep);
}
const hookNames = ['binding', 'bound', 'attaching', 'attached', 'detaching', 'unbinding', 'canLoad', 'load', 'canUnload', 'unload'] as const;
type HookName = typeof hookNames[number] | 'dispose';
class DelayedInvokerFactory<T extends HookName> {
public constructor(
public readonly name: T,
public readonly ticks: number,
) {}
public create(mgr: INotifierManager, p: IPlatform): DelayedInvoker<T> {
return new DelayedInvoker(mgr, p, this.name, this.ticks); |
<<<<<<<
=======
* Mesh 渲染组件。
*/
class MeshRenderer extends paper.BaseRenderer {
protected static readonly _helpRay: Ray;
protected readonly _materials: Material[];
uninitialize(): void;
recalculateAABB(): void;
raycast(p1: Readonly<egret3d.Ray>, p2?: boolean | egret3d.RaycastInfo, p3?: boolean): boolean;
/**
* material list
* @version paper 1.0
* @platform Web
* @language en_US
*/
/**
* 材质数组
* @version paper 1.0
* @platform Web
* @language
*/
materials: ReadonlyArray<Material>;
/**
* 材质数组中的第一个材质。
*/
material: Material | null;
}
}
declare namespace egret3d {
/**
>>>>>>> |
<<<<<<<
import { nextId } from '@aurelia/kernel';
import { INode, IRenderLocation } from '../../dom';
import { LifecycleFlags, State } from '../../flags';
import { IController, IViewFactory } from '../../lifecycle';
import { templateController } from '../custom-attribute';
import { bindable } from '../../templating/bindable';
=======
import {
IContainer,
Key,
nextId,
PLATFORM,
Registration
} from '@aurelia/kernel';
import {
HooksDefinition,
IAttributeDefinition
} from '../../definitions';
import {
INode,
IRenderLocation
} from '../../dom';
import {
BindingMode,
BindingStrategy,
LifecycleFlags,
State
} from '../../flags';
import {
IController,
IViewFactory,
MountStrategy
} from '../../lifecycle';
import { InlineObserversLookup } from '../../observation';
>>>>>>>
import { nextId } from '@aurelia/kernel';
import { INode, IRenderLocation } from '../../dom';
import { LifecycleFlags, State } from '../../flags';
import { IController, IViewFactory, MountStrategy } from '../../lifecycle';
import { templateController } from '../custom-attribute';
import { bindable } from '../../templating/bindable';
<<<<<<<
this.view.hold(location);
=======
this.view.hold(location, MountStrategy.insertBefore);
this._value = void 0;
}
public static register(container: IContainer): void {
container.register(Registration.transient('custom-attribute:with', this));
container.register(Registration.transient(this, this));
>>>>>>>
this.view.hold(location, MountStrategy.insertBefore); |
<<<<<<<
toArray,
=======
toArray,
Key,
ILogger,
>>>>>>>
toArray,
Key,
ILogger,
<<<<<<<
IDOM,
CustomElement
=======
IDOM,
BindingMode,
Bindable,
CustomElement,
>>>>>>>
IDOM,
BindingMode,
Bindable,
CustomElement,
<<<<<<<
@IAttrSyntaxTransformer private readonly attrSyntaxModifier: IAttrSyntaxTransformer,
@IDOM private readonly dom: IDOM,
) {}
=======
@IAttrSyntaxTransformer private readonly attrSyntaxModifier: IAttrSyntaxTransformer,
@ILogger logger: ILogger,
) {
this.logger = logger.scopeTo('TemplateCompiler');
}
>>>>>>>
@IAttrSyntaxTransformer private readonly attrSyntaxModifier: IAttrSyntaxTransformer,
@ILogger logger: ILogger,
@IDOM private readonly dom: IDOM,
) {
this.logger = logger.scopeTo('TemplateCompiler');
}
<<<<<<<
private compileProjections(symbol: CustomElementSymbol, projections: CustomElementDefinition[]): Record<string, CustomElementDefinition> | undefined {
if ((symbol.flags & SymbolFlags.hasProjections) === 0) { return; }
const parts: Record<string, CustomElementDefinition> = {};
const $projections = symbol.projections;
const len = $projections.length;
for (let i = 0; i < len; ++i) {
const projection = $projections[i];
const name = projection.name;
const instructions: ITargetedInstruction[][] = [];
this.compileParentNode(projection.template!, instructions, [], projections);
let definition = parts[name];
if (definition === void 0) {
// TODO right now the projections are getting nested. We need to flatten those
projections.push(definition = CustomElementDefinition.create({ name, template: projection.template?.physicalNode, instructions, needsCompile: false }));
} else {
// consolidate the projections to same slot
this.dom.appendChild((definition.template as HTMLElement), (projection.template?.physicalNode! as HTMLElement)); // TODO Provision for template
(definition.instructions as ITargetedInstruction[][]).push(...instructions);
}
parts[name] = definition;
}
return parts;
}
private compileProjectionFallback(symbol: CustomElementSymbol, projections: CustomElementDefinition[]): CustomElementDefinition {
const instructions: ITargetedInstruction[][] = [];
this.compileChildNodes(symbol, instructions, [], projections);
const template = this.dom.createTemplate() as HTMLTemplateElement;
template.content.append(...toArray(symbol.physicalNode.childNodes));
return CustomElementDefinition.create({ name: CustomElement.generateName(), template, instructions, needsCompile: false });
}
=======
}
function getTemplateName(localTemplate: HTMLTemplateElement, localTemplateNames: Set<string>): string {
const name = localTemplate.getAttribute(localTemplateIdentifier);
if (name === null || name === '') {
throw new Error('The value of "as-custom-element" attribute cannot be empty for local template');
}
if (localTemplateNames.has(name)) {
throw new Error(`Duplicate definition of the local template named ${name}`);
} else {
localTemplateNames.add(name);
}
return name;
}
function getBindingMode(bindable: Element): BindingMode {
switch (bindable.getAttribute(LocalTemplateBindableAttributes.mode)) {
case 'oneTime':
return BindingMode.oneTime;
case 'toView':
return BindingMode.toView;
case 'fromView':
return BindingMode.fromView;
case 'twoWay':
return BindingMode.twoWay;
case 'default':
default:
return BindingMode.default;
}
}
function processLocalTemplates(
template: HTMLElement,
definition: CustomElementDefinition,
context: IContainer,
dom: IDOM,
logger: ILogger,
) {
let root: HTMLElement | DocumentFragment;
if (template.nodeName === 'TEMPLATE') {
if (template.hasAttribute(localTemplateIdentifier)) {
throw new Error('The root cannot be a local template itself.');
}
root = (template as HTMLTemplateElement).content;
} else {
root = template;
}
const localTemplates = toArray(root.querySelectorAll('template[as-custom-element]')) as HTMLTemplateElement[];
const numLocalTemplates = localTemplates.length;
if (numLocalTemplates === 0) { return; }
if (numLocalTemplates === root.childElementCount) {
throw new Error('The custom element does not have any content other than local template(s).');
}
const localTemplateNames: Set<string> = new Set();
for (const localTemplate of localTemplates) {
if (localTemplate.parentNode !== root) {
throw new Error('Local templates needs to be defined directly under root.');
}
const name = getTemplateName(localTemplate, localTemplateNames);
const localTemplateType = class LocalTemplate { };
const content = localTemplate.content;
const bindableEls = toArray(content.querySelectorAll('bindable'));
const bindableInstructions = Bindable.for(localTemplateType);
const properties = new Set<string>();
const attributes = new Set<string>();
for (const bindableEl of bindableEls) {
if (bindableEl.parentNode !== content) {
throw new Error('Bindable properties of local templates needs to be defined directly under root.');
}
const property = bindableEl.getAttribute(LocalTemplateBindableAttributes.property);
if (property === null) { throw new Error(`The attribute 'property' is missing in ${bindableEl.outerHTML}`); }
const attribute = bindableEl.getAttribute(LocalTemplateBindableAttributes.attribute);
if (attribute !== null
&& attributes.has(attribute)
|| properties.has(property)
) {
throw new Error(`Bindable property and attribute needs to be unique; found property: ${property}, attribute: ${attribute}`);
} else {
if (attribute !== null) {
attributes.add(attribute);
}
properties.add(property);
}
bindableInstructions.add({
property,
attribute: attribute ?? void 0,
mode: getBindingMode(bindableEl),
});
const ignoredAttributes = bindableEl.getAttributeNames().filter((attrName) => !allowedLocalTemplateBindableAttributes.includes(attrName));
if (ignoredAttributes.length > 0) {
logger.warn(`The attribute(s) ${ignoredAttributes.join(', ')} will be ignored for ${bindableEl.outerHTML}. Only ${allowedLocalTemplateBindableAttributes.join(', ')} are processed.`);
}
content.removeChild(bindableEl);
}
const div = dom.createElement('div') as HTMLDivElement;
div.appendChild(content);
const localTemplateDefinition = CustomElement.define({ name, template: div.innerHTML }, localTemplateType);
// the casting is needed here as the dependencies are typed as readonly array
(definition.dependencies as Key[]).push(localTemplateDefinition);
context.register(localTemplateDefinition);
root.removeChild(localTemplate);
}
>>>>>>>
private compileProjections(symbol: CustomElementSymbol, projections: CustomElementDefinition[]): Record<string, CustomElementDefinition> | undefined {
if ((symbol.flags & SymbolFlags.hasProjections) === 0) { return; }
const parts: Record<string, CustomElementDefinition> = {};
const $projections = symbol.projections;
const len = $projections.length;
for (let i = 0; i < len; ++i) {
const projection = $projections[i];
const name = projection.name;
const instructions: ITargetedInstruction[][] = [];
this.compileParentNode(projection.template!, instructions, [], projections);
let definition = parts[name];
if (definition === void 0) {
// TODO right now the projections are getting nested. We need to flatten those
projections.push(definition = CustomElementDefinition.create({ name, template: projection.template?.physicalNode, instructions, needsCompile: false }));
} else {
// consolidate the projections to same slot
this.dom.appendChild((definition.template as HTMLElement), (projection.template?.physicalNode! as HTMLElement)); // TODO Provision for template
(definition.instructions as ITargetedInstruction[][]).push(...instructions);
}
parts[name] = definition;
}
return parts;
}
private compileProjectionFallback(symbol: CustomElementSymbol, projections: CustomElementDefinition[]): CustomElementDefinition {
const instructions: ITargetedInstruction[][] = [];
this.compileChildNodes(symbol, instructions, [], projections);
const template = this.dom.createTemplate() as HTMLTemplateElement;
template.content.append(...toArray(symbol.physicalNode.childNodes));
return CustomElementDefinition.create({ name: CustomElement.generateName(), template, instructions, needsCompile: false });
}
}
function getTemplateName(localTemplate: HTMLTemplateElement, localTemplateNames: Set<string>): string {
const name = localTemplate.getAttribute(localTemplateIdentifier);
if (name === null || name === '') {
throw new Error('The value of "as-custom-element" attribute cannot be empty for local template');
}
if (localTemplateNames.has(name)) {
throw new Error(`Duplicate definition of the local template named ${name}`);
} else {
localTemplateNames.add(name);
}
return name;
}
function getBindingMode(bindable: Element): BindingMode {
switch (bindable.getAttribute(LocalTemplateBindableAttributes.mode)) {
case 'oneTime':
return BindingMode.oneTime;
case 'toView':
return BindingMode.toView;
case 'fromView':
return BindingMode.fromView;
case 'twoWay':
return BindingMode.twoWay;
case 'default':
default:
return BindingMode.default;
}
}
function processLocalTemplates(
template: HTMLElement,
definition: CustomElementDefinition,
context: IContainer,
dom: IDOM,
logger: ILogger,
) {
let root: HTMLElement | DocumentFragment;
if (template.nodeName === 'TEMPLATE') {
if (template.hasAttribute(localTemplateIdentifier)) {
throw new Error('The root cannot be a local template itself.');
}
root = (template as HTMLTemplateElement).content;
} else {
root = template;
}
const localTemplates = toArray(root.querySelectorAll('template[as-custom-element]')) as HTMLTemplateElement[];
const numLocalTemplates = localTemplates.length;
if (numLocalTemplates === 0) { return; }
if (numLocalTemplates === root.childElementCount) {
throw new Error('The custom element does not have any content other than local template(s).');
}
const localTemplateNames: Set<string> = new Set();
for (const localTemplate of localTemplates) {
if (localTemplate.parentNode !== root) {
throw new Error('Local templates needs to be defined directly under root.');
}
const name = getTemplateName(localTemplate, localTemplateNames);
const localTemplateType = class LocalTemplate { };
const content = localTemplate.content;
const bindableEls = toArray(content.querySelectorAll('bindable'));
const bindableInstructions = Bindable.for(localTemplateType);
const properties = new Set<string>();
const attributes = new Set<string>();
for (const bindableEl of bindableEls) {
if (bindableEl.parentNode !== content) {
throw new Error('Bindable properties of local templates needs to be defined directly under root.');
}
const property = bindableEl.getAttribute(LocalTemplateBindableAttributes.property);
if (property === null) { throw new Error(`The attribute 'property' is missing in ${bindableEl.outerHTML}`); }
const attribute = bindableEl.getAttribute(LocalTemplateBindableAttributes.attribute);
if (attribute !== null
&& attributes.has(attribute)
|| properties.has(property)
) {
throw new Error(`Bindable property and attribute needs to be unique; found property: ${property}, attribute: ${attribute}`);
} else {
if (attribute !== null) {
attributes.add(attribute);
}
properties.add(property);
}
bindableInstructions.add({
property,
attribute: attribute ?? void 0,
mode: getBindingMode(bindableEl),
});
const ignoredAttributes = bindableEl.getAttributeNames().filter((attrName) => !allowedLocalTemplateBindableAttributes.includes(attrName));
if (ignoredAttributes.length > 0) {
logger.warn(`The attribute(s) ${ignoredAttributes.join(', ')} will be ignored for ${bindableEl.outerHTML}. Only ${allowedLocalTemplateBindableAttributes.join(', ')} are processed.`);
}
content.removeChild(bindableEl);
}
const div = dom.createElement('div') as HTMLDivElement;
div.appendChild(content);
const localTemplateDefinition = CustomElement.define({ name, template: div.innerHTML }, localTemplateType);
// the casting is needed here as the dependencies are typed as readonly array
(definition.dependencies as Key[]).push(localTemplateDefinition);
context.register(localTemplateDefinition);
root.removeChild(localTemplate);
} |
<<<<<<<
// KEEP THIS!
public match(current) {
// const rootScope = this.router['rootScope'];
// const match = rootScope.routeTable.findMatchingRoute(current.path);
// console.log('matching route', match);
// let routes = rootScope.routeTable.routes;
// for (const route of routes) {
// console.log(route, this.isWithin(route, current));
// }
// routes = routes.filter(route => this.isWithin(route, current));
// console.log('routes within', routes.slice());
// let length = routes.length + 1;
// while (length > routes.length) {
// length = routes.length;
// for (let i = 0; i < routes.length; i++) {
// for (let j = 0; j < routes.length; j++) {
// if (i !== j && this.isWithin(routes[i], routes[j])) {
// routes.splice(i, 1);
// i--;
// break;
// }
// }
// }
// }
// console.log('routes within not within', routes);
// const urlRoutes = [];
// const currentInstructions = this.router.instructionResolver.flattenViewportInstructions(current.instructions);
// while (currentInstructions.length > 0 && routes.length > 0) {
// for (const route of routes) {
// if (this.isWithin(route, { instructions: currentInstructions })) {
// urlRoutes.push(route);
// for (const part of route.instructions) {
// const index = currentInstructions.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
// if (index > -1) {
// currentInstructions.splice(index, 1);
// }
// }
// }
// }
// }
// console.log('routes end', urlRoutes, routes, currentInstructions);
}
public isWithin(find, lookup) {
const parts = this.router.instructionResolver.flattenViewportInstructions(find.instructions);
const instructions = this.router.instructionResolver.flattenViewportInstructions(lookup.instructions);
for (const part of parts) {
const index = instructions.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
if (index > -1) {
instructions.splice(index, 1);
} else {
return false;
}
}
return true;
// return !parts.some(part => !instructions.find(match => !part.sameComponent(match) || !part.sameViewport(match)));
// for (const part of parts) {
// const index = instrs.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
// if (index > -1) {
// instrs.splice(index, 1);
// matches++;
// }
// }
}
public matches(route, instructions) {
const parts = this.router.instructionResolver.flattenViewportInstructions(route);
const instrs = this.router.instructionResolver.flattenViewportInstructions(instructions);
let matches = 0;
for (const part of parts) {
const index = instrs.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
if (index > -1) {
instrs.splice(index, 1);
matches++;
}
}
return { matches, match: matches === parts.length };
}
public bound() {
setTimeout(() => { this.link = 'newLink'; }, 5000);
const paths = [
'authors',
'authors+books',
'authors+about',
'authors/author(1)',
'authors/author(1)+books',
'authors/author(1)+about',
'authors/author(1)+about+books',
];
const states = paths.map(path => { return { path: path, instructions: this.router.instructionResolver.parseViewportInstructions(path) }; });
const viewports = {
'authors': 'left',
'about': 'middle',
'books': 'right',
};
for (const state of states) {
for (const instruction of state.instructions) {
if (viewports[instruction.componentName]) {
instruction.setViewport(viewports[instruction.componentName]);
if (instruction.nextScopeInstructions) {
instruction.nextScopeInstructions[0].setViewport('down');
}
}
}
}
// const routes = states.map(state => {
// return {
// path: state.path,
// instructions:
// [this.router.instructionResolver.stringifyViewportInstructions(this.router.instructionResolver.flattenViewportInstructions(state.instructions))]
// };
// });
const routes = [
{ path: 'authors', instructions: [{ component: 'authors', viewport: 'left' }] },
{ path: 'authors+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'books', viewport: 'right' }] },
{ path: 'authors+about', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'about', viewport: 'middle' }] },
{ path: 'authors/:id', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }] },
{ path: 'authors/:id+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }, { component: 'books', viewport: 'right' }] },
{ path: 'authors/:id+about', instructions: [{ component: 'main', viewport: 'gate' }, { component: 'authors', viewport: 'lists' }, { component: 'author', viewport: 'content' }] },
{ path: 'authors/:id+about+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }, { component: 'about', viewport: 'middle' }, { component: 'books', viewport: 'right' }] },
];
this.router.addRoutes(routes);
console.log('routes', routes);
// for (const state of states) {
// const matches = this.matches(route, state.instructions)
// console.log('match', state.path, matches);
// }
=======
public afterBind() {
>>>>>>>
// KEEP THIS!
public match(current) {
// const rootScope = this.router['rootScope'];
// const match = rootScope.routeTable.findMatchingRoute(current.path);
// console.log('matching route', match);
// let routes = rootScope.routeTable.routes;
// for (const route of routes) {
// console.log(route, this.isWithin(route, current));
// }
// routes = routes.filter(route => this.isWithin(route, current));
// console.log('routes within', routes.slice());
// let length = routes.length + 1;
// while (length > routes.length) {
// length = routes.length;
// for (let i = 0; i < routes.length; i++) {
// for (let j = 0; j < routes.length; j++) {
// if (i !== j && this.isWithin(routes[i], routes[j])) {
// routes.splice(i, 1);
// i--;
// break;
// }
// }
// }
// }
// console.log('routes within not within', routes);
// const urlRoutes = [];
// const currentInstructions = this.router.instructionResolver.flattenViewportInstructions(current.instructions);
// while (currentInstructions.length > 0 && routes.length > 0) {
// for (const route of routes) {
// if (this.isWithin(route, { instructions: currentInstructions })) {
// urlRoutes.push(route);
// for (const part of route.instructions) {
// const index = currentInstructions.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
// if (index > -1) {
// currentInstructions.splice(index, 1);
// }
// }
// }
// }
// }
// console.log('routes end', urlRoutes, routes, currentInstructions);
}
public isWithin(find, lookup) {
const parts = this.router.instructionResolver.flattenViewportInstructions(find.instructions);
const instructions = this.router.instructionResolver.flattenViewportInstructions(lookup.instructions);
for (const part of parts) {
const index = instructions.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
if (index > -1) {
instructions.splice(index, 1);
} else {
return false;
}
}
return true;
// return !parts.some(part => !instructions.find(match => !part.sameComponent(match) || !part.sameViewport(match)));
// for (const part of parts) {
// const index = instrs.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
// if (index > -1) {
// instrs.splice(index, 1);
// matches++;
// }
// }
}
public matches(route, instructions) {
const parts = this.router.instructionResolver.flattenViewportInstructions(route);
const instrs = this.router.instructionResolver.flattenViewportInstructions(instructions);
let matches = 0;
for (const part of parts) {
const index = instrs.findIndex(match => part.sameComponent(match) && part.sameViewport(match));
if (index > -1) {
instrs.splice(index, 1);
matches++;
}
}
return { matches, match: matches === parts.length };
}
public afterBind() {
setTimeout(() => { this.link = 'newLink'; }, 5000);
const paths = [
'authors',
'authors+books',
'authors+about',
'authors/author(1)',
'authors/author(1)+books',
'authors/author(1)+about',
'authors/author(1)+about+books',
];
const states = paths.map(path => { return { path: path, instructions: this.router.instructionResolver.parseViewportInstructions(path) }; });
const viewports = {
'authors': 'left',
'about': 'middle',
'books': 'right',
};
for (const state of states) {
for (const instruction of state.instructions) {
if (viewports[instruction.componentName]) {
instruction.setViewport(viewports[instruction.componentName]);
if (instruction.nextScopeInstructions) {
instruction.nextScopeInstructions[0].setViewport('down');
}
}
}
}
// const routes = states.map(state => {
// return {
// path: state.path,
// instructions:
// [this.router.instructionResolver.stringifyViewportInstructions(this.router.instructionResolver.flattenViewportInstructions(state.instructions))]
// };
// });
const routes = [
{ path: 'authors', instructions: [{ component: 'authors', viewport: 'left' }] },
{ path: 'authors+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'books', viewport: 'right' }] },
{ path: 'authors+about', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'about', viewport: 'middle' }] },
{ path: 'authors/:id', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }] },
{ path: 'authors/:id+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }, { component: 'books', viewport: 'right' }] },
{ path: 'authors/:id+about', instructions: [{ component: 'main', viewport: 'gate' }, { component: 'authors', viewport: 'lists' }, { component: 'author', viewport: 'content' }] },
{ path: 'authors/:id+about+books', instructions: [{ component: 'authors', viewport: 'left' }, { component: 'author', viewport: 'down' }, { component: 'about', viewport: 'middle' }, { component: 'books', viewport: 'right' }] },
];
this.router.addRoutes(routes);
console.log('routes', routes);
// for (const state of states) {
// const matches = this.matches(route, state.instructions)
// console.log('match', state.path, matches);
// } |
<<<<<<<
import { IStartTaskManager } from '../lifecycle-task';
import { ComputedWatcher, ExpressionWatcher } from '../observation/computed-observer';
import { IObserverLocator } from '../observation/observer-locator';
import { IExpressionParser, BindingType } from '../binding/expression-parser';
import { AccessScopeExpression } from '../binding/ast';
import { IWatchDefinition } from './watch';
=======
import { ICompositionRoot } from '../aurelia';
>>>>>>>
import { ComputedWatcher, ExpressionWatcher } from '../observation/computed-observer';
import { IObserverLocator } from '../observation/observer-locator';
import { IExpressionParser, BindingType } from '../binding/expression-parser';
import { AccessScopeExpression } from '../binding/ast';
import { ICompositionRoot } from '../aurelia';
<<<<<<<
=======
this.scope = Scope.create(flags, this.bindingContext!, null);
const hooks = this.hooks;
>>>>>>> |
<<<<<<<
Registration,
InstanceProvider
=======
Registration,
>>>>>>>
Registration,
InstanceProvider
<<<<<<<
rootProvider: InstanceProvider<CompositionRoot<T>>,
=======
enhance: boolean = false,
>>>>>>>
rootProvider: InstanceProvider<CompositionRoot<T>>,
enhance: boolean = false,
<<<<<<<
const taskManager = container.get(IStartTaskManager);
taskManager.enqueueBeforeCompileChildren();
// This hack with delayed hydration is to make the controller instance accessible to the `beforeCompileChildren` hook via the composition root.
this.controller = Controller.forCustomElement(instance, lifecycle, this.host, container, void 0, this.strategy as number, false);
const definition = CustomElement.getDefinition(instance.constructor as Constructable);
(this.controller as unknown as Controller)['hydrateCustomElement'](definition, container, void 0);
=======
this.controller = Controller.forCustomElement(instance, lifecycle, this.host, container, void 0, this.strategy as number, this.enhanceDefinition);
>>>>>>>
const taskManager = container.get(IStartTaskManager);
taskManager.enqueueBeforeCompileChildren();
// This hack with delayed hydration is to make the controller instance accessible to the `beforeCompileChildren` hook via the composition root.
this.controller = Controller.forCustomElement(instance, lifecycle, this.host, container, void 0, this.strategy as number, false, this.enhanceDefinition);
const definition = CustomElement.getDefinition(instance.constructor as Constructable);
(this.controller as unknown as Controller)['hydrateCustomElement'](definition, container, void 0);
<<<<<<<
public app(config: ISinglePageApp<TNode>): Omit<this, 'register' | 'app'> {
this.next = new CompositionRoot(config, this.container, this.rootProvider);
if (this.isRunning) {
this.start();
}
=======
public app(config: ISinglePageApp<TNode>): Omit<this, 'register' | 'app' | 'enhance'> {
return this.configureRoot(config);
}
>>>>>>>
public app(config: ISinglePageApp<TNode>): Omit<this, 'register' | 'app' | 'enhance'> {
return this.configureRoot(config);
} |
<<<<<<<
import { IProjections } from './custom-elements/au-slot';
=======
import { Controller } from '../templating/controller';
>>>>>>>
import { IProjections } from './custom-elements/au-slot';
import { Controller } from '../templating/controller'; |
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container as unknown as IRenderContext);
=======
const viewport = new ViewportContent(new ViewportInstruction('global'), null, router.container);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container);
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container as unknown as IRenderContext);
=======
const viewport = new ViewportContent(new ViewportInstruction('global'), null, router.container);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container);
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container as unknown as IRenderContext);
assert.strictEqual(viewport.toComponentType(router.container as unknown as IRenderContext), Global, `viewport.toComponentType(router.container as unknown as IRenderContext)`);
=======
const viewport = new ViewportContent(new ViewportInstruction('global'), null, router.container);
assert.strictEqual(viewport.toComponentType(router.container), Global, `viewport.toComponentType(router.container)`);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container);
assert.strictEqual(viewport.toComponentType(router.container), Global, `viewport.toComponentType(router.container)`);
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction(Global), null, router.container as unknown as IRenderContext);
assert.strictEqual(viewport.toComponentType(router.container as unknown as IRenderContext), Global, `viewport.toComponentType(router.container as unknown as IRenderContext)`);
=======
const viewport = new ViewportContent(new ViewportInstruction(Global), null, router.container);
assert.strictEqual(viewport.toComponentType(router.container), Global, `viewport.toComponentType(router.container)`);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction(Global), null, router.container);
assert.strictEqual(viewport.toComponentType(router.container), Global, `viewport.toComponentType(router.container)`);
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container as unknown as IRenderContext);
const component = viewport.toComponentInstance(router.container as unknown as IRenderContext);
=======
const viewport = new ViewportContent(new ViewportInstruction('global'), null, router.container);
const component = viewport.toComponentInstance(router.container);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction('global'), null, router.container);
const component = viewport.toComponentInstance(router.container);
<<<<<<<
const viewport = new ViewportContent(router.createViewportInstruction(Global), null, router.container as unknown as IRenderContext);
const component = viewport.toComponentInstance(router.container as unknown as IRenderContext);
=======
const viewport = new ViewportContent(new ViewportInstruction(Global), null, router.container);
const component = viewport.toComponentInstance(router.container);
>>>>>>>
const viewport = new ViewportContent(router.createViewportInstruction(Global), null, router.container);
const component = viewport.toComponentInstance(router.container); |
<<<<<<<
public get $state(): State {
return this.binding.$state;
=======
public get part(): string | undefined {
return this.binding.part;
}
public get isBound(): boolean {
return this.binding.isBound;
>>>>>>>
public get isBound(): boolean {
return this.binding.isBound; |
<<<<<<<
callContextToDebounce: LifecycleFlags,
delay: number,
timeoutId: any,
oldValue: any
}
=======
callContextToDebounce: BindingFlags;
delay: number;
timeoutId: any;
oldValue: any;
};
>>>>>>>
callContextToDebounce: LifecycleFlags;
delay: number;
timeoutId: any;
oldValue: any;
};
<<<<<<<
export function debounceCall(this: DebounceableBinding, newValue: any, oldValue: any, flags: LifecycleFlags) {
=======
export function debounceCall(this: DebounceableBinding, newValue: any, oldValue: any, flags: BindingFlags): void {
>>>>>>>
export function debounceCall(this: DebounceableBinding, newValue: any, oldValue: any, flags: LifecycleFlags): void {
<<<<<<<
public bind(flags: LifecycleFlags, scope: IScope, binding: DebounceableBinding, delay = 200) {
=======
public bind(flags: BindingFlags, scope: IScope, binding: DebounceableBinding, delay: number = 200): void {
>>>>>>>
public bind(flags: LifecycleFlags, scope: IScope, binding: DebounceableBinding, delay: number = 200): void {
<<<<<<<
public unbind(flags: LifecycleFlags, scope: IScope, binding: DebounceableBinding) {
=======
public unbind(flags: BindingFlags, scope: IScope, binding: DebounceableBinding): void {
>>>>>>>
public unbind(flags: LifecycleFlags, scope: IScope, binding: DebounceableBinding): void { |
<<<<<<<
import { ILifecycle } from '../lifecycle';
import { CollectionKind, ICollectionObserver, IObservedSet, LifecycleFlags } from '../observation';
// tslint:disable:no-reserved-keywords
=======
import { BindingFlags, CollectionKind, IChangeSet, ICollectionObserver, IObservedSet } from '../observation';
>>>>>>>
import { ILifecycle } from '../lifecycle';
import { CollectionKind, ICollectionObserver, IObservedSet, LifecycleFlags } from '../observation';
// tslint:disable:no-reserved-keywords
<<<<<<<
constructor(lifecycle: ILifecycle, set: IObservedSet) {
this.lifecycle = lifecycle;
set.$observer = this;
this.collection = set;
=======
constructor(changeSet: IChangeSet, observedSet: IObservedSet) {
this.changeSet = changeSet;
observedSet.$observer = this;
this.collection = observedSet;
>>>>>>>
constructor(lifecycle: ILifecycle, observedSet: IObservedSet) {
this.lifecycle = lifecycle;
observedSet.$observer = this;
this.collection = observedSet;
<<<<<<<
export function getSetObserver(lifecycle: ILifecycle, set: IObservedSet): SetObserver {
return (set.$observer as SetObserver) || new SetObserver(lifecycle, set);
=======
export function getSetObserver(changeSet: IChangeSet, observedSet: IObservedSet): SetObserver {
return (observedSet.$observer as SetObserver) || new SetObserver(changeSet, observedSet);
>>>>>>>
export function getSetObserver(lifecycle: ILifecycle, observedSet: IObservedSet): SetObserver {
return (observedSet.$observer as SetObserver) || new SetObserver(lifecycle, observedSet); |
<<<<<<<
const { toView } = BindingMode;
=======
import type { Scope } from '../observation/binding-context';
const { toView, oneTime } = BindingMode;
>>>>>>>
import type { Scope } from '../observation/binding-context';
const { toView } = BindingMode;
<<<<<<<
public updateTarget(value: unknown, flags: LifecycleFlags): void {
const partBindings = this.partBindings;
const staticParts = this.interpolation.parts;
const ii = partBindings.length;
let result = '';
if (ii === 1) {
result = staticParts[0] + partBindings[0].value + staticParts[1];
} else {
result = staticParts[0];
for (let i = 0; ii > i; ++i) {
result += partBindings[i].value + staticParts[i + 1];
}
}
const targetObserver = this.targetObserver;
// Alpha: during bind a simple strategy for bind is always flush immediately
// todo:
// (1). determine whether this should be the behavior
// (2). if not, then fix tests to reflect the changes/scheduler to properly yield all with aurelia.start().wait()
const shouldQueueFlush = (flags & LifecycleFlags.fromBind) === 0 && (targetObserver.type & AccessorType.Layout) > 0;
if (shouldQueueFlush) {
flags |= LifecycleFlags.noTargetObserverQueue;
this.task?.cancel();
this.task = this.$scheduler.queueRenderTask(() => {
(targetObserver as unknown as INodeAccessor).flushChanges?.(flags);
this.task = null;
}, queueTaskOptions);
}
targetObserver.setValue(result, flags);
}
public $bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void {
=======
public $bind(flags: LifecycleFlags, scope: Scope, hostScope: Scope | null): void {
>>>>>>>
public updateTarget(value: unknown, flags: LifecycleFlags): void {
const partBindings = this.partBindings;
const staticParts = this.interpolation.parts;
const ii = partBindings.length;
let result = '';
if (ii === 1) {
result = staticParts[0] + partBindings[0].value + staticParts[1];
} else {
result = staticParts[0];
for (let i = 0; ii > i; ++i) {
result += partBindings[i].value + staticParts[i + 1];
}
}
const targetObserver = this.targetObserver;
// Alpha: during bind a simple strategy for bind is always flush immediately
// todo:
// (1). determine whether this should be the behavior
// (2). if not, then fix tests to reflect the changes/scheduler to properly yield all with aurelia.start().wait()
const shouldQueueFlush = (flags & LifecycleFlags.fromBind) === 0 && (targetObserver.type & AccessorType.Layout) > 0;
if (shouldQueueFlush) {
flags |= LifecycleFlags.noTargetObserverQueue;
this.task?.cancel();
this.task = this.$scheduler.queueRenderTask(() => {
(targetObserver as unknown as INodeAccessor).flushChanges?.(flags);
this.task = null;
}, queueTaskOptions);
}
targetObserver.setValue(result, flags);
}
public $bind(flags: LifecycleFlags, scope: Scope, hostScope: Scope | null): void {
<<<<<<<
public dispose(): void {
this.interceptor
= this.interpolation
= this.locator
= this.target
= (void 0)!;
}
=======
>>>>>>>
<<<<<<<
=======
this.$scheduler = locator.get(IScheduler);
this.targetObserver = observerLocator.getAccessor(LifecycleFlags.none, target, targetProperty);
}
public updateTarget(value: unknown, flags: LifecycleFlags): void {
this.targetObserver.setValue(value, flags | LifecycleFlags.updateTargetInstance, this.target, this.targetProperty);
>>>>>>>
<<<<<<<
const sourceExpression = this.sourceExpression;
const canOptimize = sourceExpression.$kind === ExpressionKind.AccessScope && this.observerSlots > 1;
if (!canOptimize) {
const shouldConnect = (this.mode & toView) > 0;
if (shouldConnect) {
this.version++;
}
newValue = sourceExpression.evaluate(flags, this.$scope!, this.$hostScope, this.locator, shouldConnect ? this.interceptor : null);
if (shouldConnect) {
this.interceptor.unobserve(false);
=======
const targetObserver = this.targetObserver;
// Alpha: during bind a simple strategy for bind is always flush immediately
// todo:
// (1). determine whether this should be the behavior
// (2). if not, then fix tests to reflect the changes/scheduler to properly yield all with aurelia.start()
const shouldQueueFlush = (flags & LifecycleFlags.fromBind) === 0 && (targetObserver.type & AccessorType.Layout) > 0;
const newValue = this.interpolation.evaluate(flags, this.$scope!, this.$hostScope, this.locator, null);
const oldValue = targetObserver.getValue(this.target, this.targetProperty);
const interceptor = this.interceptor;
// todo(fred): maybe let the observer decides whether it updates
if (newValue !== oldValue) {
if (shouldQueueFlush) {
flags |= LifecycleFlags.noTargetObserverQueue;
this.task?.cancel();
targetObserver.task?.cancel();
targetObserver.task = this.task = this.$scheduler.queueRenderTask(() => {
(targetObserver as Partial<INodeAccessor>).flushChanges?.(flags);
this.task = targetObserver.task = null;
}, queueTaskOptions);
>>>>>>>
const sourceExpression = this.sourceExpression;
const canOptimize = sourceExpression.$kind === ExpressionKind.AccessScope && this.observerSlots > 1;
if (!canOptimize) {
const shouldConnect = (this.mode & toView) > 0;
if (shouldConnect) {
this.version++;
}
newValue = sourceExpression.evaluate(flags, this.$scope!, this.$hostScope, this.locator, shouldConnect ? this.interceptor : null);
if (shouldConnect) {
this.interceptor.unobserve(false);
<<<<<<<
public handleCollectionChange(indexMap: IndexMap, flags: LifecycleFlags): void {
this.owner.updateTarget(void 0, flags);
}
public $bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void {
=======
public $bind(flags: LifecycleFlags, scope: Scope, hostScope: Scope | null): void {
>>>>>>>
public handleCollectionChange(indexMap: IndexMap, flags: LifecycleFlags): void {
this.owner.updateTarget(void 0, flags);
}
public $bind(flags: LifecycleFlags, scope: Scope, hostScope: Scope | null): void {
<<<<<<<
private observeArray(flags: LifecycleFlags, arr: IObservedArray): void {
const newObserver = this.arrayObserver = this.observerLocator.getArrayObserver(flags, arr);
newObserver.addCollectionSubscriber(this.interceptor);
}
private unobserveArray(): void {
this.arrayObserver?.removeCollectionSubscriber(this.interceptor);
this.arrayObserver = void 0;
}
=======
>>>>>>>
private observeArray(flags: LifecycleFlags, arr: IObservedArray): void {
const newObserver = this.arrayObserver = this.observerLocator.getArrayObserver(flags, arr);
newObserver.addCollectionSubscriber(this.interceptor);
}
private unobserveArray(): void {
this.arrayObserver?.removeCollectionSubscriber(this.interceptor);
this.arrayObserver = void 0;
} |
<<<<<<<
public bind(flags: LifecycleFlags, scope: IScope, binding: ThrottleableBinding, delay = 200) {
=======
public bind(flags: BindingFlags, scope: IScope, binding: ThrottleableBinding, delay: number = 200): void {
>>>>>>>
public bind(flags: LifecycleFlags, scope: IScope, binding: ThrottleableBinding, delay: number = 200): void {
<<<<<<<
public unbind(flags: LifecycleFlags, scope: IScope, binding: ThrottleableBinding) {
=======
public unbind(flags: BindingFlags, scope: IScope, binding: ThrottleableBinding): void {
>>>>>>>
public unbind(flags: LifecycleFlags, scope: IScope, binding: ThrottleableBinding): void { |
<<<<<<<
slowTestThreshold: 5,
snapshotResolver: undefined,
=======
slowTestThreshold: 75,
snapshotResolver: null,
>>>>>>>
slowTestThreshold: 75,
snapshotResolver: undefined, |
<<<<<<<
readonly projections?: CustomElementDefinition[];
=======
readonly enhance?: boolean;
>>>>>>>
readonly enhance?: boolean;
readonly projections?: CustomElementDefinition[];
<<<<<<<
public readonly projections: CustomElementDefinition[],
=======
public readonly enhance: boolean,
>>>>>>>
public readonly enhance: boolean,
public readonly projections: CustomElementDefinition[],
<<<<<<<
mergeArrays(def.projections),
=======
fromDefinitionOrDefault('enhance', def, () => false),
>>>>>>>
fromDefinitionOrDefault('enhance', def, () => false),
mergeArrays(def.projections),
<<<<<<<
mergeArrays(CustomElement.getAnnotation(Type, 'projections'), Type.projections),
=======
fromAnnotationOrTypeOrDefault('enhance', Type, () => false),
>>>>>>>
fromAnnotationOrTypeOrDefault('enhance', Type, () => false),
mergeArrays(CustomElement.getAnnotation(Type, 'projections'), Type.projections),
<<<<<<<
mergeArrays(CustomElement.getAnnotation(Type, 'projections'), nameOrDef.projections, Type.projections),
=======
fromAnnotationOrDefinitionOrTypeOrDefault('enhance', nameOrDef, Type, () => false),
>>>>>>>
fromAnnotationOrDefinitionOrTypeOrDefault('enhance', nameOrDef, Type, () => false),
mergeArrays(CustomElement.getAnnotation(Type, 'projections'), nameOrDef.projections, Type.projections), |
<<<<<<<
State,
=======
>>>>>>>
<<<<<<<
public $bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void {
if (this.$state & State.isBound) {
=======
public $bind(flags: LifecycleFlags, scope: IScope, part?: string): void {
if (this.isBound) {
>>>>>>>
public $bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void {
if (this.isBound) { |
<<<<<<<
import { AuSlotContentType } from './resources/custom-elements/au-slot';
=======
import {
CustomAttributeDefinition,
} from './resources/custom-attribute';
>>>>>>>
import { AuSlotContentType } from './resources/custom-elements/au-slot';
import {
CustomAttributeDefinition,
} from './resources/custom-attribute';
<<<<<<<
readonly $state: State;
$bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void;
=======
/**
* The name of the `replace-part` template that this binding was declared inside of (if any, otherwise this property is `undefined`).
*
* This property is passed through the AST during evaluation, which allows the scope traversal to go up to the scope of the `replace-part` if a property does not exist inside the `replaceable`.
*/
readonly part?: string;
readonly isBound: boolean;
/**
* {@type IBinding}
*/
$bind(flags: LifecycleFlags, scope: IScope, part?: string): void;
>>>>>>>
readonly isBound: boolean;
$bind(flags: LifecycleFlags, scope: IScope, hostScope: IScope | null): void;
<<<<<<<
=======
/**
* The names of the `replace` parts that were declared in the same scope as this view's template.
*
* The `replaceable` template children with those names will use this view's scope as the outer scope for properties that don't exist on the inner scope.
*/
readonly scopeParts: readonly string[];
>>>>>>>
<<<<<<<
=======
/**
* The names of the `replace` parts that were declared in the same scope as this component's template.
*
* The `replaceable` template children with those names will use this components's scope as the outer scope for properties that don't exist on the inner scope.
*/
readonly scopeParts: readonly string[];
>>>>>>> |
<<<<<<<
public $hostScope: IScope | null = null;
=======
public part?: string;
public $scheduler: IScheduler;
public task: ITask | null = null;
>>>>>>>
public $hostScope: IScope | null = null;
public $scheduler: IScheduler;
public task: ITask | null = null;
<<<<<<<
const previousValue = this.targetObserver.getValue();
const newValue = this.interpolation.evaluate(flags, this.$scope!, this.$hostScope, this.locator);
if (newValue !== previousValue) {
this.interceptor.updateTarget(newValue, flags);
=======
const targetObserver = this.targetObserver;
// Alpha: during bind a simple strategy for bind is always flush immediately
// todo:
// (1). determine whether this should be the behavior
// (2). if not, then fix tests to reflect the changes/scheduler to properly yield all with aurelia.start().wait()
const shouldQueueFlush = (flags & LifecycleFlags.fromBind) === 0 && (targetObserver.type & AccessorType.Layout) > 0;
const newValue = this.interpolation.evaluate(flags, this.$scope!, this.locator, this.part);
const oldValue = targetObserver.getValue();
const interceptor = this.interceptor;
// todo(fred): maybe let the observer decides whether it updates
if (newValue !== oldValue) {
if (shouldQueueFlush) {
flags |= LifecycleFlags.noTargetObserverQueue;
this.task?.cancel();
targetObserver.task?.cancel();
targetObserver.task = this.task = this.$scheduler.queueRenderTask(() => {
(targetObserver as Partial<INodeAccessor>).flushChanges?.(flags);
this.task = targetObserver.task = null;
}, queueTaskOptions);
}
interceptor.updateTarget(newValue, flags);
>>>>>>>
const targetObserver = this.targetObserver;
// Alpha: during bind a simple strategy for bind is always flush immediately
// todo:
// (1). determine whether this should be the behavior
// (2). if not, then fix tests to reflect the changes/scheduler to properly yield all with aurelia.start().wait()
const shouldQueueFlush = (flags & LifecycleFlags.fromBind) === 0 && (targetObserver.type & AccessorType.Layout) > 0;
const newValue = this.interpolation.evaluate(flags, this.$scope!, this.$hostScope, this.locator);
const oldValue = targetObserver.getValue();
const interceptor = this.interceptor;
// todo(fred): maybe let the observer decides whether it updates
if (newValue !== oldValue) {
if (shouldQueueFlush) {
flags |= LifecycleFlags.noTargetObserverQueue;
this.task?.cancel();
targetObserver.task?.cancel();
targetObserver.task = this.task = this.$scheduler.queueRenderTask(() => {
(targetObserver as Partial<INodeAccessor>).flushChanges?.(flags);
this.task = targetObserver.task = null;
}, queueTaskOptions);
}
interceptor.updateTarget(newValue, flags);
<<<<<<<
this.sourceExpression.connect(flags, this.$scope!, this.$hostScope, this.interceptor);
this.interceptor.unobserve(false);
=======
this.sourceExpression.connect(flags, this.$scope!, interceptor, this.part);
interceptor.unobserve(false);
>>>>>>>
this.sourceExpression.connect(flags, this.$scope!, this.$hostScope, interceptor);
interceptor.unobserve(false);
<<<<<<<
if (this.mode & toView) {
sourceExpression.connect(flags, scope, hostScope, this.interceptor);
=======
if ((mode & toView) > 0) {
sourceExpression.connect(flags, scope, this.interceptor, part);
>>>>>>>
if ((mode & toView) > 0) {
sourceExpression.connect(flags, scope, hostScope, this.interceptor); |
<<<<<<<
export interface AuMarker extends INode { }
/*@internal*/
=======
/** @internal */
>>>>>>>
export interface AuMarker extends INode { }
/** @internal */ |
<<<<<<<
IServiceLocator,
=======
Metadata,
DI,
>>>>>>>
IServiceLocator,
Metadata,
DI,
<<<<<<<
if (this.hooks.hasDefine) {
if (this.debug) {
this.logger.trace(`invoking define() hook`);
}
=======
this.scope = Scope.create(flags, this.viewModel!, null);
const hooks = this.hooks;
if (hooks.hasDefine) {
if (this.debug) { this.logger.trace(`invoking define() hook`); }
>>>>>>>
if (this.hooks.hasDefine) {
if (this.debug) { this.logger.trace(`invoking define() hook`); }
<<<<<<<
if (definition.watches.length > 0) {
createWatchers(this, this.container, definition, instance);
}
createObservers(this.lifecycle, definition, flags, instance);
=======
createObservers(this.lifecycle, definition, this.flags, instance);
>>>>>>>
if (definition.watches.length > 0) {
createWatchers(this, this.container, definition, instance);
}
createObservers(this.lifecycle, definition, this.flags, instance);
<<<<<<<
const AccessScopeAst = {
map: new Map<PropertyKey, AccessScopeExpression>(),
for(key: PropertyKey) {
let ast = AccessScopeAst.map.get(key);
if (ast == null) {
ast = new AccessScopeExpression(key as string, 0);
AccessScopeAst.map.set(key, ast);
}
return ast;
},
};
function createWatchers(
controller: Controller,
context: IServiceLocator,
definition: CustomElementDefinition | CustomAttributeDefinition,
instance: object,
) {
const observerLocator = context!.get(IObserverLocator);
const expressionParser = context.get(IExpressionParser);
const watches = definition.watches;
const hasProxy = controller.platform.Proxy != null;
let expression: IWatchDefinition['expression'];
let callback: IWatchDefinition['callback'];
for (let i = 0, ii = watches.length; ii > i; ++i) {
({ expression, callback } = watches[i]);
callback = typeof callback === 'function'
? callback
: Reflect.get(instance, callback) as IWatcherCallback<object>;
if (typeof callback !== 'function') {
throw new Error(`Invalid callback for @watch decorator: ${String(callback)}`);
}
if (typeof expression === 'function') {
controller.addBinding(new ComputedWatcher(
instance as IObservable,
observerLocator,
expression,
callback,
// there should be a flag to purposely disable proxy
hasProxy,
));
} else {
const ast = typeof expression === 'string'
? expressionParser.parse(expression, BindingType.BindCommand)
: AccessScopeAst.for(expression);
controller.addBinding(new ExpressionWatcher(
controller.scope!,
context,
observerLocator,
ast,
callback
) as unknown as IBinding);
}
}
}
function clearLinks(initiator: Controller): void {
let cur = initiator.head;
initiator.head = initiator.tail = null;
let next: Controller | null;
while (cur !== null) {
next = cur.next;
cur.next = null;
cur = next;
}
}
=======
>>>>>>>
const AccessScopeAst = {
map: new Map<PropertyKey, AccessScopeExpression>(),
for(key: PropertyKey) {
let ast = AccessScopeAst.map.get(key);
if (ast == null) {
ast = new AccessScopeExpression(key as string, 0);
AccessScopeAst.map.set(key, ast);
}
return ast;
},
};
function createWatchers(
controller: Controller,
context: IServiceLocator,
definition: CustomElementDefinition | CustomAttributeDefinition,
instance: object,
) {
const observerLocator = context!.get(IObserverLocator);
const expressionParser = context.get(IExpressionParser);
const watches = definition.watches;
const hasProxy = controller.platform.Proxy != null;
let expression: IWatchDefinition['expression'];
let callback: IWatchDefinition['callback'];
for (let i = 0, ii = watches.length; ii > i; ++i) {
({ expression, callback } = watches[i]);
callback = typeof callback === 'function'
? callback
: Reflect.get(instance, callback) as IWatcherCallback<object>;
if (typeof callback !== 'function') {
throw new Error(`Invalid callback for @watch decorator: ${String(callback)}`);
}
if (typeof expression === 'function') {
controller.addBinding(new ComputedWatcher(
instance as IObservable,
observerLocator,
expression,
callback,
// there should be a flag to purposely disable proxy
hasProxy,
));
} else {
const ast = typeof expression === 'string'
? expressionParser.parse(expression, BindingType.BindCommand)
: AccessScopeAst.for(expression);
controller.addBinding(new ExpressionWatcher(
controller.scope!,
context,
observerLocator,
ast,
callback
) as unknown as IBinding);
}
}
} |
<<<<<<<
private saveAccessToken(response: AuthResponse, authority: string, parameters: any, clientInfo: ClientInfo, idTokenObj: IdToken): AuthResponse {
=======
private saveAccessToken(response: AuthResponse, authority: string, parameters: any, clientInfo: string, idTokenObj: IdToken): AuthResponse {
this.logger.verbose("SaveAccessToken has been called");
>>>>>>>
private saveAccessToken(response: AuthResponse, authority: string, parameters: any, clientInfo: ClientInfo, idTokenObj: IdToken): AuthResponse {
this.logger.verbose("SaveAccessToken has been called");
<<<<<<<
clientInfo = new ClientInfo(hashParams[ServerHashParamKeys.CLIENT_INFO], authority);
=======
this.logger.verbose("Fragment has clientInfo");
clientInfo = hashParams[ServerHashParamKeys.CLIENT_INFO];
>>>>>>>
this.logger.verbose("Fragment has clientInfo");
clientInfo = new ClientInfo(hashParams[ServerHashParamKeys.CLIENT_INFO], authority);
<<<<<<<
response.account = Account.createAccount(idTokenObj, clientInfo);
=======
response.account = Account.createAccount(idTokenObj, new ClientInfo(clientInfo));
this.logger.verbose("Account object created from response");
>>>>>>>
response.account = Account.createAccount(idTokenObj, clientInfo);
this.logger.verbose("Account object created from response");
<<<<<<<
clientInfo = new ClientInfo(hashParams[ServerHashParamKeys.CLIENT_INFO], authority);
=======
this.logger.verbose("Fragment has clientInfo");
clientInfo = hashParams[ServerHashParamKeys.CLIENT_INFO];
>>>>>>>
this.logger.verbose("Fragment has clientInfo");
clientInfo = new ClientInfo(hashParams[ServerHashParamKeys.CLIENT_INFO], authority);
<<<<<<<
this.cacheStorage.setItem(PersistentCacheKeys.IDTOKEN, hashParams[ServerHashParamKeys.ID_TOKEN]);
this.cacheStorage.setItem(PersistentCacheKeys.CLIENT_INFO, clientInfo.encodeClientInfo());
=======
this.logger.verbose("Nonce matches, saving idToken to cache");
this.cacheStorage.setItem(PersistentCacheKeys.IDTOKEN, hashParams[ServerHashParamKeys.ID_TOKEN], this.inCookie);
this.cacheStorage.setItem(PersistentCacheKeys.CLIENT_INFO, clientInfo, this.inCookie);
>>>>>>>
this.logger.verbose("Nonce matches, saving idToken to cache");
this.cacheStorage.setItem(PersistentCacheKeys.IDTOKEN, hashParams[ServerHashParamKeys.ID_TOKEN]);
this.cacheStorage.setItem(PersistentCacheKeys.CLIENT_INFO, clientInfo.encodeClientInfo()); |
<<<<<<<
ICustomAttributeController,
=======
IHydratedController,
IHydratedParentController,
>>>>>>>
ICustomAttributeController,
IHydratedController,
IHydratedParentController, |
<<<<<<<
import { ChildrenObserver } from './children';
import { RegisteredProjections } from '../resources/custom-elements/au-slot';
type BindingContext<T extends INode, C extends IViewModel<T>> = IIndexable<C & {
create(
controller: IController,
definition: CustomElementDefinition,
parentContainer: IContainer,
flags: LifecycleFlags,
): PartialCustomElementDefinition | void;
beforeCompile(
controller: IController,
definition: CustomElementDefinition,
container: IContainer,
flags: LifecycleFlags,
): void;
afterCompile(
controller: IController,
compiledDefinition: CustomElementDefinition,
projector: IElementProjector,
nodes: INodeSequence | null,
flags: LifecycleFlags,
): void;
afterCompileChildren(
children: readonly IController[] | undefined,
flags: LifecycleFlags,
): void;
beforeBind(flags: LifecycleFlags): MaybePromiseOrTask;
afterBind(flags: LifecycleFlags): void;
beforeUnbind(flags: LifecycleFlags): MaybePromiseOrTask;
afterUnbind(flags: LifecycleFlags): void;
beforeAttach(flags: LifecycleFlags): void;
afterAttach(flags: LifecycleFlags): void;
=======
import {
ChildrenObserver,
} from './children';
import { IStartTaskManager } from '../lifecycle-task';
>>>>>>>
import { ChildrenObserver } from './children';
import { RegisteredProjections } from '../resources/custom-elements/au-slot';
import { IStartTaskManager } from '../lifecycle-task';
<<<<<<<
public scope: IScope | undefined = void 0;
public hostScope: IScope | null = null;
=======
public scope: Writable<IScope> | undefined = void 0;
public part: string | undefined = void 0;
>>>>>>>
public scope: IScope | undefined = void 0;
public hostScope: IScope | null = null;
<<<<<<<
controller.hydrateCustomElement(definition, parentContainer, targetedProjections);
=======
if (hydrate) {
controller.hydrateCustomElement(parentContainer, parts);
}
>>>>>>>
if (hydrate) {
controller.hydrateCustomElement(parentContainer, targetedProjections);
}
<<<<<<<
const context = this.context = getRenderContext<T>(definition, parentContainer, targetedProjections?.projections);
=======
const context = this.context = getRenderContext<T>(definition, parentContainer, parts) as RenderContext<T>;
>>>>>>>
const context = this.context = getRenderContext<T>(definition, parentContainer, targetedProjections?.projections) as RenderContext<T>;
<<<<<<<
this.context = context;
const compiledContext = context.compile(null);
=======
this.context = context as RenderContext<T>;
const compiledContext = context.compile();
>>>>>>>
this.context = context as RenderContext<T>;
const compiledContext = context.compile(null);
<<<<<<<
return this.unmountSynthetic(flags);
}
public bind(flags: LifecycleFlags, scope?: IScope, hostScope?: IScope | null): ILifecycleTask {
this.hostScope = hostScope ?? null;
// TODO: benchmark which of these techniques is fastest:
// - the current one (enum with switch)
// - set the name of the method in the constructor, e.g. this.bindMethod = 'bindCustomElement'
// and then doing this[this.bindMethod](flags, scope) instead of switch (eliminates branching
// but computed property access might be harmful to browser optimizations)
// - make bind() a property and set it to one of the 3 methods in the constructor,
// e.g. this.bind = this.bindCustomElement (eliminates branching + reduces call stack depth by 1,
// but might make the call site megamorphic)
=======
this.parent = parent;
if (this.debug && !this.fullyNamed) {
this.fullyNamed = true;
this.logger = this.context!.get(ILogger).root.scopeTo(this.name);
this.logger!.trace(`activate()`);
}
this.part = part;
>>>>>>>
this.parent = parent;
if (this.debug && !this.fullyNamed) {
this.fullyNamed = true;
this.logger = this.context!.get(ILogger).root.scopeTo(this.name);
this.logger!.trace(`activate()`);
}
this.hostScope = hostScope ?? null; |
<<<<<<<
controllers[i].parent = this;
task = controllers[i].bind(flags, scope);
=======
task = controllers[i].bind(flags, scope, this.part);
>>>>>>>
controllers[i].parent = this;
task = controllers[i].bind(flags, scope, this.part); |
<<<<<<<
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void { }
=======
public connect(flags: BindingFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
>>>>>>>
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
<<<<<<<
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void { }
=======
public connect(flags: BindingFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
>>>>>>>
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
<<<<<<<
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void { }
=======
public connect(flags: BindingFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
>>>>>>>
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
<<<<<<<
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void { }
=======
public connect(flags: BindingFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
>>>>>>>
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
<<<<<<<
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void { }
=======
public connect(flags: BindingFlags, scope: IScope, binding: IConnectableBinding): void {
return;
}
>>>>>>>
public connect(flags: LifecycleFlags, scope: IScope, binding: IConnectableBinding): void {
return;
} |
<<<<<<<
const template = definition.enhance === true
? definition.template as HTMLElement
: factory.createTemplate(definition.template) as HTMLTemplateElement;
=======
const template = factory.createTemplate(definition.template) as HTMLTemplateElement;
processLocalTemplates(template, definition, context, dom, this.logger);
>>>>>>>
const template = definition.enhance === true
? definition.template as HTMLElement
: factory.createTemplate(definition.template) as HTMLTemplateElement;
processLocalTemplates(template, definition, context, dom, this.logger); |
<<<<<<<
this._sRest!.push(subscriber); // Non-null is implied by else branch of (subscriberFlags & SF.SubscribersRest) === 0
=======
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this._sr!.push(subscriber); // Non-null is implied by else branch of (subscriberFlags & SF.SubscribersRest) === 0
>>>>>>>
this._sr!.push(subscriber); // Non-null is implied by else branch of (subscriberFlags & SF.SubscribersRest) === 0
<<<<<<<
const subscribers = this._sRest!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
for (let i = 0, ii = subscribers.length; i < ii; ++i) {
=======
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const subscribers = this._sr!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
const ii = subscribers.length;
let i = 0;
for (; i < ii; ++i) {
>>>>>>>
const subscribers = this._sr!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
const ii = subscribers.length;
let i = 0;
for (; i < ii; ++i) {
<<<<<<<
const subscribers = this._sRest!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
=======
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const subscribers = this._sr!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
const ii = subscribers.length;
>>>>>>>
const subscribers = this._sr!; // Non-null is implied by (subscriberFlags & SF.SubscribersRest) > 0
const ii = subscribers.length; |
<<<<<<<
import { defineHiddenProp, ensureProto, isArray, isMap, isSet } from '../utilities-objects';
=======
>>>>>>>
import { defineHiddenProp, ensureProto } from '../utilities-objects';
<<<<<<<
=======
private forCollection(collection: Collection): ICollectionObserver<CollectionKind> {
const obsLocator = this.observerLocator;
let observer: ICollectionObserver<CollectionKind>;
if (collection instanceof Array) {
observer = obsLocator.getArrayObserver(LifecycleFlags.none, collection);
} else if (collection instanceof Set) {
observer = obsLocator.getSetObserver(LifecycleFlags.none, collection);
} else if (collection instanceof Map) {
observer = obsLocator.getMapObserver(LifecycleFlags.none, collection);
} else {
throw new Error('Unrecognised collection type.');
}
return observer;
}
private unobserveCollection(all: boolean): void {
const version = this.version;
const observers = this.observers;
observers.forEach((v, o) => {
if (all || v !== version) {
o.unsubscribeFromCollection(this);
observers.delete(o);
}
});
}
>>>>>>> |
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
<<<<<<<
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
}
=======
public static register: IRegistry['register'];
constructor(private parser: IExpressionParser) {}
>>>>>>>
public static register: IRegistry['register'];
private parser: IExpressionParser;
constructor(parser: IExpressionParser) {
this.parser = parser;
} |
<<<<<<<
for (const instructionTest of instructions) {
const { instruction, viewportInstruction } = instructionTest;
=======
it(`parses viewport instruction: ${instruction}`, async function () {
const { host, router, tearDown } = await createFixture();
>>>>>>>
for (const instructionTest of instructions) {
const { instruction, viewportInstruction } = instructionTest;
<<<<<<<
for (const instructionTest of instructions) {
const { instruction, viewportInstruction } = instructionTest;
const prefixedInstruction = `/${instruction}`;
=======
it(`parses viewport instruction: ${prefixedInstruction}`, async function () {
const { host, router, tearDown } = await createFixture();
>>>>>>>
for (const instructionTest of instructions) {
const { instruction, viewportInstruction } = instructionTest;
const prefixedInstruction = `/${instruction}`;
it(`parses viewport instruction: ${prefixedInstruction}`, async function () {
const { host, router, tearDown } = await createFixture();
viewportInstruction.context = '/';
const parsed = router.instructionResolver.parseViewportInstruction(prefixedInstruction);
assert.deepStrictEqual(parsed, viewportInstruction, `parsed`);
const newInstruction = router.instructionResolver.stringifyViewportInstruction(parsed);
assert.strictEqual(`${newInstruction}`, prefixedInstruction, `newInstruction`);
await tearDown();
});
}
for (const instructionTest of instructions) {
const { instruction, viewportInstruction } = instructionTest;
const prefixedInstruction = `../../${instruction}`;
<<<<<<<
const parametersStrings: any[] = [
{ params: 'a=1,b=2,3,4,e=5', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '1', b: '2', c: '3', d: '4', e: '5', } },
{ params: 'a=1,b=2,3,4,e=5', spec: ['e', 'd', 'c', 'b', 'a'], result: { a: '1', b: '2', c: '4', d: '3', e: '5', } },
{ params: 'e=5,4,3,b=2,a=1', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '1', b: '2', c: '4', d: '3', e: '5', } },
{ params: 'a=1,b=2,3,4,e=5', spec: [], result: { a: '1', b: '2', 0: '3', 1: '4', e: '5', } },
{ params: 'a=1,b=2,4,3,e=5', spec: [], result: { a: '1', b: '2', 0: '4', 1: '3', e: '5', } },
{ params: 'b=2,3', spec: ['a', 'b', 'c',], result: { a: '3', b: '2', } },
{ params: 'f=6,b=2,3', spec: ['a', 'b', 'c',], result: { a: '3', b: '2', f: '6' } },
{ params: 'c=3,b=2,5,1,4', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '5', b: '2', c: '3', d: '1', e: '4', } },
];
function isEqual(one, other) {
return Object.keys(one).every(key => one[key] === other[key])
&& Object.keys(other).every(key => other[key] === one[key]);
}
for (const parameters of parametersStrings) {
it(`parses and stringifies component parameters: ${parameters.params} => ${parameters.result}`, async function () {
const { router, tearDown } = await setup();
const parsed = router.instructionResolver.parseComponentParameters(parameters.params);
// console.log('parsed', parsed);
const stringified = router.instructionResolver.stringifyComponentParameters(parsed);
assert.deepStrictEqual(stringified, parameters.params, `stringified`);
await tearDown();
});
}
for (const parameters of parametersStrings) {
it(`parses and specifies component parameters: ${parameters.params} => ${JSON.stringify(parameters.result)}`, async function () {
const { router, tearDown } = await setup();
const instruction = router.createViewportInstruction('', '', parameters.params);
const specified = instruction.toSpecifiedParameters(parameters.spec);
assert.deepStrictEqual(specified, parameters.result, `specified`);
await tearDown();
});
}
for (const outer of parametersStrings) {
for (const inner of parametersStrings) {
it(`compares component parameters: ${outer.params} == ${inner.params} [${outer.spec.join(',')}]`, async function () {
const { router, tearDown } = await setup();
const Test = CustomElement.define({ name: 'test', template: '' }, class {
public static parameters = outer.spec;
});
const outerInstruction = router.createViewportInstruction(Test, '', outer.params);
const innerInstruction = router.createViewportInstruction(Test, '', inner.params);
const outerResult = outerInstruction.toSpecifiedParameters(outer.spec);
const innerResult = innerInstruction.toSpecifiedParameters(outer.spec);
// console.log(outer.params, inner.params, outerResult, innerResult, isEqual(outerResult, innerResult));
assert.strictEqual(outerInstruction.sameParameters(innerInstruction), isEqual(outerResult, innerResult), `outer.sameParameters`);
assert.strictEqual(innerInstruction.sameParameters(outerInstruction), isEqual(outerResult, innerResult), `inner.sameParameters`);
await tearDown();
});
}
}
});
async function setup() {
const ctx = TestContext.createHTMLTestContext();
const { container } = ctx;
const App = CustomElement.define({ name: 'app', template: '<template><au-viewport name="left"></au-viewport><au-viewport name="right"></au-viewport></template>' });
const host = ctx.createElement('div');
ctx.doc.body.appendChild(host);
const au = ctx.wnd['au'] = new Aurelia(container)
.register(DebugConfiguration, RouterConfiguration)
.app({ host: host, component: App });
const router = container.get(IRouter);
const mockBrowserHistoryLocation = new MockBrowserHistoryLocation();
mockBrowserHistoryLocation.changeCallback = router.navigation.handlePopstate as any;
router.navigation.history = mockBrowserHistoryLocation as any;
router.navigation.location = mockBrowserHistoryLocation as any;
await au.start().wait();
return { au, container, host, router };
}
=======
});
>>>>>>>
const parametersStrings: any[] = [
{ params: 'a=1,b=2,3,4,e=5', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '1', b: '2', c: '3', d: '4', e: '5', } },
{ params: 'a=1,b=2,3,4,e=5', spec: ['e', 'd', 'c', 'b', 'a'], result: { a: '1', b: '2', c: '4', d: '3', e: '5', } },
{ params: 'e=5,4,3,b=2,a=1', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '1', b: '2', c: '4', d: '3', e: '5', } },
{ params: 'a=1,b=2,3,4,e=5', spec: [], result: { a: '1', b: '2', 0: '3', 1: '4', e: '5', } },
{ params: 'a=1,b=2,4,3,e=5', spec: [], result: { a: '1', b: '2', 0: '4', 1: '3', e: '5', } },
{ params: 'b=2,3', spec: ['a', 'b', 'c',], result: { a: '3', b: '2', } },
{ params: 'f=6,b=2,3', spec: ['a', 'b', 'c',], result: { a: '3', b: '2', f: '6' } },
{ params: 'c=3,b=2,5,1,4', spec: ['a', 'b', 'c', 'd', 'e'], result: { a: '5', b: '2', c: '3', d: '1', e: '4', } },
];
function isEqual(one, other) {
return Object.keys(one).every(key => one[key] === other[key])
&& Object.keys(other).every(key => other[key] === one[key]);
}
for (const parameters of parametersStrings) {
it(`parses and stringifies component parameters: ${parameters.params} => ${parameters.result}`, async function () {
const { router, tearDown } = await setup();
const parsed = router.instructionResolver.parseComponentParameters(parameters.params);
// console.log('parsed', parsed);
const stringified = router.instructionResolver.stringifyComponentParameters(parsed);
assert.deepStrictEqual(stringified, parameters.params, `stringified`);
await tearDown();
});
}
for (const parameters of parametersStrings) {
it(`parses and specifies component parameters: ${parameters.params} => ${JSON.stringify(parameters.result)}`, async function () {
const { router, tearDown } = await setup();
const instruction = router.createViewportInstruction('', '', parameters.params);
const specified = instruction.toSpecifiedParameters(parameters.spec);
assert.deepStrictEqual(specified, parameters.result, `specified`);
await tearDown();
});
}
for (const outer of parametersStrings) {
for (const inner of parametersStrings) {
it(`compares component parameters: ${outer.params} == ${inner.params} [${outer.spec.join(',')}]`, async function () {
const { router, tearDown } = await setup();
const Test = CustomElement.define({ name: 'test', template: '' }, class {
public static parameters = outer.spec;
});
const outerInstruction = router.createViewportInstruction(Test, '', outer.params);
const innerInstruction = router.createViewportInstruction(Test, '', inner.params);
const outerResult = outerInstruction.toSpecifiedParameters(outer.spec);
const innerResult = innerInstruction.toSpecifiedParameters(outer.spec);
// console.log(outer.params, inner.params, outerResult, innerResult, isEqual(outerResult, innerResult));
assert.strictEqual(outerInstruction.sameParameters(innerInstruction), isEqual(outerResult, innerResult), `outer.sameParameters`);
assert.strictEqual(innerInstruction.sameParameters(outerInstruction), isEqual(outerResult, innerResult), `inner.sameParameters`);
await tearDown();
});
}
}
}); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.