diff --git a/api/js/etemplate/Et2Date/Et2DateSinceReadonly.ts b/api/js/etemplate/Et2Date/Et2DateSince.ts similarity index 96% rename from api/js/etemplate/Et2Date/Et2DateSinceReadonly.ts rename to api/js/etemplate/Et2Date/Et2DateSince.ts index 1c3091de95..aefa3e7443 100644 --- a/api/js/etemplate/Et2Date/Et2DateSinceReadonly.ts +++ b/api/js/etemplate/Et2Date/Et2DateSince.ts @@ -69,7 +69,7 @@ const formatDate = function(date : Date, options = {units: "YmdHis"}) * * This is a stripped-down read-only widget used in nextmatch */ -export class Et2DateSinceReadonly extends Et2DateReadonly +export class Et2DateSince extends Et2DateReadonly { static get properties() { @@ -130,4 +130,4 @@ export class Et2DateSinceReadonly extends Et2DateReadonly } // @ts-ignore TypeScript is not recognizing that this widget is a LitElement -customElements.define("et2-date-since", Et2DateSinceReadonly); \ No newline at end of file +customElements.define("et2-date-since", Et2DateSince); \ No newline at end of file diff --git a/api/js/etemplate/Et2Tree/Et2Tree.ts b/api/js/etemplate/Et2Tree/Et2Tree.ts index 8a5d8db7ce..b9b844dc85 100644 --- a/api/js/etemplate/Et2Tree/Et2Tree.ts +++ b/api/js/etemplate/Et2Tree/Et2Tree.ts @@ -38,6 +38,7 @@ export type TreeItemData = SelectOption & { /** * @event {{id: String, item:SlTreeItem}} sl-expand emmited when tree item expands * //TODO add for other events + * @since 23.1.x */ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) { diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts index 4d3cecd238..1708d903b9 100644 --- a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts +++ b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts @@ -41,6 +41,7 @@ type Constructor = new (...args : any[]) => T; * @event sl-after-hide - Emitted after the suggestion menu closes and all animations are complete. * * @csspart form-control - The form control that wraps the label, input, and help text. + * @since 23.1.x */ export class Et2TreeDropdown extends SearchMixin & Et2InputWidgetInterface & typeof LitElement, TreeSearchResult, TreeSearchResults>(Et2WidgetWithSelectMixin(LitElement)) diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdownCategory.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdownCategory.ts index d35d9f1c28..16132fdffe 100644 --- a/api/js/etemplate/Et2Tree/Et2TreeDropdownCategory.ts +++ b/api/js/etemplate/Et2Tree/Et2TreeDropdownCategory.ts @@ -9,6 +9,9 @@ import {css, PropertyValues, unsafeCSS} from "lit"; import {Et2TreeDropdown} from "./Et2TreeDropdown"; import {Et2CategoryTag} from "../Et2Select/Tag/Et2CategoryTag"; +/** + * @since 23.1.x + */ export class Et2TreeDropdownCategory extends Et2TreeDropdown { diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index 7350f6ee4e..d1128a3c4f 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -41,7 +41,7 @@ import './Et2Date/Et2DateDuration'; import './Et2Date/Et2DateDurationReadonly'; import './Et2Date/Et2DateRange'; import './Et2Date/Et2DateReadonly'; -import './Et2Date/Et2DateSinceReadonly'; +import './Et2Date/Et2DateSince'; import './Et2Date/Et2DateTime'; import './Et2Date/Et2DateTimeOnly'; import './Et2Date/Et2DateTimeOnlyReadonly'; diff --git a/doc/etemplate2/_includes/component.njk b/doc/etemplate2/_includes/component.njk index 73725a119f..bc742b4536 100644 --- a/doc/etemplate2/_includes/component.njk +++ b/doc/etemplate2/_includes/component.njk @@ -32,7 +32,7 @@
- Since {{component.since or '?' }} + Since {{component.since or '23.1' }} {{ component.status }} @@ -330,4 +330,4 @@ {% else %} This component is not correctly documented {% endif %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/doc/etemplate2/_utilities/cem.cjs b/doc/etemplate2/_utilities/cem.cjs index 6e05c2ab30..dc371c3f48 100644 --- a/doc/etemplate2/_utilities/cem.cjs +++ b/doc/etemplate2/_utilities/cem.cjs @@ -17,8 +17,9 @@ module.exports.getAllComponents = function () // Find a Shoelace class declaration from their custom-elements.json // // for Et2* classes, we also look recursive, if they inherit from a Shoelace class + // or a (not included) Readonly or Mobile class, in with case we return the regular Et2-class // - const getSlClass = function(superclass) + const getSlClass = function(superclass, debug) { let sl_class; if (superclass && superclass.package === "@shoelace-style/shoelace") @@ -28,11 +29,12 @@ module.exports.getAllComponents = function () } else if (superclass && superclass.name.substring(0, 3) === "Et2") { + const name = superclass.name.replace(/(Readonly|Mobile)$/, ''); customElementsManifest.modules.find(module => - sl_class = module.declarations.find(declaration => declaration.name === superclass.name)); - if (sl_class) sl_class = getSlClass(sl_class.superclass); + sl_class = module.declarations.find(declaration => declaration.name === name)); + if (sl_class && name === superclass.name) sl_class = getSlClass(sl_class.superclass); } - //console.log("getSlClass("+superclass.name+") returning ", sl_class ? sl_class.name+" with attributes: "+sl_class.attributes?.map(attribute => attribute.name).join(", ") : "undefined"); + if (debug) console.log("getSlClass("+superclass.name+") returning ", sl_class ? sl_class.name+" with attributes: "+sl_class.attributes?.map(attribute => attribute.name).join(", ") : "undefined"); return sl_class; } // @@ -46,7 +48,7 @@ module.exports.getAllComponents = function () if (a.name[0] !== '_' && b.name[0] === '_') return -1; return a.name.localeCompare(b.name); } - const debug='declaration.name'; // set to declaration.name to get more logging for that component + const debug=''; // set to declaration.name to get more logging for that component const allComponents = []; customElementsManifest.modules?.forEach(module => @@ -56,7 +58,7 @@ module.exports.getAllComponents = function () if (declaration.customElement) { // check if we have a Shoelace superclass - const sl_class = declaration.superclass ? getSlClass(declaration.superclass) : undefined; + const sl_class = declaration.superclass ? getSlClass(declaration.superclass, debug === declaration.name) : undefined; if (debug === declaration.name) console.log(declaration.name+": superclass=", declaration.superclass, sl_class ? "found: "+sl_class.name : "not found"); // Generate the dist path based on the src path and attach it to the component @@ -77,7 +79,7 @@ module.exports.getAllComponents = function () members = members.concat(sl_members); } let methods = members?.filter(prop => prop.kind === 'method' && prop.privacy !== 'private') || []; - if (declaration.name === "Et2ButtonScroll") console.log("found methods: "+methods.map(method => method.name).join(", ")); + if (debug === declaration.name) console.log("found methods: "+methods.map(method => method.name).join(", ")); // add non-private and not overwritten Shoelace superclass methods /* ToDo disabled, as it gives an error later (only copies 8 files and generates none) if (sl_class) @@ -108,15 +110,15 @@ module.exports.getAllComponents = function () methods, properties, attributes: declaration.attributes?.concat(sl_class?.attributes?.filter(attribute => !declaration.attributes.find(attr => attr.name === attribute.name)) - /*.map(attribute => { + .map(attribute => { return {...attribute, inheritedFrom: {name: sl_class.name, module: "@shoelace-style/shoelace"}}; - })*/) + })) }); if (debug === declaration.name) console.log("added attributes", allComponents[allComponents.length - 1].attributes); } }); }); - console.log('Build dependency graphs'); + if (debug) console.log('Build dependency graphs'); // Build dependency graphs allComponents.forEach(component => { @@ -145,7 +147,7 @@ module.exports.getAllComponents = function () component.dependencies = dependencies.sort(); }); - console.log('Add custom docs'); + if (debug) console.log('Add custom docs'); // Add custom docs - not monitored for file changes allComponents.forEach(component => { @@ -158,7 +160,7 @@ module.exports.getAllComponents = function () fs.readFile(docPath, (err, data) => component.content = data.toString()); } }) - console.log("return allComponentes sorted by name") + if (debug) console.log("return allComponentes sorted by name") // Sort by name return allComponents.sort((a, b) => { diff --git a/doc/etemplate2/custom-elements-manifest.config.mjs b/doc/etemplate2/custom-elements-manifest.config.mjs index 80782051ec..2cba81a597 100644 --- a/doc/etemplate2/custom-elements-manifest.config.mjs +++ b/doc/etemplate2/custom-elements-manifest.config.mjs @@ -28,7 +28,7 @@ function replace(string, terms) export default { globs: ["api/js/etemplate/**/Et2*.ts","api/js/etemplate/Et2Nextmatch/**/*.ts"], /** Globs to exclude */ - exclude: ["api/js/etemplate/**/test/*"],//, 'et2_*.ts', '**/test/*', '**/*.styles.ts', '**/*.test.ts'], + exclude: ["api/js/etemplate/**/test/*","api/js/etemplate/**/Et2*Readonly.ts","api/js/etemplate/**/Et2*Mobile.ts"],//, 'et2_*.ts', '**/test/*', '**/*.styles.ts', '**/*.test.ts'], dev: false, litelement: true, plugins: [ diff --git a/doc/etemplate2/etemplate2.0.dtd b/doc/etemplate2/etemplate2.0.dtd index 95869ebb9f..b10172a8b4 100644 --- a/doc/etemplate2/etemplate2.0.dtd +++ b/doc/etemplate2/etemplate2.0.dtd @@ -1312,7 +1312,7 @@ @@ -1986,23 +1997,11 @@ @@ -3183,7 +3182,7 @@ @@ -4833,23 +4818,9 @@ diff --git a/doc/etemplate2/etemplate2.0.rng b/doc/etemplate2/etemplate2.0.rng index 12b9843320..3e2f359fbe 100644 --- a/doc/etemplate2/etemplate2.0.rng +++ b/doc/etemplate2/etemplate2.0.rng @@ -4669,7 +4669,14 @@ - + + + accounts + groups + both + owngroups + + @@ -7331,6 +7338,24 @@ + + + + + + + + + + + + + false + true + 1 + + + @@ -7346,9 +7371,21 @@ + + + + false + true + 1 + + + + + + @@ -7361,6 +7398,15 @@ + + + + false + true + 1 + + + @@ -7373,12 +7419,39 @@ + + + + + + + + + + + + + false + true + 1 + + + + + + + false + true + 1 + + + @@ -7401,9 +7474,6 @@ - - - @@ -7721,60 +7791,12 @@ - - - - - - - - - - - - - - - - false - true - 1 - - - - - - - false - true - 1 - - - - - - - - - - false - true - 1 - - - - - - - - - @@ -7788,15 +7810,9 @@ - - - - - - @@ -12972,7 +12988,14 @@ - + + + accounts + groups + both + owngroups + + @@ -19712,66 +19735,12 @@ - - - - - - - - - - - - - - - - false - true - 1 - - - - - - - false - true - 1 - - - - - - - - - - false - true - 1 - - - - - - - - - - - - - - - @@ -19785,15 +19754,9 @@ - - - - - - @@ -20477,66 +20440,12 @@ - - - - - - - - - - - - - - - - false - true - 1 - - - - - - - false - true - 1 - - - - - - - - - - false - true - 1 - - - - - - - - - - - - - - - @@ -20550,15 +20459,9 @@ - - - - - -