@operato/scene-grist 7.3.6 → 7.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/grist.js +8 -0
- package/dist/grist.js.map +1 -1
- package/dist/templates/grist.d.ts +0 -1
- package/dist/templates/grist.js +0 -1
- package/dist/templates/grist.js.map +1 -1
- package/dist/templates/index.d.ts +0 -1
- package/package.json +3 -3
- package/schema.graphql +258 -19
- package/src/grist.ts +8 -0
- package/src/templates/grist.ts +0 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.3.9](https://github.com/things-scene/operato-scene/compare/v7.3.8...v7.3.9) (2024-09-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* @hatiolab/things-scene version ([5260171](https://github.com/things-scene/operato-scene/commit/52601719115288709ca7e0eee0974cc4677f219e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [7.3.7](https://github.com/things-scene/operato-scene/compare/v7.3.6...v7.3.7) (2024-08-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :bug: Bug Fix
|
|
19
|
+
|
|
20
|
+
* apply default background color for grist to theme surface color ([bd5d2d2](https://github.com/things-scene/operato-scene/commit/bd5d2d2091a45d7c9d8da3450680311d0f104d17))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [7.3.6](https://github.com/things-scene/operato-scene/compare/v7.3.5...v7.3.6) (2024-08-27)
|
|
7
25
|
|
|
8
26
|
|
package/dist/grist.js
CHANGED
|
@@ -227,6 +227,14 @@ export default class SceneGrist extends HTMLOverlayElement {
|
|
|
227
227
|
* 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
|
|
228
228
|
*/
|
|
229
229
|
reposition() {
|
|
230
|
+
var _a, _b;
|
|
231
|
+
const { fillStyle } = this.state;
|
|
232
|
+
if (!fillStyle) {
|
|
233
|
+
(_a = this.grist) === null || _a === void 0 ? void 0 : _a.style.setProperty('--grist-background-color', 'var(--md-sys-color-surface, #f7f6f4)');
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
(_b = this.grist) === null || _b === void 0 ? void 0 : _b.style.removeProperty('--grist-background-color');
|
|
237
|
+
}
|
|
230
238
|
super.reposition();
|
|
231
239
|
}
|
|
232
240
|
/*
|
package/dist/grist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grist.js","sourceRoot":"","sources":["../src/grist.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAA;AACZ,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAE,kBAAkB,EAAc,MAAM,wBAAwB,CAAA;AAE1G,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGnD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,mBAAmB;wB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A;IACd,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport 'ses'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\n\nimport { Component, ComponentNature, error, HTMLOverlayElement, Properties } from '@hatiolab/things-scene'\nimport { DataGrist, FetchResult } from '@operato/data-grist'\nimport { i18next as _i18next } from '@operato/i18n'\nimport { FetchOption } from '@operato/data-grist/dist/src/types'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'grist-mode',\n name: 'mode',\n property: {\n options: [\n {\n display: 'Grid',\n value: 'GRID'\n },\n {\n display: 'List',\n value: 'LIST'\n },\n {\n display: 'Card',\n value: 'CARD'\n },\n {\n display: 'Depends on device',\n value: 'DEVICE'\n }\n ]\n }\n },\n {\n type: 'textarea',\n label: 'config',\n name: 'config'\n },\n {\n type: 'checkbox',\n label: 'filterable',\n name: 'filterable'\n },\n {\n type: 'checkbox',\n label: 'appendable',\n name: 'appendable'\n },\n {\n type: 'checkbox',\n label: 'paginatable',\n name: 'paginatable'\n },\n {\n type: 'number',\n label: 'content-scale',\n name: 'contentScale',\n property: {\n step: 0.1,\n min: 0.1\n }\n },\n {\n type: 'select',\n label: 'bound-data',\n name: 'boundData',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'Focused Row',\n value: 'focused-row'\n },\n {\n display: 'Selected Rows',\n value: 'selected-rows'\n }\n ]\n }\n }\n ],\n help: 'scene/component/grist'\n}\n\nconst isMobileDevice = () => false\n\nexport default class SceneGrist extends HTMLOverlayElement {\n public beforeFetchFuncs: any = {}\n\n private __value: any = {}\n private _listenTo?: any\n private _listener?: any\n\n public grist?: DataGrist\n\n get nature() {\n return NATURE\n }\n\n ready() {\n super.ready()\n\n if (this.rootModel) {\n this._listenTo = this.rootModel\n this._listener = function (this: SceneGrist, after: Properties) {\n after.scale && this.rescale()\n }.bind(this)\n this.rootModel.on('change', this._listener)\n }\n }\n\n removed() {\n if (this._listenTo) {\n this._listenTo.off('change', this._listener)\n\n delete this._listenTo\n delete this._listener\n }\n }\n\n createElement() {\n super.createElement()\n\n this.grist = document.createElement('ox-grist') as DataGrist\n this.element.appendChild(this.grist)\n\n this.rescale()\n\n const grist = this.grist\n\n this.setGristConfig(grist)\n\n grist.fetchHandler = async ({\n page,\n limit,\n sorters,\n sortings,\n filters,\n inherited,\n options\n }: FetchOption): Promise<FetchResult> => {\n Object.values(this.beforeFetchFuncs).forEach((func: any) =>\n func({ page, limit, sorters, sortings, filters, inherited, options })\n )\n var { total = 0, records = [] } = grist.data || {}\n\n return {\n page,\n limit,\n total,\n records\n }\n }\n\n grist.addEventListener('select-record-change', e => {\n if (this.state.boundData === 'selected-rows') {\n this.data = (e.target as DataGrist)?.selected || []\n }\n })\n\n grist.addEventListener('select-all-change', e => {\n if (this.state.boundData === 'selected-rows') {\n this.data = (e.target as DataGrist)?.selected || []\n }\n })\n\n grist.addEventListener('focus-change', (e: Event) => {\n if (this.state.boundData === 'focused-row') {\n this.data = ((e.target as DataGrist)?.data?.records || [])[(e as CustomEvent).detail.row]\n }\n })\n }\n\n get value() {\n return this.__value\n }\n\n set value(value) {\n this.__value = value\n if (!this.grist || typeof value !== 'object') return\n\n var { page, limit } = this.config.pagination || {}\n\n this.grist.data =\n value instanceof Array\n ? {\n page,\n limit,\n ...this.grist._data,\n total: value.length,\n records: Array.from(value)\n }\n : {\n page,\n limit,\n ...this.grist._data,\n ...value\n }\n }\n\n onchange(after: Properties, before: Properties) {\n super.onchange(after, before)\n\n if (\n 'mode' in after ||\n 'filterable' in after ||\n 'appendable' in after ||\n 'paginatable' in after ||\n 'config' in after\n ) {\n this.setGristConfig(this.grist)\n }\n\n this.rescale()\n }\n\n dispose() {\n super.dispose()\n\n delete this.grist\n }\n\n /*\n * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,\n * 그에 따른 html element의 반영이 필요한 부분을 구현한다.\n *\n * ThingsComponent state => HTML element properties\n */\n setElementProperties(grist: DataGrist) {\n this.rescale()\n }\n\n setGristConfig(grist: DataGrist | undefined) {\n if (!grist) {\n return\n }\n\n var { mode, filterable } = this.state\n\n if (mode != 'DEVICE') {\n grist.mode = mode\n } else {\n grist.mode = isMobileDevice() ? 'LIST' : 'GRID'\n }\n\n grist.config = this.config\n\n grist.innerHTML = filterable\n ? `\n <div slot=\"headroom\">\n <div style=\"padding: 9px 9px 0px 9px;\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n </div>\n `\n : ''\n }\n\n /*\n * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.\n * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.\n */\n reposition() {\n super.reposition()\n }\n\n /*\n * grist는 부모의 스케일의 역으로 transform해서, scale을 1로 맞춘다.\n */\n rescale() {\n var grist = this.grist\n if (!grist) {\n return\n }\n\n const scale = this.getState('contentScale') || 1\n\n const sx = scale\n const sy = scale\n\n const transform = `scale(${sx}, ${sy})`\n\n ;['-webkit-', '-moz-', '-ms-', '-o-', ''].forEach((prefix: string) => {\n grist!.style.setProperty(prefix + 'transform', transform)\n grist!.style.setProperty(prefix + 'transform-origin', '0px 0px')\n })\n\n const { width, height } = this.state\n grist.style.width = Math.round(width / scale) + 'px'\n grist.style.height = Math.round(height / scale) + 'px'\n }\n\n get config() {\n var { config, appendable, paginatable } = this.state\n\n if (typeof config !== 'object') {\n try {\n const c = new Compartment({\n t: _i18next.t,\n i18next: _i18next\n })\n\n config = c.evaluate(`(${config})`)\n } catch (e) {\n error(e)\n }\n }\n\n if (paginatable) {\n if (config.pagination && !config.pagination.limit && config.pagination.pages && config.pagination.pages.length) {\n config.pagination.limit = config.pagination.pages[0]\n }\n }\n\n config.pagination = {\n ...config.pagination,\n infinite: !paginatable\n }\n\n config.rows = {\n ...config.rows,\n appendable: !!appendable\n }\n\n return config\n }\n\n get tagName() {\n return 'div'\n }\n}\n\nComponent.register('grist', SceneGrist)\n"]}
|
|
1
|
+
{"version":3,"file":"grist.js","sourceRoot":"","sources":["../src/grist.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAA;AACZ,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,SAAS,EAAmB,KAAK,EAAE,kBAAkB,EAAc,MAAM,wBAAwB,CAAA;AAE1G,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGnD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,mBAAmB;wBAC5B,KAAK,EAAE,QAAQ;qBAChB;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,aAAa;YACpB,IAAI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C,OAAO,EAAE,UAAU,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport 'ses'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\n\nimport { Component, ComponentNature, error, HTMLOverlayElement, Properties } from '@hatiolab/things-scene'\nimport { DataGrist, FetchResult } from '@operato/data-grist'\nimport { i18next as _i18next } from '@operato/i18n'\nimport { FetchOption } from '@operato/data-grist/dist/src/types'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'grist-mode',\n name: 'mode',\n property: {\n options: [\n {\n display: 'Grid',\n value: 'GRID'\n },\n {\n display: 'List',\n value: 'LIST'\n },\n {\n display: 'Card',\n value: 'CARD'\n },\n {\n display: 'Depends on device',\n value: 'DEVICE'\n }\n ]\n }\n },\n {\n type: 'textarea',\n label: 'config',\n name: 'config'\n },\n {\n type: 'checkbox',\n label: 'filterable',\n name: 'filterable'\n },\n {\n type: 'checkbox',\n label: 'appendable',\n name: 'appendable'\n },\n {\n type: 'checkbox',\n label: 'paginatable',\n name: 'paginatable'\n },\n {\n type: 'number',\n label: 'content-scale',\n name: 'contentScale',\n property: {\n step: 0.1,\n min: 0.1\n }\n },\n {\n type: 'select',\n label: 'bound-data',\n name: 'boundData',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'Focused Row',\n value: 'focused-row'\n },\n {\n display: 'Selected Rows',\n value: 'selected-rows'\n }\n ]\n }\n }\n ],\n help: 'scene/component/grist'\n}\n\nconst isMobileDevice = () => false\n\nexport default class SceneGrist extends HTMLOverlayElement {\n public beforeFetchFuncs: any = {}\n\n private __value: any = {}\n private _listenTo?: any\n private _listener?: any\n\n public grist?: DataGrist\n\n get nature() {\n return NATURE\n }\n\n ready() {\n super.ready()\n\n if (this.rootModel) {\n this._listenTo = this.rootModel\n this._listener = function (this: SceneGrist, after: Properties) {\n after.scale && this.rescale()\n }.bind(this)\n this.rootModel.on('change', this._listener)\n }\n }\n\n removed() {\n if (this._listenTo) {\n this._listenTo.off('change', this._listener)\n\n delete this._listenTo\n delete this._listener\n }\n }\n\n createElement() {\n super.createElement()\n\n this.grist = document.createElement('ox-grist') as DataGrist\n this.element.appendChild(this.grist)\n\n this.rescale()\n\n const grist = this.grist\n\n this.setGristConfig(grist)\n\n grist.fetchHandler = async ({\n page,\n limit,\n sorters,\n sortings,\n filters,\n inherited,\n options\n }: FetchOption): Promise<FetchResult> => {\n Object.values(this.beforeFetchFuncs).forEach((func: any) =>\n func({ page, limit, sorters, sortings, filters, inherited, options })\n )\n var { total = 0, records = [] } = grist.data || {}\n\n return {\n page,\n limit,\n total,\n records\n }\n }\n\n grist.addEventListener('select-record-change', e => {\n if (this.state.boundData === 'selected-rows') {\n this.data = (e.target as DataGrist)?.selected || []\n }\n })\n\n grist.addEventListener('select-all-change', e => {\n if (this.state.boundData === 'selected-rows') {\n this.data = (e.target as DataGrist)?.selected || []\n }\n })\n\n grist.addEventListener('focus-change', (e: Event) => {\n if (this.state.boundData === 'focused-row') {\n this.data = ((e.target as DataGrist)?.data?.records || [])[(e as CustomEvent).detail.row]\n }\n })\n }\n\n get value() {\n return this.__value\n }\n\n set value(value) {\n this.__value = value\n if (!this.grist || typeof value !== 'object') return\n\n var { page, limit } = this.config.pagination || {}\n\n this.grist.data =\n value instanceof Array\n ? {\n page,\n limit,\n ...this.grist._data,\n total: value.length,\n records: Array.from(value)\n }\n : {\n page,\n limit,\n ...this.grist._data,\n ...value\n }\n }\n\n onchange(after: Properties, before: Properties) {\n super.onchange(after, before)\n\n if (\n 'mode' in after ||\n 'filterable' in after ||\n 'appendable' in after ||\n 'paginatable' in after ||\n 'config' in after\n ) {\n this.setGristConfig(this.grist)\n }\n\n this.rescale()\n }\n\n dispose() {\n super.dispose()\n\n delete this.grist\n }\n\n /*\n * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,\n * 그에 따른 html element의 반영이 필요한 부분을 구현한다.\n *\n * ThingsComponent state => HTML element properties\n */\n setElementProperties(grist: DataGrist) {\n this.rescale()\n }\n\n setGristConfig(grist: DataGrist | undefined) {\n if (!grist) {\n return\n }\n\n var { mode, filterable } = this.state\n\n if (mode != 'DEVICE') {\n grist.mode = mode\n } else {\n grist.mode = isMobileDevice() ? 'LIST' : 'GRID'\n }\n\n grist.config = this.config\n\n grist.innerHTML = filterable\n ? `\n <div slot=\"headroom\">\n <div style=\"padding: 9px 9px 0px 9px;\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n </div>\n `\n : ''\n }\n\n /*\n * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.\n * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.\n */\n reposition() {\n const { fillStyle } = this.state\n\n if (!fillStyle) {\n this.grist?.style.setProperty('--grist-background-color', 'var(--md-sys-color-surface, #f7f6f4)')\n } else {\n this.grist?.style.removeProperty('--grist-background-color')\n }\n\n super.reposition()\n }\n\n /*\n * grist는 부모의 스케일의 역으로 transform해서, scale을 1로 맞춘다.\n */\n rescale() {\n var grist = this.grist\n if (!grist) {\n return\n }\n\n const scale = this.getState('contentScale') || 1\n\n const sx = scale\n const sy = scale\n\n const transform = `scale(${sx}, ${sy})`\n\n ;['-webkit-', '-moz-', '-ms-', '-o-', ''].forEach((prefix: string) => {\n grist!.style.setProperty(prefix + 'transform', transform)\n grist!.style.setProperty(prefix + 'transform-origin', '0px 0px')\n })\n\n const { width, height } = this.state\n grist.style.width = Math.round(width / scale) + 'px'\n grist.style.height = Math.round(height / scale) + 'px'\n }\n\n get config() {\n var { config, appendable, paginatable } = this.state\n\n if (typeof config !== 'object') {\n try {\n const c = new Compartment({\n t: _i18next.t,\n i18next: _i18next\n })\n\n config = c.evaluate(`(${config})`)\n } catch (e) {\n error(e)\n }\n }\n\n if (paginatable) {\n if (config.pagination && !config.pagination.limit && config.pagination.pages && config.pagination.pages.length) {\n config.pagination.limit = config.pagination.pages[0]\n }\n }\n\n config.pagination = {\n ...config.pagination,\n infinite: !paginatable\n }\n\n config.rows = {\n ...config.rows,\n appendable: !!appendable\n }\n\n return config\n }\n\n get tagName() {\n return 'div'\n }\n}\n\nComponent.register('grist', SceneGrist)\n"]}
|
package/dist/templates/grist.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grist.js","sourceRoot":"","sources":["../../src/templates/grist.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEnE,eAAe;IACb,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,OAAO;IACd,gGAAgG;IAChG,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,
|
|
1
|
+
{"version":3,"file":"grist.js","sourceRoot":"","sources":["../../src/templates/grist.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAEnE,eAAe;IACb,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,OAAO;IACpB,KAAK,EAAE,OAAO;IACd,gGAAgG;IAChG,IAAI;IACJ,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;QACP,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFV;KACC;CACF,CAAA","sourcesContent":["const icon = new URL('../../icons/grist.png', import.meta.url).href\n\nexport default {\n type: 'grist',\n description: 'grist',\n group: 'table',\n /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */\n icon,\n model: {\n type: 'grist',\n left: 10,\n top: 10,\n width: 400,\n height: 300,\n mode: 'GRID',\n config: `{\n columns: [\n {\n type: 'gutter',\n gutterName: 'dirty'\n },\n {\n type: 'gutter',\n gutterName: 'sequence'\n },\n {\n type: 'gutter',\n gutterName: 'row-selector',\n multiple: true\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n header: 'name',\n record: {\n editable: true\n },\n sortable: true,\n width: 120\n },\n {\n type: 'string',\n name: 'description',\n header: 'description',\n record: {\n align: 'left',\n editable: true\n },\n width: 200\n },\n {\n type: 'boolean',\n name: 'active',\n header: 'active',\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: 'updated at',\n width: 180\n },\n {\n type: 'datetime',\n name: 'createdAt',\n header: 'created at',\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n handlers: {\n click: 'select-row-toggle'\n }\n },\n sorters: [\n {\n name: 'name',\n desc: true\n }\n ],\n pagination: {\n pages: [20, 30, 50, 100, 200]\n }\n}`\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/scene-grist",
|
|
3
3
|
"description": "Grist UI component for things-scene",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "7.3.
|
|
5
|
+
"version": "7.3.9",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"migration": "things-factory-migration"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hatiolab/things-scene": "^3.
|
|
30
|
+
"@hatiolab/things-scene": "^3.4.0",
|
|
31
31
|
"@operato/data-grist": "^7.0.0",
|
|
32
32
|
"ses": "^1.5.0"
|
|
33
33
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"prettier --write"
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "32b46499c33be406e0fccc602746290a51e0f286"
|
|
64
64
|
}
|
package/schema.graphql
CHANGED
|
@@ -747,7 +747,7 @@ scalar EmailAddress @specifiedBy(url: "https://html.spec.whatwg.org/multipage/in
|
|
|
747
747
|
"""Entity for Employee"""
|
|
748
748
|
type Employee {
|
|
749
749
|
active: Boolean
|
|
750
|
-
address: String
|
|
750
|
+
address: String
|
|
751
751
|
alias: String
|
|
752
752
|
approvalLines: [ApprovalLine!]!
|
|
753
753
|
contact: Contact
|
|
@@ -787,9 +787,10 @@ type EmployeeList {
|
|
|
787
787
|
input EmployeePatch {
|
|
788
788
|
active: Boolean
|
|
789
789
|
alias: String
|
|
790
|
+
contact: ObjectRefForContact
|
|
790
791
|
controlNo: String
|
|
791
792
|
cuFlag: String
|
|
792
|
-
department:
|
|
793
|
+
department: ObjectRefForDepartment
|
|
793
794
|
hiredOn: String
|
|
794
795
|
id: ID
|
|
795
796
|
jobPosition: String
|
|
@@ -1502,7 +1503,9 @@ type Mutation {
|
|
|
1502
1503
|
"""To activate user"""
|
|
1503
1504
|
activateUser(userId: String!): Boolean!
|
|
1504
1505
|
|
|
1505
|
-
"""
|
|
1506
|
+
"""
|
|
1507
|
+
Attaches an existing contact to an employee. The contact is identified by its ID and the employee is identified by their ID.
|
|
1508
|
+
"""
|
|
1506
1509
|
attachContact(contactId: String!, id: String!): Employee!
|
|
1507
1510
|
cancelInvitation(email: EmailAddress!, reference: String!, type: String!): Boolean!
|
|
1508
1511
|
|
|
@@ -1559,7 +1562,9 @@ type Mutation {
|
|
|
1559
1562
|
"""To create domain (Only superuser is granted this privilege.)"""
|
|
1560
1563
|
createDomain(domainInput: DomainPatch!): Domain!
|
|
1561
1564
|
|
|
1562
|
-
"""
|
|
1565
|
+
"""
|
|
1566
|
+
Creates a new employee record with the provided details. Optionally associates the employee with a supervisor, department, and system user. If a photo is provided, it will be attached to the employee record.
|
|
1567
|
+
"""
|
|
1563
1568
|
createEmployee(employee: NewEmployee!): Employee!
|
|
1564
1569
|
|
|
1565
1570
|
"""To create new Entity"""
|
|
@@ -1610,6 +1615,12 @@ type Mutation {
|
|
|
1610
1615
|
"""To create new Oauth2Client"""
|
|
1611
1616
|
createOauth2Client(oauth2Client: NewOauth2Client!): Oauth2Client!
|
|
1612
1617
|
|
|
1618
|
+
"""To create new PDFRelease"""
|
|
1619
|
+
createPDFRelease(pdfRelease: NewPDFRelease!): PDFRelease!
|
|
1620
|
+
|
|
1621
|
+
"""To create new PDFTemplate"""
|
|
1622
|
+
createPDFTemplate(pdfTemplate: NewPDFTemplate!): PDFTemplate!
|
|
1623
|
+
|
|
1613
1624
|
"""To create new PayloadLog"""
|
|
1614
1625
|
createPayloadLog(payloadLog: NewPayloadLog!): PayloadLog!
|
|
1615
1626
|
|
|
@@ -1716,10 +1727,14 @@ type Mutation {
|
|
|
1716
1727
|
"""To delete multiple domains (Only superuser is granted this privilege.)"""
|
|
1717
1728
|
deleteDomains(names: [String!]!): Boolean!
|
|
1718
1729
|
|
|
1719
|
-
"""
|
|
1730
|
+
"""
|
|
1731
|
+
Deletes an employee record identified by the given ID. Also deletes any attachments associated with the employee.
|
|
1732
|
+
"""
|
|
1720
1733
|
deleteEmployee(id: String!): Boolean!
|
|
1721
1734
|
|
|
1722
|
-
"""
|
|
1735
|
+
"""
|
|
1736
|
+
Deletes multiple employee records identified by the given IDs. Also deletes any attachments associated with each employee.
|
|
1737
|
+
"""
|
|
1723
1738
|
deleteEmployees(ids: [String!]!): Boolean!
|
|
1724
1739
|
|
|
1725
1740
|
"""To delete multiple Entities"""
|
|
@@ -1809,6 +1824,18 @@ type Mutation {
|
|
|
1809
1824
|
"""To delete multiple Oauth2Clients"""
|
|
1810
1825
|
deleteOauth2Clients(ids: [String!]!): Boolean!
|
|
1811
1826
|
|
|
1827
|
+
"""To delete PDFRelease"""
|
|
1828
|
+
deletePDFRelease(id: String!): Boolean!
|
|
1829
|
+
|
|
1830
|
+
"""To delete multiple PDFReleases"""
|
|
1831
|
+
deletePDFReleases(ids: [String!]!): Boolean!
|
|
1832
|
+
|
|
1833
|
+
"""To delete PDFTemplate"""
|
|
1834
|
+
deletePDFTemplate(id: String!): Boolean!
|
|
1835
|
+
|
|
1836
|
+
"""To delete multiple PDFTemplates"""
|
|
1837
|
+
deletePDFTemplates(ids: [String!]!): Boolean!
|
|
1838
|
+
|
|
1812
1839
|
"""To delete PagePreference"""
|
|
1813
1840
|
deletePagePreference(id: String!): Boolean!
|
|
1814
1841
|
|
|
@@ -1887,7 +1914,9 @@ type Mutation {
|
|
|
1887
1914
|
"""To delete some users"""
|
|
1888
1915
|
deleteUsers(emails: [String!]!): Boolean!
|
|
1889
1916
|
|
|
1890
|
-
"""
|
|
1917
|
+
"""
|
|
1918
|
+
Detaches an existing contact from an employee. The employee is identified by their ID.
|
|
1919
|
+
"""
|
|
1891
1920
|
detachContact(id: String!): Employee!
|
|
1892
1921
|
|
|
1893
1922
|
"""To disconnect a connection"""
|
|
@@ -1929,7 +1958,9 @@ type Mutation {
|
|
|
1929
1958
|
"""To import multiple Departments"""
|
|
1930
1959
|
importDepartments(departments: [DepartmentPatch!]!): Boolean!
|
|
1931
1960
|
|
|
1932
|
-
"""
|
|
1961
|
+
"""
|
|
1962
|
+
Imports multiple employee records into the system. Each employee record must be provided in the EmployeePatch format.
|
|
1963
|
+
"""
|
|
1933
1964
|
importEmployees(employees: [EmployeePatch!]!): Boolean!
|
|
1934
1965
|
|
|
1935
1966
|
"""To import multiple MenuButtons"""
|
|
@@ -1956,6 +1987,12 @@ type Mutation {
|
|
|
1956
1987
|
"""To import multiple Oauth2Clients"""
|
|
1957
1988
|
importOauth2Clients(oauth2Clients: [Oauth2ClientPatch!]!): Boolean!
|
|
1958
1989
|
|
|
1990
|
+
"""To import multiple PDFReleases"""
|
|
1991
|
+
importPDFReleases(pdfReleases: [PDFReleasePatch!]!): Boolean!
|
|
1992
|
+
|
|
1993
|
+
"""To import multiple PDFTemplates"""
|
|
1994
|
+
importPDFTemplates(pdfTemplates: [PDFTemplatePatch!]!): Boolean!
|
|
1995
|
+
|
|
1959
1996
|
"""To import multiple scenarios"""
|
|
1960
1997
|
importScenarios(scenarios: [ScenarioPatch!]!): Boolean!
|
|
1961
1998
|
|
|
@@ -2003,6 +2040,14 @@ type Mutation {
|
|
|
2003
2040
|
visibility: String!
|
|
2004
2041
|
): BoardTemplate!
|
|
2005
2042
|
|
|
2043
|
+
"""
|
|
2044
|
+
Registers an existing employee as a system user, granting them access to the system. The employee is identified by their ID.
|
|
2045
|
+
"""
|
|
2046
|
+
registerEmployeeAsSystemUser(
|
|
2047
|
+
"""Employee Id"""
|
|
2048
|
+
employeeId: String!
|
|
2049
|
+
): Boolean!
|
|
2050
|
+
|
|
2006
2051
|
"""To release a Board"""
|
|
2007
2052
|
releaseBoard(id: String!): Board!
|
|
2008
2053
|
renewApplicationAccessToken(id: String!, scope: String!): AccessToken!
|
|
@@ -2092,7 +2137,9 @@ type Mutation {
|
|
|
2092
2137
|
"""To update multiple domains (Only superuser is granted this privilege.)"""
|
|
2093
2138
|
updateDomains(patches: [DomainPatch!]!): Boolean!
|
|
2094
2139
|
|
|
2095
|
-
"""
|
|
2140
|
+
"""
|
|
2141
|
+
Updates the details of an existing employee identified by the given ID. Optionally updates the supervisor, department, system user, and photo associated with the employee.
|
|
2142
|
+
"""
|
|
2096
2143
|
updateEmployee(id: String!, patch: EmployeePatch!): Employee!
|
|
2097
2144
|
|
|
2098
2145
|
"""To modify Entity' information"""
|
|
@@ -2147,7 +2194,9 @@ type Mutation {
|
|
|
2147
2194
|
"""To modify multiple Departments' information"""
|
|
2148
2195
|
updateMultipleDepartment(patches: [DepartmentPatch!]!): [Department!]!
|
|
2149
2196
|
|
|
2150
|
-
"""
|
|
2197
|
+
"""
|
|
2198
|
+
Updates or creates multiple employee records based on the provided patches. New employees are created if the "cuFlag" is "+", and existing employees are updated if the "cuFlag" is "M".
|
|
2199
|
+
"""
|
|
2151
2200
|
updateMultipleEmployee(patches: [EmployeePatch!]!): [Employee!]!
|
|
2152
2201
|
|
|
2153
2202
|
"""To modify multiple Entitys' information"""
|
|
@@ -2168,6 +2217,12 @@ type Mutation {
|
|
|
2168
2217
|
"""To modify multiple NotificationRules' information"""
|
|
2169
2218
|
updateMultipleNotificationRule(patches: [NotificationRulePatch!]!): [NotificationRule!]!
|
|
2170
2219
|
|
|
2220
|
+
"""To modify multiple PDFReleases' information"""
|
|
2221
|
+
updateMultiplePDFRelease(patches: [PDFReleasePatch!]!): [PDFRelease!]!
|
|
2222
|
+
|
|
2223
|
+
"""To modify multiple PDFTemplates' information"""
|
|
2224
|
+
updateMultiplePDFTemplate(patches: [PDFTemplatePatch!]!): [PDFTemplate!]!
|
|
2225
|
+
|
|
2171
2226
|
"""To modify multiple PartnerSettings' information"""
|
|
2172
2227
|
updateMultiplePartnerSetting(patches: [PartnerSettingPatch!]!): [PartnerSetting!]!
|
|
2173
2228
|
|
|
@@ -2216,6 +2271,12 @@ type Mutation {
|
|
|
2216
2271
|
"""To modify Oauth2Client information"""
|
|
2217
2272
|
updateOauth2Client(id: String!, patch: Oauth2ClientPatch!): Oauth2Client!
|
|
2218
2273
|
|
|
2274
|
+
"""To modify PDFRelease information"""
|
|
2275
|
+
updatePDFRelease(id: String!, patch: PDFReleasePatch!): PDFRelease!
|
|
2276
|
+
|
|
2277
|
+
"""To modify PDFTemplate information"""
|
|
2278
|
+
updatePDFTemplate(id: String!, patch: PDFTemplatePatch!): PDFTemplate!
|
|
2279
|
+
|
|
2219
2280
|
"""To modify PayloadLog information"""
|
|
2220
2281
|
updatePayloadLog(id: String!, patch: PayloadLogPatch!): PayloadLog!
|
|
2221
2282
|
|
|
@@ -2386,8 +2447,9 @@ input NewDepartment {
|
|
|
2386
2447
|
input NewEmployee {
|
|
2387
2448
|
active: Boolean
|
|
2388
2449
|
alias: String
|
|
2450
|
+
contact: ObjectRefForContact
|
|
2389
2451
|
controlNo: String!
|
|
2390
|
-
department:
|
|
2452
|
+
department: ObjectRefForDepartment
|
|
2391
2453
|
extension: String
|
|
2392
2454
|
hiredOn: String
|
|
2393
2455
|
jobPosition: String
|
|
@@ -2663,6 +2725,28 @@ input NewOauth2Client {
|
|
|
2663
2725
|
webhook: String
|
|
2664
2726
|
}
|
|
2665
2727
|
|
|
2728
|
+
input NewPDFRelease {
|
|
2729
|
+
active: Boolean
|
|
2730
|
+
description: String
|
|
2731
|
+
name: String!
|
|
2732
|
+
params: String
|
|
2733
|
+
state: PDFReleaseStatus
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
input NewPDFTemplate {
|
|
2737
|
+
active: Boolean
|
|
2738
|
+
content_template: String
|
|
2739
|
+
cover_template: String
|
|
2740
|
+
description: String
|
|
2741
|
+
footer_template: String
|
|
2742
|
+
header_template: String
|
|
2743
|
+
last_template: String
|
|
2744
|
+
name: String!
|
|
2745
|
+
page_size: String = "A4"
|
|
2746
|
+
state: PDFTemplateStatus
|
|
2747
|
+
watermark: String
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2666
2750
|
input NewPagePreference {
|
|
2667
2751
|
element: String
|
|
2668
2752
|
page: String
|
|
@@ -2968,6 +3052,34 @@ input ObjectRefApprovalLineOwnerType {
|
|
|
2968
3052
|
name: String
|
|
2969
3053
|
}
|
|
2970
3054
|
|
|
3055
|
+
input ObjectRefForContact {
|
|
3056
|
+
address: String
|
|
3057
|
+
|
|
3058
|
+
"""Field description"""
|
|
3059
|
+
description: String
|
|
3060
|
+
email: EmailAddress
|
|
3061
|
+
|
|
3062
|
+
"""Field id"""
|
|
3063
|
+
id: ID!
|
|
3064
|
+
|
|
3065
|
+
"""Field name"""
|
|
3066
|
+
name: String
|
|
3067
|
+
phone: String
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
input ObjectRefForDepartment {
|
|
3071
|
+
controlNo: String
|
|
3072
|
+
|
|
3073
|
+
"""Field description"""
|
|
3074
|
+
description: String
|
|
3075
|
+
|
|
3076
|
+
"""Field id"""
|
|
3077
|
+
id: ID!
|
|
3078
|
+
|
|
3079
|
+
"""Field name"""
|
|
3080
|
+
name: String
|
|
3081
|
+
}
|
|
3082
|
+
|
|
2971
3083
|
input ObjectRefForEmployee {
|
|
2972
3084
|
active: Boolean
|
|
2973
3085
|
alias: String
|
|
@@ -3024,6 +3136,92 @@ enum OrgMemberTargetType {
|
|
|
3024
3136
|
Role
|
|
3025
3137
|
}
|
|
3026
3138
|
|
|
3139
|
+
"""Entity for PDFRelease"""
|
|
3140
|
+
type PDFRelease {
|
|
3141
|
+
active: Boolean
|
|
3142
|
+
createdAt: DateTimeISO
|
|
3143
|
+
creator: User
|
|
3144
|
+
deletedAt: DateTimeISO
|
|
3145
|
+
description: String
|
|
3146
|
+
domain: Domain
|
|
3147
|
+
filePath: String
|
|
3148
|
+
fileUrl: String
|
|
3149
|
+
id: ID!
|
|
3150
|
+
name: String
|
|
3151
|
+
state: String
|
|
3152
|
+
template: PDFTemplate!
|
|
3153
|
+
templateId: String!
|
|
3154
|
+
updatedAt: DateTimeISO
|
|
3155
|
+
updater: User
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
type PDFReleaseList {
|
|
3159
|
+
items: [PDFRelease!]!
|
|
3160
|
+
total: Int!
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
input PDFReleasePatch {
|
|
3164
|
+
active: Boolean
|
|
3165
|
+
cuFlag: String
|
|
3166
|
+
description: String
|
|
3167
|
+
id: ID
|
|
3168
|
+
name: String
|
|
3169
|
+
state: PDFReleaseStatus
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
"""state enumeration of a PDFRelease"""
|
|
3173
|
+
enum PDFReleaseStatus {
|
|
3174
|
+
failed
|
|
3175
|
+
published
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
"""Entity for PDFTemplate"""
|
|
3179
|
+
type PDFTemplate {
|
|
3180
|
+
active: Boolean
|
|
3181
|
+
content_template: String
|
|
3182
|
+
cover_template: String
|
|
3183
|
+
createdAt: DateTimeISO
|
|
3184
|
+
creator: User
|
|
3185
|
+
description: String
|
|
3186
|
+
domain: Domain
|
|
3187
|
+
footer_template: String
|
|
3188
|
+
header_template: String
|
|
3189
|
+
id: ID!
|
|
3190
|
+
last_template: String
|
|
3191
|
+
name: String
|
|
3192
|
+
page_size: String
|
|
3193
|
+
state: String
|
|
3194
|
+
updatedAt: DateTimeISO
|
|
3195
|
+
updater: User
|
|
3196
|
+
watermark: String
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
type PDFTemplateList {
|
|
3200
|
+
items: [PDFTemplate!]!
|
|
3201
|
+
total: Int!
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
input PDFTemplatePatch {
|
|
3205
|
+
active: Boolean
|
|
3206
|
+
content_template: String
|
|
3207
|
+
cover_template: String
|
|
3208
|
+
cuFlag: String
|
|
3209
|
+
description: String
|
|
3210
|
+
footer_template: String
|
|
3211
|
+
header_template: String
|
|
3212
|
+
id: ID
|
|
3213
|
+
last_template: String
|
|
3214
|
+
name: String
|
|
3215
|
+
page_size: String = "A4"
|
|
3216
|
+
state: PDFTemplateStatus
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
"""state enumeration of a PDF Template"""
|
|
3220
|
+
enum PDFTemplateStatus {
|
|
3221
|
+
draft
|
|
3222
|
+
released
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3027
3225
|
"""Entity for PagePreference"""
|
|
3028
3226
|
type PagePreference {
|
|
3029
3227
|
createdAt: DateTimeISO
|
|
@@ -3094,6 +3292,18 @@ input PartnerSettingPatch {
|
|
|
3094
3292
|
value: String
|
|
3095
3293
|
}
|
|
3096
3294
|
|
|
3295
|
+
type PasswordRule {
|
|
3296
|
+
allowRepeat: Boolean
|
|
3297
|
+
digit: Boolean
|
|
3298
|
+
looseCharacterLength: Float
|
|
3299
|
+
lowerCase: Boolean
|
|
3300
|
+
specialCharacter: Boolean
|
|
3301
|
+
tightCharacterLength: Float
|
|
3302
|
+
upperCase: Boolean
|
|
3303
|
+
useLoosePattern: Boolean
|
|
3304
|
+
useTightPattern: Boolean
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3097
3307
|
"""Entity for PayloadLog"""
|
|
3098
3308
|
type PayloadLog {
|
|
3099
3309
|
createdAt: DateTimeISO
|
|
@@ -3270,6 +3480,12 @@ type PropertySpec {
|
|
|
3270
3480
|
|
|
3271
3481
|
type Query {
|
|
3272
3482
|
APIDocCompletion(input: APIDocCompletionInput!): APIDocCompletionOutput!
|
|
3483
|
+
|
|
3484
|
+
"""To fetch a PDFTemplate"""
|
|
3485
|
+
PDFTemplate(id: String!): PDFTemplate
|
|
3486
|
+
|
|
3487
|
+
"""To fetch multiple PDFTemplates"""
|
|
3488
|
+
PDFTemplates(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): PDFTemplateList!
|
|
3273
3489
|
appBinding(id: String!): AppBinding!
|
|
3274
3490
|
appBindings(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): AppBindingList!
|
|
3275
3491
|
|
|
@@ -3342,19 +3558,25 @@ type Query {
|
|
|
3342
3558
|
boardsCreatedByMe(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): BoardList!
|
|
3343
3559
|
chatCompletion(input: ChatCompletionInput!): ChatCompletionOutput!
|
|
3344
3560
|
|
|
3345
|
-
"""
|
|
3561
|
+
"""
|
|
3562
|
+
Checks if the system is configured to provide a default password for new users.
|
|
3563
|
+
"""
|
|
3346
3564
|
checkDefaultPassword: Boolean!
|
|
3347
3565
|
|
|
3348
|
-
"""
|
|
3566
|
+
"""
|
|
3567
|
+
Determines whether the system provides a default password when creating a new user.
|
|
3568
|
+
"""
|
|
3349
3569
|
checkResettablePasswordToDefault: Boolean!
|
|
3350
3570
|
|
|
3351
3571
|
"""To fetch the preset of role for new user"""
|
|
3352
3572
|
checkRolePreset: [Role!]!
|
|
3353
3573
|
|
|
3354
|
-
"""
|
|
3574
|
+
"""
|
|
3575
|
+
Checks if the current authenticated user belongs to the current domain.
|
|
3576
|
+
"""
|
|
3355
3577
|
checkUserBelongsDomain: Boolean!
|
|
3356
3578
|
|
|
3357
|
-
"""
|
|
3579
|
+
"""Checks if a user with the given email address exists in the system."""
|
|
3358
3580
|
checkUserExistence(email: EmailAddress!): Boolean!
|
|
3359
3581
|
|
|
3360
3582
|
"""To fetch common approval lines"""
|
|
@@ -3414,10 +3636,14 @@ type Query {
|
|
|
3414
3636
|
"""To fetch multiple appliance"""
|
|
3415
3637
|
edges(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): ApplianceList!
|
|
3416
3638
|
|
|
3417
|
-
"""
|
|
3639
|
+
"""
|
|
3640
|
+
Fetches a specific employee by their unique ID. Returns the employee object if found, or null if not found.
|
|
3641
|
+
"""
|
|
3418
3642
|
employee(id: String!): Employee
|
|
3419
3643
|
|
|
3420
|
-
"""
|
|
3644
|
+
"""
|
|
3645
|
+
Fetches a list of employees based on provided query parameters. Supports searching by name, control number, and alias.
|
|
3646
|
+
"""
|
|
3421
3647
|
employees(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): EmployeeList!
|
|
3422
3648
|
|
|
3423
3649
|
"""To fetch multiple Entities"""
|
|
@@ -3575,12 +3801,23 @@ type Query {
|
|
|
3575
3801
|
partnerSettings(filters: [Filter!]!, pagination: Pagination!, partnerDomain: ObjectRef!, sortings: [Sorting!]!): PartnerSettingList!
|
|
3576
3802
|
partners(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): PartnerList!
|
|
3577
3803
|
|
|
3804
|
+
"""
|
|
3805
|
+
Retrieves the current password rule configuration for the system, such as required character types and minimum length.
|
|
3806
|
+
"""
|
|
3807
|
+
passwordRule: PasswordRule!
|
|
3808
|
+
|
|
3578
3809
|
"""To fetch a PayloadLog"""
|
|
3579
3810
|
payloadLog(id: String!): PayloadLog!
|
|
3580
3811
|
|
|
3581
3812
|
"""To fetch multiple PayloadLogs"""
|
|
3582
3813
|
payloadLogs(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): PayloadLogList!
|
|
3583
3814
|
|
|
3815
|
+
"""To fetch a PDFRelease"""
|
|
3816
|
+
pdfRelease(id: String!): PDFRelease
|
|
3817
|
+
|
|
3818
|
+
"""To fetch multiple PDFReleases"""
|
|
3819
|
+
pdfReleases(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): PDFReleaseList!
|
|
3820
|
+
|
|
3584
3821
|
"""To fetch a PlayGroup"""
|
|
3585
3822
|
playGroup(id: String!): PlayGroup
|
|
3586
3823
|
|
|
@@ -3672,7 +3909,7 @@ type Query {
|
|
|
3672
3909
|
"""To fetch multiple Themes"""
|
|
3673
3910
|
themes(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): ThemeList!
|
|
3674
3911
|
|
|
3675
|
-
"""
|
|
3912
|
+
"""Fetches a user by their email address within the current domain."""
|
|
3676
3913
|
user(email: EmailAddress!): User!
|
|
3677
3914
|
|
|
3678
3915
|
"""To fetch Menus by role"""
|
|
@@ -3681,7 +3918,9 @@ type Query {
|
|
|
3681
3918
|
"""To fetch roles of a user"""
|
|
3682
3919
|
userRoles(userId: String!): [UserRole!]!
|
|
3683
3920
|
|
|
3684
|
-
"""
|
|
3921
|
+
"""
|
|
3922
|
+
Fetches a list of users based on provided search parameters within the current domain.
|
|
3923
|
+
"""
|
|
3685
3924
|
users(filters: [Filter!], inherited: InheritedValueType, pagination: Pagination, sortings: [Sorting!]): UserList!
|
|
3686
3925
|
vendors: [Domain!]!
|
|
3687
3926
|
}
|
package/src/grist.ts
CHANGED
|
@@ -274,6 +274,14 @@ export default class SceneGrist extends HTMLOverlayElement {
|
|
|
274
274
|
* 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
|
|
275
275
|
*/
|
|
276
276
|
reposition() {
|
|
277
|
+
const { fillStyle } = this.state
|
|
278
|
+
|
|
279
|
+
if (!fillStyle) {
|
|
280
|
+
this.grist?.style.setProperty('--grist-background-color', 'var(--md-sys-color-surface, #f7f6f4)')
|
|
281
|
+
} else {
|
|
282
|
+
this.grist?.style.removeProperty('--grist-background-color')
|
|
283
|
+
}
|
|
284
|
+
|
|
277
285
|
super.reposition()
|
|
278
286
|
}
|
|
279
287
|
|