diff --git a/packages/ketchup-react/package.json b/packages/ketchup-react/package.json index 12a6d73837..fd2dd5a0bd 100644 --- a/packages/ketchup-react/package.json +++ b/packages/ketchup-react/package.json @@ -1,6 +1,6 @@ { "name": "@sme.up/ketchup-react", - "version": "9.6.6", + "version": "9.6.7", "module": "dist/index.js", "typings": "dist/index.d.ts", "keywords": [ @@ -20,7 +20,7 @@ "description": "Ketchup React Components library by smeup", "license": "Apache-2.0", "dependencies": { - "@sme.up/ketchup": "^9.6.6", + "@sme.up/ketchup": "^9.6.7", "react": "^18.2.0", "react-dom": "^18.2.0" }, diff --git a/packages/ketchup-showcase/package.json b/packages/ketchup-showcase/package.json index da99d8ae95..6da28a2b67 100644 --- a/packages/ketchup-showcase/package.json +++ b/packages/ketchup-showcase/package.json @@ -19,7 +19,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "@sme.up/ketchup": "^9.6.6", + "@sme.up/ketchup": "^9.6.7", "core-js": "^3.30.2", "vue": "^2.6.14", "vue-router": "^3.5.1" diff --git a/packages/ketchup-showcase/src/App.vue b/packages/ketchup-showcase/src/App.vue index 9a1c4355fa..6378006a9d 100644 --- a/packages/ketchup-showcase/src/App.vue +++ b/packages/ketchup-showcase/src/App.vue @@ -55,8 +55,8 @@ @kup-tree-nodeselected="treeClick" >
v9.6.6v9.6.7
diff --git a/packages/ketchup/package.json b/packages/ketchup/package.json index 718c170bd4..1af488ec80 100644 --- a/packages/ketchup/package.json +++ b/packages/ketchup/package.json @@ -1,6 +1,6 @@ { "name": "@sme.up/ketchup", - "version": "9.6.6", + "version": "9.6.7", "keywords": [ "smeup", "KetchUP", diff --git a/packages/ketchup/src/assets/editor.js b/packages/ketchup/src/assets/editor.js index dc61c5ec1a..e41562ed94 100644 --- a/packages/ketchup/src/assets/editor.js +++ b/packages/ketchup/src/assets/editor.js @@ -47,10 +47,11 @@ const props = { `, isReadOnly: false, - previewStyle: 'vertical', + previewStyle: 'tab', showSaveButton: true, showToolbar: true, - // autosaveTimer: 2000 + // autosaveTimer: 2000, + selectedTab: 'preview', }; if (props) { diff --git a/packages/ketchup/src/assets/input-panel.js b/packages/ketchup/src/assets/input-panel.js index 650db95bb5..2f8567a4a3 100644 --- a/packages/ketchup/src/assets/input-panel.js +++ b/packages/ketchup/src/assets/input-panel.js @@ -1,4 +1,4 @@ -let data = { +const data = { columns: [ { name: 'NAM', @@ -63,32 +63,7 @@ let data = { }, NAT: { value: '', - options: [ - { - id: 'ITA', - label: 'Italy', - }, - { - id: 'SPA', - label: 'Spain', - }, - { - id: 'GER', - label: 'Germany', - }, - { - id: 'FRA', - label: 'France', - }, - { - id: 'POR', - label: 'Portugal', - }, - { - id: 'ENG', - label: 'England', - }, - ], + fun: 'combo', obj: { t: '', p: '', @@ -107,142 +82,206 @@ let data = { }, editable: true, mandatory: true, - options: { - type: 'SmeupTree', - messages: [], - children: [ - { - content: { - codice: 'ROM', - testo: 'Rome', - }, - children: [ - { - content: { - codice: 'ROS', - testo: 'Rome Sud', - }, - children: [], - }, - { - content: { - codice: 'RON', - testo: 'Rome Nord', - }, - children: [], - }, - ], - }, - { - content: { - codice: 'FLO', - testo: 'Florence', - }, - children: [], - }, - { - content: { - codice: 'VEN', - testo: 'Venice', - }, - }, - { - content: { - codice: 'MAD', - testo: 'Madrid', - }, - }, - { - content: { - codice: 'BAR', - testo: 'Barcelona', - }, - }, - { - content: { - codice: 'SEV', - testo: 'Seville', - }, - }, - { - content: { - codice: 'BER', - testo: 'Berlin', - }, - }, - { - content: { - codice: 'MUN', - testo: 'Munich', - }, - }, - { - content: { - codice: 'HAM', - testo: 'Hamburg', - }, - }, - { - content: { - codice: 'PAR', - testo: 'Paris', - }, - }, - { - content: { - codice: 'MAR', - testo: 'Marseille', - }, - }, + shape: 'ACP', + fun: 'ddas', + }, + LIS: { + value: '', + obj: { + t: '', + p: '', + k: '', + }, + editable: true, + mandatory: true, + shape: 'ACP', + fun: 'fff', + }, + CHK: { + value: 'on', + editable: true, + mandatory: true, + shape: 'CHK', + }, + RAD: { + value: '3', + options: [ + { + id: '1', + label: 'One', + }, + { + id: '2', + label: 'Two', + }, + { + id: '3', + label: 'Three', + }, + { + id: '4', + label: 'Four', + }, + ], + editable: true, + mandatory: true, + shape: 'RAD', + }, + }, + layout: { + sections: [ + { + content: [ { - content: { - codice: 'LYO', - testo: 'Lyon', - }, + id: 'NAM', + colStart: 1, + colEnd: 1, + rowStart: 1, + rowEnd: 1, }, { - content: { - codice: 'LIS', - testo: 'Lisbon', - }, + id: 'SUR', + colStart: 2, + colEnd: 2, + rowStart: 1, + rowEnd: 1, }, { - content: { - codice: 'POR', - testo: 'Porto', - }, + id: 'NAT', + colStart: 1, + colEnd: 1, + rowStart: 2, + rowEnd: 2, }, { - content: { - codice: 'FAR', - testo: 'Faro', - }, + id: 'CIT', + colStart: 2, + colEnd: 2, + rowStart: 2, + rowEnd: 2, }, { - content: { - codice: 'LON', - testo: 'London', - }, + id: 'CHK', + colStart: 1, + colEnd: 1, + rowStart: 3, + rowEnd: 3, }, { - content: { - codice: 'MAN', - testo: 'Manchester', - }, + id: 'RAD', + colSpan: 2, + rowStart: 3, + rowEnd: 3, }, { - content: { - codice: 'LIV', - testo: 'Liverpool', - }, + id: 'LIS', + colStart: 3, + colEnd: 3, + rowStart: 2, + rowEnd: 2, }, ], + dim: '50%', + gridCols: 3, + gridRows: 3, + gap: 2, }, - fun: 'FUN ', + ], + horizontal: true, + }, + }, + ], +}; + +const data1 = { + columns: [ + { + name: 'NAM', + title: 'Name', + visible: true, + }, + { + name: 'SUR', + title: 'Surname', + visible: true, + }, + { + name: 'NAT', + title: 'Nation', + visible: true, + }, + { + name: 'CIT', + title: 'Tree Options', + visible: true, + }, + { + name: 'LIS', + title: 'Table Options', + visible: true, + }, + { + name: 'CHK', + title: 'Checkbox', + visible: true, + }, + { + name: 'RAD', + title: 'Radio Buttons', + visible: true, + }, + ], + rows: [ + { + cells: { + NAM: { + value: 'Giovanni', + obj: { + t: '', + p: '', + k: '', + }, + editable: true, + mandatory: true, + shape: 'ITX', + }, + SUR: { + value: 'serio', + obj: { + t: '', + p: '', + k: '', + }, + editable: true, + mandatory: true, + shape: 'ITX', + }, + NAT: { + value: 'ITA', + fun: 'combo', + obj: { + t: '', + p: '', + k: '', + }, + editable: true, + mandatory: true, + shape: 'CMB', + }, + CIT: { + value: 'E1', + obj: { + t: '', + p: '', + k: '', + }, + editable: true, + mandatory: true, shape: 'ACP', + fun: 'ddas', }, LIS: { - value: '', + value: 'E2', obj: { t: '', p: '', @@ -250,79 +289,8 @@ let data = { }, editable: true, mandatory: true, - options: { - type: 'SmeupTable', - messages: [], - rows: [ - { - fields: { - E1: { - smeupObject: { - codice: 'E1', - testo: 'Element 1', - }, - }, - E2: { - smeupObject: { - codice: 'E2', - testo: 'Element 2', - }, - }, - E3: { - smeupObject: { - codice: 'E3', - testo: 'Element 3', - }, - }, - }, - }, - { - fields: { - E4: { - smeupObject: { - codice: 'E4', - testo: 'Element 4', - }, - }, - E5: { - smeupObject: { - codice: 'E5', - testo: 'Element 5', - }, - }, - E6: { - smeupObject: { - codice: 'E6', - testo: 'Element 6', - }, - }, - }, - }, - { - fields: { - E14: { - smeupObject: { - codice: 'E14', - testo: 'Element 14', - }, - }, - E15: { - smeupObject: { - codice: 'E15', - testo: 'Element 15', - }, - }, - E16: { - smeupObject: { - codice: 'E16', - testo: 'Element 16', - }, - }, - }, - }, - ], - }, shape: 'ACP', + fun: 'fff', }, CHK: { value: 'on', @@ -331,7 +299,7 @@ let data = { shape: 'CHK', }, RAD: { - value: '3', + value: '1', options: [ { id: '1', @@ -422,59 +390,3695 @@ let data = { const inputPanel = document.getElementById('input-panel'); inputPanel.data = data; +inputPanel.optionsHandler = (fun, inputValue, currentState) => { + console.log('optionsHandler event', { fun, inputValue, currentState }); -const inputPanelCallback = [ - { - eventName: 'kup-autocomplete-input', - eventCallback: (e) => { - const newdata = { - ...data, - rows: data.rows.map((row) => { - const keys = Object.keys(row.cells); - const updatedCells = keys.reduce((acc, key) => { - let updatedValue = e.state.find( - (state) => state.column.name === key - ).cell.value; - return { - ...acc, - [key]: { - ...row.cells[key], - value: updatedValue, - }, - }; - }, {}); - return { ...row, cells: updatedCells }; - }), - }; - const inputPanel = document.getElementById('input-panel'); - inputPanel.data = newdata; - }, - }, -]; - -const optionsHandlerCallback = () => { return Promise.resolve({ - type: 'SmeupTree', + type: 'SmeupTable', messages: [], - children: [ + rows: [ + { + fields: { + E1: { + smeupObject: { + codice: 'E1', + testo: 'Element 1', + }, + }, + E2: { + smeupObject: { + codice: 'E2', + testo: 'Element 2', + }, + }, + E3: { + smeupObject: { + codice: 'E3', + testo: 'Element 3', + }, + }, + }, + }, { - content: { - codice: 'ROM', - testo: 'Rome', + fields: { + E4: { + smeupObject: { + codice: 'E4', + testo: 'Element 4', + }, + }, + E5: { + smeupObject: { + codice: 'E5', + testo: 'Element 5', + }, + }, + E6: { + smeupObject: { + codice: 'E6', + testo: 'Element 6', + }, + }, }, - children: [], }, { - content: { - codice: 'TAR', - testo: 'Taranto', + fields: { + E14: { + smeupObject: { + codice: 'E14', + testo: 'Element 14', + }, + }, + E15: { + smeupObject: { + codice: 'E15', + testo: 'Element 15', + }, + }, + E16: { + smeupObject: { + codice: 'E16', + testo: 'Element 16', + }, + }, }, - children: [], }, ], }); }; +inputPanel.submitCb = (e) => { + console.log(e); + const inputPanel = document.getElementById('input-panel'); + inputPanel.data = data1; +}; + +// const ergonForm = { +// columns: [ +// { +// name: 'TEL', +// title: 'Tempo Elaborazione', +// visible: true, +// }, +// { +// name: 'CRE', +// title: 'Cumulo Reparti', +// visible: true, +// }, +// { +// name: 'CVE', +// title: 'Costo Venduto', +// visible: true, +// }, +// { +// name: 'DIV', +// title: 'Divisa', +// visible: true, +// }, +// { +// name: 'ELA', +// title: 'Elabora', +// visible: true, +// }, +// { +// name: 'SAP', +// title: 'Salto Pagina', +// visible: true, +// }, +// { +// name: 'ART', +// title: 'Articoli', +// visible: true, +// }, +// { +// name: 'MOA', +// title: 'Mostra movimento per articoli', +// visible: true, +// }, +// { +// name: 'ONE', +// title: 'Includi Oneri', +// visible: true, +// }, +// { +// name: 'MCD', +// title: 'Solo marche in conto deposito', +// visible: true, +// }, +// { +// name: 'NET', +// title: 'Solo netti', +// visible: true, +// }, +// { +// name: 'COD', +// title: 'Codice', +// visible: true, +// }, +// { +// name: 'MAR', +// title: 'Marca', +// visible: true, +// }, +// { +// name: 'FAM', +// title: 'Famiglia', +// visible: true, +// }, +// { +// name: 'TAR', +// title: 'Tipo Articolo', +// visible: true, +// }, +// { +// name: 'GRM', +// title: 'Gruppo Merci', +// visible: true, +// }, +// { +// name: 'ABC', +// title: 'Classe ABC', +// visible: true, +// }, +// { +// name: 'MDL', +// title: 'Modelli', +// visible: true, +// }, +// { +// name: 'CSA', +// title: 'Cat. Sc. Articolo', +// visible: true, +// }, +// { +// name: 'TRA', +// title: 'Tratt. Articolo', +// visible: true, +// }, +// { +// name: 'FOR', +// title: 'Cliente/Fornitore', +// visible: true, +// }, +// { +// name: 'CCF', +// title: 'Categ. C/F', +// visible: true, +// }, +// { +// name: 'ZON', +// title: 'Zona', +// visible: true, +// }, +// { +// name: 'COM', +// title: 'Comune', +// visible: true, +// }, +// { +// name: 'PRO', +// title: 'Provincia', +// visible: true, +// }, +// { +// name: 'AGE', +// title: 'Agente', +// visible: true, +// }, +// { +// name: 'REG', +// title: 'Regione', +// visible: true, +// }, +// { +// name: 'NAT', +// title: 'Nazione', +// visible: true, +// }, +// { +// name: 'RCF', +// title: 'Raggrupp. C/F', +// visible: true, +// }, +// { +// name: 'ATT', +// title: 'Attività', +// visible: true, +// }, +// { +// name: 'CAU', +// title: 'Causale', +// visible: true, +// }, +// { +// name: 'LST', +// title: 'Gruppo Liste', +// visible: true, +// }, +// { +// name: 'DOC', +// title: 'Tipo Documento', +// visible: true, +// }, +// { +// name: 'LDO', +// title: 'Lettera Doc.', +// visible: true, +// }, +// { +// name: 'TDO', +// title: '', +// visible: true, +// }, +// { +// name: 'DAT', +// title: 'Data', +// visible: true, +// }, +// { +// name: 'TDA', +// title: '', +// visible: true, +// }, +// { +// // ORDINE CODICE +// name: 'OCD', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE MARCA +// name: 'OMR', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE FAMIGLIA +// name: 'OFM', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE TIPO ARTICOLO +// name: 'OTA', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE GRUPPO MERCI +// name: 'OGM', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE CLASSE ABC +// name: 'OCL', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE MODELLI +// name: 'OMD', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE CAT SC ARTICOLO +// name: 'OCA', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE TRATT ARTICOLO +// name: 'OTR', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE CLIENTE FORNITORE +// name: 'OCF', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE CATEG C/F +// name: 'OCT', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE ZONA +// name: 'OZN', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE COMUNE +// name: 'OCM', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE PROVINCIA +// name: 'OPR', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE AGENTE +// name: 'OAG', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE REGIONE +// name: 'ORG', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE NAZIONE +// name: 'ONZ', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE RAGGRUPP C/F +// name: 'ORF', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE ATTIVITA +// name: 'OAT', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE CAUSALE +// name: 'OCS', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE GRUPPO LIST +// name: 'OGL', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE TIPO DOCUMENTO +// name: 'OTD', +// title: 'Modalità', +// visible: true, +// }, +// { +// // ORDINE DATA +// name: 'ODT', +// title: 'Modalità', +// visible: true, +// }, +// ], +// rows: [ +// { +// cells: { +// TEL: { +// value: '', +// editable: true, +// options: [ +// { +// id: 'CLI', +// label: 'Clienti', +// }, +// { +// id: 'FOR', +// label: 'Fornitori', +// }, +// ], +// shape: 'RAD', +// }, +// CRE: { +// value: '', +// editable: true, +// mandatory: true, +// shape: 'CHK', +// }, +// CVE: { +// value: '', +// options: [ +// { +// id: 'MED', +// label: 'Media acquisto', +// }, +// ], +// editable: true, +// shape: 'CMB', +// }, +// DIV: { +// value: '', +// editable: true, +// shape: 'ITX', +// }, +// ELA: { +// value: '', +// editable: true, +// options: [ +// { +// id: 'YFA', +// label: 'Solo Fatturato', +// }, +// { +// id: 'NFA', +// label: 'Escluso Fatturato', +// }, +// { +// id: 'BOT', +// label: 'Entrambi', +// }, +// ], +// shape: 'RAD', +// }, +// SAP: { +// value: '', +// editable: true, +// options: [ +// { +// id: 'NO', +// label: 'Nessuno', +// }, +// { +// id: 'SI', +// label: 'Effettua', +// }, +// { +// id: 'TES', +// label: 'Stampa Testata', +// }, +// ], +// shape: 'RAD', +// }, +// ART: { +// value: '', +// editable: true, +// options: [ +// { +// id: 'ALL', +// label: 'Tutti', +// }, +// { +// id: 'NFM', +// label: 'Escludi FM', +// }, +// { +// id: 'SFM', +// label: 'Solo FM', +// }, +// ], +// shape: 'RAD', +// }, +// MOA: { +// value: '', +// editable: true, +// shape: 'CHK', +// }, +// ONE: { +// value: '', +// editable: false, +// shape: 'CHK', +// }, +// MCD: { +// value: '', +// editable: true, +// shape: 'CHK', +// }, +// NET: { +// value: '', +// editable: true, +// shape: 'CHK', +// }, +// COD: { +// value: '', +// editable: true, +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// shape: 'ACP', +// }, +// MAR: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// FAM: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// TAR: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// GRM: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// ABC: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// MDL: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// CSA: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// TRA: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// FOR: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// CCF: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// ZON: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// COM: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// PRO: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// AGE: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// REG: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// NAT: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// RCF: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// ATT: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// CAU: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// LST: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// DOC: { +// value: '', +// editable: true, +// shape: 'ACP', +// options: [ +// { +// id: '1', +// label: '1', +// }, +// { +// id: '2', +// label: '2', +// }, +// { +// id: '3', +// label: '3', +// }, +// { +// id: '4', +// label: '4', +// }, +// { +// id: '5', +// label: '5', +// }, +// ], +// }, +// LDO: { +// value: '', +// editable: true, +// shape: 'ITX', +// }, +// TDO: { +// value: '', +// editable: true, +// shape: 'RAD', +// options: [ +// { +// id: '1', +// label: 'Doc. Precendete', +// }, +// { +// id: '2', +// label: 'Doc. Attuale', +// }, +// ], +// }, +// DAT: { +// value: '', +// editable: true, +// shape: 'ITX', +// }, +// TDA: { +// value: '', +// editable: true, +// shape: 'RAD', +// options: [ +// { +// id: '1', +// label: 'Data Lista', +// }, +// { +// id: '2', +// label: 'Data Doc. Precendete', +// }, +// ], +// }, +// OCD: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OMR: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OFM: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OTA: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OGM: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCL: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OMD: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCA: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OTR: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCF: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCT: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OZN: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCM: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OPR: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OAG: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// ORG: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// ONZ: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// ORF: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OAT: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OCS: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OGL: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// OTD: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// ODT: { +// value: '', +// editable: true, +// shape: 'CMB', +// options: [ +// { +// id: '1', +// label: 'Uguale', +// }, +// { +// id: '2', +// label: 'Diverso', +// }, +// { +// id: '3', +// label: 'Maggiore', +// }, +// { +// id: '4', +// label: 'Minore', +// }, +// { +// id: '5', +// label: 'Maggiore Uguale', +// }, +// { +// id: '6', +// label: 'Minore Uguale', +// }, +// { +// id: '7', +// label: 'Inizia con', +// }, +// { +// id: '8', +// label: 'Non inizia con', +// }, +// { +// id: '9', +// label: 'Termina con', +// }, +// { +// id: '10', +// label: 'Non termina con', +// }, +// { +// id: '11', +// label: 'Contiene', +// }, +// { +// id: '12', +// label: 'Non contiene', +// }, +// { +// id: '13', +// label: 'Incluso in', +// }, +// { +// id: '14', +// label: 'Escluso da', +// }, +// { +// id: '15', +// label: 'In elenco', +// }, +// { +// id: '16', +// label: 'Non in elenco', +// }, +// { +// id: '17', +// label: 'Simile', +// }, +// { +// id: '18', +// label: 'Non simile', +// }, +// { +// id: '19', +// label: 'Nullo', +// }, +// { +// id: '20', +// label: 'Non nullo', +// }, +// ], +// }, +// }, +// layout: { +// sections: [ +// { +// content: [ +// { +// id: 'TEL', +// colStart: 1, +// colEnd: 3, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'CRE', +// colStart: 4, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'CVE', +// colStart: 1, +// colEnd: 1, +// rowStart: 2, +// rowEnd: 2, +// }, +// { +// id: 'DIV', +// colStart: 2, +// colEnd: 2, +// rowStart: 2, +// rowEnd: 2, +// }, +// { +// id: 'ELA', +// colStart: 1, +// colEnd: 4, +// rowStart: 3, +// rowEnd: 3, +// }, +// { +// id: 'SAP', +// colStart: 1, +// colEnd: 4, +// rowStart: 4, +// rowEnd: 4, +// }, +// { +// id: 'ART', +// colStart: 1, +// colEnd: 4, +// rowStart: 5, +// rowEnd: 5, +// }, +// { +// id: 'MOA', +// colStart: 1, +// colEnd: 1, +// rowStart: 6, +// rowEnd: 6, +// }, +// { +// id: 'ONE', +// colStart: 2, +// colEnd: 2, +// rowStart: 6, +// rowEnd: 6, +// }, +// { +// id: 'MCD', +// colStart: 3, +// colEnd: 3, +// rowStart: 6, +// rowEnd: 6, +// }, +// { +// id: 'NET', +// colStart: 4, +// colEnd: 4, +// rowStart: 6, +// rowEnd: 6, +// }, +// ], +// gridCols: 4, +// gridRows: 6, +// gap: 2, +// }, +// // ONE COL +// { +// content: [ +// { +// id: 'OCD', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'COD', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 6, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OMR', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'MAR', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OFM', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'FAM', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OTA', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'TAR', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OGM', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'GRM', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OCL', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'ABC', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OMD', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'MDL', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OCA', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'CSA', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OTR', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'TRA', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OCF', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'FOR', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OCT', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'CCF', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // THREE COL +// { +// content: [ +// { +// id: 'OZN', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'ZON', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OCM', +// colStart: 5, +// colEnd: 5, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'COM', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OPR', +// colStart: 9, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'PRO', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 11, +// gridRows: 1, +// gap: 0.5, +// }, +// // THREE COL +// { +// content: [ +// { +// id: 'OAG', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'AGE', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'ORG', +// colStart: 5, +// colEnd: 5, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'REG', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'ONZ', +// colStart: 9, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'NAT', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 11, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'ORF', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'RCF', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OAT', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'ATT', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'OCS', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'CAU', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'OGL', +// colStart: 6, +// colEnd: 6, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'LST', +// colStart: 7, +// colEnd: 9, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// // THREE COL +// { +// content: [ +// { +// id: 'OTD', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'DOC', +// colSpan: 2, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'LDO', +// colStart: 5, +// colEnd: 7, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'TDO', +// colStart: 8, +// colEnd: 11, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 11, +// gridRows: 1, +// gap: 0.5, +// }, +// // TWO COL +// { +// content: [ +// { +// id: 'ODT', +// colStart: 1, +// colEnd: 1, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'DAT', +// colStart: 2, +// colEnd: 4, +// rowStart: 1, +// rowEnd: 1, +// }, +// { +// id: 'TDA', +// colStart: 5, +// colEnd: 8, +// rowStart: 1, +// rowEnd: 1, +// }, +// ], +// gridCols: 9, +// gridRows: 1, +// gap: 0.5, +// }, +// ], +// }, +// }, +// ], +// }; -inputPanel.valueChangeCb = inputPanelCallback; -inputPanel.optionsHandler = optionsHandlerCallback; -inputPanel.submitCb = (e) => console.log(e); +// const inputPanel = document.getElementById('input-panel'); +// inputPanel.data = ergonForm; +// inputPanel.submitCb = (e) => { +// console.log(e); +// const inputPanel = document.getElementById('input-panel'); +// inputPanel.data = ergonForm; +// }; diff --git a/packages/ketchup/src/components.d.ts b/packages/ketchup/src/components.d.ts index 443e83fa83..62bbf38447 100644 --- a/packages/ketchup/src/components.d.ts +++ b/packages/ketchup/src/components.d.ts @@ -36,7 +36,7 @@ import { KupDropdownButtonEventPayload } from "./components/kup-dropdown-button/ import { KupEchartClickEventPayload, KupEchartLegendPlacement, KupEchartMaps, KupEchartTitle, KupEchartTypes } from "./components/kup-echart/kup-echart-declarations"; import { GeoJSON } from "geojson"; import { XAXisComponentOption, YAXisComponentOption } from "echarts"; -import { KupEditorEventPayload, KupEditorPreview, KupEditorType } from "./components/kup-editor/kup-editor-declarations"; +import { KupEditorEventPayload, KupEditorPreview, KupEditorSelectedTab, KupEditorType } from "./components/kup-editor/kup-editor-declarations"; import { KupFamilyTreeData, KupFamilyTreeEventPayload, KupFamilyTreeLayout, KupFamilyTreeNode } from "./components/kup-family-tree/kup-family-tree-declarations"; import { KupFormData, KupFormLabelPlacement, KupFormLayout } from "./components/kup-form/kup-form-declarations"; import { KupBadge } from "./components/kup-badge/kup-badge"; @@ -87,7 +87,7 @@ export { KupDropdownButtonEventPayload } from "./components/kup-dropdown-button/ export { KupEchartClickEventPayload, KupEchartLegendPlacement, KupEchartMaps, KupEchartTitle, KupEchartTypes } from "./components/kup-echart/kup-echart-declarations"; export { GeoJSON } from "geojson"; export { XAXisComponentOption, YAXisComponentOption } from "echarts"; -export { KupEditorEventPayload, KupEditorPreview, KupEditorType } from "./components/kup-editor/kup-editor-declarations"; +export { KupEditorEventPayload, KupEditorPreview, KupEditorSelectedTab, KupEditorType } from "./components/kup-editor/kup-editor-declarations"; export { KupFamilyTreeData, KupFamilyTreeEventPayload, KupFamilyTreeLayout, KupFamilyTreeNode } from "./components/kup-family-tree/kup-family-tree-declarations"; export { KupFormData, KupFormLabelPlacement, KupFormLayout } from "./components/kup-form/kup-form-declarations"; export { KupBadge } from "./components/kup-badge/kup-badge"; @@ -1919,6 +1919,11 @@ export namespace Components { * This method is used to trigger a new render of the component. */ "refresh": () => Promise; + /** + * The markdown editor selected tab. + * @default 'write' + */ + "selectedTab": KupEditorSelectedTab; /** * Sets the props to the component. * @param props - Object containing props that will be set to the component. @@ -2398,6 +2403,11 @@ export namespace Components { * @default false */ "isCanvas": boolean; + /** + * An SVG that will be displayed until the image is loaded. + * @default "" + */ + "placeholderResource": string; /** * This method is used to trigger a new render of the component. */ @@ -6786,6 +6796,11 @@ declare namespace LocalJSX { * @default 'vertical' */ "previewStyle"?: KupEditorPreview; + /** + * The markdown editor selected tab. + * @default 'write' + */ + "selectedTab"?: KupEditorSelectedTab; /** * Defines whether to show the save button in editor's toolbar or not. * @default true @@ -7168,6 +7183,11 @@ declare namespace LocalJSX { "isCanvas"?: boolean; "onKup-image-click"?: (event: KupImageCustomEvent) => void; "onKup-image-load"?: (event: KupImageCustomEvent) => void; + /** + * An SVG that will be displayed until the image is loaded. + * @default "" + */ + "placeholderResource"?: string; /** * The resource used to fetch the image. * @default null diff --git a/packages/ketchup/src/components/kup-box/kup-box.tsx b/packages/ketchup/src/components/kup-box/kup-box.tsx index ab7e2da22f..c9c65dc91e 100644 --- a/packages/ketchup/src/components/kup-box/kup-box.tsx +++ b/packages/ketchup/src/components/kup-box/kup-box.tsx @@ -675,13 +675,17 @@ export class KupBox { } private checkScrollOnHover() { - if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) { - if (this.scrollOnHover) { - this.kupManager.scrollOnHover.register(this.boxContainer); - } - } else { - if (!this.scrollOnHover) { - this.kupManager.scrollOnHover.unregister(this.boxContainer); + if (this.boxContainer) { + if ( + !this.kupManager.scrollOnHover.isRegistered(this.boxContainer) + ) { + if (this.scrollOnHover) { + this.kupManager.scrollOnHover.register(this.boxContainer); + } + } else { + if (!this.scrollOnHover) { + this.kupManager.scrollOnHover.unregister(this.boxContainer); + } } } } @@ -1355,7 +1359,11 @@ export class KupBox {
this.#rowsRefs.push(el)} + ref={(el: HTMLElement) => { + if (el) { + this.#rowsRefs.push(el); + } + }} >
{ - this.editor && this.editor.moveCursorToStart(); + if (this.editor) { + this.editor.moveCursorToStart(); + if ( + this.initialEditType === 'markdown' && + this.previewStyle === 'tab' && + this.selectedTab === 'preview' + ) { + this.updateMarkDownPreviewTab(); + } + } }, 100); } } @@ -243,6 +259,17 @@ export class KupEditor { this.updateToolbarVisiblity(); } + @Watch('selectedTab') + onMarkdownPreviewTabChanged() { + if ( + (this.initialEditType != 'markdown' && + this.previewStyle != 'tab') || + !this.editor + ) + return; + this.updateMarkDownPreviewTab(); + } + @Watch('showSaveButton') onShowSaveButtonChanged() { if (this.editor) { @@ -457,6 +484,20 @@ export class KupEditor { this.kupAutoSave.emit(this.getSaveAndAutoSaveProps()); } + updateMarkDownPreviewTab() { + const tabSection = this.rootElement.querySelector( + '.te-markdown-tab-section' + ); + if (!tabSection) return; + + this.selectedTab === 'preview' && + (tabSection.querySelector( + 'button:last-child' + ) as HTMLElement)!.click(); + this.selectedTab === 'write' && + tabSection.querySelector('button')!.click(); + } + getToolBarWithSaveButton(includeDefaultItems: boolean = true) { const options: Partial = { toolbarItems: [ diff --git a/packages/ketchup/src/components/kup-editor/readme.md b/packages/ketchup/src/components/kup-editor/readme.md index fd7057f2c9..64066ab76d 100644 --- a/packages/ketchup/src/components/kup-editor/readme.md +++ b/packages/ketchup/src/components/kup-editor/readme.md @@ -15,6 +15,7 @@ | `initialValue` | `initial-value` | The initial editor value. | `string` | `''` | | `isReadOnly` | `is-read-only` | Defines whether the editor is disabled or not. | `boolean` | `false` | | `previewStyle` | `preview-style` | The editor preview style. | `"tab" \| "vertical"` | `'vertical'` | +| `selectedTab` | `selected-tab` | The markdown editor selected tab. | `"preview" \| "write"` | `'write'` | | `showSaveButton` | `show-save-button` | Defines whether to show the save button in editor's toolbar or not. | `boolean` | `true` | | `showToolbar` | `show-toolbar` | Defines whether to show the editor's toolbar or not. | `boolean` | `true` | diff --git a/packages/ketchup/src/components/kup-image/kup-image.tsx b/packages/ketchup/src/components/kup-image/kup-image.tsx index 16058f99c7..9fd5c9dcff 100644 --- a/packages/ketchup/src/components/kup-image/kup-image.tsx +++ b/packages/ketchup/src/components/kup-image/kup-image.tsx @@ -77,6 +77,11 @@ export class KupImage { * @default false */ @Prop() isCanvas: boolean = false; + /** + * An SVG that will be displayed until the image is loaded. + * @default "" + */ + @Prop() placeholderResource = ''; /** * The resource used to fetch the image. * @default null @@ -250,6 +255,7 @@ export class KupImage { color: this.color, data: this.data, fit: this.rootElement.classList.contains('kup-fit') ? true : false, + placeholderResource: this.placeholderResource, resource: this.resource, sizeX: this.sizeX, sizeY: this.sizeY, diff --git a/packages/ketchup/src/components/kup-image/readme.md b/packages/ketchup/src/components/kup-image/readme.md index 312a062d02..0767e4378c 100644 --- a/packages/ketchup/src/components/kup-image/readme.md +++ b/packages/ketchup/src/components/kup-image/readme.md @@ -5,17 +5,18 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------ | -| `badgeData` | -- | Sets the data of badges. | `KupBadge[]` | `null` | -| `color` | `color` | The color of the icon, defaults to the CSS variable KupThemeColorValues.ICON. | `string` | ``var(${KupThemeColorValues.ICON})`` | -| `customStyle` | `custom-style` | Custom style of the component. | `string` | `''` | -| `data` | -- | When present, the component will be drawn using CSS. Check the 'Drawing with CSS' section of the image showcase for more information. | `FImageData[]` | `null` | -| `feedback` | `feedback` | When set to true, a spinner will be displayed until the image finished loading. Not compatible with SVGs. | `boolean` | `false` | -| `isCanvas` | `is-canvas` | The image component will create a canvas element on which it's possible to draw. It's a temporary feature that will be fully replaced by CSS drawing in the future. | `boolean` | `false` | -| `resource` | `resource` | The resource used to fetch the image. | `string` | `null` | -| `sizeX` | `size-x` | The width of the icon, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.). | `string` | `'100%'` | -| `sizeY` | `size-y` | The height of the icon, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.). | `string` | `'100%'` | +| Property | Attribute | Description | Type | Default | +| --------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------ | +| `badgeData` | -- | Sets the data of badges. | `KupBadge[]` | `null` | +| `color` | `color` | The color of the icon, defaults to the CSS variable KupThemeColorValues.ICON. | `string` | ``var(${KupThemeColorValues.ICON})`` | +| `customStyle` | `custom-style` | Custom style of the component. | `string` | `''` | +| `data` | -- | When present, the component will be drawn using CSS. Check the 'Drawing with CSS' section of the image showcase for more information. | `FImageData[]` | `null` | +| `feedback` | `feedback` | When set to true, a spinner will be displayed until the image finished loading. Not compatible with SVGs. | `boolean` | `false` | +| `isCanvas` | `is-canvas` | The image component will create a canvas element on which it's possible to draw. It's a temporary feature that will be fully replaced by CSS drawing in the future. | `boolean` | `false` | +| `placeholderResource` | `placeholder-resource` | An SVG that will be displayed until the image is loaded. | `string` | `''` | +| `resource` | `resource` | The resource used to fetch the image. | `string` | `null` | +| `sizeX` | `size-x` | The width of the icon, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.). | `string` | `'100%'` | +| `sizeY` | `size-y` | The height of the icon, defaults to 100%. Accepts any valid CSS format (px, %, vh, etc.). | `string` | `'100%'` | ## Events diff --git a/packages/ketchup/src/components/kup-input-panel/kup-input-panel-declarations.ts b/packages/ketchup/src/components/kup-input-panel/kup-input-panel-declarations.ts index 22cd63a37d..22c998c4e8 100644 --- a/packages/ketchup/src/components/kup-input-panel/kup-input-panel-declarations.ts +++ b/packages/ketchup/src/components/kup-input-panel/kup-input-panel-declarations.ts @@ -74,7 +74,8 @@ export type DataAdapterFn = ( options: GenericObject, fieldLabel: string, currentValue: string, - fun?: string + cell?: KupInputPanelCell, + id?: string ) => Object; export type InputPanelCells = { @@ -90,7 +91,11 @@ export type InputPanelEvent = { }; }; -export type InputPanelOptionsHandler = (fun: string) => Promise; +export type InputPanelOptionsHandler = ( + fun: string, + inputValue: string, + currentState: KupInputPanelData +) => Promise; export enum KupInputPanelProps { customStyle = 'Custom style of the component.', diff --git a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.scss b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.scss index 02ea026dae..d002572740 100644 --- a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.scss +++ b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.scss @@ -26,6 +26,7 @@ overflow: auto; padding: var(--kup_input_panel_padding); position: relative; + gap: 2rem; &--column { flex-direction: column; @@ -33,6 +34,13 @@ &__section { display: grid; + + .f-cell__content { + >* { + width: 100%; + } + } + } &__horizontal-section { @@ -44,6 +52,17 @@ width: 40px; } + &__label_container { + display: flex; + flex-direction: column; + justify-content: center; + + >.f-cell { + flex: 1; + } + + } + } } \ No newline at end of file diff --git a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx index d9361a4fbd..902b32a9af 100644 --- a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx +++ b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx @@ -4,7 +4,6 @@ import { Event, EventEmitter, Host, - Listen, Method, Prop, State, @@ -13,10 +12,16 @@ import { forceUpdate, h, } from '@stencil/core'; -import { KupAutocompleteEventPayload, KupDataCell } from '../../components'; +import { + KupAutocompleteEventPayload, + KupComboboxIconClickEventPayload, + KupDataCell, +} from '../../components'; import { FButton } from '../../f-components/f-button/f-button'; import { FCell } from '../../f-components/f-cell/f-cell'; import { + FCellEventPayload, + FCellEvents, FCellProps, FCellTypes, } from '../../f-components/f-cell/f-cell-declarations'; @@ -125,6 +130,15 @@ export class KupInputPanel { ]); #originalData: KupInputPanelData = null; + + #eventNames = new Map([ + [ + FCellTypes.AUTOCOMPLETE, + ['kup-autocomplete-input', 'kup-autocomplete-iconclick'], + ], + [FCellTypes.COMBOBOX, ['kup-combobox-iconclick']], + ]); + #listeners: { event: string; handler: (e) => void }[] = []; //#endregion //#region WATCHERS @@ -134,9 +148,15 @@ export class KupInputPanel { @Watch('data') onDataChanged() { - if (!this.#originalData) { - this.#originalData = structuredClone(this.data); + this.#originalData = structuredClone(this.data); + + if (this.#listeners.length) { + this.#listeners.map(({ event, handler }) => { + this.rootElement.removeEventListener(event, handler); + }); + this.#listeners = []; } + this.#mapCells(this.data); } //#endregion @@ -252,14 +272,39 @@ export class KupInputPanel { column, row, component: this, - editable: cell.isEditable, + editable: true, renderKup: true, setSizes: true, }; + const label = this.#getLabelComponent(cell, column.title); + + if (label) { + return ( +
+ {label} + +
+ ); + } + return ; } + #getLabelComponent(cell: KupDataCell, label: string) { + if (!label) { + return null; + } + + const cellType = dom.ketchup.data.cell.getType(cell, cell.shape); + + if (cellType === FCellTypes.RADIO) { + return {label}; + } + + return null; + } + #renderSection( cells: InputPanelCells, section: KupInputPanelLayoutSection @@ -346,10 +391,11 @@ export class KupInputPanel { ...cell, data: { ...this.#mapData(cell, column), + disabled: !cell.editable, id: column.name, }, slotData: this.#slotData(cell, column), - isEditable: cell.editable, + isEditable: true, }; return { column, cell: mappedCell }; @@ -424,7 +470,7 @@ export class KupInputPanel { const adapter = dataAdapterMap.get(cellType); return adapter - ? adapter(options, fieldLabel, currentValue, cell.fun) + ? adapter(options, fieldLabel, currentValue, cell, col.name) : null; } @@ -497,7 +543,8 @@ export class KupInputPanel { rawOptions: GenericObject, fieldLabel: string, currentValue: string, - fun: string + cell: KupInputPanelCell, + id: string ) { const configCMandACP = { data: { @@ -511,20 +558,40 @@ export class KupInputPanel { data: [], }, }, + initialValue: currentValue, label: fieldLabel, }; - const options = fun ? this.optionsHandler(fun) : rawOptions; + if (cell.fun) { + const cellType = dom.ketchup.data.cell.getType(cell, cell.shape); - if (options instanceof Promise) { - options.then( - (data) => - (configCMandACP.data['kup-list'].data = - this.#optionsTreeComboAdapter(data, currentValue) ?? []) - ); - } else if (options) { + const evNames = this.#eventNames.get(cellType); + + if (!evNames) { + return; + } + + evNames.map((evName) => { + const handler = ( + e: CustomEvent + ) => { + this.#getAutocompleteEventCallback( + e.detail, + cell.fun, + configCMandACP, + id, + currentValue + ); + }; + this.rootElement.addEventListener(evName, handler); + this.#listeners.push({ + event: evName, + handler, + }); + }); + } else if (rawOptions) { configCMandACP.data['kup-list'].data = - this.#optionsTreeComboAdapter(options, currentValue); + this.#optionsTreeComboAdapter(rawOptions, currentValue); } return configCMandACP; @@ -620,6 +687,30 @@ export class KupInputPanel { .flat(); } + #getAutocompleteEventCallback( + detail: KupAutocompleteEventPayload | KupComboboxIconClickEventPayload, + fun: string, + data: any, + id: string, + currentValue: string + ) { + if ( + detail.id !== id || + (detail as KupComboboxIconClickEventPayload).open === false + ) { + return; + } + this.optionsHandler( + fun, + detail.inputValue, + this.#reverseMapCells() + ).then((options) => { + data.data['kup-list'].data = + this.#optionsTreeComboAdapter(options, currentValue) ?? []; + detail.comp.refresh(); + }); + } + //#endregion //#region LIFECYCLE HOOKS @@ -637,24 +728,6 @@ export class KupInputPanel { componentDidLoad() { this.kupReady.emit({ comp: this, id: this.rootElement.id }); this.#kupManager.debug.logLoad(this, true); - - // this.handleEventsCallbacks.map((cbData) => { - // this.rootElement.addEventListener(cbData.eventName, (e: any) => { - // const inputPanelEvent: InputPanelEvent = { - // state: this.inputPanelCells.find((data) => - // data.cells.find( - // (cell) => cell.column.name === e.detail.id - // ) - // ).cells, - // data: { - // field: e.detail.id, - // value: e.detail.inputValue || e.detail.value, - // }, - // }; - - // cbData.eventCallback(inputPanelEvent); - // }); - // }); } componentWillRender() { diff --git a/packages/ketchup/src/components/kup-input-panel/readme.md b/packages/ketchup/src/components/kup-input-panel/readme.md index e6fd8dad82..5f87fa6ea7 100644 --- a/packages/ketchup/src/components/kup-input-panel/readme.md +++ b/packages/ketchup/src/components/kup-input-panel/readme.md @@ -7,13 +7,13 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| -------------------- | ---------------------- | ---------------------------------------------------------------------- | ----------------------------------------- | ------- | -| `customStyle` | `custom-style` | Custom style of the component. | `string` | `''` | -| `data` | -- | Actual data of the form. | `KupInputPanelData` | `null` | -| `hiddenSubmitButton` | `hidden-submit-button` | Creates a hidden submit button in order to submit the form with enter. | `boolean` | `false` | -| `optionsHandler` | -- | Sets the callback function on loading options via FUN | `(fun: string) => Promise` | `null` | -| `submitCb` | -- | Sets the callback function on submit form | `(e: KupInputPanelSubmit) => unknown` | `null` | +| Property | Attribute | Description | Type | Default | +| -------------------- | ---------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------- | +| `customStyle` | `custom-style` | Custom style of the component. | `string` | `''` | +| `data` | -- | Actual data of the form. | `KupInputPanelData` | `null` | +| `hiddenSubmitButton` | `hidden-submit-button` | Creates a hidden submit button in order to submit the form with enter. | `boolean` | `false` | +| `optionsHandler` | -- | Sets the callback function on loading options via FUN | `(fun: string, inputValue: string, currentState: KupInputPanelData) => Promise` | `null` | +| `submitCb` | -- | Sets the callback function on submit form | `(e: KupInputPanelSubmit) => unknown` | `null` | ## Events diff --git a/packages/ketchup/src/f-components/f-image/f-image-declarations.ts b/packages/ketchup/src/f-components/f-image/f-image-declarations.ts index 42d8b344fa..28cdd26a1f 100644 --- a/packages/ketchup/src/f-components/f-image/f-image-declarations.ts +++ b/packages/ketchup/src/f-components/f-image/f-image-declarations.ts @@ -7,6 +7,7 @@ export interface FImageProps extends FComponent { color?: string; data?: FImageData[]; fit?: boolean; + placeholderResource?: string; resource?: string; sizeX?: string; sizeY?: string; diff --git a/packages/ketchup/src/f-components/f-image/f-image.scss b/packages/ketchup/src/f-components/f-image/f-image.scss index e7b61ecf33..9cdb997d2a 100644 --- a/packages/ketchup/src/f-components/f-image/f-image.scss +++ b/packages/ketchup/src/f-components/f-image/f-image.scss @@ -31,6 +31,16 @@ width: var(--kup_image_width, 100%); } + .f-image__placeholder { + height: 100%; + position: absolute; + width: 100%; + } + + .f-image__hidden { + visibility: hidden; + } + .css-step.bottom-aligned { bottom: 0; position: absolute; diff --git a/packages/ketchup/src/f-components/f-image/f-image.tsx b/packages/ketchup/src/f-components/f-image/f-image.tsx index cd93272629..1addca580b 100644 --- a/packages/ketchup/src/f-components/f-image/f-image.tsx +++ b/packages/ketchup/src/f-components/f-image/f-image.tsx @@ -1,13 +1,17 @@ import type { KupBadge } from '../../components/kup-badge/kup-badge'; import { FImageProps, FImageData, FImageShape } from './f-image-declarations'; import { FunctionalComponent, getAssetPath, h, JSX } from '@stencil/core'; -import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations'; import { GenericObject } from '../../types/GenericTypes'; /*-------------------------------------------------*/ /* C o m p o n e n t */ /*-------------------------------------------------*/ +let img: HTMLImageElement; +let placeholder: HTMLDivElement; + +const HIDDEN_CLASS = 'f-image__hidden'; + export const FImage: FunctionalComponent = ( props: FImageProps ) => { @@ -33,7 +37,7 @@ export const FImage: FunctionalComponent = ( '--kup_image_height': props.sizeY ? props.sizeY : '100%', '--kup_image_width': props.sizeX ? props.sizeX : '100%', }; - el = createIcon(props); + el = createIcon(props.resource, props.color); } } else if (props.data) { style = { @@ -59,6 +63,13 @@ export const FImage: FunctionalComponent = ( title={props.title} onClick={props.onClick} > + {props.placeholderResource + ? createIcon( + props.placeholderResource, + props.color, + 'f-image__placeholder ' + HIDDEN_CLASS + ) + : undefined} {el} {...badgeCollection}
@@ -69,27 +80,62 @@ export const FImage: FunctionalComponent = ( /* M e t h o d s */ /*-------------------------------------------------*/ -function createIcon(props: FImageProps): HTMLDivElement { +function createIcon( + icon: string, + color: string, + iconClass = 'f-image__icon' +): HTMLDivElement { const classObj: GenericObject = { - 'f-image__icon': true, + [iconClass]: true, }; const style: GenericObject = { - background: props.color ? props.color : `var(--kup-gray-color-70)`, + background: color ? color : `var(--kup-gray-color-70)`, }; - if (props.resource.indexOf('--kup') > -1) { - let themeIcon: string = props.resource.replace('--', ''); + if (icon.indexOf('--kup') > -1) { + let themeIcon: string = icon.replace('--', ''); classObj['kup-icon'] = true; classObj[themeIcon] = true; } else { - const path: string = getAssetPath(`./assets/svg/${props.resource}.svg`); + const path: string = getAssetPath(`./assets/svg/${icon}.svg`); style.mask = `url('${path}') no-repeat center`; style.webkitMask = `url('${path}') no-repeat center`; } - return
; + return ( +
{ + if (iconClass.indexOf('placeholder') > 1) { + placeholder = el; + } + }} + style={style} + >
+ ); } function createImage(props: FImageProps): HTMLImageElement { - return ; + return ( + { + if (props.onLoad) { + props.onLoad(e); + } + if (placeholder) { + placeholder.classList.add(HIDDEN_CLASS); + img.classList.remove(HIDDEN_CLASS); + } + }} + onError={() => { + if (placeholder) { + placeholder.classList.remove(HIDDEN_CLASS); + img.classList.add(HIDDEN_CLASS); + } + }} + ref={(el) => (img = el)} + src={props.resource} + > + ); } function createBar(data: FImageData[]): HTMLDivElement { diff --git a/packages/ketchup/src/image.html b/packages/ketchup/src/image.html index de8fcff7b3..8560daffe9 100644 --- a/packages/ketchup/src/image.html +++ b/packages/ketchup/src/image.html @@ -40,7 +40,8 @@
diff --git a/yarn.lock b/yarn.lock index 0a47e41951..3aea9ddc54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2998,7 +2998,7 @@ __metadata: version: 0.0.0-use.local resolution: "@sme.up/ketchup-react@workspace:packages/ketchup-react" dependencies: - "@sme.up/ketchup": ^9.6.6 + "@sme.up/ketchup": ^9.6.7 "@types/geojson": ^7946.0.10 "@types/node": ^20.2.5 "@types/react": ^18.2.7 @@ -3032,7 +3032,7 @@ __metadata: resolution: "@sme.up/ketchup-showcase@workspace:packages/ketchup-showcase" dependencies: "@babel/plugin-transform-private-methods": ^7.24.1 - "@sme.up/ketchup": ^9.6.6 + "@sme.up/ketchup": ^9.6.7 "@typescript-eslint/eslint-plugin": ^5.59.8 "@typescript-eslint/parser": ^5.59.8 "@vue/cli-plugin-babel": ~5.0.8 @@ -3056,7 +3056,7 @@ __metadata: languageName: unknown linkType: soft -"@sme.up/ketchup@^9.6.6, @sme.up/ketchup@workspace:packages/ketchup": +"@sme.up/ketchup@^9.6.7, @sme.up/ketchup@workspace:packages/ketchup": version: 0.0.0-use.local resolution: "@sme.up/ketchup@workspace:packages/ketchup" dependencies: