uicore-ts 1.0.201 → 1.0.205

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 @@
1
+ export default function toPx(element: HTMLElement, value: string, prop?: string, force?: boolean): number;
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var SizeConverter_exports = {};
20
+ __export(SizeConverter_exports, {
21
+ default: () => toPx
22
+ });
23
+ module.exports = __toCommonJS(SizeConverter_exports);
24
+ var import_UIObject = require("./UIObject");
25
+ let preCalculated = false;
26
+ let computedValueBug = false;
27
+ const defaultView = document.defaultView;
28
+ const getComputedStyle = defaultView && defaultView.getComputedStyle;
29
+ const runit = /^(-?[\d+\.\-]+)([a-z]+|%)$/i;
30
+ const convert = {
31
+ mm2px: 1 / 25.4,
32
+ cm2px: 1 / 2.54,
33
+ pt2px: 1 / 72,
34
+ pc2px: 1 / 6,
35
+ in2px: void 0,
36
+ mozmm2px: void 0
37
+ };
38
+ function toPx(element, value, prop = "width", force = import_UIObject.NO) {
39
+ if (!preCalculated) {
40
+ preCalculated = true;
41
+ preCalculate();
42
+ }
43
+ const rem = /r?em/i;
44
+ const unit = (value.match(runit) || [])[2];
45
+ let conversion = unit === "px" ? 1 : convert[`${unit}2px`];
46
+ let result;
47
+ if (conversion || rem.test(unit) && !force) {
48
+ element = conversion ? element : unit === "rem" ? document.documentElement : prop === "fontSize" ? element.parentNode || element : element;
49
+ conversion = conversion || parseFloat(curCSS(element, "fontSize"));
50
+ result = parseFloat(value) * conversion;
51
+ } else {
52
+ const style = element.style;
53
+ const inlineValue = style[prop];
54
+ try {
55
+ style[prop] = value;
56
+ } catch (e) {
57
+ return 0;
58
+ }
59
+ result = !style[prop] ? 0 : parseFloat(curCSS(element, prop));
60
+ style[prop] = inlineValue !== void 0 ? inlineValue : null;
61
+ }
62
+ return result;
63
+ }
64
+ function preCalculate() {
65
+ let testElem = document.createElement("test");
66
+ const docElement = document.documentElement;
67
+ docElement.appendChild(testElem);
68
+ if (getComputedStyle) {
69
+ testElem.style.marginTop = "1%";
70
+ computedValueBug = getComputedStyle(testElem).marginTop === "1%";
71
+ }
72
+ [
73
+ "mozmm2px",
74
+ "in2px",
75
+ "pc2px",
76
+ "pt2px",
77
+ "cm2px",
78
+ "mm2px"
79
+ ].forEach(
80
+ (conversion) => convert[conversion] = convert[conversion] ? convert[conversion] * convert.in2px : toPx(testElem, `_${conversion}`)
81
+ );
82
+ docElement.removeChild(testElem);
83
+ testElem = void 0;
84
+ }
85
+ function curCSS(elem, prop) {
86
+ const pixel = elem.style[`pixel${prop.charAt(0).toUpperCase()}${prop.slice(1)}`];
87
+ let value;
88
+ if (getComputedStyle) {
89
+ value = getComputedStyle(elem)[prop];
90
+ } else if (pixel) {
91
+ value = pixel + "px";
92
+ } else if (prop === "fontSize") {
93
+ value = toPx(elem, "1em", "left", 1) + "px";
94
+ } else {
95
+ value = elem.currentStyle[prop];
96
+ }
97
+ const unit = (value.match(runit) || [])[2];
98
+ if (unit === "%" && computedValueBug) {
99
+ if (/^top|bottom/.test(prop)) {
100
+ const parent = elem.parentNode || elem;
101
+ const innerHeight = [
102
+ "borderBottom",
103
+ "borderTop",
104
+ "paddingBottom",
105
+ "paddingTop"
106
+ ].reduce(
107
+ (height, prop2) => height - parseFloat(curCSS(parent, prop2)),
108
+ parent.offsetHeight
109
+ );
110
+ value = parseFloat(value) / 100 * innerHeight + "px";
111
+ } else {
112
+ value = toPx(elem, value);
113
+ }
114
+ } else if ((value === "auto" || unit && unit !== "px") && getComputedStyle) {
115
+ value = 0;
116
+ } else if (unit && unit !== "px" && !getComputedStyle) {
117
+ value = toPx(elem, value) + "px";
118
+ }
119
+ return value;
120
+ }
121
+ // Annotate the CommonJS export names for ESM import in node:
122
+ 0 && (module.exports = {});
123
+ //# sourceMappingURL=SizeConverter.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../scripts/SizeConverter.ts"],
4
+ "sourcesContent": ["\n// https://gist.github.com/wKich/25b4a7b23a1f990f8c7d09fec7585b53\n\n// imported from https://github.com/heygrady/Units\n\n\nimport { NO } from \"./UIObject\"\n\n\nlet preCalculated = false;\nlet computedValueBug = false;\n\nconst defaultView = document.defaultView;\nconst getComputedStyle = defaultView && defaultView.getComputedStyle;\nconst runit = /^(-?[\\d+\\.\\-]+)([a-z]+|%)$/i;\nconst convert = {\n mm2px: 1/25.4,\n cm2px: 1/2.54,\n pt2px: 1/72,\n pc2px: 1/6,\n in2px: undefined,\n mozmm2px: undefined,\n};\n\n// convert a value to pixels\n// use width as the default property, or specify your own\nexport default function toPx(element: HTMLElement, value: string, prop = \"width\", force: boolean = NO): number {\n if (!preCalculated) {\n preCalculated = true;\n preCalculate();\n }\n \n const rem = /r?em/i;\n const unit = (value.match(runit) || [])[2];\n // @ts-ignore\n let conversion = unit === 'px' ? 1 : convert[`${unit}2px`];\n let result;\n \n if (conversion || rem.test(unit) && !force) {\n // calculate known conversions immediately\n // find the correct element for absolute units or rem or fontSize + em or em\n // @ts-ignore\n element = conversion\n ? element\n : unit === 'rem'\n ? document.documentElement\n : prop === 'fontSize'\n ? element.parentNode || element\n : element;\n \n // use the pre-calculated\n // conversion or fontSize of the element for rem and em\n conversion = conversion || parseFloat(curCSS(element, 'fontSize'));\n \n // multiply the value by the conversion\n result = parseFloat(value) * conversion;\n } else {\n // begin \"the awesome hack by Dean Edwards\"\n // @see http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n \n // remember the current style\n const style = element.style;\n // @ts-ignore\n const inlineValue = style[prop];\n \n // set the style on the target element\n try {\n // @ts-ignore\n style[prop] = value;\n } catch (e) {\n // IE 8 and below throw an exception when setting unsupported units\n return 0;\n }\n \n // read the computed value\n // if style is nothing we probably set an unsupported unit\n // @ts-ignore\n result = !style[prop] ? 0 : parseFloat(curCSS(element, prop));\n \n // reset the style back to what it was or blank it out\n // @ts-ignore\n style[prop] = inlineValue !== undefined ? inlineValue : null;\n }\n \n // return a number\n return result;\n}\n\nfunction preCalculate() {\n \n // create a test element\n let testElem: HTMLElement | undefined = document.createElement('test');\n const docElement = document.documentElement;\n \n // add the test element to the dom\n docElement.appendChild(testElem);\n \n // test for the WebKit getComputedStyle bug\n // @see http://bugs.jquery.com/ticket/10639\n if (getComputedStyle) {\n // add a percentage margin and measure it\n testElem.style.marginTop = '1%';\n computedValueBug = getComputedStyle(testElem).marginTop === '1%';\n }\n \n // pre-calculate absolute unit conversions\n \n [\n 'mozmm2px',\n 'in2px',\n 'pc2px',\n 'pt2px',\n 'cm2px',\n 'mm2px',\n ].forEach(\n // @ts-ignore\n (conversion) => convert[conversion] = convert[conversion]\n // @ts-ignore\n ? convert[conversion] * convert.in2px\n // @ts-ignore\n : toPx(testElem, `_${conversion}`)\n );\n \n // remove the test element from the DOM and delete it\n docElement.removeChild(testElem);\n \n testElem = undefined;\n}\n\n// return the computed value of a CSS property\nfunction curCSS(elem: Element, prop: string): any {\n // @ts-ignore\n const pixel = elem.style[\n `pixel${prop.charAt(0).toUpperCase()}${prop.slice(1)}`\n ];\n let value;\n \n if (getComputedStyle) {\n // FireFox, Chrome/Safari, Opera and IE9+\n // @ts-ignore\n value = getComputedStyle(elem)[prop];\n } else if (pixel) {\n // IE and Opera support pixel shortcuts for\n // top, bottom, left, right, height, width\n // WebKit supports pixel shortcuts only when an absolute unit is used\n value = pixel + 'px';\n } else if (prop === 'fontSize') {\n // correct IE issues with font-size\n // @see http://bugs.jquery.com/ticket/760\n // @ts-ignore\n value = toPx(elem, '1em', 'left', 1) + 'px';\n } else {\n // IE 8 and below return the specified style\n // @ts-ignore\n value = elem.currentStyle[prop];\n }\n \n // check the unit\n const unit = (value.match(runit)||[])[2];\n if (unit === '%' && computedValueBug) {\n // WebKit won't convert percentages for\n // top, bottom, left, right, margin and text-indent\n if (/^top|bottom/.test(prop)) {\n // Top and bottom require measuring the innerHeight of the parent.\n const parent = elem.parentNode || elem;\n const innerHeight = [\n 'borderBottom', 'borderTop', 'paddingBottom', 'paddingTop',\n ].reduce(\n // @ts-ignore\n (height, prop) => height - parseFloat(curCSS(parent, prop)),\n // @ts-ignore\n parent.offsetHeight\n );\n value = parseFloat(value) / 100 * innerHeight + 'px';\n } else {\n // This fixes margin, left, right and text-indent\n // @see https://bugs.webkit.org/show_bug.cgi?id=29084\n // @see http://bugs.jquery.com/ticket/10639\n // @ts-ignore\n value = toPx(elem, value);\n }\n } else if (\n (value === 'auto' || (unit && unit !== 'px'))\n && getComputedStyle\n ) {\n // WebKit and Opera will return auto in some cases\n // Firefox will pass back an unaltered value when\n // it can't be set, like top on a static element\n value = 0;\n } else if (unit && unit !== 'px' && !getComputedStyle) {\n // IE 8 and below won't convert units for us\n // try to convert using a prop that will return pixels\n // this will be accurate for everything\n // (except font-size and some percentages)\n // @ts-ignore\n value = toPx(elem, value) + 'px';\n }\n return value;\n}\n\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,sBAAmB;AAGnB,IAAI,gBAAgB;AACpB,IAAI,mBAAmB;AAEvB,MAAM,cAAc,SAAS;AAC7B,MAAM,mBAAmB,eAAe,YAAY;AACpD,MAAM,QAAQ;AACd,M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;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
18
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
25
  var __async = (__this, __arguments, generator) => {
20
26
  return new Promise((resolve, reject) => {
@@ -42,6 +48,7 @@ __export(UIView_exports, {
42
48
  });
43
49
  module.exports = __toCommonJS(UIView_exports);
44
50
  var import_ClientCheckers = require("./ClientCheckers");
51
+ var import_SizeConverter = __toESM(require("./SizeConverter"));
45
52
  var import_UIColor = require("./UIColor");
46
53
  var import_UICore = require("./UICore");
47
54
  var import_UICoreExtensions = require("./UICoreExtensions");
@@ -394,16 +401,16 @@ const _UIView = class extends import_UIObject.UIObject {
394
401
  calculateAndSetViewFrame() {
395
402
  }
396
403
  get frame() {
397
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
398
- let result;
404
+ var _a;
405
+ let result = (_a = this._frame) == null ? void 0 : _a.copy();
399
406
  if (!result) {
400
407
  result = new import_UIRectangle.UIRectangle(
401
- (_b = (_a = this._frame) == null ? void 0 : _a.x) != null ? _b : this.viewHTMLElement.offsetLeft,
402
- (_d = (_c = this._frame) == null ? void 0 : _c.y) != null ? _d : this.viewHTMLElement.offsetTop,
403
- (_f = (_e = this._frame) == null ? void 0 : _e.height) != null ? _f : this.viewHTMLElement.clientHeight,
404
- (_h = (_g = this._frame) == null ? void 0 : _g.width) != null ? _h : this.viewHTMLElement.clientWidth
408
+ this.viewHTMLElement.offsetLeft,
409
+ this.viewHTMLElement.offsetTop,
410
+ this.viewHTMLElement.offsetHeight,
411
+ this.viewHTMLElement.offsetWidth
405
412
  );
406
- result.zIndex = (_j = (_i = this._frame) == null ? void 0 : _i.zIndex) != null ? _j : 0;
413
+ result.zIndex = 0;
407
414
  }
408
415
  return result;
409
416
  }
@@ -1133,6 +1140,26 @@ const _UIView = class extends import_UIObject.UIObject {
1133
1140
  var _a2;
1134
1141
  return (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.YES);
1135
1142
  };
1143
+ const frameWasChanged = () => {
1144
+ var _a2;
1145
+ const frame = this.frame;
1146
+ frame.height = [
1147
+ [
1148
+ frame.height,
1149
+ (0, import_SizeConverter.default)(this.viewHTMLElement, this.style.minHeight)
1150
+ ].max(),
1151
+ (0, import_SizeConverter.default)(this.viewHTMLElement, this.style.maxHeight)
1152
+ ].min();
1153
+ frame.width = [
1154
+ [
1155
+ frame.width,
1156
+ (0, import_SizeConverter.default)(this.viewHTMLElement, this.style.minWidth)
1157
+ ].max(),
1158
+ (0, import_SizeConverter.default)(this.viewHTMLElement, this.style.maxWidth)
1159
+ ].min();
1160
+ this.frame = frame;
1161
+ (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1162
+ };
1136
1163
  const leftEdge = new _UIView().configuredWithObject({
1137
1164
  _viewHTMLElement: {
1138
1165
  className: "leftEdge",
@@ -1156,10 +1183,9 @@ const _UIView = class extends import_UIObject.UIObject {
1156
1183
  pausesPointerEvents: import_UIObject.YES
1157
1184
  });
1158
1185
  leftEdge.controlEventTargetAccumulator.PointerDrag = (sender, event) => {
1159
- var _a2;
1160
1186
  if (event instanceof MouseEvent) {
1161
1187
  this.frame = this.frame.rectangleWithInsets(event.movementX / _UIView.pageScale, 0, 0, 0);
1162
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1188
+ frameWasChanged();
1163
1189
  }
1164
1190
  };
1165
1191
  leftEdge.controlEventTargetAccumulator.PointerUp = pointerUpFunction;
@@ -1186,10 +1212,9 @@ const _UIView = class extends import_UIObject.UIObject {
1186
1212
  pausesPointerEvents: import_UIObject.YES
1187
1213
  });
1188
1214
  rightEdge.controlEventTargetAccumulator.PointerDrag = (sender, event) => {
1189
- var _a2;
1190
1215
  if (event instanceof MouseEvent) {
1191
1216
  this.frame = this.frame.rectangleWithInsets(0, -event.movementX / _UIView.pageScale, 0, 0);
1192
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1217
+ frameWasChanged();
1193
1218
  }
1194
1219
  };
1195
1220
  rightEdge.controlEventTargetAccumulator.PointerUp = pointerUpFunction;
@@ -1216,10 +1241,9 @@ const _UIView = class extends import_UIObject.UIObject {
1216
1241
  pausesPointerEvents: import_UIObject.YES
1217
1242
  });
1218
1243
  bottomEdge.controlEventTargetAccumulator.PointerDrag = (sender, event) => {
1219
- var _a2;
1220
1244
  if (event instanceof MouseEvent) {
1221
1245
  this.frame = this.frame.rectangleWithInsets(0, 0, -event.movementY / _UIView.pageScale, 0);
1222
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1246
+ frameWasChanged();
1223
1247
  }
1224
1248
  };
1225
1249
  bottomEdge.controlEventTargetAccumulator.PointerUp = pointerUpFunction;
@@ -1246,10 +1270,9 @@ const _UIView = class extends import_UIObject.UIObject {
1246
1270
  pausesPointerEvents: import_UIObject.YES
1247
1271
  });
1248
1272
  topEdge.controlEventTargetAccumulator.PointerDrag = (sender, event) => {
1249
- var _a2;
1250
1273
  if (event instanceof MouseEvent) {
1251
1274
  this.frame = this.frame.rectangleWithInsets(0, 0, 0, event.movementY / _UIView.pageScale);
1252
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1275
+ frameWasChanged();
1253
1276
  }
1254
1277
  };
1255
1278
  topEdge.controlEventTargetAccumulator.PointerUp = pointerUpFunction;
@@ -1277,7 +1300,6 @@ const _UIView = class extends import_UIObject.UIObject {
1277
1300
  pausesPointerEvents: import_UIObject.YES
1278
1301
  });
1279
1302
  const pointerDragTLFunction = (sender, event) => {
1280
- var _a2;
1281
1303
  if (event instanceof MouseEvent) {
1282
1304
  this.frame = this.frame.rectangleWithInsets(
1283
1305
  event.movementX / _UIView.pageScale,
@@ -1285,7 +1307,7 @@ const _UIView = class extends import_UIObject.UIObject {
1285
1307
  0,
1286
1308
  event.movementY / _UIView.pageScale
1287
1309
  );
1288
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1310
+ frameWasChanged();
1289
1311
  }
1290
1312
  };
1291
1313
  topLeftCornerTop.controlEventTargetAccumulator.PointerDrag = pointerDragTLFunction;
@@ -1339,7 +1361,6 @@ const _UIView = class extends import_UIObject.UIObject {
1339
1361
  pausesPointerEvents: import_UIObject.YES
1340
1362
  });
1341
1363
  const pointerDragBLFunction = (sender, event) => {
1342
- var _a2;
1343
1364
  if (event instanceof MouseEvent) {
1344
1365
  this.frame = this.frame.rectangleWithInsets(
1345
1366
  event.movementX / _UIView.pageScale,
@@ -1347,7 +1368,7 @@ const _UIView = class extends import_UIObject.UIObject {
1347
1368
  -event.movementY / _UIView.pageScale,
1348
1369
  0
1349
1370
  );
1350
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1371
+ frameWasChanged();
1351
1372
  }
1352
1373
  };
1353
1374
  bottomLeftCornerLeft.controlEventTargetAccumulator.PointerDrag = pointerDragBLFunction;
@@ -1401,7 +1422,6 @@ const _UIView = class extends import_UIObject.UIObject {
1401
1422
  pausesPointerEvents: import_UIObject.YES
1402
1423
  });
1403
1424
  const pointerDragBRFunction = (sender, event) => {
1404
- var _a2;
1405
1425
  if (event instanceof MouseEvent) {
1406
1426
  this.frame = this.frame.rectangleWithInsets(
1407
1427
  0,
@@ -1409,7 +1429,7 @@ const _UIView = class extends import_UIObject.UIObject {
1409
1429
  -event.movementY / _UIView.pageScale,
1410
1430
  0
1411
1431
  );
1412
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1432
+ frameWasChanged();
1413
1433
  }
1414
1434
  };
1415
1435
  bottomRightCornerBottom.controlEventTargetAccumulator.PointerDrag = pointerDragBRFunction;
@@ -1463,7 +1483,6 @@ const _UIView = class extends import_UIObject.UIObject {
1463
1483
  pausesPointerEvents: import_UIObject.YES
1464
1484
  });
1465
1485
  const pointerDragTRFunction = (sender, event) => {
1466
- var _a2;
1467
1486
  if (event instanceof MouseEvent) {
1468
1487
  this.frame = this.frame.rectangleWithInsets(
1469
1488
  0,
@@ -1471,7 +1490,7 @@ const _UIView = class extends import_UIObject.UIObject {
1471
1490
  0,
1472
1491
  event.movementY / _UIView.pageScale
1473
1492
  );
1474
- (_a2 = optionalParameters.viewDidChangeToSize) == null ? void 0 : _a2.call(optionalParameters, this, import_UIObject.NO);
1493
+ frameWasChanged();
1475
1494
  }
1476
1495
  };
1477
1496
  topRightCornerRight.controlEventTargetAccumulator.PointerDrag = pointerDragTRFunction;