@nocobase/plugin-flow-engine 2.1.0-beta.43 → 2.1.0-beta.45
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/dist/client/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/acorn-jsx/package.json +1 -1
- package/dist/node_modules/acorn-walk/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/authoring-validation.js +160 -21
- package/dist/server/flow-surfaces/catalog.js +9 -5
- package/dist/server/flow-surfaces/chart-config.js +29 -6
- package/dist/server/flow-surfaces/contract-guard.js +39 -5
- package/dist/server/flow-surfaces/default-block-actions.js +2 -0
- package/dist/server/flow-surfaces/errors.d.ts +15 -0
- package/dist/server/flow-surfaces/errors.js +49 -3
- package/dist/server/flow-surfaces/filter-group.d.ts +7 -1
- package/dist/server/flow-surfaces/filter-group.js +175 -71
- package/dist/server/flow-surfaces/public-data-surface-default-filter.js +2 -1
- package/dist/server/flow-surfaces/runjs-authoring/ast/bindings.d.ts +66 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/bindings.js +661 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/execution.d.ts +20 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/execution.js +275 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/parser.d.ts +16 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/parser.js +130 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/react-values.d.ts +20 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/react-values.js +401 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/request-config.d.ts +21 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/request-config.js +199 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/source.d.ts +70 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/source.js +895 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/static-bindings.d.ts +23 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/static-bindings.js +618 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/static-values.d.ts +196 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/static-values.js +1777 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/walk.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/ast/walk.js +55 -0
- package/dist/server/flow-surfaces/runjs-authoring/collectors.d.ts +12 -0
- package/dist/server/flow-surfaces/runjs-authoring/collectors.js +589 -0
- package/dist/server/flow-surfaces/runjs-authoring/index.d.ts +2 -25
- package/dist/server/flow-surfaces/runjs-authoring/index.js +5 -11138
- package/dist/server/flow-surfaces/runjs-authoring/inspect.d.ts +13 -0
- package/dist/server/flow-surfaces/runjs-authoring/inspect.js +149 -0
- package/dist/server/flow-surfaces/runjs-authoring/internal-types.d.ts +333 -0
- package/dist/server/flow-surfaces/runjs-authoring/internal-types.js +36 -0
- package/dist/server/flow-surfaces/runjs-authoring/rules.js +2 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.d.ts +67 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +757 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/errors.d.ts +22 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/errors.js +91 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/source-budget.d.ts +16 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/source-budget.js +115 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/surface.d.ts +19 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/surface.js +140 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/types.d.ts +91 -0
- package/dist/server/flow-surfaces/runjs-authoring/runtime/types.js +24 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/ctx-api.d.ts +138 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/ctx-api.js +1779 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/filter.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/filter.js +1583 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.d.ts +195 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.js +463 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/react-render.d.ts +48 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/react-render.js +379 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/react.d.ts +26 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/react.js +1441 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/resource.d.ts +23 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/resource.js +1427 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.d.ts +91 -0
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.js +889 -0
- package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
- package/dist/server/flow-surfaces/runjs-authoring/unknown-global-stop/index.d.ts +10 -0
- package/dist/server/flow-surfaces/runjs-authoring/unknown-global-stop/index.js +40 -0
- package/dist/server/flow-surfaces/runjs-authoring/validators/index.d.ts +12 -0
- package/dist/server/flow-surfaces/runjs-authoring/validators/index.js +887 -0
- package/dist/server/flow-surfaces/service-helpers.d.ts +29 -0
- package/dist/server/flow-surfaces/service-helpers.js +105 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +15 -3
- package/dist/server/flow-surfaces/service-utils.js +5 -4
- package/dist/server/flow-surfaces/service.d.ts +4 -0
- package/dist/server/flow-surfaces/service.js +360 -30
- package/dist/server/flow-surfaces/types.d.ts +3 -0
- package/dist/server/repository.d.ts +15 -1
- package/dist/server/repository.js +262 -23
- package/dist/server/template/contexts.d.ts +2 -0
- package/dist/server/template/contexts.js +34 -0
- package/dist/server/template/resolver.js +233 -22
- package/dist/swagger/flow-surfaces.d.ts +175 -0
- package/dist/swagger/flow-surfaces.js +130 -51
- package/dist/swagger/index.d.ts +175 -0
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-flow-engine",["@nocobase/client"],t):"object"==typeof exports?exports["@nocobase/plugin-flow-engine"]=t(require("@nocobase/client")):e["@nocobase/plugin-flow-engine"]=t(e["@nocobase/client"])}(self,function(e){return function(){"use strict";var t={342:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(o=r.g.location+"");var o,i=r.g.document;if(!o&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(o=i.currentScript.src),!o)){var u=i.getElementsByTagName("script");if(u.length)for(var c=u.length-1;c>-1&&(!o||!/^http(s?):/.test(o));)o=u[c--].src}if(!o)throw Error("Automatic publicPath is not supported in this browser");r.p=o.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var a={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-flow-engine/dist/client/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-flow-engine",["@nocobase/client"],t):"object"==typeof exports?exports["@nocobase/plugin-flow-engine"]=t(require("@nocobase/client")):e["@nocobase/plugin-flow-engine"]=t(e["@nocobase/client"])}(self,function(e){return function(){"use strict";var t={342:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(o=r.g.location+"");var o,i=r.g.document;if(!o&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(o=i.currentScript.src),!o)){var u=i.getElementsByTagName("script");if(u.length)for(var c=u.length-1;c>-1&&(!o||!/^http(s?):/.test(o));)o=u[c--].src}if(!o)throw Error("Automatic publicPath is not supported in this browser");r.p=o.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var a={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-flow-engine/dist/client/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",c=u.indexOf(i);e=c>=0?u.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-flow-engine/dist/client/"}r.p=e}(),!function(){r.r(a),r.d(a,{PluginFlowEngineClient:function(){return p}});var e=r(342);function t(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=e.apply(n,r);function c(e){t(u,o,i,c,a,"next",e)}function a(e){t(u,o,i,c,a,"throw",e)}c(void 0)})}}function o(e,t,n){return(o=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=i(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&u(r,e),t=[{key:"afterAdd",value:function(){return n(function(){return f(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return n(function(){return f(this,function(e){return[2]})})()}},{key:"load",value:function(){return n(function(){return f(this,function(e){return[2]})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}(c(e.Plugin));a.default=p}(),a}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-beta.
|
|
11
|
+
"@nocobase/client": "2.1.0-beta.45",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "2.1.0-beta.
|
|
14
|
-
"@nocobase/data-source-manager": "2.1.0-beta.
|
|
15
|
-
"@nocobase/resourcer": "2.1.0-beta.
|
|
16
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
17
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
18
|
-
"@nocobase/server": "2.1.0-beta.
|
|
19
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
13
|
+
"@nocobase/database": "2.1.0-beta.45",
|
|
14
|
+
"@nocobase/data-source-manager": "2.1.0-beta.45",
|
|
15
|
+
"@nocobase/resourcer": "2.1.0-beta.45",
|
|
16
|
+
"@nocobase/utils": "2.1.0-beta.45",
|
|
17
|
+
"@nocobase/cache": "2.1.0-beta.45",
|
|
18
|
+
"@nocobase/server": "2.1.0-beta.45",
|
|
19
|
+
"@nocobase/actions": "2.1.0-beta.45",
|
|
20
20
|
"sequelize": "6.35.2",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "2.1.0-beta.
|
|
22
|
+
"@nocobase/ai": "2.1.0-beta.45"
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-08T04:32:04.197Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-08T04:32:05.094Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-08T04:32:05.515Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-08T04:32:05.627Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-
|
|
1
|
+
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-08T04:32:04.705Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-06-08T04:32:06.743Z"}
|
|
@@ -172,6 +172,10 @@ const JS_BLOCK_TOP_LEVEL_JS_KEYS = ["code", "version"];
|
|
|
172
172
|
const JS_BLOCK_INTERNAL_AUTHORING_KEYS = ["props", "decoratorProps", "flowRegistry", "stepParams"];
|
|
173
173
|
const JS_BLOCK_REPAIR_HINT = "This is a jsBlock payload shape problem. Repair this jsBlock using inline settings.code/settings.version, or applyBlueprint assets.scripts.<key>.code plus block.script. Do not change this block type to table, chart, actionPanel, gridCard, or another block type.";
|
|
174
174
|
const CHART_REPAIR_HINT = "This is a chart payload shape problem. Keep using chart and repair this chart using assets.charts.<key>.query/visual plus block.chart, or localized settings.query/settings.visual. Do not change this block type to table, jsBlock, actionPanel, gridCard, or another block type, and do not drop or defer the chart. KPI / summary numbers should use jsBlock; charts are for trends, distributions, rankings, and visual analysis.";
|
|
175
|
+
const REPAIR_ALL_ERRORS_AGENT_INSTRUCTION = "If this response contains errors[], fix every listed error in one payload revision before retrying the same write. Do not fix only this error and immediately retry.";
|
|
176
|
+
const JS_BLOCK_AGENT_INSTRUCTION = `${REPAIR_ALL_ERRORS_AGENT_INSTRUCTION} Do not skip, drop, defer, or replace this required jsBlock. Repair it as jsBlock.`;
|
|
177
|
+
const CHART_AGENT_INSTRUCTION = `${REPAIR_ALL_ERRORS_AGENT_INSTRUCTION} Do not skip, drop, defer, or replace this required chart. Repair it as chart.`;
|
|
178
|
+
const VISIBLE_DATA_BLOCK_FIELDS_REPAIR_HINT = "Add direct visible collection fields to this block. Do not rely on defaults.collections.*.fieldGroups, action-only fields, dividers, or generated popup/form defaults as a substitute for visible block fields.";
|
|
175
179
|
const JS_BLOCK_FORBIDDEN_FALLBACKS = [
|
|
176
180
|
"table",
|
|
177
181
|
"list",
|
|
@@ -195,6 +199,7 @@ const CHART_FORBIDDEN_FALLBACKS = [
|
|
|
195
199
|
const CHART_QUERY_MODE_SET = new Set(import_chart_config.CHART_QUERY_MODES);
|
|
196
200
|
const CHART_VISUAL_MODE_SET = new Set(import_chart_config.CHART_VISUAL_MODES);
|
|
197
201
|
const CHART_BASIC_VISUAL_TYPE_SET = new Set(import_chart_config.CHART_BASIC_VISUAL_TYPES);
|
|
202
|
+
const CHART_BASIC_VISUAL_TYPE_LIST = import_chart_config.CHART_BASIC_VISUAL_TYPES.join(", ");
|
|
198
203
|
const STRICT_LOCALIZED_CHART_ACTIONS = /* @__PURE__ */ new Set(["compose", "addBlocks"]);
|
|
199
204
|
const CHART_VISUAL_LEGACY_BUILDER_KEYS = /* @__PURE__ */ new Set([
|
|
200
205
|
"xField",
|
|
@@ -718,6 +723,7 @@ function withJsBlockRepairHint(details = {}) {
|
|
|
718
723
|
requiredBlockType: "jsBlock",
|
|
719
724
|
fixStrategy: "repair_same_block_type",
|
|
720
725
|
repairHint: JS_BLOCK_REPAIR_HINT,
|
|
726
|
+
agentInstruction: JS_BLOCK_AGENT_INSTRUCTION,
|
|
721
727
|
repairExample: {
|
|
722
728
|
inlineBlock: {
|
|
723
729
|
type: "jsBlock",
|
|
@@ -748,6 +754,7 @@ function withChartRepairHint(details = {}) {
|
|
|
748
754
|
requiredBlockType: "chart",
|
|
749
755
|
fixStrategy: "repair_same_block_type",
|
|
750
756
|
repairHint: CHART_REPAIR_HINT,
|
|
757
|
+
agentInstruction: CHART_AGENT_INSTRUCTION,
|
|
751
758
|
repairSteps: [
|
|
752
759
|
"Keep the block type as chart.",
|
|
753
760
|
"Define assets.charts.<key>.query and assets.charts.<key>.visual.",
|
|
@@ -891,6 +898,19 @@ function withChartRepairHint(details = {}) {
|
|
|
891
898
|
forbiddenFallbacks: CHART_FORBIDDEN_FALLBACKS
|
|
892
899
|
};
|
|
893
900
|
}
|
|
901
|
+
function withUnsupportedChartVisualTypeHint(details = {}) {
|
|
902
|
+
const jsBlockHint = `Supported basic chart visual types are: ${CHART_BASIC_VISUAL_TYPE_LIST}. If the required visualization cannot be represented by these chart types, use a jsBlock instead.`;
|
|
903
|
+
return {
|
|
904
|
+
...details,
|
|
905
|
+
fixStrategy: "use_supported_chart_type_or_jsBlock",
|
|
906
|
+
repairHint: jsBlockHint,
|
|
907
|
+
agentInstruction: `${REPAIR_ALL_ERRORS_AGENT_INSTRUCTION} Use one of the supported chart visual types, or use a jsBlock when the requested visualization is outside the chart plugin capabilities.`,
|
|
908
|
+
supportedVisualTypes: [...import_chart_config.CHART_BASIC_VISUAL_TYPES],
|
|
909
|
+
alternativeBlockType: "jsBlock",
|
|
910
|
+
alternativeHint: jsBlockHint,
|
|
911
|
+
forbiddenFallbacks: CHART_FORBIDDEN_FALLBACKS.filter((item) => item !== "jsBlock")
|
|
912
|
+
};
|
|
913
|
+
}
|
|
894
914
|
function collectLocalizedChartSettingsErrors(block, blockType, path, errors, context) {
|
|
895
915
|
if (blockType !== "chart" || !STRICT_LOCALIZED_CHART_ACTIONS.has(context.authoringActionName)) {
|
|
896
916
|
return;
|
|
@@ -1223,7 +1243,7 @@ function collectChartFilterOperatorError(operator, path, errors) {
|
|
|
1223
1243
|
}
|
|
1224
1244
|
function collectChartFilterDateValueError(operator, value, path, errors) {
|
|
1225
1245
|
try {
|
|
1226
|
-
(0, import_filter_group.
|
|
1246
|
+
(0, import_filter_group.normalizeFlowSurfaceStrictFilterDateValue)(operator, value, path);
|
|
1227
1247
|
} catch (error) {
|
|
1228
1248
|
if (error instanceof import_errors.FlowSurfaceBadRequestError) {
|
|
1229
1249
|
pushChartBadRequestAuthoringError(errors, error, path);
|
|
@@ -1239,6 +1259,7 @@ function normalizeChartAssetFieldPath(input) {
|
|
|
1239
1259
|
return String(input || "").trim();
|
|
1240
1260
|
}
|
|
1241
1261
|
function collectBuilderChartAssetFieldErrors(query, path, context, errors) {
|
|
1262
|
+
var _a, _b, _c, _d, _e;
|
|
1242
1263
|
const resource = _.isPlainObject(query.resource) ? query.resource : null;
|
|
1243
1264
|
const collectionName = String((resource == null ? void 0 : resource.collectionName) || "").trim();
|
|
1244
1265
|
if (!collectionName || typeof context.getCollection !== "function") {
|
|
@@ -1252,10 +1273,12 @@ function collectBuilderChartAssetFieldErrors(query, path, context, errors) {
|
|
|
1252
1273
|
const selections = [
|
|
1253
1274
|
..._.castArray(query.measures || []).map((selection, index) => ({
|
|
1254
1275
|
selection,
|
|
1276
|
+
kind: "measure",
|
|
1255
1277
|
fieldPath: `${path}.query.measures[${index}].field`
|
|
1256
1278
|
})),
|
|
1257
1279
|
..._.castArray(query.dimensions || []).map((selection, index) => ({
|
|
1258
1280
|
selection,
|
|
1281
|
+
kind: "dimension",
|
|
1259
1282
|
fieldPath: `${path}.query.dimensions[${index}].field`
|
|
1260
1283
|
}))
|
|
1261
1284
|
];
|
|
@@ -1267,24 +1290,80 @@ function collectBuilderChartAssetFieldErrors(query, path, context, errors) {
|
|
|
1267
1290
|
if (!fieldPath) {
|
|
1268
1291
|
continue;
|
|
1269
1292
|
}
|
|
1293
|
+
const fieldPathParts = fieldPath.split(".").filter(Boolean);
|
|
1294
|
+
const isCountMeasureSelection = item.kind === "measure" && String(((_a = item.selection) == null ? void 0 : _a.aggregation) || "").trim() === "count" && !((_b = item.selection) == null ? void 0 : _b.distinct);
|
|
1295
|
+
if (fieldPathParts.length > 1 && !isCountMeasureSelection) {
|
|
1296
|
+
const directAssociationPath = fieldPathParts[0];
|
|
1297
|
+
const directAssociationField = (0, import_service_helpers.resolveFieldFromCollection)(collection, directAssociationPath);
|
|
1298
|
+
const directAssociationTargetCollection = directAssociationField && (0, import_service_helpers.isAssociationField)(directAssociationField) ? (0, import_service_helpers.resolveFieldTargetCollection)(
|
|
1299
|
+
directAssociationField,
|
|
1300
|
+
dataSourceKey,
|
|
1301
|
+
(resolvedDataSourceKey, targetCollection) => {
|
|
1302
|
+
var _a2;
|
|
1303
|
+
return (_a2 = context.getCollection) == null ? void 0 : _a2.call(context, resolvedDataSourceKey, targetCollection);
|
|
1304
|
+
}
|
|
1305
|
+
) : null;
|
|
1306
|
+
const invalidDirectSubfield = directAssociationTargetCollection ? (0, import_service_helpers.getInvalidChartBuilderRelationDirectSubfieldDetails)({
|
|
1307
|
+
associationPathName: directAssociationPath,
|
|
1308
|
+
selectedSubfieldPath: fieldPathParts.slice(1).join("."),
|
|
1309
|
+
targetCollection: directAssociationTargetCollection
|
|
1310
|
+
}) : null;
|
|
1311
|
+
if (invalidDirectSubfield) {
|
|
1312
|
+
pushAuthoringError(errors, {
|
|
1313
|
+
path: item.fieldPath,
|
|
1314
|
+
ruleId: "chart-builder-query-relation-direct-subfield-required",
|
|
1315
|
+
message: `flowSurfaces authoring ${item.fieldPath} must reference a direct scalar child field under relation '${invalidDirectSubfield.associationPath}'. ${(0, import_service_helpers.formatChartBuilderSupportedRelationSubfields)(
|
|
1316
|
+
invalidDirectSubfield.associationPath,
|
|
1317
|
+
invalidDirectSubfield.supportedFields
|
|
1318
|
+
)}`,
|
|
1319
|
+
details: withChartRepairHint({
|
|
1320
|
+
fieldPath,
|
|
1321
|
+
dataSourceKey,
|
|
1322
|
+
collectionName,
|
|
1323
|
+
...invalidDirectSubfield
|
|
1324
|
+
})
|
|
1325
|
+
});
|
|
1326
|
+
continue;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1270
1329
|
const field = (0, import_service_helpers.resolveFieldFromCollection)(collection, fieldPath);
|
|
1330
|
+
const associationPath = fieldPath.includes(".") ? fieldPath.split(".").slice(0, -1).join(".") : "";
|
|
1331
|
+
const leafFieldName = fieldPath.split(".").slice(-1)[0];
|
|
1332
|
+
const associationField = associationPath ? (0, import_service_helpers.resolveFieldFromCollection)(collection, associationPath) : null;
|
|
1333
|
+
const associationTargetCollection = associationField && (0, import_service_helpers.isAssociationField)(associationField) ? (0, import_service_helpers.resolveFieldTargetCollection)(
|
|
1334
|
+
associationField,
|
|
1335
|
+
dataSourceKey,
|
|
1336
|
+
(resolvedDataSourceKey, targetCollection) => {
|
|
1337
|
+
var _a2;
|
|
1338
|
+
return (_a2 = context.getCollection) == null ? void 0 : _a2.call(context, resolvedDataSourceKey, targetCollection);
|
|
1339
|
+
}
|
|
1340
|
+
) : null;
|
|
1341
|
+
const leafModelAttributes = (0, import_service_helpers.getCollectionModelAttributes)(associationTargetCollection || collection);
|
|
1342
|
+
const hasLeafModelAttribute = Object.prototype.hasOwnProperty.call(leafModelAttributes, leafFieldName);
|
|
1343
|
+
const isCountMeasureRelationSubfield = item.kind === "measure" && String(((_c = item.selection) == null ? void 0 : _c.aggregation) || "").trim() === "count" && !((_d = item.selection) == null ? void 0 : _d.distinct) && associationField && (0, import_service_helpers.isAssociationField)(associationField);
|
|
1344
|
+
const unsupportedRelationSubfield = associationTargetCollection ? (0, import_service_helpers.getUnsupportedChartBuilderRelationSubfieldDetails)({
|
|
1345
|
+
associationPathName: associationPath,
|
|
1346
|
+
leafFieldName,
|
|
1347
|
+
leafField: field,
|
|
1348
|
+
targetCollection: associationTargetCollection
|
|
1349
|
+
}) : null;
|
|
1271
1350
|
if (!field) {
|
|
1272
|
-
|
|
1351
|
+
const hasConcreteField = associationTargetCollection ? hasLeafModelAttribute || collectionHasConcreteField(associationTargetCollection, leafFieldName) : collectionHasConcreteField(collection, fieldPath);
|
|
1352
|
+
if (!hasConcreteField) {
|
|
1353
|
+
pushAuthoringError(errors, {
|
|
1354
|
+
path: item.fieldPath,
|
|
1355
|
+
ruleId: "chart-builder-query-field-unknown",
|
|
1356
|
+
message: `flowSurfaces authoring ${item.fieldPath} references unknown field '${fieldPath}' on collection '${dataSourceKey}.${collectionName}'`,
|
|
1357
|
+
details: withChartRepairHint({
|
|
1358
|
+
fieldPath,
|
|
1359
|
+
dataSourceKey,
|
|
1360
|
+
collectionName
|
|
1361
|
+
})
|
|
1362
|
+
});
|
|
1273
1363
|
continue;
|
|
1274
1364
|
}
|
|
1275
|
-
pushAuthoringError(errors, {
|
|
1276
|
-
path: item.fieldPath,
|
|
1277
|
-
ruleId: "chart-builder-query-field-unknown",
|
|
1278
|
-
message: `flowSurfaces authoring ${item.fieldPath} references unknown field '${fieldPath}' on collection '${dataSourceKey}.${collectionName}'`,
|
|
1279
|
-
details: withChartRepairHint({
|
|
1280
|
-
fieldPath,
|
|
1281
|
-
dataSourceKey,
|
|
1282
|
-
collectionName
|
|
1283
|
-
})
|
|
1284
|
-
});
|
|
1285
|
-
continue;
|
|
1286
1365
|
}
|
|
1287
|
-
if (!fieldPath.includes(".") && (0, import_service_helpers.isAssociationField)(field)) {
|
|
1366
|
+
if (!fieldPath.includes(".") && field && (0, import_service_helpers.isAssociationField)(field)) {
|
|
1288
1367
|
const suggestion = resolveChartBuilderAssociationSubfieldSuggestion(
|
|
1289
1368
|
fieldPath,
|
|
1290
1369
|
field,
|
|
@@ -1303,6 +1382,43 @@ function collectBuilderChartAssetFieldErrors(query, path, context, errors) {
|
|
|
1303
1382
|
})
|
|
1304
1383
|
});
|
|
1305
1384
|
}
|
|
1385
|
+
if (isCountMeasureRelationSubfield) {
|
|
1386
|
+
pushAuthoringError(errors, {
|
|
1387
|
+
path: item.fieldPath,
|
|
1388
|
+
ruleId: "chart-builder-query-count-measure-relation-subfield",
|
|
1389
|
+
message: `flowSurfaces authoring ${item.fieldPath} counts relation subfield '${fieldPath}'; count a scalar base field such as 'id' and keep '${fieldPath}' as a dimension`,
|
|
1390
|
+
details: withChartRepairHint({
|
|
1391
|
+
fieldPath,
|
|
1392
|
+
dataSourceKey,
|
|
1393
|
+
collectionName,
|
|
1394
|
+
suggestedMeasure: {
|
|
1395
|
+
field: "id",
|
|
1396
|
+
aggregation: "count",
|
|
1397
|
+
alias: String(((_e = item.selection) == null ? void 0 : _e.alias) || "").trim() || "recordCount"
|
|
1398
|
+
},
|
|
1399
|
+
suggestedDimension: {
|
|
1400
|
+
field: fieldPath
|
|
1401
|
+
}
|
|
1402
|
+
})
|
|
1403
|
+
});
|
|
1404
|
+
continue;
|
|
1405
|
+
}
|
|
1406
|
+
if (unsupportedRelationSubfield) {
|
|
1407
|
+
pushAuthoringError(errors, {
|
|
1408
|
+
path: item.fieldPath,
|
|
1409
|
+
ruleId: "chart-builder-query-relation-subfield-column-unsupported",
|
|
1410
|
+
message: `flowSurfaces authoring ${item.fieldPath} references relation subfield '${fieldPath}', but current chart builder SQL generation cannot query relation subfield '${unsupportedRelationSubfield.leafFieldName}' because its database column is '${unsupportedRelationSubfield.columnName}'. ${(0, import_service_helpers.formatChartBuilderSupportedRelationSubfields)(
|
|
1411
|
+
associationPath,
|
|
1412
|
+
unsupportedRelationSubfield.supportedFields
|
|
1413
|
+
)}`,
|
|
1414
|
+
details: withChartRepairHint({
|
|
1415
|
+
fieldPath,
|
|
1416
|
+
dataSourceKey,
|
|
1417
|
+
collectionName,
|
|
1418
|
+
...unsupportedRelationSubfield
|
|
1419
|
+
})
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1306
1422
|
}
|
|
1307
1423
|
}
|
|
1308
1424
|
function resolveChartBuilderAssociationSubfieldSuggestion(fieldPath, field, dataSourceKey, getCollection) {
|
|
@@ -1402,8 +1518,8 @@ function collectChartAssetVisualErrors(asset, path, errors) {
|
|
|
1402
1518
|
pushAuthoringError(errors, {
|
|
1403
1519
|
path: `${path}.visual.type`,
|
|
1404
1520
|
ruleId: "chart-visual-type-unsupported",
|
|
1405
|
-
message: `flowSurfaces authoring ${path}.visual.type '${type}' is not supported
|
|
1406
|
-
details:
|
|
1521
|
+
message: `flowSurfaces authoring ${path}.visual.type '${type}' is not supported. Supported basic chart visual types: ${CHART_BASIC_VISUAL_TYPE_LIST}. If these types do not satisfy the requirement, use a jsBlock instead.`,
|
|
1522
|
+
details: withUnsupportedChartVisualTypeHint({
|
|
1407
1523
|
type
|
|
1408
1524
|
})
|
|
1409
1525
|
});
|
|
@@ -4237,6 +4353,23 @@ function collectUnsupportedDefaultFilterOperatorError(operator, path, errors) {
|
|
|
4237
4353
|
}
|
|
4238
4354
|
});
|
|
4239
4355
|
}
|
|
4356
|
+
function collectDefaultFilterDateValueError(operator, value, path, errors) {
|
|
4357
|
+
var _a, _b, _c;
|
|
4358
|
+
try {
|
|
4359
|
+
(0, import_filter_group.normalizeFlowSurfaceStrictFilterDateValue)(operator, value, path);
|
|
4360
|
+
} catch (error) {
|
|
4361
|
+
if (!(error instanceof import_errors.FlowSurfaceBadRequestError)) {
|
|
4362
|
+
throw error;
|
|
4363
|
+
}
|
|
4364
|
+
const details = _.isPlainObject((_a = error.options) == null ? void 0 : _a.details) ? error.options.details : {};
|
|
4365
|
+
pushAuthoringError(errors, {
|
|
4366
|
+
path: typeof ((_b = error.options) == null ? void 0 : _b.path) === "string" && error.options.path ? error.options.path : path,
|
|
4367
|
+
ruleId: typeof ((_c = error.options) == null ? void 0 : _c.ruleId) === "string" && error.options.ruleId ? error.options.ruleId : "filter-group-date-value-invalid",
|
|
4368
|
+
message: error.message,
|
|
4369
|
+
details
|
|
4370
|
+
});
|
|
4371
|
+
}
|
|
4372
|
+
}
|
|
4240
4373
|
function collectTopLevelLayoutErrors(actionName, values, errors) {
|
|
4241
4374
|
if (actionName !== "applyBlueprint") {
|
|
4242
4375
|
return;
|
|
@@ -4831,6 +4964,8 @@ function collectVisibleDataBlockFieldErrors(block, blockType, path, errors, cont
|
|
|
4831
4964
|
blockType,
|
|
4832
4965
|
collection: getBlockCollectionName(block, context),
|
|
4833
4966
|
fieldCount: fieldEntries.length,
|
|
4967
|
+
repairHint: VISIBLE_DATA_BLOCK_FIELDS_REPAIR_HINT,
|
|
4968
|
+
agentInstruction: REPAIR_ALL_ERRORS_AGENT_INSTRUCTION,
|
|
4834
4969
|
...suggestedFields.length ? { suggestion: { fields: suggestedFields } } : {}
|
|
4835
4970
|
}
|
|
4836
4971
|
});
|
|
@@ -4864,6 +4999,8 @@ function collectVisibleDataBlockFieldErrors(block, blockType, path, errors, cont
|
|
|
4864
4999
|
fieldCount: validBusinessFieldNames.length,
|
|
4865
5000
|
requiredFieldCount,
|
|
4866
5001
|
eligibleBusinessFieldCount: eligibleBusinessFields.length,
|
|
5002
|
+
repairHint: VISIBLE_DATA_BLOCK_FIELDS_REPAIR_HINT,
|
|
5003
|
+
agentInstruction: REPAIR_ALL_ERRORS_AGENT_INSTRUCTION,
|
|
4867
5004
|
suggestion: {
|
|
4868
5005
|
fields: eligibleBusinessFields.slice(0, requiredFieldCount)
|
|
4869
5006
|
}
|
|
@@ -5260,6 +5397,7 @@ function visitFilterItems(value, path, errors, block, context = {}) {
|
|
|
5260
5397
|
}
|
|
5261
5398
|
if (typeof value.operator === "string") {
|
|
5262
5399
|
collectUnsupportedDefaultFilterOperatorError(value.operator, `${path}.operator`, errors);
|
|
5400
|
+
collectDefaultFilterDateValueError(value.operator, value.value, `${path}.value`, errors);
|
|
5263
5401
|
}
|
|
5264
5402
|
const filterItems = value.items;
|
|
5265
5403
|
if (Array.isArray(filterItems)) {
|
|
@@ -5283,8 +5421,9 @@ function visitFilterItems(value, path, errors, block, context = {}) {
|
|
|
5283
5421
|
}
|
|
5284
5422
|
collectDefaultFilterFieldPathError(key, `${path}.${key}`, block, context, errors);
|
|
5285
5423
|
if (_.isPlainObject(child)) {
|
|
5286
|
-
Object.
|
|
5424
|
+
Object.entries(child).forEach(([operator, operatorValue]) => {
|
|
5287
5425
|
collectUnsupportedDefaultFilterOperatorError(operator, `${path}.${key}.${operator}`, errors);
|
|
5426
|
+
collectDefaultFilterDateValueError(operator, operatorValue, `${path}.${key}.${operator}`, errors);
|
|
5288
5427
|
});
|
|
5289
5428
|
}
|
|
5290
5429
|
});
|
|
@@ -6812,18 +6951,18 @@ function getRecordHistoryDeclaredFilterTargetKey(collection) {
|
|
|
6812
6951
|
return String(raw || "").trim();
|
|
6813
6952
|
}
|
|
6814
6953
|
function collectionHasConcreteField(collection, fieldName) {
|
|
6815
|
-
var _a, _b, _c
|
|
6954
|
+
var _a, _b, _c;
|
|
6816
6955
|
const normalized = String(fieldName || "").trim();
|
|
6817
6956
|
if (!normalized) {
|
|
6818
6957
|
return false;
|
|
6819
6958
|
}
|
|
6820
|
-
const modelAttributes = (
|
|
6959
|
+
const modelAttributes = (0, import_service_helpers.getCollectionModelAttributes)(collection);
|
|
6821
6960
|
const primaryKeyAttributes = _.castArray(
|
|
6822
|
-
((
|
|
6961
|
+
((_a = collection == null ? void 0 : collection.model) == null ? void 0 : _a.primaryKeyAttributes) || ((_b = collection == null ? void 0 : collection.model) == null ? void 0 : _b.primaryKeyAttribute) || []
|
|
6823
6962
|
);
|
|
6824
6963
|
const modelAttribute = modelAttributes == null ? void 0 : modelAttributes[normalized];
|
|
6825
6964
|
const isModelPrimaryKey = primaryKeyAttributes.includes(normalized) || !!(modelAttribute == null ? void 0 : modelAttribute.primaryKey);
|
|
6826
|
-
return !!((0, import_service_helpers.resolveFieldFromCollection)(collection, normalized) || ((
|
|
6965
|
+
return !!((0, import_service_helpers.resolveFieldFromCollection)(collection, normalized) || ((_c = collection == null ? void 0 : collection.getField) == null ? void 0 : _c.call(collection, normalized)) || (0, import_service_helpers.getCollectionFields)(collection).some((field) => (0, import_service_helpers.getFieldName)(field) === normalized) || isModelPrimaryKey);
|
|
6827
6966
|
}
|
|
6828
6967
|
function collectDefaultFilterFieldPathError(rawFieldPath, path, block, context, errors) {
|
|
6829
6968
|
const fieldPath = String(rawFieldPath || "").trim();
|
|
@@ -119,6 +119,10 @@ const FILTER_GROUP_SCHEMA = {
|
|
|
119
119
|
additionalProperties: false,
|
|
120
120
|
"x-flowSurfaceFormat": "filter-group"
|
|
121
121
|
};
|
|
122
|
+
const LINKAGE_RULES_SCHEMA = {
|
|
123
|
+
type: "array",
|
|
124
|
+
"x-flowSurfaceFormat": "linkage-rules"
|
|
125
|
+
};
|
|
122
126
|
const DEFAULT_DIRECT_EVENTS = ["beforeRender"];
|
|
123
127
|
const ACTION_DIRECT_EVENTS = ["click", "beforeRender"];
|
|
124
128
|
const ACTION_OBJECT_EVENTS = ["click"];
|
|
@@ -207,7 +211,7 @@ const ACTION_BUTTON_SETTINGS_GROUP = {
|
|
|
207
211
|
"general.type": STRING_SCHEMA,
|
|
208
212
|
"general.danger": BOOLEAN_SCHEMA,
|
|
209
213
|
"general.color": STRING_SCHEMA,
|
|
210
|
-
"linkageRules.value":
|
|
214
|
+
"linkageRules.value": LINKAGE_RULES_SCHEMA
|
|
211
215
|
}
|
|
212
216
|
};
|
|
213
217
|
const TRIGGER_WORKFLOWS_SETTINGS_GROUP = {
|
|
@@ -302,7 +306,7 @@ const EVENT_SETTINGS_GROUP = {
|
|
|
302
306
|
allowedPaths: ["linkageRules.value"],
|
|
303
307
|
eventBindingSteps: ["linkageRules"],
|
|
304
308
|
pathSchemas: {
|
|
305
|
-
"linkageRules.value":
|
|
309
|
+
"linkageRules.value": LINKAGE_RULES_SCHEMA
|
|
306
310
|
}
|
|
307
311
|
};
|
|
308
312
|
const CREATE_FORM_SETTINGS_EVENT_ONLY_GROUP = {
|
|
@@ -323,7 +327,7 @@ const DETAILS_SETTINGS_GROUP = {
|
|
|
323
327
|
...FORM_LAYOUT_PATH_SCHEMAS,
|
|
324
328
|
"dataScope.filter": FILTER_GROUP_SCHEMA,
|
|
325
329
|
"defaultSorting.sort": ARRAY_SCHEMA,
|
|
326
|
-
"linkageRules.value":
|
|
330
|
+
"linkageRules.value": LINKAGE_RULES_SCHEMA
|
|
327
331
|
}
|
|
328
332
|
};
|
|
329
333
|
const FILTER_FORM_BLOCK_SETTINGS_GROUP = {
|
|
@@ -350,7 +354,7 @@ const BLOCK_CARD_SETTINGS_GROUP = {
|
|
|
350
354
|
"titleDescription.description": STRING_SCHEMA,
|
|
351
355
|
"blockHeight.heightMode": BLOCK_HEIGHT_MODE_SCHEMA,
|
|
352
356
|
"blockHeight.height": NUMBER_SCHEMA,
|
|
353
|
-
"linkageRules.value":
|
|
357
|
+
"linkageRules.value": LINKAGE_RULES_SCHEMA
|
|
354
358
|
}
|
|
355
359
|
};
|
|
356
360
|
const CALENDAR_SETTINGS_GROUP = {
|
|
@@ -2191,7 +2195,7 @@ CALENDAR_READONLY_ACTION_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
2191
2195
|
mergeStrategy: "deep",
|
|
2192
2196
|
eventBindingSteps: ["linkageRules"],
|
|
2193
2197
|
pathSchemas: {
|
|
2194
|
-
"linkageRules.value":
|
|
2198
|
+
"linkageRules.value": LINKAGE_RULES_SCHEMA
|
|
2195
2199
|
}
|
|
2196
2200
|
}
|
|
2197
2201
|
});
|
|
@@ -455,6 +455,17 @@ function normalizeFieldPathValue(input, label, options = {}) {
|
|
|
455
455
|
}
|
|
456
456
|
throw new import_errors.FlowSurfaceBadRequestError(`${label} must be a string or string[]`);
|
|
457
457
|
}
|
|
458
|
+
function normalizeChartQueryFieldPathValue(input, label, options = {}) {
|
|
459
|
+
const normalized = normalizeFieldPathValue(input, label, options);
|
|
460
|
+
if (typeof normalized !== "string" || !normalized.includes(".")) {
|
|
461
|
+
return normalized;
|
|
462
|
+
}
|
|
463
|
+
const segments = normalized.split(".").map((segment) => segment.trim());
|
|
464
|
+
if (segments.some((segment) => !segment)) {
|
|
465
|
+
throw new import_errors.FlowSurfaceBadRequestError(`${label} cannot contain empty path segments`);
|
|
466
|
+
}
|
|
467
|
+
return segments;
|
|
468
|
+
}
|
|
458
469
|
function aliasOfFieldValue(input) {
|
|
459
470
|
if (Array.isArray(input)) {
|
|
460
471
|
return input.filter(Boolean).map((item) => String(item)).join(".");
|
|
@@ -562,25 +573,29 @@ function normalizeMergedChartResource(query, options = {}) {
|
|
|
562
573
|
function normalizeChartMeasure(input, index) {
|
|
563
574
|
const label = `chart query.measures[${index}]`;
|
|
564
575
|
const normalized = ensurePlainObject(input, label);
|
|
576
|
+
const field = normalizeChartQueryFieldPathValue(normalized.field, `${label}.field`, { required: true });
|
|
577
|
+
const alias = normalizeOptionalTrimmedString(normalized.alias, `${label}.alias`);
|
|
565
578
|
const aggregation = normalizeOptionalEnumValue(
|
|
566
579
|
normalized.aggregation,
|
|
567
580
|
CHART_QUERY_AGGREGATION_SET,
|
|
568
581
|
`${label}.aggregation`
|
|
569
582
|
);
|
|
570
583
|
return buildDefinedObject({
|
|
571
|
-
field
|
|
584
|
+
field,
|
|
572
585
|
aggregation,
|
|
573
|
-
alias:
|
|
586
|
+
alias: alias || (Array.isArray(field) && field.length > 1 ? aliasOfFieldValue(field) : void 0),
|
|
574
587
|
distinct: normalizeOptionalBoolean(normalized.distinct, `${label}.distinct`)
|
|
575
588
|
});
|
|
576
589
|
}
|
|
577
590
|
function normalizeChartDimension(input, index) {
|
|
578
591
|
const label = `chart query.dimensions[${index}]`;
|
|
579
592
|
const normalized = ensurePlainObject(input, label);
|
|
593
|
+
const field = normalizeChartQueryFieldPathValue(normalized.field, `${label}.field`, { required: true });
|
|
594
|
+
const alias = normalizeOptionalTrimmedString(normalized.alias, `${label}.alias`);
|
|
580
595
|
return buildDefinedObject({
|
|
581
|
-
field
|
|
596
|
+
field,
|
|
582
597
|
format: normalizeOptionalTrimmedString(normalized.format, `${label}.format`),
|
|
583
|
-
alias:
|
|
598
|
+
alias: alias || (Array.isArray(field) && field.length > 1 ? aliasOfFieldValue(field) : void 0)
|
|
584
599
|
});
|
|
585
600
|
}
|
|
586
601
|
function normalizeBuilderCountMeasureFieldForRuntime(measure, dimensions) {
|
|
@@ -591,6 +606,12 @@ function normalizeBuilderCountMeasureFieldForRuntime(measure, dimensions) {
|
|
|
591
606
|
if (!fallbackDimension) {
|
|
592
607
|
return measure;
|
|
593
608
|
}
|
|
609
|
+
if (Array.isArray(fallbackDimension.field) && fallbackDimension.field.length > 1) {
|
|
610
|
+
return measure;
|
|
611
|
+
}
|
|
612
|
+
if (typeof fallbackDimension.field === "string" && fallbackDimension.field.includes(".")) {
|
|
613
|
+
return measure;
|
|
614
|
+
}
|
|
594
615
|
return {
|
|
595
616
|
...measure,
|
|
596
617
|
field: import_lodash.default.cloneDeep(fallbackDimension.field)
|
|
@@ -605,7 +626,7 @@ function normalizeChartSortingItem(input, index) {
|
|
|
605
626
|
`${label}.${hasOwn(normalized, "direction") ? "direction" : "order"}`
|
|
606
627
|
);
|
|
607
628
|
return buildDefinedObject({
|
|
608
|
-
field:
|
|
629
|
+
field: normalizeChartQueryFieldPathValue(normalized.field, `${label}.field`, { required: true }),
|
|
609
630
|
order: toPersistedOrder(direction),
|
|
610
631
|
nulls: normalizeOptionalEnumValue(normalized.nulls, CHART_SORT_NULLS_SET, `${label}.nulls`)
|
|
611
632
|
});
|
|
@@ -707,7 +728,9 @@ function normalizeFilterGroupValue(input, label) {
|
|
|
707
728
|
}
|
|
708
729
|
const normalized = ensurePlainObject(input, label);
|
|
709
730
|
assertFilterGroupKeys(normalized, label);
|
|
710
|
-
const filterGroup = !Object.keys(normalized).length || isFilterGroupLike(normalized) ? (0, import_filter_group.normalizeFlowSurfaceFilterGroupValue)(normalized, label) : (0, import_filter_group.normalizeFlowSurfaceFilterGroupValue)(convertBackendQueryFilterToFilterGroup(normalized, label), label
|
|
731
|
+
const filterGroup = !Object.keys(normalized).length || isFilterGroupLike(normalized) ? (0, import_filter_group.normalizeFlowSurfaceFilterGroupValue)(normalized, label, { strictDateValues: true }) : (0, import_filter_group.normalizeFlowSurfaceFilterGroupValue)(convertBackendQueryFilterToFilterGroup(normalized, label), label, {
|
|
732
|
+
strictDateValues: true
|
|
733
|
+
});
|
|
711
734
|
validateFilterGroupPaths(filterGroup, label);
|
|
712
735
|
return filterGroup;
|
|
713
736
|
}
|