Some TypeScript definitions

This commit is contained in:
Hadi Nategh 2021-02-10 14:12:27 +01:00
parent e66061a411
commit dc2f80c39c
3 changed files with 8 additions and 4 deletions

View File

@ -23,6 +23,7 @@ var __extends = (this && this.__extends) || (function () {
}; };
})(); })();
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.et2_url_ro = exports.et2_url = void 0;
/*egw:uses /*egw:uses
et2_textbox; et2_textbox;
et2_valueWidget; et2_valueWidget;
@ -281,6 +282,7 @@ var et2_url = /** @class */ (function (_super_1) {
et2_url.EMAIL_PREG = new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|"(?:[^"\\]|\\.)*")\s?<)?[^\x00-\x20()\xe2\x80\x8b<>@,;:\042\[\]\x80-\xff]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/i); et2_url.EMAIL_PREG = new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|"(?:[^"\\]|\\.)*")\s?<)?[^\x00-\x20()\xe2\x80\x8b<>@,;:\042\[\]\x80-\xff]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/i);
return et2_url; return et2_url;
}(et2_widget_textbox_1.et2_textbox)); }(et2_widget_textbox_1.et2_textbox));
exports.et2_url = et2_url;
et2_core_widget_1.et2_register_widget(et2_url, ["url", "url-email", "url-phone", "url-fax"]); et2_core_widget_1.et2_register_widget(et2_url, ["url", "url-email", "url-phone", "url-fax"]);
/** /**
* et2_url_ro is the readonly implementation of the url, email & phone. * et2_url_ro is the readonly implementation of the url, email & phone.
@ -472,5 +474,6 @@ var et2_url_ro = /** @class */ (function (_super_1) {
et2_url_ro.email_cache = []; et2_url_ro.email_cache = [];
return et2_url_ro; return et2_url_ro;
}(et2_core_valueWidget_1.et2_valueWidget)); }(et2_core_valueWidget_1.et2_valueWidget));
exports.et2_url_ro = et2_url_ro;
et2_core_widget_1.et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro", "url-fax_ro"]); et2_core_widget_1.et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro", "url-fax_ro"]);
//# sourceMappingURL=et2_widget_url.js.map //# sourceMappingURL=et2_widget_url.js.map

View File

@ -25,7 +25,7 @@ import {et2_valueWidget} from "./et2_core_valueWidget";
* *
* @augments et2_textbox * @augments et2_textbox
*/ */
class et2_url extends et2_textbox export class et2_url extends et2_textbox
{ {
static readonly _attributes : any = { static readonly _attributes : any = {
"multiline": { "multiline": {
@ -306,7 +306,7 @@ et2_register_widget(et2_url, ["url", "url-email", "url-phone", "url-fax"]);
* *
* @augments et2_valueWidget * @augments et2_valueWidget
*/ */
class et2_url_ro extends et2_valueWidget export class et2_url_ro extends et2_valueWidget
{ {
static readonly _attributes : any = { static readonly _attributes : any = {
"contact_plus": { "contact_plus": {

View File

@ -980,11 +980,12 @@ declare interface IegwWndLocal extends IegwGlobal
* onshow: // Callback function dispatches when notification is shown * onshow: // Callback function dispatches when notification is shown
* onclose: // Callback function dispateches on notification close * onclose: // Callback function dispateches on notification close
* onerror: // Callback function dispatches on error, default is a egw.debug log * onerror: // Callback function dispatches on error, default is a egw.debug log
* requireInteraction: // boolean value indicating that a notification should remain active until the user clicks or dismisses it
* } * }
* @return {boolean} false if Notification is not supported by browser * @return {boolean} false if Notification is not supported by browser
*/ */
notification(_title : string, _options : {dir?: "ltr"|"rtl"|"auto", lang: string, body?: string, icon?: string, notification(_title : string, _options : {dir?: "ltr"|"rtl"|"auto", lang?: string, body?: string, icon?: string,
tag?: string, onclick: Function, onshow?: Function, onclose?: Function, onerror?: Function}) : false|void; tag?: string, onclick: Function, onshow?: Function, onclose?: Function, onerror?: Function, requireInteraction?: boolean}) : false|void;
/** /**
* Check Notification availability by browser * Check Notification availability by browser
* *