fix: leave freqmode alone (#1026)

* feat: enable frequency count property

* fix: refactor frequency count

* fix: refactor & change zero freq text

* fix: revert the frequencyMode changes

Co-authored-by: costa <costantino.marullo@qlik.com>
This commit is contained in:
Johan Lahti
2022-12-07 16:22:57 +01:00
committed by GitHub
parent 179ed920bc
commit f644c35e1b
3 changed files with 181 additions and 181 deletions

View File

@@ -417,7 +417,7 @@ function nuked(configuration = {}) {
* @param {string=} options.title Custom title, defaults to fieldname
* @param {Direction=} [options.direction=ltr] Direction setting ltr|rtl.
* @param {ListLayout=} [options.listLayout=vertical] Layout direction vertical|horizontal
* @param {FrequencyMode=} [options.frequencyMode=N] Show frequency none|value|percent|relative
* @param {FrequencyMode=} [options.frequencyMode=none] Show frequency none|value|percent|relative
* @param {boolean=} [options.histogram=false] Show histogram bar
* @param {SearchMode=} [options.search=true] Show the search bar permanently or using the toggle button: false|true|toggle|toggleShow
* @param {boolean=} [options.toolbar=true] Show the toolbar

View File

@@ -889,7 +889,7 @@
"frequencyMode": {
"description": "Show frequency none|value|percent|relative",
"optional": true,
"defaultValue": "N",
"defaultValue": "none",
"type": "#/definitions/FrequencyMode"
},
"histogram": {
@@ -1068,115 +1068,6 @@
}
}
},
"Field": {
"kind": "alias",
"items": {
"kind": "union",
"items": [
{
"type": "string"
},
{
"type": "EngineAPI.INxDimension"
},
{
"type": "EngineAPI.INxMeasure"
},
{
"type": "#/definitions/LibraryField"
}
]
}
},
"CreateConfig": {
"description": "Rendering configuration for creating and rendering a new object",
"extends": [
{
"type": "#/definitions/BaseConfig"
}
],
"kind": "interface",
"entries": {
"type": {
"type": "string"
},
"version": {
"optional": true,
"type": "string"
},
"fields": {
"optional": true,
"kind": "union",
"items": [
{
"kind": "array",
"items": {
"type": "#/definitions/Field"
}
}
]
},
"properties": {
"optional": true,
"type": "EngineAPI.IGenericObjectProperties"
}
}
},
"BaseConfig": {
"description": "Basic rendering configuration for rendering an object",
"kind": "interface",
"entries": {
"element": {
"type": "HTMLElement"
},
"options": {
"optional": true,
"type": "object"
},
"plugins": {
"optional": true,
"kind": "array",
"items": {
"type": "#/definitions/Plugin"
}
}
}
},
"GetConfig": {
"description": "Rendering configuration for rendering an existing object",
"extends": [
{
"type": "#/definitions/BaseConfig"
}
],
"kind": "interface",
"entries": {
"id": {
"type": "string"
}
}
},
"LibraryField": {
"kind": "interface",
"entries": {
"qLibraryId": {
"type": "string"
},
"type": {
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dimension'"
},
{
"kind": "literal",
"value": "'measure'"
}
]
}
}
},
"AppSelections": {
"kind": "class",
"constructor": {
@@ -1374,6 +1265,142 @@
}
}
},
"Field": {
"kind": "alias",
"items": {
"kind": "union",
"items": [
{
"type": "string"
},
{
"type": "EngineAPI.INxDimension"
},
{
"type": "EngineAPI.INxMeasure"
},
{
"type": "#/definitions/LibraryField"
}
]
}
},
"CreateConfig": {
"description": "Rendering configuration for creating and rendering a new object",
"extends": [
{
"type": "#/definitions/BaseConfig"
}
],
"kind": "interface",
"entries": {
"type": {
"type": "string"
},
"version": {
"optional": true,
"type": "string"
},
"fields": {
"optional": true,
"kind": "union",
"items": [
{
"kind": "array",
"items": {
"type": "#/definitions/Field"
}
}
]
},
"properties": {
"optional": true,
"type": "EngineAPI.IGenericObjectProperties"
}
}
},
"BaseConfig": {
"description": "Basic rendering configuration for rendering an object",
"kind": "interface",
"entries": {
"element": {
"type": "HTMLElement"
},
"options": {
"optional": true,
"type": "object"
},
"plugins": {
"optional": true,
"kind": "array",
"items": {
"type": "#/definitions/Plugin"
}
}
}
},
"GetConfig": {
"description": "Rendering configuration for rendering an existing object",
"extends": [
{
"type": "#/definitions/BaseConfig"
}
],
"kind": "interface",
"entries": {
"id": {
"type": "string"
}
}
},
"LibraryField": {
"kind": "interface",
"entries": {
"qLibraryId": {
"type": "string"
},
"type": {
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dimension'"
},
{
"kind": "literal",
"value": "'measure'"
}
]
}
}
},
"Plugin": {
"description": "An object literal containing meta information about the plugin and a function containing the plugin implementation.",
"stability": "experimental",
"availability": {
"since": "1.2.0"
},
"kind": "interface",
"entries": {
"info": {
"description": "Object that can hold various meta info about the plugin",
"kind": "object",
"entries": {
"name": {
"description": "The name of the plugin",
"type": "string"
}
}
},
"fn": {
"description": "The implementation of the plugin. Input and return value is up to the plugin implementation to decide based on its purpose.",
"type": "function"
}
},
"examples": [
"const plugin = {\n info: {\n name: \"example-plugin\",\n type: \"meta-type\",\n },\n fn: () => {\n // Plugin implementation goes here\n }\n};"
]
},
"LoadType": {
"kind": "interface",
"params": [
@@ -1419,33 +1446,6 @@
}
}
},
"Plugin": {
"description": "An object literal containing meta information about the plugin and a function containing the plugin implementation.",
"stability": "experimental",
"availability": {
"since": "1.2.0"
},
"kind": "interface",
"entries": {
"info": {
"description": "Object that can hold various meta info about the plugin",
"kind": "object",
"entries": {
"name": {
"description": "The name of the plugin",
"type": "string"
}
}
},
"fn": {
"description": "The implementation of the plugin. Input and return value is up to the plugin implementation to decide based on its purpose.",
"type": "function"
}
},
"examples": [
"const plugin = {\n info: {\n name: \"example-plugin\",\n type: \"meta-type\",\n },\n fn: () => {\n // Plugin implementation goes here\n }\n};"
]
},
"ActionToolbarElement": {
"availability": {
"since": "2.1.0"

View File

@@ -324,39 +324,6 @@ declare namespace stardust {
isEnabled(flag: string): boolean;
}
type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
/**
* Rendering configuration for creating and rendering a new object
*/
interface CreateConfig extends stardust.BaseConfig{
type: string;
version?: string;
fields?: stardust.Field[];
properties?: EngineAPI.IGenericObjectProperties;
}
/**
* Basic rendering configuration for rendering an object
*/
interface BaseConfig {
element: HTMLElement;
options?: object;
plugins?: stardust.Plugin[];
}
/**
* Rendering configuration for rendering an existing object
*/
interface GetConfig extends stardust.BaseConfig{
id: string;
}
interface LibraryField {
qLibraryId: string;
type: "dimension" | "measure";
}
class AppSelections {
constructor();
@@ -417,6 +384,49 @@ declare namespace stardust {
}
type Field = string | EngineAPI.INxDimension | EngineAPI.INxMeasure | stardust.LibraryField;
/**
* Rendering configuration for creating and rendering a new object
*/
interface CreateConfig extends stardust.BaseConfig{
type: string;
version?: string;
fields?: stardust.Field[];
properties?: EngineAPI.IGenericObjectProperties;
}
/**
* Basic rendering configuration for rendering an object
*/
interface BaseConfig {
element: HTMLElement;
options?: object;
plugins?: stardust.Plugin[];
}
/**
* Rendering configuration for rendering an existing object
*/
interface GetConfig extends stardust.BaseConfig{
id: string;
}
interface LibraryField {
qLibraryId: string;
type: "dimension" | "measure";
}
/**
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
*/
interface Plugin {
info: {
name: string;
};
fn: ()=>void;
}
interface LoadType {
(type: {
name: string;
@@ -431,16 +441,6 @@ declare namespace stardust {
meta?: object;
}
/**
* An object literal containing meta information about the plugin and a function containing the plugin implementation.
*/
interface Plugin {
info: {
name: string;
};
fn: ()=>void;
}
interface ActionToolbarElement extends HTMLElement{
className: "njs-action-toolbar-popover";
}