@things-factory/auth-ui 9.0.20 → 9.0.25
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/dist-client/pages/attribute/attribute-set-item-list.js +1 -1
- package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
- package/dist-client/pages/env-var/env-var-list-page.d.ts +52 -0
- package/dist-client/pages/env-var/env-var-list-page.js +271 -0
- package/dist-client/pages/env-var/env-var-list-page.js.map +1 -0
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/things-factory.config.js +1 -0
- package/translations/en.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -127,7 +127,7 @@ let AttributeSetItemList = class AttributeSetItemList extends localize(i18next)(
|
|
|
127
127
|
name: 'type',
|
|
128
128
|
header: i18next.t('field.type'),
|
|
129
129
|
record: {
|
|
130
|
-
options: ['', 'number', 'text', 'select', 'boolean', 'date', 'datetime', 'file'],
|
|
130
|
+
options: ['', 'number', 'text', 'select', 'boolean', 'date', 'datetime', 'file', 'secret'],
|
|
131
131
|
editable: true
|
|
132
132
|
},
|
|
133
133
|
width: 120
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribute-set-item-list.js","sourceRoot":"","sources":["../../../client/pages/attribute/attribute-set-item-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MA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AM;QACR,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC;;AA5N2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAe;AAEjC;IAAR,KAAK,EAAE;;yDAAiB;AAkBE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;mDAAA;AArBxC,oBAAoB;IADzB,aAAa,CAAC,yBAAyB,CAAC;GACnC,oBAAoB,CA8NzB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport gql from 'graphql-tag'\n\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 { isMobileDevice } from '@operato/utils'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { CommonHeaderStyles } from '@operato/styles'\n\n@customElement('attribute-set-item-list')\nclass AttributeSetItemList extends localize(i18next)(LitElement) {\n @property({ type: Object }) attribute: any\n\n @state() gristConfig: any\n\n static styles = [\n CommonHeaderStyles,\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 @query('ox-grist') private grist!: DataGrist\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button danger @click=${this.deleteAttributeSetItems.bind(this)}>\n <md-icon>delete_forever</md-icon>${i18next.t('button.delete')}\n </button>\n <button @click=${this.updateAttributeSetItems.bind(this)} done>\n <md-icon>save</md-icon>${i18next.t('button.save')}\n </button>\n </div>\n `\n }\n\n async firstUpdated() {\n this.gristConfig = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'varname',\n name: 'tag',\n header: i18next.t('field.tag'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'checkbox',\n name: 'hidden',\n label: true,\n header: i18next.t('field.hidden'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n options: ['', 'number', 'text', 'select', 'boolean', 'date', 'datetime', 'file'],\n editable: true\n },\n width: 120\n },\n {\n type: 'parameters',\n name: 'options',\n header: i18next.t('field.options'),\n record: {\n editable: true,\n renderer: 'json5',\n options: async (value, column, record, row, field) => {\n return {\n name: record.type,\n help: '',\n spec:\n record.type === 'select'\n ? [\n {\n type: 'options' /* property-editor type */,\n name: 'options',\n label: 'options'\n }\n ]\n : [],\n context: this.grist,\n objectified: true\n }\n }\n },\n width: 120\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n pagination: {\n infinite: true\n },\n sorters: []\n }\n }\n\n async fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {\n const attributes = this.attribute.items || []\n\n return {\n total: attributes.length,\n records: attributes\n }\n }\n\n private async updateAttributeSetItems() {\n this.grist.commit()\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $patch: AttributeSetPatch!) {\n updateAttributeSet(id: $id, patch: $patch) {\n entity\n }\n }\n `,\n variables: {\n id: this.attribute.id,\n patch: {\n items: this.grist.data.records,\n cuFlag: 'M'\n }\n }\n })\n\n if (!response.errors) {\n await document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.info_x_successfully', {\n x: i18next.t('button.save')\n })\n }\n })\n )\n }\n }\n\n private async deleteAttributeSetItems() {\n if (!confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }))) {\n return\n }\n\n this.grist.deleteSelectedRecords(false)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"attribute-set-item-list.js","sourceRoot":"","sources":["../../../client/pages/attribute/attribute-set-item-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,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,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGpD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;aAKvD,WAAM,GAAG;QACd,kBAAkB;QAClB,GAAG,CAAA;;;;;;;;;;;KAWF;KACF,AAdY,CAcZ;IAID,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAA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AAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;;;OAMZ;YACD,SAAS,EAAE;gBACT,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE;gBACrB,KAAK,EAAE;oBACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;oBAC9B,MAAM,EAAE,GAAG;iBACZ;aACF;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,QAAQ,CAAC,aAAa,CAC1B,IAAI,WAAW,CAAC,QAAQ,EAAE;gBACxB,MAAM,EAAE;oBACN,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,0BAA0B,EAAE;wBAC7C,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;qBAC5B,CAAC;iBACH;aACF,CAAC,CACH,CAAA;QACH,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,uBAAuB;QACnC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YAC3E,OAAM;QACR,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;IACzC,CAAC;;AA5N2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAe;AAEjC;IAAR,KAAK,EAAE;;yDAAiB;AAkBE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;mDAAA;AArBxC,oBAAoB;IADzB,aAAa,CAAC,yBAAyB,CAAC;GACnC,oBAAoB,CA8NzB","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport gql from 'graphql-tag'\n\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 { isMobileDevice } from '@operato/utils'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { CommonHeaderStyles } from '@operato/styles'\n\n@customElement('attribute-set-item-list')\nclass AttributeSetItemList extends localize(i18next)(LitElement) {\n @property({ type: Object }) attribute: any\n\n @state() gristConfig: any\n\n static styles = [\n CommonHeaderStyles,\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 @query('ox-grist') private grist!: DataGrist\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button danger @click=${this.deleteAttributeSetItems.bind(this)}>\n <md-icon>delete_forever</md-icon>${i18next.t('button.delete')}\n </button>\n <button @click=${this.updateAttributeSetItems.bind(this)} done>\n <md-icon>save</md-icon>${i18next.t('button.save')}\n </button>\n </div>\n `\n }\n\n async firstUpdated() {\n this.gristConfig = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'varname',\n name: 'tag',\n header: i18next.t('field.tag'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'checkbox',\n name: 'hidden',\n label: true,\n header: i18next.t('field.hidden'),\n record: {\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n options: ['', 'number', 'text', 'select', 'boolean', 'date', 'datetime', 'file', 'secret'],\n editable: true\n },\n width: 120\n },\n {\n type: 'parameters',\n name: 'options',\n header: i18next.t('field.options'),\n record: {\n editable: true,\n renderer: 'json5',\n options: async (value, column, record, row, field) => {\n return {\n name: record.type,\n help: '',\n spec:\n record.type === 'select'\n ? [\n {\n type: 'options' /* property-editor type */,\n name: 'options',\n label: 'options'\n }\n ]\n : [],\n context: this.grist,\n objectified: true\n }\n }\n },\n width: 120\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n pagination: {\n infinite: true\n },\n sorters: []\n }\n }\n\n async fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {\n const attributes = this.attribute.items || []\n\n return {\n total: attributes.length,\n records: attributes\n }\n }\n\n private async updateAttributeSetItems() {\n this.grist.commit()\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $patch: AttributeSetPatch!) {\n updateAttributeSet(id: $id, patch: $patch) {\n entity\n }\n }\n `,\n variables: {\n id: this.attribute.id,\n patch: {\n items: this.grist.data.records,\n cuFlag: 'M'\n }\n }\n })\n\n if (!response.errors) {\n await document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.info_x_successfully', {\n x: i18next.t('button.save')\n })\n }\n })\n )\n }\n }\n\n private async deleteAttributeSetItems() {\n if (!confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }))) {\n return\n }\n\n this.grist.deleteSelectedRecords(false)\n }\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@operato/data-grist/ox-grist.js';
|
|
3
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
4
|
+
import '@operato/context/ox-context-page-toolbar.js';
|
|
5
|
+
import { PageView } from '@operato/shell';
|
|
6
|
+
import { FetchOption } from '@operato/data-grist';
|
|
7
|
+
declare const EnvVarListPage_base: (new (...args: any[]) => {
|
|
8
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
stateChanged(_state: unknown): void;
|
|
12
|
+
readonly isConnected: boolean;
|
|
13
|
+
}) & (new (...args: any[]) => {
|
|
14
|
+
__preferenceProviders: {
|
|
15
|
+
[element: string]: import("@operato/p13n").PagePreferenceProvider;
|
|
16
|
+
};
|
|
17
|
+
getPagePreferenceProvider(element: string): import("@operato/p13n").PagePreferenceProvider | undefined;
|
|
18
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
19
|
+
export declare class EnvVarListPage extends EnvVarListPage_base {
|
|
20
|
+
static styles: import("lit").CSSResult[];
|
|
21
|
+
active: boolean;
|
|
22
|
+
config: any;
|
|
23
|
+
mode: 'CARD' | 'LIST' | 'GRID';
|
|
24
|
+
private grist;
|
|
25
|
+
get context(): {
|
|
26
|
+
title: string;
|
|
27
|
+
search: {
|
|
28
|
+
handler: (search: string) => void;
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
filter: {
|
|
32
|
+
handler: () => void;
|
|
33
|
+
};
|
|
34
|
+
actions: {
|
|
35
|
+
title: string;
|
|
36
|
+
action: () => Promise<void>;
|
|
37
|
+
icon: string;
|
|
38
|
+
}[];
|
|
39
|
+
toolbar: boolean;
|
|
40
|
+
};
|
|
41
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
42
|
+
pageInitialized(): Promise<void>;
|
|
43
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
44
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
45
|
+
total: any;
|
|
46
|
+
records: any;
|
|
47
|
+
}>;
|
|
48
|
+
onUpdateEnvVars(): Promise<void>;
|
|
49
|
+
onDeleteEnvVars(): Promise<void>;
|
|
50
|
+
showToast(message: any): void;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@operato/data-grist/ox-grist.js';
|
|
4
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
5
|
+
import '@operato/context/ox-context-page-toolbar.js';
|
|
6
|
+
import gql from 'graphql-tag';
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
9
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
|
10
|
+
import { DataGrist } from '@operato/data-grist/ox-grist.js';
|
|
11
|
+
import { client } from '@operato/graphql';
|
|
12
|
+
import { i18next, localize } from '@operato/i18n';
|
|
13
|
+
import { notify } from '@operato/layout';
|
|
14
|
+
import { PageView, store } from '@operato/shell';
|
|
15
|
+
import { CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
16
|
+
import { isMobileDevice } from '@operato/utils';
|
|
17
|
+
import { p13n } from '@operato/p13n';
|
|
18
|
+
import { OxPrompt } from '@operato/popup';
|
|
19
|
+
let EnvVarListPage = class EnvVarListPage extends connect(store)(p13n(localize(i18next)(PageView))) {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.active = false;
|
|
23
|
+
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
24
|
+
}
|
|
25
|
+
static { this.styles = [
|
|
26
|
+
CommonGristStyles,
|
|
27
|
+
CommonHeaderStyles,
|
|
28
|
+
ScrollbarStyles,
|
|
29
|
+
css `
|
|
30
|
+
:host {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ox-grist {
|
|
38
|
+
overflow-y: auto;
|
|
39
|
+
flex: 1;
|
|
40
|
+
}
|
|
41
|
+
`
|
|
42
|
+
]; }
|
|
43
|
+
get context() {
|
|
44
|
+
return {
|
|
45
|
+
title: i18next.t('text.env-var-list-page'),
|
|
46
|
+
search: {
|
|
47
|
+
handler: (search) => {
|
|
48
|
+
this.grist.searchText = search;
|
|
49
|
+
},
|
|
50
|
+
value: this.grist?.searchText || ''
|
|
51
|
+
},
|
|
52
|
+
filter: {
|
|
53
|
+
handler: () => {
|
|
54
|
+
this.grist.toggleHeadroom();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
actions: [
|
|
58
|
+
{
|
|
59
|
+
title: i18next.t('button.save'),
|
|
60
|
+
action: this.onUpdateEnvVars.bind(this),
|
|
61
|
+
icon: 'save'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: i18next.t('button.delete'),
|
|
65
|
+
action: this.onDeleteEnvVars.bind(this),
|
|
66
|
+
icon: 'delete'
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
toolbar: false
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return html `
|
|
74
|
+
<ox-grist
|
|
75
|
+
.mode=${this.mode}
|
|
76
|
+
.config=${this.config}
|
|
77
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
78
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
|
79
|
+
>
|
|
80
|
+
<div slot="headroom" class="header">
|
|
81
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
|
85
|
+
</ox-grist>
|
|
86
|
+
`;
|
|
87
|
+
}
|
|
88
|
+
async pageInitialized() {
|
|
89
|
+
this.config = {
|
|
90
|
+
columns: [
|
|
91
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
92
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
93
|
+
{
|
|
94
|
+
type: 'string',
|
|
95
|
+
name: 'name',
|
|
96
|
+
header: i18next.t('field.name'),
|
|
97
|
+
record: {
|
|
98
|
+
editable: true
|
|
99
|
+
},
|
|
100
|
+
filter: 'search',
|
|
101
|
+
sortable: true,
|
|
102
|
+
width: 320
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'string',
|
|
106
|
+
name: 'description',
|
|
107
|
+
header: i18next.t('field.description'),
|
|
108
|
+
record: {
|
|
109
|
+
editable: true
|
|
110
|
+
},
|
|
111
|
+
filter: 'search',
|
|
112
|
+
width: 460
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'checkbox',
|
|
116
|
+
name: 'active',
|
|
117
|
+
label: true,
|
|
118
|
+
header: i18next.t('field.active'),
|
|
119
|
+
record: {
|
|
120
|
+
editable: true
|
|
121
|
+
},
|
|
122
|
+
filter: true,
|
|
123
|
+
sortable: true,
|
|
124
|
+
width: 60
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'string',
|
|
128
|
+
name: 'value',
|
|
129
|
+
header: i18next.t('field.value'),
|
|
130
|
+
record: {
|
|
131
|
+
editable: true
|
|
132
|
+
},
|
|
133
|
+
width: 640
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'datetime',
|
|
137
|
+
name: 'updatedAt',
|
|
138
|
+
header: i18next.t('field.updated_at'),
|
|
139
|
+
width: 180
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
rows: {
|
|
143
|
+
appendable: true,
|
|
144
|
+
selectable: {
|
|
145
|
+
multiple: true
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
sorters: [
|
|
149
|
+
{
|
|
150
|
+
name: 'name'
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async pageUpdated(changes, lifecycle) {
|
|
156
|
+
if (this.active) {
|
|
157
|
+
await this.updateComplete;
|
|
158
|
+
this.grist.fetch();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
162
|
+
const response = await client.query({
|
|
163
|
+
query: gql `
|
|
164
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
165
|
+
envVars(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
166
|
+
items {
|
|
167
|
+
id
|
|
168
|
+
name
|
|
169
|
+
description
|
|
170
|
+
value
|
|
171
|
+
active
|
|
172
|
+
updatedAt
|
|
173
|
+
}
|
|
174
|
+
total
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`,
|
|
178
|
+
variables: {
|
|
179
|
+
filters,
|
|
180
|
+
pagination: { page, limit },
|
|
181
|
+
sortings
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
return {
|
|
185
|
+
total: response.data.envVars.total || 0,
|
|
186
|
+
records: response.data.envVars.items || []
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
async onUpdateEnvVars() {
|
|
190
|
+
let patches = this.grist.dirtyRecords;
|
|
191
|
+
if (patches && patches.length) {
|
|
192
|
+
patches = patches.map(patch => {
|
|
193
|
+
let patchField = patch.id ? { id: patch.id } : {};
|
|
194
|
+
const dirtyFields = patch.__dirtyfields__;
|
|
195
|
+
for (let key in dirtyFields) {
|
|
196
|
+
patchField[key] = dirtyFields[key].after;
|
|
197
|
+
}
|
|
198
|
+
patchField.cuFlag = patch.__dirty__;
|
|
199
|
+
return {
|
|
200
|
+
...patchField
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
const response = await client.mutate({
|
|
204
|
+
mutation: gql `
|
|
205
|
+
mutation updateMultipleEnvVars($patches: [EnvVarPatch!]!) {
|
|
206
|
+
updateMultipleEnvVars(patches: $patches) {
|
|
207
|
+
name
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
`,
|
|
211
|
+
variables: { patches }
|
|
212
|
+
});
|
|
213
|
+
if (!response.errors) {
|
|
214
|
+
this.grist.fetch();
|
|
215
|
+
return this.showToast(i18next.t('text.updated_successfully'));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
async onDeleteEnvVars() {
|
|
220
|
+
if (await OxPrompt.open({
|
|
221
|
+
title: i18next.t('text.are_you_sure'),
|
|
222
|
+
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
223
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
224
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
225
|
+
})) {
|
|
226
|
+
const ids = this.grist.selected.map(record => record.id);
|
|
227
|
+
if (ids && ids.length > 0) {
|
|
228
|
+
const response = await client.mutate({
|
|
229
|
+
mutation: gql `
|
|
230
|
+
mutation ($ids: [String!]!) {
|
|
231
|
+
deleteEnvVars(ids: $ids)
|
|
232
|
+
}
|
|
233
|
+
`,
|
|
234
|
+
variables: {
|
|
235
|
+
ids
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
if (!response.errors) {
|
|
239
|
+
this.grist.fetch();
|
|
240
|
+
notify({
|
|
241
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
showToast(message) {
|
|
248
|
+
document.dispatchEvent(new CustomEvent('notify', { detail: { message } }));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: Boolean }),
|
|
253
|
+
__metadata("design:type", Boolean)
|
|
254
|
+
], EnvVarListPage.prototype, "active", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
property({ type: Object }),
|
|
257
|
+
__metadata("design:type", Object)
|
|
258
|
+
], EnvVarListPage.prototype, "config", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: String }),
|
|
261
|
+
__metadata("design:type", String)
|
|
262
|
+
], EnvVarListPage.prototype, "mode", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
query('ox-grist'),
|
|
265
|
+
__metadata("design:type", DataGrist)
|
|
266
|
+
], EnvVarListPage.prototype, "grist", void 0);
|
|
267
|
+
EnvVarListPage = __decorate([
|
|
268
|
+
customElement('env-var-list-page')
|
|
269
|
+
], EnvVarListPage);
|
|
270
|
+
export { EnvVarListPage };
|
|
271
|
+
//# sourceMappingURL=env-var-list-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-var-list-page.js","sourceRoot":"","sources":["../../../client/pages/env-var/env-var-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,6CAA6C,CAAA;AAEpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,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AAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;6CAAA;AAxBjC,cAAc;IAD1B,aAAa,CAAC,mBAAmB,CAAC;GACtB,cAAc,CAwP1B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/context/ox-context-page-toolbar.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify } from '@operato/layout'\nimport { PageView, store } from '@operato/shell'\nimport { CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { p13n } from '@operato/p13n'\nimport { FetchOption } from '@operato/data-grist'\nimport { OxPrompt } from '@operato/popup'\n\n@customElement('env-var-list-page')\nexport class EnvVarListPage extends connect(store)(p13n(localize(i18next)(PageView))) {\n static styles = [\n CommonGristStyles,\n CommonHeaderStyles,\n ScrollbarStyles,\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 @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) config: any\n @property({ type: String }) mode: 'CARD' | 'LIST' | 'GRID' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('text.env-var-list-page'),\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 actions: [\n {\n title: i18next.t('button.save'),\n action: this.onUpdateEnvVars.bind(this),\n icon: 'save'\n },\n {\n title: i18next.t('button.delete'),\n action: this.onDeleteEnvVars.bind(this),\n icon: 'delete'\n }\n ],\n toolbar: false\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${this.mode}\n .config=${this.config}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <div slot=\"headroom\" class=\"header\">\n <ox-context-page-toolbar class=\"actions\" .context=${this.context}></ox-context-page-toolbar>\n </div>\n\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageInitialized() {\n this.config = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 320\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 460\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n editable: true\n },\n filter: true,\n sortable: true,\n width: 60\n },\n {\n type: 'string',\n name: 'value',\n header: i18next.t('field.value'),\n record: {\n editable: true\n },\n width: 640\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n width: 180\n }\n ],\n rows: {\n appendable: true,\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes, lifecycle) {\n if (this.active) {\n await this.updateComplete\n\n this.grist.fetch()\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 envVars(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n value\n active\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.envVars.total || 0,\n records: response.data.envVars.items || []\n }\n }\n\n async onUpdateEnvVars() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return {\n ...patchField\n }\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation updateMultipleEnvVars($patches: [EnvVarPatch!]!) {\n updateMultipleEnvVars(patches: $patches) {\n name\n }\n }\n `,\n variables: { patches }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n return this.showToast(i18next.t('text.updated_successfully'))\n }\n }\n }\n\n async onDeleteEnvVars() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteEnvVars(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n showToast(message) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message } }))\n }\n}\n"]}
|
package/dist-client/route.js
CHANGED
|
@@ -42,6 +42,9 @@ export default function route(page) {
|
|
|
42
42
|
case 'domains':
|
|
43
43
|
import('./pages/domain/domain-management');
|
|
44
44
|
return page;
|
|
45
|
+
case 'env-vars':
|
|
46
|
+
import('./pages/env-var/env-var-list-page');
|
|
47
|
+
return page;
|
|
45
48
|
case 'attributes':
|
|
46
49
|
import('./pages/attribute/attribute-set-management.js');
|
|
47
50
|
return page;
|
package/dist-client/route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI;IAChC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,MAAM;YACJ,2BAA2B;YAC3B,iCAAiC;YACjC,oBAAoB,CACrB,CAAA;YACD,OAAO,IAAI,CAAA;QAEb,KAAK,oBAAoB;YACvB,MAAM,CAAC,4BAA4B,CAAC,CAAA;YACpC,OAAO,IAAI,CAAA;QAEb,KAAK,aAAa;YAChB,MAAM,CAAC,iCAAiC,CAAC,CAAA;YACzC,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,kCAAkC,CAAC,CAAA;YAC1C,OAAO,IAAI,CAAA;QAEb,KAAK,sBAAsB;YACzB,MAAM,CAAC,8BAA8B,CAAC,CAAA;YACtC,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,kCAAkC,CAAC,CAAA;YAC1C,OAAO,IAAI,CAAA;QAEb,KAAK,aAAa;YAChB,MAAM,CAAC,iCAAiC,CAAC,CAAA;YACzC,OAAO,IAAI,CAAA;QAEb,KAAK,gBAAgB;YACnB,MAAM,CAAC,wBAAwB,CAAC,CAAA;YAChC,OAAO,IAAI,CAAA;QAEb,KAAK,WAAW;YACd,MAAM,CAAC,6BAA6B,CAAC,CAAA;YACrC,OAAO,IAAI,CAAA;QAEb,KAAK,OAAO;YACV,MAAM,CAAC,8BAA8B,CAAC,CAAA;YACtC,OAAO,IAAI,CAAA;QAEb,KAAK,OAAO;YACV,MAAM,CAAC,8BAA8B,CAAC,CAAA;YACtC,OAAO,IAAI,CAAA;QAEb,KAAK,UAAU;YACb,MAAM,CAAC,oCAAoC,CAAC,CAAA;YAC5C,OAAO,IAAI,CAAA;QAEb,KAAK,SAAS;YACZ,MAAM,CAAC,kCAAkC,CAAC,CAAA;YAC1C,OAAO,IAAI,CAAA;QAEb,KAAK,YAAY;YACf,MAAM,CAAC,+CAA+C,CAAC,CAAA;YACvD,OAAO,IAAI,CAAA;QAEb,KAAK,gBAAgB;YACnB,MAAM,CAAC,mDAAmD,CAAC,CAAA;YAC3D,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,+CAA+C,CAAC,CAAA;YACvD,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page) {\n switch (page) {\n case 'profile':\n import(\n /* webpackPrefetch: true */\n /* webpackChunkName: \"profile\" */\n './pages/profile.js'\n )\n return page\n\n case 'appliance-register':\n import('./pages/appliance/register')\n return page\n\n case 'application':\n import('./pages/application/application')\n return page\n\n case 'applications':\n import('./pages/application/applications')\n return page\n\n case 'application-register':\n import('./pages/application/register')\n return page\n\n case 'app-bindings':\n import('./pages/app-binding/app-bindings')\n return page\n\n case 'app-binding':\n import('./pages/app-binding/app-binding')\n return page\n\n case 'appliance-home':\n import('./pages/appliance/home')\n return page\n\n case 'appliance':\n import('./pages/appliance/appliance')\n return page\n\n case 'roles':\n import('./pages/role/role-management')\n return page\n\n case 'users':\n import('./pages/user/user-management')\n return page\n\n case 'partners':\n import('./pages/partner/partner-management')\n return page\n\n case 'domains':\n import('./pages/domain/domain-management')\n return page\n\n case 'attributes':\n import('./pages/attribute/attribute-set-management.js')\n return page\n\n case 'auth-providers':\n import('./pages/auth-provider/auth-provider-management.js')\n return page\n\n case 'domain-links':\n import('./pages/domain-link/domain-link-management.js')\n return page\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI;IAChC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,MAAM;YACJ,2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,MAAM,CAAC,mDAAmD,CAAC,CAAA;YAC3D,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,+CAA+C,CAAC,CAAA;YACvD,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page) {\n switch (page) {\n case 'profile':\n import(\n /* webpackPrefetch: true */\n /* webpackChunkName: \"profile\" */\n './pages/profile.js'\n )\n return page\n\n case 'appliance-register':\n import('./pages/appliance/register')\n return page\n\n case 'application':\n import('./pages/application/application')\n return page\n\n case 'applications':\n import('./pages/application/applications')\n return page\n\n case 'application-register':\n import('./pages/application/register')\n return page\n\n case 'app-bindings':\n import('./pages/app-binding/app-bindings')\n return page\n\n case 'app-binding':\n import('./pages/app-binding/app-binding')\n return page\n\n case 'appliance-home':\n import('./pages/appliance/home')\n return page\n\n case 'appliance':\n import('./pages/appliance/appliance')\n return page\n\n case 'roles':\n import('./pages/role/role-management')\n return page\n\n case 'users':\n import('./pages/user/user-management')\n return page\n\n case 'partners':\n import('./pages/partner/partner-management')\n return page\n\n case 'domains':\n import('./pages/domain/domain-management')\n return page\n\n case 'env-vars':\n import('./pages/env-var/env-var-list-page')\n return page\n\n case 'attributes':\n import('./pages/attribute/attribute-set-management.js')\n return page\n\n case 'auth-providers':\n import('./pages/auth-provider/auth-provider-management.js')\n return page\n\n case 'domain-links':\n import('./pages/domain-link/domain-link-management.js')\n return page\n }\n}\n"]}
|