Skip to content

Commit

Permalink
chore(all): prepare release 2.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Aug 21, 2018
1 parent ed9c5df commit 7cc701e
Show file tree
Hide file tree
Showing 110 changed files with 993 additions and 1,057 deletions.
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-dialog",
"version": "1.0.0",
"version": "2.0.0-rc.1",
"description": "A dialog plugin for Aurelia.",
"keywords": [
"aurelia",
Expand All @@ -19,10 +19,11 @@
"url": "https://github.com/aurelia/dialog"
},
"dependencies": {
"aurelia-binding": "^2.1.4",
"aurelia-dependency-injection": "^1.0.0",
"aurelia-framework": "^1.0.0",
"aurelia-metadata": "^1.0.0",
"aurelia-pal": "^1.0.0",
"aurelia-templating": "^1.0.0"
"aurelia-templating": "^1.8.2"
}
}
7 changes: 1 addition & 6 deletions dist/amd/aurelia-dialog.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { FrameworkConfiguration } from 'aurelia-framework';
import { DialogConfiguration } from './dialog-configuration';
export declare function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: DialogConfiguration) => void): void;
export * from './ux-dialog';
export * from './ux-dialog-header';
export * from './ux-dialog-body';
export * from './ux-dialog-footer';
export * from './attach-focus';
export declare function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: DialogConfiguration) => void): void | Promise<void>;
export * from './interfaces';
export * from './dialog-settings';
export * from './dialog-configuration';
Expand Down
9 changes: 2 additions & 7 deletions dist/amd/aurelia-dialog.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(["require", "exports", "./dialog-configuration", "./ux-dialog", "./ux-dialog-header", "./ux-dialog-body", "./ux-dialog-footer", "./attach-focus", "./dialog-settings", "./dialog-configuration", "./renderer", "./dialog-cancel-error", "./dialog-service", "./dialog-controller"], function (require, exports, dialog_configuration_1, ux_dialog_1, ux_dialog_header_1, ux_dialog_body_1, ux_dialog_footer_1, attach_focus_1, dialog_settings_1, dialog_configuration_2, renderer_1, dialog_cancel_error_1, dialog_service_1, dialog_controller_1) {
define(["require", "exports", "./dialog-configuration", "./dialog-settings", "./dialog-configuration", "./renderer", "./dialog-cancel-error", "./dialog-service", "./dialog-controller"], function (require, exports, dialog_configuration_1, dialog_settings_1, dialog_configuration_2, renderer_1, dialog_cancel_error_1, dialog_service_1, dialog_controller_1) {
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
Expand All @@ -13,14 +13,9 @@ define(["require", "exports", "./dialog-configuration", "./ux-dialog", "./ux-dia
else {
config.useDefaults();
}
applyConfig();
return applyConfig();
}
exports.configure = configure;
__export(ux_dialog_1);
__export(ux_dialog_header_1);
__export(ux_dialog_body_1);
__export(ux_dialog_footer_1);
__export(attach_focus_1);
__export(dialog_settings_1);
__export(dialog_configuration_2);
__export(renderer_1);
Expand Down
4 changes: 2 additions & 2 deletions dist/amd/dialog-configuration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export declare class DialogConfiguration {
* The global configuration settings.
*/
settings: DialogSettings;
constructor(frameworkConfiguration: FrameworkConfiguration, applySetter: (apply: () => void) => void);
private _apply();
constructor(frameworkConfiguration: FrameworkConfiguration, applySetter: (apply: () => void | Promise<void>) => void);
private _apply;
/**
* Selects the Aurelia conventional defaults for the dialog plugin.
* @return This instance.
Expand Down
17 changes: 11 additions & 6 deletions dist/amd/dialog-configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ define(["require", "exports", "./renderer", "./dialog-settings", "./dialog-rende
Object.defineProperty(exports, "__esModule", { value: true });
var defaultRenderer = dialog_renderer_1.DialogRenderer;
var resources = {
'ux-dialog': aurelia_pal_1.PLATFORM.moduleName('./ux-dialog'),
'ux-dialog-header': aurelia_pal_1.PLATFORM.moduleName('./ux-dialog-header'),
'ux-dialog-body': aurelia_pal_1.PLATFORM.moduleName('./ux-dialog-body'),
'ux-dialog-footer': aurelia_pal_1.PLATFORM.moduleName('./ux-dialog-footer'),
'attach-focus': aurelia_pal_1.PLATFORM.moduleName('./attach-focus')
'ux-dialog': function () { return new Promise(function (resolve_1, reject_1) { require(['./resources/ux-dialog'], resolve_1, reject_1); }); },
'ux-dialog-header': function () { return new Promise(function (resolve_2, reject_2) { require(['./resources/ux-dialog-header'], resolve_2, reject_2); }); },
'ux-dialog-body': function () { return new Promise(function (resolve_3, reject_3) { require(['./resources/ux-dialog-body'], resolve_3, reject_3); }); },
'ux-dialog-footer': function () { return new Promise(function (resolve_4, reject_4) { require(['./resources/ux-dialog-footer'], resolve_4, reject_4); }); },
'attach-focus': function () { return new Promise(function (resolve_5, reject_5) { require(['./resources/attach-focus'], resolve_5, reject_5); }); }
};
// tslint:disable-next-line:max-line-length
var defaultCSSText = "ux-dialog-container,ux-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0}ux-dialog-overlay{opacity:0}ux-dialog-overlay.active{opacity:1}ux-dialog-container{display:block;transition:opacity .2s linear;opacity:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}ux-dialog-container.active{opacity:1}ux-dialog-container>div{padding:30px}ux-dialog-container>div>div{display:block;min-width:300px;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto}ux-dialog-container,ux-dialog-container>div,ux-dialog-container>div>div{outline:0}ux-dialog{display:table;box-shadow:0 5px 15px rgba(0,0,0,.5);border:1px solid rgba(0,0,0,.2);border-radius:5px;padding:3px;min-width:300px;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background:#fff}ux-dialog>ux-dialog-header{display:block;padding:16px;border-bottom:1px solid #e5e5e5}ux-dialog>ux-dialog-header>button{float:right;border:none;display:block;width:32px;height:32px;background:0 0;font-size:22px;line-height:16px;margin:-14px -16px 0 0;padding:0;cursor:pointer}ux-dialog>ux-dialog-body{display:block;padding:16px}ux-dialog>ux-dialog-footer{display:block;padding:6px;border-top:1px solid #e5e5e5;text-align:right}ux-dialog>ux-dialog-footer button{color:#333;background-color:#fff;padding:6px 12px;font-size:14px;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid #ccc;border-radius:4px;margin:5px 0 5px 5px}ux-dialog>ux-dialog-footer button:disabled{cursor:default;opacity:.45}ux-dialog>ux-dialog-footer button:hover:enabled{color:#333;background-color:#e6e6e6;border-color:#adadad}.ux-dialog-open{overflow:hidden}";
Expand All @@ -27,10 +27,15 @@ define(["require", "exports", "./renderer", "./dialog-settings", "./dialog-rende
DialogConfiguration.prototype._apply = function () {
var _this = this;
this.fwConfig.transient(renderer_1.Renderer, this.renderer);
this.resources.forEach(function (resourceName) { return _this.fwConfig.globalResources(resources[resourceName]); });
if (this.cssText) {
aurelia_pal_1.DOM.injectStyles(this.cssText);
}
if (this.resources.length) {
return Promise.all(this.resources.map(function (name) { return resources[name](); }))
.then(function (modules) {
_this.fwConfig.globalResources(modules.map(function (m) { return m.default; }));
});
}
};
/**
* Selects the Aurelia conventional defaults for the dialog plugin.
Expand Down
18 changes: 9 additions & 9 deletions dist/amd/dialog-renderer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export declare class DialogRenderer implements Renderer {
dialogOverlay: HTMLElement;
host: Element;
anchor: Element;
private getOwnElements(parent, selector);
private attach(dialogController);
private detach(dialogController);
private setAsActive();
private setAsInactive();
private setupClickHandling(dialogController);
private clearClickHandling();
private centerDialog();
private awaitTransition(setActiveInactive, ignore);
private getOwnElements;
private attach;
private detach;
private setAsActive;
private setAsInactive;
private setupClickHandling;
private clearClickHandling;
private centerDialog;
private awaitTransition;
getDialogContainer(): Element;
showDialog(dialogController: DialogController): Promise<void>;
hideDialog(dialogController: DialogController): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions dist/amd/dialog-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ define(["require", "exports", "aurelia-pal", "aurelia-dependency-injection"], fu
MozTransition: 'transitionend',
WebkitTransition: 'webkitTransitionEnd'
};
for (var t in transitions) {
for (var t in transitions) { // tslint:disable-line:prefer-const
if (el.style[t] !== undefined) {
transition = transitions[t];
return transition;
Expand Down Expand Up @@ -222,12 +222,12 @@ define(["require", "exports", "aurelia-pal", "aurelia-dependency-injection"], fu
return this.awaitTransition(function () { return _this.setAsInactive(); }, dialogController.settings.ignoreTransitions)
.then(function () { _this.detach(dialogController); });
};
var DialogRenderer_1;
DialogRenderer.dialogControllers = [];
DialogRenderer = DialogRenderer_1 = __decorate([
aurelia_dependency_injection_1.transient()
], DialogRenderer);
return DialogRenderer;
var DialogRenderer_1;
}());
exports.DialogRenderer = DialogRenderer;
});
10 changes: 5 additions & 5 deletions dist/amd/dialog-service.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export declare class DialogService {
hasOpenDialog: boolean;
hasActiveDialog: boolean;
constructor(container: Container, compositionEngine: CompositionEngine, defaultSettings: DialogSettings);
private validateSettings(settings);
private createCompositionContext(childContainer, host, settings);
private ensureViewModel(compositionContext);
private _cancelOperation(rejectOnCancel);
private composeAndShowDialog(compositionContext, dialogController);
private validateSettings;
private createCompositionContext;
private ensureViewModel;
private _cancelOperation;
private composeAndShowDialog;
/**
* Opens a new dialog.
* @param settings Dialog settings for this dialog instance.
Expand Down
15 changes: 4 additions & 11 deletions dist/amd/dialog-service.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(["require", "exports", "aurelia-dependency-injection", "aurelia-metadata", "aurelia-templating", "./dialog-settings", "./dialog-cancel-error", "./lifecycle", "./dialog-controller"], function (require, exports, aurelia_dependency_injection_1, aurelia_metadata_1, aurelia_templating_1, dialog_settings_1, dialog_cancel_error_1, lifecycle_1, dialog_controller_1) {
define(["require", "exports", "aurelia-dependency-injection", "aurelia-templating", "./dialog-settings", "./dialog-cancel-error", "./lifecycle", "./dialog-controller"], function (require, exports, aurelia_dependency_injection_1, aurelia_templating_1, dialog_settings_1, dialog_cancel_error_1, lifecycle_1, dialog_controller_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:enable:max-line-length */
Expand Down Expand Up @@ -47,17 +47,10 @@ define(["require", "exports", "aurelia-dependency-injection", "aurelia-metadata"
};
};
DialogService.prototype.ensureViewModel = function (compositionContext) {
if (typeof compositionContext.viewModel === 'function') {
var moduleId = aurelia_metadata_1.Origin.get(compositionContext.viewModel).moduleId;
if (!moduleId) {
return Promise.reject(new Error("Can not resolve \"moduleId\" of \"" + compositionContext.viewModel.name + "\"."));
}
compositionContext.viewModel = moduleId;
}
if (typeof compositionContext.viewModel === 'string') {
return this.compositionEngine.ensureViewModel(compositionContext);
if (typeof compositionContext.viewModel === 'object') {
return Promise.resolve(compositionContext);
}
return Promise.resolve(compositionContext);
return this.compositionEngine.ensureViewModel(compositionContext);
};
DialogService.prototype._cancelOperation = function (rejectOnCancel) {
if (!rejectOnCancel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export declare class AttachFocus implements ComponentAttached {
value: boolean | string;
constructor(element: HTMLElement);
attached(): void;
valueChanged(newValue: string): void;
}
19 changes: 8 additions & 11 deletions dist/amd/attach-focus.js → dist/amd/resources/attach-focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
define(["require", "exports", "aurelia-templating", "aurelia-pal"], function (require, exports, aurelia_templating_1, aurelia_pal_1) {
define(["require", "exports", "aurelia-binding", "aurelia-templating", "aurelia-pal"], function (require, exports, aurelia_binding_1, aurelia_templating_1, aurelia_pal_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AttachFocus = /** @class */ (function () {
function AttachFocus(element) {
this.element = element;
this.value = true;
}
/**
* @internal
*/
// tslint:disable-next-line:member-ordering
AttachFocus.inject = function () { return [aurelia_pal_1.DOM.Element]; };
AttachFocus.prototype.attached = function () {
if (this.value && this.value !== 'false') {
if (this.value === '' || (this.value && this.value !== 'false')) {
this.element.focus();
}
};
AttachFocus.prototype.valueChanged = function (newValue) {
this.value = newValue;
};
/**
* @internal
*/
// tslint:disable-next-line:member-ordering
AttachFocus.inject = [aurelia_pal_1.DOM.Element];
AttachFocus = __decorate([
aurelia_templating_1.customAttribute('attach-focus')
aurelia_templating_1.customAttribute('attach-focus', aurelia_binding_1.bindingMode.oneTime)
], AttachFocus);
return AttachFocus;
}());
Expand Down
2 changes: 2 additions & 0 deletions dist/amd/resources/ux-dialog-body.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export default class UxDialogBody {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ define(["require", "exports", "aurelia-templating"], function (require, exports,
], UxDialogBody);
return UxDialogBody;
}());
exports.UxDialogBody = UxDialogBody;
exports.default = UxDialogBody;
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DialogController } from './dialog-controller';
import { DialogController } from '../dialog-controller';
/**
* View-model for footer of Dialog.
*/
export declare class UxDialogFooter {
export default class UxDialogFooter {
controller: DialogController;
static isCancelButton(value: string): boolean;
buttons: any[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
define(["require", "exports", "aurelia-templating", "./dialog-controller"], function (require, exports, aurelia_templating_1, dialog_controller_1) {
define(["require", "exports", "aurelia-templating", "../dialog-controller"], function (require, exports, aurelia_templating_1, dialog_controller_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
Expand Down Expand Up @@ -33,6 +33,7 @@ define(["require", "exports", "aurelia-templating", "./dialog-controller"], func
this.buttons = ['Cancel', 'Ok'];
}
};
var UxDialogFooter_1;
/**
* @internal
*/
Expand All @@ -49,7 +50,6 @@ define(["require", "exports", "aurelia-templating", "./dialog-controller"], func
aurelia_templating_1.inlineView("\n <template>\n <slot></slot>\n <template if.bind=\"buttons.length > 0\">\n <button type=\"button\"\n class=\"btn btn-default\"\n repeat.for=\"button of buttons\"\n click.trigger=\"close(button)\">\n ${button}\n </button>\n </template>\n </template>\n")
], UxDialogFooter);
return UxDialogFooter;
var UxDialogFooter_1;
}());
exports.UxDialogFooter = UxDialogFooter;
exports.default = UxDialogFooter;
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentBind } from 'aurelia-templating';
import { DialogController } from './dialog-controller';
export declare class UxDialogHeader implements ComponentBind {
import { DialogController } from '../dialog-controller';
export default class UxDialogHeader implements ComponentBind {
controller: DialogController;
showCloseButton: boolean | undefined;
constructor(controller: DialogController);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
define(["require", "exports", "aurelia-templating", "./dialog-controller"], function (require, exports, aurelia_templating_1, dialog_controller_1) {
define(["require", "exports", "aurelia-templating", "../dialog-controller"], function (require, exports, aurelia_templating_1, dialog_controller_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var UxDialogHeader = /** @class */ (function () {
Expand All @@ -30,5 +30,5 @@ define(["require", "exports", "aurelia-templating", "./dialog-controller"], func
], UxDialogHeader);
return UxDialogHeader;
}());
exports.UxDialogHeader = UxDialogHeader;
exports.default = UxDialogHeader;
});
2 changes: 2 additions & 0 deletions dist/amd/resources/ux-dialog.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export default class UxDialog {
}
2 changes: 1 addition & 1 deletion dist/amd/ux-dialog.js → dist/amd/resources/ux-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ define(["require", "exports", "aurelia-templating"], function (require, exports,
], UxDialog);
return UxDialog;
}());
exports.UxDialog = UxDialog;
exports.default = UxDialog;
});
2 changes: 0 additions & 2 deletions dist/amd/ux-dialog-body.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/amd/ux-dialog.d.ts

This file was deleted.

7 changes: 1 addition & 6 deletions dist/commonjs/aurelia-dialog.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { FrameworkConfiguration } from 'aurelia-framework';
import { DialogConfiguration } from './dialog-configuration';
export declare function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: DialogConfiguration) => void): void;
export * from './ux-dialog';
export * from './ux-dialog-header';
export * from './ux-dialog-body';
export * from './ux-dialog-footer';
export * from './attach-focus';
export declare function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: DialogConfiguration) => void): void | Promise<void>;
export * from './interfaces';
export * from './dialog-settings';
export * from './dialog-configuration';
Expand Down
7 changes: 1 addition & 6 deletions dist/commonjs/aurelia-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ function configure(frameworkConfig, callback) {
else {
config.useDefaults();
}
applyConfig();
return applyConfig();
}
exports.configure = configure;
__export(require("./ux-dialog"));
__export(require("./ux-dialog-header"));
__export(require("./ux-dialog-body"));
__export(require("./ux-dialog-footer"));
__export(require("./attach-focus"));
__export(require("./dialog-settings"));
__export(require("./dialog-configuration"));
__export(require("./renderer"));
Expand Down
Loading

0 comments on commit 7cc701e

Please sign in to comment.