@odoo/o-spreadsheet 15.0.7 → 15.0.8

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.
@@ -15289,20 +15289,20 @@ const TEMPLATE$l = xml$n /* xml */ `
15289
15289
  <div class="o-section-title" t-esc="env._t('${conditionalFormattingTerms.CF_TITLE}')"></div>
15290
15290
  <div class="o_field_radio o_horizontal o_field_widget o-cf-type-selector">
15291
15291
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('CellIsRule')">
15292
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'CellIsRule'}}" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15292
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'CellIsRule'" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15293
15293
  <label for="cellIsRule" class="custom-control-label o_form_label">
15294
15294
  <t t-esc="env._t('${conditionalFormattingTerms.SingleColor}')"/>
15295
15295
  </label>
15296
15296
  </div>
15297
15297
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('ColorScaleRule')">
15298
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'ColorScaleRule'}}" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15298
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'ColorScaleRule'" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15299
15299
  <label for="colorScaleRule" class="custom-control-label o_form_label">
15300
15300
  <t t-esc="env._t('${conditionalFormattingTerms.ColorScale}')"/>
15301
15301
  </label>
15302
15302
  </div>
15303
15303
 
15304
15304
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('IconSetRule')">
15305
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'IconSetRule'}}" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15305
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'IconSetRule'" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15306
15306
  <label for="iconSetRule" class="custom-control-label o_form_label">
15307
15307
  <t t-esc="env._t('${conditionalFormattingTerms.IconSet}')"/>
15308
15308
  </label>
@@ -31403,6 +31403,6 @@ exports.registries = registries;
31403
31403
  exports.setTranslationMethod = setTranslationMethod;
31404
31404
 
31405
31405
 
31406
- __info__.version = '15.0.7';
31407
- __info__.date = '2023-05-12T10:54:58.735Z';
31408
- __info__.hash = 'd538be3';
31406
+ __info__.version = '15.0.8';
31407
+ __info__.date = '2023-06-02T10:10:54.035Z';
31408
+ __info__.hash = 'c3c5470';
@@ -15266,20 +15266,20 @@ const TEMPLATE$l = xml$n /* xml */ `
15266
15266
  <div class="o-section-title" t-esc="env._t('${conditionalFormattingTerms.CF_TITLE}')"></div>
15267
15267
  <div class="o_field_radio o_horizontal o_field_widget o-cf-type-selector">
15268
15268
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('CellIsRule')">
15269
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'CellIsRule'}}" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15269
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'CellIsRule'" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15270
15270
  <label for="cellIsRule" class="custom-control-label o_form_label">
15271
15271
  <t t-esc="env._t('${conditionalFormattingTerms.SingleColor}')"/>
15272
15272
  </label>
15273
15273
  </div>
15274
15274
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('ColorScaleRule')">
15275
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'ColorScaleRule'}}" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15275
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'ColorScaleRule'" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15276
15276
  <label for="colorScaleRule" class="custom-control-label o_form_label">
15277
15277
  <t t-esc="env._t('${conditionalFormattingTerms.ColorScale}')"/>
15278
15278
  </label>
15279
15279
  </div>
15280
15280
 
15281
15281
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('IconSetRule')">
15282
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'IconSetRule'}}" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15282
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'IconSetRule'" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15283
15283
  <label for="iconSetRule" class="custom-control-label o_form_label">
15284
15284
  <t t-esc="env._t('${conditionalFormattingTerms.IconSet}')"/>
15285
15285
  </label>
@@ -31358,6 +31358,6 @@ const helpers = {
31358
31358
  export { CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, normalize, parse, readonlyAllowedCommands, registries, setTranslationMethod };
31359
31359
 
31360
31360
 
31361
- __info__.version = '15.0.7';
31362
- __info__.date = '2023-05-12T10:54:58.735Z';
31363
- __info__.hash = 'd538be3';
31361
+ __info__.version = '15.0.8';
31362
+ __info__.date = '2023-06-02T10:10:54.035Z';
31363
+ __info__.hash = 'c3c5470';
@@ -15286,20 +15286,20 @@
15286
15286
  <div class="o-section-title" t-esc="env._t('${conditionalFormattingTerms.CF_TITLE}')"></div>
15287
15287
  <div class="o_field_radio o_horizontal o_field_widget o-cf-type-selector">
15288
15288
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('CellIsRule')">
15289
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'CellIsRule'}}" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15289
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'CellIsRule'" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
15290
15290
  <label for="cellIsRule" class="custom-control-label o_form_label">
