@genesislcap/pbc-notify-seed 0.0.9 → 0.0.11

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.
@@ -4,6 +4,21 @@ const checks = require('./checks');
4
4
  const versions = require('./versions.json');
5
5
  const packageJson = require('./package.json');
6
6
 
7
+ const parseEntityList = (entityArray) => {
8
+ if (!entityArray) {
9
+ return "";
10
+ }
11
+ try {
12
+ if (entityArray.length === 0) {
13
+ return ""
14
+ }
15
+ return `listOf(${entityArray.map(entity => JSON.stringify(entity)).join(", ")})`
16
+ } catch (error) {
17
+ console.error("Error parsing `notificationEntities` parameter as JSON:", error.message);
18
+ return "";
19
+ }
20
+ }
21
+
7
22
  module.exports = async (data, utils) => {
8
23
  const { editJSONFile } = utils;
9
24
  const json = editJSONFile(packageJson);
@@ -11,6 +26,8 @@ module.exports = async (data, utils) => {
11
26
  data.date = Date();
12
27
  data.utils = utils;
13
28
  data.versions = versions;
29
+ data.notificationEntitiesKotlin = parseEntityList(data.notificationEntities)
30
+
14
31
  /**
15
32
  * Run checks on project
16
33
  */
@@ -19,5 +36,4 @@ module.exports = async (data, utils) => {
19
36
  addUIDependency(data, '@genesislcap/pbc-notify-ui', versions.dependencies.pbcNotify);
20
37
 
21
38
  addServerDependency(data, {name: 'genesis-notify'}, versions.dependencies.serverDepId);
22
- addServerDependency(data, {name: 'file-server'}, versions.dependencies.fileServerDepId);
23
39
  };
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@genesislcap/pbc-notify-genx",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "@genesislcap/pbc-notify-genx",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "@genesislcap/seed-utils": "~14.173.3",
12
+ "tslib": "^2.3.1"
13
+ },
14
+ "engines": {
15
+ "node": ">=20.0.0"
16
+ }
17
+ },
18
+ "node_modules/@genesislcap/seed-utils": {
19
+ "version": "14.173.3",
20
+ "resolved": "https://registry.npmjs.org/@genesislcap/seed-utils/-/seed-utils-14.173.3.tgz",
21
+ "integrity": "sha512-wbSOO+hU3Pw/0ZQ6HgH20Vt0OF01FsQADufQpCEi1xdWE2BS+DL8l+B4uRS+eXmZyvXhHVvmCS2jjgF2ZLdIsQ==",
22
+ "engines": {
23
+ "node": ">=20.0.0"
24
+ }
25
+ },
26
+ "node_modules/tslib": {
27
+ "version": "2.6.2",
28
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
29
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
30
+ }
31
+ }
32
+ }
@@ -7,7 +7,9 @@
7
7
  },
8
8
  "genxSeedConfig": {
9
9
  "exclude": [
10
- "README.md"
10
+ "README.md",
11
+ "package.json",
12
+ "license.txt"
11
13
  ],
12
14
  "persistAnswers": true,
13
15
  "processFiles": {
@@ -32,7 +34,7 @@
32
34
  }
33
35
  },
34
36
  "dependencies": {
35
- "@genesislcap/seed-utils": "~14.144.0",
37
+ "@genesislcap/seed-utils": "~14.173.3",
36
38
  "tslib": "^2.3.1"
37
39
  }
38
40
  }
package/.genx/prompts.js CHANGED
@@ -1,5 +1,17 @@
1
1
  module.exports = async (inquirer, prevAns = {}) => await prompts(inquirer, prevAns);
2
2
 
3
+ const parseEntityList = (notificationEntities) => {
4
+ if (!notificationEntities){
5
+ return [];
6
+ }
7
+ try {
8
+ return JSON.parse(notificationEntities);
9
+ } catch (error) {
10
+ console.error("Error parsing `notificationEntities` parameter as JSON:", error.message);
11
+ return [];
12
+ }
13
+ }
14
+
3
15
  const prompts = async (inquirer, prevAns) => {
4
16
  const {
5
17
  emailGatewayEnabled = prevAns.emailGatewayEnabled,
@@ -11,7 +23,8 @@ const prompts = async (inquirer, prevAns) => {
11
23
  smtpPw = prevAns.smtpPw,
12
24
  smtpProtocol = prevAns.smtpProtocol,
13
25
  systemDefaultUserName = prevAns.systemDefaultUserName,
14
- systemDefaultEmail = prevAns.systemDefaultEmail
26
+ systemDefaultEmail = prevAns.systemDefaultEmail,
27
+ notificationEntities = prevAns.notificationEntities
15
28
  } = await inquirer.prompt([
16
29
  {
17
30
  name: 'screenGatewayEnabled',
@@ -82,6 +95,13 @@ const prompts = async (inquirer, prevAns) => {
82
95
  message: 'System Default Email',
83
96
  default: prevAns.systemDefaultEmail || "*",
84
97
  when: ({emailGatewayEnabled}) => emailGatewayEnabled === true && prevAns.systemDefaultEmail === undefined,
98
+ },
99
+ {
100
+ name: 'notificationEntities',
101
+ type: 'input',
102
+ message: 'Enter the entity names that users can use to create notification rules (config in json format)',
103
+ default: '[]',
104
+ when: !prevAns.notificationEntities
85
105
  }
86
106
 
87
107
  ]);
@@ -95,6 +115,7 @@ const prompts = async (inquirer, prevAns) => {
95
115
  smtpPw,
96
116
  smtpProtocol,
97
117
  systemDefaultUserName,
98
- systemDefaultEmail
118
+ systemDefaultEmail,
119
+ notificationEntities: parseEntityList(notificationEntities)
99
120
  };
100
121
  };
@@ -4,8 +4,8 @@
4
4
  "gsf": "7.*"
5
5
  },
6
6
  "dependencies": {
7
- "pbcNotify": "1.0.24",
8
- "serverDepId": "7.1.3",
9
- "fileServerDepId": "7.1.0"
7
+ "pbcNotify": "1.0.30",
8
+ "serverDepId": "7.2.0",
9
+ "fileServerDepId": "7.2.0"
10
10
  }
11
11
  }
