@genexus/genexus-ide-ui 1.0.72 → 1.0.74
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/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js +104 -0
- package/dist/cjs/gx-ide-bpm-sync-gam-roles.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js +282 -0
- package/dist/cjs/gx-ide-bpm-task-documents.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.css +6 -0
- package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js +167 -0
- package/dist/collection/components/bpm/sync-gam-roles/bpm-sync-gam-roles.js.map +1 -0
- package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.en.json +18 -0
- package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.ja.json +18 -0
- package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.zh.json +18 -0
- package/dist/collection/components/bpm/sync-gam-roles/gx-ide-assets/bpm-sync-gam-roles/shortcuts.json +15 -0
- package/dist/collection/components/bpm/sync-gam-roles/helpers.js +12 -0
- package/dist/collection/components/bpm/sync-gam-roles/helpers.js.map +1 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
- package/dist/collection/components/bpm/task-documents/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
- package/dist/collection/components/bpm/task-documents/helpers.js +34 -0
- package/dist/collection/components/bpm/task-documents/helpers.js.map +1 -0
- package/dist/collection/components/bpm/task-documents/task-documents.css +26 -0
- package/dist/collection/components/bpm/task-documents/task-documents.js +440 -0
- package/dist/collection/components/bpm/task-documents/task-documents.js.map +1 -0
- package/dist/collection/testing/locale.e2e.js +2 -0
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/gx-ide-bpm-sync-gam-roles.d.ts +11 -0
- package/dist/components/gx-ide-bpm-sync-gam-roles.js +122 -0
- package/dist/components/gx-ide-bpm-sync-gam-roles.js.map +1 -0
- package/dist/components/gx-ide-bpm-task-documents.d.ts +11 -0
- package/dist/components/gx-ide-bpm-task-documents.js +313 -0
- package/dist/components/gx-ide-bpm-task-documents.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js +100 -0
- package/dist/esm/gx-ide-bpm-sync-gam-roles.entry.js.map +1 -0
- package/dist/esm/gx-ide-bpm-task-documents.entry.js +278 -0
- package/dist/esm/gx-ide-bpm-task-documents.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.en.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.ja.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/langs/bpm-sync-gam-roles.lang.zh.json +18 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-sync-gam-roles/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.en.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.ja.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/langs/bpm-task-documents.lang.zh.json +23 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-task-documents/shortcuts.json +15 -0
- package/dist/genexus-ide-ui/p-a3361024.entry.js +419 -0
- package/dist/genexus-ide-ui/p-a3361024.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-ded7444c.entry.js +136 -0
- package/dist/genexus-ide-ui/p-ded7444c.entry.js.map +1 -0
- package/dist/types/components/bpm/sync-gam-roles/bpm-sync-gam-roles.d.ts +23 -0
- package/dist/types/components/bpm/sync-gam-roles/helpers.d.ts +2 -0
- package/dist/types/components/bpm/task-documents/helpers.d.ts +8 -0
- package/dist/types/components/bpm/task-documents/task-documents.d.ts +71 -0
- package/dist/types/components.d.ts +185 -62
- package/package.json +1 -1
|
@@ -91,6 +91,8 @@ const allGeneXusIdeUIComponents = {
|
|
|
91
91
|
"gx-ide-bpm-import-files": 0,
|
|
92
92
|
"gx-ide-bpm-import-gxpm": 0,
|
|
93
93
|
"gx-ide-bpm-objects-selector": 0,
|
|
94
|
+
"gx-ide-bpm-sync-gam-roles": 0,
|
|
95
|
+
"gx-ide-bpm-task-documents": 0,
|
|
94
96
|
"gx-ide-bpm-timer-duration": 0,
|
|
95
97
|
"gx-ide-card": 0,
|
|
96
98
|
"gx-ide-chat-container": 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.e2e.js","sourceRoot":"","sources":["../../src/testing/locale.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,SAAS,GAAqC;IAClD,EAAE,IAAI,EA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stencil/core/testing\";\nimport { GeneXusIdeUIControlsTagName } from \"../common/types\";\nimport { haveSameStructure } from \"./same-structure.e2e\";\n\nconst COMPONENT_PREFIX = \"gx-ide-\";\nconst languages: { name: string; attr: string }[] = [\n { name: \"chinese\", attr: \"zh\" },\n { name: \"english\", attr: \"en\" },\n { name: \"japanese\", attr: \"ja\" }\n];\n\nconst testLocale = (componentNameWithPrefix: GeneXusIdeUIControlsTagName) => {\n describe(`[locale][${componentNameWithPrefix}]`, () => {\n let page: E2EPage;\n const componentName = componentNameWithPrefix.replace(COMPONENT_PREFIX, \"\");\n\n // This implementation is a WA since we can't evaluate JS classes in the page.\n // TODO: Implement the locale utility as a function, which can be evaluated\n // in the page\n const getTranslations = () =>\n page.evaluate(component => {\n const ASSETS_FOLDER = \"gx-ide-assets/\";\n const DEFAULT_LANGUAGE = \"en\";\n const LANGS_FOLDER = \"langs/\";\n const LANG_PREFIX = \".lang.\";\n const LANG_EXTENSION = \".json\";\n const lang =\n document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf() ?? DEFAULT_LANGUAGE;\n const folder = `${component}/`;\n\n const path =\n `/build/${ASSETS_FOLDER}${folder}${LANGS_FOLDER}${component}${LANG_PREFIX}${lang}${LANG_EXTENSION}` as const;\n\n return new Promise(resolve => {\n fetch(path)\n .then(async langFile => {\n if (langFile.ok) {\n const fileObject = await langFile.json();\n resolve(fileObject);\n } else {\n resolve(undefined);\n }\n })\n .catch(() => resolve(undefined));\n });\n }, componentName);\n\n beforeEach(async () => {\n page = await newE2EPage({\n failOnConsoleError: true,\n html: \"\" // Necessary\n });\n });\n\n it(\"should work without specifying the language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n\n it(\"should default to english language when there is no language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n\n await page.evaluate(() =>\n document.documentElement.setAttribute(\"lang\", \"en\")\n );\n\n const languageEnglishFile: any | undefined = await getTranslations();\n expect(languageEnglishFile).toBeTruthy();\n expect(languageFile).toEqual(languageEnglishFile);\n });\n\n languages.forEach(language => {\n it(`should work with ${language.name} language`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language.attr\n );\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n });\n\n for (let index = 0; index < languages.length - 1; index++) {\n const language1 = languages[index];\n const language2 = languages[index + 1];\n\n // TODO: Complete all translations. At this moment, Japanese and Chinese\n // translations have missing literals\n it(`should translate the same literals (${language1.name} and ${language2.name})`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language1.attr\n );\n const language1File: any | undefined = await getTranslations();\n\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language2.attr\n );\n const language2File: any | undefined = await getTranslations();\n\n expect(language1File).toBeTruthy();\n expect(language2File).toBeTruthy();\n expect(haveSameStructure(language1File, language2File)).toBe(true);\n });\n }\n });\n};\n\n// TypeScript does not have a built-in type to exhaust a list with union types\nconst allGeneXusIdeUIComponents: { [key in GeneXusIdeUIControlsTagName]: 0 } = {\n \"gx-ide-about\": 0,\n \"gx-ide-ai-assistant\": 0,\n \"gx-ide-ai-message\": 0,\n \"gx-ide-bpm-app-declaration\": 0,\n \"gx-ide-bpm-assign-roles\": 0,\n \"gx-ide-bpm-import-files\": 0,\n \"gx-ide-bpm-import-gxpm\": 0,\n \"gx-ide-bpm-objects-selector\": 0,\n \"gx-ide-bpm-timer-duration\": 0,\n \"gx-ide-card\": 0,\n \"gx-ide-chat-container\": 0,\n \"gx-ide-sc-chat-container\": 0,\n \"gx-ide-connect-gx-server\": 0,\n \"gx-ide-container\": 0,\n \"gx-ide-create-kb-from-server\": 0,\n \"gx-ide-current-user-info\": 0,\n \"gx-ide-dashboard-home\": 0,\n \"gx-ide-data-selector\": 0,\n \"gx-ide-data-type-selector\": 0,\n \"gx-ide-design-import\": 0,\n \"gx-ide-directory-selector\": 0,\n \"gx-ide-edit-module-server\": 0,\n \"gx-ide-empty-state\": 0,\n \"gx-ide-entity-selector\": 0,\n \"gx-ide-gam-installation-settings\": 0,\n \"gx-ide-kb-manager-export\": 0,\n \"gx-ide-kb-manager-import\": 0,\n \"gx-ide-list-selector\": 0,\n \"gx-ide-list-selector-item\": 0,\n \"gx-ide-loader\": 0,\n \"gx-ide-manage-module-references\": 0,\n \"gx-ide-manage-module-references-v2\": 0,\n \"gx-ide-new-environment\": 0,\n \"gx-ide-new-kb\": 0,\n \"gx-ide-new-object\": 0,\n \"gx-ide-new-version\": 0,\n \"gx-ide-object-selector\": 0,\n \"gx-ide-references\": 0,\n \"gx-ide-select-kb-items\": 0,\n \"gx-ide-select-user-team\": 0,\n \"gx-ide-sign-in\": 0,\n \"gx-ide-sign-in-team\": 0,\n \"gx-ide-share-kb\": 0,\n \"gx-ide-start-page\": 0,\n \"gx-ide-status-buttons\": 0,\n \"gx-ide-switch-panel\": 0,\n \"gx-ide-switcher\": 0,\n \"gx-ide-team-dev-commit\": 0,\n \"gx-ide-team-dev-select-recent-comment\": 0,\n \"gx-ide-team-dev-update\": 0,\n \"gx-ide-team-dev-update-partial-selection\": 0,\n \"gx-ide-team-dev-update-to-revision\": 0,\n \"gx-ide-template\": 0,\n \"gx-ide-test\": 0,\n \"gx-ide-title\": 0,\n \"gx-ide-top-bar\": 0,\n \"gx-ide-wf-settings\": 0,\n \"gx-ide-ww-images\": 0,\n \"gx-ide-ww-attributes\": 0,\n \"gx-ide-ww-files\": 0,\n \"gx-ide-navigation-report\": 0,\n \"gx-ide-splash\": 0,\n \"gx-ide-welcome-page\": 0,\n \"gx-ide-bpm-export-xpdl\": 0\n};\n\nconst componentsWithoutTranslations = new Set<GeneXusIdeUIControlsTagName>([\n \"gx-ide-ai-message\",\n \"gx-ide-chat-container\",\n \"gx-ide-container\",\n \"gx-ide-sc-chat-container\",\n \"gx-ide-directory-selector\",\n \"gx-ide-empty-state\",\n \"gx-ide-list-selector\",\n \"gx-ide-list-selector-item\",\n \"gx-ide-loader\",\n \"gx-ide-switch-panel\",\n \"gx-ide-switcher\",\n \"gx-ide-test\",\n \"gx-ide-title\",\n \"gx-ide-top-bar\"\n]);\n\nconst componentsWithTranslations = Object.keys(\n allGeneXusIdeUIComponents\n).filter(\n component =>\n !componentsWithoutTranslations.has(component as GeneXusIdeUIControlsTagName)\n);\n\ncomponentsWithTranslations.forEach(testLocale);\n"]}
|
|
1
|
+
{"version":3,"file":"locale.e2e.js","sourceRoot":"","sources":["../../src/testing/locale.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,MAAM,SAAS,GAAqC;IAClD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;CACjC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,uBAAoD,EAAE,EAAE;IAC1E,QAAQ,CAAC,YAAY,uBAAuB,GAAG,EAAE,GAAG,EAAE;QACpD,IAAI,IAAa,CAAC;QAClB,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAE5E,8EAA8E;QAC9E,2EAA2E;QAC3E,cAAc;QACd,MAAM,eAAe,GAAG,GAAG,EAAE,CAC3B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;;YACxB,MAAM,aAAa,GAAG,gBAAgB,CAAC;YACvC,MAAM,gBAAgB,GAAG,IAAI,CAAC;YAC9B,MAAM,YAAY,GAAG,QAAQ,C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C;IACzB,iBAAiB,EAAE,CAAC;IACpB,0BAA0B,EAAE,CAAC;IAC7B,eAAe,EAAE,CAAC;IAClB,qBAAqB,EAAE,CAAC;IACxB,wBAAwB,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAA8B;IACzE,mBAAmB;IACnB,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,2BAA2B;IAC3B,eAAe;IACf,qBAAqB;IACrB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,MAAM,CAAC,IAAI,CAC5C,yBAAyB,CAC1B,CAAC,MAAM,CACN,SAAS,CAAC,EAAE,CACV,CAAC,6BAA6B,CAAC,GAAG,CAAC,SAAwC,CAAC,CAC/E,CAAC;AAEF,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC","sourcesContent":["import { E2EPage, newE2EPage } from \"@stencil/core/testing\";\nimport { GeneXusIdeUIControlsTagName } from \"../common/types\";\nimport { haveSameStructure } from \"./same-structure.e2e\";\n\nconst COMPONENT_PREFIX = \"gx-ide-\";\nconst languages: { name: string; attr: string }[] = [\n { name: \"chinese\", attr: \"zh\" },\n { name: \"english\", attr: \"en\" },\n { name: \"japanese\", attr: \"ja\" }\n];\n\nconst testLocale = (componentNameWithPrefix: GeneXusIdeUIControlsTagName) => {\n describe(`[locale][${componentNameWithPrefix}]`, () => {\n let page: E2EPage;\n const componentName = componentNameWithPrefix.replace(COMPONENT_PREFIX, \"\");\n\n // This implementation is a WA since we can't evaluate JS classes in the page.\n // TODO: Implement the locale utility as a function, which can be evaluated\n // in the page\n const getTranslations = () =>\n page.evaluate(component => {\n const ASSETS_FOLDER = \"gx-ide-assets/\";\n const DEFAULT_LANGUAGE = \"en\";\n const LANGS_FOLDER = \"langs/\";\n const LANG_PREFIX = \".lang.\";\n const LANG_EXTENSION = \".json\";\n const lang =\n document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf() ?? DEFAULT_LANGUAGE;\n const folder = `${component}/`;\n\n const path =\n `/build/${ASSETS_FOLDER}${folder}${LANGS_FOLDER}${component}${LANG_PREFIX}${lang}${LANG_EXTENSION}` as const;\n\n return new Promise(resolve => {\n fetch(path)\n .then(async langFile => {\n if (langFile.ok) {\n const fileObject = await langFile.json();\n resolve(fileObject);\n } else {\n resolve(undefined);\n }\n })\n .catch(() => resolve(undefined));\n });\n }, componentName);\n\n beforeEach(async () => {\n page = await newE2EPage({\n failOnConsoleError: true,\n html: \"\" // Necessary\n });\n });\n\n it(\"should work without specifying the language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n\n it(\"should default to english language when there is no language (lang attr) in the browser\", async () => {\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n\n await page.evaluate(() =>\n document.documentElement.setAttribute(\"lang\", \"en\")\n );\n\n const languageEnglishFile: any | undefined = await getTranslations();\n expect(languageEnglishFile).toBeTruthy();\n expect(languageFile).toEqual(languageEnglishFile);\n });\n\n languages.forEach(language => {\n it(`should work with ${language.name} language`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language.attr\n );\n const languageFile: any | undefined = await getTranslations();\n expect(languageFile).toBeTruthy();\n });\n });\n\n for (let index = 0; index < languages.length - 1; index++) {\n const language1 = languages[index];\n const language2 = languages[index + 1];\n\n // TODO: Complete all translations. At this moment, Japanese and Chinese\n // translations have missing literals\n it(`should translate the same literals (${language1.name} and ${language2.name})`, async () => {\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language1.attr\n );\n const language1File: any | undefined = await getTranslations();\n\n await page.evaluate(\n (attr: string) => document.documentElement.setAttribute(\"lang\", attr),\n language2.attr\n );\n const language2File: any | undefined = await getTranslations();\n\n expect(language1File).toBeTruthy();\n expect(language2File).toBeTruthy();\n expect(haveSameStructure(language1File, language2File)).toBe(true);\n });\n }\n });\n};\n\n// TypeScript does not have a built-in type to exhaust a list with union types\nconst allGeneXusIdeUIComponents: { [key in GeneXusIdeUIControlsTagName]: 0 } = {\n \"gx-ide-about\": 0,\n \"gx-ide-ai-assistant\": 0,\n \"gx-ide-ai-message\": 0,\n \"gx-ide-bpm-app-declaration\": 0,\n \"gx-ide-bpm-assign-roles\": 0,\n \"gx-ide-bpm-import-files\": 0,\n \"gx-ide-bpm-import-gxpm\": 0,\n \"gx-ide-bpm-objects-selector\": 0,\n \"gx-ide-bpm-sync-gam-roles\": 0,\n \"gx-ide-bpm-task-documents\": 0,\n \"gx-ide-bpm-timer-duration\": 0,\n \"gx-ide-card\": 0,\n \"gx-ide-chat-container\": 0,\n \"gx-ide-sc-chat-container\": 0,\n \"gx-ide-connect-gx-server\": 0,\n \"gx-ide-container\": 0,\n \"gx-ide-create-kb-from-server\": 0,\n \"gx-ide-current-user-info\": 0,\n \"gx-ide-dashboard-home\": 0,\n \"gx-ide-data-selector\": 0,\n \"gx-ide-data-type-selector\": 0,\n \"gx-ide-design-import\": 0,\n \"gx-ide-directory-selector\": 0,\n \"gx-ide-edit-module-server\": 0,\n \"gx-ide-empty-state\": 0,\n \"gx-ide-entity-selector\": 0,\n \"gx-ide-gam-installation-settings\": 0,\n \"gx-ide-kb-manager-export\": 0,\n \"gx-ide-kb-manager-import\": 0,\n \"gx-ide-list-selector\": 0,\n \"gx-ide-list-selector-item\": 0,\n \"gx-ide-loader\": 0,\n \"gx-ide-manage-module-references\": 0,\n \"gx-ide-manage-module-references-v2\": 0,\n \"gx-ide-new-environment\": 0,\n \"gx-ide-new-kb\": 0,\n \"gx-ide-new-object\": 0,\n \"gx-ide-new-version\": 0,\n \"gx-ide-object-selector\": 0,\n \"gx-ide-references\": 0,\n \"gx-ide-select-kb-items\": 0,\n \"gx-ide-select-user-team\": 0,\n \"gx-ide-sign-in\": 0,\n \"gx-ide-sign-in-team\": 0,\n \"gx-ide-share-kb\": 0,\n \"gx-ide-start-page\": 0,\n \"gx-ide-status-buttons\": 0,\n \"gx-ide-switch-panel\": 0,\n \"gx-ide-switcher\": 0,\n \"gx-ide-team-dev-commit\": 0,\n \"gx-ide-team-dev-select-recent-comment\": 0,\n \"gx-ide-team-dev-update\": 0,\n \"gx-ide-team-dev-update-partial-selection\": 0,\n \"gx-ide-team-dev-update-to-revision\": 0,\n \"gx-ide-template\": 0,\n \"gx-ide-test\": 0,\n \"gx-ide-title\": 0,\n \"gx-ide-top-bar\": 0,\n \"gx-ide-wf-settings\": 0,\n \"gx-ide-ww-images\": 0,\n \"gx-ide-ww-attributes\": 0,\n \"gx-ide-ww-files\": 0,\n \"gx-ide-navigation-report\": 0,\n \"gx-ide-splash\": 0,\n \"gx-ide-welcome-page\": 0,\n \"gx-ide-bpm-export-xpdl\": 0\n};\n\nconst componentsWithoutTranslations = new Set<GeneXusIdeUIControlsTagName>([\n \"gx-ide-ai-message\",\n \"gx-ide-chat-container\",\n \"gx-ide-container\",\n \"gx-ide-sc-chat-container\",\n \"gx-ide-directory-selector\",\n \"gx-ide-empty-state\",\n \"gx-ide-list-selector\",\n \"gx-ide-list-selector-item\",\n \"gx-ide-loader\",\n \"gx-ide-switch-panel\",\n \"gx-ide-switcher\",\n \"gx-ide-test\",\n \"gx-ide-title\",\n \"gx-ide-top-bar\"\n]);\n\nconst componentsWithTranslations = Object.keys(\n allGeneXusIdeUIComponents\n).filter(\n component =>\n !componentsWithoutTranslations.has(component as GeneXusIdeUIControlsTagName)\n);\n\ncomponentsWithTranslations.forEach(testLocale);\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GxIdeBpmSyncGamRoles extends Components.GxIdeBpmSyncGamRoles, HTMLElement {}
|
|
4
|
+
export const GxIdeBpmSyncGamRoles: {
|
|
5
|
+
prototype: GxIdeBpmSyncGamRoles;
|
|
6
|
+
new (): GxIdeBpmSyncGamRoles;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, getAssetPath, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { L as Locale } from './locale.js';
|
|
3
|
+
|
|
4
|
+
const mapTypesToComboBoxItemModel = (synchronizationTypes) => {
|
|
5
|
+
const syncTypes = [];
|
|
6
|
+
synchronizationTypes.forEach(synchronizationType => {
|
|
7
|
+
const newSynchType = {
|
|
8
|
+
value: synchronizationType.value,
|
|
9
|
+
caption: synchronizationType.caption
|
|
10
|
+
};
|
|
11
|
+
syncTypes.push(newSynchType);
|
|
12
|
+
});
|
|
13
|
+
return syncTypes;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const bpmSyncGamRolesCss = ":host{display:grid;block-size:100%;overflow:hidden;grid-template-rows:1fr max-content}";
|
|
17
|
+
|
|
18
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
19
|
+
if (kind === "a" && !f)
|
|
20
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
21
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
22
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
23
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
24
|
+
};
|
|
25
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
26
|
+
if (kind === "m")
|
|
27
|
+
throw new TypeError("Private method is not writable");
|
|
28
|
+
if (kind === "a" && !f)
|
|
29
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
30
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
31
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
32
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
33
|
+
};
|
|
34
|
+
var _GxIdeBpmSyncGamRoles__componentLocale, _GxIdeBpmSyncGamRoles_shortcutsSrc, _GxIdeBpmSyncGamRoles_synchronizationTypes, _GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl, _GxIdeBpmSyncGamRoles_chShortcutsEl, _GxIdeBpmSyncGamRoles_synchTypeComboBoxEl, _GxIdeBpmSyncGamRoles_cancelButtonHandler, _GxIdeBpmSyncGamRoles_okButtonHandler, _GxIdeBpmSyncGamRoles_renderFooter;
|
|
35
|
+
const CSS_BUNDLES = [
|
|
36
|
+
"resets/box-sizing",
|
|
37
|
+
"components/tooltip",
|
|
38
|
+
"utils/form--full",
|
|
39
|
+
"utils/layout",
|
|
40
|
+
"utils/typography",
|
|
41
|
+
"utils/spacing",
|
|
42
|
+
"chameleon/scrollbar"
|
|
43
|
+
];
|
|
44
|
+
const GxIdeBpmSyncGamRoles$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeBpmSyncGamRoles extends HTMLElement {
|
|
45
|
+
constructor() {
|
|
46
|
+
super();
|
|
47
|
+
this.__registerHost();
|
|
48
|
+
this.__attachShadow();
|
|
49
|
+
_GxIdeBpmSyncGamRoles__componentLocale.set(this, void 0);
|
|
50
|
+
_GxIdeBpmSyncGamRoles_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/bpm-sync-gam-roles/shortcuts.json`));
|
|
51
|
+
_GxIdeBpmSyncGamRoles_synchronizationTypes.set(this, []);
|
|
52
|
+
_GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl.set(this, void 0);
|
|
53
|
+
_GxIdeBpmSyncGamRoles_chShortcutsEl.set(this, void 0);
|
|
54
|
+
_GxIdeBpmSyncGamRoles_synchTypeComboBoxEl.set(this, void 0);
|
|
55
|
+
_GxIdeBpmSyncGamRoles_cancelButtonHandler.set(this, () => {
|
|
56
|
+
if (this.cancelCallback) {
|
|
57
|
+
this.cancelCallback();
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
_GxIdeBpmSyncGamRoles_okButtonHandler.set(this, async () => {
|
|
61
|
+
var _a;
|
|
62
|
+
if (this.saveCallback) {
|
|
63
|
+
const syncData = {
|
|
64
|
+
automaticBackup: !!((_a = __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl, "f")) === null || _a === void 0 ? void 0 : _a.value),
|
|
65
|
+
syncType: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_synchTypeComboBoxEl, "f").value
|
|
66
|
+
};
|
|
67
|
+
await this.saveCallback(syncData);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
_GxIdeBpmSyncGamRoles_renderFooter.set(this, () => {
|
|
71
|
+
return (h("footer", { class: "control-footer control-footer-with-border spacing-body-block-end spacing-body-inline" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", id: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_cancelButtonHandler, "f"), part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles__componentLocale, "f").footer.cancelButtonText), h("button", { class: "button-primary", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_okButtonHandler, "f"), part: "button-ok" }, __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles__componentLocale, "f").footer.okButtonText))));
|
|
72
|
+
});
|
|
73
|
+
this.cancelCallback = undefined;
|
|
74
|
+
this.saveCallback = undefined;
|
|
75
|
+
}
|
|
76
|
+
async componentWillLoad() {
|
|
77
|
+
__classPrivateFieldSet(this, _GxIdeBpmSyncGamRoles__componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
78
|
+
__classPrivateFieldSet(this, _GxIdeBpmSyncGamRoles_synchronizationTypes, mapTypesToComboBoxItemModel(__classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles__componentLocale, "f").main.synchronizationTypeOptions), "f");
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Suspends or reactivates the shortcuts
|
|
82
|
+
*/
|
|
83
|
+
async suspendShortcuts(suspendShortcuts) {
|
|
84
|
+
if (suspendShortcuts) {
|
|
85
|
+
__classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_chShortcutsEl, "f").suspend = true;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
__classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_chShortcutsEl, "f").suspend = false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeBpmSyncGamRoles_chShortcutsEl, el, "f")) }), h("section", { class: "section spacing-body" }, h("div", { class: "main field-group" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "synch-type" }, __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles__componentLocale, "f").main.synchronizationTypeLabel), h("ch-combo-box-render", { accessibleName: "Synchronization types", class: "combo-box", id: "synch-type", value: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_synchronizationTypes, "f")[0].caption, model: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_synchronizationTypes, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeBpmSyncGamRoles_synchTypeComboBoxEl, el, "f")) })), h("ch-checkbox", { class: "checkbox", caption: __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles__componentLocale, "f").main.checkBoxLabel, checkedValue: "true", ref: (el) => (__classPrivateFieldSet(this, _GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl, el, "f")) }))), __classPrivateFieldGet(this, _GxIdeBpmSyncGamRoles_renderFooter, "f").call(this)));
|
|
93
|
+
}
|
|
94
|
+
static get assetsDirs() { return ["gx-ide-assets/bpm-sync-gam-roles"]; }
|
|
95
|
+
get el() { return this; }
|
|
96
|
+
static get style() { return bpmSyncGamRolesCss; }
|
|
97
|
+
}, [1, "gx-ide-bpm-sync-gam-roles", {
|
|
98
|
+
"cancelCallback": [16],
|
|
99
|
+
"saveCallback": [16],
|
|
100
|
+
"suspendShortcuts": [64]
|
|
101
|
+
}]);
|
|
102
|
+
_GxIdeBpmSyncGamRoles__componentLocale = new WeakMap(), _GxIdeBpmSyncGamRoles_shortcutsSrc = new WeakMap(), _GxIdeBpmSyncGamRoles_synchronizationTypes = new WeakMap(), _GxIdeBpmSyncGamRoles_automaticBackupCheckBoxEl = new WeakMap(), _GxIdeBpmSyncGamRoles_chShortcutsEl = new WeakMap(), _GxIdeBpmSyncGamRoles_synchTypeComboBoxEl = new WeakMap(), _GxIdeBpmSyncGamRoles_cancelButtonHandler = new WeakMap(), _GxIdeBpmSyncGamRoles_okButtonHandler = new WeakMap(), _GxIdeBpmSyncGamRoles_renderFooter = new WeakMap();
|
|
103
|
+
function defineCustomElement$1() {
|
|
104
|
+
if (typeof customElements === "undefined") {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const components = ["gx-ide-bpm-sync-gam-roles"];
|
|
108
|
+
components.forEach(tagName => { switch (tagName) {
|
|
109
|
+
case "gx-ide-bpm-sync-gam-roles":
|
|
110
|
+
if (!customElements.get(tagName)) {
|
|
111
|
+
customElements.define(tagName, GxIdeBpmSyncGamRoles$1);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
} });
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const GxIdeBpmSyncGamRoles = GxIdeBpmSyncGamRoles$1;
|
|
118
|
+
const defineCustomElement = defineCustomElement$1;
|
|
119
|
+
|
|
120
|
+
export { GxIdeBpmSyncGamRoles, defineCustomElement };
|
|
121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KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,YAAY,IACtC,uBAAA,IAAI,8CAAkB,CAAC,IAAI,CAAC,wBAAwB,CAC/C,EACR,2BACE,cAAc,EAAC,uBAAuB,EACtC,KAAK,EAAC,WAAW,EACjB,EAAE,EAAC,YAAY,EACf,KAAK,EAAE,uBAAA,IAAI,kDAAsB,CAAC,CAAC,CAAC,CAAC,OAAO,EAC5C,KAAK,EAAE,uBAAA,IAAI,kDAAsB,EACjC,GAAG,EAAE,CAAC,EAA+B,MAClC,uBAAA,IAAI,6CACH,EAAiC,MAAA,CAAC,GAEjB,CACnB,EAEN,mBACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,uBAAA,IAAI,8CAAkB,CAAC,IAAI,CAAC,aAAa,EAClD,YAAY,EAAC,MAAM,EACnB,GAAG,EAAE,CAAC,EAAyB,MAC5B,uBAAA,IAAI,mDAA8B,EAA2B,MAAA,CAAC,GAEpD,CACX,CACE,EACT,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CAChB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GxIdeBpmSyncGamRoles"],"sources":["src/components/bpm/sync-gam-roles/helpers.tsx","src/components/bpm/sync-gam-roles/bpm-sync-gam-roles.scss?tag=gx-ide-bpm-sync-gam-roles&encapsulation=shadow","src/components/bpm/sync-gam-roles/bpm-sync-gam-roles.tsx"],"sourcesContent":["import { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\n\nexport const mapTypesToComboBoxItemModel = (\n synchronizationTypes: any[]\n): ComboBoxItemModel[] => {\n const syncTypes: ComboBoxItemModel[] = [];\n\n synchronizationTypes.forEach(synchronizationType => {\n const newSynchType: ComboBoxItemModel = {\n value: synchronizationType.value,\n caption: synchronizationType.caption\n };\n syncTypes.push(newSynchType);\n });\n return syncTypes;\n};\n",":host {\n display: grid;\n block-size: 100%;\n overflow: hidden;\n grid-template-rows: 1fr max-content;\n}\n","import {\n Component,\n Host,\n h,\n Element,\n getAssetPath,\n Method,\n Prop\n} from \"@stencil/core\";\nimport { Locale } from \"../../../common/locale\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { ComboBoxItemModel } from \"@genexus/chameleon-controls-library/dist/types/components/combo-box/types\";\nimport { mapTypesToComboBoxItemModel } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tooltip\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\n@Component({\n tag: \"gx-ide-bpm-sync-gam-roles\",\n styleUrl: \"bpm-sync-gam-roles.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-sync-gam-roles\"]\n})\nexport class GxIdeBpmSyncGamRoles {\n #_componentLocale: any;\n #shortcutsSrc = getAssetPath(\n `./gx-ide-assets/bpm-sync-gam-roles/shortcuts.json`\n );\n #synchronizationTypes: ComboBoxItemModel[] = [];\n\n @Element() el: HTMLGxIdeBpmSyncGamRolesElement;\n #automaticBackupCheckBoxEl: HTMLChCheckboxElement;\n #chShortcutsEl: HTMLChShortcutsElement;\n #synchTypeComboBoxEl: HTMLChComboBoxRenderElement;\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n this.#synchronizationTypes = mapTypesToComboBoxItemModel(\n this.#_componentLocale.main.synchronizationTypeOptions\n );\n }\n\n /**\n * Callback invoked when the user press the 'Cancel' button\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback invoked when the user press the 'Ok' button\n */\n @Prop() readonly saveCallback: (syncData: SyncData) => Promise<boolean>;\n\n /**\n * Suspends or reactivates the shortcuts\n */\n @Method()\n async suspendShortcuts(suspendShortcuts: boolean) {\n if (suspendShortcuts) {\n this.#chShortcutsEl.suspend = true;\n } else {\n this.#chShortcutsEl.suspend = false;\n }\n }\n\n #cancelButtonHandler = () => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n };\n #okButtonHandler = async () => {\n if (this.saveCallback) {\n const syncData: SyncData = {\n automaticBackup: !!this.#automaticBackupCheckBoxEl?.value,\n syncType: this.#synchTypeComboBoxEl.value as SyncType\n };\n\n await this.saveCallback(syncData);\n }\n };\n\n #renderFooter = () => {\n return (\n <footer class=\"control-footer control-footer-with-border spacing-body-block-end spacing-body-inline\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n id=\"button-cancel\"\n onClick={this.#cancelButtonHandler}\n part=\"button-cancel\"\n >\n {this.#_componentLocale.footer.cancelButtonText}\n </button>\n <button\n class=\"button-primary\"\n id=\"button-create\"\n onClick={this.#okButtonHandler}\n part=\"button-ok\"\n >\n {this.#_componentLocale.footer.okButtonText}\n </button>\n </div>\n </footer>\n );\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts\n src={this.#shortcutsSrc}\n ref={(el: HTMLChShortcutsElement) =>\n (this.#chShortcutsEl = el as HTMLChShortcutsElement)\n }\n ></ch-shortcuts>\n <section class=\"section spacing-body\">\n <div class=\"main field-group\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"synch-type\">\n {this.#_componentLocale.main.synchronizationTypeLabel}\n </label>\n <ch-combo-box-render\n accessibleName=\"Synchronization types\"\n class=\"combo-box\"\n id=\"synch-type\"\n value={this.#synchronizationTypes[0].caption}\n model={this.#synchronizationTypes}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#synchTypeComboBoxEl =\n el as HTMLChComboBoxRenderElement)\n }\n ></ch-combo-box-render>\n </div>\n\n <ch-checkbox\n class=\"checkbox\"\n caption={this.#_componentLocale.main.checkBoxLabel}\n checkedValue=\"true\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#automaticBackupCheckBoxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </div>\n </section>\n {this.#renderFooter()}\n </Host>\n );\n }\n}\n\nexport type SyncType = \"From GAM\" | \"To GAM\" | \"Both\";\n\nexport type SyncData = {\n syncType: SyncType;\n automaticBackup: boolean;\n};\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GxIdeBpmTaskDocuments extends Components.GxIdeBpmTaskDocuments, HTMLElement {}
|
|
4
|
+
export const GxIdeBpmTaskDocuments: {
|
|
5
|
+
prototype: GxIdeBpmTaskDocuments;
|
|
6
|
+
new (): GxIdeBpmTaskDocuments;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { L as Locale } from './locale.js';
|
|
3
|
+
import { g as getIconPath } from './assets-manager.js';
|
|
4
|
+
import './MERCURY_ASSETS.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './gx-ide-empty-state2.js';
|
|
6
|
+
|
|
7
|
+
const taskDocumentsToActionListItemModel = (objects, selectedDocument) => {
|
|
8
|
+
const actionListDocuments = [];
|
|
9
|
+
objects === null || objects === void 0 ? void 0 : objects.forEach((object, index) => {
|
|
10
|
+
const itemId = `task-${object.name}`;
|
|
11
|
+
const itemValue = object.name;
|
|
12
|
+
actionListDocuments.push({
|
|
13
|
+
id: itemId,
|
|
14
|
+
caption: itemValue,
|
|
15
|
+
selected: selectedDocument
|
|
16
|
+
? selectedDocument.name === object.name
|
|
17
|
+
: index === 0,
|
|
18
|
+
type: "actionable"
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return actionListDocuments;
|
|
22
|
+
};
|
|
23
|
+
/* References Types*/
|
|
24
|
+
/**
|
|
25
|
+
* @description This function converts string[] to ComboBoxItemModel[]
|
|
26
|
+
*/
|
|
27
|
+
const convertSuggestedDocumentsToSuggestItems = (suggestedDocuments) => {
|
|
28
|
+
const suggestItems = [];
|
|
29
|
+
if (suggestedDocuments.length) {
|
|
30
|
+
suggestedDocuments.forEach((suggestedDocument) => {
|
|
31
|
+
const suggestItem = {
|
|
32
|
+
value: suggestedDocument,
|
|
33
|
+
caption: suggestedDocument
|
|
34
|
+
};
|
|
35
|
+
suggestItems.push(suggestItem);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return suggestItems;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const taskDocumentsCss = ":host{display:grid;grid-template-columns:1fr;grid-template-rows:1fr max-content;block-size:100%;overflow:auto}.section{display:contents}.main{display:grid;grid-template-rows:max-content 1fr max-content;block-size:100%;overflow:auto}.documents__header{grid-template-columns:1fr max-content}.documents__suggest{flex:1}";
|
|
42
|
+
|
|
43
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
44
|
+
if (kind === "a" && !f)
|
|
45
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
46
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
47
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
48
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
49
|
+
};
|
|
50
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
51
|
+
if (kind === "m")
|
|
52
|
+
throw new TypeError("Private method is not writable");
|
|
53
|
+
if (kind === "a" && !f)
|
|
54
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
55
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
56
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
57
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
58
|
+
};
|
|
59
|
+
var _GxIdeBpmTaskDocuments_instances, _GxIdeBpmTaskDocuments__componentLocale, _GxIdeBpmTaskDocuments_renderedFirstTime, _GxIdeBpmTaskDocuments_shortcutsSrc, _GxIdeBpmTaskDocuments_chShortcutsEl, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, _GxIdeBpmTaskDocuments_getAllCheckboxes, _GxIdeBpmTaskDocuments_addDocument, _GxIdeBpmTaskDocuments_cancelCallbackHandler, _GxIdeBpmTaskDocuments_confirmCallbackHandler, _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler, _GxIdeBpmTaskDocuments_handleCheckboxChange, _GxIdeBpmTaskDocuments_handleDeleteButton, _GxIdeBpmTaskDocuments_listenDocumentSelected, _GxIdeBpmTaskDocuments_objectSelectionChangedHandler, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, _GxIdeBpmTaskDocuments_renderActions, _GxIdeBpmTaskDocuments_renderEmptyState, _GxIdeBpmTaskDocuments_renderFooter, _GxIdeBpmTaskDocuments_renderMain;
|
|
60
|
+
const CHECKED_VALUE = "true";
|
|
61
|
+
const CSS_BUNDLES = [
|
|
62
|
+
"resets/box-sizing",
|
|
63
|
+
"components/list-box",
|
|
64
|
+
"components/tabular-grid",
|
|
65
|
+
"utils/form--full",
|
|
66
|
+
"utils/layout",
|
|
67
|
+
"utils/spacing",
|
|
68
|
+
"chameleon/scrollbar"
|
|
69
|
+
];
|
|
70
|
+
const MODULE_ICON = getIconPath({
|
|
71
|
+
category: "objects",
|
|
72
|
+
name: "module"
|
|
73
|
+
});
|
|
74
|
+
const MORE_ICON = getIconPath({
|
|
75
|
+
category: "gemini-tools",
|
|
76
|
+
name: "show-more-horizontal",
|
|
77
|
+
colorType: "primary"
|
|
78
|
+
});
|
|
79
|
+
const DELETE_ICON = getIconPath({
|
|
80
|
+
category: "menus",
|
|
81
|
+
name: "delete",
|
|
82
|
+
colorType: "primary"
|
|
83
|
+
});
|
|
84
|
+
const NODENAME = "CH-CHECKBOX";
|
|
85
|
+
const GxIdeBpmTaskDocuments$1 = /*@__PURE__*/ proxyCustomElement(class GxIdeBpmTaskDocuments extends HTMLElement {
|
|
86
|
+
constructor() {
|
|
87
|
+
super();
|
|
88
|
+
this.__registerHost();
|
|
89
|
+
this.__attachShadow();
|
|
90
|
+
this.componentDidRenderFirstTime = createEvent(this, "componentDidRenderFirstTime", 7);
|
|
91
|
+
_GxIdeBpmTaskDocuments_instances.add(this);
|
|
92
|
+
_GxIdeBpmTaskDocuments__componentLocale.set(this, void 0);
|
|
93
|
+
_GxIdeBpmTaskDocuments_renderedFirstTime.set(this, false);
|
|
94
|
+
_GxIdeBpmTaskDocuments_shortcutsSrc.set(this, getAssetPath(`./gx-ide-assets/bpm-task-documents/shortcuts.json`));
|
|
95
|
+
_GxIdeBpmTaskDocuments_chShortcutsEl.set(this, void 0);
|
|
96
|
+
_GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl.set(this, void 0);
|
|
97
|
+
_GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl.set(this, void 0);
|
|
98
|
+
_GxIdeBpmTaskDocuments_newEnabledCheckboxEl.set(this, void 0);
|
|
99
|
+
_GxIdeBpmTaskDocuments_newRequiredCheckboxEl.set(this, void 0);
|
|
100
|
+
_GxIdeBpmTaskDocuments_readEnabledCheckboxEl.set(this, void 0);
|
|
101
|
+
_GxIdeBpmTaskDocuments_readRequiredCheckboxEl.set(this, void 0);
|
|
102
|
+
_GxIdeBpmTaskDocuments_updateEnabledCheckboxEl.set(this, void 0);
|
|
103
|
+
_GxIdeBpmTaskDocuments_updateRequiredCheckboxEl.set(this, void 0);
|
|
104
|
+
_GxIdeBpmTaskDocuments_cancelCallbackHandler.set(this, () => {
|
|
105
|
+
this.cancelCallback();
|
|
106
|
+
});
|
|
107
|
+
_GxIdeBpmTaskDocuments_confirmCallbackHandler.set(this, () => {
|
|
108
|
+
this.confirmCallback(this.documents);
|
|
109
|
+
});
|
|
110
|
+
_GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler.set(this, async (e) => {
|
|
111
|
+
const value = e.detail;
|
|
112
|
+
this.suggestDocumentsCallback(value)
|
|
113
|
+
.then(result => {
|
|
114
|
+
this.suggestedDocuments =
|
|
115
|
+
convertSuggestedDocumentsToSuggestItems(result);
|
|
116
|
+
})
|
|
117
|
+
.catch(() => {
|
|
118
|
+
// to do
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
_GxIdeBpmTaskDocuments_handleDeleteButton.set(this, () => {
|
|
122
|
+
this.documents = this.documents.filter(doc => doc.name !== this.selectedDocument.name);
|
|
123
|
+
this.selectedDocument = null;
|
|
124
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
125
|
+
});
|
|
126
|
+
_GxIdeBpmTaskDocuments_listenDocumentSelected.set(this, async (e) => {
|
|
127
|
+
if (e.detail) {
|
|
128
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_addDocument).call(this, e.detail);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
_GxIdeBpmTaskDocuments_objectSelectionChangedHandler.set(this, (e) => {
|
|
132
|
+
this.selectedDocument = this.documents.find(doc => { var _a; return doc.name === ((_a = e.detail[0]) === null || _a === void 0 ? void 0 : _a.item.caption); });
|
|
133
|
+
});
|
|
134
|
+
_GxIdeBpmTaskDocuments_refreshDocumentsActionListState.set(this, () => {
|
|
135
|
+
var _a, _b;
|
|
136
|
+
(_a = this.documents) === null || _a === void 0 ? void 0 : _a.sort((a, b) => {
|
|
137
|
+
return a.name.localeCompare(b.name);
|
|
138
|
+
});
|
|
139
|
+
this.documentsActionListState = taskDocumentsToActionListItemModel(this.documents, this.selectedDocument);
|
|
140
|
+
this.selectedDocument =
|
|
141
|
+
this.selectedDocument || ((_b = this.documents) === null || _b === void 0 ? void 0 : _b[0]) || null;
|
|
142
|
+
});
|
|
143
|
+
_GxIdeBpmTaskDocuments_selectDocumentCallbackHandler.set(this, async () => {
|
|
144
|
+
const callbackResult = await this.selectDocumentCallback();
|
|
145
|
+
if (callbackResult) {
|
|
146
|
+
this.documentName = callbackResult;
|
|
147
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_addDocument).call(this, callbackResult);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
_GxIdeBpmTaskDocuments_renderActions.set(this, () => {
|
|
151
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
152
|
+
return (h("ch-tabular-grid", { class: "tabular-grid scrollable", rowSelectionMode: "none", keyboardNavigationMode: "focus", columnResizeMode: "single" }, h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "code", columnName: "", settingable: false }), h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "enabled", settingable: false, columnName: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.enabledCheckbox }), h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "required", settingable: false, columnName: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.requiredCheckbox })), h("ch-tabular-grid-row", {
|
|
153
|
+
// read
|
|
154
|
+
class: "tabular-grid-row", rowid: "read"
|
|
155
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.readLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_a = this.selectedDocument) === null || _a === void 0 ? void 0 : _a.readEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_b = this.selectedDocument) === null || _b === void 0 ? void 0 : _b.readRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
156
|
+
// new
|
|
157
|
+
class: "tabular-grid-row", rowid: "read"
|
|
158
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.newLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_c = this.selectedDocument) === null || _c === void 0 ? void 0 : _c.newEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_d = this.selectedDocument) === null || _d === void 0 ? void 0 : _d.newRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
159
|
+
// update
|
|
160
|
+
class: "tabular-grid-row", rowid: "read"
|
|
161
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.updateLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_e = this.selectedDocument) === null || _e === void 0 ? void 0 : _e.updateEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_f = this.selectedDocument) === null || _f === void 0 ? void 0 : _f.updateRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, el, "f")) }))), h("ch-tabular-grid-row", {
|
|
162
|
+
// delete
|
|
163
|
+
class: "tabular-grid-row", rowid: "read"
|
|
164
|
+
}, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").actions.deleteLabel), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_g = this.selectedDocument) === null || _g === void 0 ? void 0 : _g.deleteEnabled.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, el, "f")) })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-checkbox", { class: "checkbox", checkedValue: CHECKED_VALUE, value: (_h = this.selectedDocument) === null || _h === void 0 ? void 0 : _h.deleteRequired.toString(), ref: el => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, el, "f")) })))));
|
|
165
|
+
});
|
|
166
|
+
_GxIdeBpmTaskDocuments_renderEmptyState.set(this, () => {
|
|
167
|
+
return (h("gx-ide-empty-state", { class: "recent-objects__empty-state", stateIconSrc: MODULE_ICON, isAnimated: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, "f"), stateTitle: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").emptyRightPanelInfo.title }, h("button", { class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").emptyRightPanelInfo.buttonCaption)));
|
|
168
|
+
});
|
|
169
|
+
_GxIdeBpmTaskDocuments_renderFooter.set(this, () => {
|
|
170
|
+
return (h("footer", { class: "footer control-footer control-footer-with-border spacing-body-block-end spacing-body-inline" }, h("div", { class: "buttons-spacer" }, h("button", { class: "button-secondary", id: "button-cancel", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_cancelCallbackHandler, "f"), part: "button-cancel" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").footer.cancelButton), h("button", { class: "button-primary", id: "button-create", onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_confirmCallbackHandler, "f"), part: "button-create" }, __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").footer.confirmButton))));
|
|
171
|
+
});
|
|
172
|
+
_GxIdeBpmTaskDocuments_renderMain.set(this, () => {
|
|
173
|
+
return [
|
|
174
|
+
h("div", { class: "documents__list spacing-body-inline" }, h("ch-action-list-render", { selection: "single", class: "list-box", model: this.documentsActionListState, onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_objectSelectionChangedHandler, "f") })),
|
|
175
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderActions, "f").call(this)
|
|
176
|
+
];
|
|
177
|
+
});
|
|
178
|
+
this.documentsActionListState = [];
|
|
179
|
+
this.documentName = null;
|
|
180
|
+
this.selectedDocument = null;
|
|
181
|
+
this.suggestedDocuments = undefined;
|
|
182
|
+
this.documents = undefined;
|
|
183
|
+
this.cancelCallback = undefined;
|
|
184
|
+
this.confirmCallback = undefined;
|
|
185
|
+
this.selectDocumentCallback = undefined;
|
|
186
|
+
this.suggestDocumentsCallback = undefined;
|
|
187
|
+
}
|
|
188
|
+
async componentWillLoad() {
|
|
189
|
+
__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments__componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
190
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
191
|
+
}
|
|
192
|
+
componentDidRender() {
|
|
193
|
+
if (!__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, "f")) {
|
|
194
|
+
this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").componentName);
|
|
195
|
+
__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_renderedFirstTime, true, "f");
|
|
196
|
+
}
|
|
197
|
+
const shadowRoot = this.el.shadowRoot;
|
|
198
|
+
const checkboxes = __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_getAllCheckboxes).call(this, shadowRoot);
|
|
199
|
+
if (checkboxes) {
|
|
200
|
+
checkboxes.forEach(checkbox => {
|
|
201
|
+
checkbox.addEventListener("input", __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_handleCheckboxChange).bind(this));
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Suspends or reactivates the shortcuts
|
|
207
|
+
*/
|
|
208
|
+
async suspendShortcuts(suspendShortcuts) {
|
|
209
|
+
if (suspendShortcuts) {
|
|
210
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, "f").suspend = true;
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, "f").suspend = false;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
render() {
|
|
217
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("ch-shortcuts", { src: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_shortcutsSrc, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeBpmTaskDocuments_chShortcutsEl, el, "f")) }), h("section", { class: "section" }, h("div", { class: "main field-group" }, h("div", { class: "documents__header buttons-spacer spacing-body-inline spacing-body-block-start" }, h("ch-combo-box-render", { class: "combo-box documents__suggest", model: this.suggestedDocuments, placeholder: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.suggestPlaceholder, suggest: true, onInput: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler, "f"), onChange: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_listenDocumentSelected, "f"), suggestOptions: {
|
|
218
|
+
alreadyProcessed: false,
|
|
219
|
+
autoExpand: true,
|
|
220
|
+
hideMatchesAndShowNonMatches: false,
|
|
221
|
+
highlightMatchedItems: false,
|
|
222
|
+
matchCase: false,
|
|
223
|
+
regularExpression: false,
|
|
224
|
+
strict: false
|
|
225
|
+
} }), h("span", null, h("button", { class: "button-tertiary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.addDocumentButtonLabel, title: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.addDocumentButtonLabel, onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler, "f") }, h("ch-image", { class: "icon-sm", src: MORE_ICON })), h("button", { class: "button-tertiary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.clearDocumentButtonLabel, title: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments__componentLocale, "f").documents.clearDocumentButtonLabel, onClick: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_handleDeleteButton, "f") }, h("ch-image", { class: "icon-sm", src: DELETE_ICON })))), this.documentsActionListState.length
|
|
226
|
+
? __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderMain, "f").call(this)
|
|
227
|
+
: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderEmptyState, "f").call(this)), __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_renderFooter, "f").call(this))));
|
|
228
|
+
}
|
|
229
|
+
static get assetsDirs() { return ["gx-ide-assets/bpm-task-documents"]; }
|
|
230
|
+
get el() { return this; }
|
|
231
|
+
static get style() { return taskDocumentsCss; }
|
|
232
|
+
}, [1, "gx-ide-bpm-task-documents", {
|
|
233
|
+
"documents": [1040],
|
|
234
|
+
"cancelCallback": [16],
|
|
235
|
+
"confirmCallback": [16],
|
|
236
|
+
"selectDocumentCallback": [16],
|
|
237
|
+
"suggestDocumentsCallback": [16],
|
|
238
|
+
"documentsActionListState": [32],
|
|
239
|
+
"documentName": [32],
|
|
240
|
+
"selectedDocument": [32],
|
|
241
|
+
"suggestedDocuments": [32],
|
|
242
|
+
"suspendShortcuts": [64]
|
|
243
|
+
}]);
|
|
244
|
+
_GxIdeBpmTaskDocuments__componentLocale = new WeakMap(), _GxIdeBpmTaskDocuments_renderedFirstTime = new WeakMap(), _GxIdeBpmTaskDocuments_shortcutsSrc = new WeakMap(), _GxIdeBpmTaskDocuments_chShortcutsEl = new WeakMap(), _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_newEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_newRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_readEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_readRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl = new WeakMap(), _GxIdeBpmTaskDocuments_cancelCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_confirmCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_documentSuggestValueChangedHandler = new WeakMap(), _GxIdeBpmTaskDocuments_handleDeleteButton = new WeakMap(), _GxIdeBpmTaskDocuments_listenDocumentSelected = new WeakMap(), _GxIdeBpmTaskDocuments_objectSelectionChangedHandler = new WeakMap(), _GxIdeBpmTaskDocuments_refreshDocumentsActionListState = new WeakMap(), _GxIdeBpmTaskDocuments_selectDocumentCallbackHandler = new WeakMap(), _GxIdeBpmTaskDocuments_renderActions = new WeakMap(), _GxIdeBpmTaskDocuments_renderEmptyState = new WeakMap(), _GxIdeBpmTaskDocuments_renderFooter = new WeakMap(), _GxIdeBpmTaskDocuments_renderMain = new WeakMap(), _GxIdeBpmTaskDocuments_instances = new WeakSet(), _GxIdeBpmTaskDocuments_getAllCheckboxes = function _GxIdeBpmTaskDocuments_getAllCheckboxes(node) {
|
|
245
|
+
const checkboxes = [];
|
|
246
|
+
node.childNodes.forEach(child => {
|
|
247
|
+
if (child.nodeName === NODENAME) {
|
|
248
|
+
checkboxes.push(child);
|
|
249
|
+
}
|
|
250
|
+
else if (child instanceof HTMLElement) {
|
|
251
|
+
checkboxes.push(...__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_instances, "m", _GxIdeBpmTaskDocuments_getAllCheckboxes).call(this, child));
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
return checkboxes;
|
|
255
|
+
}, _GxIdeBpmTaskDocuments_addDocument = function _GxIdeBpmTaskDocuments_addDocument(documentName) {
|
|
256
|
+
const documentExists = this.documents.some(doc => doc.name === documentName);
|
|
257
|
+
if (!documentExists) {
|
|
258
|
+
this.documents = [
|
|
259
|
+
...this.documents,
|
|
260
|
+
{
|
|
261
|
+
name: documentName,
|
|
262
|
+
deleteEnabled: false,
|
|
263
|
+
deleteRequired: false,
|
|
264
|
+
newEnabled: false,
|
|
265
|
+
newRequired: false,
|
|
266
|
+
readEnabled: false,
|
|
267
|
+
readRequired: false,
|
|
268
|
+
updateEnabled: false,
|
|
269
|
+
updateRequired: false
|
|
270
|
+
}
|
|
271
|
+
];
|
|
272
|
+
__classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_refreshDocumentsActionListState, "f").call(this);
|
|
273
|
+
}
|
|
274
|
+
}, _GxIdeBpmTaskDocuments_handleCheckboxChange = function _GxIdeBpmTaskDocuments_handleCheckboxChange() {
|
|
275
|
+
const data = {
|
|
276
|
+
name: this.selectedDocument.name,
|
|
277
|
+
readEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_readEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
278
|
+
readRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_readRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
279
|
+
newEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_newEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
280
|
+
newRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_newRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
281
|
+
updateEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_updateEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
282
|
+
updateRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_updateRequiredCheckboxEl, "f").value === CHECKED_VALUE,
|
|
283
|
+
deleteEnabled: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_deleteEnabledCheckboxEl, "f").value === CHECKED_VALUE,
|
|
284
|
+
deleteRequired: __classPrivateFieldGet(this, _GxIdeBpmTaskDocuments_deleteRequiredCheckboxEl, "f").value === CHECKED_VALUE
|
|
285
|
+
};
|
|
286
|
+
this.selectedDocument = data;
|
|
287
|
+
this.documents = this.documents.map(doc => doc.name === this.selectedDocument.name ? this.selectedDocument : doc);
|
|
288
|
+
};
|
|
289
|
+
function defineCustomElement$1() {
|
|
290
|
+
if (typeof customElements === "undefined") {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const components = ["gx-ide-bpm-task-documents", "gx-ide-empty-state"];
|
|
294
|
+
components.forEach(tagName => { switch (tagName) {
|
|
295
|
+
case "gx-ide-bpm-task-documents":
|
|
296
|
+
if (!customElements.get(tagName)) {
|
|
297
|
+
customElements.define(tagName, GxIdeBpmTaskDocuments$1);
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case "gx-ide-empty-state":
|
|
301
|
+
if (!customElements.get(tagName)) {
|
|
302
|
+
defineCustomElement$2();
|
|
303
|
+
}
|
|
304
|
+
break;
|
|
305
|
+
} });
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const GxIdeBpmTaskDocuments = GxIdeBpmTaskDocuments$1;
|
|
309
|
+
const defineCustomElement = defineCustomElement$1;
|
|
310
|
+
|
|
311
|
+
export { GxIdeBpmTaskDocuments, defineCustomElement };
|
|
312
|
+
|
|
313
|
+
//# sourceMappingURL=gx-ide-bpm-task-documents.js.map
|