@omegagrid/commands 0.10.104 → 0.10.105
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 +1 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +4 -0
- package/dist/common.js.map +1 -1
- package/package.json +4 -4
package/dist/common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandFunction, CommandSource } from '@omegagrid/commands';
|
|
2
|
-
export type CommonCommandType = 'yes_no' | 'apply' | 'ok' | 'save_discard_cancel';
|
|
2
|
+
export type CommonCommandType = 'yes_no' | 'apply' | 'ok' | 'save_discard_cancel' | 'discard_cancel';
|
|
3
3
|
export declare const commandFactories: Record<CommonCommandType, (exec?: CommandFunction) => CommandSource[]>;
|
|
4
4
|
export declare const createCommands: (type: CommonCommandType, exec?: CommandFunction) => CommandSource[];
|
|
5
5
|
//# sourceMappingURL=common.d.ts.map
|
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;AAGrE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,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,GAAG,qBAAqB,GAAG,gBAAgB,CAAC;AAErG,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,KAAK,aAAa,EAAE,CAsBnG,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,iBAAiB,EAAE,OAAO,eAAe,KAAG,aAAa,EAE7F,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -9,6 +9,10 @@ export const commandFactories = {
|
|
|
9
9
|
{ id: 'discard', name: msg('Discard changes'), icon: { icon: 'trash', color: 'var(--og-colortype-red-background-color)' }, exec },
|
|
10
10
|
{ id: 'cancel', name: msg('Cancel'), icon: 'times', exec }
|
|
11
11
|
],
|
|
12
|
+
'discard_cancel': (exec) => [
|
|
13
|
+
{ id: 'discard', name: msg('Discard changes'), icon: { icon: 'trash', color: 'var(--og-colortype-red-background-color)' }, exec },
|
|
14
|
+
{ id: 'cancel', name: msg('Cancel'), icon: 'times', exec }
|
|
15
|
+
],
|
|
12
16
|
'apply': (exec) => [
|
|
13
17
|
{ id: 'apply', name: msg('Apply'), exec },
|
|
14
18
|
{ id: 'cancel', name: msg('Cancel'), exec }
|
package/dist/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,EAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,4CAA4C,EAAC,EAAE,IAAI,EAAC;QACxH,EAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,0CAA0C,EAAC,EAAE,IAAI,EAAC;QAC7H,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;KACxD;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' | 'save_discard_cancel';\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'save_discard_cancel': (exec) => [\n\t\t{id: 'save', name: msg('Save changes'), icon: {icon: 'save', color: 'var(--og-colortype-green-background-color)'}, exec},\n\t\t{id: 'discard', name: msg('Discard changes'), icon: {icon: 'trash', color: 'var(--og-colortype-red-background-color)'}, exec},\n\t\t{id: 'cancel', name: msg('Cancel'), icon: 'times', 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"]}
|
|
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,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,EAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,4CAA4C,EAAC,EAAE,IAAI,EAAC;QACxH,EAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,0CAA0C,EAAC,EAAE,IAAI,EAAC;QAC7H,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;KACxD;IACD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3B,EAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,0CAA0C,EAAC,EAAE,IAAI,EAAC;QAC7H,EAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC;KACxD;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' | 'save_discard_cancel' | 'discard_cancel';\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'save_discard_cancel': (exec) => [\n\t\t{id: 'save', name: msg('Save changes'), icon: {icon: 'save', color: 'var(--og-colortype-green-background-color)'}, exec},\n\t\t{id: 'discard', name: msg('Discard changes'), icon: {icon: 'trash', color: 'var(--og-colortype-red-background-color)'}, exec},\n\t\t{id: 'cancel', name: msg('Cancel'), icon: 'times', exec}\n\t],\n\t'discard_cancel': (exec) => [\n\t\t{id: 'discard', name: msg('Discard changes'), icon: {icon: 'trash', color: 'var(--og-colortype-red-background-color)'}, exec},\n\t\t{id: 'cancel', name: msg('Cancel'), icon: 'times', 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.105",
|
|
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.105",
|
|
31
|
+
"@omegagrid/localize": "^0.10.105",
|
|
32
|
+
"@omegagrid/tabs": "^0.10.105",
|
|
33
33
|
"lit": "^3.1.1",
|
|
34
34
|
"lit-html": "^3.1.1",
|
|
35
35
|
"ts-debounce": "^4.0.0"
|