15291
15291
  <t t-esc="env._t('${conditionalFormattingTerms.SingleColor}')"/>
15292
15292
  </label>
15293
15293
  </div>
15294
15294
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('ColorScaleRule')">
15295
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'ColorScaleRule'}}" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15295
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'ColorScaleRule'" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
15296
15296
  <label for="colorScaleRule" class="custom-control-label o_form_label">
15297
15297
  <t t-esc="env._t('${conditionalFormattingTerms.ColorScale}')"/>
15298
15298
  </label>
15299
15299
  </div>
15300
15300
 
15301
15301
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('IconSetRule')">
15302
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'IconSetRule'}}" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15302
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'IconSetRule'" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
15303
15303
  <label for="iconSetRule" class="custom-control-label o_form_label">
15304
15304
  <t t-esc="env._t('${conditionalFormattingTerms.IconSet}')"/>
15305
15305
  </label>
@@ -31402,9 +31402,9 @@
31402
31402
  Object.defineProperty(exports, '__esModule', { value: true });
31403
31403
 
31404
31404
 
31405
- __info__.version = '15.0.7';
31406
- __info__.date = '2023-05-12T10:54:58.735Z';
31407
- __info__.hash = 'd538be3';
31405
+ __info__.version = '15.0.8';
31406
+ __info__.date = '2023-06-02T10:10:54.035Z';
31407
+ __info__.hash = 'c3c5470';
31408
31408
 
31409
31409
 
31410
31410
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -712,20 +712,20 @@
712
712
  <div class="o-section-title" t-esc="env._t('${ql.CF_TITLE}')"></div>
713
713
  <div class="o_field_radio o_horizontal o_field_widget o-cf-type-selector">
714
714
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('CellIsRule')">
715
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'CellIsRule'}}" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
715
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'CellIsRule'" type="radio" id="cellIsRule" name="ruleType" value="CellIsRule"/>
716
716
  <label for="cellIsRule" class="custom-control-label o_form_label">
717
717
  <t t-esc="env._t('${ql.SingleColor}')"/>
718
718
  </label>
719
719
  </div>
720
720
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('ColorScaleRule')">
721
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'ColorScaleRule'}}" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
721
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'ColorScaleRule'" type="radio" id="colorScaleRule" name="ruleType" value="ColorScaleRule"/>
722
722
  <label for="colorScaleRule" class="custom-control-label o_form_label">
723
723
  <t t-esc="env._t('${ql.ColorScale}')"/>
724
724
  </label>
725
725
  </div>
726
726
 
727
727
  <div class="custom-control custom-radio o_cf_radio_item" t-on-click="changeRuleType('IconSetRule')">
728
- <input class="custom-control-input o_radio_input" t-attf-checked="{{state.currentCFType === 'IconSetRule'}}" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
728
+ <input class="custom-control-input o_radio_input" t-att-checked="state.currentCFType === 'IconSetRule'" type="radio" id="iconSetRule" name="ruleType" value="IconSetRule"/>
729
729
  <label for="iconSetRule" class="custom-control-label o_form_label">
730
730
  <t t-esc="env._t('${ql.IconSet}')"/>
731
731
  </label>
@@ -3072,4 +3072,4 @@
3072
3072
  height: ${15}px;
3073
3073
  vertical-align: sub;
3074
3074
  }
