@itwin/grouping-mapping-widget 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/formula/FormulaTokensValidator.d.ts +1 -1
- package/lib/cjs/formula/FormulaTokensValidator.js +3 -1
- package/lib/cjs/formula/FormulaTokensValidator.js.map +1 -1
- package/lib/cjs/formula/FormulaValidator.d.ts +1 -1
- package/lib/cjs/formula/FormulaValidator.js +2 -2
- package/lib/cjs/formula/FormulaValidator.js.map +1 -1
- package/lib/cjs/grouping-mapping-widget.d.ts +4 -0
- package/lib/cjs/grouping-mapping-widget.js +6 -1
- package/lib/cjs/grouping-mapping-widget.js.map +1 -1
- package/lib/cjs/widget/GroupingMappingWidget.d.ts +3 -1
- package/lib/cjs/widget/GroupingMappingWidget.js +3 -2
- package/lib/cjs/widget/GroupingMappingWidget.js.map +1 -1
- package/lib/cjs/widget/IMappingClient.d.ts +327 -0
- package/lib/cjs/widget/IMappingClient.js +7 -0
- package/lib/cjs/widget/IMappingClient.js.map +1 -0
- package/lib/cjs/widget/components/BlockingOverlay.d.ts +7 -0
- package/lib/cjs/widget/components/BlockingOverlay.js +21 -0
- package/lib/cjs/widget/components/BlockingOverlay.js.map +1 -0
- package/lib/cjs/widget/components/BlockingOverlay.scss +26 -0
- package/lib/cjs/widget/components/CalculatedPropertyAction.js +3 -4
- package/lib/cjs/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/CalculatedPropertyTable.js +2 -3
- package/lib/cjs/widget/components/CalculatedPropertyTable.js.map +1 -1
- package/lib/cjs/widget/components/ConfirmMappingsImport.js +2 -3
- package/lib/cjs/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/cjs/widget/components/CustomCalculationAction.js +4 -5
- package/lib/cjs/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/cjs/widget/components/CustomCalculationTable.js +2 -3
- package/lib/cjs/widget/components/CustomCalculationTable.js.map +1 -1
- package/lib/cjs/widget/components/GroupAction.d.ts +2 -1
- package/lib/cjs/widget/components/GroupAction.js +15 -10
- package/lib/cjs/widget/components/GroupAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupPropertyAction.js +5 -7
- package/lib/cjs/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/cjs/widget/components/GroupPropertyTable.js +2 -3
- package/lib/cjs/widget/components/GroupPropertyTable.js.map +1 -1
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js +1 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContainer.js.map +1 -1
- package/lib/cjs/widget/components/GroupQueryBuilderContext.d.ts +1 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContext.js +1 -0
- package/lib/cjs/widget/components/GroupQueryBuilderContext.js.map +1 -1
- package/lib/cjs/widget/components/GroupTile.d.ts +13 -0
- package/lib/cjs/widget/components/GroupTile.js +18 -0
- package/lib/cjs/widget/components/GroupTile.js.map +1 -0
- package/lib/cjs/widget/components/GroupTile.scss +32 -0
- package/lib/cjs/widget/components/Grouping.js +224 -164
- package/lib/cjs/widget/components/Grouping.js.map +1 -1
- package/lib/cjs/widget/components/Grouping.scss +39 -4
- package/lib/cjs/widget/components/GroupingMapping.d.ts +15 -3
- package/lib/cjs/widget/components/GroupingMapping.js +29 -5
- package/lib/cjs/widget/components/GroupingMapping.js.map +1 -1
- package/lib/cjs/widget/components/Mapping.js +33 -12
- package/lib/cjs/widget/components/Mapping.js.map +1 -1
- package/lib/cjs/widget/components/MappingAction.js +10 -5
- package/lib/cjs/widget/components/MappingAction.js.map +1 -1
- package/lib/cjs/widget/components/PropertyMenu.js +26 -19
- package/lib/cjs/widget/components/PropertyMenu.js.map +1 -1
- package/lib/cjs/widget/components/QueryBuilder.d.ts +11 -5
- package/lib/cjs/widget/components/QueryBuilder.js +229 -141
- package/lib/cjs/widget/components/QueryBuilder.js.map +1 -1
- package/lib/cjs/widget/components/SelectMappings.js +5 -6
- package/lib/cjs/widget/components/SelectMappings.js.map +1 -1
- package/lib/cjs/widget/components/property-grid/PropertyView.js +5 -0
- package/lib/cjs/widget/components/property-grid/PropertyView.js.map +1 -1
- package/lib/cjs/widget/components/utils.d.ts +6 -0
- package/lib/cjs/widget/components/utils.js +9 -1
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +12 -3
- package/lib/cjs/widget/components/viewerUtils.d.ts +19 -0
- package/lib/cjs/widget/components/viewerUtils.js +224 -3
- package/lib/cjs/widget/components/viewerUtils.js.map +1 -1
- package/lib/cjs/widget/hooks/useFormulaValidation.d.ts +1 -1
- package/lib/cjs/widget/hooks/useFormulaValidation.js +5 -5
- package/lib/cjs/widget/hooks/useFormulaValidation.js.map +1 -1
- package/lib/esm/formula/FormulaTokensValidator.d.ts +1 -1
- package/lib/esm/formula/FormulaTokensValidator.js +3 -1
- package/lib/esm/formula/FormulaTokensValidator.js.map +1 -1
- package/lib/esm/formula/FormulaValidator.d.ts +1 -1
- package/lib/esm/formula/FormulaValidator.js +2 -2
- package/lib/esm/formula/FormulaValidator.js.map +1 -1
- package/lib/esm/grouping-mapping-widget.d.ts +4 -0
- package/lib/esm/grouping-mapping-widget.js +4 -0
- package/lib/esm/grouping-mapping-widget.js.map +1 -1
- package/lib/esm/widget/GroupingMappingWidget.d.ts +3 -1
- package/lib/esm/widget/GroupingMappingWidget.js +3 -2
- package/lib/esm/widget/GroupingMappingWidget.js.map +1 -1
- package/lib/esm/widget/IMappingClient.d.ts +327 -0
- package/lib/esm/widget/IMappingClient.js +6 -0
- package/lib/esm/widget/IMappingClient.js.map +1 -0
- package/lib/esm/widget/components/BlockingOverlay.d.ts +7 -0
- package/lib/esm/widget/components/BlockingOverlay.js +14 -0
- package/lib/esm/widget/components/BlockingOverlay.js.map +1 -0
- package/lib/esm/widget/components/BlockingOverlay.scss +26 -0
- package/lib/esm/widget/components/CalculatedPropertyAction.js +4 -5
- package/lib/esm/widget/components/CalculatedPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/CalculatedPropertyTable.js +3 -4
- package/lib/esm/widget/components/CalculatedPropertyTable.js.map +1 -1
- package/lib/esm/widget/components/ConfirmMappingsImport.js +3 -4
- package/lib/esm/widget/components/ConfirmMappingsImport.js.map +1 -1
- package/lib/esm/widget/components/CustomCalculationAction.js +5 -6
- package/lib/esm/widget/components/CustomCalculationAction.js.map +1 -1
- package/lib/esm/widget/components/CustomCalculationTable.js +3 -4
- package/lib/esm/widget/components/CustomCalculationTable.js.map +1 -1
- package/lib/esm/widget/components/GroupAction.d.ts +2 -1
- package/lib/esm/widget/components/GroupAction.js +17 -12
- package/lib/esm/widget/components/GroupAction.js.map +1 -1
- package/lib/esm/widget/components/GroupPropertyAction.js +6 -8
- package/lib/esm/widget/components/GroupPropertyAction.js.map +1 -1
- package/lib/esm/widget/components/GroupPropertyTable.js +3 -4
- package/lib/esm/widget/components/GroupPropertyTable.js.map +1 -1
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js +1 -0
- package/lib/esm/widget/components/GroupQueryBuilderContainer.js.map +1 -1
- package/lib/esm/widget/components/GroupQueryBuilderContext.d.ts +1 -0
- package/lib/esm/widget/components/GroupQueryBuilderContext.js +1 -0
- package/lib/esm/widget/components/GroupQueryBuilderContext.js.map +1 -1
- package/lib/esm/widget/components/GroupTile.d.ts +13 -0
- package/lib/esm/widget/components/GroupTile.js +11 -0
- package/lib/esm/widget/components/GroupTile.js.map +1 -0
- package/lib/esm/widget/components/GroupTile.scss +32 -0
- package/lib/esm/widget/components/Grouping.js +230 -170
- package/lib/esm/widget/components/Grouping.js.map +1 -1
- package/lib/esm/widget/components/Grouping.scss +39 -4
- package/lib/esm/widget/components/GroupingMapping.d.ts +15 -3
- package/lib/esm/widget/components/GroupingMapping.js +27 -4
- package/lib/esm/widget/components/GroupingMapping.js.map +1 -1
- package/lib/esm/widget/components/Mapping.js +35 -14
- package/lib/esm/widget/components/Mapping.js.map +1 -1
- package/lib/esm/widget/components/MappingAction.js +12 -7
- package/lib/esm/widget/components/MappingAction.js.map +1 -1
- package/lib/esm/widget/components/PropertyMenu.js +28 -21
- package/lib/esm/widget/components/PropertyMenu.js.map +1 -1
- package/lib/esm/widget/components/QueryBuilder.d.ts +11 -5
- package/lib/esm/widget/components/QueryBuilder.js +230 -142
- package/lib/esm/widget/components/QueryBuilder.js.map +1 -1
- package/lib/esm/widget/components/SelectMappings.js +6 -7
- package/lib/esm/widget/components/SelectMappings.js.map +1 -1
- package/lib/esm/widget/components/property-grid/PropertyView.js +5 -0
- package/lib/esm/widget/components/property-grid/PropertyView.js.map +1 -1
- package/lib/esm/widget/components/utils.d.ts +6 -0
- package/lib/esm/widget/components/utils.js +6 -0
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +12 -3
- package/lib/esm/widget/components/viewerUtils.d.ts +19 -0
- package/lib/esm/widget/components/viewerUtils.js +207 -3
- package/lib/esm/widget/components/viewerUtils.js.map +1 -1
- package/lib/esm/widget/hooks/useFormulaValidation.d.ts +1 -1
- package/lib/esm/widget/hooks/useFormulaValidation.js +5 -5
- package/lib/esm/widget/hooks/useFormulaValidation.js.map +1 -1
- package/package.json +30 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Token } from "./InfixToPostfixConverter";
|
|
2
2
|
import type { Queue } from "./Queue";
|
|
3
3
|
import type { PropertyMap } from "./Types";
|
|
4
|
-
export declare function validateTokens(tokens: Queue<Token>, properties: PropertyMap): string;
|
|
4
|
+
export declare function validateTokens(formulaName: string, tokens: Queue<Token>, properties: PropertyMap): string;
|
|
5
5
|
//# sourceMappingURL=FormulaTokensValidator.d.ts.map
|
|
@@ -21,7 +21,7 @@ function isNumericalConstant(name) {
|
|
|
21
21
|
"sqrt2",
|
|
22
22
|
].includes(name.toLowerCase());
|
|
23
23
|
}
|
|
24
|
-
function validateTokens(tokens, properties) {
|
|
24
|
+
function validateTokens(formulaName, tokens, properties) {
|
|
25
25
|
if (tokens.length === 0)
|
|
26
26
|
return "Formula cannot be empty.";
|
|
27
27
|
const argStack = new Stack_1.Stack();
|
|
@@ -46,6 +46,8 @@ function validateTokens(tokens, properties) {
|
|
|
46
46
|
argStack.push("number");
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
+
if (token.value === formulaName)
|
|
50
|
+
return "Formula cannot reference itself.";
|
|
49
51
|
const prop = properties[token.value];
|
|
50
52
|
if (!prop)
|
|
51
53
|
return `Variable "${token.value}" is not available.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormulaTokensValidator.js","sourceRoot":"","sources":["../../../src/formula/FormulaTokensValidator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,uEAAsF;AACtF,yEAA+G;AAE/G,uEAAsD;AAEtD,mCAAgC;AAGhC,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO;QACL,GAAG;QACH,KAAK;QACL,MAAM;QACN,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,SAAS;QACT,OAAO;KACR,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,cAAc,CAAC,MAAoB,EAAE,UAAuB;IAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QACrB,OAAO,0BAA0B,CAAC;IAEpC,MAAM,QAAQ,GAAG,IAAI,aAAK,EAAoB,CAAC;IAE/C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAG,CAAC;QAEhC,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,mCAAS,CAAC,MAAM;gBACnB,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACxB,MAAM;YACR,KAAK,mCAAS,CAAC,MAAM;gBACnB,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACxB,MAAM;YACR,KAAK,mCAAS,CAAC,OAAO;gBAC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a,KAAK,CAAC,KAAK,iBAAiB,cAAc,CAAC,YAAY,EAAE,CAAC;;oBAE9E,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,KAAM,CAAC,CAAC;gBAEvC,MAAM;SACT;KACF;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO,qBAAqB,CAAC;KAC9B;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;IAClC,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,WAAW,EAAE;QAC7C,OAAO,oCAAoC,CAAC;KAC7C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AArHD,wCAqHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { getFormulaFunctionReturnType, getFunction } from \"./FormulaFunctionProvider\";\nimport { getOperatorArgumentCountBounds, getOperatorReturnType, isOperator } from \"./FormulaOperatorsProvider\";\nimport type { Token } from \"./InfixToPostfixConverter\";\nimport { TokenType } from \"./InfixToPostfixConverter\";\nimport type { Queue } from \"./Queue\";\nimport { Stack } from \"./Stack\";\nimport type { PossibleDataType, PropertyMap } from \"./Types\";\n\nfunction isNumericalConstant(name: string): boolean {\n return [\n \"e\",\n \"ln2\",\n \"ln10\",\n \"log2e\",\n \"log10e\",\n \"pi\",\n \"sqrt1_2\",\n \"sqrt2\",\n ].includes(name.toLowerCase());\n}\n\nexport function validateTokens(tokens: Queue<Token>, properties: PropertyMap): string {\n if (tokens.length === 0)\n return \"Formula cannot be empty.\";\n\n const argStack = new Stack<PossibleDataType>();\n\n while (tokens.length > 0) {\n const token = tokens.dequeue()!;\n\n switch (token.type) {\n case TokenType.Number:\n argStack.push(\"number\");\n break;\n case TokenType.String:\n argStack.push(\"string\");\n break;\n case TokenType.Boolean:\n argStack.push(\"boolean\");\n break;\n case TokenType.Null:\n argStack.push(\"undefined\");\n break;\n case TokenType.Variable:\n const isConstant = isNumericalConstant(token.value);\n if (isConstant) {\n argStack.push(\"number\");\n } else {\n const prop = properties[token.value];\n if (!prop)\n return `Variable \"${token.value}\" is not available.`;\n argStack.push(prop);\n }\n break;\n case TokenType.Operator:\n if (!isOperator(token.value))\n return `Operator \"${token.value}\" is not supported.`;\n\n const operatorBounds = getOperatorArgumentCountBounds(token.value);\n if (!operatorBounds)\n return `Operator \"${token.value}\" is not supported.`;\n\n if (operatorBounds[0] === 2 && token.argCount === 1)\n return `Unary operator \"${token.value}\" is not supported.`;\n\n if (argStack.length < token.argCount) {\n return `Too few arguments given for ${token.argCount === 1 ? \"unary\" : \"binary\"} operator \"${token.value}\".`;\n }\n const opArgs = argStack.popN(token.argCount).reverse();\n let operationResult;\n if (opArgs.length === 1)\n operationResult = getOperatorReturnType(token.value, opArgs[0]);\n else if (opArgs.length === 2)\n operationResult = getOperatorReturnType(token.value, opArgs[0], opArgs[1]);\n else\n return `Operator \"${token.value}\" does not support ${token.argCount} operands.`;\n\n if (operationResult.errorMessage)\n return operationResult.errorMessage;\n else\n argStack.push(operationResult.value!);\n\n break;\n case TokenType.Function:\n const fnArg = getFunction(token.value);\n if (!fnArg)\n return `Function \"${token.value}\" is not supported.`;\n\n const fnArgBounds = fnArg.argumentCountBounds;\n if (fnArgBounds[0] === 0 && fnArgBounds[1] === 0 && token.argCount > 0) {\n return `Function \"${token.value}\" does not accept any arguments.`;\n } else if (fnArgBounds[1] === -1 && token.argCount < fnArgBounds[0]) {\n if (fnArgBounds[0] === 1) {\n return `Function \"${token.value}\" requires at least 1 argument.`;\n } else {\n if (token.argCount === 1) {\n return `Function \"${token.value}\" requires at least ${fnArgBounds[0]} arguments, but only 1 argument was given.`;\n } else {\n return `Function \"${token.value}\" requires at least ${fnArgBounds[0]} arguments, but only ${token.argCount} arguments were given.`;\n }\n }\n } else if (fnArgBounds[0] === fnArgBounds[1] && token.argCount !== fnArgBounds[0]) {\n if (fnArgBounds[0] === 1) {\n return `Function \"${token.value}\" requires exactly 1 argument, but ${token.argCount} arguments were given.`;\n } else {\n if (token.argCount === 1) {\n return `Function \"${token.value}\" requires exactly ${fnArgBounds[0]} arguments, but 1 argument was given.`;\n } else {\n return `Function \"${token.value}\" requires exactly ${fnArgBounds[0]} arguments, but ${token.argCount} arguments were given.`;\n }\n }\n }\n\n const fArgs = argStack.popN(token.argCount).reverse();\n if (fArgs.length < token.argCount) {\n return `Too few arguments given for function \"${token.value}\".`;\n }\n\n const functionResult = getFormulaFunctionReturnType(fnArg, fArgs);\n if (functionResult.errorMessage)\n return `Function \"${token.value}\" is invalid. ${functionResult.errorMessage}`;\n else\n argStack.push(functionResult.value!);\n\n break;\n }\n }\n\n if (argStack.length !== 1) {\n return \"Formula is invalid.\";\n }\n\n const resultType = argStack.pop();\n if (!resultType || resultType === \"undefined\") {\n return \"Formula cannot always return null.\";\n }\n\n return \"\";\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"FormulaTokensValidator.js","sourceRoot":"","sources":["../../../src/formula/FormulaTokensValidator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,uEAAsF;AACtF,yEAA+G;AAE/G,uEAAsD;AAEtD,mCAAgC;AAGhC,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO;QACL,GAAG;QACH,KAAK;QACL,MAAM;QACN,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,SAAS;QACT,OAAO;KACR,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AACjC,CAAC;AAED,SAAgB,cAAc,CAAC,WAAmB,EAAE,MAAoB,EAAE,UAAuB;IAC/F,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QACrB,OAAO,0BAA0B,CAAC;IAEpC,MAAM,QAAQ,GAAG,IAAI,aAAK,EAAoB,CAAC;IAE/C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,MAAM,KAAK,GAAG,M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B,CAAC;yBAC9H;qBACF;iBACF;gBAED,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC;gBACtD,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE;oBACjC,OAAO,yCAAyC,KAAK,CAAC,KAAK,IAAI,CAAC;iBACjE;gBAED,MAAM,cAAc,GAAG,sDAA4B,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAClE,IAAI,cAAc,CAAC,YAAY;oBAC7B,OAAO,aAAa,KAAK,CAAC,KAAK,iBAAiB,cAAc,CAAC,YAAY,EAAE,CAAC;;oBAE9E,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,KAAM,CAAC,CAAC;gBAEvC,MAAM;SACT;KACF;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO,qBAAqB,CAAC;KAC9B;IAED,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;IAClC,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,WAAW,EAAE;QAC7C,OAAO,oCAAoC,CAAC;KAC7C;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAzHD,wCAyHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { getFormulaFunctionReturnType, getFunction } from \"./FormulaFunctionProvider\";\nimport { getOperatorArgumentCountBounds, getOperatorReturnType, isOperator } from \"./FormulaOperatorsProvider\";\nimport type { Token } from \"./InfixToPostfixConverter\";\nimport { TokenType } from \"./InfixToPostfixConverter\";\nimport type { Queue } from \"./Queue\";\nimport { Stack } from \"./Stack\";\nimport type { PossibleDataType, PropertyMap } from \"./Types\";\n\nfunction isNumericalConstant(name: string): boolean {\n return [\n \"e\",\n \"ln2\",\n \"ln10\",\n \"log2e\",\n \"log10e\",\n \"pi\",\n \"sqrt1_2\",\n \"sqrt2\",\n ].includes(name.toLowerCase());\n}\n\nexport function validateTokens(formulaName: string, tokens: Queue<Token>, properties: PropertyMap): string {\n if (tokens.length === 0)\n return \"Formula cannot be empty.\";\n\n const argStack = new Stack<PossibleDataType>();\n\n while (tokens.length > 0) {\n const token = tokens.dequeue()!;\n\n switch (token.type) {\n case TokenType.Number:\n argStack.push(\"number\");\n break;\n case TokenType.String:\n argStack.push(\"string\");\n break;\n case TokenType.Boolean:\n argStack.push(\"boolean\");\n break;\n case TokenType.Null:\n argStack.push(\"undefined\");\n break;\n case TokenType.Variable:\n const isConstant = isNumericalConstant(token.value);\n if (isConstant) {\n argStack.push(\"number\");\n } else {\n if (token.value === formulaName)\n return \"Formula cannot reference itself.\";\n\n const prop = properties[token.value];\n if (!prop)\n return `Variable \"${token.value}\" is not available.`;\n\n argStack.push(prop);\n }\n break;\n case TokenType.Operator:\n if (!isOperator(token.value))\n return `Operator \"${token.value}\" is not supported.`;\n\n const operatorBounds = getOperatorArgumentCountBounds(token.value);\n if (!operatorBounds)\n return `Operator \"${token.value}\" is not supported.`;\n\n if (operatorBounds[0] === 2 && token.argCount === 1)\n return `Unary operator \"${token.value}\" is not supported.`;\n\n if (argStack.length < token.argCount) {\n return `Too few arguments given for ${token.argCount === 1 ? \"unary\" : \"binary\"} operator \"${token.value}\".`;\n }\n const opArgs = argStack.popN(token.argCount).reverse();\n let operationResult;\n if (opArgs.length === 1)\n operationResult = getOperatorReturnType(token.value, opArgs[0]);\n else if (opArgs.length === 2)\n operationResult = getOperatorReturnType(token.value, opArgs[0], opArgs[1]);\n else\n return `Operator \"${token.value}\" does not support ${token.argCount} operands.`;\n\n if (operationResult.errorMessage)\n return operationResult.errorMessage;\n else\n argStack.push(operationResult.value!);\n\n break;\n case TokenType.Function:\n const fnArg = getFunction(token.value);\n if (!fnArg)\n return `Function \"${token.value}\" is not supported.`;\n\n const fnArgBounds = fnArg.argumentCountBounds;\n if (fnArgBounds[0] === 0 && fnArgBounds[1] === 0 && token.argCount > 0) {\n return `Function \"${token.value}\" does not accept any arguments.`;\n } else if (fnArgBounds[1] === -1 && token.argCount < fnArgBounds[0]) {\n if (fnArgBounds[0] === 1) {\n return `Function \"${token.value}\" requires at least 1 argument.`;\n } else {\n if (token.argCount === 1) {\n return `Function \"${token.value}\" requires at least ${fnArgBounds[0]} arguments, but only 1 argument was given.`;\n } else {\n return `Function \"${token.value}\" requires at least ${fnArgBounds[0]} arguments, but only ${token.argCount} arguments were given.`;\n }\n }\n } else if (fnArgBounds[0] === fnArgBounds[1] && token.argCount !== fnArgBounds[0]) {\n if (fnArgBounds[0] === 1) {\n return `Function \"${token.value}\" requires exactly 1 argument, but ${token.argCount} arguments were given.`;\n } else {\n if (token.argCount === 1) {\n return `Function \"${token.value}\" requires exactly ${fnArgBounds[0]} arguments, but 1 argument was given.`;\n } else {\n return `Function \"${token.value}\" requires exactly ${fnArgBounds[0]} arguments, but ${token.argCount} arguments were given.`;\n }\n }\n }\n\n const fArgs = argStack.popN(token.argCount).reverse();\n if (fArgs.length < token.argCount) {\n return `Too few arguments given for function \"${token.value}\".`;\n }\n\n const functionResult = getFormulaFunctionReturnType(fnArg, fArgs);\n if (functionResult.errorMessage)\n return `Function \"${token.value}\" is invalid. ${functionResult.errorMessage}`;\n else\n argStack.push(functionResult.value!);\n\n break;\n }\n }\n\n if (argStack.length !== 1) {\n return \"Formula is invalid.\";\n }\n\n const resultType = argStack.pop();\n if (!resultType || resultType === \"undefined\") {\n return \"Formula cannot always return null.\";\n }\n\n return \"\";\n}\n\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PropertyMap } from "./Types";
|
|
2
|
-
export declare function validateFormula(formula: string, properties: PropertyMap): string;
|
|
2
|
+
export declare function validateFormula(formulaName: string, formula: string, properties: PropertyMap): string;
|
|
3
3
|
//# sourceMappingURL=FormulaValidator.d.ts.map
|
|
@@ -9,7 +9,7 @@ const FormulaSplitter_1 = require("./FormulaSplitter");
|
|
|
9
9
|
const FormulaTokensValidator_1 = require("./FormulaTokensValidator");
|
|
10
10
|
const InfixToPostfixConverter_1 = require("./InfixToPostfixConverter");
|
|
11
11
|
const ParenthesisValidator_1 = require("./ParenthesisValidator");
|
|
12
|
-
function validateFormula(formula, properties) {
|
|
12
|
+
function validateFormula(formulaName, formula, properties) {
|
|
13
13
|
var _a;
|
|
14
14
|
const parenthesisState = ParenthesisValidator_1.validateParenthesis(formula);
|
|
15
15
|
if (ParenthesisValidator_1.ParenthesisState.NotClosed === parenthesisState) {
|
|
@@ -29,7 +29,7 @@ function validateFormula(formula, properties) {
|
|
|
29
29
|
if (undefined === postfixFormulaTokens.value) {
|
|
30
30
|
return (_a = postfixFormulaTokens.errorMessage) !== null && _a !== void 0 ? _a : "Unknown error";
|
|
31
31
|
}
|
|
32
|
-
return FormulaTokensValidator_1.validateTokens(postfixFormulaTokens.value, properties);
|
|
32
|
+
return FormulaTokensValidator_1.validateTokens(formulaName, postfixFormulaTokens.value, properties);
|
|
33
33
|
}
|
|
34
34
|
exports.validateFormula = validateFormula;
|
|
35
35
|
//# sourceMappingURL=FormulaValidator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormulaValidator.js","sourceRoot":"","sources":["../../../src/formula/FormulaValidator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,uDAAiD;AACjD,qEAA0D;AAC1D,uEAAkE;AAClE,iEAA+E;AAG/E,SAAgB,eAAe,CAAC,OAAe,EAAE,UAAuB;;
|
|
1
|
+
{"version":3,"file":"FormulaValidator.js","sourceRoot":"","sources":["../../../src/formula/FormulaValidator.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,uDAAiD;AACjD,qEAA0D;AAC1D,uEAAkE;AAClE,iEAA+E;AAG/E,SAAgB,eAAe,CAAC,WAAmB,EAAE,OAAe,EAAE,UAAuB;;IAC3F,MAAM,gBAAgB,GAAG,0CAAmB,CAAC,OAAO,CAAC,CAAC;IACtD,IAAI,uCAAgB,CAAC,SAAS,KAAK,gBAAgB,EAAE;QACnD,OAAO,0CAA0C,CAAC;KACnD;SAAM,IAAI,uCAAgB,CAAC,SAAS,KAAK,gBAAgB,EAAE;QAC1D,OAAO,0CAA0C,CAAC;KACnD;IAED,IAAI,kBAAkB,CAAC;IACvB,IAAI;QACF,kBAAkB,GAAG,8BAAY,CAAC,OAAO,CAAC,CAAC;KAC5C;IAAC,OAAO,EAAE,EAAE;QACX,OAAQ,EAAY,CAAC,OAAO,CAAC;KAC9B;IAED,MAAM,oBAAoB,GAAG,+CAAqB,CAAC,kBAAkB,CAAC,CAAC;IAEvE,IAAI,SAAS,KAAK,oBAAoB,CAAC,KAAK,EAAE;QAC5C,OAAO,MAAA,oBAAoB,CAAC,YAAY,mCAAI,eAAe,CAAC;KAC7D;IAED,OAAO,uCAAc,CAAC,WAAW,EAAE,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC7E,CAAC;AAtBD,0CAsBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { splitFormula } from \"./FormulaSplitter\";\nimport { validateTokens } from \"./FormulaTokensValidator\";\nimport { convertInfixToPostfix } from \"./InfixToPostfixConverter\";\nimport { ParenthesisState, validateParenthesis } from \"./ParenthesisValidator\";\nimport type { PropertyMap } from \"./Types\";\n\nexport function validateFormula(formulaName: string, formula: string, properties: PropertyMap): string {\n const parenthesisState = validateParenthesis(formula);\n if (ParenthesisState.NotClosed === parenthesisState) {\n return \"Opened but not closed parenthesis found.\";\n } else if (ParenthesisState.NotOpened === parenthesisState) {\n return \"Closed but not opened parenthesis found.\";\n }\n\n let infixFormulaTokens;\n try {\n infixFormulaTokens = splitFormula(formula);\n } catch (ex) {\n return (ex as Error).message;\n }\n\n const postfixFormulaTokens = convertInfixToPostfix(infixFormulaTokens);\n\n if (undefined === postfixFormulaTokens.value) {\n return postfixFormulaTokens.errorMessage ?? \"Unknown error\";\n }\n\n return validateTokens(formulaName, postfixFormulaTokens.value, properties);\n}\n"]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** UI Provider for iTwin Viewer Applications */
|
|
2
2
|
export * from "./widget/GroupingMappingWidget";
|
|
3
|
+
/** Interfaces for providing custom MappingClient */
|
|
4
|
+
export { createDefaultMappingClient, ClientPrefix } from "./widget/components/GroupingMapping";
|
|
5
|
+
export * from "@itwin/insights-client";
|
|
6
|
+
export * from "./widget/IMappingClient";
|
|
3
7
|
/** Internal components for custom UIs */
|
|
4
8
|
export { Mappings } from "./widget/components/Mapping";
|
|
5
9
|
export { Groupings } from "./widget/components/Grouping";
|
|
@@ -10,13 +10,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.PropertyMenu = exports.Groupings = exports.Mappings = void 0;
|
|
13
|
+
exports.PropertyMenu = exports.Groupings = exports.Mappings = exports.createDefaultMappingClient = void 0;
|
|
14
14
|
/*---------------------------------------------------------------------------------------------
|
|
15
15
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
16
16
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
17
17
|
*--------------------------------------------------------------------------------------------*/
|
|
18
18
|
/** UI Provider for iTwin Viewer Applications */
|
|
19
19
|
__exportStar(require("./widget/GroupingMappingWidget"), exports);
|
|
20
|
+
/** Interfaces for providing custom MappingClient */
|
|
21
|
+
var GroupingMapping_1 = require("./widget/components/GroupingMapping");
|
|
22
|
+
Object.defineProperty(exports, "createDefaultMappingClient", { enumerable: true, get: function () { return GroupingMapping_1.createDefaultMappingClient; } });
|
|
23
|
+
__exportStar(require("@itwin/insights-client"), exports);
|
|
24
|
+
__exportStar(require("./widget/IMappingClient"), exports);
|
|
20
25
|
/** Internal components for custom UIs */
|
|
21
26
|
var Mapping_1 = require("./widget/components/Mapping");
|
|
22
27
|
Object.defineProperty(exports, "Mappings", { enumerable: true, get: function () { return Mapping_1.Mappings; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping-mapping-widget.js","sourceRoot":"","sources":["../../src/grouping-mapping-widget.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,gDAAgD;AAChD,iEAA+C;AAE/C,yCAAyC;AACzC,uDAAuD;AAA9C,mGAAA,QAAQ,OAAA;AACjB,yDAAyD;AAAhD,qGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,4GAAA,YAAY,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** UI Provider for iTwin Viewer Applications */\nexport * from \"./widget/GroupingMappingWidget\";\n\n/** Internal components for custom UIs */\nexport { Mappings } from \"./widget/components/Mapping\";\nexport { Groupings } from \"./widget/components/Grouping\";\nexport { PropertyMenu } from \"./widget/components/PropertyMenu\";\n"]}
|
|
1
|
+
{"version":3,"file":"grouping-mapping-widget.js","sourceRoot":"","sources":["../../src/grouping-mapping-widget.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,gDAAgD;AAChD,iEAA+C;AAE/C,oDAAoD;AACpD,uEAA+F;AAAtF,6HAAA,0BAA0B,OAAA;AACnC,yDAAuC;AACvC,0DAAwC;AAExC,yCAAyC;AACzC,uDAAuD;AAA9C,mGAAA,QAAQ,OAAA;AACjB,yDAAyD;AAAhD,qGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,4GAAA,YAAY,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** UI Provider for iTwin Viewer Applications */\nexport * from \"./widget/GroupingMappingWidget\";\n\n/** Interfaces for providing custom MappingClient */\nexport { createDefaultMappingClient, ClientPrefix } from \"./widget/components/GroupingMapping\";\nexport * from \"@itwin/insights-client\";\nexport * from \"./widget/IMappingClient\";\n\n/** Internal components for custom UIs */\nexport { Mappings } from \"./widget/components/Mapping\";\nexport { Groupings } from \"./widget/components/Grouping\";\nexport { PropertyMenu } from \"./widget/components/PropertyMenu\";\n"]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { AbstractWidgetProps, UiItemsProvider } from "@itwin/appui-abstract";
|
|
2
2
|
import { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from "@itwin/appui-abstract";
|
|
3
3
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
4
|
+
import type { IMappingClient } from "./IMappingClient";
|
|
4
5
|
export declare class GroupingMappingProvider implements UiItemsProvider {
|
|
5
6
|
readonly id = "GroupingMappingProvider";
|
|
6
7
|
private readonly _accessToken?;
|
|
7
8
|
private readonly _prefix?;
|
|
8
|
-
|
|
9
|
+
private readonly _client?;
|
|
10
|
+
constructor(accessToken?: AccessToken, prefix?: "" | "dev" | "qa", client?: IMappingClient);
|
|
9
11
|
provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zonelocation?: AbstractZoneLocation): ReadonlyArray<AbstractWidgetProps>;
|
|
10
12
|
}
|
|
11
13
|
//# sourceMappingURL=GroupingMappingWidget.d.ts.map
|
|
@@ -8,10 +8,11 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const GroupingMapping_1 = __importDefault(require("./components/GroupingMapping"));
|
|
10
10
|
class GroupingMappingProvider {
|
|
11
|
-
constructor(accessToken, prefix) {
|
|
11
|
+
constructor(accessToken, prefix, client) {
|
|
12
12
|
this.id = "GroupingMappingProvider";
|
|
13
13
|
this._accessToken = accessToken;
|
|
14
14
|
this._prefix = prefix;
|
|
15
|
+
this._client = client;
|
|
15
16
|
}
|
|
16
17
|
provideWidgets(_stageId, stageUsage, location, section, zonelocation) {
|
|
17
18
|
const widgets = [];
|
|
@@ -23,7 +24,7 @@ class GroupingMappingProvider {
|
|
|
23
24
|
id: "GroupingMappingWidget",
|
|
24
25
|
label: "Grouping & Mapping",
|
|
25
26
|
getWidgetContent: () => {
|
|
26
|
-
return react_1.default.createElement(GroupingMapping_1.default, { accessToken: this._accessToken, prefix: this._prefix });
|
|
27
|
+
return react_1.default.createElement(GroupingMapping_1.default, { accessToken: this._accessToken, prefix: this._prefix, client: this._client });
|
|
27
28
|
},
|
|
28
29
|
};
|
|
29
30
|
widgets.push(GroupingMappingWidget);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingMappingWidget.js","sourceRoot":"","sources":["../../../src/widget/GroupingMappingWidget.tsx"],"names":[],"mappings":";;;;;;AAQA,0DAK+B;AAE/B,kDAA0B;AAC1B,mFAA2D;
|
|
1
|
+
{"version":3,"file":"GroupingMappingWidget.js","sourceRoot":"","sources":["../../../src/widget/GroupingMappingWidget.tsx"],"names":[],"mappings":";;;;;;AAQA,0DAK+B;AAE/B,kDAA0B;AAC1B,mFAA2D;AAI3D,MAAa,uBAAuB;IAOlC,YAAY,WAAyB,EAAE,MAA0B,EAAE,MAAuB;QAN1E,OAAE,GAAG,yBAAyB,CAAC;QAO7C,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,cAAc,CACnB,QAAgB,EAChB,UAAkB,EAClB,QAA4B,EAC5B,OAA2B,EAC3B,YAAmC;QAEnC,MAAM,OAAO,GAA0B,EAAE,CAAC;QAC1C,IACE,CAAC,QAAQ,KAAK,mCAAkB,CAAC,IAAI;YACnC,OAAO,KAAK,kCAAiB,CAAC,KAAK;YACnC,UAAU,KAAK,2BAAU,CAAC,OAAO,CAAC;YACpC,YAAY,KAAK,qCAAoB,CAAC,UAAU,EAChD;YACA,MAAM,qBAAqB,GAAwB;gBACjD,EAAE,EAAE,uBAAuB;gBAC3B,KAAK,EAAE,oBAAoB;gBAC3B,gBAAgB,EAAE,GAAG,EAAE;oBACrB,OAAO,8BAAC,yBAAe,IAAC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,GAAI,CAAC;gBACzG,CAAC;aACF,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;SACrC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAxCD,0DAwCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type {\n AbstractWidgetProps,\n UiItemsProvider,\n} from \"@itwin/appui-abstract\";\nimport {\n AbstractZoneLocation,\n StagePanelLocation,\n StagePanelSection,\n StageUsage,\n} from \"@itwin/appui-abstract\";\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport React from \"react\";\nimport GroupingMapping from \"./components/GroupingMapping\";\nimport type { ClientPrefix } from \"./components/GroupingMapping\";\nimport type { IMappingClient } from \"./IMappingClient\";\n\nexport class GroupingMappingProvider implements UiItemsProvider {\n public readonly id = \"GroupingMappingProvider\";\n\n private readonly _accessToken?: AccessToken;\n private readonly _prefix?: ClientPrefix;\n private readonly _client?: IMappingClient;\n\n constructor(accessToken?: AccessToken, prefix?: \"\" | \"dev\" | \"qa\", client?: IMappingClient) {\n this._accessToken = accessToken;\n this._prefix = prefix;\n this._client = client;\n }\n\n public provideWidgets(\n _stageId: string,\n stageUsage: string,\n location: StagePanelLocation,\n section?: StagePanelSection,\n zonelocation?: AbstractZoneLocation\n ): ReadonlyArray<AbstractWidgetProps> {\n const widgets: AbstractWidgetProps[] = [];\n if (\n (location === StagePanelLocation.Left &&\n section === StagePanelSection.Start &&\n stageUsage === StageUsage.General) ||\n zonelocation === AbstractZoneLocation.CenterLeft\n ) {\n const GroupingMappingWidget: AbstractWidgetProps = {\n id: \"GroupingMappingWidget\",\n label: \"Grouping & Mapping\",\n getWidgetContent: () => {\n return <GroupingMapping accessToken={this._accessToken} prefix={this._prefix} client={this._client} />;\n },\n };\n\n widgets.push(GroupingMappingWidget);\n }\n\n return widgets;\n }\n}\n"]}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import type { AccessToken } from "@itwin/core-bentley";
|
|
2
|
+
import type { CalculatedProperty, CalculatedPropertyCreate, CalculatedPropertySingle, CalculatedPropertyUpdate, CustomCalculation, CustomCalculationCreate, CustomCalculationSingle, CustomCalculationUpdate, Group, GroupCreate, GroupProperty, GroupPropertyCreate, GroupPropertySingle, GroupPropertyUpdate, GroupSingle, GroupUpdate, Mapping, MappingCopy, MappingCreate, MappingSingle, MappingUpdate } from "@itwin/insights-client";
|
|
3
|
+
export interface IMappingClient {
|
|
4
|
+
/**
|
|
5
|
+
* Gets all Mappings for an iModel.
|
|
6
|
+
*
|
|
7
|
+
* @summary Get Mappings.
|
|
8
|
+
* @param {string} iModelId The iModel Id.
|
|
9
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
10
|
+
* @memberof IMappingClient
|
|
11
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-mappings/
|
|
12
|
+
*/
|
|
13
|
+
getMappings(accessToken: AccessToken, iModelId: string): Promise<Mapping[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Gets a Mapping for an iModel.
|
|
16
|
+
*
|
|
17
|
+
* @summary Get Mapping.
|
|
18
|
+
* @param {string} iModelId The iModel Id.
|
|
19
|
+
* @param {string} mappingId The Mapping Id.
|
|
20
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
21
|
+
* @memberof IMappingClient
|
|
22
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-mapping/
|
|
23
|
+
*/
|
|
24
|
+
getMapping(accessToken: AccessToken, mappingId: string, iModelId: string): Promise<MappingSingle>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a Mapping for an iModel.
|
|
27
|
+
*
|
|
28
|
+
* @summary Create Mapping.
|
|
29
|
+
* @param {string} iModelId Id of the iModel for which to create a new Mapping.
|
|
30
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
31
|
+
* @param {MappingCreate} mapping Request body.
|
|
32
|
+
* @memberof IMappingClient
|
|
33
|
+
* @see https://developer.bentley.com/apis/insights/operations/create-mapping/
|
|
34
|
+
*/
|
|
35
|
+
createMapping(accessToken: AccessToken, iModelId: string, mapping: MappingCreate): Promise<MappingSingle>;
|
|
36
|
+
/**
|
|
37
|
+
* Updates a Mapping for an iModel.
|
|
38
|
+
*
|
|
39
|
+
* @summary Update Mapping.
|
|
40
|
+
* @param {string} iModelId The iModel Id.
|
|
41
|
+
* @param {string} mappingId Id of the Mapping to be updated.
|
|
42
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
43
|
+
* @param {MappingUpdate} mapping Request body.
|
|
44
|
+
* @memberof IMappingClient
|
|
45
|
+
* @see https://developer.bentley.com/apis/insights/operations/update-mapping/
|
|
46
|
+
*/
|
|
47
|
+
updateMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mapping: MappingUpdate): Promise<MappingSingle>;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes a Mapping for an iModel.
|
|
50
|
+
*
|
|
51
|
+
* @summary Delete Mapping.
|
|
52
|
+
* @param {string} iModelId The iModel Id.
|
|
53
|
+
* @param {string} mappingId Id of the Mapping to be deleted.
|
|
54
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
55
|
+
* @memberof IMappingClient
|
|
56
|
+
* @see https://developer.bentley.com/apis/insights/operations/delete-mapping/
|
|
57
|
+
*/
|
|
58
|
+
deleteMapping(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Response>;
|
|
59
|
+
/**
|
|
60
|
+
* Copies a Mapping and all its Groups, GroupProperties, CalculatedProperties, and CustomCalculations to a target iModel.
|
|
61
|
+
*
|
|
62
|
+
* @summary Copy Mapping.
|
|
63
|
+
* @param {string} iModelId Id of the source Mapping's iModel.
|
|
64
|
+
* @param {string} mappingId Id of the source Mapping.
|
|
65
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
66
|
+
* @param {MappingCopy} mappingCopy Request body.
|
|
67
|
+
* @memberof IMappingClient
|
|
68
|
+
* @see https://developer.bentley.com/apis/insights/operations/copy-mapping/
|
|
69
|
+
*/
|
|
70
|
+
copyMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mappingCopy: MappingCopy): Promise<MappingSingle>;
|
|
71
|
+
/**
|
|
72
|
+
* Gets all Groups for a Mapping.
|
|
73
|
+
*
|
|
74
|
+
* @summary Get Groups.
|
|
75
|
+
* @param {string} iModelId The iModel Id.
|
|
76
|
+
* @param {string} mappingId The Mapping Id.
|
|
77
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
78
|
+
* @memberof IMappingClient
|
|
79
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-groups/
|
|
80
|
+
*/
|
|
81
|
+
getGroups(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Group[]>;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a Group for an iModel data source Mapping.
|
|
84
|
+
*
|
|
85
|
+
* @summary Create Group
|
|
86
|
+
* @param {string} iModelId The iModel Id.
|
|
87
|
+
* @param {string} mappingId Id of the Mapping for which to create a new Group.
|
|
88
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
89
|
+
* @param {GroupCreate} group Request body.
|
|
90
|
+
* @memberof IMappingClient
|
|
91
|
+
* @see https://developer.bentley.com/apis/insights/operations/create-group/
|
|
92
|
+
*/
|
|
93
|
+
createGroup(accessToken: AccessToken, iModelId: string, mappingId: string, group: GroupCreate): Promise<GroupSingle>;
|
|
94
|
+
/**
|
|
95
|
+
* Gets a Group for a Mapping.
|
|
96
|
+
*
|
|
97
|
+
* @summary Get Group.
|
|
98
|
+
* @param {string} iModelId The iModel Id.
|
|
99
|
+
* @param {string} mappingId The Mapping Id.
|
|
100
|
+
* @param {string} groupId The Group Id.
|
|
101
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
102
|
+
* @memberof IMappingClient
|
|
103
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-group/
|
|
104
|
+
*/
|
|
105
|
+
getGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupSingle>;
|
|
106
|
+
/**
|
|
107
|
+
* Updates a Group for a Mapping.
|
|
108
|
+
*
|
|
109
|
+
* @summary Update Group.
|
|
110
|
+
* @param {string} iModelId Globally Unique Identifier of the target iModel.
|
|
111
|
+
* @param {string} mappingId Globally Unique Identifier of the target Mapping.
|
|
112
|
+
* @param {string} groupId Id of the Group to be updated.
|
|
113
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
114
|
+
* @param {GroupUpdate} group Request body.
|
|
115
|
+
* @memberof IMappingClient
|
|
116
|
+
* @see https://developer.bentley.com/apis/insights/operations/update-group/
|
|
117
|
+
*/
|
|
118
|
+
updateGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, group: GroupUpdate): Promise<GroupSingle>;
|
|
119
|
+
/**
|
|
120
|
+
* Deletes a Group for a Mapping.
|
|
121
|
+
*
|
|
122
|
+
* @summary Delete Group.
|
|
123
|
+
* @param {string} iModelId The iModel Id.
|
|
124
|
+
* @param {string} mappingId The Mapping Id.
|
|
125
|
+
* @param {string} groupId Id of the Group to be deleted.
|
|
126
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
127
|
+
* @memberof IMappingClient
|
|
128
|
+
* @see https://developer.bentley.com/apis/insights/operations/delete-group/
|
|
129
|
+
*/
|
|
130
|
+
deleteGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<Response>;
|
|
131
|
+
/**
|
|
132
|
+
* Gets all GroupProperties for a Group.
|
|
133
|
+
*
|
|
134
|
+
* @summary Get GroupProperties.
|
|
135
|
+
* @param {string} iModelId The iModel Id.
|
|
136
|
+
* @param {string} mappingId The Mapping Id.
|
|
137
|
+
* @param {string} groupId The Group Id.
|
|
138
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
139
|
+
* @memberof IMappingClient
|
|
140
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-groupproperties/
|
|
141
|
+
*/
|
|
142
|
+
getGroupProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupProperty[]>;
|
|
143
|
+
/**
|
|
144
|
+
* Gets a GroupProperty for a Group.
|
|
145
|
+
*
|
|
146
|
+
* @summary Get GroupProperty.
|
|
147
|
+
* @param {string} iModelId The iModel Id.
|
|
148
|
+
* @param {string} mappingId The Mapping Id.
|
|
149
|
+
* @param {string} groupId The Group Id.
|
|
150
|
+
* @param {string} propertyId The GroupProperty Id.
|
|
151
|
+
* @param {string} accessToken access token with scope `insights:read`.
|
|
152
|
+
* @memberof IMappingClient
|
|
153
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-groupproperty/
|
|
154
|
+
*/
|
|
155
|
+
getGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<GroupPropertySingle>;
|
|
156
|
+
/**
|
|
157
|
+
* Creates a GroupProperty for a Group.
|
|
158
|
+
*
|
|
159
|
+
* @summary Create GroupProperty.
|
|
160
|
+
* @param {string} iModelId The iModel Id.
|
|
161
|
+
* @param {string} mappingId The Mapping Id.
|
|
162
|
+
* @param {string} groupId Id of the Group for which to create a new GroupProperty.
|
|
163
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
164
|
+
* @param {GroupPropertyCreate} groupProperty Request body.
|
|
165
|
+
* @memberof IMappingClient
|
|
166
|
+
* @see https://developer.bentley.com/apis/insights/operations/create-groupproperty/
|
|
167
|
+
*/
|
|
168
|
+
createGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupProperty: GroupPropertyCreate): Promise<GroupPropertySingle>;
|
|
169
|
+
/**
|
|
170
|
+
* Updates a GroupProperty for a Group.
|
|
171
|
+
*
|
|
172
|
+
* @summary Update GroupProperty.
|
|
173
|
+
* @param {string} iModelId The iModel Id.
|
|
174
|
+
* @param {string} mappingId The Mapping Id.
|
|
175
|
+
* @param {string} groupId The Group Id.
|
|
176
|
+
* @param {string} propertyId Id of the GroupProperty to be updated.
|
|
177
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
178
|
+
* @param {GroupPropertyUpdate} groupProperty Request body.
|
|
179
|
+
* @memberof IMappingClient
|
|
180
|
+
* @see https://developer.bentley.com/apis/insights/operations/update-groupproperty/
|
|
181
|
+
*/
|
|
182
|
+
updateGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string, groupProperty: GroupPropertyUpdate): Promise<GroupPropertySingle>;
|
|
183
|
+
/**
|
|
184
|
+
* Deletes a GroupProperty from a Group.
|
|
185
|
+
*
|
|
186
|
+
* @summary Delete GroupProperty.
|
|
187
|
+
* @param {string} iModelId The iModel Id.
|
|
188
|
+
* @param {string} mappingId The Mapping Id.
|
|
189
|
+
* @param {string} groupId The Group Id.
|
|
190
|
+
* @param {string} groupPropertyId Id of the GroupProperty to be deleted.
|
|
191
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
192
|
+
* @memberof IMappingClient
|
|
193
|
+
* @see https://developer.bentley.com/apis/insights/operations/delete-groupproperty/
|
|
194
|
+
*/
|
|
195
|
+
deleteGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string): Promise<Response>;
|
|
196
|
+
/**
|
|
197
|
+
* Gets all CalculatedProperties for a Group.
|
|
198
|
+
*
|
|
199
|
+
* @summary Get CalculatedProperties.
|
|
200
|
+
* @param {string} iModelId The iModel Id.
|
|
201
|
+
* @param {string} mappingId The Mapping Id.
|
|
202
|
+
* @param {string} groupId The Group Id.
|
|
203
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
204
|
+
* @memberof IMappingClient
|
|
205
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperties/
|
|
206
|
+
*/
|
|
207
|
+
getCalculatedProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CalculatedProperty[]>;
|
|
208
|
+
/**
|
|
209
|
+
* Gets a CalculatedProperty for a Group.
|
|
210
|
+
*
|
|
211
|
+
* @summary Get CalculatedProperty.
|
|
212
|
+
* @param {string} iModelId The iModel Id.
|
|
213
|
+
* @param {string} mappingId The Mapping Id.
|
|
214
|
+
* @param {string} groupId The Group Id.
|
|
215
|
+
* @param {string} propertyId The CalculatedProperty Id.
|
|
216
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
217
|
+
* @memberof IMappingClient
|
|
218
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperty/
|
|
219
|
+
*/
|
|
220
|
+
getCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CalculatedPropertySingle>;
|
|
221
|
+
/**
|
|
222
|
+
* Creates a CalculatedProperty for a Group.
|
|
223
|
+
*
|
|
224
|
+
* @summary Create CalculatedProperty.
|
|
225
|
+
* @param {string} iModelId The iModel Id.
|
|
226
|
+
* @param {string} mappingId The Mapping Id.
|
|
227
|
+
* @param {string} groupId Id of the Group for which to create a new CalculatedProperty.
|
|
228
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
229
|
+
* @param {CalculatedPropertyCreate} property Request body.
|
|
230
|
+
* @memberof IMappingClient
|
|
231
|
+
* @see https://developer.bentley.com/apis/insights/operations/create-calculatedproperty/
|
|
232
|
+
*/
|
|
233
|
+
createCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CalculatedPropertyCreate): Promise<CalculatedPropertySingle>;
|
|
234
|
+
/**
|
|
235
|
+
* Updates a CalculatedProperty for a Group.
|
|
236
|
+
*
|
|
237
|
+
* @summary Update CalculatedProperty.
|
|
238
|
+
* @param {string} iModelId The iModel Id.
|
|
239
|
+
* @param {string} mappingId The Mapping Id.
|
|
240
|
+
* @param {string} groupId The Group Id.
|
|
241
|
+
* @param {string} propertyId Id of the CalculatedProperty to be updated.
|
|
242
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
243
|
+
* @param {CalculatedPropertyUpdate} property Request body.
|
|
244
|
+
* @memberof IMappingClient
|
|
245
|
+
* @see https://developer.bentley.com/apis/insights/operations/update-calculatedproperty/
|
|
246
|
+
*/
|
|
247
|
+
updateCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CalculatedPropertyUpdate): Promise<CalculatedPropertySingle>;
|
|
248
|
+
/**
|
|
249
|
+
* Deletes a CalculatedProperty from a Group.
|
|
250
|
+
*
|
|
251
|
+
* @summary Delete CalculatedProperty.
|
|
252
|
+
* @param {string} iModelId The iModel Id.
|
|
253
|
+
* @param {string} mappingId The Mapping Id.
|
|
254
|
+
* @param {string} groupId The Group Id.
|
|
255
|
+
* @param {string} propertyId Id of the CalculatedProperty to be deleted.
|
|
256
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
257
|
+
* @memberof IMappingClient
|
|
258
|
+
* @see https://developer.bentley.com/apis/insights/operations/delete-calculatedproperty/
|
|
259
|
+
*/
|
|
260
|
+
deleteCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;
|
|
261
|
+
/**
|
|
262
|
+
* Gets all CustomCalculations for a Group.
|
|
263
|
+
*
|
|
264
|
+
* @summary Get CustomCalculations.
|
|
265
|
+
* @param {string} iModelId The iModel Id.
|
|
266
|
+
* @param {string} mappingId The Mapping Id.
|
|
267
|
+
* @param {string} groupId The Group Id.
|
|
268
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
269
|
+
* @memberof IMappingClient
|
|
270
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-customcalculations/
|
|
271
|
+
*/
|
|
272
|
+
getCustomCalculations(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CustomCalculation[]>;
|
|
273
|
+
/**
|
|
274
|
+
* Gets a CustomCalculation for a Group.
|
|
275
|
+
*
|
|
276
|
+
* @summary Get CustomCalculation.
|
|
277
|
+
* @param {string} iModelId The iModel Id.
|
|
278
|
+
* @param {string} mappingId The Mapping Id.
|
|
279
|
+
* @param {string} groupId The Group Id.
|
|
280
|
+
* @param {string} propertyId The CustomCalculation Id.
|
|
281
|
+
* @param {string} accessToken OAuth access token with scope `insights:read`.
|
|
282
|
+
* @memberof IMappingClient
|
|
283
|
+
* @see https://developer.bentley.com/apis/insights/operations/get-customcalculation/
|
|
284
|
+
*/
|
|
285
|
+
getCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CustomCalculationSingle>;
|
|
286
|
+
/**
|
|
287
|
+
* Creates a CustomCalculation for a Group.
|
|
288
|
+
*
|
|
289
|
+
* @summary Create CustomCalculation.
|
|
290
|
+
* @param {string} iModelId The iModel Id.
|
|
291
|
+
* @param {string} mappingId The Mapping Id.
|
|
292
|
+
* @param {string} groupId Id of the Group for which to create a new CustomCalculation.
|
|
293
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
294
|
+
* @param {CustomCalculationCreate} property Request body.
|
|
295
|
+
* @memberof IMappingClient
|
|
296
|
+
* @see https://developer.bentley.com/apis/insights/operations/create-customcalculation/
|
|
297
|
+
*/
|
|
298
|
+
createCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CustomCalculationCreate): Promise<CustomCalculationSingle>;
|
|
299
|
+
/**
|
|
300
|
+
* Updates a CustomCalculation for a Group.
|
|
301
|
+
*
|
|
302
|
+
* @summary Update CustomCalculation.
|
|
303
|
+
* @param {string} iModelId The iModel Id.
|
|
304
|
+
* @param {string} mappingId The Mapping Id.
|
|
305
|
+
* @param {string} groupId The Group Id.
|
|
306
|
+
* @param {string} propertyId Id of the CustomCalculation to be updated.
|
|
307
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
308
|
+
* @param {CustomCalculationUpdate} property Request body.
|
|
309
|
+
* @memberof IMappingClient
|
|
310
|
+
* @see https://developer.bentley.com/apis/insights/operations/update-customcalculation/
|
|
311
|
+
*/
|
|
312
|
+
updateCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CustomCalculationUpdate): Promise<CustomCalculationSingle>;
|
|
313
|
+
/**
|
|
314
|
+
* Deletes a CustomCalculation from a Group.
|
|
315
|
+
*
|
|
316
|
+
* @summary Delete CustomCalculation.
|
|
317
|
+
* @param {string} iModelId The iModel Id.
|
|
318
|
+
* @param {string} mappingId The Mapping Id.
|
|
319
|
+
* @param {string} groupId The Group Id.
|
|
320
|
+
* @param {string} propertyId Id of the CustomCalculation to be deleted.
|
|
321
|
+
* @param {string} accessToken OAuth access token with scope `insights:modify`.
|
|
322
|
+
* @memberof IMappingClient
|
|
323
|
+
* @see https://developer.bentley.com/apis/insights/operations/delete-customcalculation/
|
|
324
|
+
*/
|
|
325
|
+
deleteCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=IMappingClient.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
//# sourceMappingURL=IMappingClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMappingClient.js","sourceRoot":"","sources":["../../../src/widget/IMappingClient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport type { CalculatedProperty, CalculatedPropertyCreate, CalculatedPropertySingle, CalculatedPropertyUpdate, CustomCalculation, CustomCalculationCreate, CustomCalculationSingle, CustomCalculationUpdate, Group, GroupCreate, GroupProperty, GroupPropertyCreate, GroupPropertySingle, GroupPropertyUpdate, GroupSingle, GroupUpdate, Mapping, MappingCopy, MappingCreate, MappingSingle, MappingUpdate } from \"@itwin/insights-client\";\n\nexport interface IMappingClient {\n /**\n * Gets all Mappings for an iModel.\n *\n * @summary Get Mappings.\n * @param {string} iModelId The iModel Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-mappings/\n */\n getMappings(accessToken: AccessToken, iModelId: string): Promise<Mapping[]>;\n\n /**\n * Gets a Mapping for an iModel.\n *\n * @summary Get Mapping.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-mapping/\n */\n getMapping(accessToken: AccessToken, mappingId: string, iModelId: string): Promise<MappingSingle>;\n\n /**\n * Creates a Mapping for an iModel.\n *\n * @summary Create Mapping.\n * @param {string} iModelId Id of the iModel for which to create a new Mapping.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {MappingCreate} mapping Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/create-mapping/\n */\n createMapping(accessToken: AccessToken, iModelId: string, mapping: MappingCreate): Promise<MappingSingle>;\n\n /**\n * Updates a Mapping for an iModel.\n *\n * @summary Update Mapping.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId Id of the Mapping to be updated.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {MappingUpdate} mapping Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/update-mapping/\n */\n updateMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mapping: MappingUpdate): Promise<MappingSingle>;\n\n /**\n * Deletes a Mapping for an iModel.\n *\n * @summary Delete Mapping.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId Id of the Mapping to be deleted.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/delete-mapping/\n */\n deleteMapping(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Response>;\n\n /**\n * Copies a Mapping and all its Groups, GroupProperties, CalculatedProperties, and CustomCalculations to a target iModel.\n *\n * @summary Copy Mapping.\n * @param {string} iModelId Id of the source Mapping's iModel.\n * @param {string} mappingId Id of the source Mapping.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {MappingCopy} mappingCopy Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/copy-mapping/\n */\n copyMapping(accessToken: AccessToken, iModelId: string, mappingId: string, mappingCopy: MappingCopy): Promise<MappingSingle>;\n\n /**\n * Gets all Groups for a Mapping.\n *\n * @summary Get Groups.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-groups/\n */\n getGroups(accessToken: AccessToken, iModelId: string, mappingId: string): Promise<Group[]>;\n\n /**\n * Creates a Group for an iModel data source Mapping.\n *\n * @summary Create Group\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId Id of the Mapping for which to create a new Group.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {GroupCreate} group Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/create-group/\n */\n createGroup(accessToken: AccessToken, iModelId: string, mappingId: string, group: GroupCreate): Promise<GroupSingle>;\n\n /**\n * Gets a Group for a Mapping.\n *\n * @summary Get Group.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-group/\n */\n getGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupSingle>;\n\n /**\n * Updates a Group for a Mapping.\n *\n * @summary Update Group.\n * @param {string} iModelId Globally Unique Identifier of the target iModel.\n * @param {string} mappingId Globally Unique Identifier of the target Mapping.\n * @param {string} groupId Id of the Group to be updated.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {GroupUpdate} group Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/update-group/\n */\n updateGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, group: GroupUpdate): Promise<GroupSingle>;\n\n /**\n * Deletes a Group for a Mapping.\n *\n * @summary Delete Group.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId Id of the Group to be deleted.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/delete-group/\n */\n deleteGroup(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<Response>;\n\n /**\n * Gets all GroupProperties for a Group.\n *\n * @summary Get GroupProperties.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-groupproperties/\n */\n getGroupProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<GroupProperty[]>;\n\n /**\n * Gets a GroupProperty for a Group.\n *\n * @summary Get GroupProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId The GroupProperty Id.\n * @param {string} accessToken access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-groupproperty/\n */\n getGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<GroupPropertySingle>;\n\n /**\n * Creates a GroupProperty for a Group.\n *\n * @summary Create GroupProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId Id of the Group for which to create a new GroupProperty.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {GroupPropertyCreate} groupProperty Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/create-groupproperty/\n */\n createGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupProperty: GroupPropertyCreate): Promise<GroupPropertySingle>;\n\n /**\n * Updates a GroupProperty for a Group.\n *\n * @summary Update GroupProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId Id of the GroupProperty to be updated.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {GroupPropertyUpdate} groupProperty Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/update-groupproperty/\n */\n updateGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string, groupProperty: GroupPropertyUpdate): Promise<GroupPropertySingle>;\n\n /**\n * Deletes a GroupProperty from a Group.\n *\n * @summary Delete GroupProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} groupPropertyId Id of the GroupProperty to be deleted.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/delete-groupproperty/\n */\n deleteGroupProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, groupPropertyId: string): Promise<Response>;\n\n /**\n * Gets all CalculatedProperties for a Group.\n *\n * @summary Get CalculatedProperties.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperties/\n */\n getCalculatedProperties(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CalculatedProperty[]>;\n\n /**\n * Gets a CalculatedProperty for a Group.\n *\n * @summary Get CalculatedProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId The CalculatedProperty Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-calculatedproperty/\n */\n getCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CalculatedPropertySingle>;\n\n /**\n * Creates a CalculatedProperty for a Group.\n *\n * @summary Create CalculatedProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId Id of the Group for which to create a new CalculatedProperty.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {CalculatedPropertyCreate} property Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/create-calculatedproperty/\n */\n createCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CalculatedPropertyCreate): Promise<CalculatedPropertySingle>;\n\n /**\n * Updates a CalculatedProperty for a Group.\n *\n * @summary Update CalculatedProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId Id of the CalculatedProperty to be updated.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {CalculatedPropertyUpdate} property Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/update-calculatedproperty/\n */\n updateCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CalculatedPropertyUpdate): Promise<CalculatedPropertySingle>;\n\n /**\n * Deletes a CalculatedProperty from a Group.\n *\n * @summary Delete CalculatedProperty.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId Id of the CalculatedProperty to be deleted.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/delete-calculatedproperty/\n */\n deleteCalculatedProperty(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;\n\n /**\n * Gets all CustomCalculations for a Group.\n *\n * @summary Get CustomCalculations.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-customcalculations/\n */\n getCustomCalculations(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string): Promise<CustomCalculation[]>;\n\n /**\n * Gets a CustomCalculation for a Group.\n *\n * @summary Get CustomCalculation.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId The CustomCalculation Id.\n * @param {string} accessToken OAuth access token with scope `insights:read`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/get-customcalculation/\n */\n getCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<CustomCalculationSingle>;\n\n /**\n * Creates a CustomCalculation for a Group.\n *\n * @summary Create CustomCalculation.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId Id of the Group for which to create a new CustomCalculation.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {CustomCalculationCreate} property Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/create-customcalculation/\n */\n createCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, property: CustomCalculationCreate): Promise<CustomCalculationSingle>;\n\n /**\n * Updates a CustomCalculation for a Group.\n *\n * @summary Update CustomCalculation.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId Id of the CustomCalculation to be updated.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @param {CustomCalculationUpdate} property Request body.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/update-customcalculation/\n */\n updateCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string, property: CustomCalculationUpdate): Promise<CustomCalculationSingle>;\n\n /**\n * Deletes a CustomCalculation from a Group.\n *\n * @summary Delete CustomCalculation.\n * @param {string} iModelId The iModel Id.\n * @param {string} mappingId The Mapping Id.\n * @param {string} groupId The Group Id.\n * @param {string} propertyId Id of the CustomCalculation to be deleted.\n * @param {string} accessToken OAuth access token with scope `insights:modify`.\n * @memberof IMappingClient\n * @see https://developer.bentley.com/apis/insights/operations/delete-customcalculation/\n */\n deleteCustomCalculation(accessToken: AccessToken, iModelId: string, mappingId: string, groupId: string, propertyId: string): Promise<Response>;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./BlockingOverlay.scss";
|
|
3
|
+
export interface BlockingOverlayProps {
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const BlockingOverlay: ({ isVisible }: BlockingOverlayProps) => JSX.Element;
|
|
7
|
+
//# sourceMappingURL=BlockingOverlay.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BlockingOverlay = void 0;
|
|
7
|
+
/*---------------------------------------------------------------------------------------------
|
|
8
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
9
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
10
|
+
*--------------------------------------------------------------------------------------------*/
|
|
11
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
|
+
const react_1 = __importDefault(require("react"));
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
require("./BlockingOverlay.scss");
|
|
15
|
+
const BlockingOverlay = ({ isVisible }) => {
|
|
16
|
+
return (react_1.default.createElement("div", { className: classnames_1.default("group-mapping-blocking-overlay", isVisible && "visible") },
|
|
17
|
+
react_1.default.createElement("div", { className: "group-mapping-blocking-overlay-spinner" },
|
|
18
|
+
react_1.default.createElement(utils_1.LoadingSpinner, null))));
|
|
19
|
+
};
|
|
20
|
+
exports.BlockingOverlay = BlockingOverlay;
|
|
21
|
+
//# sourceMappingURL=BlockingOverlay.js.map
|