@vertigis/workflow 5.31.1 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +0 -2
- package/amd/app/AppActivity.js +1 -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 +4 -4
- 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 +2 -2
- 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 +0 -2
- package/esm/app/AppActivity.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 +4 -4
- 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 +2 -2
- 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 +0 -2
- package/runtime/app/AppActivity.js +1 -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 +4 -4
- 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 +2 -2
- 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
|
-
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../Errors","../Hooks","../Task","../deps/bluebird_fork"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.clearExpressionCache=void 0;var l=t("tslib"),p=t("../Errors"),s=t("../Hooks"),f=t("../Task"),h=(0,l.__importDefault)(t("../deps/bluebird_fork"));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}}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 x(){return void 0===(r=void 0!==r&&1073741824<=r?void 0:r)&&(r=0,n=(new Date).valueOf()+":"),n+r++}var E,j=h.default.resolve(void 0),k=!0,t=function(t){Object.defineProperty(this,"target",{get:function(){if(!1===k)return k=!0,t}})},w=(E=t,(0,l.__extends)(A,E),Object.defineProperty(A.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(A.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(A.prototype,"completion",{get:function(){return k=!1,this.target.completion},enumerable:!1,configurable:!0}),A.prototype.complete=function(t){return k=!1,this.target.complete(t)},A.prototype.reject=function(t){return k=!1,this.target.reject(t)},Object.defineProperty(A.prototype,"environment",{get:function(){return k=!1,this.target.environment},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"inputs",{get:function(){return k=!1,this.target.inputs},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"activityContexts",{get:function(){return k=!1,this.target.activityContexts},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"locale",{get:function(){return k=!1,this.target.locale},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"resources",{get:function(){return k=!1,this.target.resources},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"trivia",{get:function(){return k=!1,this.target.trivia},enumerable:!1,configurable:!0}),A);function A(){return null!==E&&E.apply(this,arguments)||this}var P,I=(P=t,(0,l.__extends)(T,P),Object.defineProperty(T.prototype,"luid",{get:function(){return k=!1,this.target.luid},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"ambient",{get:function(){return k=!1,this.target.ambient.proxy},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"action",{get:function(){return k=!1,this.target.action},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"branch",{get:function(){return k=!1,this.target.branch},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"cancellationToken",{get:function(){return k=!1,this.target.cancellationToken},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"passes",{get:function(){return k=!1,this.target.passes},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"caught",{get:function(){return k=!1,this.target.caught},enumerable:!1,configurable:!0}),T.prototype.call=function(t){return k=!1,this.target.call(t)},T.prototype.fork=function(t){return k=!1,this.target.fork(t)},T.prototype.jump=function(t){return k=!1,this.target.jump(t)},T.prototype.hasBranch=function(t){return k=!1,this.target.hasBranch(t)},Object.defineProperty(T.prototype,"state",{get:function(){return k=!1,this.target.state},enumerable:!1,configurable:!0}),T.prototype.registerForErrors=function(){return k=!1,this.target.registerForErrors()},T.prototype.persist=function(t){return k=!1,this.target.persist(t)},T.prototype.goto=function(){return k=!1,this.target.goto()},T);function T(){return null!==P&&P.apply(this,arguments)||this}var O=(Object.defineProperty(_.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}),_.prototype.break=function(){this.halted=!0},_.prototype.continue=function(){var e=this;this.halted=!1,void 0!==this.scheduler&&!this.scheduler.isFulfilled()||(this.scheduler=j.then(function(t){e.execute()}))},_.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},_.prototype.complete=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.resolveCompletion(t||this.outputs))},_.prototype.reject=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(t||this.error))},_.prototype.fail=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.EngineRuntimeError(t)))},_.prototype.cancel=function(){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.ActivityCancellationError))},_.prototype.push=function(){var t=this.stack;t.push(this.frame);var e=this.frame=new R;return e.index=t.length,e},_.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},_.prototype.call=function(){var t=this.frame,e=this.push();e.cancellationToken=t.cancellationToken,e.state=t.state},_.prototype.fork=function(){var e=this.push();e.cancellationToken=i(this.cancellationToken,function(t){return e.cancellationResolve=t}),e.state={}},_.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))},_.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))},_.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=x(),e.caught=r,e.cancellationToken=i(n.cancellationToken,function(t){return e.cancellationResolve=t}),e.proxy=new I(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},_.prototype.attempt=function(t){var e=new $;e.activity=t,e.branch=t.branch,this.prepare(e)},_.prototype.start=function(t,e,r){var n=new(t.async?M:S);n.activity=t,n.monikers.push("$"),this.prepare(n,e,r)},_.prototype.enqueue=function(t,e){var r=this.inspector;this.queue=r.relate(t,e).list(),this.next()},_.prototype.goto=function(t){for(var e=this.stack,r=t.index;e[r]===t;)this.pop();return t===this.frame},_);function _(){this.frame=new R,this.stack=[],this.handlers={}}var R=function(){},B=function(){},t=(C.prototype.registerForErrors=function(){this.registeredForErrors=!0},C.prototype.persist=function(t){this.stateToPersist=t},C.prototype.call=function(t){this.callBranch=!0,this.forkBranch=!1,this.jumpBranch=t},C.prototype.fork=function(t){this.callBranch=!1,this.forkBranch=!0,this.jumpBranch=t},C.prototype.jump=function(t){this.callBranch=!1,this.forkBranch=!1,this.jumpBranch=t},C.prototype.hasBranch=function(t){var e=this.activity,r=this.ambient.inspector;return r.isStep(e)&&void 0!==r.relate(e,t).peek()},C.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)},C.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)},C.prototype.emitExpressionAccessorError=function(t,e,r){return new p.ExpressionAccessorError(this.activity.id,t,e,r)},C.prototype.emitActivityBindingError=function(t){var e=this.activity;return new p.ActivityBindingError(e.id,e.action,t)},C.prototype.emitActivityActivationError=function(t,e){return new p.ActivityActivationError(this.activity.id,t,e)},C.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},C.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 B&&(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)},C.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}},C.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 B;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))},C.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)},C.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]}},C.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)},C.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},C.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))},C.prototype.concludeInline=function(t){return this.cancellationResolve(),t},C.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))},C.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},C.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},C.prototype.goto=function(){},C);function C(){this.inputs={},this.extras=[],this.monikers=[]}var F,S=(F=t,(0,l.__extends)(q,F),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!==F&&F.apply(this,arguments)||this}var H,$=(H=t,(0,l.__extends)(D,H),D.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))},D.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())},D);function D(){return null!==H&&H.apply(this,arguments)||this}var G,M=(G=t,(0,l.__extends)(U,G),U.prototype.transferInline=function(){this.ambient.enqueue(this.activity)},U.prototype.execute=function(){return G.prototype.execute.call(this),j},U);function U(){return null!==G&&G.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 O;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=x(),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 w(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
|
+
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../Errors","../Hooks","../Task","../deps/bluebird_fork"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.clearExpressionCache=void 0;var l=t("tslib"),p=t("../Errors"),s=t("../Hooks"),f=t("../Task"),h=(0,l.__importDefault)(t("../deps/bluebird_fork"));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}}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 x(){return void 0===(r=void 0!==r&&1073741824<=r?void 0:r)&&(r=0,n=(new Date).valueOf()+":"),n+r++}var E,j=h.default.resolve(void 0),k=!0,t=function(t){Object.defineProperty(this,"target",{get:function(){if(!1===k)return k=!0,t}})},w=(E=t,(0,l.__extends)(A,E),Object.defineProperty(A.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(A.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(A.prototype,"completion",{get:function(){return k=!1,this.target.completion},enumerable:!1,configurable:!0}),A.prototype.complete=function(t){return k=!1,this.target.complete(t)},A.prototype.reject=function(t){return k=!1,this.target.reject(t)},Object.defineProperty(A.prototype,"environment",{get:function(){return k=!1,this.target.environment},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"inputs",{get:function(){return k=!1,this.target.inputs},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"activityContexts",{get:function(){return k=!1,this.target.activityContexts},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"locale",{get:function(){return k=!1,this.target.locale},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"resources",{get:function(){return k=!1,this.target.resources},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"trivia",{get:function(){return k=!1,this.target.trivia},enumerable:!1,configurable:!0}),A);function A(){return null!==E&&E.apply(this,arguments)||this}var P,I=(P=t,(0,l.__extends)(T,P),Object.defineProperty(T.prototype,"luid",{get:function(){return k=!1,this.target.luid},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"ambient",{get:function(){return k=!1,this.target.ambient.proxy},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"action",{get:function(){return k=!1,this.target.action},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"branch",{get:function(){return k=!1,this.target.branch},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"cancellationToken",{get:function(){return k=!1,this.target.cancellationToken},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"passes",{get:function(){return k=!1,this.target.passes},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"caught",{get:function(){return k=!1,this.target.caught},enumerable:!1,configurable:!0}),T.prototype.call=function(t){return k=!1,this.target.call(t)},T.prototype.fork=function(t){return k=!1,this.target.fork(t)},T.prototype.jump=function(t){return k=!1,this.target.jump(t)},T.prototype.hasBranch=function(t){return k=!1,this.target.hasBranch(t)},Object.defineProperty(T.prototype,"state",{get:function(){return k=!1,this.target.state},enumerable:!1,configurable:!0}),T.prototype.registerForErrors=function(){return k=!1,this.target.registerForErrors()},T.prototype.persist=function(t){return k=!1,this.target.persist(t)},T.prototype.goto=function(){return k=!1,this.target.goto()},T);function T(){return null!==P&&P.apply(this,arguments)||this}var O=(Object.defineProperty(_.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}),_.prototype.break=function(){this.halted=!0},_.prototype.continue=function(){var e=this;this.halted=!1,void 0!==this.scheduler&&!this.scheduler.isFulfilled()||(this.scheduler=j.then(function(t){e.execute()}))},_.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},_.prototype.complete=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.resolveCompletion(t||this.outputs))},_.prototype.reject=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(t||this.error))},_.prototype.fail=function(t){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.EngineRuntimeError(t)))},_.prototype.cancel=function(){this.completion.isPending()&&(this.cancellationResolve(),this.rejectCompletion(new p.ActivityCancellationError))},_.prototype.push=function(){var t=this.stack;t.push(this.frame);var e=this.frame=new R;return e.index=t.length,e},_.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},_.prototype.call=function(){var t=this.frame,e=this.push();e.cancellationToken=t.cancellationToken,e.state=t.state},_.prototype.fork=function(){var e=this.push();e.cancellationToken=i(this.cancellationToken,function(t){return e.cancellationResolve=t}),e.state={}},_.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))},_.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))},_.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=x(),e.caught=r,e.cancellationToken=i(n.cancellationToken,function(t){return e.cancellationResolve=t}),e.proxy=new I(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},_.prototype.attempt=function(t){var e=new $;e.activity=t,e.branch=t.branch,this.prepare(e)},_.prototype.start=function(t,e,r){var n=new(t.async?M:S);n.activity=t,n.monikers.push("$"),this.prepare(n,e,r)},_.prototype.enqueue=function(t,e){var r=this.inspector;this.queue=r.relate(t,e).list(),this.next()},_.prototype.goto=function(t){for(var e=this.stack,r=t.index;e[r]===t;)this.pop();return t===this.frame},_);function _(){this.frame=new R,this.stack=[],this.handlers={}}var R=function(){},B=function(){},t=(C.prototype.registerForErrors=function(){this.registeredForErrors=!0},C.prototype.persist=function(t){this.stateToPersist=t},C.prototype.call=function(t){this.callBranch=!0,this.forkBranch=!1,this.jumpBranch=t},C.prototype.fork=function(t){this.callBranch=!1,this.forkBranch=!0,this.jumpBranch=t},C.prototype.jump=function(t){this.callBranch=!1,this.forkBranch=!1,this.jumpBranch=t},C.prototype.hasBranch=function(t){var e=this.activity,r=this.ambient.inspector;return r.isStep(e)&&void 0!==r.relate(e,t).peek()},C.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)},C.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)},C.prototype.emitExpressionAccessorError=function(t,e,r){return new p.ExpressionAccessorError(this.activity.id,t,e,r)},C.prototype.emitActivityBindingError=function(t){var e=this.activity;return new p.ActivityBindingError(e.id,e.action,t)},C.prototype.emitActivityActivationError=function(t,e){return new p.ActivityActivationError(this.activity.id,t,e)},C.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},C.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 B&&(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)},C.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}},C.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 B;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))},C.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)},C.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]}},C.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)},C.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},C.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))},C.prototype.concludeInline=function(t){return this.cancellationResolve(),t},C.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))},C.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},C.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},C.prototype.goto=function(){},C);function C(){this.inputs={},this.extras=[],this.monikers=[]}var F,S=(F=t,(0,l.__extends)(q,F),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!==F&&F.apply(this,arguments)||this}var H,$=(H=t,(0,l.__extends)(D,H),D.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))},D.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())},D);function D(){return null!==H&&H.apply(this,arguments)||this}var G,M=(G=t,(0,l.__extends)(U,G),U.prototype.transferInline=function(){this.ambient.enqueue(this.activity)},U.prototype.execute=function(){return G.prototype.execute.call(this),j},U);function U(){return null!==G&&G.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 O;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=x(),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 w(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
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormElement=t.FormComponent=void 0;var n,o=e("tslib"),r=
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormElement=t.FormComponent=void 0;var n,o=e("tslib"),r=e("react"),i=e("./utils"),r=(n=r.Component,(0,o.__extends)(s,n),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,i.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!==n&&n.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=r;var p,o=(p=r,(0,o.__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=o});
|
|
@@ -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,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
import { FormComponent } from "./FormComponent";
|
|
3
3
|
import { defs } from "./FormHost";
|
|
4
4
|
interface FormElementOuterProps {
|
|
@@ -31,7 +31,7 @@ interface FormElementOuterProps {
|
|
|
31
31
|
onMouseDown?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
32
32
|
onTouchStart?: (event: React.TouchEvent<HTMLElement>) => void;
|
|
33
33
|
}
|
|
34
|
-
declare const _default:
|
|
35
|
-
children?:
|
|
36
|
-
} &
|
|
34
|
+
declare const _default: import("react").ForwardRefExoticComponent<FormElementOuterProps & {
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
} & import("react").RefAttributes<HTMLDivElement | HTMLLabelElement>>;
|
|
37
37
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","./common","./constants","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=e("tslib"),
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react","./common","./constants","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=e("tslib"),v=e("react/jsx-runtime"),y=e("react"),_=e("./common"),b=e("./constants"),N=e("./utils");t.default=(0,y.forwardRef)(function(e,t){var s=e.children,i=e.className,n=e.component,o=e.element,r=e.errorClassName,l=e.htmlElementType,a=(0,h.__rest)(e,["children","className","component","element","errorClassName","htmlElementType"]),p=n.props.host,d=[],c=(0,N.makeUniqueId)(n.props.name),m=(0,_.renderTitle)(o,p,c),u=(0,_.renderDescription)(o,p,c),f=(0,_.renderError)(o,p),n=null===(e=null==m?void 0:m.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=[];i&&p.push.apply(p,i.split(" ")),o.titleLocation===b.TitleLocation.BESIDE&&p.push("inline-title"),o.styleName&&p.push((0,N.makeSafeClassName)(o.styleName)),f&&r&&p.push(r);a=(0,h.__assign)({"aria-labelledby":n,"aria-describedby":e,className:p.join(" "),id:c,ref:t},a);return d.push(m),o.titleLocation===b.TitleLocation.BESIDE?d.push((0,v.jsxs)("div",(0,h.__assign)({className:"form-element-content"},{children:[u,f,s]}),void 0)):(d.push(u),d.push(f),d.push(s)),y.createElement.apply(void 0,(0,h.__spreadArray)([l||"div",a],d,!1))})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","moment-timezone","../Task","../constants","../deps/bluebird_fork","./Calendar","./FormComponent","./FormDefinition","./NumberParser","./numberFormatter","./presenter","./renderers","./styles/stock","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormHost=t.defs=void 0;var i=e("tslib"),n=(0,i.__importDefault)(e("moment-timezone")),r=e("../Task"),o=e("../constants"),s=(0,i.__importDefault)(e("../deps/bluebird_fork")),u=e("./Calendar"),a=e("./FormComponent"),l=(0,i.__importStar)(e("./FormDefinition"));t.defs=l;var f=(0,i.__importDefault)(e("./NumberParser")),c=e("./numberFormatter"),d=(0,i.__importStar)(e("./presenter")),h=(0,i.__importStar)(e("./renderers")),v=e("./styles/stock"),m=e("./utils"),p="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 x(e){function t(){return void 0!==e&&(t.active=!1,e(),!0)}return t.active=!0,t}var g=void 0,e=(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(p));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?m.text.textToHtml(e):m.text.isMarkdown(e)?m.text.markdownToHtml(e.markdown,t):""},F.prototype.renderText=function(e){return"string"==typeof e?e:m.text.isMarkdown(e)?m.text.markdownToText(e.markdown):""},F.prototype.renderStyle=function(e){return"string"==typeof e?(0,m.addStyleToDocument)(e):g=g||(0,m.addStyleToDocument)(v.CSS)},F.prototype.renderVisual=function(e){return d.render(e)||d.renderNone(e)},F.prototype.qualifyDefault=function(e){var t,i=(0,m.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,m.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(p,t))},F.prototype.subscribe=function(i){var e=this.container;if(void 0===e)return x();function n(){i=void 0,e.removeEventListener(p,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(p,t),x(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,m.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,m.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,m.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,m.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,m.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=e});
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","moment-timezone","../Task","../constants","../deps/bluebird_fork","./Calendar","./FormComponent","./FormDefinition","./NumberParser","./numberFormatter","./presenter","./renderers","./styles/stock","./utils"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormHost=t.defs=void 0;var i=e("tslib"),n=(0,i.__importDefault)(e("moment-timezone")),r=e("../Task"),o=e("../constants"),s=(0,i.__importDefault)(e("../deps/bluebird_fork")),u=e("./Calendar"),a=e("./FormComponent"),l=(0,i.__importStar)(e("./FormDefinition"));t.defs=l;var f=(0,i.__importDefault)(e("./NumberParser")),d=e("./numberFormatter"),c=(0,i.__importStar)(e("./presenter")),h=(0,i.__importStar)(e("./renderers")),v=e("./styles/stock"),m=e("./utils"),p="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 x(e){function t(){return void 0!==e&&(t.active=!1,e(),!0)}return t.active=!0,t}var g=void 0,e=(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(p));var t=this.focusObserver;return void 0!==t&&e.removeEventListener("focus",t,!0),this.idle(),this.unmount(),this.refs={},c.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?m.text.textToHtml(e):m.text.isMarkdown(e)?m.text.markdownToHtml(e.markdown,t):""},F.prototype.renderText=function(e){return"string"==typeof e?e:m.text.isMarkdown(e)?m.text.markdownToText(e.markdown):""},F.prototype.renderStyle=function(e){return"string"==typeof e?(0,m.addStyleToDocument)(e):g=g||(0,m.addStyleToDocument)(v.CSS)},F.prototype.renderVisual=function(e){return c.render(e)||c.renderNone(e)},F.prototype.qualifyDefault=function(e){var t,i=(0,m.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,m.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(p,t))},F.prototype.subscribe=function(i){var e=this.container;if(void 0===e)return x();function n(){i=void 0,e.removeEventListener(p,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(p,t),x(n)},F.prototype.refresh=function(e){this.custom||("string"==typeof e?(e=this.refs[e],c.refresh(e)):(void 0===this.style&&(this.style=this.renderStyle()),this.refs={},c.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,m.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,m.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,m.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,m.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,d.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,m.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}),c.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=e});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],e)}(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],e)}(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderArrowRollup=r.renderArrowRight=r.renderArrowHead=void 0;var o=e("tslib"),i=e("react/jsx-runtime");r.renderArrowHead=function(){return(0,i.jsx)("svg",(0,o.__assign)({className:"arrowHead",viewBox:"0 0 200 200",preserveAspectRatio:"none"},{children:(0,i.jsx)("path",{d:"M 0 0 V 200 L 200 100 Z"},void 0)}),void 0)},r.renderArrowRight=function(){return(0,i.jsx)("svg",(0,o.__assign)({className:"arrowRight",viewBox:"0 0 24 24",preserveAspectRatio:"none"},{children:(0,i.jsx)("path",{d:"M20 12l-8-8-1.4 1.4 5.6 5.6H4v2h12.2l-5.6 5.6L12 20l8-8z"},void 0)}),void 0)},r.renderArrowRollup=function(){return(0,i.jsxs)("svg",(0,o.__assign)({className:"arrowRollup",viewBox:"0 0 200 200",preserveAspectRatio:"none"},{children:[(0,i.jsx)("circle",{cx:"100",cy:"100",r:"100"},void 0),(0,i.jsx)("polyline",{points:"50 100 100 50 150 100"},void 0),(0,i.jsx)("polyline",{points:"50 150 100 100 150 150"},void 0)]}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],e)}(function(e,
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],e)}(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderChevronDown=n.renderChevronUp=void 0;var r=e("tslib"),o=e("react/jsx-runtime");n.renderChevronUp=function(){return(0,o.jsx)("svg",(0,r.__assign)({className:"chevronUp",viewBox:"0 0 24 24"},{children:(0,o.jsx)("g",{children:(0,o.jsx)("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"},void 0)},void 0)}),void 0)},n.renderChevronDown=function(){return(0,o.jsx)("svg",(0,r.__assign)({className:"chevronDown",viewBox:"0 0 24 24"},{children:(0,o.jsx)("g",{children:(0,o.jsx)("path",{d:"M18.6 7.3L12 13.9 5.4 7.3 4 8.7l8 8 8-8-1.4-1.4z"},void 0)},void 0)}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],e)}(function(e,
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],e)}(function(e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.renderCrossDelete=s.renderCrossAdd=void 0;var o=e("tslib"),i=e("react/jsx-runtime");s.renderCrossAdd=function(){return(0,i.jsxs)("svg",(0,o.__assign)({className:"crossAdd",viewBox:"0 0 200 200",preserveAspectRatio:"none"},{children:[(0,i.jsx)("polyline",{points:"0 100 200 100"},void 0),(0,i.jsx)("polyline",{points:"100 0 100 200"},void 0)]}),void 0)},s.renderCrossDelete=function(){return(0,i.jsxs)("svg",(0,o.__assign)({className:"crossDelete",viewBox:"0 0 200 200",preserveAspectRatio:"none"},{children:[(0,i.jsx)("circle",{cx:"100",cy:"100",r:"100"},void 0),(0,i.jsx)("polyline",{points:"50 50 150 150"},void 0),(0,i.jsx)("polyline",{points:"50 150 150 50"},void 0)]}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],e)}(function(e,
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],e)}(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderClock=r.renderCalendar=void 0;var v=e("tslib"),s=e("react/jsx-runtime");r.renderCalendar=function(){return(0,s.jsxs)("svg",(0,v.__assign)({className:"calendar",viewBox:"0 0 24 24"},{children:[(0,s.jsx)("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"},void 0),(0,s.jsx)("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"},void 0)]}),void 0)},r.renderClock=function(){return(0,s.jsx)("svg",(0,v.__assign)({className:"clock",viewBox:"0 0 24 24"},{children:(0,s.jsx)("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"},void 0)}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderRemove=void 0;var o=e("tslib"),r=e("react/jsx-runtime");t.renderRemove=function(){return(0,r.jsx)("svg",(0,o.__assign)({className:"remove",viewBox:"0 0 24 24"},{children:(0,r.jsx)("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"},void 0)}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(
|
|
1
|
+
!function(v){"object"==typeof module&&"object"==typeof module.exports?v(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime"],v)}(function(v,h){"use strict";Object.defineProperty(h,"__esModule",{value:!0}),h.renderScanMulti=h.renderScanQrcode=h.renderScanBarcode=void 0;var e=v("tslib"),z=v("react/jsx-runtime");h.renderScanBarcode=function(){return(0,z.jsx)("svg",(0,e.__assign)({className:"barcode",viewBox:"0 0 24 24"},{children:(0,z.jsx)("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"},void 0)}),void 0)},h.renderScanQrcode=function(){return(0,z.jsx)("svg",(0,e.__assign)({className:"qrCode",viewBox:"0 0 24 24"},{children:(0,z.jsx)("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"},void 0)}),void 0)},h.renderScanMulti=function(){return(0,z.jsx)("svg",(0,e.__assign)({className:"barcodeOrQrCode",viewBox:"0 0 24 24"},{children:(0,z.jsx)("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"},void 0)}),void 0)}});
|
package/runtime/forms/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","react/jsx-runtime","react"],e)}(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.useFocusCallback=n.renderFocus=n.renderError=n.renderDescription=n.renderTitle=n.getDescriptionId=n.getTitleId=void 0;var o=e("react/jsx-runtime"),i=e("react");function l(e,n){return{__html:n.renderHtml(e)}}function u(e){return"".concat(e).concat("-title")}function d(e){return"".concat(e).concat("-description")}n.getTitleId=u,n.getDescriptionId=d,n.renderTitle=function(e,n,r,t){return e=l(e.title,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?(0,o.jsx)("span",{className:t=t||"form-element-title",dangerouslySetInnerHTML:e,id:u(r)},void 0):null},n.renderDescription=function(e,n,r,t){return e=l(e.description,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?(0,o.jsx)("aside",{className:t,dangerouslySetInnerHTML:e,id:d(r)},void 0):null},n.renderError=function(e,n){return e=l(e.error,n),0<(null===(n=null==e?void 0:e.__html)||void 0===n?void 0:n.length)?(0,o.jsx)("div",{className:"notice",dangerouslySetInnerHTML:e,role:"alert"},void 0):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,i.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
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","date-fns","react","../../constants","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],e)}(function(
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","date-fns","react","../../constants","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],e)}(function(n,e){"use strict";var t="object"==typeof module&&"object"==typeof module.exports;Object.defineProperty(e,"__esModule",{value:!0});var b=n("tslib"),x=n("react/jsx-runtime"),y=n("date-fns"),D=n("react"),h=n("../../constants"),j=n("../assets/datetime"),C=n("../common"),S=n("../constants"),N=n("../dateUtilities"),a=n("../styles/daterange"),o=n("../utils"),L=(0,D.lazy)(function(){return t?Promise.resolve().then(function(){return(0,b.__importStar)(n("./ReactDateRangeCalendar"))}):new Promise(function(e,t){n(["./ReactDateRangeCalendar"],e,t)}).then(b.__importStar)});(0,o.addStyleToDocument)(a.CSS);var P,k=(0,N.getLocaleDateFormat)();e.default=function(e){var t=e.component,n=e.element,a=e.isOpen,o=e.onChange,i=e.onPopupToggle,s=t.props.host,r=(0,D.useState)(),c=r[0],l=r[1],d=(0,D.useState)(),u=d[0],f=d[1],v=s.renderText(n.tooltip),p=!t.enabled,r=p?"inner disabled":"inner";(0,D.useEffect)(function(){(0,b.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,b.__generator)(this,function(e){switch(e.label){case 0:return"inv"===(t=s.deriveLocale())||"en"===t||t===h.DEFAULT_LOCALE?[2]:[4,(0,N.getDateFnsLocale)(t)];case 1:return P=e.sent(),[2]}})})},[]),(0,D.useEffect)(function(){l(e.value),f((0,N.getDateAsLocaleFormattedString)(e.value))},[e.value]);function m(e){var t=""!==(n="string"==typeof e?e:e.target.value)&&void 0!==n,e=t?(0,N.tryParseDateText)(n):void 0,n=t?e?(0,y.parse)(e,k,0):new Date(NaN):void 0;t?(0,N.isValidDate)(n)?(l(n),f(e),_(),g(n)):(_({status:"invalid"}),l(new Date(NaN)),g(void 0)):(_(),l(void 0),g(void 0))}function g(e){"function"==typeof o&&o(e)}function _(e){n.error=e,t.forceUpdate()}d=(0,C.useFocusCallback)(t);return(0,x.jsxs)("div",(0,b.__assign)({className:"SimpleDatePicker outer",title:v},{children:[(0,x.jsx)("div",(0,b.__assign)({className:r},{children:(0,x.jsx)("input",{"aria-label":"Date Picker",ref:d,disabled:p,type:"text",onChange:function(e){f(e.target.value)},onBlur:m,onKeyDown:function(e){(e=e).stopPropagation(),"Enter"===e.key?m(u):"Escape"===e.key&&m((0,N.getDateAsLocaleFormattedString)(c))},placeholder:k.toUpperCase(),value:u},void 0)}),void 0),(0,x.jsxs)("div",(0,b.__assign)({className:"buttonContainer"},{children:[(0,x.jsx)("button",(0,b.__assign)({className:"calendarButton",disabled:p,onClick:function(){"function"==typeof i&&i(!a)}},{children:(0,j.renderCalendar)()}),void 0),a&&(0,x.jsx)(D.Suspense,(0,b.__assign)({fallback:null},{children:(0,x.jsxs)("div",(0,b.__assign)({className:S.CssClasses.DROPDOWN},{children:[(0,x.jsx)(L,{format:k,editableDateInputs:!1,date:c,onChange:function(e){l(e),f((0,N.getDateAsLocaleFormattedString)(e)),_(),g(e)},locale:P},void 0),(0,x.jsx)("button",(0,b.__assign)({className:"done",onClick:function(){"function"==typeof i&&i(!1)}},{children:s.renderText("@common-done")}),void 0)]}),void 0)}),void 0)]}),void 0)]}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","date-fns","react","../../constants","../FormElementOuter","../assets/arrow","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],e)}(function(a,e){"use strict";var t="object"==typeof module&&"object"==typeof module.exports;Object.defineProperty(e,"__esModule",{value:!0});var
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","date-fns","react","../../constants","../FormElementOuter","../assets/arrow","../assets/datetime","../common","../constants","../dateUtilities","../styles/daterange","../utils"],e)}(function(a,e){"use strict";var t="object"==typeof module&&"object"==typeof module.exports;Object.defineProperty(e,"__esModule",{value:!0});var N,F=a("tslib"),L=a("react/jsx-runtime"),A=a("date-fns"),k=a("react"),R=a("../../constants"),T=(0,F.__importDefault)(a("../FormElementOuter")),O=a("../assets/arrow"),P=a("../assets/datetime"),U=a("../common"),V=a("../constants"),q=a("../dateUtilities"),n=a("../styles/daterange"),B=a("../utils"),z=(0,k.lazy)(function(){return t?Promise.resolve().then(function(){return(0,F.__importStar)(a("./DateRange"))}):new Promise(function(e,t){a(["./DateRange"],e,t)}).then(F.__importStar)});(0,B.addStyleToDocument)(n.CSS),(n=N=N||{}).Start="start",n.End="end";var K,I=(0,q.getLocaleDateFormat)();e.default=function(e){var t=e.component,n=e.element,r=(0,k.useRef)(),a=(0,k.useState)(!1),o=a[0],s=a[1],i=(0,k.useState)(),d=i[0],l=i[1],u=(0,k.useState)(),c=u[0],v=u[1],f=(0,k.useState)(),m=f[0],D=f[1],p=(0,k.useState)(),g=p[0],_=p[1],e=!t.enabled,a=t.props,S=a.host,h=a.name,i=S.renderText(n.tooltip),u=t.enabled?"inner":"inner disabled",f=[n.type,(0,B.makeSafeClassName)(h)];(0,k.useEffect)(function(){(0,F.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,F.__generator)(this,function(e){switch(e.label){case 0:return"inv"===(t=S.deriveLocale())||"en"===t||t===R.DEFAULT_LOCALE?[2]:[4,(0,q.getDateFnsLocale)(t)];case 1:return K=e.sent(),[2]}})})},[]),(0,k.useEffect)(function(){var e;n.value!==r.current&&((e=(0,q.convertToDateRangeRef)(n.value))?(l(e.startDate),D(e.endDate),v((0,q.getDateAsLocaleFormattedString)(e.startDate)),_((0,q.getDateAsLocaleFormattedString)(e.endDate))):void 0===n.value&&(l(void 0),D(void 0),v(""),_("")),n.error&&w(),E(null==e?void 0:e.startDate,null==e?void 0:e.endDate,!1))},[n.value]);function x(e,t){var a,n=""!==(s="string"==typeof e?e:e.target.value)&&void 0!==s,r=n?(0,q.tryParseDateText)(s):void 0,o=n?r?(0,A.parse)(r,I,0):new Date(NaN):void 0,s=(e=t===N.Start)?o:d,t=e?m:o;n?(0,q.isValidDate)(o)?e?(l(s),v(r),(a=!(0,q.isValidDate)(t)||(0,A.isAfter)(s,t))&&(D(s),_(r)),w(),j(s,a?s:t)):(D(t),_(r),(a=!(0,q.isValidDate)(s)||(0,A.isBefore)(t,s))&&(l(t),v(r)),w(),j(a?t:s,t)):(w({status:"invalid"}),j(),(e?l:D)(new Date(NaN))):((e?void 0===t||(0,q.isValidDate)(t):void 0===s||(0,q.isValidDate)(s))&&w(),j(),(e?l:D)(void 0))}function y(e,t){(t===N.Start?v:_)(e.target.value)}function b(e,t){var a;e.stopPropagation(),"Enter"===e.key?(a=t===N.Start?c:g,x(a,t)):"Escape"===e.key&&(e=t===N.Start?(0,q.getDateAsLocaleFormattedString)(d):(0,q.getDateAsLocaleFormattedString)(m),x(e,t))}function j(e,t){C(e,t)&&E(e,t)}var p=(0,U.useFocusCallback)(t),C=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)))},w=function(e){n.error=e,t.forceUpdate()},E=function(e,t,a){void 0===a&&(a=!0),r.current=n.value=e&&t?{refValueType:"daterange",startDate:e,endDate:t}:void 0,a&&S.post("changed",{name:h,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(0,L.jsx)(T.default,(0,F.__assign)({className:f.join(" "),component:t,element:n},{children:(0,L.jsxs)("div",(0,F.__assign)({className:"outer",title:i},{children:[(0,L.jsxs)("div",(0,F.__assign)({className:u},{children:[(0,L.jsx)("input",{ref:p,disabled:e,type:"text",onChange:function(e){return y(e,N.Start)},onBlur:function(e){return x(e,N.Start)},onKeyDown:function(e){return b(e,N.Start)},placeholder:I.toUpperCase(),value:c},void 0),(0,L.jsx)("span",(0,F.__assign)({className:"arrow"},{children:(0,O.renderArrowRight)()}),void 0),(0,L.jsx)("input",{disabled:e,type:"text",onChange:function(e){return y(e,N.End)},onBlur:function(e){return x(e,N.End)},onKeyDown:function(e){return b(e,N.End)},placeholder:I.toUpperCase(),value:g},void 0)]}),void 0),(0,L.jsxs)("div",(0,F.__assign)({className:"buttonContainer"},{children:[(0,L.jsx)("button",(0,F.__assign)({className:"calendarButton",disabled:e,onClick:function(){s(!o)}},{children:(0,P.renderCalendar)()}),void 0),o&&(0,L.jsx)(k.Suspense,(0,F.__assign)({fallback:null},{children:(0,L.jsxs)("div",(0,F.__assign)({className:V.CssClasses.DROPDOWN},{children:[(0,L.jsx)(z,{dateDisplayFormat:I,editableDateInputs:!1,months:1,direction:"horizontal",ranges:[a],onChange:function(e){var t=e.selection.startDate,e=e.selection.endDate;l(t),v((0,q.getDateAsLocaleFormattedString)(t)),D(e),_((0,q.getDateAsLocaleFormattedString)(e)),w(),j(t,e)},locale:K},void 0),(0,L.jsx)("button",(0,F.__assign)({className:"done",onClick:function(){s(!1)}},{children:S.renderText("@common-done")}),void 0)]}),void 0)}),void 0)]}),void 0)]}),void 0)}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","../Calendar","../FormElementOuter","../assets/datetime","../common","../utils","./DatePicker","./TimePickerInput"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react","../Calendar","../FormElementOuter","../assets/datetime","../common","../utils","./DatePicker","./TimePickerInput"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var T=e("tslib"),j=e("react/jsx-runtime"),k=e("react"),x=e("../Calendar"),D=(0,T.__importDefault)(e("../FormElementOuter")),M=e("../assets/datetime"),P=e("../common"),F=e("../utils"),O=(0,T.__importDefault)(e("./DatePicker")),C=(0,T.__importDefault)(e("./TimePickerInput"));t.default=function(e){var t=(0,k.useState)(!1),a=t[0],o=t[1],i=(0,k.useState)(!1),n=i[0],l=i[1],r=e.component,s=e.element,c=r.props,u=c.host,d=c.name,f=(0,P.useFocusCallback)(r),m=[s.type,(0,F.makeSafeClassName)(d)],t=u.renderText(s.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,o=t.timezone;return"string"==typeof a&&"string"==typeof o?{locale:a,timezone:o}:"device"}(s.value,s.format),v=u.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}}(s.value,v),y="datetime",h=function(e){if("object"==typeof e&&null!==e)switch(e.refValueType){case"date":case"time":case"datetime":return e.refValueType}}(s.value);"DatePicker"===s.type&&(y="date"),"TimePicker"===s.type&&(y="time");i=g;"datetime"===y&&"date"===h?i=void 0:h=y;e={calendar:v,disabled:!r.enabled,doneText:u.renderText("@common-done"),placeholder:u.renderText(s.prompt),title:t};function _(e,t){return void 0===(e=null!=e&&!isFinite(e.valueOf())?void 0:e)?void 0!==g:void 0===g||(h!==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()))}c=function(){var e=!n;l(e),e&&o(!1)},t=[];function b(e,t){void 0!==e&&isFinite(e.valueOf())?s.value={refValueType:t,format:p,display:v.format(e,x.Calendar.fullFormat),value:e.valueOf()}:s.value=void 0}return"DatePicker"!==s.type&&"DateTimePicker"!==s.type||t.push((0,j.jsx)(O.default,{component:r,element:s,isOpen:a,onChange:function(e){var t,a,o=y;"datetime"===y&&void 0!==e&&("date"===h&&(o="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))),_(e,o)&&(b(e,o),r.forceUpdate(),u.post("changed",{name:d,value:s.value}))},onPopupToggle:function(){var e=!a;o(e),e&&l(!1)},value:g},void 0)),"TimePicker"!==s.type&&"DateTimePicker"!==s.type||t.push((0,j.jsxs)("div",(0,T.__assign)({className:"outer"},{children:[(0,j.jsx)("div",(0,T.__assign)({className:"inner"},{children:(0,j.jsx)(C.default,(0,T.__assign)({},e,{isOpen:n,onChange:function(e){var t,a,o=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,o="date")),_(e,o)&&(b(e,o),r.forceUpdate(),u.post("changed",{name:d,value:s.value}))},onPopupToggle:c,ref:f,value:i}),void 0)}),void 0),(0,j.jsx)("button",(0,T.__assign)({className:"clockButton",disabled:e.disabled,onClick:c},{children:(0,M.renderClock)()}),void 0)]}),void 0)),b(g,h),(0,j.jsx)(D.default,(0,T.__assign)({className:m.join(" "),component:r,element:s},{children:t}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Navigator=void 0;var r,
|
|
1
|
+
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Navigator=void 0;var r,s=t("tslib"),a=t("react/jsx-runtime"),t=t("react"),i="__navigator",t=(r=t.Component,(0,s.__extends)(n,r),n.find=function(t){for(var e=t.target;e!==t.currentTarget&&e instanceof HTMLElement;){var r=e[i];if(r instanceof n)return r;e=e.parentNode}},n.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)},n.prototype.focus=function(){this.target.focus()},n.prototype.scrollTo=function(t){var e=this.props.children;if(Array.isArray(e)){var r=this.target,i=r.scrollHeight/e.length,n=i/2,e=t%i,e=(r.scrollHeight-r.clientHeight)/2+(e+(e<-n?i:n<=e?-i:0));return r.scrollTop=e,Math.round(t/i)}return 0},n.prototype.hasStates=function(){var t=this.state;if(null==t)return!1;t=t.states;return null!=t},n.prototype.render=function(){var e=this,t=this.props,r=this.state||{},i=r.states,n=[t.className];if(null!=i)for(var o in i)!0===i[o]&&n.push(o);return(0,a.jsx)("div",(0,s.__assign)({className:n.join(" "),tabIndex:r.tabIndex,ref:function(t){return e.init(t)}},{children:this.props.children}),void 0)},n);function n(){return null!==r&&r.apply(this,arguments)||this}e.Navigator=t});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],e)}(function(e,
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],e)}(function(e,T){"use strict";Object.defineProperty(T,"__esModule",{value:!0}),T.DEFAULT_STEP=T.DEFAULT_DECIMALS=T.MIN_DECIMALS=void 0;var F=e("tslib"),k=e("react/jsx-runtime"),L=e("react"),I=e("react-range"),w=(0,F.__importDefault)(e("../FormElementOuter")),U=e("../common"),R=e("../constants"),P=e("../numberSliderUtilities"),B=e("../utils");T.MIN_DECIMALS=0,T.DEFAULT_DECIMALS=0,T.DEFAULT_STEP=0;T.default=function(e){function n(e){t.value=o.current=e}var a=e.component,t=e.element,r=(0,L.useMemo)(function(){return(0,P.getProcessedNumberFormat)(t.format,T.MIN_DECIMALS,T.DEFAULT_DECIMALS,T.DEFAULT_STEP)},[]),o=(0,L.useRef)(null),i=(0,L.useState)(),s=i[0],u=i[1],c=(0,L.useState)(),l=c[0],d=c[1];(0,L.useEffect)(function(){var e;null!==o.current&&t.value===o.current||(e=(0,P.getNumberSliderValues)(t.value,r),n(e),j(e))},[t.value]);var e=a.props,p=e.host,m=e.name,f=!a.enabled,i=(0,U.useFocusCallback)(a),v=r.lowerBound,g=r.upperBound,c=r.precision,x=t.showMinMaxLabels,_=t.manualEntry,h=r.step,y=t.showTickMarks,y=0<h&&y;0===h&&(h=1/Math.pow(10,c));function b(e){e=N(e),j(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])||(n(e),p.post("changed",{name:m,value:t.value}))}function A(e){a.autoInput=!0}function E(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,n){return e-n})}function C(e,n,t,r,a,o){return(0,k.jsx)("div",(0,F.__assign)({style:{position:"absolute",top:n,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:t,right:r,whiteSpace:"nowrap"}},{children:e}),void 0)}var D={currency:r.currency,customDisplayFormat:r.customDisplayFormat,format:r.displayFormat,fractionalDigits:c,locale:p.deriveLocale()},e=p.renderText(t.tooltip),c=[t.type,(0,B.makeSafeClassName)(m)],M=(0,L.useMemo)(function(){return(0,B.throttle)(function(e){p.post("dragged",{name:m,value:e})})},[]),S=function(e,n){var t=s.slice(),e=""!==e?Number(e):NaN;isNaN(e)?j(t):(0===n?(e=e<v?v:e)>t[1]&&(e=t[1]):(e=g<e?g:e)<t[0]&&(e=t[0]),t[n]=e,b(t))},j=function(e){u(e),d(e)};return s?(0,k.jsxs)(w.default,(0,F.__assign)({className:c.join(" "),component:a,element:t,errorClassName:R.CssClasses.ERROR},{children:[(0,k.jsx)("div",(0,F.__assign)({className:"slider-container",title:e},{children:(0,k.jsx)(I.Range,{draggableTrack:!0,step:h,min:v,max:g,values:s,onChange:function(e){e=N(e),j(e),Array.isArray(t.value)&&e[0]===t.value[0]&&e[1]===t.value[1]||M(e)},onFinalChange:b,renderMark:function(e){var n=e.props,t=e.index,e=v+t*h,t=g<e,e=e>s[0]&&e<s[1]?"#197dc8":"#ccc";return y&&!t&&(0,k.jsx)("div",(0,F.__assign)({},n,{style:(0,F.__assign)((0,F.__assign)({},n.style),{height:"16px",width:"2px",backgroundColor:e})}),void 0)},renderTrack:function(e){var n=e.props,e=e.children;return(0,k.jsxs)("div",(0,F.__assign)({},n,{style:(0,F.__assign)((0,F.__assign)({},n.style),{height:"6px",margin:"50px 0px 24px",width:"100%",background:(0,I.getTrackBackground)({values:s,colors:["#ccc","#197dc8","#ccc"],min:v,max:g,rtl:!1})})},{children:[!1!==x&&C(p.formatNumber(v,D),"20px","-12px",void 0,"#333","#fff"),!1!==x&&C(p.formatNumber(g,D),"20px",void 0,"-12px","#333","#fff"),e]}),void 0)},renderThumb:function(e){var n=e.props,t=e.value,r=e.index,a=g-v,e=t-v,t=e<a/10?"0":"auto",e=9*a/10<e?"0":"auto";return(0,k.jsx)("div",(0,F.__assign)({},n,{style:(0,F.__assign)((0,F.__assign)({},n.style),{height:"24px",width:"24px",borderRadius:"12px",backgroundColor:"#197dc8",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 4px #AAA",outline:"none"})},{children:C(p.formatNumber(s[r],D),"-32px",t,e)}),void 0)},disabled:f,ref:i},void 0)}),void 0),_||!l?null:(0,k.jsx)("div",(0,F.__assign)({className:"inputs"},{children:l.map(function(e,r){return(0,k.jsxs)("span",{children:[0===r?p.renderText("@common-start"):p.renderText("@common-end"),(0,k.jsx)("input",{type:"number",disabled:f,min:0===r?v:s[0],max:0===r?s[1]:g,step:h,title:e+"",value:e,onBlur:function(e){S(e.target.value,r)},onChange:function(e){return n=e,t=r,(e=l.slice())[t]=n.target.value,d(e),void(a.autoInput&&S(n.target.value,t));var n,t},onKeyDown:function(e){return n=r,(e=e).stopPropagation(),a.autoInput=!1,void("Enter"===e.key?S(l[n]+"",n):"Escape"===e.key&&j(s.slice()));var n},onMouseDown:A,onFocus:E},r)]},void 0)})}),void 0)]}),void 0):null}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react","react-range","../FormElementOuter","../common","../constants","../
|
|
1
|
+
!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react","react-range","../FormElementOuter","../common","../constants","../numberSliderUtilities","../utils"],e)}(function(e,T){"use strict";Object.defineProperty(T,"__esModule",{value:!0}),T.DEFAULT_STEP=T.DEFAULT_DECIMALS=T.MIN_DECIMALS=void 0;var I=e("tslib"),k=e("react/jsx-runtime"),w=e("react"),U=e("react-range"),R=(0,I.__importDefault)(e("../FormElementOuter")),P=e("../common"),O=e("../constants"),B=e("../numberSliderUtilities"),q=e("../utils");T.MIN_DECIMALS=-20,T.DEFAULT_DECIMALS=3,T.DEFAULT_STEP=1;T.default=function(e){function n(e){var n;a.value=(n=e,{refValueType:"number",format:u,display:i.formatNumber(n,v),numeric:n}),l.current=e}var t=e.component,r=t.props,i=r.host,o=r.name,a=e.element,s=!t.enabled,u=(0,w.useMemo)(function(){return(0,B.getProcessedNumberFormat)(a.format,T.MIN_DECIMALS,T.DEFAULT_DECIMALS,T.DEFAULT_STEP)},[]),l=(0,w.useRef)(null),c=u.lowerBound,d=u.upperBound,p=u.precision,f=a.showMinMaxLabels,m=a.manualEntry,v={format:u.displayFormat,fractionalDigits:p,locale:i.deriveLocale()},r=(0,w.useState)(),x=r[0],g=r[1],e=(0,w.useState)(),_=e[0],b=e[1];(0,w.useEffect)(function(){var e=a.value;null!==l.current&&(null==e?void 0:e.numeric)===l.current||(e=(0,B.getNumberSliderValues)(e,u,!0),n(e[0]),L(e[0]))},[a.value]);var r=(0,P.useFocusCallback)(t),h=u.step,y=a.showTickMarks,y=0<h&&y;0===h&&(h=1/Math.pow(10,p));function E(e){e=A(e),L(e),e!==l.current&&(n(e),i.post("changed",{name:o,value:a.value}))}function N(e){b(e.target.value),t.autoInput&&F(e.target.value)}function C(e){F(e.target.value)}function S(e){e.stopPropagation(),t.autoInput=!1,"Enter"===e.key?F(_+""):"Escape"===e.key&&L(x)}function j(e){t.autoInput=!0}function M(e){return e.target.select()}function A(e){return e<c?c:d<e?d:e}function D(e,n,t,r,o,i){return(0,k.jsx)("div",(0,I.__assign)({style:{position:"absolute",top:n,color:o=void 0===o?"#fff":o,fontWeight:"bold",fontSize:"14px",fontFamily:"Arial,Helvetica Neue,Helvetica,sans-serif",padding:"4px",borderRadius:"5px",backgroundColor:i=void 0===i?"#197dc8":i,left:t,right:r,whiteSpace:"nowrap"}},{children:e}),void 0)}var e=i.renderText(a.tooltip),p=[a.type,(0,q.makeSafeClassName)(o)],F=function(e){e=""!==e?Number(e):NaN;isNaN(e)?L(e):E(e=d<(e=e<c?c:e)?d:e)},L=function(e){g(e),b(e)};return(0,k.jsxs)(R.default,(0,I.__assign)({className:p.join(" "),component:t,element:a,errorClassName:O.CssClasses.ERROR},{children:[(0,k.jsx)("div",(0,I.__assign)({className:"slider-container",title:e},{children:(0,k.jsx)(U.Range,{step:h,min:c,max:d,values:[x],onChange:function(e){return e=e[0],e=A(e),void L(e)},onFinalChange:function(e){return E(e[0])},renderMark:function(e){var n=e.props,e=e.index;return y&&!(d<c+e*h)&&(0,k.jsx)("div",(0,I.__assign)({},n,{style:(0,I.__assign)((0,I.__assign)({},n.style),{height:"16px",width:"2px",backgroundColor:"#ccc"})}),void 0)},renderTrack:function(e){var n=e.props,e=e.children;return(0,k.jsxs)("div",(0,I.__assign)({},n,{style:(0,I.__assign)((0,I.__assign)({},n.style),{height:"6px",margin:"50px 0px 24px",width:"100%",background:"#ccc"})},{children:[!1!==f&&D(i.formatNumber(c,v),"20px","-12px",void 0,"#333","#fff"),!1!==f&&D(i.formatNumber(d,v),"20px",void 0,"-12px","#333","#fff"),e]}),void 0)},renderThumb:function(e){var n=e.props,t=e.value,r=d-c,o=t-c,e=o<r/10?"0":"auto",o=9*r/10<o?"0":"auto";return(0,k.jsx)("div",(0,I.__assign)({},n,{style:(0,I.__assign)((0,I.__assign)({},n.style),{height:"24px",width:"24px",borderRadius:"12px",backgroundColor:"#197dc8",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 4px #AAA",outline:"none"})},{children:D(i.formatNumber(t,v),"-32px",e,o)}),void 0)},disabled:s,ref:r},void 0)}),void 0),!1===m?null:(0,k.jsx)("div",(0,I.__assign)({className:"inputs"},{children:(0,k.jsx)("span",{children:(0,k.jsx)("input",{type:"number",disabled:s,min:c,max:d,step:h,title:_+"",value:_,onBlur:C,onChange:N,onKeyDown:S,onMouseDown:j,onFocus:M},void 0)},void 0)}),void 0)]}),void 0)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyntheticButton=void 0;var n,
|
|
1
|
+
!function(t){"object"==typeof module&&"object"==typeof module.exports?t(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","react/jsx-runtime","react"],t)}(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyntheticButton=void 0;var n,a=t("tslib"),c=t("react/jsx-runtime"),t=t("react"),s="__synthetic_button",t=(n=t.Component,(0,a.__extends)(o,n),o.find=function(t){for(var e=t.target;e!==t.currentTarget&&e instanceof HTMLElement;){var n=e[s];if(n instanceof o)return n;e=e.parentNode}},o.search=function(t){for(var e=t.querySelectorAll("div"),n=[],i=0;i<e.length;i++){var r=e.item(i)[s];r instanceof o&&n.push(r)}return n},o.prototype.init=function(t){var e=this.target;void 0!==e&&(this.target=void 0,e[s]=void 0),null!==t&&((this.target=t)[s]=this)},o.prototype.render=function(){var e=this,t=this.props,n=this.state||{},i=n.states,r=["button"];if(null!=i)for(var s in i)!0===i[s]&&r.push(s);var o=n.content,n=n.symbol;return(0,c.jsx)("div",(0,a.__assign)({className:this.props.className,ref:function(t){return e.init(t)}},{children:(0,c.jsxs)("div",(0,a.__assign)({className:r.join(" "),"aria-label":t.ariaLabel},{children:[(0,c.jsx)("span",(0,a.__assign)({className:"content"},{children:o}),void 0),(0,c.jsx)("span",(0,a.__assign)({className:"symbol"},{children:n}),void 0)]}),void 0)}),void 0)},o);function o(){return null!==n&&n.apply(this,arguments)||this}e.SyntheticButton=t});
|