Skip to content

Commit

Permalink
docs: generate cem (#7613)
Browse files Browse the repository at this point in the history
* docs: generate cem

* chore: cleanup

* chore: migrate button

* chore: generate manifest for base

* chore: cleanup

* chore: enhance

* chore: align storybook to use cem

* chore: 09/10

* chore: 10.10

* chore: add validator for manifest

* chore: add valid jsdoc tags

* chore: improve validators

* chore: migrate samples prepare to storybook

* chore: ts

* chore: fix missing tags

* chore: clean

* chore: correct deps

* chore: fix scripts

* chore: validate tags

* chore: optional execution of script

* chore: sampels docs

* chore: restore previous scripts and enable cem for base

* chore: fix validation of @default

* chore: fix storybook build

* chore: fix schema and add missing tags

* chore: restore bundle

* chore: add param type

* chore: generate new manifest

* fix: chore description

* fix: param / unnamed slots privacy

* chore: show css parts

* chore: extract storybook

* chore: restore nps script

* chore: restore component migration

* fix: default value

* fix: enum schema validation

* fix: show interfaces

* fix: ts files path

* chore: refacotor, fix validation, add internal json

* chore: update schema and validation

* chore: add yarnlock

* chore: fix event param types

* fix: show event params

* fix: display only public ones

* chore: restore input paths

* chore: refactor

* chore: update schema

* chore: restore paths

* chore: add override for getters, methods, props

* docs: new cem for Topic-P components - Icon (#7810)

* docs: new cem for Topic-P components - Icon
Issue: #7610

* docs: new cem for Topic-P components - Icon
-fixed review comments

* docs: new cem for Topic-P components - Icon
-ignored lint error

* fix(ui5-wizard): scrollbar styles are now present on root (#7838)

* docs: new cem for Topic-P components - Icon
-removed @INTERACE jsdoc tag from interfaces file

---------

Co-authored-by: Ivaylo Plashkov <ivaylo.plashkov@sap.com>

* docs: new cem for Topic-P components - ShellBar (#7823)

* docs: new cem for Topic-P components - ShellBar
Issue: #7610

* docs: new cem for Topic-P components - ShellBar
- fixed review comments

* fix(ui5-wizard): scrollbar styles are now present on root (#7838)

* docs: new cem for Topic-P components - ShellBar
- fixed review comments

* chore: update chromedriver to 119 (#7883)

* fix(ui5-switch): align 'off' text in RTL, add compact mode params (#7603)

In RTL mode the 'off' icon of `Graphical` type Switch was misaligned due to missing parameters for RTL scenario of the control.

Fixes: #7522 
Fixes: #7806

* fix(framework): redundant fonts loading (#7868)

fix(framework): font loading

Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* docs: new cem for Topic-P components - ShellBar
- fixed review comments

---------

Co-authored-by: Ivaylo Plashkov <ivaylo.plashkov@sap.com>
Co-authored-by: ilhan orhan <ilhan.orhan007@gmail.com>
Co-authored-by: Stoyan <88034608+hinzzx@users.noreply.github.com>
Co-authored-by: Nayden Naydenov <31909318+nnaydenow@users.noreply.github.com>
Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* chore: add privacy for shellbar events

* chore: ehnance validator

* chore: add storybook

* chore: migrate base package

* chore: add correct export definition

* docs(ui5-rating-indicator): improve documentation (#7915)

* docs(ui5-textarea): improve documentation (#7913)

* fix(ui5-textarea): improve documentation

* docs(ui5-textarea): reflect comments

* chore: fix some components values and make storybook to work

* docs(ui5-slider, ui5-range-slider): enhance documentation (#7910)

* fix(ui5-slider, ui5-range-slider): enhance documentation

* docs(ui5-slider, ui5-range-slider): reflect review comments

* chore: cleanup

* docs: new cem for Topic-P components - Toolbar (#7814)

* docs: new cem for Topic-P components - Toolbar
Issue: #7610

* docs: new cem for Topic-P components - Toolbar
-refactored toolbar related files docs

* docs: new cem for Topic-P components - Toolbar
- removed unnecessary tag rom ToolbarSeparator docs

* docs: new cem for Topic-P components - Toolbar
-fixed review comments

* docs: new cem for Topic-P components - Toolbar
- fixed review comments

* docs: new cem for Topic-P components - Toolbar
- fixed review comments

* docs: new cem for Topic-P components - Toolbar
- fixed review comments

* docs: new cem for Topic-P components - Toolbar
- fixed review comments

* docs: new cem for Topic-P components - Toolbar
- fixed review comments

* docs: new cem for Topic-P components - List (#7824)

* docs: new cem for Topic-P components - List
Issue: #7610

* docs: new cem for Topic-P components - List
- fixed review comments

* docs: new cem for Topic-P components - List
- fixed review comments

* docs: new cem for Topic-P components - List
- fixed review comments

* docs: new cem for Topic-P components - List
- fixed review comments

* chore: fulfill list

* docs(ui5-message-strip): improve documentation (#7917)

* docs(ui5-message-strip): improve documentation

* docs(ui5-message-strip): reflect review comments

* docs(ui5-toast): improve documentation (#7914)

* docs(ui5-toast): improve documentation

* docs(ui5-toast): reflect review comments

* docs: new cem for Topic-P components (#7851)

* docs: new cem for Topic-P components (#7850)

* docs: new cem for Topic-P components - ui5-select

* docs: new cem for Topic-P components - ui5-select

* docs: new cem for Topic-P components

* docs: new cem for Topic-P components

---------

Co-authored-by: Nayden Naydenov <31909318+nnaydenow@users.noreply.github.com>

* chore: fulfill

* docs: new cem for Topic-P components - Tree (#7927)

* fix(ui5-textarea): adjust scroll positioning (#7920)

* docs(ui5-select-menu-option): correct disabled property description (#7925)

docs(ui5-select-menu-option): correct docs

Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* docs: new cem for Topic-P components - Tree
Issue: #7610

* docs: new cem for Topic-P components - Tree
-fixed review comments

---------

Co-authored-by: niyap <38278268+niyap@users.noreply.github.com>
Co-authored-by: Nayden Naydenov <31909318+nnaydenow@users.noreply.github.com>
Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* chore: fullfill

* docs(ui5-panel): improve documentation (#7924)

* docs(ui5-panel): improve documentation

* docs(ui5-panel): reflect review comments

* docs(ui5-panel): reflect review comments

* docs(ui5-page): improve documentation (#7919)

* docs: rewrite JSDoc for custom-elements-manifest/analyzer (#7778)

* docs: new cem for Topic-RD components

JSDoc changes related to using the new custom-elements-manifest for Rodopi-owned components.
Issue: #7610

* docs: remove types from enums

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

* chore: fulfill

* docs: rewrite JSDoc for custom-elements-manifest/analyzer

Related to: #7610

---------

Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* chore: ts build

* docs: Adapt JSDocs for new CЕM and Remove Redundancies (#7922)

* docs: Adapt JSDocs for new CЕM and Remove Redundancies

* docs: fix merge conflict

* docs: adapt docs to updated specs

* docs: fix storybook errors

* docs: add missing file

* docs: update interfaces

* docs: fix comments

* docs: fix more comments

* docs: another comments fix

* docs: fix more comments

* docs: fix comments

* docs: fix ITtimelineItem interface properties

---------

Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>

* docs(ui5-wizard): improve documentation (#7935)

* docs(ui5-wizard): improve documentation

* docs(ui5-wizard): reflect review comments

* docs(ui5-combobox): improve documentation (#7942)

* chore: execute package script

* chore: extract type of parameters with default and enhace storybook

* docs(ui5-multi-combobox): improve documentation (#7944)

* chore: fix missed files

* chore: fixes

* chore: fix superclass references

* chore: fix paths

* chore: align exports with modules name

* chore: fix datepicker

* chore: add _ui5validator

* docs(ui5-table): improve documentation (#7951)

* docs(ui5-table): improve documentation

* docs(ui5-table): reflect review comments

---------

Co-authored-by: Nia Peeva <niya.peeva@sap.com>

* docs(ui5-input, ui5-multi-input): improve documentation (#7969)

Co-authored-by: Nia Peeva <niya.peeva@sap.com>

* chore: fixes

* chore: update schema

* chore: handle non metadata props

* chore: fix select

* fix tree

* fix tree items

* fix tree

* review comments

* chore: aling interfaces

* cleanup interfaces

* chore: tab container

* chor: tab container interface

* chore: return type of color palette popover

* chore: fix tree test

* escaped new lines

* remove parts

* optimizations

* chore: fix pathds

* chore: make some components private

* fix schema validation and cleanup

* ehance customElement decorator

* customElement decorator

* fix globs pattern

* makr correctly custom elements

* corrections

* chore: 2 interfaces added

* chore: 2 more fixes

* chore: fix label and token

* chore: do not sort props

---------

Co-authored-by: Nayden Naydenov <nnaydenow.work@sap.com>
Co-authored-by: Vladislav Tasev <vladislav.tasev@sap.com>
Co-authored-by: Plamen Ivanov <plamen.ivanov01@sap.com>
Co-authored-by: Ivaylo Plashkov <ivaylo.plashkov@sap.com>
Co-authored-by: ilhan orhan <ilhan.orhan007@gmail.com>
Co-authored-by: Stoyan <88034608+hinzzx@users.noreply.github.com>
Co-authored-by: niyap <38278268+niyap@users.noreply.github.com>
Co-authored-by: yanaminkova <32466553+yanaminkova@users.noreply.github.com>
Co-authored-by: Siyana Todorova <72251110+s-todorova@users.noreply.github.com>
Co-authored-by: Nikolay Hristov <n.hristov@sap.com>
Co-authored-by: Nia Peeva <niya.peeva@sap.com>
  • Loading branch information
12 people committed Jan 10, 2024
1 parent e5895f7 commit 0a35d6b
Show file tree
Hide file tree
Showing 246 changed files with 7,945 additions and 5,525 deletions.
2 changes: 1 addition & 1 deletion docs/6-contributing/04-writing-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The above example includes only the `indeterminate`, `checked` properties in the


## Documentation
The documentation for each component is automatically produced using the `custom-elements.json` file. Additionally, there is an `argTypes.ts` file located beside each `.stories.ts` file. It is generated during build time and contains extra properties that enhance the documentation beyond what is available in the `custom-elements.json` file. This file should not be edited directly, as it can only be modified by the `packages/playground/build-scripts-storybook/samples-prepare.js` script.
The documentation for each component is automatically produced using the `custom-elements.json` file. Additionally, there is an `argTypes.ts` file located beside each `.stories.ts` file. It is generated during build time and contains extra properties that enhance the documentation beyond what is available in the `custom-elements.json` file. This file should not be edited directly, as it can only be modified by the `packages/playground/build-scripts-storybook/samples-prepare.ts` script.

### Docs page
Every story has a `docs` page in the storybook's sidebar. Usually, this page is generated automatically by storybook but it can be customized by adding a `docs` property to the story parameters.
Expand Down
9 changes: 3 additions & 6 deletions packages/base/package-scripts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const stylesScript = resolve.sync("@ui5/webcomponents-base/lib/generate-styles/i
const versionScript = resolve.sync("@ui5/webcomponents-base/lib/generate-version-info/index.js");
const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js");
const esmAbsToRel = resolve.sync("@ui5/webcomponents-tools/lib/esm-abs-to-rel/index.js");
const preprocessJSDocScript = resolve.sync("@ui5/webcomponents-tools/lib/jsdoc/preprocess.js");

const LIB = path.join(__dirname, `../tools/lib/`);

Expand Down Expand Up @@ -43,11 +42,9 @@ const scripts = {
generateStyles: `node "${stylesScript}"`,
generateTemplates: `mkdirp src/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/elements -o src/generated/templates`,
generateAPI: {
default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
prepare: `copy-and-watch "dist/**/*.js" jsdoc-dist/`,
preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/`,
jsdoc: `jsdoc -c "${LIB}/jsdoc/configTypescript.json"`,
cleanup: "rimraf jsdoc-dist/"
default: "nps generateAPI.generateCEM generateAPI.validateCEM",
generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`,
validateCEM: `node "${LIB}/cem/validate.js"`,
},
watch: {
default: 'concurrently "nps watch.src" "nps watch.styles"',
Expand Down
21 changes: 5 additions & 16 deletions packages/base/src/MediaRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ DEAFULT_RANGE_SET.set("XL", [1440, Infinity]);
/**
* Enumeration containing the names and settings of predefined screen width media query range sets.
*
* @namespace
* @name MediaRange.RANGESETS
* @public
*/
enum RANGESETS {
Expand All @@ -27,7 +25,6 @@ DEAFULT_RANGE_SET.set("XL", [1440, Infinity]);
* <li><code>"XL"</code>: For screens greater than or equal to 1440 pixels.</li>
* </ul>
*
* @name MediaRange.RANGESETS.RANGE_4STEPS
* @public
*/
RANGE_4STEPS = "4Step",
Expand All @@ -49,10 +46,9 @@ DEAFULT_RANGE_SET.set("XL", [1440, Infinity]);
* <li><code>"Large"</code>: For screens greater than or equal to 400 pixels.</li>
* </ul>
*
* @param {string} name The name of the range set to be initialized.
* @param name The name of the range set to be initialized.
* The name must be a valid id and consist only of letters and numeric digits.
* @param {Range} [range] The given range set.
* @name MediaRange.initRangeSet
* @param range The given range set.
*/
const initRangeSet = (name: string, range: Range) => {
mediaRanges.set(name, range);
Expand All @@ -64,13 +60,10 @@ const initRangeSet = (name: string, range: Range) => {
* If the optional parameter <code>width</code> is given, the active range will be determined for that width,
* otherwise it is determined for the current window size.
*
* @param {string} name The name of the range set. The range set must be initialized beforehand ({@link MediaRange.initRangeSet})
* @param {number} [width] An optional width, based on which the range should be determined;
* @param name The name of the range set. The range set must be initialized beforehand ({@link MediaRange.initRangeSet})
* @param [width] An optional width, based on which the range should be determined;
* If <code>width</code> is not provided, the window size will be used.
* @returns {string} The name of the current active interval of the range set.
*
* @name MediaRange.getCurrentRange
* @function
* @returns The name of the current active interval of the range set.
* @public
*/
const getCurrentRange = (name: string, width = window.innerWidth): string => {
Expand All @@ -94,11 +87,7 @@ const getCurrentRange = (name: string, width = window.innerWidth): string => {

/**
* API for screen width changes.
*
* @namespace
* @name MediaRange
*/

const MediaRange = {
RANGESETS,
initRangeSet,
Expand Down
6 changes: 2 additions & 4 deletions packages/base/src/StaticAreaItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ const pureTagName = "ui5-static-area-item";
const popupIntegrationAttr = "data-sap-ui-integration-popup-content";

/**
*
* @class
* @author SAP SE
* @private
*/
class StaticAreaItem extends HTMLElement {
Expand All @@ -26,7 +24,7 @@ class StaticAreaItem extends HTMLElement {
}

/**
* @param {UI5Element} ownerElement the UI5Element instance that owns this static area item
* @param ownerElement the UI5Element instance that owns this static area item
*/
setOwnerElement(ownerElement: UI5Element) {
this.ownerElement = ownerElement;
Expand Down Expand Up @@ -83,8 +81,8 @@ class StaticAreaItem extends HTMLElement {
}

/**
* @protected
* Returns reference to the DOM element where the current fragment is added.
* @protected
*/
async getDomRef() {
this.updateAdditionalProperties();
Expand Down

0 comments on commit 0a35d6b

Please sign in to comment.