Skip to content

Commit

Permalink
chore: specs and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Jan 15, 2024
1 parent 2e2e2af commit fcd25e3
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
uses: qlik-oss/sn-gh-workflows/.github/workflows/build.yaml@v1
uses: qlik-oss/sn-gh-workflows/.github/workflows/build.yaml@v2
secrets: inherit
with:
release: ${{ inputs.release || false}}
Expand Down
48 changes: 48 additions & 0 deletions api-spec/props.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const path = require("path");

const pkg = require(path.resolve(__dirname, "../package.json")); // eslint-disable-line

module.exports = {
fromJsdoc: {
glob: ["./src/ext/initial-properties.js"],
api: {
stability: "stable",
visibility: "public",
properties: {
"x-qlik-visibility": "public",
},
name: `${pkg.name}:properties`,
version: pkg.version,
description: "Variance waterfall generic object definition",
},
output: {
sort: {
alpha: false,
},
file: "./api-specifications/properties.json",
},
parse: {
types: {
GenericObjectProperties: {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FGenericObjectProperties",
},
undefined: {},
"EngineAPI.ValueExpression": {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FValueExpression",
},
"EngineAPI.HyperCubeDef": {
url: "https://qlik.dev/apis/json-rpc/qix/schemas#%23%2Fdefinitions%2Fschemas%2Fentries%2FListObjectDef",
},
},
},
},
toDts: {
spec: "./api-specifications/properties.json",
output: {
file: "./types/index.d.ts",
},
dependencies: {
references: ["qlik-engineapi"],
},
},
};
72 changes: 72 additions & 0 deletions api-specifications/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"scriptappy": "1.1.0",
"info": {
"name": "@nebula/sn-variance-waterfall:properties",
"description": "Variance waterfall generic object definition",
"version": "0.0.1",
"license": "MIT",
"stability": "stable",
"x-qlik-visibility": "public"
},
"entries": {
"properties": {
"extends": [
{
"type": "GenericObjectProperties"
}
],
"entries": {
"version": {
"description": "Current version of this generic object definition",
"type": "string"
},
"qHyperCubeDef": {
"description": "Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.",
"extends": [
{
"type": "EngineAPI.HyperCubeDef"
}
],
"kind": "object"
},
"showTitles": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"title": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"subtitle": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"footnote": {
"optional": true,
"defaultValue": "",
"type": "string"
},
"disableNavMenu": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"showDetails": {
"optional": true,
"defaultValue": true,
"type": "boolean"
},
"showDetailsExpression": {
"optional": true,
"defaultValue": false,
"type": "boolean"
}
},
"kind": "object"
}
},
"definitions": {}
}
6 changes: 5 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"module": "esm/index.js",
"peerDependencies": {
"@nebula.js/stardust": ">=2.0.0"
"@nebula.js/stardust": ">=4.6.1",
"hammerjs": "^2.0.8",
"picasso-plugin-hammer": ">=2.2.5",
"picasso-plugin-q": ">=2.2.5",
"picasso.js": ">=2.2.5"
}
}
12 changes: 10 additions & 2 deletions src/ext/initial-properties.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
// TODO: Fill in the rest of the json spec
export default {
/**
* @type {object}
* @extends {GenericObjectProperties}
* @entry
*/
const properties = {
/**
* Current version of this generic object definition
* @type {string}
*/
version: process.env.PACKAGE_VERSION,
/**
* @typedef
* Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.
* @extends {EngineAPI.HyperCubeDef}
*/
qHyperCubeDef: {
qDimensions: [],
Expand Down Expand Up @@ -105,3 +111,5 @@ export default {
dock: "near",
},
};

export default properties;
28 changes: 0 additions & 28 deletions src/old_index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/utils/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function init({
const chart = pic.chart({
element,
updated: () => {
//$scope.updated = true; // NEED TO CHECK WHAT THESE ARE FOR?
//$scope.updated = true; // TODO: NEED TO CHECK WHAT THESE ARE FOR?
},
beforeUpdated: () => {
//$scope.updated = false;
Expand Down

0 comments on commit fcd25e3

Please sign in to comment.