From b287d541497b38ee3693eac366a3c92f4eb66afe Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 7 Nov 2024 17:24:31 -0700 Subject: [PATCH] Revert "Change template to webcomponent", not ready for pushing This reverts commit e107b48c3a2f7420c5fd03011beb59902257e734. --- api/js/etemplate/Et2Template/Et2Template.md | 11 - .../Et2Template/Et2Template.styles.ts | 26 - api/js/etemplate/Et2Template/Et2Template.ts | 512 ------------------ api/js/etemplate/Layout/Et2Tabs/Et2Tabs.ts | 4 +- api/js/etemplate/et2_widget_template.ts | 262 ++++++++- api/js/etemplate/etemplate2.ts | 66 ++- 6 files changed, 313 insertions(+), 568 deletions(-) delete mode 100644 api/js/etemplate/Et2Template/Et2Template.md delete mode 100644 api/js/etemplate/Et2Template/Et2Template.styles.ts delete mode 100644 api/js/etemplate/Et2Template/Et2Template.ts diff --git a/api/js/etemplate/Et2Template/Et2Template.md b/api/js/etemplate/Et2Template/Et2Template.md deleted file mode 100644 index 0caebbbc14..0000000000 --- a/api/js/etemplate/Et2Template/Et2Template.md +++ /dev/null @@ -1,11 +0,0 @@ -The template displays a loader while it is loading the file, and is replaced with the actual content once all widgets -are ready. - -```html:preview - - -``` diff --git a/api/js/etemplate/Et2Template/Et2Template.styles.ts b/api/js/etemplate/Et2Template/Et2Template.styles.ts deleted file mode 100644 index 0768eed56b..0000000000 --- a/api/js/etemplate/Et2Template/Et2Template.styles.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {css} from 'lit'; - -export default css` - :host { - display: block; - position: relative; - height: 100%; - } - - .template--loading { - position: absolute; - width: 100%; - height: 100%; - min-height: 5rem; - display: flex; - justify-content: center; - align-items: center; - - background-color: var(--sl-panel-background-color); - color: var(--application-color, var(--primary-color)); - - z-index: var(--sl-z-index-dialog); - - font-size: 5rem; - } -`; \ No newline at end of file diff --git a/api/js/etemplate/Et2Template/Et2Template.ts b/api/js/etemplate/Et2Template/Et2Template.ts deleted file mode 100644 index 1ecd182711..0000000000 --- a/api/js/etemplate/Et2Template/Et2Template.ts +++ /dev/null @@ -1,512 +0,0 @@ -/** - * EGroupware eTemplate2 - Email WebComponent - * - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License - * @package api - * @link https://www.egroupware.org - * @author Nathan Gray - */ -import {html, LitElement, nothing} from "lit"; -import {Et2Widget} from "../Et2Widget/Et2Widget"; -import shoelace from "../Styles/shoelace"; -import styles from "./Et2Template.styles"; -import {property} from "lit/decorators/property.js"; -import {customElement} from "lit/decorators/custom-element.js"; -import {etemplate2} from "../etemplate2"; -import {et2_loadXMLFromURL} from "../et2_core_xml"; -import {Et2InputWidgetInterface} from "../Et2InputWidget/Et2InputWidget"; -import {egw, IegwAppLocal} from "../../jsapi/egw_global"; -import {until} from "lit/directives/until.js"; -import {classMap} from "lit/directives/class-map.js"; -import {et2_arrayMgr} from "../et2_core_arrayMgr"; - -// @ts-ignore -/** - * @summary Load & populate a template (.xet file) - * - * - * @event load - Emitted when all elements are loaded - * - * @csspart template - Wrapper around template content - * - * @cssproperty [--height=5] - The maximum height of the widget, to limit size when you have a lot of addresses. Set by rows property, when set. - */ -@customElement("et2-template") -export class Et2Template extends Et2Widget(LitElement) -{ - - static get styles() - { - return [ - shoelace, - super.styles, - styles - ]; - } - - /** - * Name / ID of template with optional cache-buster ('?'+filemtime of template on server) - * Template can be ..