From e47d1b122916d434a5ab19c45220d2bb40b6abe6 Mon Sep 17 00:00:00 2001 From: "bigopon.777@gmail.com" Date: Sat, 23 Nov 2019 11:07:33 +1100 Subject: [PATCH 01/27] chore(build): use default import for html --- packages/button/src/html.d.ts | 2 +- packages/button/src/ux-button.ts | 2 +- packages/card/src/html.d.ts | 2 +- packages/card/src/ux-card-action-row.ts | 2 +- packages/card/src/ux-card-content.ts | 2 +- packages/card/src/ux-card-footer.ts | 2 +- packages/card/src/ux-card-header.ts | 2 +- packages/card/src/ux-card.ts | 2 +- packages/checkbox/src/html.d.ts | 2 +- packages/checkbox/src/ux-checkbox.ts | 2 +- packages/chip-input/src/html.d.ts | 2 +- packages/chip-input/src/ux-chip-input.ts | 2 +- packages/chip-input/src/ux-chip.ts | 2 +- packages/datepicker/src/html.d.ts | 2 +- packages/datepicker/src/resources/moment.ts | 2 +- packages/datepicker/src/ux-calendar.ts | 2 +- packages/datepicker/src/ux-datepicker.ts | 2 +- packages/datepicker/src/ux-picker-dialog.ts | 2 +- packages/datepicker/src/ux-year-list.ts | 2 +- packages/datepicker/tsconfig.json | 1 + packages/form/src/html.d.ts | 2 +- packages/form/src/ux-field.ts | 2 +- packages/form/src/ux-form.ts | 2 +- packages/grid/src/html.d.ts | 2 +- packages/grid/src/ux-grid-cell.ts | 2 +- packages/grid/src/ux-grid.ts | 2 +- packages/icons/src/html.d.ts | 2 +- packages/icons/src/ux-icon.ts | 2 +- packages/input-info/src/html.d.ts | 2 +- packages/input-info/src/ux-input-info.ts | 2 +- packages/input/src/html.d.ts | 2 +- packages/input/src/ux-input.ts | 2 +- packages/list/src/html.d.ts | 2 +- packages/list/src/ux-list-item.ts | 2 +- packages/list/src/ux-list.ts | 2 +- packages/radio/src/html.d.ts | 2 +- packages/radio/src/ux-radio.ts | 2 +- packages/select/src/html.d.ts | 2 +- packages/select/src/ux-optgroup.ts | 2 +- packages/select/src/ux-option.ts | 2 +- packages/select/src/ux-select.ts | 2 +- packages/slider/src/html.d.ts | 2 +- packages/slider/src/ux-slider.ts | 2 +- packages/switch/src/html.d.ts | 2 +- packages/switch/src/ux-switch.ts | 2 +- packages/textarea/src/html.d.ts | 2 +- packages/textarea/src/ux-textarea.ts | 2 +- 47 files changed, 47 insertions(+), 46 deletions(-) diff --git a/packages/button/src/html.d.ts b/packages/button/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/button/src/html.d.ts +++ b/packages/button/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/button/src/ux-button.ts b/packages/button/src/ux-button.ts index 4cb42c28..0de5a2ec 100644 --- a/packages/button/src/ux-button.ts +++ b/packages/button/src/ux-button.ts @@ -2,7 +2,7 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent, PaperRipple, normalizeBooleanAttribute } from '@aurelia-ux/core'; import { UxButtonTheme } from './ux-button-theme'; -import * as VIEW from './ux-button.html'; +import VIEW from './ux-button.html'; @inject(Element, StyleEngine) @customElement('ux-button') diff --git a/packages/card/src/html.d.ts b/packages/card/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/card/src/html.d.ts +++ b/packages/card/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/card/src/ux-card-action-row.ts b/packages/card/src/ux-card-action-row.ts index 212dbc5e..e3e01520 100644 --- a/packages/card/src/ux-card-action-row.ts +++ b/packages/card/src/ux-card-action-row.ts @@ -1,5 +1,5 @@ import { customElement, inlineView } from 'aurelia-templating'; -import * as UX_CARD_ACTION_ROW from './ux-card-action-row.html'; +import UX_CARD_ACTION_ROW from './ux-card-action-row.html'; @customElement('ux-card-action-row') @inlineView(UX_CARD_ACTION_ROW) diff --git a/packages/card/src/ux-card-content.ts b/packages/card/src/ux-card-content.ts index 82c88bc1..9446e13a 100644 --- a/packages/card/src/ux-card-content.ts +++ b/packages/card/src/ux-card-content.ts @@ -1,5 +1,5 @@ import { customElement, inlineView } from 'aurelia-templating'; -import * as UX_CARD_CONTENT_VIEW from './ux-card-content.html'; +import UX_CARD_CONTENT_VIEW from './ux-card-content.html'; @customElement('ux-card-content') @inlineView(UX_CARD_CONTENT_VIEW) diff --git a/packages/card/src/ux-card-footer.ts b/packages/card/src/ux-card-footer.ts index 6c554f29..3cf6edb2 100644 --- a/packages/card/src/ux-card-footer.ts +++ b/packages/card/src/ux-card-footer.ts @@ -1,5 +1,5 @@ import { customElement, inlineView } from 'aurelia-templating'; -import * as UX_CARD_FOOTER from './ux-card-footer.html'; +import UX_CARD_FOOTER from './ux-card-footer.html'; @customElement('ux-card-footer') @inlineView(UX_CARD_FOOTER) diff --git a/packages/card/src/ux-card-header.ts b/packages/card/src/ux-card-header.ts index 0da464c9..989b17b3 100644 --- a/packages/card/src/ux-card-header.ts +++ b/packages/card/src/ux-card-header.ts @@ -1,6 +1,6 @@ import { inject } from 'aurelia-dependency-injection'; import { bindable, customElement, inlineView } from 'aurelia-templating'; -import * as UX_CARD_HEADER_VIEW from './ux-card-header.html'; +import UX_CARD_HEADER_VIEW from './ux-card-header.html'; @inject(Element) @customElement('ux-card-header') diff --git a/packages/card/src/ux-card.ts b/packages/card/src/ux-card.ts index 6ba62694..e09d13f9 100644 --- a/packages/card/src/ux-card.ts +++ b/packages/card/src/ux-card.ts @@ -2,7 +2,7 @@ import { inject } from 'aurelia-dependency-injection'; import { bindable, customElement, inlineView } from 'aurelia-templating'; import { UxComponent, StyleEngine } from '@aurelia-ux/core'; import { UxCardTheme } from './ux-card-theme'; -import * as UX_CARD_VIEW from './ux-card.html'; +import UX_CARD_VIEW from './ux-card.html'; @inject(Element, StyleEngine) @customElement('ux-card') diff --git a/packages/checkbox/src/html.d.ts b/packages/checkbox/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/checkbox/src/html.d.ts +++ b/packages/checkbox/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/checkbox/src/ux-checkbox.ts b/packages/checkbox/src/ux-checkbox.ts index 01db472f..dd859df1 100644 --- a/packages/checkbox/src/ux-checkbox.ts +++ b/packages/checkbox/src/ux-checkbox.ts @@ -11,7 +11,7 @@ import { import { UxCheckboxTheme } from './ux-checkbox-theme'; import { DOM } from 'aurelia-pal'; -import * as UX_CHECKBOX_VIEW from './ux-checkbox.html'; +import UX_CHECKBOX_VIEW from './ux-checkbox.html'; export interface UxCheckboxElement extends HTMLElement { type: 'checkbox'; diff --git a/packages/chip-input/src/html.d.ts b/packages/chip-input/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/chip-input/src/html.d.ts +++ b/packages/chip-input/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/chip-input/src/ux-chip-input.ts b/packages/chip-input/src/ux-chip-input.ts index 9ee28378..8d8b4941 100644 --- a/packages/chip-input/src/ux-chip-input.ts +++ b/packages/chip-input/src/ux-chip-input.ts @@ -4,7 +4,7 @@ import { bindingMode } from 'aurelia-binding'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent, normalizeBooleanAttribute } from '@aurelia-ux/core'; import { UxChipInputTheme } from './ux-chip-input-theme'; -import * as UX_CHIP_INPUT_VIEW from './ux-chip-input.html'; +import UX_CHIP_INPUT_VIEW from './ux-chip-input.html'; @inject(Element, StyleEngine) @customElement('ux-chip-input') diff --git a/packages/chip-input/src/ux-chip.ts b/packages/chip-input/src/ux-chip.ts index ce8ea1bf..71022113 100644 --- a/packages/chip-input/src/ux-chip.ts +++ b/packages/chip-input/src/ux-chip.ts @@ -4,7 +4,7 @@ import { bindingMode } from 'aurelia-binding'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxChipTheme } from './ux-chip-theme'; -import * as UX_CHIP_VIEW from './ux-chip.html'; +import UX_CHIP_VIEW from './ux-chip.html'; @inject(Element, StyleEngine) @customElement('ux-chip') diff --git a/packages/datepicker/src/html.d.ts b/packages/datepicker/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/datepicker/src/html.d.ts +++ b/packages/datepicker/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/datepicker/src/resources/moment.ts b/packages/datepicker/src/resources/moment.ts index b6cf4dc4..dc675850 100644 --- a/packages/datepicker/src/resources/moment.ts +++ b/packages/datepicker/src/resources/moment.ts @@ -1,4 +1,4 @@ -import * as moment from 'moment'; +import moment from 'moment'; const _moment = moment; export { _moment as moment }; diff --git a/packages/datepicker/src/ux-calendar.ts b/packages/datepicker/src/ux-calendar.ts index 4fee72a2..86fcb0cf 100644 --- a/packages/datepicker/src/ux-calendar.ts +++ b/packages/datepicker/src/ux-calendar.ts @@ -4,7 +4,7 @@ import { inject } from 'aurelia-dependency-injection'; import { DatetimeUtility } from './resources/datetime-utility'; import { DatepickerSettings } from './resources/datepicker-settings'; import { moment, Moment } from './resources/moment'; -import * as UX_CALENDAR_VIEW from './ux-calendar.html'; +import UX_CALENDAR_VIEW from './ux-calendar.html'; @inject(ViewResources) @customElement('ux-calendar') diff --git a/packages/datepicker/src/ux-datepicker.ts b/packages/datepicker/src/ux-datepicker.ts index 57d2bdd8..15aaa2a3 100644 --- a/packages/datepicker/src/ux-datepicker.ts +++ b/packages/datepicker/src/ux-datepicker.ts @@ -6,7 +6,7 @@ import { DatetimeUtility } from './resources/datetime-utility'; import { DatepickerSettings } from './resources/datepicker-settings'; import { UxDatepickerTheme } from './ux-datepicker-theme'; import { moment } from './resources/moment'; -import * as UX_DATEPICKER_VIEW from './ux-datepicker.html'; +import UX_DATEPICKER_VIEW from './ux-datepicker.html'; @inject(Element, ViewResources, StyleEngine) @customElement('ux-datepicker') diff --git a/packages/datepicker/src/ux-picker-dialog.ts b/packages/datepicker/src/ux-picker-dialog.ts index ef8c5e27..3b940ef1 100644 --- a/packages/datepicker/src/ux-picker-dialog.ts +++ b/packages/datepicker/src/ux-picker-dialog.ts @@ -2,7 +2,7 @@ import { customElement, bindable, ViewResources, inlineView } from 'aurelia-temp import { inject } from 'aurelia-dependency-injection'; import { DatepickerSettings } from './resources/datepicker-settings'; import { moment, Moment } from './resources/moment'; -import * as UX_PICKER_DIALOG_VIEW from './ux-picker-dialog.html'; +import UX_PICKER_DIALOG_VIEW from './ux-picker-dialog.html'; @inject(ViewResources) @customElement('ux-picker-dialog') diff --git a/packages/datepicker/src/ux-year-list.ts b/packages/datepicker/src/ux-year-list.ts index 01bd6b23..ce551c33 100644 --- a/packages/datepicker/src/ux-year-list.ts +++ b/packages/datepicker/src/ux-year-list.ts @@ -2,7 +2,7 @@ import { customElement, bindable, ViewResources, inlineView } from 'aurelia-temp import { inject } from 'aurelia-dependency-injection'; import { computedFrom } from 'aurelia-binding'; import { Moment } from './resources/moment'; -import * as UX_YEAR_LIST_VIEW from './ux-year-list.html'; +import UX_YEAR_LIST_VIEW from './ux-year-list.html'; @inject(Element, ViewResources) @customElement('ux-year-list') diff --git a/packages/datepicker/tsconfig.json b/packages/datepicker/tsconfig.json index 00aa5b37..4913c9e8 100644 --- a/packages/datepicker/tsconfig.json +++ b/packages/datepicker/tsconfig.json @@ -7,6 +7,7 @@ "es2017", "dom" ], + "allowSyntheticDefaultImports": true, "noImplicitAny": true, "noUnusedLocals": true, "noUnusedParameters": true, diff --git a/packages/form/src/html.d.ts b/packages/form/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/form/src/html.d.ts +++ b/packages/form/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/form/src/ux-field.ts b/packages/form/src/ux-field.ts index e7ad1a5d..94b5ec64 100644 --- a/packages/form/src/ux-field.ts +++ b/packages/form/src/ux-field.ts @@ -1,6 +1,6 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; -import * as UX_FIELD_VIEW from './ux-field.html'; +import UX_FIELD_VIEW from './ux-field.html'; @inject(Element) @customElement('ux-field') diff --git a/packages/form/src/ux-form.ts b/packages/form/src/ux-form.ts index b5f23dc4..062a5b8b 100644 --- a/packages/form/src/ux-form.ts +++ b/packages/form/src/ux-form.ts @@ -3,7 +3,7 @@ import { DOM } from 'aurelia-pal'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxFormTheme } from './ux-form-theme'; -import * as UX_FORM_VIEW from './ux-form.html'; +import UX_FORM_VIEW from './ux-form.html'; @inject(Element, StyleEngine) @customElement('ux-form') diff --git a/packages/grid/src/html.d.ts b/packages/grid/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/grid/src/html.d.ts +++ b/packages/grid/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/grid/src/ux-grid-cell.ts b/packages/grid/src/ux-grid-cell.ts index cea26455..feb877e2 100644 --- a/packages/grid/src/ux-grid-cell.ts +++ b/packages/grid/src/ux-grid-cell.ts @@ -1,6 +1,6 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; -import * as VIEW from './ux-grid-cell.html'; +import VIEW from './ux-grid-cell.html'; @inject(Element) @customElement('ux-grid-cell') diff --git a/packages/grid/src/ux-grid.ts b/packages/grid/src/ux-grid.ts index 2ba64f48..4e959438 100644 --- a/packages/grid/src/ux-grid.ts +++ b/packages/grid/src/ux-grid.ts @@ -2,7 +2,7 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxGridTheme } from './ux-grid-theme'; -import * as VIEW from './ux-grid.html'; +import VIEW from './ux-grid.html'; @inject(Element, StyleEngine) @customElement('ux-grid') diff --git a/packages/icons/src/html.d.ts b/packages/icons/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/icons/src/html.d.ts +++ b/packages/icons/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/icons/src/ux-icon.ts b/packages/icons/src/ux-icon.ts index fba43dbb..c748fbff 100644 --- a/packages/icons/src/ux-icon.ts +++ b/packages/icons/src/ux-icon.ts @@ -5,7 +5,7 @@ import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent, processDesignAttributes } from '@aurelia-ux/core'; import { UxIconTheme } from './ux-icon-theme'; import IconMap from './ux-icon-map'; -import * as VIEW from './ux-icon.html'; +import VIEW from './ux-icon.html'; @inject(Element, StyleEngine, Logger) @customElement('ux-icon') diff --git a/packages/input-info/src/html.d.ts b/packages/input-info/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/input-info/src/html.d.ts +++ b/packages/input-info/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/input-info/src/ux-input-info.ts b/packages/input-info/src/ux-input-info.ts index 2af0dcfd..28bf8389 100644 --- a/packages/input-info/src/ux-input-info.ts +++ b/packages/input-info/src/ux-input-info.ts @@ -2,7 +2,7 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; import { UxInputInfoTheme } from './ux-input-info-theme'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; -import * as VIEW from './ux-input-info.html'; +import VIEW from './ux-input-info.html'; @inject(Element, StyleEngine) @customElement('ux-input-info') diff --git a/packages/input/src/html.d.ts b/packages/input/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/input/src/html.d.ts +++ b/packages/input/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/input/src/ux-input.ts b/packages/input/src/ux-input.ts index 6d586cf2..f11c6ba4 100644 --- a/packages/input/src/ux-input.ts +++ b/packages/input/src/ux-input.ts @@ -4,7 +4,7 @@ import { observable } from 'aurelia-binding'; import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxInputTheme } from './ux-input-theme'; -import * as VIEW from './ux-input.html'; +import VIEW from './ux-input.html'; export interface UxInputElement extends HTMLElement { value: any; diff --git a/packages/list/src/html.d.ts b/packages/list/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/list/src/html.d.ts +++ b/packages/list/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/list/src/ux-list-item.ts b/packages/list/src/ux-list-item.ts index 0241e5f9..e8467522 100644 --- a/packages/list/src/ux-list-item.ts +++ b/packages/list/src/ux-list-item.ts @@ -1,5 +1,5 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; -import * as VIEW from './ux-list-item.html'; +import VIEW from './ux-list-item.html'; @customElement('ux-list-item') @inlineView(VIEW) diff --git a/packages/list/src/ux-list.ts b/packages/list/src/ux-list.ts index 10abb241..47953481 100644 --- a/packages/list/src/ux-list.ts +++ b/packages/list/src/ux-list.ts @@ -2,7 +2,7 @@ import { customElement, bindable, inlineView } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; import { UxComponent, StyleEngine } from '@aurelia-ux/core'; import { UxListTheme } from './ux-list-theme'; -import * as VIEW from './ux-list.html'; +import VIEW from './ux-list.html'; @inject(Element, StyleEngine) @customElement('ux-list') diff --git a/packages/radio/src/html.d.ts b/packages/radio/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/radio/src/html.d.ts +++ b/packages/radio/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/radio/src/ux-radio.ts b/packages/radio/src/ux-radio.ts index 13a1f3ac..663ee4cb 100644 --- a/packages/radio/src/ux-radio.ts +++ b/packages/radio/src/ux-radio.ts @@ -9,7 +9,7 @@ import { } from '@aurelia-ux/core'; import { UxRadioTheme } from './ux-radio-theme'; import { ElementEvents, DOM } from 'aurelia-framework'; -import * as VIEW from './ux-radio.html'; +import VIEW from './ux-radio.html'; export interface UxRadioElement extends HTMLElement { type: 'radio'; diff --git a/packages/select/src/html.d.ts b/packages/select/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/select/src/html.d.ts +++ b/packages/select/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/select/src/ux-optgroup.ts b/packages/select/src/ux-optgroup.ts index 27d45d62..caf67ae0 100644 --- a/packages/select/src/ux-optgroup.ts +++ b/packages/select/src/ux-optgroup.ts @@ -13,7 +13,7 @@ import { import { UxOptionElement } from './ux-option'; import { getAuViewModel } from './util'; -import * as UX_OPTGROUP_VIEW from './ux-optgroup.html'; +import UX_OPTGROUP_VIEW from './ux-optgroup.html'; declare module './ux-option' { interface UxOption { diff --git a/packages/select/src/ux-option.ts b/packages/select/src/ux-option.ts index 0dd9f291..6f3ea2ee 100644 --- a/packages/select/src/ux-option.ts +++ b/packages/select/src/ux-option.ts @@ -18,7 +18,7 @@ import { } from '@aurelia-ux/core'; import { getAuViewModel } from './util'; -import * as UX_OPTION_VIEW from './ux-option.html'; +import UX_OPTION_VIEW from './ux-option.html'; export interface UxOptionElement extends HTMLElement { disabled: boolean; diff --git a/packages/select/src/ux-select.ts b/packages/select/src/ux-select.ts index 56c9f835..55edbc60 100644 --- a/packages/select/src/ux-select.ts +++ b/packages/select/src/ux-select.ts @@ -22,7 +22,7 @@ import { UxSelectTheme } from './ux-select-theme'; import { UxOptGroupElement } from './ux-optgroup'; import { UxOptionElement } from './ux-option'; import { getAuViewModel, bool } from './util'; -import * as UX_SELECT_VIEW from './ux-select.html'; +import UX_SELECT_VIEW from './ux-select.html'; declare module './ux-option' { interface UxOption { diff --git a/packages/slider/src/html.d.ts b/packages/slider/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/slider/src/html.d.ts +++ b/packages/slider/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/slider/src/ux-slider.ts b/packages/slider/src/ux-slider.ts index d1f1c4a8..b66fc6cc 100644 --- a/packages/slider/src/ux-slider.ts +++ b/packages/slider/src/ux-slider.ts @@ -3,7 +3,7 @@ import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxSliderTheme } from './ux-slider-theme'; import { computedFrom, bindingMode } from 'aurelia-binding'; -import * as VIEW from './ux-slider.html'; +import VIEW from './ux-slider.html'; export interface UxSliderElement extends HTMLElement { value: number; diff --git a/packages/switch/src/html.d.ts b/packages/switch/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/switch/src/html.d.ts +++ b/packages/switch/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/switch/src/ux-switch.ts b/packages/switch/src/ux-switch.ts index 393f60d9..bdebbe9d 100644 --- a/packages/switch/src/ux-switch.ts +++ b/packages/switch/src/ux-switch.ts @@ -4,7 +4,7 @@ import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent, PaperRipple, normalizeBooleanAttribute } from '@aurelia-ux/core'; import { UxSwitchTheme } from './ux-switch-theme'; import { DOM, ElementEvents } from 'aurelia-framework'; -import * as VIEW from './ux-switch.html'; +import VIEW from './ux-switch.html'; export interface UxSwitchElement extends HTMLElement { type: 'checkbox'; diff --git a/packages/textarea/src/html.d.ts b/packages/textarea/src/html.d.ts index 6bf04fa6..1198a9a6 100644 --- a/packages/textarea/src/html.d.ts +++ b/packages/textarea/src/html.d.ts @@ -1,4 +1,4 @@ declare module '*.html' { const value: string; - export = value; + export default value; } diff --git a/packages/textarea/src/ux-textarea.ts b/packages/textarea/src/ux-textarea.ts index b203626d..36120128 100644 --- a/packages/textarea/src/ux-textarea.ts +++ b/packages/textarea/src/ux-textarea.ts @@ -4,7 +4,7 @@ import { inject } from 'aurelia-dependency-injection'; import { StyleEngine, UxComponent } from '@aurelia-ux/core'; import { UxTextAreaTheme } from './ux-textarea-theme'; import { observable } from 'aurelia-framework'; -import * as VIEW from './ux-textarea.html'; +import VIEW from './ux-textarea.html'; export interface UxTextAreaElement extends HTMLElement { value: string; From dcc96bd422975dd524f40aa75901545c218b1396 Mon Sep 17 00:00:00 2001 From: "bigopon.777@gmail.com" Date: Sat, 23 Nov 2019 11:07:56 +1100 Subject: [PATCH 02/27] chore(example): use esmodule interop for webpack html loader --- app/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/tsconfig.json b/app/tsconfig.json index 42b1a2e7..037e8733 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -1,6 +1,9 @@ { "extends": "../tsconfig.json", "compilerOptions": { + "target": "esnext", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, "baseUrl": ".", "paths": { "aurelia-framework": [ From b2b01edc13e1134544318a4dcb22fce444f0f56e Mon Sep 17 00:00:00 2001 From: "bigopon.777@gmail.com" Date: Tue, 26 Nov 2019 00:40:24 +1100 Subject: [PATCH 03/27] chore(build): update all packages css bundling --- packages/boilerplate/package.json | 5 +- packages/button/package.json | 12 +- packages/button/src/ux-button.html | 3 - packages/button/src/ux-button.ts | 9 +- packages/card/package.json | 12 +- packages/card/src/ux-card.html | 2 - packages/card/src/ux-card.ts | 6 +- packages/checkbox/package.json | 12 +- packages/checkbox/src/ux-checkbox.html | 6 +- packages/checkbox/src/ux-checkbox.ts | 10 +- packages/chip-input/package.json | 12 +- packages/chip-input/src/ux-chip-input.html | 2 - packages/chip-input/src/ux-chip-input.ts | 7 +- packages/chip-input/src/ux-chip.html | 2 - packages/chip-input/src/ux-chip.ts | 7 +- packages/components/package.json | 12 +- packages/core/package.json | 16 ++- packages/core/src/ux-configuration.ts | 10 +- packages/datepicker/package.json | 13 +- packages/datepicker/src/index.ts | 2 + packages/datepicker/src/ux-calendar.html | 2 - packages/datepicker/src/ux-calendar.ts | 112 +++++++++--------- packages/datepicker/src/ux-datepicker.html | 2 - packages/datepicker/src/ux-datepicker.ts | 6 +- packages/datepicker/src/ux-picker-dialog.html | 2 - packages/datepicker/src/ux-picker-dialog.ts | 6 +- packages/datepicker/src/ux-year-list.html | 2 - packages/datepicker/src/ux-year-list.ts | 6 +- packages/form/package.json | 12 +- packages/form/src/ux-form.html | 2 - packages/form/src/ux-form.ts | 7 +- packages/grid/package.json | 12 +- packages/grid/src/ux-grid.html | 2 - packages/grid/src/ux-grid.ts | 6 +- packages/icons/package.json | 12 +- packages/icons/src/ux-icon.html | 1 - packages/icons/src/ux-icon.ts | 6 +- packages/input-info/package.json | 12 +- packages/input-info/src/ux-input-info.html | 1 - packages/input-info/src/ux-input-info.ts | 6 +- packages/input/package.json | 12 +- packages/input/src/ux-input.html | 1 - packages/input/src/ux-input.ts | 7 +- packages/list/package.json | 12 +- packages/list/src/ux-list.html | 2 - packages/list/src/ux-list.ts | 6 +- packages/radio/package.json | 12 +- packages/radio/src/ux-radio.html | 3 - packages/radio/src/ux-radio.ts | 10 +- packages/select/package.json | 12 +- packages/select/src/ux-optgroup.ts | 7 +- packages/select/src/ux-select.html | 3 - packages/select/src/ux-select.ts | 16 ++- packages/slider/package.json | 14 ++- packages/slider/src/ux-slider.html | 2 - packages/slider/src/ux-slider.ts | 6 +- packages/switch/package.json | 12 +- packages/switch/src/ux-switch.html | 4 - packages/switch/src/ux-switch.ts | 11 +- packages/textarea/package.json | 12 +- packages/textarea/src/ux-textarea.html | 2 - packages/textarea/src/ux-textarea.ts | 7 +- 62 files changed, 317 insertions(+), 233 deletions(-) diff --git a/packages/boilerplate/package.json b/packages/boilerplate/package.json index eff0a3b2..d480044f 100644 --- a/packages/boilerplate/package.json +++ b/packages/boilerplate/package.json @@ -91,8 +91,7 @@ "devDependencies": {} }, "dependencies": { - "@aurelia-ux/core": "^0.4.0", - "aurelia-framework": "^1.0.0" + "@aurelia-ux/core": "^0.17.0" }, "devDependencies": { "@types/jasmine": "^2.8.6", @@ -130,7 +129,7 @@ "tslint": "^4.4.2", "typedoc": "^0.9.0", "typescript": "^2.2.1", - "webpack": "^4.0.1" + "webpack": "^4.41.2" }, "aurelia": { "build": { diff --git a/packages/button/package.json b/packages/button/package.json index 5c1eb504..dc6d8863 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -82,7 +82,7 @@ }, "dependencies": { "@aurelia-ux/core": "^0.17.0", - "aurelia-framework": "^1.0.0" + "aurelia-binding": "^2.0.0" }, "devDependencies": { "@types/jasmine": "^2.8.6", @@ -90,11 +90,12 @@ "@types/node": "^7.0.11", "@types/webpack": "^4.39.8", "aurelia-bootstrapper": "^2.1.1", + "aurelia-framework": "^1.3.1", "aurelia-pal-browser": "^1.2.0", "aurelia-pal-nodejs": "^1.0.0-beta.1.0.0", "aurelia-polyfills": "^1.2.1", "aurelia-testing": "^1.0.0-beta.3.0.1", - "aurelia-webpack-plugin": "^3.0.0-rc.1", + "aurelia-webpack-plugin": "^4.0.0", "concurrently": "^3.4.0", "conventional-changelog-cli": "^2.0.27", "copyfiles": "^1.2.0", @@ -113,16 +114,17 @@ "path": "^0.12.7", "requirejs": "^2.3.3", "requirejs-text": "^2.0.15", - "rimraf": "^2.6.1", + "rimraf": "^3.0.0", "rollup": "^1.26.3", "rollup-plugin-typescript2": "^0.25.2", - "ts-loader": "^4.0.1", + "ts-loader": "^6.2.1", "ts-node": "^5.0.1", "tsconfig-paths": "^3.9.0", "tslint": "^5.20.1", "typedoc": "^0.9.0", "typescript": "^3.7.2", - "webpack": "^4.0.1" + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" }, "aurelia": { "build": { diff --git a/packages/button/src/ux-button.html b/packages/button/src/ux-button.html index 49187ff8..91ed4d06 100644 --- a/packages/button/src/ux-button.html +++ b/packages/button/src/ux-button.html @@ -1,7 +1,4 @@ diff --git a/packages/card/src/ux-card.ts b/packages/card/src/ux-card.ts index e09d13f9..3dbbec62 100644 --- a/packages/card/src/ux-card.ts +++ b/packages/card/src/ux-card.ts @@ -3,10 +3,14 @@ import { bindable, customElement, inlineView } from 'aurelia-templating'; import { UxComponent, StyleEngine } from '@aurelia-ux/core'; import { UxCardTheme } from './ux-card-theme'; import UX_CARD_VIEW from './ux-card.html'; +import { PLATFORM } from 'aurelia-pal'; @inject(Element, StyleEngine) @customElement('ux-card') -@inlineView(UX_CARD_VIEW) +@inlineView( + UX_CARD_VIEW, + [PLATFORM.moduleName('@aurelia-ux/card/ux-card.css')] +) export class UxCard implements UxComponent { @bindable public xs?: string; @bindable public sm?: string; diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 77003744..b487f792 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -82,7 +82,7 @@ }, "dependencies": { "@aurelia-ux/core": "^0.17.0", - "aurelia-framework": "^1.0.0" + "aurelia-binding": "^2.0.0" }, "devDependencies": { "@types/jasmine": "^2.8.6", @@ -90,11 +90,12 @@ "@types/node": "^7.0.11", "@types/webpack": "^4.39.8", "aurelia-bootstrapper": "^2.1.1", + "aurelia-framework": "^1.3.1", "aurelia-pal-browser": "^1.2.0", "aurelia-pal-nodejs": "^1.0.0-beta.1.0.0", "aurelia-polyfills": "^1.2.1", "aurelia-testing": "^1.0.0-beta.3.0.1", - "aurelia-webpack-plugin": "^3.0.0-rc.1", + "aurelia-webpack-plugin": "^4.0.0", "concurrently": "^3.4.0", "conventional-changelog-cli": "^2.0.27", "copyfiles": "^1.2.0", @@ -113,16 +114,17 @@ "path": "^0.12.7", "requirejs": "^2.3.3", "requirejs-text": "^2.0.15", - "rimraf": "^2.6.1", + "rimraf": "^3.0.0", "rollup": "^1.26.3", "rollup-plugin-typescript2": "^0.25.2", - "ts-loader": "^4.0.1", + "ts-loader": "^6.2.1", "ts-node": "^5.0.1", "tsconfig-paths": "^3.9.0", "tslint": "^5.20.1", "typedoc": "^0.9.0", "typescript": "^3.7.2", - "webpack": "^4.0.1" + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" }, "aurelia": { "build": { diff --git a/packages/checkbox/src/ux-checkbox.html b/packages/checkbox/src/ux-checkbox.html index 59c0a567..9d652f37 100644 --- a/packages/checkbox/src/ux-checkbox.html +++ b/packages/checkbox/src/ux-checkbox.html @@ -1,8 +1,4 @@ -