Skip to content

Commit

Permalink
chore: add since tag to new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Jan 14, 2021
1 parent d938e43 commit e59d59d
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 12 deletions.
3 changes: 3 additions & 0 deletions apis/conversion/src/export-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
* in the new model.
* @interface ExportFormat
* @experimental
* @since 1.1.0
* @property {(ExportDataDef[])=} data
* @property {object=} properties
*/

/**
* @experimental
* @since 1.1.0
* @interface ExportDataDef
* @property {qae.NxDimension[]} dimensions
* @property {qae.NxMeasure[]} measures
Expand All @@ -22,6 +24,7 @@

/**
* @experimental
* @since 1.1.0
* @param {number} nDataGroups
* @return {ExportFormat}
*/
Expand Down
4 changes: 4 additions & 0 deletions apis/nucleus/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ function nuked(configuration = {}) {
* @param {string|LibraryField} fieldIdentifier Fieldname as a string or a Library dimension
* @returns {Promise<ListboxInstance>}
* @experimental
* @since 1.1.0
* @example
* const listbox = await n.listbox("MyField");
* listbox.mount(element, { title: "Hello Field"});
Expand All @@ -330,6 +331,7 @@ function nuked(configuration = {}) {
* @hideconstructor
* @alias ListboxInstance
* @experimental
* @since 1.1.0
*/
const fieldSels = {
fieldName,
Expand All @@ -343,6 +345,7 @@ function nuked(configuration = {}) {
* @param {boolean=} [options.search=true] To show the search bar
* @param {boolean=} [options.stateName="$"] Sets the state to make selections in
* @experimental
* @since 1.1.0
* @example
* listbox.mount(element);
*/
Expand All @@ -365,6 +368,7 @@ function nuked(configuration = {}) {
/**
* Unmounts the field listbox from the DOM.
* @experimental
* @since 1.1.0
* @example
* listbox.unmount();
*/
Expand Down
1 change: 1 addition & 0 deletions apis/nucleus/src/viz.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function viz({ model, halo, initialError, onDestroy = async () =>
/**
* Converts the visualization to a different registred type
* @experimental
* @since 1.1.0
* @param {string} newType - Which registered type to convert to
* @param {boolean=} forceUpdate - Whether to run setProperties or not, defaults to true.
* @returns {Promise<object>} Promise object that resolves to the full property tree of the converted visualizatiom
Expand Down
82 changes: 70 additions & 12 deletions apis/stardust/api-spec/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"returns": {
"type": "#/definitions/Embed"
},
"examples": ["import { embed } from '@nebula.js/stardust'\nconst n = embed(app);\nn.render({ id: 'abc' });"],
"examples": [
"import { embed } from '@nebula.js/stardust'\nconst n = embed(app);\nn.render({ id: 'abc' });"
],
"entries": {
"createConfiguration": {
"description": "Creates a new `embed` scope bound to the specified `configuration`.\n\nThe configuration is merged with all previous scopes.",
Expand Down Expand Up @@ -454,13 +456,17 @@
"type": "HTMLElement"
}
],
"examples": ["selections.mount(element);"]
"examples": [
"selections.mount(element);"
]
},
"unmount": {
"description": "Unmounts the app selection UI from the DOM.",
"kind": "function",
"params": [],
"examples": ["selections.unmount();"]
"examples": [
"selections.unmount();"
]
}
}
},
Expand Down Expand Up @@ -616,6 +622,9 @@
},
"createExportFormat": {
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -691,6 +700,9 @@
"listbox": {
"description": "Gets the listbox instance of the specified field",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -765,12 +777,17 @@
}
]
},
"examples": ["const selections = await n.selections();\nselections.mount(element);"]
"examples": [
"const selections = await n.selections();\nselections.mount(element);"
]
}
}
},
"ExportDataDef": {
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "interface",
"entries": {
"dimensions": {
Expand Down Expand Up @@ -808,6 +825,9 @@
"ExportFormat": {
"description": "Used for exporting and importing properties between backend models. An object that exports to\nExportFormat should put dimensions and measures inside one data group. If an object has two hypercubes\neach of the cubes should export dimensions and measures in two separate data groups.\nAn object that imports from this structure is responsible for putting the existing properties where they should be\nin the new model.",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "interface",
"entries": {
"data": {
Expand All @@ -826,6 +846,9 @@
"exportProperties": {
"description": "Exports properties for a chart with a hypercube.",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -946,6 +969,9 @@
"importProperties": {
"description": "Imports properties for a chart with a hypercube.",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -1007,6 +1033,9 @@
},
"ListboxInstance": {
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "class",
"constructor": {
"kind": "function",
Expand All @@ -1017,6 +1046,9 @@
"mount": {
"description": "Mounts the field as a listbox into the provided HTMLElement.",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -1051,18 +1083,31 @@
"optional": true,
"defaultValue": true,
"type": "boolean"
},
"stateName": {
"description": "Sets the state to make selections in",
"optional": true,
"defaultValue": false,
"type": "boolean"
}
}
}
],
"examples": ["listbox.mount(element);"]
"examples": [
"listbox.mount(element);"
]
},
"unmount": {
"description": "Unmounts the field listbox from the DOM.",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [],
"examples": ["listbox.unmount();"]
"examples": [
"listbox.unmount();"
]
}
}
},
Expand Down Expand Up @@ -1355,7 +1400,9 @@
"description": "The resolved color.",
"type": "string"
},
"examples": ["theme.getColorPickerColor({ index: 1 });\ntheme.getColorPickerColor({ color: 'red' });"]
"examples": [
"theme.getColorPickerColor({ index: 1 });\ntheme.getColorPickerColor({ color: 'red' });"
]
},
"getContrastingColorTo": {
"description": "Get the best contrasting color against the specified `color`.\nThis is typically used to find a suitable text color for a label placed on an arbitrarily colored background.\n\nThe returned colors are derived from the theme.",
Expand All @@ -1371,7 +1418,9 @@
"description": "- The color that has the best contrast against the specified `color`.",
"type": "string"
},
"examples": ["theme.getContrastingColorTo('#400');"]
"examples": [
"theme.getContrastingColorTo('#400');"
]
},
"getDataColorPalettes": {
"kind": "function",
Expand Down Expand Up @@ -1434,7 +1483,9 @@
"description": "The style value",
"type": "string"
},
"examples": ["theme.getStyle('object', 'title.main', 'fontSize'));\ntheme.getStyle('', '', 'fontSize'));"]
"examples": [
"theme.getStyle('object', 'title.main', 'fontSize'));\ntheme.getStyle('', '', 'fontSize'));"
]
}
},
"definitions": {
Expand Down Expand Up @@ -1686,6 +1737,9 @@
"convertTo": {
"description": "Converts the visualization to a different registred type",
"stability": "experimental",
"availability": {
"since": "1.1.0"
},
"kind": "function",
"params": [
{
Expand Down Expand Up @@ -1717,14 +1771,18 @@
"description": "Destroys the visualization and removes if from the the DOM.",
"kind": "function",
"params": [],
"examples": ["const viz = await embed(app).render({\n element,\n id: 'abc'\n});\nviz.destroy();"]
"examples": [
"const viz = await embed(app).render({\n element,\n id: 'abc'\n});\nviz.destroy();"
]
},
"id": {
"description": "The id of this visualization's generic object.",
"type": "string"
}
},
"examples": ["const viz = await embed(app).render({\n element,\n type: 'barchart'\n});\nviz.destroy();"]
"examples": [
"const viz = await embed(app).render({\n element,\n type: 'barchart'\n});\nviz.destroy();"
]
},
"VizElement": {
"extends": [
Expand All @@ -1751,4 +1809,4 @@
}
}
}
}
}
2 changes: 2 additions & 0 deletions apis/supernova/src/qae.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const noop = () => {};
* @function importProperties
* @description Imports properties for a chart with a hypercube.
* @experimental
* @since 1.1.0
* @param {Object} args
* @param {ExportFormat} args.exportFormat The export object which is the output of exportProperties.
* @param {Object=} args.initialProperties Initial properties of the target chart.
Expand All @@ -17,6 +18,7 @@ const noop = () => {};
* @function exportProperties
* @description Exports properties for a chart with a hypercube.
* @experimental
* @since 1.1.0
* @param {Object} args
* @param {Object} args.propertyTree
* @param {string} args.hypercubePath Reference to the qHyperCubeDef.
Expand Down

0 comments on commit e59d59d

Please sign in to comment.