jpf 4.0.12 → 4.0.13

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.
@@ -0,0 +1,13 @@
1
+ import { View } from "../../../framework/View";
2
+ import { ButtonView } from "../../html/Button/Button";
3
+ export interface DialogOptions {
4
+ content?: View;
5
+ buttons?: Array<ButtonView>;
6
+ }
7
+ export declare class Dialog {
8
+ constructor(options: DialogOptions);
9
+ private options;
10
+ private dialog;
11
+ open(): void;
12
+ close(): void;
13
+ }
@@ -0,0 +1,46 @@
1
+ import * as kendo from "@progress/kendo-ui/js/kendo.window.js";
2
+ import { DivView } from "../../html/Div/Div";
3
+ export class Dialog {
4
+ constructor(options) {
5
+ this.options = options;
6
+ }
7
+ options;
8
+ dialog;
9
+ open() {
10
+ this.dialog = new kendo.ui.Window(document.createElement("div"), {
11
+ modal: true,
12
+ maxHeight: window.innerHeight * 0.9,
13
+ maxWidth: window.innerWidth * 0.9,
14
+ open: (x) => {
15
+ console.log(x);
16
+ this.dialog.center();
17
+ const wrapper = this.dialog.wrapper.get(0);
18
+ if (this.options.content) {
19
+ const content = wrapper.querySelector(".k-window-content");
20
+ if (content) {
21
+ content.appendChild(this.options.content.render());
22
+ }
23
+ }
24
+ if (this.options.buttons) {
25
+ const footer = new DivView({
26
+ children: this.options.buttons,
27
+ style: {
28
+ display: "flex",
29
+ justifyContent: "flex-end",
30
+ borderTop: "1px solid gray",
31
+ padding: "5px"
32
+ }
33
+ });
34
+ wrapper.appendChild(footer.render());
35
+ }
36
+ }
37
+ });
38
+ this.dialog.open();
39
+ }
40
+ close() {
41
+ if (this.dialog) {
42
+ this.dialog.close();
43
+ }
44
+ }
45
+ }
46
+ //# sourceMappingURL=Dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/controls/kendo/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,uCAAuC,CAAC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,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;iBACxC;YACL,CAAC;SACJ,CACJ,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvB,CAAC;IAED,KAAK;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;SACvB;IACL,CAAC;CACJ"}
@@ -1,5 +1,6 @@
1
1
  export * from "./Culture/Culture";
2
2
  export * from "./DataSource/DataSource";
3
+ export * from "./Dialog/Dialog";
3
4
  export * from "./Editor/Editor";
4
5
  export * from "./Grid/Grid";
5
6
  export * from "./Menu/Menu";
@@ -1,5 +1,6 @@
1
1
  export * from "./Culture/Culture";
2
2
  export * from "./DataSource/DataSource";
3
+ export * from "./Dialog/Dialog";
3
4
  export * from "./Editor/Editor";
4
5
  export * from "./Grid/Grid";
5
6
  export * from "./Menu/Menu";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/kendo/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/kendo/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jpf",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "description": "Javascript Presentation Foundation",
5
5
  "keywords": [
6
6
  "mvvm",
@@ -35,7 +35,7 @@
35
35
  "npmAuditFix": "npm audit fix",
36
36
  "npmAuditFixForce": "npm audit fix --force",
37
37
  "npmCacheClean": "npm cache clean --force",
38
- "npmPublish": "tsc & npm publish --otp=845533",
38
+ "npmPublish": "tsc & npm publish --otp=903164",
39
39
  "npmLogin": "npm login",
40
40
  "npmWhoAmI": "npm whoami",
41
41
  "npmAddUser": "npm adduser",