@things-factory/quotation 7.0.1-alpha.99 → 7.0.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ export class ActivityQuotationView extends localize(i18next)(LitElement) {
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
 
28
- background-color: #fff;
28
+ background-color: var(--md-sys-color-surface);
29
29
  }
30
30
 
31
31
  quotation-edit {
@@ -25,7 +25,7 @@ export class ActivityQuotationView extends localize(i18next)(LitElement) {
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
 
28
- background-color: #fff;
28
+ background-color: var(--md-sys-color-surface);
29
29
  }
30
30
 
31
31
  quotation-view {
@@ -18,7 +18,7 @@ export class QuotationImporter extends LitElement {
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
 
21
- background-color: #fff;
21
+ background-color: var(--md-sys-color-surface);
22
22
  }
23
23
 
24
24
  ox-grist {
@@ -58,7 +58,7 @@ ActivityQuotationView.styles = [
58
58
  display: flex;
59
59
  flex-direction: column;
60
60
 
61
- background-color: #fff;
61
+ background-color: var(--md-sys-color-surface);
62
62
  }
63
63
 
64
64
  quotation-edit {
@@ -1 +1 @@
1
- {"version":3,"file":"activity-quotation-edit.js","sourceRoot":"","sources":["../../client/activities/activity-quotation-edit.ts"],"names":[],"mappings":"AAAA;;;;EAIE;;AAEF,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CA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C;SAtEY,qBAAqB","sourcesContent":["/* \nAdd the following line to clinet/bootstrap.ts so that activity editor can be registered when loading a module.\n--\nimport './activities/quotation-edit.js' // refered by the activity template (activity-quotation) on server\n*/\n\nimport '../components/quotation-edit.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n// import { QuotationView } from '../components/quotation-edit.js'\n\n@customElement('activity-quotation-edit')\nexport class ActivityQuotationView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n quotation-edit {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() quotation?: any //Quotation\n\n // @query('quotation-edit') quotationView!: QuotationView\n\n render() {\n return html`\n <quotation-edit .quotation=${this.quotation} .value=${this.output} @change=${this.onChange}></quotation-edit>\n `\n }\n\n async onChange() {\n // this.output = this.quotationView.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchQuotation()\n }\n }\n\n async fetchQuotation() {\n const id = this.input.quotationId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n quotation(id: $id) {\n id\n name\n description\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.quotation = response.data.quotation\n }\n }\n}\n"]}
1
+ {"version":3,"file":"activity-quotation-edit.js","sourceRoot":"","sources":["../../client/activities/activity-quotation-edit.ts"],"names":[],"mappings":"AAAA;;;;EAIE;;AAEF,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK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A;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAgB;AAtBb,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAsEjC;SAtEY,qBAAqB","sourcesContent":["/* \nAdd the following line to clinet/bootstrap.ts so that activity editor can be registered when loading a module.\n--\nimport './activities/quotation-edit.js' // refered by the activity template (activity-quotation) on server\n*/\n\nimport '../components/quotation-edit.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n// import { QuotationView } from '../components/quotation-edit.js'\n\n@customElement('activity-quotation-edit')\nexport class ActivityQuotationView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n quotation-edit {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() quotation?: any //Quotation\n\n // @query('quotation-edit') quotationView!: QuotationView\n\n render() {\n return html`\n <quotation-edit .quotation=${this.quotation} .value=${this.output} @change=${this.onChange}></quotation-edit>\n `\n }\n\n async onChange() {\n // this.output = this.quotationView.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchQuotation()\n }\n }\n\n async fetchQuotation() {\n const id = this.input.quotationId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n quotation(id: $id) {\n id\n name\n description\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.quotation = response.data.quotation\n }\n }\n}\n"]}
@@ -58,7 +58,7 @@ ActivityQuotationView.styles = [
58
58
  display: flex;
59
59
  flex-direction: column;
60
60
 
61
- background-color: #fff;
61
+ background-color: var(--md-sys-color-surface);
62
62
  }
63
63
 
64
64
  quotation-view {
@@ -1 +1 @@
1
- {"version":3,"file":"activity-quotation-view.js","sourceRoot":"","sources":["../../client/activities/activity-quotation-view.ts"],"names":[],"mappings":"AAAA;;;;EAIE;;AAEF,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,kEAAkE;AAG3D,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAwBtE,yDAAyD;IAEzD,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,QAAQ;KAC3F,CAAA;IACH,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,yCAAyC;QAEzC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CACH,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACxB,IAAI,CAAC,cAAc,EAAE,CAAA;SACtB;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAA;QAEjC,IAAI,EAAE,EAAE;YACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;SAQT;gBACD,SAAS,EAAE;oBACT,EAAE;iBACH;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAA;SACzC;IACH,CAAC;;AApEM,4BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;KAaF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAgB;AAtBb,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAsEjC;SAtEY,qBAAqB","sourcesContent":["/* \nAdd the following line to clinet/bootstrap.ts so that activity view can be registered when loading a module.\n--\nimport './activities/quotation-view.js' // refered by the activity template (activity-data-collect) on server\n*/\n\nimport '../components/quotation-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n// import { QuotationView } from '../components/quotation-view.js'\n\n@customElement('activity-quotation-view')\nexport class ActivityQuotationView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n quotation-view {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() quotation?: any //Quotation\n\n // @query('quotation-view') quotationView!: QuotationView\n\n render() {\n return html`\n <quotation-view .quotation=${this.quotation} .value=${this.output} @change=${this.onChange}></quotation-view>\n `\n }\n\n async onChange() {\n // this.output = this.quotationView.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchQuotation()\n }\n }\n\n async fetchQuotation() {\n const id = this.input.quotationId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n quotation(id: $id) {\n id\n name\n description\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.quotation = response.data.quotation\n }\n }\n}\n"]}
1
+ {"version":3,"file":"activity-quotation-view.js","sourceRoot":"","sources":["../../client/activities/activity-quotation-view.ts"],"names":[],"mappings":"AAAA;;;;EAIE;;AAEF,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,kEAAkE;AAG3D,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAwBtE,yDAAyD;IAEzD,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,SAAS,WAAW,IAAI,CAAC,MAAM,YAAY,IAAI,CAAC,QAAQ;KAC3F,CAAA;IACH,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,yCAAyC;QAEzC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CACH,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACxB,IAAI,CAAC,cAAc,EAAE,CAAA;SACtB;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAA;QAEjC,IAAI,EAAE,EAAE;YACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;SAQT;gBACD,SAAS,EAAE;oBACT,EAAE;iBACH;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAA;SACzC;IACH,CAAC;;AApEM,4BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;KAaF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAgB;AAtBb,qBAAqB;IADjC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,qBAAqB,CAsEjC;SAtEY,qBAAqB","sourcesContent":["/* \nAdd the following line to clinet/bootstrap.ts so that activity view can be registered when loading a module.\n--\nimport './activities/quotation-view.js' // refered by the activity template (activity-data-collect) on server\n*/\n\nimport '../components/quotation-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n// import { QuotationView } from '../components/quotation-view.js'\n\n@customElement('activity-quotation-view')\nexport class ActivityQuotationView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n quotation-view {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() quotation?: any //Quotation\n\n // @query('quotation-view') quotationView!: QuotationView\n\n render() {\n return html`\n <quotation-view .quotation=${this.quotation} .value=${this.output} @change=${this.onChange}></quotation-view>\n `\n }\n\n async onChange() {\n // this.output = this.quotationView.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchQuotation()\n }\n }\n\n async fetchQuotation() {\n const id = this.input.quotationId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n quotation(id: $id) {\n id\n name\n description\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.quotation = response.data.quotation\n }\n }\n}\n"]}
@@ -74,7 +74,7 @@ QuotationImporter.styles = [
74
74
  display: flex;
75
75
  flex-direction: column;
76
76
 
77
- background-color: #fff;
77
+ background-color: var(--md-sys-color-surface);
78
78
  }
79
79
 
80
80
  ox-grist {
@@ -1 +1 @@
1
- {"version":3,"file":"quotation-importer.js","sourceRoot":"","sources":["../../../client/pages/quotation/quotation-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE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EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;SAC3C,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAvEM,wBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;qDAAuB;AACjD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\n\nexport class QuotationImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) quotations: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.quotations\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=\"${this.save.bind(this)}\"><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importQuotations($quotations: [QuotationPatch!]!) {\n importQuotations(quotations: $quotations)\n }\n `,\n variables: { quotations: this.quotations }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
1
+ {"version":3,"file":"quotation-importer.js","sourceRoot":"","sources":["../../../client/pages/quotation/quotation-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAAjD;;QAiB6B,eAAU,GAAU,EAAE,CAAA;QACrB,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACtC,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAA;IAgCH,CAAC;IA9BC,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,UAAU;SACzB;;;;0BAIiB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAE7F,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;SAC3C,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAvEM,wBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;qDAAuB;AACjD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\n\nexport class QuotationImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) quotations: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.quotations\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=\"${this.save.bind(this)}\"><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importQuotations($quotations: [QuotationPatch!]!) {\n importQuotations(quotations: $quotations)\n }\n `,\n variables: { quotations: this.quotations }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}