@genesislcap/design-system-configurator 15.61.0 → 15.63.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/dist/{470.039ab766f5f6987015ac5ef16ed15f32.js.map → 470.2220b6051938fd5f9e327faa25deb9b6.js.map} +1 -1
- package/dist/{470.470.971d1e011d9b19aeb8a3.js → 470.470.2c172edffcb65c0eb6eb.js} +1 -1
- package/dist/947.2ad5eb5b8307a6296b42d384b91e2d5c.js.map +1 -0
- package/dist/{947.947.782f7b14cc8f9cef9595.js → 947.947.c0fa1311fe196fed5dcc.js} +220 -26
- package/dist/{designSystemConfigurator.68b41e9f7a0974436ec2bc0bd253a804.js.map → designSystemConfigurator.580fbd95cfdf4560a7f41a5641ecc16c.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.91893faa86de62489e83563bbbad9189.js.map → main.6841342225f5f68cdc53830dc1623d83.js.map} +1 -1
- package/dist/{main.0a93583e2c48022e9126.js → main.dbb8aeec96f928ad253c.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/947.2f75b6c4569cc61b6b2158c23e7e7c1e.js.map +0 -1
|
@@ -1143,4 +1143,4 @@
|
|
|
1143
1143
|
</div>
|
|
1144
1144
|
</div>
|
|
1145
1145
|
`,ii=ti(),ai={menuTabs:["filterMenuTab","generalMenuTab","columnsMenuTab"]},ri=(e,t)=>!e.composedPath().includes(t);function si(e,t,i,a){return(0,r.sH)(this,void 0,void 0,function*(){var r;try{const s=function(e,t){const i=(new Ut.K).withField(e).withValue(null!=t?t:"").withSerialiser(Kt.n.EQ).withGroup("default").build();return i.serialiser(i)}(i,a),o=yield e.request(t,{DETAILS:{CRITERIA_MATCH:s}});return 1===(null===(r=o.REPLY)||void 0===r?void 0:r.length)?o.REPLY[0]:void 0}catch(e){return void console.error(`Failed to retrieve object from the ${t} resource: ${e instanceof Error?e.message:String(e)}`)}})}class oi extends((0,n.S)(c.FoundationElement)){constructor(){super(...arguments),this.requestSupportsAdvancedSearch=!1,this.defaultSlottedNodes=[],this.getAndSetRowsDebounce=m()(()=>this.getAndSetRows(),300),this.handleClickOutside=e=>{ri(e,this)&&(this.open=!1)}}get connect(){var e;return null!==(e=this.connectOverride)&&void 0!==e?e:this._connectDI}set connect(e){this.connectOverride=e}get value(){return g.Observable.track(this,"value"),this._value}set value(e){e!==this._value&&(e?si(this.connect,this.resourceName,this.valueKey,e).then(t=>{this.value===e&&(this.selectedRow=t)}):this.selectedRow=void 0,this.emitValue(e))}get displayValue(){return this.selectedRow&&this.labelKey&&this.selectedRow[this.labelKey]||this.value||""}get hasSearchKey(){return!!this.searchKey&&this.searchKey.length>0}get hasSlottedContent(){return!(!this.defaultSlottedNodes||0===this.defaultSlottedNodes.length)&&this.defaultSlottedNodes.some(e=>{var t;return e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&(null===(t=e.textContent)||void 0===t?void 0:t.trim().length)>0})}connectedCallback(){var e;super.connectedCallback(),(null===(e=this.optionsElement)||void 0===e?void 0:e.style)&&this.dropdownWidthChanged(),this.open=!1,this.filterSearch="",this.grid&&(this.grid.gridOptions={defaultColDef:ai,onRowClicked:e=>{this.selectedRow=e.data,this.emitValue(e.data[this.valueKey]),this.toggle()}})}setGridRowData(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({rowData:e}):i.setRowData(e))}setGridColumnDefs(e){var t;const i=null===(t=this.grid)||void 0===t?void 0:t.gridApi;i&&("function"==typeof i.updateGridOptions?i.updateGridOptions({columnDefs:e}):i.setColumnDefs(e))}emitValue(e){this._value=e,this.$emit("change",e),this.$emit("input",e),g.Observable.notify(this,"value")}toggle(){this.open=!this.open}getAndSetRows(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(!(null===(e=this.grid)||void 0===e?void 0:e.gridApi))return;const i=this.lastRequest={},a=this.request?{REQUEST:Object.assign({},this.request)}:{},r=Array.isArray(this.searchKey)&&1===this.searchKey.length?this.searchKey[0]:this.searchKey;let s;if(r&&this.filterSearch)if(this.requestSupportsAdvancedSearch){const e=(Array.isArray(r)?r:[r]).map(e=>{var t;return(new Ut.K).withField(e).withValue(null!==(t=this.filterSearch)&&void 0!==t?t:"").withSerialiser(Kt.n.containsIgnoreCase).withGroup("default").build()}),t=new Xt.b;t.Or(e,{join:jt.r.Or()}),s=t.build()}else{if(Array.isArray(r))throw Error("MulticolumnDropdown: Unable to search multiple keys via request; if the request is a GPAL ReqRep, set requestSupportsAdvancedSearch to true");a.REQUEST=Object.assign(Object.assign({},a.REQUEST),{[r]:`*${this.filterSearch}*`})}const o=null===(t=this.baseCriteria)||void 0===t?void 0:t.trim();o&&s?s=`(${s}) && (${o})`:o&&(s=o),s&&(a.DETAILS={CRITERIA_MATCH:s});try{const e=yield this.connect.request(this.resourceName,a);if(i!==this.lastRequest)return;const t=(null==e?void 0:e.REPLY)||[];this.setGridRowData(t),t.length>0?this.grid.gridApi.hideOverlay():this.grid.gridApi.showNoRowsOverlay()}catch(e){console.error(`Failed to retrieve rows from the ${this.resourceName} resource: ${e instanceof Error?e.message:String(e)}`)}})}filterSearchChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRowsDebounce())}requestChanged(){var e,t;this.open&&(null===(t=null===(e=this.grid)||void 0===e?void 0:e.gridApi)||void 0===t||t.showLoadingOverlay(),this.getAndSetRows())}columnDefinitionsChanged(){this.setGridColumnDefs(this.columnDefinitions)}openChanged(){var e,t;this.open?(document.addEventListener("mousedown",this.handleClickOutside),(null===(e=this.grid)||void 0===e?void 0:e.gridApi)&&(this.grid.gridApi.showLoadingOverlay(),this.getAndSetRows())):(document.removeEventListener("mousedown",this.handleClickOutside),this.filterSearch="",(null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]))}dropdownWidthChanged(){var e,t;null===(t=null===(e=this.optionsElement)||void 0===e?void 0:e.style)||void 0===t||t.setProperty(Yt,this.dropdownWidth>0?`${this.dropdownWidth}px`:"inherit")}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),super.disconnectedCallback();const e=this.shouldRunDisconnect;g.DOM.queueUpdate(()=>{var t;e&&((null===(t=this.grid)||void 0===t?void 0:t.gridApi)&&this.setGridRowData([]),this.selectedRow=void 0,this._value=void 0)})}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}}(0,r.Cg)([j.dm],oi.prototype,"_connectDI",void 0),(0,r.Cg)([(0,g.attr)({mode:"boolean"})],oi.prototype,"disabled",void 0),(0,r.Cg)([(0,g.attr)({attribute:"resource-name"})],oi.prototype,"resourceName",void 0),(0,r.Cg)([(0,g.attr)({attribute:"search-key",converter:qt})],oi.prototype,"searchKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"advanced-search-req",mode:"boolean"})],oi.prototype,"requestSupportsAdvancedSearch",void 0),(0,r.Cg)([(0,g.attr)({attribute:"value-key"})],oi.prototype,"valueKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"label-key"})],oi.prototype,"labelKey",void 0),(0,r.Cg)([(0,g.attr)({attribute:"dropdown-placement"})],oi.prototype,"dropdownPlacement",void 0),(0,r.Cg)([g.attr],oi.prototype,"dropdownWidth",void 0),(0,r.Cg)([g.observable],oi.prototype,"request",void 0),(0,r.Cg)([g.observable],oi.prototype,"columnDefinitions",void 0),(0,r.Cg)([g.observable],oi.prototype,"baseCriteria",void 0),(0,r.Cg)([g.observable],oi.prototype,"defaultSlottedNodes",void 0),(0,r.Cg)([g.observable],oi.prototype,"filterSearch",void 0),(0,r.Cg)([g.observable],oi.prototype,"open",void 0),(0,r.Cg)([g.observable],oi.prototype,"selectedRow",void 0),(0,r.Cg)([g.volatile],oi.prototype,"displayValue",null),(0,r.Cg)([g.volatile],oi.prototype,"hasSearchKey",null),(0,r.Cg)([g.volatile],oi.prototype,"hasSlottedContent",null);const ni=oi.compose({baseName:"multicolumn-dropdown",template:ii,styles:Qt}),li=oi.compose({baseName:"multicolumn-dropdown",template:ti("rapid"),styles:Qt});var di=i(3299),gi=i(70349),ci=i(91327),hi=i(19910),ui=i(26270),pi=i(22749),mi=i(22133);class vi{constructor(e,t){this.criteria=e,this.onActiveChanged=t,this.matchedRowIds=new Set,this.lastReportedActive=!1}get active(){return this.matchedRowIds.size>0}get matchCount(){return this.matchedRowIds.size}reset(){this.matchedRowIds.clear(),this.report()}handleDataChanged(e){var t;const{add:i=[],update:a=[],remove:r=[]}=null!==(t=null==e?void 0:e.changes)&&void 0!==t?t:{};for(const e of r)this.syncRow(e,!0);for(const e of i)this.syncRow(e,!1);for(const e of a)this.syncRow(e,!1);this.report()}handleDataCleared(){this.reset()}observe(e){const t=e=>{this.handleDataChanged(e.detail)},i=()=>{this.handleDataCleared()};return e.addEventListener(Z.c.dataChanged,t),e.addEventListener(Z.c.dataCleared,i),()=>{e.removeEventListener(Z.c.dataChanged,t),e.removeEventListener(Z.c.dataCleared,i)}}syncRow(e,t){var i;if(!e)return;const a=String(null!==(i=e[this.criteria.rowIdField])&&void 0!==i?i:"");a&&(!t&&(0,mi.D)(this.criteria,e)?this.matchedRowIds.add(a):this.matchedRowIds.delete(a))}report(){const e=this.active;e!==this.lastReportedActive&&(this.lastReportedActive=e,this.onActiveChanged(e))}}var fi=i(49260),bi=i(49568);const yi={foundationIconRenderer:k.qN,foundationGridProActionRenderer:R._X,foundationGridProActionsMenuRenderer:w.su,foundationAgBooleanRenderer:E.fg,foundationAgTextRenderer:_t.G4,foundationAgTextFieldRenderer:gi.wG,foundationAgEditableRenderer:A.r8,foundationAgSelectRenderer:O.bE,foundationSelectEditor:f.RU,foundationNumberEditor:b.CY,foundationDateEditor:C.vr,foundationMultiselectEditor:y.UH,foundationStringEditor:S.cb,foundationMulticolumnDropdown:ni,foundationStatusPillRenderer:D.a1,StatusPillRenderer:D.N7,foundationGridPro:ke,foundationColumnSelection:B.E,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}},Ci=[{id:"error",label:"Error",value:"var(--error-fill-rest, #c62828)"},{id:"warning",label:"Warning",value:"var(--warning-fill-rest, #ef6c00)"},{id:"success",label:"Success",value:"var(--success-fill-rest, #2e7d32)"},{id:"accent",label:"Accent",value:"var(--accent-fill-rest, #1565c0)"},{id:"neutral",label:"Neutral",value:"var(--neutral-fill-rest, #546e7a)"}],Si=[{id:"slow",label:"Slow",value:1400},{id:"normal",label:"Normal",value:1e3},{id:"fast",label:"Fast",value:500}],Ri=[{id:"row",label:"Whole row",value:"row"},{id:"cell",label:"Alert field cell",value:"cell"}],wi={color:Ci[0].value,durationMs:Si[1].value,scope:"row"};function Ei(e){return{color:"string"==typeof(null==e?void 0:e.color)&&e.color.trim().length>0?e.color:wi.color,durationMs:"number"==typeof(null==e?void 0:e.durationMs)&&Number.isFinite(e.durationMs)&&e.durationMs>0?e.durationMs:wi.durationMs,scope:"row"===(null==e?void 0:e.scope)||"cell"===(null==e?void 0:e.scope)?e.scope:wi.scope}}const Ai=new Map;function ki(e){const{persistPreferencesKey:t,target:i,mirrorColorTo:a=[]}=e,r=t?function(e){if(e.statePersistence)return e.statePersistence;try{return c.DI.getOrCreateDOMContainer().get(ve.l)}catch(e){return void F.v.debug("Row alert preferences will not persist; no StatePersistence available",e)}}(e):void 0,s=new Set;let o=Ei(Object.assign(Object.assign({},wi),e.preferences));function n(){const e=null!=i?i:"undefined"==typeof document?void 0:document.documentElement;if(e){e.style.setProperty("--row-alert-color",o.color),e.style.setProperty("--alert-flash-duration",`${o.durationMs}ms`);for(const t of a)e.style.setProperty(t,o.color)}}function l(e,i){o=e,n();for(const e of s)e(o);i&&t&&(null==r?void 0:r.saveRowAlertPreferences)&&r.saveRowAlertPreferences(t,o).catch(e=>{F.v.warn("Could not save row alert preferences",e)})}return n(),t&&(null==r?void 0:r.getRowAlertPreferences)&&r.getRowAlertPreferences(t).then(e=>{l(Ei(Object.assign(Object.assign({},o),e)),!1)}).catch(e=>{F.v.warn("Could not load row alert preferences",e)}),{get preferences(){return o},change(e){l(Ei(Object.assign(Object.assign({},o),e)),!0)},subscribe:e=>(s.add(e),()=>{s.delete(e)})}}function Di(e,t={}){var i,a,r,s,o;const{colorPresets:n=Ci,ratePresets:l=Si,menuLabel:d="Alert flash"}=t,g=function(e){const{persistPreferencesKey:t}=e;if(!t)return ki(e);let i=Ai.get(t);return i||(i=ki(e),Ai.set(t,i)),i}(t),c=(0,fi.PO)(e)[fi.Xm],h=(0,fi.Li)(Object.assign(Object.assign({},e),{flashField:null!==(a=null!==(i=e.flashField)&&void 0!==i?i:e.stateField)&&void 0!==a?a:null===(o=null===(s=null===(r=e.anyOf)||void 0===r?void 0:r[0])||void 0===s?void 0:s[0])||void 0===o?void 0:o.field}))[fi.mJ];function u(e,t,i,a){return e.map(e=>({name:e.label,checked:e.value===t,action:()=>{g.change(i(e.value)),a()}}))}const p={rowClassRules:{[fi.Xm]:e=>"row"===g.preferences.scope&&c(e)},defaultColDef:{cellClassRules:{[fi.mJ]:e=>"cell"===g.preferences.scope&&h(e)}},get preferences(){return g.preferences},createMenuItem(e){const t=()=>{var t;return null===(t=null==e?void 0:e.redrawRows)||void 0===t?void 0:t.call(e)};return{name:d,subMenu:[{name:"Flash target",subMenu:u(Ri,g.preferences.scope,e=>({scope:e}),t)},{name:"Color",subMenu:u(n,g.preferences.color,e=>({color:e}),()=>{})},{name:"Flash rate",subMenu:u(l,g.preferences.durationMs,e=>({durationMs:e}),()=>{})},{name:"Reset to defaults",action:()=>{p.reset(),t()}}]}},getContextMenuItems(e){var t;return[...null!==(t=e.defaultItems)&&void 0!==t?t:[],"separator",p.createMenuItem(e.api)]},setPreferences(e){g.change(e)},reset(){g.change(wi)},subscribe:e=>g.subscribe(e)};return p}var Oi=i(92277);const xi=/^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,Ti=e=>{const t=e.split(":");let i,a;2===t.length?[i,a]=t:a=e;const r=(e=>{if(xi.test(e)){const t=atob(e),i=new Uint8Array(t.length);return[...t].forEach((e,a)=>{i[a]=t.charCodeAt(a)}),i.buffer}return e})(a);if("str"===i){return new TextDecoder("utf-8").decode(r)}return r},Fi=e=>{const t=(e=>{if("string"==typeof e)return btoa(e);if(e instanceof ArrayBuffer){const t=new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),"");return btoa(t)}return""})(e);return"string"==typeof e?`str:${t}`:e instanceof ArrayBuffer?`bin:${t}`:""},Ii={account:"genesis",namespace:"default",authKey:"kv-default",authEmail:void 0},Li=c.DI.createInterface();var Gi,Pi;!function(e){e.REQ_KEY_VALUE_LIST="REQ_KEY_VALUE_LIST",e.REQ_KEY_VALUE_READ="REQ_KEY_VALUE_READ"}(Gi||(Gi={})),function(e){e.EVENT_KEY_VALUE_PUT="EVENT_KEY_VALUE_PUT",e.EVENT_KEY_VALUE_DELETE="EVENT_KEY_VALUE_DELETE"}(Pi||(Pi={}));let Mi=class{constructor(e,t,i=Ii){this.connect=e,this.user=t,this.kvStorageConfig=i}delete(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{KEYS:e}},i=yield this.connect.commitEvent(Pi.EVENT_KEY_VALUE_DELETE,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}get(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i={REQUEST:{USER_NAME:null!==(t=this.kvStorageConfig.authEmail)&&void 0!==t?t:this.user.userName,KEY:e}},a=yield this.connect.request(Gi.REQ_KEY_VALUE_READ,i);if(a&&a.REPLY&&a.REPLY.length>0){const t=a.REPLY.map(e=>{const t=this.getDecodedValue(e.VALUE);return{kv:{key:e.KEY,value:t}}});return e?t[0]:t}return e?void 0:[]})}getDecodedValue(e){e.startsWith("str:")||e.startsWith("bin:")||(e=`str:${e}`);let t=Ti(e);return"string"==typeof t&&t.startsWith("str:")&&(t=Ti(t)),"string"==typeof t&&t.startsWith("bin:")&&(t=Ti(t)),t}list(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t={REQUEST:{USER_NAME:null!==(e=this.kvStorageConfig.authEmail)&&void 0!==e?e:this.user.userName}},i=yield this.connect.request(Gi.REQ_KEY_VALUE_LIST,t);if(i&&i.REPLY&&i.REPLY.length>0){return i.REPLY.map(e=>e.KEY)}return[]})}put(e){return(0,r.sH)(this,void 0,void 0,function*(){const t={DETAILS:{RECORDS:e.map(e=>({KEY:e.key,VALUE:e.base64?Fi(e.value):e.value}))}},i=yield this.connect.commitEvent(Pi.EVENT_KEY_VALUE_PUT,t);return!(!i||"EVENT_ACK"!==i.MESSAGE_TYPE)||{ERROR:i.ERROR,WARNING:i.WARNING}})}};Mi=(0,r.Cg)([(0,r.Qj)(0,j.dm),(0,r.Qj)(1,Oi.KJ),(0,r.Qj)(2,(0,c.optional)(Li))],Mi);const _i=c.DI.createInterface(e=>e.singleton(Mi));var $i=i(98316);class Ni{getColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;yield this.migrateLocalStorageToKVStorage(e);const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):[]})}saveColumnState(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}deleteColumnState(e){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.delete([e])})}migrateLocalStorageToKVStorage(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e);if(i&&(null===(t=i.kv)||void 0===t?void 0:t.value))return;const a=this.session.getLocalStorageItem("gridOptions"),r=a?JSON.parse(a)[e]:void 0;r&&(F.v.debug(`Columns state migration for key: ${e} from LocalStorage to KV Storage`),this.kvStorage.put([{key:e,value:r}]))})}getFilterModel(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveFilterModel(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}getRowAlertPreferences(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;const i=yield this.kvStorage.get(e),a=i?null===(t=i.kv)||void 0===t?void 0:t.value:void 0;return a?JSON.parse(a):{}})}saveRowAlertPreferences(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.kvStorage.put([{key:e,value:JSON.stringify(t)}])})}}(0,r.Cg)([_i],Ni.prototype,"kvStorage",void 0),(0,r.Cg)([$i.N],Ni.prototype,"session",void 0);var Bi=i(11749);const Hi=d.SwatchRGB.from((0,ft.parseColorHexRGB)("#4c4c4c")),zi=d.SwatchRGB.from((0,ft.parseColorHexRGB)("#c01754")),{create:Vi}=c.DesignToken,Ui={foregroundColor:Vi("fui-ag-foreground-color").withDefault(zi),backgroundColor:Vi("fui-ag-background-color").withDefault(Hi)};var Ki=i(68858),Xi=i(49874);const ji={processCellCallback:e=>["+","=","-","@","\t","\n"].some(t=>String(e.value).startsWith(t))?`'${e.value}`:e.value}}}]);
|
|
1146
|
-
//# sourceMappingURL=470.
|
|
1146
|
+
//# sourceMappingURL=470.2220b6051938fd5f9e327faa25deb9b6.js.map
|