@omegagrid/commands 0.10.23 → 0.10.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/common.d.ts.map +1 -1
- package/dist/common.js +6 -5
- package/dist/common.js.map +1 -1
- package/package.json +4 -4
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGrE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;AAE1D,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,KAAK,aAAa,EAAE,CAanG,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,iBAAiB,EAAE,OAAO,eAAe,KAAG,aAAa,EAE7F,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { msg } from '@omegagrid/localize';
|
|
1
2
|
export const commandFactories = {
|
|
2
3
|
'yes_no': (exec) => [
|
|
3
|
-
{ id: 'Y', name: 'Yes', exec },
|
|
4
|
-
{ id: 'N', name: 'No', exec }
|
|
4
|
+
{ id: 'Y', name: msg('Yes'), exec },
|
|
5
|
+
{ id: 'N', name: msg('No'), exec }
|
|
5
6
|
],
|
|
6
7
|
'apply': (exec) => [
|
|
7
|
-
{ id: 'apply', name: 'Apply', exec },
|
|
8
|
-
{ id: 'cancel', name: 'Cancel' }
|
|
8
|
+
{ id: 'apply', name: msg('Apply'), exec },
|
|
9
|
+
{ id: 'cancel', name: msg('Cancel'), exec }
|
|
9
10
|
],
|
|
10
11
|
'ok': (exec) => [
|
|
11
12
|
{ id: 'ok', name: 'OK', exec },
|
|
12
|
-
{ id: 'cancel', name: 'Cancel' }
|
|
13
|
+
{ id: 'cancel', name: msg('Cancel'), exec }
|
|
13
14
|
]
|
|
14
15
|
};
|
|
15
16
|
export const createCommands = (type, exec) => {
|
package/dist/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAI1C,MAAM,CAAC,MAAM,gBAAgB,GAA2E;IACvG,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QACnB,EAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC;QACjC,EAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAC;KAChC;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB,EAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAC;QACvC,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC;KACzC;IACD,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QACf,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC;QAC5B,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAC;KACzC;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAuB,EAAE,IAAsB,EAAmB,EAAE;IAClG,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["import { CommandFunction, CommandSource } from '@omegagrid/commands';\nimport { msg } from '@omegagrid/localize';\n\nexport type CommonCommandType = 'yes_no' | 'apply' | 'ok';\n\nexport const commandFactories: Record<CommonCommandType, (exec?: CommandFunction) => CommandSource[]> = {\n\t'yes_no': (exec) => [\n\t\t{id: 'Y', name: msg('Yes'), exec},\n\t\t{id: 'N', name: msg('No'), exec}\n\t],\n\t'apply': (exec) => [\n\t\t{id: 'apply', name: msg('Apply'), exec},\n\t\t{id: 'cancel', name: msg('Cancel'), exec}\n\t],\n\t'ok': (exec) => [\n\t\t{id: 'ok', name: 'OK', exec},\n\t\t{id: 'cancel', name: msg('Cancel'), exec}\n\t]\n};\n\nexport const createCommands = (type: CommonCommandType, exec?: CommandFunction): CommandSource[] => {\n\treturn commandFactories[type](exec);\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/commands",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.25",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Command window",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"_prepublish": "yarn test && yarn lint"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@omegagrid/core": "^0.10.
|
|
31
|
-
"@omegagrid/localize": "^0.10.
|
|
32
|
-
"@omegagrid/tabs": "^0.10.
|
|
30
|
+
"@omegagrid/core": "^0.10.25",
|
|
31
|
+
"@omegagrid/localize": "^0.10.25",
|
|
32
|
+
"@omegagrid/tabs": "^0.10.25",
|
|
33
33
|
"lit": "^3.1.1",
|
|
34
34
|
"lit-html": "^3.1.1",
|
|
35
35
|
"ts-debounce": "^4.0.0"
|