3075
- `;class Df extends t.Component{constructor(e,s={}){super(e,s),this.model=new Ru(this.props.data,{notifyUser:e=>this.trigger("notify-user",{content:e}),askConfirmation:(e,t,s)=>this.trigger("ask-confirmation",{content:e,confirm:t,cancel:s}),editText:(e,t,s)=>this.trigger("edit-text",{title:e,placeholder:t,callback:s}),openSidePanel:(e,t={})=>this.openSidePanel(e,t),evalContext:{env:this.env},transportService:this.props.transportService,client:this.props.client,isReadonly:this.props.isReadonly,snapshotRequested:this.props.snapshotRequested},this.props.stateUpdateMessages),this.grid=Of("grid"),this.sidePanel=t.useState({isOpen:!1,panelProps:{}}),this.linkEditor=t.useState({isOpen:!1}),this.composer=t.useState({topBarFocus:"inactive",gridFocusMode:"inactive"}),this.clipBoardString="",this.keyDownMapping={"CTRL+H":()=>this.toggleSidePanel("FindAndReplace",{}),"CTRL+F":()=>this.toggleSidePanel("FindAndReplace",{})},_f({openSidePanel:(e,t={})=>this.openSidePanel(e,t),toggleSidePanel:(e,t={})=>this.toggleSidePanel(e,t),dispatch:this.model.dispatch,getters:this.model.getters,uuidGenerator:this.model.uuidGenerator,_t:Df._t,clipboard:navigator.clipboard,export:this.model.exportData.bind(this.model),waitForIdle:this.model.waitForIdle.bind(this.model),exportXLSX:this.model.exportXLSX.bind(this.model),openLinkEditor:()=>this.openLinkEditor()}),Af(window,"resize",this.render),Af(document.body,"cut",this.copy.bind(this,!0)),Af(document.body,"copy",this.copy.bind(this,!1)),Af(document.body,"paste",this.paste),Af(document.body,"keyup",this.onKeyup.bind(this)),Af(window,"beforeunload",this.leaveCollaborativeSession.bind(this)),this.activateFirstSheet()}get focusTopBarComposer(){return"inactive"===this.model.getters.getEditionMode()?"inactive":this.composer.topBarFocus}get focusGridComposer(){return"inactive"===this.model.getters.getEditionMode()?"inactive":this.composer.gridFocusMode}mounted(){this.model.on("update",this,this.render),this.model.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.props.client&&this.model.joinSession(this.props.client)}willUnmount(){this.leaveCollaborativeSession()}async willUpdateProps(e){this.props.isReadonly!==e.isReadonly&&this.model.updateReadOnly(e.isReadonly)}leaveCollaborativeSession(){this.model.off("update",this),this.model.leaveSession()}activateFirstSheet(){const e=this.model.getters.getActiveSheetId(),[t]=this.model.getters.getSheets();t.id!==e&&this.model.dispatch("ACTIVATE_SHEET",{sheetIdFrom:e,sheetIdTo:t.id})}destroy(){this.model.destroy(),super.destroy()}openSidePanel(e,t){this.sidePanel.component=e,this.sidePanel.panelProps=t,this.sidePanel.isOpen=!0}closeSidePanel(){this.sidePanel.isOpen=!1,this.focusGrid()}openLinkEditor(){this.linkEditor.isOpen=!0}closeLinkEditor(){this.linkEditor.isOpen=!1,this.focusGrid()}toggleSidePanel(e,t){this.sidePanel.isOpen&&e===this.sidePanel.component?(this.sidePanel.isOpen=!1,this.focusGrid()):this.openSidePanel(e,t)}focusGrid(){if(!this._focusGrid)throw new Error("_focusGrid should be exposed by the grid component");this._focusGrid()}copy(e,t){if(!this.grid.el.contains(document.activeElement))return;if("inactive"!==this.model.getters.getEditionMode())return;const s=e?"CUT":"COPY",i=this.model.getters.getSelectedZones();this.model.dispatch(s,{target:i});const o=this.model.getters.getClipboardContent();this.clipBoardString=o,t.clipboardData.setData("text/plain",o),t.preventDefault()}paste(e){if(!this.grid.el.contains(document.activeElement))return;const t=e.clipboardData;if(t.types.indexOf("text/plain")>-1){const e=t.getData("text/plain"),s=this.model.getters.getSelectedZones();this.clipBoardString===e?this.model.dispatch("PASTE",{target:s,interactive:!0}):this.model.dispatch("PASTE_FROM_OS_CLIPBOARD",{target:s,text:e})}}save(){this.trigger("save-content",{data:this.model.exportData()})}onKeyup(e){"Control"===e.key&&this.model.getters.getSelectionMode()!==Ch.expanding&&this.model.dispatch("STOP_SELECTION")}onKeydown(e){"Control"!==e.key||e.repeat||this.model.dispatch(this.model.getters.getSelectionMode()===Ch.idle?"PREPARE_SELECTION_EXPANSION":"START_SELECTION_EXPANSION");let t="";(e.ctrlKey||e.metaKey)&&(t+="CTRL+"),t+=e.key.toUpperCase();let s=this.keyDownMapping[t];if(s)return e.preventDefault(),e.stopPropagation(),void s()}onTopBarComposerFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="contentFocus",this.composer.gridFocusMode="inactive",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}onGridComposerContentFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="inactive",this.composer.gridFocusMode="contentFocus",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}onGridComposerCellFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="inactive",this.composer.gridFocusMode="cellFocus",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}setComposerContent({content:e,selection:t}){"inactive"===this.model.getters.getEditionMode()?this.model.dispatch("START_EDITION",{text:e,selection:t}):e&&this.model.dispatch("SET_CURRENT_CONTENT",{content:e,selection:t})}}Df.template=Ff,Df.style=$f,Df.components={TopBar:Mf,Grid:Jg,BottomBar:Xu,SidePanel:rf,LinkEditor:kg},Df._t=e=>e;const Pf={},Uf={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:f,HEADER_WIDTH:m,TOPBAR_HEIGHT:v,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:E,DEFAULT_CELL_HEIGHT:b,SCROLLBAR_WIDTH:S},Bf={autofillModifiersRegistry:wa,autofillRulesRegistry:xa,cellMenuRegistry:nl,colMenuRegistry:rl,linkMenuRegistry:al,functionRegistry:ir,uiPluginRegistry:sd,corePluginRegistry:td,rowMenuRegistry:ll,sidePanelRegistry:gh,sheetMenuRegistry:cl,topbarMenuRegistry:hl,topbarComponentRegistry:fh,otRegistry:dl,inverseCommandRegistry:Ra,cellRegistry:zr},Vf={LinkCell:Qr},Hf={args:Ae,toBoolean:pe,toNumber:ce,toString:de,toXC:ss,toZone:_s,toCartesian:ts,numberToLetters:es,createFullMenuItem:Aa,UuidGenerator:ti,formatDecimal:ne,computeTextWidth:gs,isMarkdownLink:Is,parseMarkdownLink:ws,markdownLink:ys,createEmptyWorkbookData:da};e.CorePlugin=pa,e.DATETIME_FORMAT=A,e.DataSource=nd,e.DispatchResult=Pe,e.Model=Ru,e.Revision=Wh,e.SPREADSHEET_DIMENSIONS=Uf,e.Spreadsheet=Df,e.UIPlugin=mh,e.__DEBUG__=Ms,e.__info__=Pf,e.astToFormula=Ar,e.cellTypes=Vf,e.convertAstNodes=Mr,e.coreTypes=$e,e.functionCache=$r,e.helpers=Hf,e.invalidateEvaluationCommands=ke,e.normalize=Vr,e.parse=Lr,e.readonlyAllowedCommands=Fe,e.registries=Bf,e.setTranslationMethod=function(e){o=e},Object.defineProperty(e,"__esModule",{value:!0}),Pf.version="15.0.7",Pf.date="2023-05-12T10:54:58.735Z",Pf.hash="d538be3"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3075
+ `;class Df extends t.Component{constructor(e,s={}){super(e,s),this.model=new Ru(this.props.data,{notifyUser:e=>this.trigger("notify-user",{content:e}),askConfirmation:(e,t,s)=>this.trigger("ask-confirmation",{content:e,confirm:t,cancel:s}),editText:(e,t,s)=>this.trigger("edit-text",{title:e,placeholder:t,callback:s}),openSidePanel:(e,t={})=>this.openSidePanel(e,t),evalContext:{env:this.env},transportService:this.props.transportService,client:this.props.client,isReadonly:this.props.isReadonly,snapshotRequested:this.props.snapshotRequested},this.props.stateUpdateMessages),this.grid=Of("grid"),this.sidePanel=t.useState({isOpen:!1,panelProps:{}}),this.linkEditor=t.useState({isOpen:!1}),this.composer=t.useState({topBarFocus:"inactive",gridFocusMode:"inactive"}),this.clipBoardString="",this.keyDownMapping={"CTRL+H":()=>this.toggleSidePanel("FindAndReplace",{}),"CTRL+F":()=>this.toggleSidePanel("FindAndReplace",{})},_f({openSidePanel:(e,t={})=>this.openSidePanel(e,t),toggleSidePanel:(e,t={})=>this.toggleSidePanel(e,t),dispatch:this.model.dispatch,getters:this.model.getters,uuidGenerator:this.model.uuidGenerator,_t:Df._t,clipboard:navigator.clipboard,export:this.model.exportData.bind(this.model),waitForIdle:this.model.waitForIdle.bind(this.model),exportXLSX:this.model.exportXLSX.bind(this.model),openLinkEditor:()=>this.openLinkEditor()}),Af(window,"resize",this.render),Af(document.body,"cut",this.copy.bind(this,!0)),Af(document.body,"copy",this.copy.bind(this,!1)),Af(document.body,"paste",this.paste),Af(document.body,"keyup",this.onKeyup.bind(this)),Af(window,"beforeunload",this.leaveCollaborativeSession.bind(this)),this.activateFirstSheet()}get focusTopBarComposer(){return"inactive"===this.model.getters.getEditionMode()?"inactive":this.composer.topBarFocus}get focusGridComposer(){return"inactive"===this.model.getters.getEditionMode()?"inactive":this.composer.gridFocusMode}mounted(){this.model.on("update",this,this.render),this.model.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.props.client&&this.model.joinSession(this.props.client)}willUnmount(){this.leaveCollaborativeSession()}async willUpdateProps(e){this.props.isReadonly!==e.isReadonly&&this.model.updateReadOnly(e.isReadonly)}leaveCollaborativeSession(){this.model.off("update",this),this.model.leaveSession()}activateFirstSheet(){const e=this.model.getters.getActiveSheetId(),[t]=this.model.getters.getSheets();t.id!==e&&this.model.dispatch("ACTIVATE_SHEET",{sheetIdFrom:e,sheetIdTo:t.id})}destroy(){this.model.destroy(),super.destroy()}openSidePanel(e,t){this.sidePanel.component=e,this.sidePanel.panelProps=t,this.sidePanel.isOpen=!0}closeSidePanel(){this.sidePanel.isOpen=!1,this.focusGrid()}openLinkEditor(){this.linkEditor.isOpen=!0}closeLinkEditor(){this.linkEditor.isOpen=!1,this.focusGrid()}toggleSidePanel(e,t){this.sidePanel.isOpen&&e===this.sidePanel.component?(this.sidePanel.isOpen=!1,this.focusGrid()):this.openSidePanel(e,t)}focusGrid(){if(!this._focusGrid)throw new Error("_focusGrid should be exposed by the grid component");this._focusGrid()}copy(e,t){if(!this.grid.el.contains(document.activeElement))return;if("inactive"!==this.model.getters.getEditionMode())return;const s=e?"CUT":"COPY",i=this.model.getters.getSelectedZones();this.model.dispatch(s,{target:i});const o=this.model.getters.getClipboardContent();this.clipBoardString=o,t.clipboardData.setData("text/plain",o),t.preventDefault()}paste(e){if(!this.grid.el.contains(document.activeElement))return;const t=e.clipboardData;if(t.types.indexOf("text/plain")>-1){const e=t.getData("text/plain"),s=this.model.getters.getSelectedZones();this.clipBoardString===e?this.model.dispatch("PASTE",{target:s,interactive:!0}):this.model.dispatch("PASTE_FROM_OS_CLIPBOARD",{target:s,text:e})}}save(){this.trigger("save-content",{data:this.model.exportData()})}onKeyup(e){"Control"===e.key&&this.model.getters.getSelectionMode()!==Ch.expanding&&this.model.dispatch("STOP_SELECTION")}onKeydown(e){"Control"!==e.key||e.repeat||this.model.dispatch(this.model.getters.getSelectionMode()===Ch.idle?"PREPARE_SELECTION_EXPANSION":"START_SELECTION_EXPANSION");let t="";(e.ctrlKey||e.metaKey)&&(t+="CTRL+"),t+=e.key.toUpperCase();let s=this.keyDownMapping[t];if(s)return e.preventDefault(),e.stopPropagation(),void s()}onTopBarComposerFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="contentFocus",this.composer.gridFocusMode="inactive",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}onGridComposerContentFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="inactive",this.composer.gridFocusMode="contentFocus",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}onGridComposerCellFocused(e){this.model.getters.isReadonly()||(this.composer.topBarFocus="inactive",this.composer.gridFocusMode="cellFocus",this.setComposerContent(e.detail||{}),this.env.dispatch("UNFOCUS_SELECTION_INPUT"))}setComposerContent({content:e,selection:t}){"inactive"===this.model.getters.getEditionMode()?this.model.dispatch("START_EDITION",{text:e,selection:t}):e&&this.model.dispatch("SET_CURRENT_CONTENT",{content:e,selection:t})}}Df.template=Ff,Df.style=$f,Df.components={TopBar:Mf,Grid:Jg,BottomBar:Xu,SidePanel:rf,LinkEditor:kg},Df._t=e=>e;const Pf={},Uf={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:f,HEADER_WIDTH:m,TOPBAR_HEIGHT:v,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:E,DEFAULT_CELL_HEIGHT:b,SCROLLBAR_WIDTH:S},Bf={autofillModifiersRegistry:wa,autofillRulesRegistry:xa,cellMenuRegistry:nl,colMenuRegistry:rl,linkMenuRegistry:al,functionRegistry:ir,uiPluginRegistry:sd,corePluginRegistry:td,rowMenuRegistry:ll,sidePanelRegistry:gh,sheetMenuRegistry:cl,topbarMenuRegistry:hl,topbarComponentRegistry:fh,otRegistry:dl,inverseCommandRegistry:Ra,cellRegistry:zr},Vf={LinkCell:Qr},Hf={args:Ae,toBoolean:pe,toNumber:ce,toString:de,toXC:ss,toZone:_s,toCartesian:ts,numberToLetters:es,createFullMenuItem:Aa,UuidGenerator:ti,formatDecimal:ne,computeTextWidth:gs,isMarkdownLink:Is,parseMarkdownLink:ws,markdownLink:ys,createEmptyWorkbookData:da};e.CorePlugin=pa,e.DATETIME_FORMAT=A,e.DataSource=nd,e.DispatchResult=Pe,e.Model=Ru,e.Revision=Wh,e.SPREADSHEET_DIMENSIONS=Uf,e.Spreadsheet=Df,e.UIPlugin=mh,e.__DEBUG__=Ms,e.__info__=Pf,e.astToFormula=Ar,e.cellTypes=Vf,e.convertAstNodes=Mr,e.coreTypes=$e,e.functionCache=$r,e.helpers=Hf,e.invalidateEvaluationCommands=ke,e.normalize=Vr,e.parse=Lr,e.readonlyAllowedCommands=Fe,e.registries=Bf,e.setTranslationMethod=function(e){o=e},Object.defineProperty(e,"__esModule",{value:!0}),Pf.version="15.0.8",Pf.date="2023-06-02T10:10:54.035Z",Pf.hash="c3c5470"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "15.0.7",
3
+ "version": "15.0.8",
4
4
  "description": "A spreadsheet component",
5
5
  "main": "dist/o-spreadsheet.cjs.js",
6
6
  "browser": "dist/o-spreadsheet.iife.js",