@vertigis/workflow 5.31.1 → 5.32.1
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/amd/Errors.js +1 -1
- package/amd/Validation.js +1 -1
- package/amd/activities/arcgis/AddFeatureLayer.js +1 -1
- package/amd/activities/arcgis/AddFeatures.js +1 -1
- package/amd/activities/arcgis/AddGraphics.js +1 -1
- package/amd/activities/arcgis/DeleteFeatures.js +1 -1
- package/amd/activities/arcgis/GetViewExtent.js +1 -1
- package/amd/activities/arcgis/MapProvider.js +1 -1
- package/amd/activities/arcgis/RemoveFeatureSetFields.js +1 -1
- package/amd/activities/arcgis/RemoveGraphics.js +1 -1
- package/amd/activities/arcgis/RunPrint.js +1 -1
- package/amd/activities/arcgis/RunReport.d.ts +1 -0
- package/amd/activities/arcgis/RunReport.js +1 -1
- package/amd/activities/arcgis/RunWorkflow.js +1 -1
- package/amd/activities/arcgis/SetLayerDefinitionExpression.js +1 -1
- package/amd/activities/arcgis/SetViewpoint.js +1 -1
- package/amd/activities/arcgis/ShowResults.js +1 -1
- package/amd/activities/arcgis/UpdateFeatures.js +1 -1
- package/amd/activities/arcgis/runUtils.js +1 -1
- package/amd/activities/arcgis/shared.js +1 -1
- package/amd/activities/core/ForEach.js +1 -1
- package/amd/activities/core/ParseUrl.js +1 -1
- package/amd/activities/forms/FormRenderer.d.ts +0 -1
- package/amd/activities/forms/FormRenderer.js +1 -1
- package/amd/amdpile.js +1 -1
- package/amd/amdpile.js.LICENSE.txt +12 -3
- package/amd/app/AppActivity.d.ts +47 -3
- package/amd/app/AppActivity.js +1 -1
- package/amd/app/RegisterCustomFormElementBase.d.ts +11 -1
- package/amd/bundle.js +1 -1
- package/amd/deps/react/index.min.js +2 -0
- package/amd/deps/react/index.min.js.LICENSE.txt +14 -0
- package/amd/execution/ProgramRunner.js +1 -1
- package/amd/forms/FormComponent.d.ts +2 -2
- package/amd/forms/FormComponent.js +1 -1
- package/amd/forms/FormDefinition.d.ts +1 -1
- package/amd/forms/FormElementOuter.d.ts +3 -2
- package/amd/forms/FormElementOuter.js +1 -1
- package/amd/forms/FormHost.js +1 -1
- package/amd/forms/assets/arrow.js +1 -1
- package/amd/forms/assets/chevron.js +1 -1
- package/amd/forms/assets/cross.js +1 -1
- package/amd/forms/assets/datetime.js +1 -1
- package/amd/forms/assets/remove.js +1 -1
- package/amd/forms/assets/scan.js +1 -1
- package/amd/forms/common.js +1 -1
- package/amd/forms/components/DatePicker.d.ts +1 -1
- package/amd/forms/components/DatePicker.js +1 -1
- package/amd/forms/components/DateRangePicker.d.ts +1 -1
- package/amd/forms/components/DateRangePicker.js +1 -1
- package/amd/forms/components/DateTimePicker.js +1 -1
- package/amd/forms/components/Navigator.js +1 -1
- package/amd/forms/components/NumberRangeSlider.d.ts +1 -1
- package/amd/forms/components/NumberRangeSlider.js +1 -1
- package/amd/forms/components/NumberSlider.d.ts +1 -1
- package/amd/forms/components/NumberSlider.js +1 -1
- package/amd/forms/components/SyntheticButton.js +1 -1
- package/amd/forms/components/TimePickerInput.d.ts +1 -1
- package/amd/forms/components/TimePickerInput.js +1 -1
- package/amd/forms/dateUtilities.js +1 -1
- package/amd/forms/datetime.js +1 -1
- package/amd/forms/files.js +1 -1
- package/amd/forms/geometry.js +1 -1
- package/amd/forms/number.d.ts +1 -1
- package/amd/forms/number.js +1 -1
- package/amd/forms/numberSliderUtilities.js +1 -1
- package/amd/forms/presenter.js +1 -1
- package/amd/forms/renderers.js +1 -1
- package/amd/forms/scanner.js +1 -1
- package/amd/forms/selectors.js +1 -1
- package/amd/forms/text.js +1 -1
- package/amd/forms/utils.js +1 -1
- package/amd/libs/version.d.ts +1 -1
- package/amd/libs/version.js +1 -1
- package/amd/licensing/LicenseChecker.js +1 -1
- package/amd/licensing/Watermark.js +1 -1
- package/esm/Errors.js +1 -1
- package/esm/Validation.js +1 -1
- package/esm/activities/arcgis/AddFeatureLayer.js +1 -1
- package/esm/activities/arcgis/AddFeatures.js +1 -1
- package/esm/activities/arcgis/AddGraphics.js +1 -1
- package/esm/activities/arcgis/CreateFeatureSet.js +1 -1
- package/esm/activities/arcgis/DeleteFeatures.js +1 -1
- package/esm/activities/arcgis/Geoprocessing.js +1 -1
- package/esm/activities/arcgis/GeoprocessingAsync.js +1 -1
- package/esm/activities/arcgis/GetCodedValueDomain.js +1 -1
- package/esm/activities/arcgis/GetViewExtent.js +1 -1
- package/esm/activities/arcgis/MapProvider.js +1 -1
- package/esm/activities/arcgis/RemoveFeatureSetFields.js +1 -1
- package/esm/activities/arcgis/RemoveGraphics.js +1 -1
- package/esm/activities/arcgis/RunPrint.js +1 -1
- package/esm/activities/arcgis/RunReport.d.ts +1 -0
- package/esm/activities/arcgis/RunReport.js +1 -1
- package/esm/activities/arcgis/RunWorkflow.js +1 -1
- package/esm/activities/arcgis/SetViewpoint.js +1 -1
- package/esm/activities/arcgis/ShowResults.js +1 -1
- package/esm/activities/arcgis/UpdateFeatures.js +1 -1
- package/esm/activities/arcgis/runUtils.js +1 -1
- package/esm/activities/arcgis/shared.js +1 -1
- package/esm/activities/core/ForEach.js +1 -1
- package/esm/activities/core/ParseUrl.js +1 -1
- package/esm/activities/core/Subworkflow.js +1 -1
- package/esm/activities/forms/FormRenderer.d.ts +0 -1
- package/esm/activities/forms/FormRenderer.js +1 -1
- package/esm/app/ActivityPackUtils.js +1 -1
- package/esm/app/AppActivity.d.ts +47 -3
- package/esm/app/AppActivity.js +1 -1
- package/esm/app/RegisterCustomFormElementBase.d.ts +11 -1
- package/esm/app/RegisterCustomFormElementBase.js +1 -1
- package/esm/deps/react/index.min.js +2 -0
- package/esm/deps/react/index.min.js.LICENSE.txt +14 -0
- package/esm/execution/ProgramRunner.js +1 -1
- package/esm/forms/FormComponent.d.ts +2 -2
- package/esm/forms/FormComponent.js +1 -1
- package/esm/forms/FormDefinition.d.ts +1 -1
- package/esm/forms/FormElementOuter.d.ts +3 -2
- package/esm/forms/FormElementOuter.js +1 -1
- package/esm/forms/FormHost.js +1 -1
- package/esm/forms/assets/arrow.js +1 -1
- package/esm/forms/assets/chevron.js +1 -1
- package/esm/forms/assets/cross.js +1 -1
- package/esm/forms/assets/datetime.js +1 -1
- package/esm/forms/assets/remove.js +1 -1
- package/esm/forms/assets/scan.js +1 -1
- package/esm/forms/common.js +1 -1
- package/esm/forms/components/DatePicker.d.ts +1 -1
- package/esm/forms/components/DatePicker.js +1 -1
- package/esm/forms/components/DateRangePicker.d.ts +1 -1
- package/esm/forms/components/DateRangePicker.js +1 -1
- package/esm/forms/components/DateTimePicker.js +1 -1
- package/esm/forms/components/Navigator.js +1 -1
- package/esm/forms/components/NumberRangeSlider.d.ts +1 -1
- package/esm/forms/components/NumberRangeSlider.js +1 -1
- package/esm/forms/components/NumberSlider.d.ts +1 -1
- package/esm/forms/components/NumberSlider.js +1 -1
- package/esm/forms/components/SyntheticButton.js +1 -1
- package/esm/forms/components/TimePickerInput.d.ts +1 -1
- package/esm/forms/components/TimePickerInput.js +1 -1
- package/esm/forms/dateUtilities.js +1 -1
- package/esm/forms/datetime.js +1 -1
- package/esm/forms/files.js +1 -1
- package/esm/forms/geometry.js +1 -1
- package/esm/forms/number.d.ts +1 -1
- package/esm/forms/number.js +1 -1
- package/esm/forms/numberFormatter.js +1 -1
- package/esm/forms/numberSliderUtilities.js +1 -1
- package/esm/forms/presenter.js +1 -1
- package/esm/forms/renderers.js +1 -1
- package/esm/forms/scanner.js +1 -1
- package/esm/forms/selectors.js +1 -1
- package/esm/forms/text.js +1 -1
- package/esm/forms/utils.js +1 -1
- package/esm/libs/version.d.ts +1 -1
- package/esm/libs/version.js +1 -1
- package/esm/licensing/LicenseChecker.js +1 -1
- package/esm/licensing/Watermark.js +1 -1
- package/package.json +13 -8
- package/runtime/Errors.js +1 -1
- package/runtime/Validation.js +1 -1
- package/runtime/activities/arcgis/AddFeatureLayer.js +1 -1
- package/runtime/activities/arcgis/AddFeatures.js +1 -1
- package/runtime/activities/arcgis/AddGraphics.js +1 -1
- package/runtime/activities/arcgis/DeleteFeatures.js +1 -1
- package/runtime/activities/arcgis/GetViewExtent.js +1 -1
- package/runtime/activities/arcgis/MapProvider.js +1 -1
- package/runtime/activities/arcgis/RemoveFeatureSetFields.js +1 -1
- package/runtime/activities/arcgis/RemoveGraphics.js +1 -1
- package/runtime/activities/arcgis/RunPrint.js +1 -1
- package/runtime/activities/arcgis/RunReport.d.ts +1 -0
- package/runtime/activities/arcgis/RunReport.js +1 -1
- package/runtime/activities/arcgis/RunWorkflow.js +1 -1
- package/runtime/activities/arcgis/SetLayerDefinitionExpression.js +1 -1
- package/runtime/activities/arcgis/SetViewpoint.js +1 -1
- package/runtime/activities/arcgis/ShowResults.js +1 -1
- package/runtime/activities/arcgis/UpdateFeatures.js +1 -1
- package/runtime/activities/arcgis/runUtils.js +1 -1
- package/runtime/activities/arcgis/shared.js +1 -1
- package/runtime/activities/core/ForEach.js +1 -1
- package/runtime/activities/core/ParseUrl.js +1 -1
- package/runtime/activities/forms/FormRenderer.d.ts +0 -1
- package/runtime/activities/forms/FormRenderer.js +1 -1
- package/runtime/amdpile.js +1 -1
- package/runtime/amdpile.js.LICENSE.txt +12 -3
- package/runtime/app/AppActivity.d.ts +47 -3
- package/runtime/app/AppActivity.js +1 -1
- package/runtime/app/RegisterCustomFormElementBase.d.ts +11 -1
- package/runtime/bundle.js +1 -1
- package/runtime/deps/react/index.min.js +2 -0
- package/runtime/deps/react/index.min.js.LICENSE.txt +14 -0
- package/runtime/execution/ProgramRunner.js +1 -1
- package/runtime/forms/FormComponent.d.ts +2 -2
- package/runtime/forms/FormComponent.js +1 -1
- package/runtime/forms/FormDefinition.d.ts +1 -1
- package/runtime/forms/FormElementOuter.d.ts +3 -2
- package/runtime/forms/FormElementOuter.js +1 -1
- package/runtime/forms/FormHost.js +1 -1
- package/runtime/forms/assets/arrow.js +1 -1
- package/runtime/forms/assets/chevron.js +1 -1
- package/runtime/forms/assets/cross.js +1 -1
- package/runtime/forms/assets/datetime.js +1 -1
- package/runtime/forms/assets/remove.js +1 -1
- package/runtime/forms/assets/scan.js +1 -1
- package/runtime/forms/common.js +1 -1
- package/runtime/forms/components/DatePicker.d.ts +1 -1
- package/runtime/forms/components/DatePicker.js +1 -1
- package/runtime/forms/components/DateRangePicker.d.ts +1 -1
- package/runtime/forms/components/DateRangePicker.js +1 -1
- package/runtime/forms/components/DateTimePicker.js +1 -1
- package/runtime/forms/components/Navigator.js +1 -1
- package/runtime/forms/components/NumberRangeSlider.d.ts +1 -1
- package/runtime/forms/components/NumberRangeSlider.js +1 -1
- package/runtime/forms/components/NumberSlider.d.ts +1 -1
- package/runtime/forms/components/NumberSlider.js +1 -1
- package/runtime/forms/components/SyntheticButton.js +1 -1
- package/runtime/forms/components/TimePickerInput.d.ts +1 -1
- package/runtime/forms/components/TimePickerInput.js +1 -1
- package/runtime/forms/dateUtilities.js +1 -1
- package/runtime/forms/datetime.js +1 -1
- package/runtime/forms/files.js +1 -1
- package/runtime/forms/geometry.js +1 -1
- package/runtime/forms/number.d.ts +1 -1
- package/runtime/forms/number.js +1 -1
- package/runtime/forms/numberSliderUtilities.js +1 -1
- package/runtime/forms/presenter.js +1 -1
- package/runtime/forms/renderers.js +1 -1
- package/runtime/forms/scanner.js +1 -1
- package/runtime/forms/selectors.js +1 -1
- package/runtime/forms/text.js +1 -1
- package/runtime/forms/utils.js +1 -1
- package/runtime/libs/version.d.ts +1 -1
- package/runtime/libs/version.js +1 -1
- package/runtime/licensing/LicenseChecker.js +1 -1
- package/runtime/licensing/Watermark.js +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see index.min.js.LICENSE.txt */
|
|
2
|
+
define(["react"],(r=>(()=>{"use strict";var e={418:r=>{var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(r){if(null==r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}r.exports=function(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(r){return e[r]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(r){n[r]=r})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}()?Object.assign:function(r,a){for(var f,c,i=o(r),s=1;s<arguments.length;s++){for(var p in f=Object(arguments[s]))t.call(f,p)&&(i[p]=f[p]);if(e){c=e(f);for(var u=0;u<c.length;u++)n.call(f,c[u])&&(i[c[u]]=f[c[u]])}}return i}},251:(r,e,t)=>{t(418);var n=t(650),o=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),e.Fragment=a("react.fragment")}var f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function s(r,e,t){var n,a={},s=null,p=null;for(n in void 0!==t&&(s=""+t),void 0!==e.key&&(s=""+e.key),void 0!==e.ref&&(p=e.ref),e)c.call(e,n)&&!i.hasOwnProperty(n)&&(a[n]=e[n]);if(r&&r.defaultProps)for(n in e=r.defaultProps)void 0===a[n]&&(a[n]=e[n]);return{$$typeof:o,type:r,key:s,ref:p,props:a,_owner:f.current}}e.jsx=s,e.jsxs=s},893:(r,e,t)=>{r.exports=t(251)},650:e=>{e.exports=r}},t={};return function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(893)})()));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","../Errors","../Hooks","../Task","../deps/bluebird_fork"],function(t,e,l,p,s,f,h){"use strict";function i(t,e){var t=f.Task.race([new f.Task(e),t]),r=new AbortController;return t.signal=r.signal,t.finally(function(){return r.abort()}),t}function a(t){return null==t||"function"!=typeof t.execute}function v(t){switch(typeof t){case"boolean":case"number":case"string":return 1}}Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.clearExpressionCache=void 0,h=(0,l.__importDefault)(h);var d={};e.clearExpressionCache=function(){d={}};var y=["resources","values","Date","Math","Object","parseInt","parseFloat","decodeURIComponent","encodeURIComponent"];function g(t,e){var r=t.code,n=d[r];if(void 0===n){var i=[],o={};i.push('"use strict"; ');var s=t.accessors;if(Array.isArray(s))for(var a=0,c=s;a<c.length;a++){var u=c[a];!function(e){return!("string"!=typeof e||e.length<1)&&(!(0<=e.indexOf("."))&&!y.some(function(t){return t===e}))}(u)||o[u]||(i.push("var ".concat(u," = this.").concat(u,";")),o[u]=!0)}i.push("return "),i.push(r),i.push(";"),n=d[r]=new Function("resources","values",i.join(""))}return function(){return n.call(this,e,t.values)}}var r,n,c={execute:function(t){return t}};function m(t,e){return(0,l.__assign)((0,l.__assign)({},t||{}),e||{})}function o(t){return void 0!==t}function u(t){return t.filter(o)}function b(t){return t.isPending()?t.then(u):t.isFulfilled()?h.default.resolve(u(t.value())):t}function E(){return void 0===(r=void 0!==r&&1073741824<=r?void 0:r)&&(r=0,n=(new Date).valueOf()+":"),n+r++}var x,j=h.default.resolve(void 0),k=!0,w=function(t){Object.defineProperty(this,"target",{get:function(){if(!1===k)return k=!0,t}})},A=(x=w,(0,l.__extends)(P,x),Object.defineProperty(P.prototype,"outputs",{get:function(){return k=!1,this.target.outputs},set:function(t){k=!1,this.target.outputs=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"error",{get:function(){return k=!1,this.target.error},set:function(t){k=!1,this.target.error=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"completion",{get:function(){return k=!1,this.target.completion},enumerable:!1,configurable:!0}),P.prototype.complete=function(t){return k=!1,this.target.complete(t)},P.prototype.reject=function(t){return k=!1,this.target.reject(t)},Object.defineProperty(P.prototype,"environment",{get:function(){return k=!1,this.target.environment},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"inputs",{get:function(){return k=!1,this.target.inputs},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"activityContexts",{get:function(){return k=!1,this.target.activityContexts},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"locale",{get:function(){return k=!1,this.target.locale},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"resources",{get:function(){return k=!1,this.target.resources},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"trivia",{get:function(){return k=!1,this.target.trivia},enumerable:!1,configurable:!0}),P);function P(){return null!==x&&x.apply(this,arguments)||this}var I,T=(I=w,(0,l.__extends)(O,I),Object.defineProperty(O.prototype,"luid",{get:function(){return k=!1,this.target.luid},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"ambient",{get:function(){return k=!1,this.target.ambient.proxy},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"action",{get:function(){return k=!1,this.target.action},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"branch",{get:function(){return k=!1,this.target.branch},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"cancellationToken",{get:function(){return k=!1,this.target.cancellationToken},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"passes",{get:function(){return k=!1,this.target.passes},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"caught",{get:function(){return k=!1,this.target.caught},enumerable:!1,configurable:!0}),O.prototype.call=function(t){return k=!1,this.target.call(t)},O.prototype.fork=function(t){return k=!1,this.target.fork(t)},O.prototype.jump=function(t){return k=!1,this.target.jump(t)},O.prototype.hasBranch=function(t){return k=!1,this.target.hasBranch(t)},Object.defineProperty(O.prototype,"state",{get:function(){return k=!1,this.target.state},enumerable:!1,configurable:!0}),O.prototype.registerForErrors=function(){return k=!1,this.target.registerForErrors()},O.prototype.persist=function(t){return k=!1,this.target.persist(t)},O.prototype.goto=function(){return k=!1,this.target.goto()},O);function O(){return null!==I&&I.apply(this,arguments)||this}var _=(Object.defineProperty(R.prototype,"activityContexts",{get:function(){for(var t={},e=0,r=(0,l.__spreadArray)((0,l.__spreadArray)([],this.stack,!0),[this.frame],!1);e<r.length;e++){var n,i=r[e];for(n in i.state)"$$"===n.substring(0,2)&&(t[n]=i.state[n])}return t},enumerable:!1,configurable:!0}),R.prototype.break=function(){this.halted=!0},R.prototype.continue=function(){var e=this;this.halted=!1,void 0!==this.scheduler&&!this.scheduler.isFulfilled()||(this.scheduler=j.then(function(t){e.execute()}))},R.prototype.execute=function(t){if(this.inline)return!1;this.inline=!0;try{void 0!==t&&t();for(var e=this.completion;e.isPending();){if(this.halted)return!1;var r=this.frame.current.execute();if(r.isPending())break;r.isRejected()&&this.fail(r.reason())}}catch(t){this.fail(t)}finally{this.inline=!1}return!0},R.prototype.complete=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.resolveCompletion(t||this.outputs))},R.prototype.reject=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(t||this.error))},R.prototype.fail=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.EngineRuntimeError(t)))},R.prototype.cancel=function(){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.ActivityCancellationError))},R.prototype.push=function(){var t=this.stack;t.push(this.frame);var e=this.frame=new B;return e.index=t.length,e},R.prototype.pop=function(t){var e=this.frame;void 0===e||(e.current=void 0)!==(r=e.cancellationResolve)&&r();var r=this.frame=this.stack.pop();return void 0===r&&(void 0!==t?this.reject(t):this.complete()),r},R.prototype.call=function(){var t=this.frame,e=this.push();e.cancellationToken=t.cancellationToken,e.state=t.state},R.prototype.fork=function(){var e=this.push();e.cancellationToken=i(this.cancellationToken,function(t){return e.cancellationResolve=t}),e.state={}},R.prototype.bubble=function(t){for(var e,r=this.pop(t);void 0!==r&&!r.current.registeredForErrors;)r=this.pop(t);void 0!==r&&(e=r.current,this.start(e.activity,e,t))},R.prototype.next=function(){var t=this.queue.pop();void 0!==t?this.attempt(t):void 0!==(t=this.pop())&&(t=t.current,this.start(t.activity,t))},R.prototype.prepare=function(e,t,r){var n=e.frame=this.frame;(n.current=e).luid=this.id+":"+e.activity.id,e.action=e.activity.action,e.ambient=this,e.id=E(),e.caught=r,e.cancellationToken=i(n.cancellationToken,function(t){return e.cancellationResolve=t}),e.proxy=new T(e),void 0!==t?(t=(n=e.recent=t.recent||(t.recent={})).context||t,(n.context=e).passes=t.passes+1,e.stateToPersist=e.state=t.stateToPersist):e.passes=0},R.prototype.attempt=function(t){var e=new D;e.activity=t,e.branch=t.branch,this.prepare(e)},R.prototype.start=function(t,e,r){var n=new(t.async?U:$);n.activity=t,n.monikers.push("$"),this.prepare(n,e,r)},R.prototype.enqueue=function(t,e){var r=this.inspector;this.queue=r.relate(t,e).list(),this.next()},R.prototype.goto=function(t){for(var e=this.stack,r=t.index;e[r]===t;)this.pop();return t===this.frame},R);function R(){this.frame=new B,this.stack=[],this.handlers={}}var B=function(){},C=function(){},w=(F.prototype.registerForErrors=function(){this.registeredForErrors=!0},F.prototype.persist=function(t){this.stateToPersist=t},F.prototype.call=function(t){this.callBranch=!0,this.forkBranch=!1,this.jumpBranch=t},F.prototype.fork=function(t){this.callBranch=!1,this.forkBranch=!0,this.jumpBranch=t},F.prototype.jump=function(t){this.callBranch=!1,this.forkBranch=!1,this.jumpBranch=t},F.prototype.hasBranch=function(t){var e=this.activity,r=this.ambient.inspector;return r.isStep(e)&&void 0!==r.relate(e,t).peek()},F.prototype.emitExpressionEvaluationError=function(t,e){var r=this.activity.id,n=this.activity.inputs[t];return new p.ExpressionEvaluationError(r,t,n.source||n.code,e)},F.prototype.emitExpressionSyntaxError=function(t,e){var r=this.activity.id,n=this.activity.inputs[t];return new p.ExpressionSyntaxError(r,t,n.source||n.code,e)},F.prototype.emitExpressionAccessorError=function(t,e,r){return new p.ExpressionAccessorError(this.activity.id,t,e,r)},F.prototype.emitActivityBindingError=function(t){var e=this.activity;return new p.ActivityBindingError(e.id,e.action,t)},F.prototype.emitActivityActivationError=function(t,e){return new p.ActivityActivationError(this.activity.id,t,e)},F.prototype.emitActivityError=function(t){if(t instanceof p.ActivityError)return t;var e=this.activity,r=new p.GenericActivityError(void 0,t&&t.message);return r.activityId=e.id,r.error=t,r},F.prototype.executeHandlerInline=function(e){var r=this;if(0<e.length||this.cancellationToken.isFulfilled())return e;for(var t=this.extras,n=0;n<t.length;n++)t[n]=h.default.resolve(t[n]).value();var i,o=this.inputs;for(i in o){var s=h.default.resolve(o[i]).value();s instanceof C&&(s=s.result),o[i]=s}var a=this.proxy,c=this.handler.value(),u=h.default.attempt(function(){return c.execute.apply(c,(0,l.__spreadArray)([o,a],t,!1))});return u.isPending()?u.then(function(t){return r.outputs=t,e},function(t){return[r.emitActivityError(t)]}):u.isRejected()?[this.emitActivityError(u.reason())]:(this.outputs=u.value(),e)},F.prototype.resolveExtrasInline=function(){for(var r=this,t=(0,s.query)(this.handler.value()),n=this,e=0,i=t;e<i.length;e++){var o=function(e){var t=n.ambient.engine.activator.activate(e);return n.extras.push(t),t.isPending()?{value:t.then(function(t){},function(t){return r.emitActivityActivationError(e.type,t)})}:t.isRejected()?{value:n.emitActivityActivationError(e.type,t.reason())}:void 0}(i[e]);if("object"==typeof o)return o.value}},F.prototype.resolveInputsInline=function(t){var e=this;if(0<t.length||this.cancellationToken.isFulfilled())return t;var n=[];n.push(this.resolveExtrasInline());var i=this.evaluators;if(void 0!==i){var r,o=this.scope;for(r in o)o[r]=h.default.resolve(o[r]).value();var s,a=this.inputs,c=(this.ambient.resources,this);for(s in i)!function(r){var t=a[r]=h.default.attempt(function(){var t=i[r].call(o);if(t&&"function"==typeof t.then){var e=new C;return e.result=t,e}return t});t.isPending()&&n.push(t.then(function(t){},function(t){return e.emitExpressionEvaluationError(r,t)})),t.isRejected()&&n.push(c.emitExpressionEvaluationError(r,t.reason()))}(s)}return b(h.default.all(n))},F.prototype.resolveHandlerInline=function(){var e=this,t=this.activity.action;if("string"==typeof t){var r,n,i=this.ambient,o=i.handlers,s=this.handler=o[t];return void 0===s&&(r=i.engine,n=i.inspector,s=this.handler=o[t]=h.default.attempt(function(){return r.createHandler(t,n)})),s.isPending()?s.then(function(t){return a(t)?e.emitActivityBindingError():void 0},function(t){return e.emitActivityBindingError(t)}):s.isRejected()?this.emitActivityBindingError(s.reason()):a(s.value())?this.emitActivityBindingError():void 0}this.handler=h.default.resolve(c)},F.prototype.findContext=function(t){for(var e=this.ambient,r=e.stack,n=e.frame;void 0!==n;){var i=n.state[t];if(void 0!==i)return i;n=r[n.index-1]}},F.prototype.resolveOutputsInline=function(){var e=this,t=this.promise;if(t.isPending())return t.then(function(t){return void 0!==t&&0<t.length?h.default.reject(t):e.outputs},function(t){});if(t.isRejected())return j;t=t.value();return void 0!==t&&0<t.length?h.default.reject(t):h.default.resolve(this.outputs)},F.prototype.resolveAccessorInline=function(e){var r=this,t=this.findContext(e);this.scope;if(void 0!==t){var n=this.scope[e]=t.resolveOutputsInline();return n.isPending()?n.then(function(t){},function(t){return r.emitExpressionAccessorError(e,void 0,t)}):n.isRejected()?this.emitExpressionAccessorError(e,void 0,n.reason()):void 0}n=this.scope[e]=h.default.resolve(this.ambient.environment[e]);return n.isPending()?n.then(function(t){},function(t){return r.emitExpressionAccessorError(e,t)}):n.isRejected()?this.emitExpressionAccessorError(e,n.reason()):void 0},F.prototype.resolveAssetsInline=function(){var s=[];s.push(this.resolveHandlerInline());var a=this.activity.inputs;if(null!=a){var c,t,u=void 0,l=this.ambient,p=(this.inputs,this);for(t in a)!function(t){var e=a[t];if(null!=e)if(v(e))p.inputs[t]=h.default.resolve(e);else if(null==(r=e).type&&"string"==typeof r.code){void 0===u&&(p.scope=u={}),void 0===c&&(p.evaluators=c={});var r=e.accessors;if(Array.isArray(r))for(var n=0,i=r;n<i.length;n++){var o=i[n];"string"==typeof o&&void 0===u[o]&&s.push(p.resolveAccessorInline(o))}r=h.default.attempt(function(){return g(e,l.resources)});r.isFulfilled()?c[t]=r.value():s.push(p.emitExpressionSyntaxError(t,r.reason()))}else s.push(p.emitExpressionSyntaxError(t))}(t)}return b(h.default.all(s))},F.prototype.concludeInline=function(t){return this.cancellationResolve(),t},F.prototype.generateMonikers=function(){var t=this.monikers,e=this.activity;this.ambient.inspector;t.push("$"+e.id),"string"==typeof e.name&&t.push("$"+e.name);e=e.action;"string"!=typeof e||1<(e=e.split(":")).length&&(0<(e=e[e.length-2]).length&&t.push("$$"+e))},F.prototype.marshalError=function(){var t=this.promise.value();return 1<t.length?new p.AggregateActivityError(this.activity.id,t):0<t.length?t[0]:void 0},F.prototype.execute=function(){var e=this,t=this.promise,r=this.ambient;if(void 0!==t)return r.debug(r),r.halted||this.transferInline(),t;if((t=this.resolveAssetsInline()).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.resolveInputsInline(t)}):h.default.resolve(this.resolveInputsInline(t.value()))).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.executeHandlerInline(t)}):h.default.resolve(this.executeHandlerInline(t.value()))).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.concludeInline(t)}):h.default.resolve(this.concludeInline(t.value()))).isRejected())return t;t.isPending()&&(t=t.catch(function(t){return r.fail(t)})).then(function(t){return r.execute()}),this.generateMonikers();for(var n=r.frame.state,i=0,o=this.monikers;i<o.length;i++)n[o[i]]=this;return this.promise=t,j},F.prototype.goto=function(){},F);function F(){this.inputs={},this.extras=[],this.monikers=[]}var S,$=(S=w,(0,l.__extends)(q,S),q.prototype.transferInline=function(){var t,e;this.promise.isFulfilled()&&(t=this.ambient,void 0!==(e=this.marshalError())?t.bubble(e):this.repeat?t.start(this.activity,this):(this.callBranch&&t.call(),this.forkBranch&&t.fork(),t.enqueue(this.activity,this.jumpBranch)))},q.prototype.goto=function(){var t,e=this.frame,r=this.ambient;r.goto(e)&&(t=void 0!==(t=this.recent)?t.context:this,(e.current=t).repeat=!0,r.halted=!1,r.execute())},q);function q(){return null!==S&&S.apply(this,arguments)||this}var H,D=(H=w,(0,l.__extends)(G,H),G.prototype.test=function(){var t,e=void 0,r=void 0,n=this.outputs;for(t in n){if(void 0!==e&&void 0!==r)return!1;if(!v(r=n[t]))return!1;if(void 0===e)e=r,r=void 0;else if(e!==r)return!1}return void 0===e||(void 0!==r||("boolean"==typeof e?e:"number"==typeof e?0<e:"string"==typeof e&&0<e.length))},G.prototype.transferInline=function(){var t,e=this.promise;e.isFulfilled()&&(e.value(),t=this.ambient,void 0!==(e=this.marshalError())?t.bubble(e):this.test()?t.start(this.activity.target):t.next())},G);function G(){return null!==H&&H.apply(this,arguments)||this}var M,U=(M=w,(0,l.__extends)(z,M),z.prototype.transferInline=function(){this.ambient.enqueue(this.activity)},z.prototype.execute=function(){return M.prototype.execute.call(this),j},z);function z(){return null!==M&&M.apply(this,arguments)||this}e.run=function(r,i,n,o){function s(t){var e=i.findStep(t);if(!e)throw new p.GenericActivityError("The workflow does not contain a step with the id ".concat(t,"."));return e}function a(t,e,r,n){var i=s(t);if(!(t=s(e)).transitions.some(function(t){return"content"===t.branch||"try"===t.branch}))throw new p.GenericActivityError("The ".concat(e," step is not a Container, Subworkflow, or Try Catch activity."));r="".concat(n,"$").concat(r),u(i,t,r)}function c(t){var e=l.frame.current.activity,r=s(t);if("gcx:wf:core::Subworkflow"!==r.action)throw new p.GenericActivityError("The target step ".concat(t," is not a Subworkflow activity."));u(e,r,"default")}function u(t,e,r){var n=i.relate(t,r).peek();void 0!==n&&i.remove(n),i.addTransition(t,e).branch=r}var l=new _;return l.completion=new h.default(function(t,e){l.resolveCompletion=t,l.rejectCompletion=e}),l.cancellationToken=new f.Task(function(t){return l.cancellationResolve=t}),l.execute(function(){var e,t;i.isStep(o)?(n=n||{},l.engine=r,l.inspector=i,l.id=E(),l.debug=n.debug||function(){},l.environment=m(r.environment,n.environment),l.inputs=n.inputs||{},l.locale=n.locale,l.resources={forms:i.cacheForms()},l.outputs={},l.trivia=m(r.trivia,n.trivia),l.trivia.setFormElementEvent=a,l.trivia.setSubworkflowTransition=c,l.proxy=new A(l),e=l.trivia.isDescendantOf,l.trivia.isDescendantOf=e?function(t){return t===l.proxy||e(t)}:function(t){return t===l.proxy},(t=l.frame).index=0,t.cancellationToken=l.cancellationToken,t.state=n.state||{},null!=(t=n.cancellationToken)&&((t=f.Task.race([t,l.cancellationToken])).isPending()?t.then(t=function(){return l.cancel()},t):l.cancel()),l.start(o)):l.reject(new p.ProgramStartError)}),l.completion}});
|
|
1
|
+
define(["require","exports","tslib","../Errors","../Hooks","../Task","../deps/bluebird_fork"],function(t,e,l,p,s,f,h){"use strict";function i(t,e){var t=f.Task.race([new f.Task(e),t]),r=new AbortController;return t.signal=r.signal,t.finally(function(){return r.abort()}),t}function a(t){return null==t||"function"!=typeof t.execute}function v(t){switch(typeof t){case"boolean":case"number":case"string":return 1}}Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.clearExpressionCache=void 0,h=(0,l.__importDefault)(h);var d={};e.clearExpressionCache=function(){d={}};var y=["resources","values","Date","Math","Object","parseInt","parseFloat","decodeURIComponent","encodeURIComponent"];function g(t,e){var r=t.code,n=d[r];if(void 0===n){var i=[],o={};i.push('"use strict"; ');var s=t.accessors;if(Array.isArray(s))for(var a=0,c=s;a<c.length;a++){var u=c[a];!function(e){return!("string"!=typeof e||e.length<1)&&(!(0<=e.indexOf("."))&&!y.some(function(t){return t===e}))}(u)||o[u]||(i.push("var ".concat(u," = this.").concat(u,";")),o[u]=!0)}i.push("return "),i.push(r),i.push(";"),n=d[r]=new Function("resources","values",i.join(""))}return function(){return n.call(this,e,t.values)}}var r,n,c={execute:function(t){return t}};function m(t,e){return(0,l.__assign)((0,l.__assign)({},t||{}),e||{})}function o(t){return void 0!==t}function u(t){return t.filter(o)}function b(t){return t.isPending()?t.then(u):t.isFulfilled()?h.default.resolve(u(t.value())):t}function E(){return void 0===(r=void 0!==r&&1073741824<=r?void 0:r)&&(r=0,n=(new Date).valueOf()+":"),n+r++}var x,j=h.default.resolve(void 0),k=!0,w=function(t){Object.defineProperty(this,"target",{get:function(){if(!1===k)return k=!0,t}})},A=(x=w,(0,l.__extends)(P,x),Object.defineProperty(P.prototype,"outputs",{get:function(){return k=!1,this.target.outputs},set:function(t){k=!1,this.target.outputs=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"error",{get:function(){return k=!1,this.target.error},set:function(t){k=!1,this.target.error=t},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"completion",{get:function(){return k=!1,this.target.completion},enumerable:!1,configurable:!0}),P.prototype.complete=function(t){return k=!1,this.target.complete(t)},P.prototype.reject=function(t){return k=!1,this.target.reject(t)},Object.defineProperty(P.prototype,"environment",{get:function(){return k=!1,this.target.environment},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"inputs",{get:function(){return k=!1,this.target.inputs},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"activityContexts",{get:function(){return k=!1,this.target.activityContexts},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"locale",{get:function(){return k=!1,this.target.locale},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"resources",{get:function(){return k=!1,this.target.resources},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"trivia",{get:function(){return k=!1,this.target.trivia},enumerable:!1,configurable:!0}),P);function P(){return null!==x&&x.apply(this,arguments)||this}var I,T=(I=w,(0,l.__extends)(O,I),Object.defineProperty(O.prototype,"luid",{get:function(){return k=!1,this.target.luid},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"ambient",{get:function(){return k=!1,this.target.ambient.proxy},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"action",{get:function(){return k=!1,this.target.action},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"branch",{get:function(){return k=!1,this.target.branch},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"cancellationToken",{get:function(){return k=!1,this.target.cancellationToken},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"passes",{get:function(){return k=!1,this.target.passes},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"caught",{get:function(){return k=!1,this.target.caught},enumerable:!1,configurable:!0}),O.prototype.call=function(t){return k=!1,this.target.call(t)},O.prototype.fork=function(t){return k=!1,this.target.fork(t)},O.prototype.jump=function(t){return k=!1,this.target.jump(t)},O.prototype.hasBranch=function(t){return k=!1,this.target.hasBranch(t)},Object.defineProperty(O.prototype,"state",{get:function(){return k=!1,this.target.state},enumerable:!1,configurable:!0}),O.prototype.registerForErrors=function(){return k=!1,this.target.registerForErrors()},O.prototype.persist=function(t){return k=!1,this.target.persist(t)},O.prototype.goto=function(){return k=!1,this.target.goto()},O);function O(){return null!==I&&I.apply(this,arguments)||this}var _=(Object.defineProperty(R.prototype,"activityContexts",{get:function(){for(var t={},e=0,r=(0,l.__spreadArray)((0,l.__spreadArray)([],this.stack,!0),[this.frame],!1);e<r.length;e++){var n,i=r[e];for(n in i.state)"$$"===n.substring(0,2)&&(t[n]=i.state[n])}return t},enumerable:!1,configurable:!0}),R.prototype.break=function(){this.halted=!0},R.prototype.continue=function(){var e=this;this.halted=!1,void 0!==this.scheduler&&!this.scheduler.isFulfilled()||(this.scheduler=j.then(function(t){e.execute()}))},R.prototype.execute=function(t){if(this.inline)return!1;this.inline=!0;try{void 0!==t&&t();for(var e=this.completion;e.isPending();){if(this.halted)return!1;var r=this.frame.current.execute();if(r.isPending())break;r.isRejected()&&this.fail(r.reason())}}catch(t){this.fail(t)}finally{this.inline=!1}return!0},R.prototype.complete=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.resolveCompletion(t||this.outputs))},R.prototype.reject=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(t||this.error))},R.prototype.fail=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.EngineRuntimeError(t)))},R.prototype.cancel=function(){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.ActivityCancellationError))},R.prototype.push=function(){var t=this.stack;t.push(this.frame);var e=this.frame=new B;return e.index=t.length,e},R.prototype.pop=function(t){var e=this.frame;void 0===e||(e.current=void 0)!==(r=e.cancellationResolve)&&r();var r=this.frame=this.stack.pop();return void 0===r&&(void 0!==t?this.reject(t):this.complete()),r},R.prototype.call=function(){var t=this.frame,e=this.push();e.cancellationToken=t.cancellationToken,e.state=t.state},R.prototype.fork=function(){var e=this.push();e.cancellationToken=i(this.cancellationToken,function(t){return e.cancellationResolve=t}),e.state={}},R.prototype.bubble=function(t){for(var e,r=this.pop(t);void 0!==r&&!r.current.registeredForErrors;)r=this.pop(t);void 0!==r&&(e=r.current,this.start(e.activity,e,t))},R.prototype.next=function(){var t=this.queue.pop();void 0!==t?this.attempt(t):void 0!==(t=this.pop())&&(t=t.current,this.start(t.activity,t))},R.prototype.prepare=function(e,t,r){var n=e.frame=this.frame;(n.current=e).luid=this.id+":"+e.activity.id,e.action=e.activity.action,e.ambient=this,e.id=E(),e.caught=r,e.cancellationToken=i(n.cancellationToken,function(t){return e.cancellationResolve=t}),e.proxy=new T(e),void 0!==t?(t=(n=e.recent=t.recent||(t.recent={})).context||t,(n.context=e).passes=t.passes+1,e.stateToPersist=e.state=t.stateToPersist):e.passes=0},R.prototype.attempt=function(t){var e=new D;e.activity=t,e.branch=t.branch,this.prepare(e)},R.prototype.start=function(t,e,r){var n=new(t.async?U:$);n.activity=t,n.monikers.push("$"),this.prepare(n,e,r)},R.prototype.enqueue=function(t,e){var r=this.inspector;this.queue=r.relate(t,e).list(),this.next()},R.prototype.goto=function(t){for(var e=this.stack,r=t.index;e[r]===t;)this.pop();return t===this.frame},R);function R(){this.frame=new B,this.stack=[],this.handlers={}}var B=function(){},C=function(){},w=(F.prototype.registerForErrors=function(){this.registeredForErrors=!0},F.prototype.persist=function(t){this.stateToPersist=t},F.prototype.call=function(t){this.callBranch=!0,this.forkBranch=!1,this.jumpBranch=t},F.prototype.fork=function(t){this.callBranch=!1,this.forkBranch=!0,this.jumpBranch=t},F.prototype.jump=function(t){this.callBranch=!1,this.forkBranch=!1,this.jumpBranch=t},F.prototype.hasBranch=function(t){var e=this.activity,r=this.ambient.inspector;return r.isStep(e)&&void 0!==r.relate(e,t).peek()},F.prototype.emitExpressionEvaluationError=function(t,e){var r=this.activity.id,n=this.activity.inputs[t];return new p.ExpressionEvaluationError(r,t,n.source||n.code,e)},F.prototype.emitExpressionSyntaxError=function(t,e){var r=this.activity.id,n=this.activity.inputs[t];return new p.ExpressionSyntaxError(r,t,n.source||n.code,e)},F.prototype.emitExpressionAccessorError=function(t,e,r){return new p.ExpressionAccessorError(this.activity.id,t,e,r)},F.prototype.emitActivityBindingError=function(t){var e=this.activity;return new p.ActivityBindingError(e.id,e.action,t)},F.prototype.emitActivityActivationError=function(t,e){return new p.ActivityActivationError(this.activity.id,t,e)},F.prototype.emitActivityError=function(t){if(t instanceof p.ActivityError)return t;var e=this.activity,r=new p.GenericActivityError(void 0,null==t?void 0:t.message);return r.activityId=e.id,r.error=t,r},F.prototype.executeHandlerInline=function(e){var r=this;if(0<e.length||this.cancellationToken.isFulfilled())return e;for(var t=this.extras,n=0;n<t.length;n++)t[n]=h.default.resolve(t[n]).value();var i,o=this.inputs;for(i in o){var s=h.default.resolve(o[i]).value();s instanceof C&&(s=s.result),o[i]=s}var a=this.proxy,c=this.handler.value(),u=h.default.attempt(function(){return c.execute.apply(c,(0,l.__spreadArray)([o,a],t,!1))});return u.isPending()?u.then(function(t){return r.outputs=t,e},function(t){return[r.emitActivityError(t)]}):u.isRejected()?[this.emitActivityError(u.reason())]:(this.outputs=u.value(),e)},F.prototype.resolveExtrasInline=function(){for(var r=this,t=(0,s.query)(this.handler.value()),n=this,e=0,i=t;e<i.length;e++){var o=function(e){var t=n.ambient.engine.activator.activate(e);return n.extras.push(t),t.isPending()?{value:t.then(function(t){},function(t){return r.emitActivityActivationError(e.type,t)})}:t.isRejected()?{value:n.emitActivityActivationError(e.type,t.reason())}:void 0}(i[e]);if("object"==typeof o)return o.value}},F.prototype.resolveInputsInline=function(t){var e=this;if(0<t.length||this.cancellationToken.isFulfilled())return t;var n=[];n.push(this.resolveExtrasInline());var i=this.evaluators;if(void 0!==i){var r,o=this.scope;for(r in o)o[r]=h.default.resolve(o[r]).value();var s,a=this.inputs,c=this;for(s in i)!function(r){var t=a[r]=h.default.attempt(function(){var t=i[r].call(o);if(t&&"function"==typeof t.then){var e=new C;return e.result=t,e}return t});t.isPending()&&n.push(t.then(function(t){},function(t){return e.emitExpressionEvaluationError(r,t)})),t.isRejected()&&n.push(c.emitExpressionEvaluationError(r,t.reason()))}(s)}return b(h.default.all(n))},F.prototype.resolveHandlerInline=function(){var e=this,t=this.activity.action;if("string"==typeof t){var r,n,i=this.ambient,o=i.handlers,s=this.handler=o[t];return void 0===s&&(r=i.engine,n=i.inspector,s=this.handler=o[t]=h.default.attempt(function(){return r.createHandler(t,n)})),s.isPending()?s.then(function(t){return a(t)?e.emitActivityBindingError():void 0},function(t){return e.emitActivityBindingError(t)}):s.isRejected()?this.emitActivityBindingError(s.reason()):a(s.value())?this.emitActivityBindingError():void 0}this.handler=h.default.resolve(c)},F.prototype.findContext=function(t){for(var e=this.ambient,r=e.stack,n=e.frame;void 0!==n;){var i=n.state[t];if(void 0!==i)return i;n=r[n.index-1]}},F.prototype.resolveOutputsInline=function(){var e=this,t=this.promise;if(t.isPending())return t.then(function(t){return void 0!==t&&0<t.length?h.default.reject(t):e.outputs},function(t){});if(t.isRejected())return j;t=t.value();return void 0!==t&&0<t.length?h.default.reject(t):h.default.resolve(this.outputs)},F.prototype.resolveAccessorInline=function(e){var r=this,t=this.findContext(e);if(void 0!==t){var n=this.scope[e]=t.resolveOutputsInline();return n.isPending()?n.then(function(t){},function(t){return r.emitExpressionAccessorError(e,void 0,t)}):n.isRejected()?this.emitExpressionAccessorError(e,void 0,n.reason()):void 0}n=this.scope[e]=h.default.resolve(this.ambient.environment[e]);return n.isPending()?n.then(function(t){},function(t){return r.emitExpressionAccessorError(e,t)}):n.isRejected()?this.emitExpressionAccessorError(e,n.reason()):void 0},F.prototype.resolveAssetsInline=function(){var s=[];s.push(this.resolveHandlerInline());var a=this.activity.inputs;if(null!=a){var c,t,u=void 0,l=this.ambient,p=this;for(t in a)!function(t){var e=a[t];if(null!=e)if(v(e))p.inputs[t]=h.default.resolve(e);else if(null==(r=e).type&&"string"==typeof r.code){void 0===u&&(p.scope=u={}),void 0===c&&(p.evaluators=c={});var r=e.accessors;if(Array.isArray(r))for(var n=0,i=r;n<i.length;n++){var o=i[n];"string"==typeof o&&void 0===u[o]&&s.push(p.resolveAccessorInline(o))}r=h.default.attempt(function(){return g(e,l.resources)});r.isFulfilled()?c[t]=r.value():s.push(p.emitExpressionSyntaxError(t,r.reason()))}else s.push(p.emitExpressionSyntaxError(t))}(t)}return b(h.default.all(s))},F.prototype.concludeInline=function(t){return this.cancellationResolve(),t},F.prototype.generateMonikers=function(){var t=this.monikers,e=this.activity;t.push("$"+e.id),"string"==typeof e.name&&t.push("$"+e.name);e=e.action;"string"!=typeof e||1<(e=e.split(":")).length&&(0<(e=e[e.length-2]).length&&t.push("$$"+e))},F.prototype.marshalError=function(){var t=this.promise.value();return 1<t.length?new p.AggregateActivityError(this.activity.id,t):0<t.length?t[0]:void 0},F.prototype.execute=function(){var e=this,t=this.promise,r=this.ambient;if(void 0!==t)return r.debug(r),r.halted||this.transferInline(),t;if((t=this.resolveAssetsInline()).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.resolveInputsInline(t)}):h.default.resolve(this.resolveInputsInline(t.value()))).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.executeHandlerInline(t)}):h.default.resolve(this.executeHandlerInline(t.value()))).isRejected())return t;if((t=t.isPending()?t.then(function(t){return e.concludeInline(t)}):h.default.resolve(this.concludeInline(t.value()))).isRejected())return t;t.isPending()&&(t=t.catch(function(t){return r.fail(t)})).then(function(t){return r.execute()}),this.generateMonikers();for(var n=r.frame.state,i=0,o=this.monikers;i<o.length;i++)n[o[i]]=this;return this.promise=t,j},F.prototype.goto=function(){},F);function F(){this.inputs={},this.extras=[],this.monikers=[]}var S,$=(S=w,(0,l.__extends)(q,S),q.prototype.transferInline=function(){var t,e;this.promise.isFulfilled()&&(t=this.ambient,void 0!==(e=this.marshalError())?t.bubble(e):this.repeat?t.start(this.activity,this):(this.callBranch&&t.call(),this.forkBranch&&t.fork(),t.enqueue(this.activity,this.jumpBranch)))},q.prototype.goto=function(){var t,e=this.frame,r=this.ambient;r.goto(e)&&(t=void 0!==(t=this.recent)?t.context:this,(e.current=t).repeat=!0,r.halted=!1,r.execute())},q);function q(){return null!==S&&S.apply(this,arguments)||this}var H,D=(H=w,(0,l.__extends)(G,H),G.prototype.test=function(){var t,e=void 0,r=void 0,n=this.outputs;for(t in n){if(void 0!==e&&void 0!==r)return!1;if(!v(r=n[t]))return!1;if(void 0===e)e=r,r=void 0;else if(e!==r)return!1}return void 0===e||(void 0!==r||("boolean"==typeof e?e:"number"==typeof e?0<e:"string"==typeof e&&0<e.length))},G.prototype.transferInline=function(){var t,e;this.promise.isFulfilled()&&(t=this.ambient,void 0!==(e=this.marshalError())?t.bubble(e):this.test()?t.start(this.activity.target):t.next())},G);function G(){return null!==H&&H.apply(this,arguments)||this}var M,U=(M=w,(0,l.__extends)(z,M),z.prototype.transferInline=function(){this.ambient.enqueue(this.activity)},z.prototype.execute=function(){return M.prototype.execute.call(this),j},z);function z(){return null!==M&&M.apply(this,arguments)||this}e.run=function(r,i,n,o){function s(t){var e=i.findStep(t);if(!e)throw new p.GenericActivityError("The workflow does not contain a step with the id ".concat(t,"."));return e}function a(t,e,r,n){var i=s(t);if(!(t=s(e)).transitions.some(function(t){return"content"===t.branch||"try"===t.branch}))throw new p.GenericActivityError("The ".concat(e," step is not a Container, Subworkflow, or Try Catch activity."));r="".concat(n,"$").concat(r),u(i,t,r)}function c(t){var e=l.frame.current.activity,r=s(t);if("gcx:wf:core::Subworkflow"!==r.action)throw new p.GenericActivityError("The target step ".concat(t," is not a Subworkflow activity."));u(e,r,"default")}function u(t,e,r){var n=i.relate(t,r).peek();void 0!==n&&i.remove(n),i.addTransition(t,e).branch=r}var l=new _;return l.completion=new h.default(function(t,e){l.resolveCompletion=t,l.rejectCompletion=e}),l.cancellationToken=new f.Task(function(t){return l.cancellationResolve=t}),l.execute(function(){var e,t;i.isStep(o)?(n=n||{},l.engine=r,l.inspector=i,l.id=E(),l.debug=n.debug||function(){},l.environment=m(r.environment,n.environment),l.inputs=n.inputs||{},l.locale=n.locale,l.resources={forms:i.cacheForms()},l.outputs={},l.trivia=m(r.trivia,n.trivia),l.trivia.setFormElementEvent=a,l.trivia.setSubworkflowTransition=c,l.proxy=new A(l),e=l.trivia.isDescendantOf,l.trivia.isDescendantOf=e?function(t){return t===l.proxy||e(t)}:function(t){return t===l.proxy},(t=l.frame).index=0,t.cancellationToken=l.cancellationToken,t.state=n.state||{},null!=(t=n.cancellationToken)&&((t=f.Task.race([t,l.cancellationToken])).isPending()?t.then(t=function(){return l.cancel()},t):l.cancel()),l.start(o)):l.reject(new p.ProgramStartError)}),l.completion}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from "react";
|
|
2
2
|
import * as defs from "./FormDefinition";
|
|
3
3
|
import { FormPresenterHost } from "./FormPresenterHost";
|
|
4
4
|
import type { FormElementProps, FormElementRegistration } from "..";
|
|
@@ -9,7 +9,7 @@ export interface FormComponentProps {
|
|
|
9
9
|
name?: string;
|
|
10
10
|
children?: JSX.Element[];
|
|
11
11
|
}
|
|
12
|
-
export declare class FormComponent extends
|
|
12
|
+
export declare class FormComponent extends Component<FormComponentProps, {}> {
|
|
13
13
|
id: string;
|
|
14
14
|
autoInput: boolean;
|
|
15
15
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react","./utils"],function(e,t,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
|
|
1
|
+
define(["require","exports","tslib","react","./utils"],function(e,t,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormElement=t.FormComponent=void 0;var i,o=(i=o.Component,(0,n.__extends)(s,i),Object.defineProperty(s.prototype,"elementRegistration",{get:function(){var e,t=this.props.host;if(!!(e=t)&&"function"==typeof e.getElementRegistration)return t.getElementRegistration(this.element)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"element",{get:function(){var e=this.props,t=e.host,e=e.name;if(e)return t.find(e)},enumerable:!1,configurable:!0}),s.prototype.prepare=function(){void 0===this.id&&(this.id=(0,r.makeId)()),this.enabled=!0;var e=this.props.host;return!1===e.enabled&&(this.enabled=!1),void 0!==this.element&&(void 0!==(e=e.find(this.element.section))&&!1===e.enabled&&(this.enabled=!1),!1===this.element.enabled&&(this.enabled=!1)),this.element},s.prototype.render=function(){return this.props.host.renderVisual(this)},s);function s(){var r=null!==i&&i.apply(this,arguments)||this;return r.raiseEvent=function(e,t){var n;return null===(n=r.props.host)||void 0===n?void 0:n.post(e,{name:r.props.name,value:t})},r.setProperty=function(e,t){var n=r.props.host,o=r.props.name;n.assignElementProperty(o,e,t)},r.setValue=function(e){return r.setProperty("value",e)},r}t.FormComponent=o;var p,n=(p=o,(0,n.__extends)(a,p),a.prototype.componentDidMount=function(){var e=this.props;e.host.refs[e.name]=this},a.prototype.componentDidUpdate=function(){var e=this.props;e.host.refs[e.name]=this},a.prototype.componentWillUnmount=function(){var e=this.props;e.host.refs[e.name]=void 0},a);function a(){return null!==p&&p.apply(this,arguments)||this}t.FormElement=n});
|
|
@@ -196,7 +196,7 @@ export interface Element {
|
|
|
196
196
|
fileTypes?: string;
|
|
197
197
|
/** Indicates the format of the value. */
|
|
198
198
|
format?: FormatRef;
|
|
199
|
-
/** Indicates
|
|
199
|
+
/** Indicates whether the element is hoisted or not. */
|
|
200
200
|
hoisted?: boolean;
|
|
201
201
|
/**
|
|
202
202
|
* The order of this element in a single-dimensional column.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
import { FormComponent } from "./FormComponent";
|
|
3
4
|
import { defs } from "./FormHost";
|
|
4
5
|
interface FormElementOuterProps {
|
|
@@ -32,6 +33,6 @@ interface FormElementOuterProps {
|
|
|
32
33
|
onTouchStart?: (event: React.TouchEvent<HTMLElement>) => void;
|
|
33
34
|
}
|
|
34
35
|
declare const _default: React.ForwardRefExoticComponent<FormElementOuterProps & {
|
|
35
|
-
children?:
|
|
36
|
+
children?: ReactNode;
|
|
36
37
|
} & React.RefAttributes<HTMLDivElement | HTMLLabelElement>>;
|
|
37
38
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react","./common","./constants","./utils"],function(e,t,
|
|
1
|
+
define(["require","exports","tslib","react","react","./common","./constants","./utils"],function(e,t,v,f,y,_,E,N){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),y=(0,v.__importStar)(y),t.default=(0,f.forwardRef)(function(e,t){var r=e.children,l=e.className,s=e.component,a=e.element,i=e.errorClassName,n=e.htmlElementType,o=(0,v.__rest)(e,["children","className","component","element","errorClassName","htmlElementType"]),p=s.props.host,d=[],m=(0,N.makeUniqueId)(s.props.name),c=(0,_.renderTitle)(a,p,m),u=(0,_.renderDescription)(a,p,m),h=(0,_.renderError)(a,p),s=null===(e=null==c?void 0:c.props)||void 0===e?void 0:e.id,e=null===(p=null==u?void 0:u.props)||void 0===p?void 0:p.id,p=[];l&&p.push.apply(p,l.split(" ")),a.titleLocation===E.TitleLocation.BESIDE&&p.push("inline-title"),a.styleName&&p.push((0,N.makeSafeClassName)(a.styleName)),h&&i&&p.push(i);o=(0,v.__assign)({"aria-labelledby":s,"aria-describedby":e,className:p.join(" "),id:m,ref:t},o);return d.push(c),a.titleLocation===E.TitleLocation.BESIDE?d.push(y.createElement("div",{className:"form-element-content"},u,h,r)):(d.push(u),d.push(h),d.push(r)),f.createElement.apply(void 0,(0,v.__spreadArray)([n||"div",o],d,!1))})});
|
package/amd/forms/FormHost.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","moment-timezone","../Task","../constants","../deps/bluebird_fork","./Calendar","./FormComponent","./FormDefinition","./NumberParser","./numberFormatter","./presenter","./renderers","./styles/stock","./utils"],function(e,t,i,n,r,o,s,u,a,l,f,c,d,h,v,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormHost=t.defs=void 0,n=(0,i.__importDefault)(n),s=(0,i.__importDefault)(s),l=(0,i.__importStar)(l),f=(0,i.__importDefault)(f),d=(0,i.__importStar)(d),h=(0,i.__importStar)(h),t.defs=l;var m="C0166F74-982A-464E-9FB6-9605CB7649C1:FormEvent";function y(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}function b(e,t){switch(typeof e){case"boolean":case"number":case"string":return e;case"object":break;default:return t}if(null===e)return t;if(e instanceof Array){var i=t;null==i&&(i=[]);for(var n=0,r=0,o=e;r<o.length;r++){var s=b(o[r],i[n]);void 0!==s&&(n<e.length?i[n]=s:i.push(s),++n)}return i}var u,a=t;for(u in void 0===a&&(a={}),e)a[u]=b(e[u],a[u]);return a}function g(e){function t(){return void 0!==e&&(t.active=!1,e(),!0)}return t.active=!0,t}var x=void 0,l=(F.prototype.deriveLocale=function(){return o.DEFAULT_LOCALE},F.prototype.mount=function(){var e=this.container,t=e.parentNode;null==t&&document.body.appendChild(e),this.update()},F.prototype.unmount=function(){var e=this.container,t=e.parentNode;null!=t&&t.removeChild(e)},F.prototype.observeFocus=function(e){this.enabled&&e instanceof HTMLElement&&(this.lastFocus&&this.lastFocus.target===e||this.setLastFocus(e))},F.prototype.focus=function(e){!0===(e=null==e?!1:e)&&(this.lastFocus=void 0),!1===e&&!1===(e=this.nextFocus)&&(e=!0),this.nextFocus=e,this.invalidate(!0!==e?e:void 0)},F.prototype.show=function(){var i=this,e=this.container;if(void 0===e)return!1;this.custom||void 0!==this.focusObserver||e.addEventListener("focus",this.focusObserver=function(e){return i.observeFocus(e.target)},!0),this.enabled||(this.nextRefresh=!0,this.focus());var t,n=[],r=this.errors;for(t in r){var o=this.form.elements[t];null!=o&&(o.error=r[t],this.invalidate(t),!1!==o.visible&&(o=this.getParentSection(o),this.isSectionCollapsed(o)&&n.push(o)))}return 0<n.length&&(n.forEach(function(e){var t;i.isAccordionSection(e)?(t=i.findName(e))&&i.updateAccordionSections(t):e.collapsed=!1}),this.invalidate()),this.errors={},this.idle(),!1!==this.nextRefresh&&(this.enabled=!0,this.visible=!0,this.mount()),this.enabled},F.prototype.spin=function(){return void 0!==this.container&&(this.idle(),this.visible&&!this.enabled||(this.nextRefresh=!0,this.enabled=!1,this.visible=!0,this.mount()),this.visible)},F.prototype.hide=function(){return void 0!==this.container&&(this.idle(),this.visible&&(this.enabled=!1,this.visible=!1,this.unmount()),!0)},F.prototype.dispose=function(){if(this.dismiss)return!1;this.dismiss=!0;var e=this.container;e.dispatchEvent(y(m));var t=this.focusObserver;return void 0!==t&&e.removeEventListener("focus",t,!0),this.idle(),this.unmount(),this.refs={},d.releaseForm(this.container),this.container=void 0,this.lastFocus=void 0,!(this.eventTask=void 0)},F.prototype.renderFocus=function(e,t){var i=this.nextFocus;if(this.enabled&&e instanceof HTMLElement)if(!1!==i)if(void 0!==t){if(t===i||!0===i&&void 0===this.lastFocus)return this.nextFocus=!1,this.setLastFocus(e,t),e.focus(),!0}else{var n=null===(n=this.lastFocus)||void 0===n?void 0:n.target;if(!0===i&&n instanceof HTMLElement&&e.contains(n))return this.nextFocus=!1,n.focus(),!0}else if(!1===i&&t&&t!==(null===(i=this.lastFocus)||void 0===i?void 0:i.name)&&this.isElementPositionBeforeLastFocused(t))return this.setLastFocus(e,t),e.focus(),!0;return!1},F.prototype.renderHtml=function(e,t){return"string"==typeof e?p.text.textToHtml(e):p.text.isMarkdown(e)?p.text.markdownToHtml(e.markdown,t):""},F.prototype.renderText=function(e){return"string"==typeof e?e:p.text.isMarkdown(e)?p.text.markdownToText(e.markdown):""},F.prototype.renderStyle=function(e){return"string"==typeof e?(0,p.addStyleToDocument)(e):x=x||(0,p.addStyleToDocument)(v.CSS)},F.prototype.renderVisual=function(e){return d.render(e)||d.renderNone(e)},F.prototype.qualifyDefault=function(e){var t,i=(0,p.sort)(this.form.elements);for(t in i){var n=i[t];if(null!=n&&!1!==n.visible&&n.enabled){if(n.default)return e.value=n.value,t;var r=(0,p.sort)(n.items);if(null!=r)for(var o in r){var s=r[o];if(null!=s&&s.visible&&s.enabled&&s.default)return e.item=o,e.value=s.value,t}}}},F.prototype.qualify=function(e,t){var i;return null==t&&(t={}),"clicked"===e&&void 0===t.name&&(t.name=this.qualifyDefault(t)),t.type=e,void 0===t.routingKey&&(i=t.name,t.routingKey=void 0!==i?e+"$"+i:e),t},F.prototype.post=function(e,t){t=this.publish(e,t);e=this.container;void 0!==e&&e.dispatchEvent(y(m,t))},F.prototype.subscribe=function(i){var e=this.container;if(void 0===e)return g();function n(){i=void 0,e.removeEventListener(m,t)}var t=function(e){var t=e.detail;void 0!==t?s.default.resolve().then(function(){"function"==typeof i&&i(t)}):n()};return e.addEventListener(m,t),g(n)},F.prototype.refresh=function(e){this.custom||("string"==typeof e?(e=this.refs[e],d.refresh(e)):(void 0===this.style&&(this.style=this.renderStyle()),this.refs={},d.refreshForm(this,this.container)))},F.prototype.invalidate=function(e){var t,i=this.nextRefresh;"string"==typeof e&&!0!==i&&(!1===i?this.nextRefresh=((t={})[e]=!0,t):i[e]=!0),void 0!==e&&!0!==e||(this.nextRefresh=!0),!1===e&&!1===i&&(this.nextRefresh={})},F.prototype.update=function(){var e=this.nextRefresh;if(!0===e&&(this.nextRefresh=!1,this.refresh()),"object"==typeof e)for(var t in this.nextRefresh=!1,e)!0===e[t]&&this.refresh(t)},F.prototype.idle=function(){var e=this.timerHandle;void 0!==e&&(this.timerHandle=void 0,e())},F.prototype.busy=function(){var e,t=this;void 0===this.timerHandle&&void 0!==this.container&&(e=setTimeout(function(){return t.spin()}),this.timerHandle=function(){void 0!==e&&(clearTimeout(e),e=void 0)})},F.prototype.publish=function(e,t){return this.enabled?(t=this.enqueue(e,t),0<this.eventQueue.length&&this.spin(),t):this.qualify(e,t)},F.prototype.enqueue=function(e,t){return t=this.qualify(e,t),void 0!==this.eventTask?(this.resolveEvent(t),this.eventTask=void 0):this.eventQueue.push(t),t},F.prototype.dequeue=function(){var e=this.eventQueue;if(0<e.length){var t=this.eventIndex,i=e[t++];return t>=e.length?e.length=this.eventIndex=0:this.eventIndex=t,i}},F.prototype.observe=function(){var t=this;return s.default.attempt(function(){if(void 0!==t.eventTask)return t.eventTask;var e=t.dequeue();return void 0!==e?e:t.show()?(t.eventTask=new r.Task(function(e){t.resolveEvent=e}),t.eventTask):void 0})},F.prototype.load=function(e,t){if(void 0===this.container)return!1;if(this.eventQueue.length=this.eventIndex=0,this.eventTask=void 0,this.errors={},this.lastFocus=void 0,this.nextFocus=!0,this.nextRefresh=!0,this.enqueue("load"),this.enqueue("prepare"),null!=e){var i,e=b(e,e={defaults:{},elements:{}});for(i in this.form=b(t,e),this.form.elements){var n=this.form.elements[i];if((n=b(n,{showFilter:!1,checked:!1,enabled:!0,hoisted:!1,visible:!0,overlay:!1,default:!1,validates:!1,readOnly:!1,require:!1,autoActivate:!1})).items)for(var r in n.items)n.items[r]=b(n.items[r],{enabled:!0,checked:!1,visible:!0,default:!1,validates:!1});this.form.elements[i]=n}}return!0},F.prototype.route=function(e){switch(e.type){case"changed":return this.cascade(e.name);case"prepare":return this.hydrate(e);case"suggest":return this.suggest(e);case"clicked":return this.click(e);case"validate":return this.verify(e);case"verify":return this.submit(e);case"checked":return this.changed(e)}return!1},F.prototype.changed=function(e){return this.enqueue("changed",{name:e.name,item:e.item,value:e.value}),!0},F.prototype.isElementValid=function(e,t,i){return void 0===t&&(t=!0),null!=e&&((i=void 0===i?{status:void 0}:i).status=void 0,p.text.isStatus(e.error)&&"invalid"===e.error.status?!(i.status="invalid"):!0!==e.require||(this.isElementEffectivelyVisible(e)?!!this.isElementValueDefined(e)||!(i.status="missing"):t))},F.prototype.isElementEffectivelyVisible=function(e){if(null==e)return!1;var t=this.getParentSection(e);return(!t||!1!==t.visible)&&!1!==e.visible},F.prototype.isElementValueDefined=function(e){if(null==e)return!1;if("CheckBox"===e.type)return!0;var t=e.current;if(null!=t)return!0;t=e.value;if(null!=t&&""!==t)return!0;t=e.label;if(null!=t&&""!==t)return!0;var i=e.items;if(null!=i)for(var n in i){n=i[n];if(null!=n&&!0===n.checked)return!0}return!1},F.prototype.trap=function(e){switch(e.type){case"populate":case"load":break;default:return!1}var t=e.name,i=this.find(t);if(null==i)return!1;e=i.dependsOn;if("string"!=typeof e)return!1;e=this.find(e);return i.enabled=this.isElementEffectivelyVisible(e)&&this.isElementValueDefined(e),this.invalidate(t),!i.enabled},F.prototype.cascade=function(e){var t=this.find(e);if(null==t||!1===t.dependsOn)return!1;var i,n=((t={})[e]=!0,t),r=(0,p.sort)(this.form.elements);for(i in r){var o,s=r[i],u=s.dependsOn;"string"==typeof u?(void 0!==(o=this.find(u))&&"string"!=typeof o.dependsOn&&(o.dependsOn=!0),!0===n[u]&&(n[i]=!0,s.checked=!1,s.current=void 0,s.label=void 0,s.items=void 0,s.value=void 0,this.invalidate(i),this.enqueue("populate",{name:i}))):s.dependsOn=!1}return!0},F.prototype.click=function(e){var t=this.form.elements[e.name];return null!=t&&"ButtonBar"==t.type&&this.validate(e)},F.prototype.hydrate=function(e){for(var t in(0,p.sort)(this.form.elements))this.enqueue("populate",{name:t}),this.enqueue("load",{name:t});return!0},F.prototype.shouldTriggerValidation=function(e){var t=this.find(e.name);if(null!=t&&"string"==typeof e.value){e=e.item;if("string"!=typeof e)return!0===t.validates;t=t.items;if(null!=t){e=t[e];if(null!=e)return!0===e.validates}}},F.prototype.validate=function(e){var t=this.shouldTriggerValidation(e);if(!0!==t)return!1===t&&(this.enqueue("end",{name:e.name,item:e.item,value:e.value,routingKey:"end"}),!0);var i,n=this.errors={},r=(0,p.sort)(this.form.elements);for(i in r){var o=r[i];null!=o&&(n[i]=void 0,this.enqueue("validate",{name:i}))}return this.enqueue("verify",{name:e.name,item:e.item,value:e.value,routingKey:"verify"}),!0},F.prototype.verify=function(e){var t=e.name,i=this.form.elements[t],e={status:void 0};return!this.isElementValid(i,!0,e)&&(e.status&&(this.errors[t]={status:e.status}),!1===this.nextFocus&&this.focus(t),!0)},F.prototype.suggest=function(e){var t=this.form.elements[e.name];return null!=t&&(t.items={message:{label:{status:"trivial"},enabled:!1}},this.invalidate(e.name),!0)},F.prototype.submit=function(e){return!this.hasErrors()&&(this.enqueue("submit",{name:e.name,item:e.item,value:e.value}),!0)},F.prototype.hasErrors=function(){var e,t=this.errors;for(e in t){var i=t[e];if(null!=i)return!0}return!1},F.prototype.find=function(e){if(null!=e)return"string"==typeof(e="object"==typeof e?e.name:e)?this.form.elements[e]:void 0},F.prototype.findName=function(e){for(var t in this.form.elements)if(this.form.elements[t]===e)return t},F.prototype.coerceNumber=function(e){var t=this.deriveLocale();return new f.default(t).parse(e)},F.prototype.formatNumber=function(e,t){return null!=t&&t.locale||((t=t||{}).locale=this.deriveLocale()),(0,c.format)(t,e)},F.prototype.renderCustom=function(e,t){if(e instanceof a.FormComponent)return h.element.renderCustom(e,t)},F.prototype.renderState=function(e,t,i){return!1},F.prototype.deriveCalendar=function(e){return u.Calendar.useNative()},F.prototype.deriveTimeZone=function(){return void 0===(e=n.default.tz.names[0])&&n.default.tz.setDefault(e=n.default.tz.guess()),e;var e},F.prototype.getParentSection=function(e){e=e.section;if(e){e="string"==typeof e?e:e.name;return this.form.elements[e]}},F.prototype.isSectionCollapsed=function(e){return!(!e||"Section"!==e.type||"collapsible-section"!==e.format&&"accordion-section"!==e.format)&&!0===e.collapsed},F.prototype.isElementPositionBeforeLastFocused=function(e){var t,i=this.lastFocus;if(e&&i&&void 0!==i.rowNumber&&void 0!==i.rowIndex){e=null===(t=this.form.elements)||void 0===t?void 0:t[e];if(e)return void 0!==e.rowNumber&&void 0!==e.rowIndex?e.rowNumber<i.rowNumber||e.rowNumber===i.rowNumber&&e.rowIndex<i.rowIndex:e.index<i.rowNumber||e.index===i.rowNumber&&0<i.rowIndex}return!1},F.prototype.setLastFocus=function(e,t){this.lastFocus={target:e},t&&(this.lastFocus.name=t,(t=null===(e=this.form.elements)||void 0===e?void 0:e[t])&&(void 0!==t.rowNumber&&void 0!==t.rowIndex?(this.lastFocus.rowNumber=t.rowNumber,this.lastFocus.rowIndex=t.rowIndex):(this.lastFocus.rowNumber=t.index,this.lastFocus.rowIndex=0)))},F.prototype.isSection=function(e){return"Section"===(null==e?void 0:e.type)},F.prototype.isAccordionSection=function(e){return this.isSection(e)&&"accordion-section"===e.format},F.prototype.getAllSectionElements=function(){var e,t={};for(e in this.form.elements){var i=this.form.elements[e];this.isSection(i)&&(t[e]=i)}return t},F.prototype.getMutuallyExclusiveSectionElements=function(e){var t=this;if(!(n=this.mutuallyExclusiveSections[e])){var i=this.find(e);if(!this.isAccordionSection(i))return{};(r={})[e]=i;for(var n=r,r=this.getAllSectionElements(),o=Object.keys((0,p.sort)(r,function(e){return e.rowNumber})),e=o.indexOf(e),s=e-1;0<=s;s--){var u=o[s],a=this.find(u);if(!this.isAccordionSection(a))break;n[u]=a}for(s=e+1;s<o.length;s++){var l=o[s],a=this.find(l);if(!this.isAccordionSection(a))break;n[l]=a}Object.keys(n).forEach(function(e){t.mutuallyExclusiveSections[e]=n})}return n},F.prototype.updateAccordionSections=function(t){var i=this.getMutuallyExclusiveSectionElements(t);Object.keys(i).forEach(function(e){i[e].collapsed=e!==t}),d.refreshForm(this,this.container)},F);function F(){this.form={defaults:{},elements:{}},this.errors={},this.refs={},this.enabled=!1,this.visible=!1,this.dismiss=!1,this.custom=!1,this.container=document.createElement("div"),this.eventIndex=0,this.eventQueue=[],this.mutuallyExclusiveSections={},this.nextFocus=!1,this.nextRefresh=!1,this.style=void 0}t.FormHost=l});
|
|
1
|
+
define(["require","exports","tslib","moment-timezone","../Task","../constants","../deps/bluebird_fork","./Calendar","./FormComponent","./FormDefinition","./NumberParser","./numberFormatter","./presenter","./renderers","./styles/stock","./utils"],function(e,t,i,n,r,o,s,u,a,l,f,c,d,h,v,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormHost=t.defs=void 0,n=(0,i.__importDefault)(n),s=(0,i.__importDefault)(s),l=(0,i.__importStar)(l),f=(0,i.__importDefault)(f),d=(0,i.__importStar)(d),h=(0,i.__importStar)(h),t.defs=l;var m="C0166F74-982A-464E-9FB6-9605CB7649C1:FormEvent";function y(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}function b(e,t){switch(typeof e){case"boolean":case"number":case"string":return e;case"object":break;default:return t}if(null===e)return t;if(e instanceof Array){var i=t;null==i&&(i=[]);for(var n=0,r=0,o=e;r<o.length;r++){var s=b(o[r],i[n]);void 0!==s&&(n<e.length?i[n]=s:i.push(s),++n)}return i}var u,a=t;for(u in void 0===a&&(a={}),e)a[u]=b(e[u],a[u]);return a}function g(e){function t(){return void 0!==e&&(t.active=!1,e(),!0)}return t.active=!0,t}var x=void 0,l=(F.prototype.deriveLocale=function(){return o.DEFAULT_LOCALE},F.prototype.mount=function(){var e=this.container,t=e.parentNode;null==t&&document.body.appendChild(e),this.update()},F.prototype.unmount=function(){var e=this.container,t=e.parentNode;null!=t&&t.removeChild(e)},F.prototype.observeFocus=function(e){this.enabled&&e instanceof HTMLElement&&(this.lastFocus&&this.lastFocus.target===e||this.setLastFocus(e))},F.prototype.focus=function(e){!0===(e=null==e?!1:e)&&(this.lastFocus=void 0),!1===e&&!1===(e=this.nextFocus)&&(e=!0),this.nextFocus=e,this.invalidate(!0!==e?e:void 0)},F.prototype.show=function(){var i=this,e=this.container;if(void 0===e)return!1;this.custom||void 0!==this.focusObserver||e.addEventListener("focus",this.focusObserver=function(e){return i.observeFocus(e.target)},!0),this.enabled||(this.nextRefresh=!0,this.focus());var t,n=[],r=this.errors;for(t in r){var o=this.form.elements[t];null!=o&&(o.error=r[t],this.invalidate(t),!1!==o.visible&&(o=this.getParentSection(o),this.isSectionCollapsed(o)&&n.push(o)))}return 0<n.length&&(n.forEach(function(e){var t;i.isAccordionSection(e)?(t=i.findName(e))&&i.updateAccordionSections(t):e.collapsed=!1}),this.invalidate()),this.errors={},this.idle(),!1!==this.nextRefresh&&(this.enabled=!0,this.visible=!0,this.mount()),this.enabled},F.prototype.spin=function(){return void 0!==this.container&&(this.idle(),this.visible&&!this.enabled||(this.nextRefresh=!0,this.enabled=!1,this.visible=!0,this.mount()),this.visible)},F.prototype.hide=function(){return void 0!==this.container&&(this.idle(),this.visible&&(this.enabled=!1,this.visible=!1,this.unmount()),!0)},F.prototype.dispose=function(){if(this.dismiss)return!1;this.dismiss=!0;var e=this.container;e.dispatchEvent(y(m));var t=this.focusObserver;return void 0!==t&&e.removeEventListener("focus",t,!0),this.idle(),this.unmount(),this.refs={},d.releaseForm(this.container),this.container=void 0,this.lastFocus=void 0,!(this.eventTask=void 0)},F.prototype.renderFocus=function(e,t){var i=this.nextFocus;if(this.enabled&&e instanceof HTMLElement)if(!1!==i)if(void 0!==t){if(t===i||!0===i&&void 0===this.lastFocus)return this.nextFocus=!1,this.setLastFocus(e,t),e.focus(),!0}else{var n=null===(n=this.lastFocus)||void 0===n?void 0:n.target;if(!0===i&&n instanceof HTMLElement&&e.contains(n))return this.nextFocus=!1,n.focus(),!0}else if(!1===i&&t&&t!==(null===(i=this.lastFocus)||void 0===i?void 0:i.name)&&this.isElementPositionBeforeLastFocused(t))return this.setLastFocus(e,t),e.focus(),!0;return!1},F.prototype.renderHtml=function(e,t){return"string"==typeof e?p.text.textToHtml(e):p.text.isMarkdown(e)?p.text.markdownToHtml(e.markdown,t):""},F.prototype.renderText=function(e){return"string"==typeof e?e:p.text.isMarkdown(e)?p.text.markdownToText(e.markdown):""},F.prototype.renderStyle=function(e){return"string"==typeof e?(0,p.addStyleToDocument)(e):x=x||(0,p.addStyleToDocument)(v.CSS)},F.prototype.renderVisual=function(e){return d.render(e)||d.renderNone(e)},F.prototype.qualifyDefault=function(e){var t,i=(0,p.sort)(this.form.elements);for(t in i){var n=i[t];if(null!=n&&!1!==n.visible&&n.enabled){if(n.default)return e.value=n.value,t;var r=(0,p.sort)(n.items);if(null!=r)for(var o in r){var s=r[o];if(null!=s&&s.visible&&s.enabled&&s.default)return e.item=o,e.value=s.value,t}}}},F.prototype.qualify=function(e,t){var i;return null==t&&(t={}),"clicked"===e&&void 0===t.name&&(t.name=this.qualifyDefault(t)),t.type=e,void 0===t.routingKey&&(i=t.name,t.routingKey=void 0!==i?e+"$"+i:e),t},F.prototype.post=function(e,t){t=this.publish(e,t);e=this.container;void 0!==e&&e.dispatchEvent(y(m,t))},F.prototype.subscribe=function(i){var e=this.container;if(void 0===e)return g();function n(){i=void 0,e.removeEventListener(m,t)}var t=function(e){var t=e.detail;void 0!==t?s.default.resolve().then(function(){"function"==typeof i&&i(t)}):n()};return e.addEventListener(m,t),g(n)},F.prototype.refresh=function(e){this.custom||("string"==typeof e?(e=this.refs[e],d.refresh(e)):(void 0===this.style&&(this.style=this.renderStyle()),this.refs={},d.refreshForm(this,this.container)))},F.prototype.invalidate=function(e){var t,i=this.nextRefresh;"string"==typeof e&&!0!==i&&(!1===i?this.nextRefresh=((t={})[e]=!0,t):i[e]=!0),void 0!==e&&!0!==e||(this.nextRefresh=!0),!1===e&&!1===i&&(this.nextRefresh={})},F.prototype.update=function(){var e=this.nextRefresh;if(!0===e&&(this.nextRefresh=!1,this.refresh()),"object"==typeof e)for(var t in this.nextRefresh=!1,e)!0===e[t]&&this.refresh(t)},F.prototype.idle=function(){var e=this.timerHandle;void 0!==e&&(this.timerHandle=void 0,e())},F.prototype.busy=function(){var e,t=this;void 0===this.timerHandle&&void 0!==this.container&&(e=setTimeout(function(){return t.spin()}),this.timerHandle=function(){void 0!==e&&(clearTimeout(e),e=void 0)})},F.prototype.publish=function(e,t){return this.enabled?(t=this.enqueue(e,t),0<this.eventQueue.length&&this.spin(),t):this.qualify(e,t)},F.prototype.enqueue=function(e,t){return t=this.qualify(e,t),void 0!==this.eventTask?(this.resolveEvent(t),this.eventTask=void 0):this.eventQueue.push(t),t},F.prototype.dequeue=function(){var e=this.eventQueue;if(0<e.length){var t=this.eventIndex,i=e[t++];return t>=e.length?e.length=this.eventIndex=0:this.eventIndex=t,i}},F.prototype.observe=function(){var t=this;return s.default.attempt(function(){if(void 0!==t.eventTask)return t.eventTask;var e=t.dequeue();return void 0!==e?e:t.show()?(t.eventTask=new r.Task(function(e){t.resolveEvent=e}),t.eventTask):void 0})},F.prototype.load=function(e,t){if(void 0===this.container)return!1;if(this.eventQueue.length=this.eventIndex=0,this.eventTask=void 0,this.errors={},this.lastFocus=void 0,this.nextFocus=!0,this.nextRefresh=!0,this.enqueue("load"),this.enqueue("prepare"),null!=e){var i,e=b(e,e={defaults:{},elements:{}});for(i in this.form=b(t,e),this.form.elements){var n=this.form.elements[i];if((n=b(n,{showFilter:!1,checked:!1,enabled:!0,hoisted:!1,visible:!0,overlay:!1,default:!1,validates:!1,readOnly:!1,require:!1,autoActivate:!1})).items)for(var r in n.items)n.items[r]=b(n.items[r],{enabled:!0,checked:!1,visible:!0,default:!1,validates:!1});this.form.elements[i]=n}}return!0},F.prototype.route=function(e){switch(e.type){case"changed":return this.cascade(e.name);case"prepare":return this.hydrate(e);case"suggest":return this.suggest(e);case"clicked":return this.click(e);case"validate":return this.verify(e);case"verify":return this.submit(e);case"checked":return this.changed(e)}return!1},F.prototype.changed=function(e){return this.enqueue("changed",{name:e.name,item:e.item,value:e.value}),!0},F.prototype.isElementValid=function(e,t,i){return void 0===t&&(t=!0),null!=e&&((i=void 0===i?{status:void 0}:i).status=void 0,p.text.isStatus(e.error)&&"invalid"===e.error.status?!(i.status="invalid"):!0!==e.require||(this.isElementEffectivelyVisible(e)?!!this.isElementValueDefined(e)||!(i.status="missing"):t))},F.prototype.isElementEffectivelyVisible=function(e){if(null==e)return!1;var t=this.getParentSection(e);return!1!==(null==t?void 0:t.visible)&&!1!==e.visible},F.prototype.isElementValueDefined=function(e){if(null==e)return!1;if("CheckBox"===e.type)return!0;var t=e.current;if(null!=t)return!0;t=e.value;if(null!=t&&""!==t)return!0;t=e.label;if(null!=t&&""!==t)return!0;var i=e.items;if(null!=i)for(var n in i){n=i[n];if(null!=n&&!0===n.checked)return!0}return!1},F.prototype.trap=function(e){switch(e.type){case"populate":case"load":break;default:return!1}var t=e.name,i=this.find(t);if(null==i)return!1;e=i.dependsOn;if("string"!=typeof e)return!1;e=this.find(e);return i.enabled=this.isElementEffectivelyVisible(e)&&this.isElementValueDefined(e),this.invalidate(t),!i.enabled},F.prototype.cascade=function(e){var t=this.find(e);if(null==t||!1===t.dependsOn)return!1;var i,n=((t={})[e]=!0,t),r=(0,p.sort)(this.form.elements);for(i in r){var o,s=r[i],u=s.dependsOn;"string"==typeof u?(void 0!==(o=this.find(u))&&"string"!=typeof o.dependsOn&&(o.dependsOn=!0),!0===n[u]&&(n[i]=!0,s.checked=!1,s.current=void 0,s.label=void 0,s.items=void 0,s.value=void 0,this.invalidate(i),this.enqueue("populate",{name:i}))):s.dependsOn=!1}return!0},F.prototype.click=function(e){var t=this.form.elements[e.name];return null!=t&&"ButtonBar"==t.type&&this.validate(e)},F.prototype.hydrate=function(e){for(var t in(0,p.sort)(this.form.elements))this.enqueue("populate",{name:t}),this.enqueue("load",{name:t});return!0},F.prototype.shouldTriggerValidation=function(e){var t=this.find(e.name);if(null!=t&&"string"==typeof e.value){e=e.item;if("string"!=typeof e)return!0===t.validates;t=t.items;if(null!=t){e=t[e];if(null!=e)return!0===e.validates}}},F.prototype.validate=function(e){var t=this.shouldTriggerValidation(e);if(!0!==t)return!1===t&&(this.enqueue("end",{name:e.name,item:e.item,value:e.value,routingKey:"end"}),!0);var i,n=this.errors={},r=(0,p.sort)(this.form.elements);for(i in r){var o=r[i];null!=o&&(n[i]=void 0,this.enqueue("validate",{name:i}))}return this.enqueue("verify",{name:e.name,item:e.item,value:e.value,routingKey:"verify"}),!0},F.prototype.verify=function(e){var t=e.name,i=this.form.elements[t],e={status:void 0};return!this.isElementValid(i,!0,e)&&(e.status&&(this.errors[t]={status:e.status}),!1===this.nextFocus&&this.focus(t),!0)},F.prototype.suggest=function(e){var t=this.form.elements[e.name];return null!=t&&(t.items={message:{label:{status:"trivial"},enabled:!1}},this.invalidate(e.name),!0)},F.prototype.submit=function(e){return!this.hasErrors()&&(this.enqueue("submit",{name:e.name,item:e.item,value:e.value}),!0)},F.prototype.hasErrors=function(){var e,t=this.errors;for(e in t){var i=t[e];if(null!=i)return!0}return!1},F.prototype.find=function(e){if(null!=e)return"string"==typeof(e="object"==typeof e?e.name:e)?this.form.elements[e]:void 0},F.prototype.findName=function(e){for(var t in this.form.elements)if(this.form.elements[t]===e)return t},F.prototype.coerceNumber=function(e){var t=this.deriveLocale();return new f.default(t).parse(e)},F.prototype.formatNumber=function(e,t){return null!=t&&t.locale||((t=t||{}).locale=this.deriveLocale()),(0,c.format)(t,e)},F.prototype.renderCustom=function(e,t){if(e instanceof a.FormComponent)return h.element.renderCustom(e,t)},F.prototype.renderState=function(e,t,i){return!1},F.prototype.deriveCalendar=function(e){return u.Calendar.useNative()},F.prototype.deriveTimeZone=function(){return void 0===(e=n.default.tz.names[0])&&n.default.tz.setDefault(e=n.default.tz.guess()),e;var e},F.prototype.getParentSection=function(e){e=e.section;if(e){e="string"==typeof e?e:e.name;return this.form.elements[e]}},F.prototype.isSectionCollapsed=function(e){return!(!e||"Section"!==e.type||"collapsible-section"!==e.format&&"accordion-section"!==e.format)&&!0===e.collapsed},F.prototype.isElementPositionBeforeLastFocused=function(e){var t,i=this.lastFocus;if(e&&void 0!==(null==i?void 0:i.rowNumber)&&void 0!==i.rowIndex){e=null===(t=this.form.elements)||void 0===t?void 0:t[e];if(e)return void 0!==e.rowNumber&&void 0!==e.rowIndex?e.rowNumber<i.rowNumber||e.rowNumber===i.rowNumber&&e.rowIndex<i.rowIndex:e.index<i.rowNumber||e.index===i.rowNumber&&0<i.rowIndex}return!1},F.prototype.setLastFocus=function(e,t){this.lastFocus={target:e},t&&(this.lastFocus.name=t,(t=null===(e=this.form.elements)||void 0===e?void 0:e[t])&&(void 0!==t.rowNumber&&void 0!==t.rowIndex?(this.lastFocus.rowNumber=t.rowNumber,this.lastFocus.rowIndex=t.rowIndex):(this.lastFocus.rowNumber=t.index,this.lastFocus.rowIndex=0)))},F.prototype.isSection=function(e){return"Section"===(null==e?void 0:e.type)},F.prototype.isAccordionSection=function(e){return this.isSection(e)&&"accordion-section"===e.format},F.prototype.getAllSectionElements=function(){var e,t={};for(e in this.form.elements){var i=this.form.elements[e];this.isSection(i)&&(t[e]=i)}return t},F.prototype.getMutuallyExclusiveSectionElements=function(e){var t=this;if(!(n=this.mutuallyExclusiveSections[e])){var i=this.find(e);if(!this.isAccordionSection(i))return{};(r={})[e]=i;for(var n=r,r=this.getAllSectionElements(),o=Object.keys((0,p.sort)(r,function(e){return e.rowNumber})),e=o.indexOf(e),s=e-1;0<=s;s--){var u=o[s],a=this.find(u);if(!this.isAccordionSection(a))break;n[u]=a}for(s=e+1;s<o.length;s++){var l=o[s],a=this.find(l);if(!this.isAccordionSection(a))break;n[l]=a}Object.keys(n).forEach(function(e){t.mutuallyExclusiveSections[e]=n})}return n},F.prototype.updateAccordionSections=function(t){var i=this.getMutuallyExclusiveSectionElements(t);Object.keys(i).forEach(function(e){i[e].collapsed=e!==t}),d.refreshForm(this,this.container)},F);function F(){this.form={defaults:{},elements:{}},this.errors={},this.refs={},this.enabled=!1,this.visible=!1,this.dismiss=!1,this.custom=!1,this.container=document.createElement("div"),this.eventIndex=0,this.eventQueue=[],this.mutuallyExclusiveSections={},this.nextFocus=!1,this.nextRefresh=!1,this.style=void 0}t.FormHost=l});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,r,t,
|
|
1
|
+
define(["require","exports","tslib","react"],function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderArrowRollup=r.renderArrowRight=r.renderArrowHead=void 0,n=(0,t.__importStar)(n),r.renderArrowHead=function(){return n.createElement("svg",{className:"arrowHead",viewBox:"0 0 200 200",preserveAspectRatio:"none"},n.createElement("path",{d:"M 0 0 V 200 L 200 100 Z"}))},r.renderArrowRight=function(){return n.createElement("svg",{className:"arrowRight",viewBox:"0 0 24 24",preserveAspectRatio:"none"},n.createElement("path",{d:"M20 12l-8-8-1.4 1.4 5.6 5.6H4v2h12.2l-5.6 5.6L12 20l8-8z"}))},r.renderArrowRollup=function(){return n.createElement("svg",{className:"arrowRollup",viewBox:"0 0 200 200",preserveAspectRatio:"none"},n.createElement("circle",{cx:"100",cy:"100",r:"100"}),n.createElement("polyline",{points:"50 100 100 50 150 100"}),n.createElement("polyline",{points:"50 150 100 100 150 150"}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,
|
|
1
|
+
define(["require","exports","tslib","react"],function(e,r,n,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderChevronDown=r.renderChevronUp=void 0,t=(0,n.__importStar)(t),r.renderChevronUp=function(){return t.createElement("svg",{className:"chevronUp",viewBox:"0 0 24 24"},t.createElement("g",null,t.createElement("path",{d:"M20 15.3l-8-8-8 8 1.4 1.4 6.6-6.6 6.6 6.6 1.4-1.4z"})))},r.renderChevronDown=function(){return t.createElement("svg",{className:"chevronDown",viewBox:"0 0 24 24"},t.createElement("g",null,t.createElement("path",{d:"M18.6 7.3L12 13.9 5.4 7.3 4 8.7l8 8 8-8-1.4-1.4z"})))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,t,
|
|
1
|
+
define(["require","exports","tslib","react"],function(e,r,t,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderCrossDelete=r.renderCrossAdd=void 0,n=(0,t.__importStar)(n),r.renderCrossAdd=function(){return n.createElement("svg",{className:"crossAdd",viewBox:"0 0 200 200",preserveAspectRatio:"none"},n.createElement("polyline",{points:"0 100 200 100"}),n.createElement("polyline",{points:"100 0 100 200"}))},r.renderCrossDelete=function(){return n.createElement("svg",{className:"crossDelete",viewBox:"0 0 200 200",preserveAspectRatio:"none"},n.createElement("circle",{cx:"100",cy:"100",r:"100"}),n.createElement("polyline",{points:"50 50 150 150"}),n.createElement("polyline",{points:"50 150 150 50"}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,t,
|
|
1
|
+
define(["require","exports","tslib","react"],function(e,r,t,c){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderClock=r.renderCalendar=void 0,c=(0,t.__importStar)(c),r.renderCalendar=function(){return c.createElement("svg",{className:"calendar",viewBox:"0 0 24 24"},c.createElement("path",{d:"M23 6v16c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1V6m21-6H2C.9 0 0 .9 0 2v20c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z"}),c.createElement("path",{d:"M13 13h3v3h-3v-3zm-2-2H8V8h3v3zm5-3h-3v3h3V8zm5 0h-3v3h3V8zM6 13H3v3h3v-3zm5 0H8v3h3v-3zm10 0h-3v3h3v-3zM6 18H3v3h3v-3zm5 0H8v3h3v-3zm5 0h-3v3h3v-3z"}))},r.renderClock=function(){return c.createElement("svg",{className:"clock",viewBox:"0 0 24 24"},c.createElement("path",{d:"M12.9748 11.6775C13.8937 12.9336 16 16 16 16s-4.4547-3.0477-4.7742-3.3673c-.1703-.1703-.2432-.4286-.2222-.6921C11.043 11.1284 12 4 12 4s.8257 6.1508.9748 7.6775zM12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10S2 17.514 2 12 6.486 2 12 2m0-2C5.3726 0 0 5.3726 0 12s5.3726 12 12 12 12-5.3726 12-12S18.6274 0 12 0z"}))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,t,
|
|
1
|
+
define(["require","exports","tslib","react"],function(e,r,t,L){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderRemove=void 0,L=(0,t.__importStar)(L),r.renderRemove=function(){return L.createElement("svg",{className:"remove",viewBox:"0 0 24 24"},L.createElement("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}))}});
|
package/amd/forms/assets/scan.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(h,v,e,z){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.renderScanMulti=v.renderScanQrcode=v.renderScanBarcode=void 0,z=(0,e.
|
|
1
|
+
define(["require","exports","tslib","react"],function(h,v,e,z){"use strict";Object.defineProperty(v,"__esModule",{value:!0}),v.renderScanMulti=v.renderScanQrcode=v.renderScanBarcode=void 0,z=(0,e.__importStar)(z),v.renderScanBarcode=function(){return z.createElement("svg",{className:"barcode",viewBox:"0 0 24 24"},z.createElement("path",{d:"M1 8V4.6666C1 2.65 2.65 1 4.6667 1H8v2H4.6667C3.7477 3 3 3.7477 3 4.6666V8H1zm15-5h3.3333C20.2523 3 21 3.7477 21 4.6666V8h2V4.6666C23 2.65 21.35 1 19.3333 1H16v2zM8 21H4.6667C3.7477 21 3 20.2523 3 19.3333V16H1v3.3333C1 21.35 2.65 23 4.6667 23H8v-2zm13-5v3.3333C21 20.2523 20.2523 21 19.3333 21H16v2h3.3333C21.35 23 23 21.35 23 19.3333V16h-2zM6 5H5v14h1V5zm3 0H7v14h2V5zm5 0h-2v14h2V5zm-3 0h-1v14h1V5zm5 0h-1v14h1V5zm3 0h-2v14h2V5z"}))},v.renderScanQrcode=function(){return z.createElement("svg",{className:"qrCode",viewBox:"0 0 24 24"},z.createElement("path",{d:"M9 6v3H6V6h3m1-1H5v5h5V5zM8 7H7v1h1V7zm1 8v3H6v-3h3m1-1H5v5h5v-5zm-2 2H7v1h1v-1zM18 6v3h-3V6h3m1-1h-5v5h5V5zm-2 2h-1v1h1V7zm-5 1h1V7h-1v1zm0 1h-1v1h1V9zm2 5h-3v1h3v-1zm0 2h1v-1h-1v1zm-2 0h-1v1h1v-1zm0 2h1v-1h-1v1zm4-1h1v-1h-1v1zm-1 1v-1h-1v2h2v-1h-1zm2-4h-1v1h1v-1zm1 2h1v-2h-1v2zm0 3h1v-1h-1v1zm-6-1h-1v1h1v-1zm0-13h-1v2h1V5zm-6 6H5v1h1v-1zm12 0v1h-1v1h2v-2h-1zm-2 0h-1v1h1v-1zm-1 3h1v-1h-1v1zm-1-3h-2v2h1v-1h1v-1zm-4 1h1v-1h-1v1zm-2 0v-1H7v2h3v-1H8zM3 8V4.6666C3 3.7477 3.7477 3 4.6667 3H8V1H4.6667C2.65 1 1 2.65 1 4.6666V8h2zm13-5h3.3333C20.2523 3 21 3.7477 21 4.6666V8h2V4.6666C23 2.65 21.35 1 19.3333 1H16v2zM8 21H4.6667C3.7477 21 3 20.2523 3 19.3333V16H1v3.3333C1 21.35 2.65 23 4.6667 23H8v-2zm13-5v3.3333C21 20.2523 20.2523 21 19.3333 21H16v2h3.3333C21.35 23 23 21.35 23 19.3333V16h-2z"}))},v.renderScanMulti=function(){return z.createElement("svg",{className:"barcodeOrQrCode",viewBox:"0 0 24 24"},z.createElement("path",{d:"M16 7h1v1h-1V7zM6 19V5H5v14h1zm1 0h2V5H7v14zm3 0h1V5h-1v14zm11 .3333C21 20.2523 20.2523 21 19.3333 21H16v2h3.3333C21.35 23 23 21.35 23 19.3333V16h-2v3.3333zM16 11h-1v1h1v-1zM3 4.6666C3 3.7477 3.7477 3 4.6667 3H8V1H4.6667C2.65 1 1 2.65 1 4.6666V8h2V4.6666zM14 11h-1v1h1v-1zm0 3h-1v1h1v-1zm1 2v-1h-1v1h1zm4.3333-15H16v2h3.3333C20.2523 3 21 3.7477 21 4.6666V8h2V4.6666C23 2.65 21.35 1 19.3333 1zM14 18h1v1h1v-2h-2v1zM3 19.3333V16H1v3.3333C1 21.35 2.65 23 4.6667 23H8v-2H4.6667C3.7477 21 3 20.2523 3 19.3333zM19 14h-1v2h1v-2zm-5-9v5h5V5h-5zm4 4h-3V6h3v3zm0 10h1v-1h-1v1zm-3-6v1h1v-1h-1zm2 1h-1v1h1v-1zm-1 3h1v-1h-1v1zm3-6h-1v1h-1v1h2v-2zm-5 7h-1v1h1v-1z"}))}});
|
package/amd/forms/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(e,n,r,l){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useFocusCallback=n.renderFocus=n.renderError=n.renderDescription=n.renderTitle=n.getDescriptionId=n.getTitleId=void 0,
|
|
1
|
+
define(["require","exports","tslib","react","react"],function(e,n,r,l,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useFocusCallback=n.renderFocus=n.renderError=n.renderDescription=n.renderTitle=n.getDescriptionId=n.getTitleId=void 0,i=(0,r.__importStar)(i);function o(e,n){return{__html:n.renderHtml(e)}}function u(e){return"".concat(e).concat("-title")}function c(e){return"".concat(e).concat("-description")}n.getTitleId=u,n.getDescriptionId=c,n.renderTitle=function(e,n,r,t){return e=o(e.title,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?i.createElement("span",{className:t=t||"form-element-title",dangerouslySetInnerHTML:e,id:u(r)}):null},n.renderDescription=function(e,n,r,t){return e=o(e.description,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?i.createElement("aside",{className:t,dangerouslySetInnerHTML:e,id:c(r)}):null},n.renderError=function(e,n){return e=o(e.error,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?i.createElement("div",{className:"notice",dangerouslySetInnerHTML:e,role:"alert"}):null},n.renderFocus=function(e,n,r){null===e||e.disabled||r.renderFocus(e,n)},n.useFocusCallback=function(e){var n=e.props,r=n.host,t=n.name;return(0,l.useCallback)(function(e){null===(e=Array.isArray(null==e?void 0:e.thumbRefs)&&0<e.thumbRefs.length?e.thumbRefs[0].current:e)||e.disabled||r.renderFocus(e,t)},[e.enabled,t,r])}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","date-fns","react","../../constants","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],function(a,e,E,b,C,y,S,N,_,L,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})
|
|
1
|
+
define(["require","exports","tslib","date-fns","react","react","../../constants","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],function(a,e,E,b,C,y,S,N,_,L,h,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),y=(0,E.__importStar)(y);var k=(0,C.lazy)(function(){return new Promise(function(e,t){a(["./ReactDateRangeCalendar"],e,t)}).then(E.__importStar)});(0,n.addStyleToDocument)(t.CSS);var P,F=(0,h.getLocaleDateFormat)();e.default=function(e){var t=e.component,a=e.element,n=e.isOpen,o=e.onChange,r=e.onPopupToggle,i=t.props.host,l=(0,C.useState)(),c=l[0],s=l[1],u=(0,C.useState)(),d=u[0],f=u[1],m=i.renderText(a.tooltip),p=!t.enabled,l=p?"inner disabled":"inner";(0,C.useEffect)(function(){(0,E.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,E.__generator)(this,function(e){switch(e.label){case 0:return"inv"===(t=i.deriveLocale())||"en"===t||t===S.DEFAULT_LOCALE?[2]:[4,(0,h.getDateFnsLocale)(t)];case 1:return P=e.sent(),[2]}})})},[]),(0,C.useEffect)(function(){s(e.value),f((0,h.getDateAsLocaleFormattedString)(e.value))},[e.value]);function v(e){var t=""!==(a="string"==typeof e?e:e.target.value)&&void 0!==a,e=t?(0,h.tryParseDateText)(a):void 0,a=t?e?(0,b.parse)(e,F,0):new Date(NaN):void 0;t?(0,h.isValidDate)(a)?(s(a),f(e),D(),g(a)):(D({status:"invalid"}),s(new Date(NaN)),g(void 0)):(D(),s(void 0),g(void 0))}function g(e){"function"==typeof o&&o(e)}function D(e){a.error=e,t.forceUpdate()}u=(0,_.useFocusCallback)(t);return y.createElement("div",{className:"SimpleDatePicker outer",title:m},y.createElement("div",{className:l},y.createElement("input",{"aria-label":"Date Picker",ref:u,disabled:p,type:"text",onChange:function(e){f(e.target.value)},onBlur:v,onKeyDown:function(e){(e=e).stopPropagation(),"Enter"===e.key?v(d):"Escape"===e.key&&v((0,h.getDateAsLocaleFormattedString)(c))},placeholder:F.toUpperCase(),value:d})),y.createElement("div",{className:"buttonContainer"},y.createElement("button",{className:"calendarButton",disabled:p,onClick:function(){"function"==typeof r&&r(!n)}},(0,N.renderCalendar)()),n&&y.createElement(C.Suspense,{fallback:null},y.createElement("div",{className:L.CssClasses.DROPDOWN},y.createElement(k,{format:F,editableDateInputs:!1,date:c,onChange:function(e){s(e),f((0,h.getDateAsLocaleFormattedString)(e)),D(),g(e)},locale:P}),y.createElement("button",{className:"done",onClick:function(){"function"==typeof r&&r(!1)}},i.renderText("@common-done"))))))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","date-fns","react","../../constants","../FormElementOuter","../assets/arrow","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],function(a,e,L,A,k,T,x,R,V,O,P,U,t,
|
|
1
|
+
define(["require","exports","tslib","date-fns","react","react","../../constants","../FormElementOuter","../assets/arrow","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],function(a,e,L,A,k,T,x,R,V,O,P,U,B,t,q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),T=(0,L.__importStar)(T),R=(0,L.__importDefault)(R);var j,z=(0,k.lazy)(function(){return new Promise(function(e,t){a(["./DateRange"],e,t)}).then(L.__importStar)});(0,q.addStyleToDocument)(t.CSS),(t=j=j||{}).Start="start",t.End="end";var K,I=(0,B.getLocaleDateFormat)();e.default=function(e){var t=e.component,n=e.element,r=(0,k.useRef)(),a=(0,k.useState)(!1),o=a[0],i=a[1],s=(0,k.useState)(),l=s[0],u=s[1],c=(0,k.useState)(),d=c[0],v=c[1],m=(0,k.useState)(),D=m[0],f=m[1],p=(0,k.useState)(),g=p[0],S=p[1],e=!t.enabled,a=t.props,E=a.host,y=a.name,s=E.renderText(n.tooltip),c=t.enabled?"inner":"inner disabled",m=[n.type,(0,q.makeSafeClassName)(y)];(0,k.useEffect)(function(){(0,L.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,L.__generator)(this,function(e){switch(e.label){case 0:return"inv"===(t=E.deriveLocale())||"en"===t||t===x.DEFAULT_LOCALE?[2]:[4,(0,B.getDateFnsLocale)(t)];case 1:return K=e.sent(),[2]}})})},[]),(0,k.useEffect)(function(){var e;n.value!==r.current&&((e=(0,B.convertToDateRangeRef)(n.value))?(u(e.startDate),f(e.endDate),v((0,B.getDateAsLocaleFormattedString)(e.startDate)),S((0,B.getDateAsLocaleFormattedString)(e.endDate))):void 0===n.value&&(u(void 0),f(void 0),v(""),S("")),n.error&&_(),F(null==e?void 0:e.startDate,null==e?void 0:e.endDate,!1))},[n.value]);function b(e,t){var a,n=""!==(i="string"==typeof e?e:e.target.value)&&void 0!==i,r=n?(0,B.tryParseDateText)(i):void 0,o=n?r?(0,A.parse)(r,I,0):new Date(NaN):void 0,i=(e=t===j.Start)?o:l,t=e?D:o;n?(0,B.isValidDate)(o)?e?(u(i),v(r),(a=!(0,B.isValidDate)(t)||(0,A.isAfter)(i,t))&&(f(i),S(r)),_(),N(i,a?i:t)):(f(t),S(r),(a=!(0,B.isValidDate)(i)||(0,A.isBefore)(t,i))&&(u(t),v(r)),_(),N(a?t:i,t)):(_({status:"invalid"}),N(),(e?u:f)(new Date(NaN))):((e?void 0===t||(0,B.isValidDate)(t):void 0===i||(0,B.isValidDate)(i))&&_(),N(),(e?u:f)(void 0))}function C(e,t){(t===j.Start?v:S)(e.target.value)}function h(e,t){var a;e.stopPropagation(),"Enter"===e.key?(a=t===j.Start?d:g,b(a,t)):"Escape"===e.key&&(e=t===j.Start?(0,B.getDateAsLocaleFormattedString)(l):(0,B.getDateAsLocaleFormattedString)(D),b(e,t))}function N(e,t){w(e,t)&&F(e,t)}var p=(0,P.useFocusCallback)(t),w=function(e,t){var a=r.current;return!(e||t||!a)||(!(!e||!t||a)||!!(e&&t&&a)&&(!(0,A.isEqual)(e,a.startDate)||!(0,A.isEqual)(t,a.endDate)))},_=function(e){n.error=e,t.forceUpdate()},F=function(e,t,a){void 0===a&&(a=!0),r.current=n.value=e&&t?{refValueType:"daterange",startDate:e,endDate:t}:void 0,a&&E.post("changed",{name:y,value:n.value})},a={startDate:(null===(a=r.current)||void 0===a?void 0:a.startDate)||new Date,endDate:(null===(a=r.current)||void 0===a?void 0:a.endDate)||new Date,key:"selection",showDateDisplay:!1};return T.createElement(R.default,{className:m.join(" "),component:t,element:n},T.createElement("div",{className:"outer",title:s},T.createElement("div",{className:c},T.createElement("input",{ref:p,disabled:e,type:"text",onChange:function(e){return C(e,j.Start)},onBlur:function(e){return b(e,j.Start)},onKeyDown:function(e){return h(e,j.Start)},placeholder:I.toUpperCase(),value:d}),T.createElement("span",{className:"arrow"},(0,V.renderArrowRight)()),T.createElement("input",{disabled:e,type:"text",onChange:function(e){return C(e,j.End)},onBlur:function(e){return b(e,j.End)},onKeyDown:function(e){return h(e,j.End)},placeholder:I.toUpperCase(),value:g})),T.createElement("div",{className:"buttonContainer"},T.createElement("button",{className:"calendarButton",disabled:e,onClick:function(){i(!o)}},(0,O.renderCalendar)()),o&&T.createElement(k.Suspense,{fallback:null},T.createElement("div",{className:U.CssClasses.DROPDOWN},T.createElement(z,{dateDisplayFormat:I,editableDateInputs:!1,months:1,direction:"horizontal",ranges:[a],onChange:function(e){var t=e.selection.startDate,e=e.selection.endDate;u(t),v((0,B.getDateAsLocaleFormattedString)(t)),f(e),S((0,B.getDateAsLocaleFormattedString)(e)),_(),N(t,e)},locale:K}),T.createElement("button",{className:"done",onClick:function(){i(!1)}},E.renderText("@common-done")))))))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react","../Calendar","../FormElementOuter","../assets/datetime","../common","../utils","./DatePicker","./TimePickerInput"],function(e,t,k,D,M,_,P,F,O,C,I){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
|
|
1
|
+
define(["require","exports","tslib","react","react","../Calendar","../FormElementOuter","../assets/datetime","../common","../utils","./DatePicker","./TimePickerInput"],function(e,t,k,D,M,_,P,F,O,C,I,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),M=(0,k.__importStar)(M),P=(0,k.__importDefault)(P),I=(0,k.__importDefault)(I),S=(0,k.__importDefault)(S),t.default=function(e){var t=(0,D.useState)(!1),a=t[0],n=t[1],o=(0,D.useState)(!1),i=o[0],l=o[1],r=e.component,c=e.element,u=r.props,s=u.host,d=u.name,m=(0,O.useFocusCallback)(r),f=[c.type,(0,C.makeSafeClassName)(d)],t=s.renderText(c.tooltip),p=function(e,t){if("object"==typeof e&&null!==e)switch(e.refValueType){case"date":case"time":case"datetime":t=e.format}if("object"!=typeof t)return"app"===t?t:"device";if(null===t)return"device";var a=t.locale,n=t.timezone;return"string"==typeof a&&"string"==typeof n?{locale:a,timezone:n}:"device"}(c.value,c.format),v=s.deriveCalendar(p),g=function(e,t){if("object"==typeof e){if(null===e)return;switch(e.refValueType){case"date":case"time":case"datetime":break;default:return}e=e.value}if("number"==typeof e||"string"==typeof e){e=t.coerceIntoValue(e);if(null!=e&&isFinite(e.valueOf()))return e}}(c.value,v),y="datetime",T=function(e){if("object"==typeof e&&null!==e)switch(e.refValueType){case"date":case"time":case"datetime":return e.refValueType}}(c.value);"DatePicker"===c.type&&(y="date"),"TimePicker"===c.type&&(y="time");o=g;"datetime"===y&&"date"===T?o=void 0:T=y;e={calendar:v,disabled:!r.enabled,doneText:s.renderText("@common-done"),placeholder:s.renderText(c.prompt),title:t};function h(e,t){return void 0===(e=null!=e&&!isFinite(e.valueOf())?void 0:e)?void 0!==g:void 0===g||(T!==t||("date"===t&&((e=new Date(e)).setHours(g.getHours()),e.setMinutes(g.getMinutes()),e.setSeconds(g.getSeconds()),e.setMilliseconds(g.getMilliseconds())),"time"===t&&((e=new Date(e)).setFullYear(g.getFullYear()),e.setMonth(g.getMonth()),e.setDate(g.getDate())),g.valueOf()!==e.valueOf()))}u=function(){var e=!i;l(e),e&&n(!1)},t=[];function b(e,t){void 0!==e&&isFinite(e.valueOf())?c.value={refValueType:t,format:p,display:v.format(e,_.Calendar.fullFormat),value:e.valueOf()}:c.value=void 0}return"DatePicker"!==c.type&&"DateTimePicker"!==c.type||t.push(M.createElement(I.default,{component:r,element:c,isOpen:a,onChange:function(e){var t,a,n=y;"datetime"===y&&void 0!==e&&("date"===T&&(n="date"),void 0!==g&&(t=v.coerceIntoLocal(g),(a=v.coerceIntoLocal(e)).setHours(t.getHours()),a.setMinutes(t.getMinutes()),a.setSeconds(t.getSeconds()),a.setMilliseconds(t.getMilliseconds()),e=v.coerceIntoValue(a))),h(e,n)&&(b(e,n),r.forceUpdate(),s.post("changed",{name:d,value:c.value}))},onPopupToggle:function(){var e=!a;n(e),e&&l(!1)},value:g})),"TimePicker"!==c.type&&"DateTimePicker"!==c.type||t.push(M.createElement("div",{className:"outer"},M.createElement("div",{className:"inner"},M.createElement(S.default,(0,k.__assign)({},e,{isOpen:i,onChange:function(e){var t,a,n=y;"datetime"===y&&void 0!==g&&(void 0!==e?(t=v.coerceIntoLocal(g),(a=v.coerceIntoLocal(e)).setFullYear(t.getFullYear()),a.setMonth(t.getMonth()),a.setDate(t.getDate()),e=v.coerceIntoValue(a)):(e=g,n="date")),h(e,n)&&(b(e,n),r.forceUpdate(),s.post("changed",{name:d,value:c.value}))},onPopupToggle:u,ref:m,value:o}))),M.createElement("button",{className:"clockButton",disabled:e.disabled,onClick:u},(0,F.renderClock)()))),b(g,T),M.createElement(P.default,{className:f.join(" "),component:r,element:c},t)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(t,r,e,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Navigator=void 0,a=(0,e.
|
|
1
|
+
define(["require","exports","tslib","react","react"],function(t,r,e,n,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Navigator=void 0,a=(0,e.__importStar)(a);var i,o="__navigator",e=(i=n.Component,(0,e.__extends)(s,i),s.find=function(t){for(var r=t.target;r!==t.currentTarget&&r instanceof HTMLElement;){var e=r[o];if(e instanceof s)return e;r=r.parentNode}},s.prototype.init=function(t){var r=this.target;void 0!==r&&(this.target=void 0,r[o]=void 0),null!==t&&((this.target=t)[o]=this)},s.prototype.focus=function(){this.target.focus()},s.prototype.scrollTo=function(t){var r=this.props.children;if(Array.isArray(r)){var e=this.target,n=e.scrollHeight/r.length,i=n/2,r=t%n,r=(e.scrollHeight-e.clientHeight)/2+(r+(r<-i?n:i<=r?-n:0));return e.scrollTop=r,Math.round(t/n)}return 0},s.prototype.hasStates=function(){var t=this.state;if(null==t)return!1;t=t.states;return null!=t},s.prototype.render=function(){var r=this,t=this.props,e=this.state||{},n=e.states,i=[t.className];if(null!=n)for(var o in n)!0===n[o]&&i.push(o);return a.createElement("div",{className:i.join(" "),tabIndex:e.tabIndex,ref:function(t){return r.init(t)}},this.props.children)},s);function s(){return null!==i&&i.apply(this,arguments)||this}r.Navigator=e});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],function(e,k,F,L,I,w,R,U,P,B){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.DEFAULT_STEP=k.DEFAULT_DECIMALS=k.MIN_DECIMALS=void 0,
|
|
1
|
+
define(["require","exports","tslib","react","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],function(e,k,F,L,I,w,R,U,P,B,j){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.DEFAULT_STEP=k.DEFAULT_DECIMALS=k.MIN_DECIMALS=void 0,I=(0,F.__importStar)(I),R=(0,F.__importDefault)(R),k.MIN_DECIMALS=0,k.DEFAULT_DECIMALS=0,k.DEFAULT_STEP=0;k.default=function(e){function t(e){n.value=o.current=e}var a=e.component,n=e.element,r=(0,L.useMemo)(function(){return(0,B.getProcessedNumberFormat)(n.format,k.MIN_DECIMALS,k.DEFAULT_DECIMALS,k.DEFAULT_STEP)},[]),o=(0,L.useRef)(null),u=(0,L.useState)(),i=u[0],s=u[1],l=(0,L.useState)(),c=l[0],d=l[1];(0,L.useEffect)(function(){var e;null!==o.current&&n.value===o.current||(e=(0,B.getNumberSliderValues)(n.value,r),t(e),T(e))},[n.value]);var e=a.props,m=e.host,p=e.name,f=!a.enabled,u=(0,U.useFocusCallback)(a),v=r.lowerBound,g=r.upperBound,l=r.precision,_=n.showMinMaxLabels,x=n.manualEntry,E=r.step,y=n.showTickMarks,y=0<E&&y;0===E&&(E=1/Math.pow(10,l));function b(e){e=N(e),T(e),(Array.isArray(o.current)||e[0]===v&&e[1]===g)&&(!Array.isArray(o.current)||e[0]===o.current[0]&&e[1]===o.current[1])||(t(e),m.post("changed",{name:p,value:n.value}))}function h(e){a.autoInput=!0}function A(e){return e.target.select()}function N(e){return[e[0]<v?v:e[0]>g?g:e[0],e[1]>g?g:e[1]<v?v:e[1]].sort(function(e,t){return e-t})}function C(e,t,n,r,a,o){return I.createElement("div",{style:{position:"absolute",top:t,color:a=void 0===a?"#fff":a,fontWeight:"bold",fontSize:"14px",fontFamily:"Arial,Helvetica Neue,Helvetica,sans-serif",padding:"4px",borderRadius:"5px",backgroundColor:o=void 0===o?"#197dc8":o,left:n,right:r,whiteSpace:"nowrap"}},e)}var D={currency:r.currency,customDisplayFormat:r.customDisplayFormat,format:r.displayFormat,fractionalDigits:l,locale:m.deriveLocale()},e=m.renderText(n.tooltip),l=[n.type,(0,j.makeSafeClassName)(p)],M=(0,L.useMemo)(function(){return(0,j.throttle)(function(e){m.post("dragged",{name:p,value:e})})},[]),S=function(e,t){var n=i.slice(),e=""!==e?Number(e):NaN;isNaN(e)?T(n):(0===t?(e=e<v?v:e)>n[1]&&(e=n[1]):(e=g<e?g:e)<n[0]&&(e=n[0]),n[t]=e,b(n))},T=function(e){s(e),d(e)};return i?I.createElement(R.default,{className:l.join(" "),component:a,element:n,errorClassName:P.CssClasses.ERROR},I.createElement("div",{className:"slider-container",title:e},I.createElement(w.Range,{draggableTrack:!0,step:E,min:v,max:g,values:i,onChange:function(e){e=N(e),T(e),Array.isArray(n.value)&&e[0]===n.value[0]&&e[1]===n.value[1]||M(e)},onFinalChange:b,renderMark:function(e){var t=e.props,n=e.index,e=v+n*E,n=g<e,e=e>i[0]&&e<i[1]?"#197dc8":"#ccc";return y&&!n&&I.createElement("div",(0,F.__assign)({},t,{style:(0,F.__assign)((0,F.__assign)({},t.style),{height:"16px",width:"2px",backgroundColor:e})}))},renderTrack:function(e){var t=e.props,e=e.children;return I.createElement("div",(0,F.__assign)({},t,{style:(0,F.__assign)((0,F.__assign)({},t.style),{height:"6px",margin:"50px 0px 24px",width:"100%",background:(0,w.getTrackBackground)({values:i,colors:["#ccc","#197dc8","#ccc"],min:v,max:g,rtl:!1})})}),!1!==_&&C(m.formatNumber(v,D),"20px","-12px",void 0,"#333","#fff"),!1!==_&&C(m.formatNumber(g,D),"20px",void 0,"-12px","#333","#fff"),e)},renderThumb:function(e){var t=e.props,n=e.value,r=e.index,a=g-v,e=n-v,n=e<a/10?"0":"auto",e=9*a/10<e?"0":"auto";return I.createElement("div",(0,F.__assign)({},t,{style:(0,F.__assign)((0,F.__assign)({},t.style),{height:"24px",width:"24px",borderRadius:"12px",backgroundColor:"#197dc8",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 4px #AAA",outline:"none"})}),C(m.formatNumber(i[r],D),"-32px",n,e))},disabled:f,ref:u})),x||!c?null:I.createElement("div",{className:"inputs"},c.map(function(e,r){return I.createElement("span",null,0===r?m.renderText("@common-start"):m.renderText("@common-end"),I.createElement("input",{key:r,type:"number",disabled:f,min:0===r?v:i[0],max:0===r?i[1]:g,step:E,title:e+"",value:e,onBlur:function(e){S(e.target.value,r)},onChange:function(e){return t=e,n=r,(e=c.slice())[n]=t.target.value,d(e),void(a.autoInput&&S(t.target.value,n));var t,n},onKeyDown:function(e){return t=r,(e=e).stopPropagation(),a.autoInput=!1,void("Enter"===e.key?S(c[t]+"",t):"Escape"===e.key&&T(i.slice()));var t},onMouseDown:h,onFocus:A}))}))):null}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react","react-range","../FormElementOuter","../common","../constants","../
|
|
1
|
+
define(["require","exports","tslib","react","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],function(e,I,k,w,R,U,P,j,B,O,H){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.DEFAULT_STEP=I.DEFAULT_DECIMALS=I.MIN_DECIMALS=void 0,R=(0,k.__importStar)(R),P=(0,k.__importDefault)(P),I.MIN_DECIMALS=-20,I.DEFAULT_DECIMALS=3,I.DEFAULT_STEP=1;I.default=function(e){function t(e){var t;i.value=(t=e,{refValueType:"number",format:s,display:o.formatNumber(t,v),numeric:t}),l.current=e}var n=e.component,r=n.props,o=r.host,a=r.name,i=e.element,u=!n.enabled,s=(0,w.useMemo)(function(){return(0,O.getProcessedNumberFormat)(i.format,I.MIN_DECIMALS,I.DEFAULT_DECIMALS,I.DEFAULT_STEP)},[]),l=(0,w.useRef)(null),c=s.lowerBound,p=s.upperBound,m=s.precision,d=i.showMinMaxLabels,f=i.manualEntry,v={format:s.displayFormat,fractionalDigits:m,locale:o.deriveLocale()},r=(0,w.useState)(),g=r[0],_=r[1],e=(0,w.useState)(),E=e[0],x=e[1];(0,w.useEffect)(function(){var e=i.value;null!==l.current&&(null==e?void 0:e.numeric)===l.current||(e=(0,O.getNumberSliderValues)(e,s,!0),t(e[0]),F(e[0]))},[i.value]);var r=(0,j.useFocusCallback)(n),b=s.step,h=i.showTickMarks,h=0<b&&h;0===b&&(b=1/Math.pow(10,m));function y(e){e=D(e),F(e),e!==l.current&&(t(e),o.post("changed",{name:a,value:i.value}))}function N(e){x(e.target.value),n.autoInput&&T(e.target.value)}function C(e){T(e.target.value)}function S(e){e.stopPropagation(),n.autoInput=!1,"Enter"===e.key?T(E+""):"Escape"===e.key&&F(g)}function M(e){n.autoInput=!0}function A(e){return e.target.select()}function D(e){return e<c?c:p<e?p:e}function L(e,t,n,r,a,o){return R.createElement("div",{style:{position:"absolute",top:t,color:a=void 0===a?"#fff":a,fontWeight:"bold",fontSize:"14px",fontFamily:"Arial,Helvetica Neue,Helvetica,sans-serif",padding:"4px",borderRadius:"5px",backgroundColor:o=void 0===o?"#197dc8":o,left:n,right:r,whiteSpace:"nowrap"}},e)}var e=o.renderText(i.tooltip),m=[i.type,(0,H.makeSafeClassName)(a)],T=function(e){e=""!==e?Number(e):NaN;isNaN(e)?F(e):y(e=p<(e=e<c?c:e)?p:e)},F=function(e){_(e),x(e)};return R.createElement(P.default,{className:m.join(" "),component:n,element:i,errorClassName:B.CssClasses.ERROR},R.createElement("div",{className:"slider-container",title:e},R.createElement(U.Range,{step:b,min:c,max:p,values:[g],onChange:function(e){return e=e[0],e=D(e),void F(e)},onFinalChange:function(e){return y(e[0])},renderMark:function(e){var t=e.props,e=e.index;return h&&!(p<c+e*b)&&R.createElement("div",(0,k.__assign)({},t,{style:(0,k.__assign)((0,k.__assign)({},t.style),{height:"16px",width:"2px",backgroundColor:"#ccc"})}))},renderTrack:function(e){var t=e.props,e=e.children;return R.createElement("div",(0,k.__assign)({},t,{style:(0,k.__assign)((0,k.__assign)({},t.style),{height:"6px",margin:"50px 0px 24px",width:"100%",background:"#ccc"})}),!1!==d&&L(o.formatNumber(c,v),"20px","-12px",void 0,"#333","#fff"),!1!==d&&L(o.formatNumber(p,v),"20px",void 0,"-12px","#333","#fff"),e)},renderThumb:function(e){var t=e.props,n=e.value,r=p-c,a=n-c,e=a<r/10?"0":"auto",a=9*r/10<a?"0":"auto";return R.createElement("div",(0,k.__assign)({},t,{style:(0,k.__assign)((0,k.__assign)({},t.style),{height:"24px",width:"24px",borderRadius:"12px",backgroundColor:"#197dc8",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 4px #AAA",outline:"none"})}),L(o.formatNumber(n,v),"-32px",e,a))},disabled:u,ref:r})),!1===f?null:R.createElement("div",{className:"inputs"},R.createElement("span",null,R.createElement("input",{type:"number",disabled:u,min:c,max:p,step:b,title:E+"",value:E,onBlur:C,onChange:N,onKeyDown:S,onMouseDown:M,onFocus:A}))))}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define(["require","exports","tslib","react"],function(t,e,n,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyntheticButton=void 0,o=(0,n.
|
|
1
|
+
define(["require","exports","tslib","react","react"],function(t,e,n,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyntheticButton=void 0,o=(0,n.__importStar)(o);var a,i="__synthetic_button",n=(a=r.Component,(0,n.__extends)(s,a),s.find=function(t){for(var e=t.target;e!==t.currentTarget&&e instanceof HTMLElement;){var n=e[i];if(n instanceof s)return n;e=e.parentNode}},s.search=function(t){for(var e=t.querySelectorAll("div"),n=[],r=0;r<e.length;r++){var a=e.item(r)[i];a instanceof s&&n.push(a)}return n},s.prototype.init=function(t){var e=this.target;void 0!==e&&(this.target=void 0,e[i]=void 0),null!==t&&((this.target=t)[i]=this)},s.prototype.render=function(){var e=this,t=this.props,n=this.state||{},r=n.states,a=["button"];if(null!=r)for(var i in r)!0===r[i]&&a.push(i);var s=n.content,n=n.symbol;return o.createElement("div",{className:this.props.className,ref:function(t){return e.init(t)}},o.createElement("div",{className:a.join(" "),"aria-label":t.ariaLabel},o.createElement("span",{className:"content"},s),o.createElement("span",{className:"symbol"},n)))},s);function s(){return null!==a&&a.apply(this,arguments)||this}e.SyntheticButton=n});
|