@things-factory/dataset 7.0.1-rc.9 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/client/activities/activity-data-review-edit.ts +1 -1
- package/client/activities/activity-data-review-view.ts +1 -1
- package/client/activities/activity-ooc-resolve-edit.ts +3 -3
- package/client/activities/activity-ooc-resolve-view.ts +1 -1
- package/client/activities/activity-ooc-review-edit.ts +4 -4
- package/client/activities/activity-ooc-review-view.ts +1 -1
- package/client/pages/data-entry/data-entry-list-page.ts +5 -4
- package/client/pages/data-ooc/data-ooc-view.ts +2 -2
- package/client/pages/data-ooc/data-oocs-page.ts +1 -1
- package/client/pages/data-sample/data-sample-list-page.ts +2 -2
- package/client/pages/data-sample/data-sample-search-page.ts +2 -2
- package/client/pages/data-sample/data-sample-view.ts +2 -2
- package/client/pages/data-summary/data-summary-list-page.ts +2 -2
- package/client/pages/data-summary/data-summary-view.ts +1 -1
- package/dist-client/activities/activity-data-review-edit.js +1 -1
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-view.js +1 -1
- package/dist-client/activities/activity-data-review-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-edit.js +3 -3
- package/dist-client/activities/activity-ooc-resolve-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.js +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-edit.js +4 -4
- package/dist-client/activities/activity-ooc-review-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-view.js +1 -1
- package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
- package/dist-client/pages/data-entry/data-entry-list-page.js +5 -4
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-view.js +2 -2
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.js +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.js +2 -2
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.js +2 -2
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-view.js +2 -2
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-list-page.js +2 -2
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-view.js +1 -1
- package/dist-client/pages/data-summary/data-summary-view.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-ooc-review.js +2 -1
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-sample.js +54 -44
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/issue-collect-data.js +1 -1
- package/dist-server/controllers/issue-collect-data.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +1 -1
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/server/activities/activity-ooc-review.ts +2 -1
- package/server/controllers/create-data-sample.ts +54 -44
- package/server/controllers/issue-collect-data.ts +1 -1
- package/server/service/data-set/data-set-query.ts +2 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-summary-list-page.js","sourceRoot":"","sources":["../../../client/pages/data-summary/data-summary-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,6CAA6C,CAAA;AACpD,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,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CAAC,CAAA;gBACjH,OAAO,MAAM,CAAA;YACf,CAAC,EAAE,EAAE,CAAC,EACT;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC9C,CAAC;;AApUM,0BAAM,GAAG;IACd,eAAe;IACf,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;KAYF;CACF,AAhBY,CAgBZ;AAEgB;IAAhB,KAAK,EAAE;;iDAA4E;AACnE;IAAhB,KAAK,EAAE;;wDAAyB;AAEN;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;kDAAA;AAtBjC,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAsU/B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\nimport '@operato/context/ox-context-page-toolbar.js'\nimport './data-summary-view.js'\n\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport moment from '@operato/moment-timezone-es'\nimport { DataGrist, GristRecord, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\n@customElement('data-summary-list-page')\nexport class DataSummaryListPage extends connect(store)(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n @state() private gristConfig: any\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.data-summary list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'dataset/data-summary',\n exportable: {\n name: i18next.t('title.data-summary list'),\n data: this._exportableData.bind(this)\n },\n toolbar: false\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${false /* this.active */}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"title\">${i18next.t('title.data-summary list')}</div>\n\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n </div>\n\n <ox-context-page-toolbar class=\"actions\" .context=${this.context}></ox-context-page-toolbar>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n const yesterday = moment().subtract(1, 'day').format('YYYY-MM-DD')\n const today = moment().format('YYYY-MM-DD')\n\n this.gristConfig = {\n list: { fields: ['dataSet', 'data', 'updater', 'updatedAt'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence', fixed: true },\n { type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: 'assignment',\n title: i18next.t('title.open data summary view')\n },\n {\n type: 'string',\n name: 'name',\n fixed: true,\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'search',\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'description',\n label: true,\n header: i18next.t('field.description'),\n record: {\n editable: false\n },\n filter: 'search',\n width: 150,\n imex: true\n },\n {\n type: 'string',\n name: 'date',\n header: i18next.t('field.date'),\n sortable: true,\n filter: {\n type: 'date',\n operator: 'between',\n value: [yesterday, today]\n },\n width: 80,\n imex: true\n },\n {\n type: 'string',\n name: 'period',\n header: i18next.t('field.time-period'),\n sortable: true,\n width: 60,\n imex: true\n },\n ...Array.from({ length: 5 }, (_, idx) => {\n return {\n type: 'string',\n name: `key0${idx + 1}`,\n header: {\n renderer: i18next.t(`field.key-0${idx + 1}`),\n group: i18next.t('field.key')\n },\n record: {\n editable: false\n },\n width: 120,\n imex: true\n }\n }),\n ...Array.from({ length: 5 }, (_, idx) => {\n return {\n type: 'number',\n name: `data0${idx + 1}`,\n header: {\n renderer: i18next.t(`field.data-0${idx + 1}`),\n group: i18next.t('field.data')\n },\n record: {\n editable: false,\n align: 'right'\n },\n width: 120,\n imex: true\n }\n }),\n {\n type: 'number',\n name: 'count',\n header: i18next.t('field.count'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'number',\n name: 'countOoc',\n header: i18next.t('field.count-ooc'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'number',\n name: 'countOos',\n header: i18next.t('field.count-oos'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n sortable: true,\n width: 180,\n imex: true\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n },\n classifier: function (record, rowIndex) {\n var emphasized\n if (record['oos']) {\n emphasized = ['#8B0000']\n } else if (record['ooc']) {\n emphasized = ['#FF6B6B']\n }\n\n return {\n emphasized\n }\n },\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n openPopup(html` <data-summary-view data-summary-id=${record.id} style=\"background-color: white;\"></data-summary-view> `, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.data-summary view')\n })\n }\n }\n },\n sorters: [\n {\n name: 'date',\n desc: true\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: dataSummaries(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n dataSet {\n id\n }\n date\n period\n key01\n key02\n key03\n key04\n key05\n data01\n data02\n data03\n data04\n data05\n summary\n count\n countOoc\n countOos\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n _exportableData() {\n let records = [] as GristRecord[]\n if (this.grist.selected && this.grist.selected.length > 0) {\n records = this.grist.selected\n } else {\n records = this.grist.data.records\n }\n\n var headerSetting = this.grist.compiledConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .map(column => {\n return column.imex === true\n ? {\n header: column.header.renderer(column),\n key: column.name,\n width: column.width,\n type: column.type\n }\n : column.imex\n })\n\n var data = records.map(item => {\n return {\n id: item.id,\n ...this.gristConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .reduce((record, column) => {\n const key = column.imex === true ? column.name : column.imex.key\n record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)\n return record\n }, {})\n }\n })\n\n return { header: headerSetting, data: data }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"data-summary-list-page.js","sourceRoot":"","sources":["../../../client/pages/data-summary/data-summary-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,6CAA6C,CAAA;AACpD,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAY,KAAK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ACf,CAAC,EAAE,EAAE,CAAC,EACT;QACH,CAAC,CAAC,CAAA;QAEF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,CAAA;IAC9C,CAAC;;AApUM,0BAAM,GAAG;IACd,eAAe;IACf,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;KAYF;CACF,AAhBY,CAgBZ;AAEgB;IAAhB,KAAK,EAAE;;iDAA4E;AACnE;IAAhB,KAAK,EAAE;;wDAAyB;AAEN;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;kDAAA;AAtBjC,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAsU/B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\nimport '@operato/context/ox-context-page-toolbar.js'\nimport './data-summary-view.js'\n\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport moment from '@operato/moment-timezone-es'\nimport { DataGrist, GristRecord, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\n@customElement('data-summary-list-page')\nexport class DataSummaryListPage extends connect(store)(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n @state() private gristConfig: any\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.data-summary list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'dataset/data-summary',\n exportable: {\n name: i18next.t('title.data-summary list'),\n data: this._exportableData.bind(this)\n },\n toolbar: false\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${false /* this.active */}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"title\">${i18next.t('title.data-summary list')}</div>\n\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n </div>\n\n <ox-context-page-toolbar class=\"actions\" .context=${this.context}></ox-context-page-toolbar>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n const yesterday = moment().subtract(1, 'day').format('YYYY-MM-DD')\n const today = moment().format('YYYY-MM-DD')\n\n this.gristConfig = {\n list: { fields: ['dataSet', 'data', 'updater', 'updatedAt'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence', fixed: true },\n { type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: 'assignment',\n title: i18next.t('title.open data summary view')\n },\n {\n type: 'string',\n name: 'name',\n fixed: true,\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'search',\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'description',\n label: true,\n header: i18next.t('field.description'),\n record: {\n editable: false\n },\n filter: 'search',\n width: 150,\n imex: true\n },\n {\n type: 'string',\n name: 'date',\n header: i18next.t('field.date'),\n sortable: true,\n filter: {\n type: 'date',\n operator: 'between',\n value: [yesterday, today]\n },\n width: 80,\n imex: true\n },\n {\n type: 'string',\n name: 'period',\n header: i18next.t('field.time-period'),\n sortable: true,\n width: 60,\n imex: true\n },\n ...Array.from({ length: 5 }, (_, idx) => {\n return {\n type: 'string',\n name: `key0${idx + 1}`,\n header: {\n renderer: i18next.t(`field.key-0${idx + 1}`),\n group: i18next.t('field.key')\n },\n record: {\n editable: false\n },\n width: 120,\n imex: true\n }\n }),\n ...Array.from({ length: 5 }, (_, idx) => {\n return {\n type: 'number',\n name: `data0${idx + 1}`,\n header: {\n renderer: i18next.t(`field.data-0${idx + 1}`),\n group: i18next.t('field.data')\n },\n record: {\n editable: false,\n align: 'right'\n },\n width: 120,\n imex: true\n }\n }),\n {\n type: 'number',\n name: 'count',\n header: i18next.t('field.count'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'number',\n name: 'countOoc',\n header: i18next.t('field.count-ooc'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'number',\n name: 'countOos',\n header: i18next.t('field.count-oos'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n sortable: true,\n width: 180,\n imex: true\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n },\n classifier: function (record, rowIndex) {\n var emphasized\n if (record['oos']) {\n emphasized = ['#8B0000', 'white']\n } else if (record['ooc']) {\n emphasized = ['#FF6B6B', 'white']\n }\n\n return {\n emphasized\n }\n },\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n openPopup(html` <data-summary-view data-summary-id=${record.id} style=\"background-color: white;\"></data-summary-view> `, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.data-summary view')\n })\n }\n }\n },\n sorters: [\n {\n name: 'date',\n desc: true\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: dataSummaries(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n dataSet {\n id\n }\n date\n period\n key01\n key02\n key03\n key04\n key05\n data01\n data02\n data03\n data04\n data05\n summary\n count\n countOoc\n countOos\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n _exportableData() {\n let records = [] as GristRecord[]\n if (this.grist.selected && this.grist.selected.length > 0) {\n records = this.grist.selected\n } else {\n records = this.grist.data.records\n }\n\n var headerSetting = this.grist.compiledConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .map(column => {\n return column.imex === true\n ? {\n header: column.header.renderer(column),\n key: column.name,\n width: column.width,\n type: column.type\n }\n : column.imex\n })\n\n var data = records.map(item => {\n return {\n id: item.id,\n ...this.gristConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .reduce((record, column) => {\n const key = column.imex === true ? column.name : column.imex.key\n record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)\n return record\n }, {})\n }\n })\n\n return { header: headerSetting, data: data }\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-summary-view.js","sourceRoot":"","sources":["../../../client/pages/data-summary/data-summary-view.ts"],"names":[],"mappings":";AAAA,OAAO,0CAA0C,CAAA;AAEjD,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;AAqBjD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAkCzD,MAAM;QACJ,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,WAAW;YAChB,CAAC,CAAC,IAAI,CAAA,sCAAsC,IAAI,CAAC,WAAW,0BAA0B;YACtF,CAAC,CAAC,IAAI,CAAA,EAAE;;KAEb,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,gBAAgB,EAAE,CAAA;QACzB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAA;QAE7B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCT;YACD,SAAS,EAAE;gBACT,EAAE;aACH;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAA;IAC9C,CAAC;;AArGM,sBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;KAoBF;CACF,AAvBY,CAuBZ;AAMD;IAJC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,iBAAiB;KAC7B,CAAC;;sDACoB;AAEb;IAAR,KAAK,EAAE;;oDAA0B;AAhC9B,eAAe;IADpB,aAAa,CAAC,mBAAmB,CAAC;GAC7B,eAAe,CAuGpB","sourcesContent":["import '@operato/dataset/ox-data-summary-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'\nimport { DataItem } from '@operato/dataset'\n\ntype DataSummary = {\n name: string\n description: string\n dataItems?: DataItem[]\n date?: string\n period?: string\n key01?: string\n key02?: string\n key03?: string\n key04?: string\n key05?: string\n count?: number\n countOoc?: number\n countOos?: number\n summary?: { [key: string]: any }\n}\n\n@customElement('data-summary-view')\nclass DataSummaryView 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 div[content] {\n flex: 1;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-summary-view {\n flex: 1;\n padding: var(--
|
1
|
+
{"version":3,"file":"data-summary-view.js","sourceRoot":"","sources":["../../../client/pages/data-summary/data-summary-view.ts"],"names":[],"mappings":";AAAA,OAAO,0CAA0C,CAAA;AAEjD,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;AAqBjD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAkCzD,MAAM;QACJ,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,WAAW;YAChB,CAAC,CAAC,IAAI,CAAA,sCAAsC,IAAI,CAAC,WAAW,0BAA0B;YACtF,CAAC,CAAC,IAAI,CAAA,EAAE;;KAEb,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,gBAAgB,EAAE,CAAA;QACzB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAA;QAE7B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCT;YACD,SAAS,EAAE;gBACT,EAAE;aACH;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAA;IAC9C,CAAC;;AArGM,sBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;KAoBF;CACF,AAvBY,CAuBZ;AAMD;IAJC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,iBAAiB;KAC7B,CAAC;;sDACoB;AAEb;IAAR,KAAK,EAAE;;oDAA0B;AAhC9B,eAAe;IADpB,aAAa,CAAC,mBAAmB,CAAC;GAC7B,eAAe,CAuGpB","sourcesContent":["import '@operato/dataset/ox-data-summary-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'\nimport { DataItem } from '@operato/dataset'\n\ntype DataSummary = {\n name: string\n description: string\n dataItems?: DataItem[]\n date?: string\n period?: string\n key01?: string\n key02?: string\n key03?: string\n key04?: string\n key05?: string\n count?: number\n countOoc?: number\n countOos?: number\n summary?: { [key: string]: any }\n}\n\n@customElement('data-summary-view')\nclass DataSummaryView 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 div[content] {\n flex: 1;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-summary-view {\n flex: 1;\n padding: var(--spacing-large);\n overflow: auto;\n }\n `\n ]\n\n @property({\n type: String,\n attribute: 'data-summary-id'\n })\n dataSummaryId?: string\n\n @state() dataSummary?: DataSummary\n\n render() {\n return html`\n <div content>\n ${this.dataSummary\n ? html`<ox-data-summary-view .dataSummary=${this.dataSummary}></ox-data-summary-view>`\n : html``}\n </div>\n `\n }\n\n updated(changes) {\n if (changes.has('dataSummaryId')) {\n this.fetchDataSummary()\n }\n }\n\n async fetchDataSummary() {\n const id = this.dataSummaryId\n\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataSummary(id: $id) {\n id\n name\n description\n dataSet {\n id\n }\n dataItems {\n name\n description\n active\n hidden\n tag\n group\n type\n unit\n options\n quota\n spec\n stat\n }\n date\n period\n key01\n key02\n key03\n key04\n key05\n summary\n count\n countOoc\n countOos\n updater {\n id\n name\n }\n updatedAt\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataSummary = response.data.dataSummary\n }\n}\n"]}
|