@@ -36,7 +36,7 @@ export const inboxFlyout: AppElement = {
36
36
  ?closed=${() => !store.inboxDisplayState}
37
37
  data-pbc-asset-id="inbox-flyout"
38
38
  >
39
- <div slot="title">Alerts</div>
39
+ <div slot="title">Alerts Center</div>
40
40
  <foundation-inbox></foundation-inbox>
41
41
  </zero-flyout>
42
42
  `,
@@ -51,15 +51,15 @@ export const notificationListener: AppElement = {
51
51
  <zero-notification-listener
52
52
  resource-name="ALL_NOTIFY_ALERT_RECORDS"
53
53
  :toastButtons="${(): ToastButton[] => [
54
- {
55
- condition: ({ details }) => details.NOTIFY_SEVERITY !== 'Warning',
56
- action: ({ details, buttonElement, toastElement }) => {
57
- console.log({ details, buttonElement, toastElement });
58
- toastElement.close();
59
- },
60
- appearance: 'secondary-orange',
61
- placeholder: 'button NOT for warnings',
62
- },
54
+ // {
55
+ // condition: ({ details }) => details.NOTIFY_SEVERITY !== 'Warning',
56
+ // action: ({ details, buttonElement, toastElement }) => {
57
+ // console.log({ details, buttonElement, toastElement });
58
+ // toastElement.close();
59
+ // },
60
+ // appearance: 'secondary-orange',
61
+ // placeholder: 'button for warnings',
62
+ // },
63
63
  ]}"
64
64
  data-pbc-asset-id="notification-listener"
65
65
  ></zero-notification-listener>
@@ -6,14 +6,14 @@ import type { AppMetadata } from '@genesislcap/foundation-shell/app';
6
6
  export const metadata: AppMetadata = {
7
7
  name: '@genesislcap/pbc-notify-ui',
8
8
  description: 'Genesis Notify PBC',
9
- version: '0.0.9',
9
+ version: '0.0.11',
10
10
  prerequisites: {
11
11
  '@genesislcap/foundation-ui': '14.*',
12
12
  gsf: '7.*',
13
13
  },
14
14
  dependencies: {
15
- '@genesislcap/pbc-notify-ui': '1.0.24',
15
+ '@genesislcap/pbc-notify-ui': '1.0.30',
16
16
  '@genesislcap/foundation-notifications': '14.*',
17
- serverDepId: '7.1.3',
17
+ serverDepId: '7.2.0',
18
18
  },
19
19
  };
@@ -77,7 +77,6 @@ export const notificationsDashboard: AppRoute = {
77
77
  name: 'bell',
78
78
  variant: 'solid',
79
79
  },
80
- placementIndex: 65,
81
80
  },
82
81
  ],
83
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-notify-seed",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Genesis Notify PBC",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "publishConfig": {
@@ -0,0 +1,26 @@
1
+ /**
2
+ * System : Genesis Business Library
3
+ * Sub-System : multi-pro-code-test Configuration
4
+ * Version : 1.0
5
+ * Copyright : (c) Genesis
6
+ * Date : 2022-03-18
7
+ * Function : Provide system definition config for multi-pro-code-test.
8
+ *
9
+ * Modification History
10
+ */
11
+ systemDefinition {
12
+ global {
13
+ item("STORAGE_STRATEGY", "LOCAL")
14
+ item("LOCAL_STORAGE_FOLDER", "LOCAL_STORAGE")
15
+
16
+ {{#if notificationEntitiesKotlin}}
17
+ //List out the tables and view names that users can use to create notification rules
18
+ item("NOTIFY_ENTITY_LIST", {{{notificationEntitiesKotlin}}})
19
+ {{/if}}
20
+ }
21
+
22
+ systems {
23
+
24
+ }
25
+
26
+ }