@fluentui/react-slider 9.0.0-alpha.8 → 9.0.0-beta.10
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/CHANGELOG.json +991 -10
- package/CHANGELOG.md +283 -11
- package/README.md +1 -2
- package/dist/react-slider.d.ts +36 -67
- package/lib/components/Slider/Slider.d.ts +4 -3
- package/lib/components/Slider/Slider.js +8 -8
- package/lib/components/Slider/Slider.js.map +1 -1
- package/lib/components/Slider/Slider.types.d.ts +26 -55
- package/lib/components/Slider/Slider.types.js.map +1 -1
- package/lib/components/Slider/index.d.ts +2 -2
- package/lib/components/Slider/index.js +2 -2
- package/lib/components/Slider/index.js.map +1 -1
- package/lib/components/Slider/renderSlider.d.ts +1 -1
- package/lib/components/Slider/renderSlider.js +10 -8
- package/lib/components/Slider/renderSlider.js.map +1 -1
- package/lib/components/Slider/useSlider.d.ts +2 -6
- package/lib/components/Slider/useSlider.js +57 -85
- package/lib/components/Slider/useSlider.js.map +1 -1
- package/lib/components/Slider/useSliderState.d.ts +1 -1
- package/lib/components/Slider/useSliderState.js +49 -183
- package/lib/components/Slider/useSliderState.js.map +1 -1
- package/lib/components/Slider/useSliderStyles.d.ts +19 -1
- package/lib/components/Slider/useSliderStyles.js +175 -297
- package/lib/components/Slider/useSliderStyles.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Slider.js +1 -1
- package/lib-commonjs/components/Slider/Slider.d.ts +4 -3
- package/lib-commonjs/components/Slider/Slider.js +9 -9
- package/lib-commonjs/components/Slider/Slider.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.types.d.ts +26 -55
- package/lib-commonjs/components/Slider/index.d.ts +2 -2
- package/lib-commonjs/components/Slider/index.js +24 -3
- package/lib-commonjs/components/Slider/index.js.map +1 -1
- package/lib-commonjs/components/Slider/renderSlider.d.ts +1 -1
- package/lib-commonjs/components/Slider/renderSlider.js +14 -14
- package/lib-commonjs/components/Slider/renderSlider.js.map +1 -1
- package/lib-commonjs/components/Slider/useSlider.d.ts +2 -6
- package/lib-commonjs/components/Slider/useSlider.js +60 -89
- package/lib-commonjs/components/Slider/useSlider.js.map +1 -1
- package/lib-commonjs/components/Slider/useSliderState.d.ts +1 -1
- package/lib-commonjs/components/Slider/useSliderState.js +55 -191
- package/lib-commonjs/components/Slider/useSliderState.js.map +1 -1
- package/lib-commonjs/components/Slider/useSliderStyles.d.ts +19 -1
- package/lib-commonjs/components/Slider/useSliderStyles.js +177 -299
- package/lib-commonjs/components/Slider/useSliderStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +0 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +20 -14
- package/Spec.md +0 -216
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib/utils/calculateSteps.d.ts +0 -5
- package/lib/utils/calculateSteps.js +0 -27
- package/lib/utils/calculateSteps.js.map +0 -1
- package/lib/utils/clamp.d.ts +0 -8
- package/lib/utils/clamp.js +0 -11
- package/lib/utils/clamp.js.map +0 -1
- package/lib/utils/getKeydownValue.d.ts +0 -6
- package/lib/utils/getKeydownValue.js +0 -39
- package/lib/utils/getKeydownValue.js.map +0 -1
- package/lib/utils/getMarkPercent.d.ts +0 -7
- package/lib/utils/getMarkPercent.js +0 -22
- package/lib/utils/getMarkPercent.js.map +0 -1
- package/lib/utils/getMarkValues.d.ts +0 -8
- package/lib/utils/getMarkValues.js +0 -24
- package/lib/utils/getMarkValues.js.map +0 -1
- package/lib/utils/getPercent.d.ts +0 -8
- package/lib/utils/getPercent.js +0 -11
- package/lib/utils/getPercent.js.map +0 -1
- package/lib/utils/getRTLSafeKey.d.ts +0 -4
- package/lib/utils/getRTLSafeKey.js +0 -21
- package/lib/utils/getRTLSafeKey.js.map +0 -1
- package/lib/utils/index.d.ts +0 -9
- package/lib/utils/index.js +0 -10
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/on.d.ts +0 -1
- package/lib/utils/on.js +0 -8
- package/lib/utils/on.js.map +0 -1
- package/lib/utils/renderMarks.d.ts +0 -13
- package/lib/utils/renderMarks.js +0 -31
- package/lib/utils/renderMarks.js.map +0 -1
- package/lib-amd/Slider.d.ts +0 -1
- package/lib-amd/Slider.js +0 -6
- package/lib-amd/Slider.js.map +0 -1
- package/lib-amd/common/isConformant.d.ts +0 -4
- package/lib-amd/common/isConformant.js +0 -16
- package/lib-amd/common/isConformant.js.map +0 -1
- package/lib-amd/components/Slider/Slider.d.ts +0 -5
- package/lib-amd/components/Slider/Slider.js +0 -15
- package/lib-amd/components/Slider/Slider.js.map +0 -1
- package/lib-amd/components/Slider/Slider.types.d.ts +0 -126
- package/lib-amd/components/Slider/Slider.types.js +0 -5
- package/lib-amd/components/Slider/Slider.types.js.map +0 -1
- package/lib-amd/components/Slider/index.d.ts +0 -6
- package/lib-amd/components/Slider/index.js +0 -11
- package/lib-amd/components/Slider/index.js.map +0 -1
- package/lib-amd/components/Slider/renderSlider.d.ts +0 -5
- package/lib-amd/components/Slider/renderSlider.js +0 -23
- package/lib-amd/components/Slider/renderSlider.js.map +0 -1
- package/lib-amd/components/Slider/useSlider.d.ts +0 -10
- package/lib-amd/components/Slider/useSlider.js +0 -72
- package/lib-amd/components/Slider/useSlider.js.map +0 -1
- package/lib-amd/components/Slider/useSliderState.d.ts +0 -2
- package/lib-amd/components/Slider/useSliderState.js +0 -151
- package/lib-amd/components/Slider/useSliderState.js.map +0 -1
- package/lib-amd/components/Slider/useSliderStyles.d.ts +0 -5
- package/lib-amd/components/Slider/useSliderStyles.js +0 -378
- package/lib-amd/components/Slider/useSliderStyles.js.map +0 -1
- package/lib-amd/index.d.ts +0 -2
- package/lib-amd/index.js +0 -6
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/calculateSteps.d.ts +0 -5
- package/lib-amd/utils/calculateSteps.js +0 -30
- package/lib-amd/utils/calculateSteps.js.map +0 -1
- package/lib-amd/utils/clamp.d.ts +0 -8
- package/lib-amd/utils/clamp.js +0 -15
- package/lib-amd/utils/clamp.js.map +0 -1
- package/lib-amd/utils/getKeydownValue.d.ts +0 -6
- package/lib-amd/utils/getKeydownValue.js +0 -42
- package/lib-amd/utils/getKeydownValue.js.map +0 -1
- package/lib-amd/utils/getMarkPercent.d.ts +0 -7
- package/lib-amd/utils/getMarkPercent.js +0 -26
- package/lib-amd/utils/getMarkPercent.js.map +0 -1
- package/lib-amd/utils/getMarkValues.d.ts +0 -8
- package/lib-amd/utils/getMarkValues.js +0 -30
- package/lib-amd/utils/getMarkValues.js.map +0 -1
- package/lib-amd/utils/getPercent.d.ts +0 -8
- package/lib-amd/utils/getPercent.js +0 -17
- package/lib-amd/utils/getPercent.js.map +0 -1
- package/lib-amd/utils/getRTLSafeKey.d.ts +0 -4
- package/lib-amd/utils/getRTLSafeKey.js +0 -23
- package/lib-amd/utils/getRTLSafeKey.js.map +0 -1
- package/lib-amd/utils/index.d.ts +0 -9
- package/lib-amd/utils/index.js +0 -14
- package/lib-amd/utils/index.js.map +0 -1
- package/lib-amd/utils/on.d.ts +0 -1
- package/lib-amd/utils/on.js +0 -12
- package/lib-amd/utils/on.js.map +0 -1
- package/lib-amd/utils/renderMarks.d.ts +0 -13
- package/lib-amd/utils/renderMarks.js +0 -27
- package/lib-amd/utils/renderMarks.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/utils/calculateSteps.d.ts +0 -5
- package/lib-commonjs/utils/calculateSteps.js +0 -37
- package/lib-commonjs/utils/calculateSteps.js.map +0 -1
- package/lib-commonjs/utils/clamp.d.ts +0 -8
- package/lib-commonjs/utils/clamp.js +0 -20
- package/lib-commonjs/utils/clamp.js.map +0 -1
- package/lib-commonjs/utils/getKeydownValue.d.ts +0 -6
- package/lib-commonjs/utils/getKeydownValue.js +0 -49
- package/lib-commonjs/utils/getKeydownValue.js.map +0 -1
- package/lib-commonjs/utils/getMarkPercent.d.ts +0 -7
- package/lib-commonjs/utils/getMarkPercent.js +0 -31
- package/lib-commonjs/utils/getMarkPercent.js.map +0 -1
- package/lib-commonjs/utils/getMarkValues.d.ts +0 -8
- package/lib-commonjs/utils/getMarkValues.js +0 -34
- package/lib-commonjs/utils/getMarkValues.js.map +0 -1
- package/lib-commonjs/utils/getPercent.d.ts +0 -8
- package/lib-commonjs/utils/getPercent.js +0 -20
- package/lib-commonjs/utils/getPercent.js.map +0 -1
- package/lib-commonjs/utils/getRTLSafeKey.d.ts +0 -4
- package/lib-commonjs/utils/getRTLSafeKey.js +0 -30
- package/lib-commonjs/utils/getRTLSafeKey.js.map +0 -1
- package/lib-commonjs/utils/index.d.ts +0 -9
- package/lib-commonjs/utils/index.js +0 -26
- package/lib-commonjs/utils/index.js.map +0 -1
- package/lib-commonjs/utils/on.d.ts +0 -1
- package/lib-commonjs/utils/on.js +0 -16
- package/lib-commonjs/utils/on.js.map +0 -1
- package/lib-commonjs/utils/renderMarks.d.ts +0 -13
- package/lib-commonjs/utils/renderMarks.js +0 -42
- package/lib-commonjs/utils/renderMarks.js.map +0 -1
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./clamp"], function (require, exports, clamp_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.calculateSteps = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Calculates the `step` position based off of a `Mouse` or `Touch` event relative to the size of the rail.
|
|
7
|
-
*/
|
|
8
|
-
var calculateSteps = function (ev, railRef, min, max, step, vertical, dir) {
|
|
9
|
-
var _a;
|
|
10
|
-
var currentBounds = (_a = railRef === null || railRef === void 0 ? void 0 : railRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
11
|
-
var sliderSize = vertical ? currentBounds.height : currentBounds.width;
|
|
12
|
-
var position;
|
|
13
|
-
if (vertical) {
|
|
14
|
-
position = currentBounds.bottom;
|
|
15
|
-
}
|
|
16
|
-
else if (dir === 'rtl') {
|
|
17
|
-
position = currentBounds.right;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
position = currentBounds.left;
|
|
21
|
-
}
|
|
22
|
-
var totalSteps = (max - min) / step;
|
|
23
|
-
var stepLength = sliderSize / totalSteps;
|
|
24
|
-
var thumbPosition = vertical ? ev.clientY : ev.clientX;
|
|
25
|
-
var distance = dir === 'rtl' || vertical ? position - thumbPosition : thumbPosition - position;
|
|
26
|
-
return clamp_1.clamp(min + step * (distance / stepLength), min, max);
|
|
27
|
-
};
|
|
28
|
-
exports.calculateSteps = calculateSteps;
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=calculateSteps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateSteps.js","sourceRoot":"../src/","sources":["utils/calculateSteps.ts"],"names":[],"mappings":";;;;IAGA;;OAEG;IACI,IAAM,cAAc,GAAG,UAC5B,EAAsC,EACtC,OAAwC,EACxC,GAAW,EACX,GAAW,EACX,IAAY,EACZ,QAAiB,EACjB,GAAkB;;QAElB,IAAM,aAAa,SAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,qBAAqB,EAAE,CAAC;QAChE,IAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,aAAc,CAAC,MAAM,CAAC,CAAC,CAAC,aAAc,CAAC,KAAK,CAAC;QAC3E,IAAI,QAAQ,CAAC;QAEb,IAAI,QAAQ,EAAE;YACZ,QAAQ,GAAG,aAAc,CAAC,MAAM,CAAC;SAClC;aAAM,IAAI,GAAG,KAAK,KAAK,EAAE;YACxB,QAAQ,GAAG,aAAc,CAAC,KAAK,CAAC;SACjC;aAAM;YACL,QAAQ,GAAG,aAAc,CAAC,IAAI,CAAC;SAChC;QAED,IAAM,UAAU,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;QACtC,IAAM,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;QAC3C,IAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC;QACzD,IAAM,QAAQ,GAAG,GAAG,KAAK,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,GAAG,QAAQ,CAAC;QAEjG,OAAO,aAAK,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC,CAAC;IA3BW,QAAA,cAAc,kBA2BzB","sourcesContent":["import * as React from 'react';\nimport { clamp } from './clamp';\n\n/**\n * Calculates the `step` position based off of a `Mouse` or `Touch` event relative to the size of the rail.\n */\nexport const calculateSteps = (\n ev: React.PointerEvent<HTMLDivElement>,\n railRef: React.RefObject<HTMLDivElement>,\n min: number,\n max: number,\n step: number,\n vertical: boolean,\n dir: 'ltr' | 'rtl',\n): number => {\n const currentBounds = railRef?.current?.getBoundingClientRect();\n const sliderSize = vertical ? currentBounds!.height : currentBounds!.width;\n let position;\n\n if (vertical) {\n position = currentBounds!.bottom;\n } else if (dir === 'rtl') {\n position = currentBounds!.right;\n } else {\n position = currentBounds!.left;\n }\n\n const totalSteps = (max - min) / step;\n const stepLength = sliderSize / totalSteps;\n const thumbPosition = vertical ? ev.clientY : ev.clientX;\n const distance = dir === 'rtl' || vertical ? position - thumbPosition : thumbPosition - position;\n\n return clamp(min + step * (distance / stepLength), min, max);\n};\n"]}
|
package/lib-amd/utils/clamp.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clamps `value` to a number between the min and max.
|
|
3
|
-
*
|
|
4
|
-
* @param value - the value to be clamped
|
|
5
|
-
* @param min - the lowest valid value
|
|
6
|
-
* @param max - the highest valid value
|
|
7
|
-
*/
|
|
8
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
package/lib-amd/utils/clamp.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clamp = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Clamps `value` to a number between the min and max.
|
|
7
|
-
*
|
|
8
|
-
* @param value - the value to be clamped
|
|
9
|
-
* @param min - the lowest valid value
|
|
10
|
-
* @param max - the highest valid value
|
|
11
|
-
*/
|
|
12
|
-
var clamp = function (value, min, max) { return Math.max(min, Math.min(max, value || 0)); };
|
|
13
|
-
exports.clamp = clamp;
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=clamp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clamp.js","sourceRoot":"../src/","sources":["utils/clamp.ts"],"names":[],"mappings":";;;;IAAA;;;;;;OAMG;IACI,IAAM,KAAK,GAAG,UAAC,KAAa,EAAE,GAAW,EAAE,GAAW,IAAa,OAAA,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,EAAxC,CAAwC,CAAC;IAAtG,QAAA,KAAK,SAAiG","sourcesContent":["/**\n * Clamps `value` to a number between the min and max.\n *\n * @param value - the value to be clamped\n * @param min - the lowest valid value\n * @param max - the highest valid value\n */\nexport const clamp = (value: number, min: number, max: number): number => Math.max(min, Math.min(max, value || 0));\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Determines the incoming value for the Slider based off of a keyboard event.
|
|
4
|
-
* It automatically flips the key direction if the dir parameter is rtl.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getKeydownValue: (ev: React.KeyboardEvent<HTMLDivElement>, currentValue: number, min: number, max: number, dir: 'ltr' | 'rtl', keyboardStep: number) => number;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./getRTLSafeKey"], function (require, exports, getRTLSafeKey_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getKeydownValue = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Determines the incoming value for the Slider based off of a keyboard event.
|
|
7
|
-
* It automatically flips the key direction if the dir parameter is rtl.
|
|
8
|
-
*/
|
|
9
|
-
var getKeydownValue = function (ev, currentValue, min, max, dir, keyboardStep) {
|
|
10
|
-
var normalizedKey = getRTLSafeKey_1.getRTLSafeKey(ev.key, dir);
|
|
11
|
-
if (ev.shiftKey) {
|
|
12
|
-
if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {
|
|
13
|
-
return currentValue - keyboardStep * 10;
|
|
14
|
-
}
|
|
15
|
-
else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {
|
|
16
|
-
return currentValue + keyboardStep * 10;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {
|
|
20
|
-
return currentValue - keyboardStep;
|
|
21
|
-
}
|
|
22
|
-
else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {
|
|
23
|
-
return currentValue + keyboardStep;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
switch (normalizedKey) {
|
|
27
|
-
case 'PageDown':
|
|
28
|
-
return currentValue - keyboardStep * 10;
|
|
29
|
-
break;
|
|
30
|
-
case 'PageUp':
|
|
31
|
-
return currentValue + keyboardStep * 10;
|
|
32
|
-
case 'Home':
|
|
33
|
-
return min;
|
|
34
|
-
case 'End':
|
|
35
|
-
return max;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return currentValue;
|
|
39
|
-
};
|
|
40
|
-
exports.getKeydownValue = getKeydownValue;
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=getKeydownValue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getKeydownValue.js","sourceRoot":"../src/","sources":["utils/getKeydownValue.ts"],"names":[],"mappings":";;;;IAGA;;;OAGG;IACI,IAAM,eAAe,GAAG,UAC7B,EAAuC,EACvC,YAAoB,EACpB,GAAW,EACX,GAAW,EACX,GAAkB,EAClB,YAAoB;QAEpB,IAAM,aAAa,GAAG,6BAAa,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAEjD,IAAI,EAAE,CAAC,QAAQ,EAAE;YACf,IAAI,aAAa,KAAK,WAAW,IAAI,aAAa,KAAK,WAAW,EAAE;gBAClE,OAAO,YAAY,GAAG,YAAY,GAAG,EAAE,CAAC;aACzC;iBAAM,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,YAAY,EAAE;gBACxE,OAAO,YAAY,GAAG,YAAY,GAAG,EAAE,CAAC;aACzC;SACF;aAAM,IAAI,aAAa,KAAK,WAAW,IAAI,aAAa,KAAK,WAAW,EAAE;YACzE,OAAO,YAAY,GAAG,YAAY,CAAC;SACpC;aAAM,IAAI,aAAa,KAAK,SAAS,IAAI,aAAa,KAAK,YAAY,EAAE;YACxE,OAAO,YAAY,GAAG,YAAY,CAAC;SACpC;aAAM;YACL,QAAQ,aAAa,EAAE;gBACrB,KAAK,UAAU;oBACb,OAAO,YAAY,GAAG,YAAY,GAAG,EAAE,CAAC;oBACxC,MAAM;gBACR,KAAK,QAAQ;oBACX,OAAO,YAAY,GAAG,YAAY,GAAG,EAAE,CAAC;gBAC1C,KAAK,MAAM;oBACT,OAAO,GAAG,CAAC;gBACb,KAAK,KAAK;oBACR,OAAO,GAAG,CAAC;aACd;SACF;QAED,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC;IAnCW,QAAA,eAAe,mBAmC1B","sourcesContent":["import * as React from 'react';\nimport { getRTLSafeKey } from './getRTLSafeKey';\n\n/**\n * Determines the incoming value for the Slider based off of a keyboard event.\n * It automatically flips the key direction if the dir parameter is rtl.\n */\nexport const getKeydownValue = (\n ev: React.KeyboardEvent<HTMLDivElement>,\n currentValue: number,\n min: number,\n max: number,\n dir: 'ltr' | 'rtl',\n keyboardStep: number,\n): number => {\n const normalizedKey = getRTLSafeKey(ev.key, dir);\n\n if (ev.shiftKey) {\n if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {\n return currentValue - keyboardStep * 10;\n } else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {\n return currentValue + keyboardStep * 10;\n }\n } else if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {\n return currentValue - keyboardStep;\n } else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {\n return currentValue + keyboardStep;\n } else {\n switch (normalizedKey) {\n case 'PageDown':\n return currentValue - keyboardStep * 10;\n break;\n case 'PageUp':\n return currentValue + keyboardStep * 10;\n case 'Home':\n return min;\n case 'End':\n return max;\n }\n }\n\n return currentValue;\n};\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the current percentage position for the marks with respect to adjacent marks.
|
|
3
|
-
* This is used primarily for positioning with CSS grid.
|
|
4
|
-
*
|
|
5
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getMarkPercent: (markValues: number[]) => string[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getMarkPercent = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Gets the current percentage position for the marks with respect to adjacent marks.
|
|
7
|
-
* This is used primarily for positioning with CSS grid.
|
|
8
|
-
*
|
|
9
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
10
|
-
*/
|
|
11
|
-
var getMarkPercent = function (markValues) {
|
|
12
|
-
var result = [];
|
|
13
|
-
// For CSS grid to work the percents array must be remapped by the previous percent - the current percent
|
|
14
|
-
if (markValues.length > 0) {
|
|
15
|
-
result.push(markValues[0] + '% ');
|
|
16
|
-
var prevPercent = markValues[0];
|
|
17
|
-
for (var i = 1; i < markValues.length; i++) {
|
|
18
|
-
result.push(markValues[i] - prevPercent + '% ');
|
|
19
|
-
prevPercent = markValues[i];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
exports.getMarkPercent = getMarkPercent;
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=getMarkPercent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMarkPercent.js","sourceRoot":"../src/","sources":["utils/getMarkPercent.ts"],"names":[],"mappings":";;;;IAAA;;;;;OAKG;IACI,IAAM,cAAc,GAAG,UAAC,UAAoB;QACjD,IAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,yGAAyG;QACzG,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACzB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAClC,IAAI,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC1C,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,CAAC;gBAChD,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;aAC7B;SACF;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAdW,QAAA,cAAc,kBAczB","sourcesContent":["/**\n * Gets the current percentage position for the marks with respect to adjacent marks.\n * This is used primarily for positioning with CSS grid.\n *\n * @param markValues The marks percentage position relative to their individual positions.\n */\nexport const getMarkPercent = (markValues: number[]) => {\n const result: string[] = [];\n\n // For CSS grid to work the percents array must be remapped by the previous percent - the current percent\n if (markValues.length > 0) {\n result.push(markValues[0] + '% ');\n let prevPercent = markValues[0];\n for (let i = 1; i < markValues.length; i++) {\n result.push(markValues[i] - prevPercent + '% ');\n prevPercent = markValues[i];\n }\n }\n\n return result;\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the current percentage position for the marks relative to their individual positions.
|
|
3
|
-
*/
|
|
4
|
-
export declare const getMarkValue: (marks: boolean | (number | {
|
|
5
|
-
value: number;
|
|
6
|
-
label?: string | JSX.Element;
|
|
7
|
-
mark?: JSX.Element;
|
|
8
|
-
})[] | undefined, min: number, max: number, step: number) => number[];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./getPercent"], function (require, exports, getPercent_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getMarkValue = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Gets the current percentage position for the marks relative to their individual positions.
|
|
7
|
-
*/
|
|
8
|
-
var getMarkValue = function (marks, min, max, step) {
|
|
9
|
-
var valueArray = [];
|
|
10
|
-
// 1. We receive a boolean: mark for every step.
|
|
11
|
-
if (typeof marks === 'boolean' && marks === true) {
|
|
12
|
-
for (var i = 0; i < (max - min) / step + 1; i++) {
|
|
13
|
-
valueArray.push(getPercent_1.getPercent(min + step * i, min, max));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
else if (Array.isArray(marks) && marks.length > 0) {
|
|
17
|
-
return marks.map(function (marksItem) {
|
|
18
|
-
return typeof marksItem === 'number'
|
|
19
|
-
? // 2. We receive an array with numbers: mark for every value in array.
|
|
20
|
-
getPercent_1.getPercent(min + marksItem, min, max)
|
|
21
|
-
: // 3. We receive an array with objects containing numbers and strings:
|
|
22
|
-
// mark and label for every value + string in each object.
|
|
23
|
-
getPercent_1.getPercent(min + marksItem.value, min, max);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return valueArray;
|
|
27
|
-
};
|
|
28
|
-
exports.getMarkValue = getMarkValue;
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=getMarkValues.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMarkValues.js","sourceRoot":"../src/","sources":["utils/getMarkValues.ts"],"names":[],"mappings":";;;;IAEA;;OAEG;IACI,IAAM,YAAY,GAAG,UAC1B,KAA6G,EAC7G,GAAW,EACX,GAAW,EACX,IAAY;QAEZ,IAAM,UAAU,GAAa,EAAE,CAAC;QAEhC,gDAAgD;QAChD,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;YAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC/C,UAAU,CAAC,IAAI,CAAC,uBAAU,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;aACvD;SACF;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACnD,OAAO,KAAK,CAAC,GAAG,CAAC,UAAA,SAAS;gBACxB,OAAA,OAAO,SAAS,KAAK,QAAQ;oBAC3B,CAAC,CAAC,sEAAsE;wBACtE,uBAAU,CAAC,GAAG,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC;oBACvC,CAAC,CAAC,sEAAsE;wBACtE,0DAA0D;wBAC1D,uBAAU,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC;YAL/C,CAK+C,CAChD,CAAC;SACH;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAxBW,QAAA,YAAY,gBAwBvB","sourcesContent":["import { getPercent } from './getPercent';\n\n/**\n * Gets the current percentage position for the marks relative to their individual positions.\n */\nexport const getMarkValue = (\n marks: boolean | (number | { value: number; label?: string | JSX.Element; mark?: JSX.Element })[] | undefined,\n min: number,\n max: number,\n step: number,\n) => {\n const valueArray: number[] = [];\n\n // 1. We receive a boolean: mark for every step.\n if (typeof marks === 'boolean' && marks === true) {\n for (let i = 0; i < (max - min) / step + 1; i++) {\n valueArray.push(getPercent(min + step * i, min, max));\n }\n } else if (Array.isArray(marks) && marks.length > 0) {\n return marks.map(marksItem =>\n typeof marksItem === 'number'\n ? // 2. We receive an array with numbers: mark for every value in array.\n getPercent(min + marksItem, min, max)\n : // 3. We receive an array with objects containing numbers and strings:\n // mark and label for every value + string in each object.\n getPercent(min + marksItem.value, min, max),\n );\n }\n return valueArray;\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the current percent of specified value between a min and max
|
|
3
|
-
*
|
|
4
|
-
* @param value - the value to find the percent
|
|
5
|
-
* @param min - the lowest valid value
|
|
6
|
-
* @param max - the highest valid value
|
|
7
|
-
*/
|
|
8
|
-
export declare const getPercent: (value: number, min: number, max: number) => number;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getPercent = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Gets the current percent of specified value between a min and max
|
|
7
|
-
*
|
|
8
|
-
* @param value - the value to find the percent
|
|
9
|
-
* @param min - the lowest valid value
|
|
10
|
-
* @param max - the highest valid value
|
|
11
|
-
*/
|
|
12
|
-
var getPercent = function (value, min, max) {
|
|
13
|
-
return max === min ? 0 : ((value - min) / (max - min)) * 100;
|
|
14
|
-
};
|
|
15
|
-
exports.getPercent = getPercent;
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=getPercent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getPercent.js","sourceRoot":"../src/","sources":["utils/getPercent.ts"],"names":[],"mappings":";;;;IAAA;;;;;;OAMG;IACI,IAAM,UAAU,GAAG,UAAC,KAAa,EAAE,GAAW,EAAE,GAAW;QAChE,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;IAC/D,CAAC,CAAC;IAFW,QAAA,UAAU,cAErB","sourcesContent":["/**\n * Gets the current percent of specified value between a min and max\n *\n * @param value - the value to find the percent\n * @param min - the lowest valid value\n * @param max - the highest valid value\n */\nexport const getPercent = (value: number, min: number, max: number) => {\n return max === min ? 0 : ((value - min) / (max - min)) * 100;\n};\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getRTLSafeKey = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Finds and swaps a provided key for it's right to left format.
|
|
7
|
-
*/
|
|
8
|
-
var getRTLSafeKey = function (key, dir) {
|
|
9
|
-
if (dir === 'rtl') {
|
|
10
|
-
switch (key) {
|
|
11
|
-
case 'ArrowLeft': {
|
|
12
|
-
return 'ArrowRight';
|
|
13
|
-
}
|
|
14
|
-
case 'ArrowRight': {
|
|
15
|
-
return 'ArrowLeft';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return key;
|
|
20
|
-
};
|
|
21
|
-
exports.getRTLSafeKey = getRTLSafeKey;
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=getRTLSafeKey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRTLSafeKey.js","sourceRoot":"../src/","sources":["utils/getRTLSafeKey.ts"],"names":[],"mappings":";;;;IAAA;;OAEG;IACI,IAAM,aAAa,GAAG,UAAC,GAAW,EAAE,GAAkB;QAC3D,IAAI,GAAG,KAAK,KAAK,EAAE;YACjB,QAAQ,GAAG,EAAE;gBACX,KAAK,WAAW,CAAC,CAAC;oBAChB,OAAO,YAAY,CAAC;iBACrB;gBAED,KAAK,YAAY,CAAC,CAAC;oBACjB,OAAO,WAAW,CAAC;iBACpB;aACF;SACF;QAED,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IAdW,QAAA,aAAa,iBAcxB","sourcesContent":["/**\n * Finds and swaps a provided key for it's right to left format.\n */\nexport const getRTLSafeKey = (key: string, dir: 'ltr' | 'rtl') => {\n if (dir === 'rtl') {\n switch (key) {\n case 'ArrowLeft': {\n return 'ArrowRight';\n }\n\n case 'ArrowRight': {\n return 'ArrowLeft';\n }\n }\n }\n\n return key;\n};\n"]}
|
package/lib-amd/utils/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './calculateSteps';
|
|
2
|
-
export * from './clamp';
|
|
3
|
-
export * from './getKeydownValue';
|
|
4
|
-
export * from './getMarkPercent';
|
|
5
|
-
export * from './getMarkValues';
|
|
6
|
-
export * from './getPercent';
|
|
7
|
-
export * from './getRTLSafeKey';
|
|
8
|
-
export * from './on';
|
|
9
|
-
export * from './renderMarks';
|
package/lib-amd/utils/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./calculateSteps", "./clamp", "./getKeydownValue", "./getMarkPercent", "./getMarkValues", "./getPercent", "./getRTLSafeKey", "./on", "./renderMarks"], function (require, exports, tslib_1, calculateSteps_1, clamp_1, getKeydownValue_1, getMarkPercent_1, getMarkValues_1, getPercent_1, getRTLSafeKey_1, on_1, renderMarks_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(calculateSteps_1, exports);
|
|
5
|
-
tslib_1.__exportStar(clamp_1, exports);
|
|
6
|
-
tslib_1.__exportStar(getKeydownValue_1, exports);
|
|
7
|
-
tslib_1.__exportStar(getMarkPercent_1, exports);
|
|
8
|
-
tslib_1.__exportStar(getMarkValues_1, exports);
|
|
9
|
-
tslib_1.__exportStar(getPercent_1, exports);
|
|
10
|
-
tslib_1.__exportStar(getRTLSafeKey_1, exports);
|
|
11
|
-
tslib_1.__exportStar(on_1, exports);
|
|
12
|
-
tslib_1.__exportStar(renderMarks_1, exports);
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utils/index.ts"],"names":[],"mappings":";;;IAAA,gDAAiC;IACjC,uCAAwB;IACxB,iDAAkC;IAClC,gDAAiC;IACjC,+CAAgC;IAChC,4CAA6B;IAC7B,+CAAgC;IAChC,oCAAqB;IACrB,6CAA8B","sourcesContent":["export * from './calculateSteps';\nexport * from './clamp';\nexport * from './getKeydownValue';\nexport * from './getMarkPercent';\nexport * from './getMarkValues';\nexport * from './getPercent';\nexport * from './getRTLSafeKey';\nexport * from './on';\nexport * from './renderMarks';\n"]}
|
package/lib-amd/utils/on.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const on: (element: Element, eventName: string, callback: (ev: any) => void) => () => void;
|
package/lib-amd/utils/on.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.on = void 0;
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
-
var on = function (element, eventName, callback) {
|
|
7
|
-
element.addEventListener(eventName, callback);
|
|
8
|
-
return function () { return element.removeEventListener(eventName, callback); };
|
|
9
|
-
};
|
|
10
|
-
exports.on = on;
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=on.js.map
|
package/lib-amd/utils/on.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"on.js","sourceRoot":"../src/","sources":["utils/on.ts"],"names":[],"mappings":";;;;IAAA,8DAA8D;IACvD,IAAM,EAAE,GAAG,UAAC,OAAgB,EAAE,SAAiB,EAAE,QAA2B;QACjF,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,cAAM,OAAA,OAAO,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAhD,CAAgD,CAAC;IAChE,CAAC,CAAC;IAHW,QAAA,EAAE,MAGb","sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const on = (element: Element, eventName: string, callback: (ev: any) => void) => {\n element.addEventListener(eventName, callback);\n return () => element.removeEventListener(eventName, callback);\n};\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const markClassName = "ms-Slider-mark";
|
|
2
|
-
export declare const markLabelClassName = "ms-Slider-label";
|
|
3
|
-
/**
|
|
4
|
-
* Renders the marks
|
|
5
|
-
*
|
|
6
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
7
|
-
* @param marks The provided marks prop from the Slider component.
|
|
8
|
-
*/
|
|
9
|
-
export declare const renderMarks: (markValues: number[], marks: boolean | (number | {
|
|
10
|
-
value: number;
|
|
11
|
-
label?: string | JSX.Element;
|
|
12
|
-
mark?: JSX.Element;
|
|
13
|
-
})[]) => JSX.Element[];
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "@fluentui/react-make-styles"], function (require, exports, React, react_make_styles_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.renderMarks = exports.markLabelClassName = exports.markClassName = void 0;
|
|
5
|
-
// The mark related classNames are needed since they are used in a JSX element that is dynamically generated.
|
|
6
|
-
var markContainerClassName = 'ms-Slider-markItemContainer';
|
|
7
|
-
var firstMarkClassName = 'ms-Slider-firstMark';
|
|
8
|
-
var lastMarkClassName = 'ms-Slider-lastMark';
|
|
9
|
-
exports.markClassName = 'ms-Slider-mark';
|
|
10
|
-
exports.markLabelClassName = 'ms-Slider-label';
|
|
11
|
-
/**
|
|
12
|
-
* Renders the marks
|
|
13
|
-
*
|
|
14
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
15
|
-
* @param marks The provided marks prop from the Slider component.
|
|
16
|
-
*/
|
|
17
|
-
var renderMarks = function (markValues, marks) {
|
|
18
|
-
return markValues.map(function (value, i) {
|
|
19
|
-
var marksItem = typeof marks === 'boolean' ? undefined : marks[i];
|
|
20
|
-
return (React.createElement("div", { className: markContainerClassName, key: "markItemContainer-" + i },
|
|
21
|
-
marksItem !== undefined && typeof marksItem === 'object' && marksItem.mark ? (marksItem.mark) : (React.createElement("div", { className: react_make_styles_1.mergeClasses(exports.markClassName, (markValues[i] === 0 && firstMarkClassName) || (markValues[i] === 100 && lastMarkClassName) || ''), key: "mark-" + i })),
|
|
22
|
-
marksItem !== undefined && typeof marksItem === 'object' && marksItem.label && (React.createElement("div", { className: exports.markLabelClassName, key: "markLabel-" + i }, marksItem.label))));
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
exports.renderMarks = renderMarks;
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=renderMarks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderMarks.js","sourceRoot":"../src/","sources":["utils/renderMarks.tsx"],"names":[],"mappings":";;;;IAGA,6GAA6G;IAC7G,IAAM,sBAAsB,GAAG,6BAA6B,CAAC;IAC7D,IAAM,kBAAkB,GAAG,qBAAqB,CAAC;IACjD,IAAM,iBAAiB,GAAG,oBAAoB,CAAC;IAClC,QAAA,aAAa,GAAG,gBAAgB,CAAC;IACjC,QAAA,kBAAkB,GAAG,iBAAiB,CAAC;IAEpD;;;;;OAKG;IACI,IAAM,WAAW,GAAG,UACzB,UAAoB,EACpB,KAAiG;QAEjG,OAAA,UAAU,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC;YACtB,IAAM,SAAS,GAAG,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEpE,OAAO,CACL,6BAAK,SAAS,EAAE,sBAAsB,EAAE,GAAG,EAAE,uBAAqB,CAAG;gBAClE,SAAS,KAAK,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAC5E,SAAS,CAAC,IAAI,CACf,CAAC,CAAC,CAAC,CACF,6BACE,SAAS,EAAE,gCAAY,CACrB,qBAAa,EACb,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,CAClG,EACD,GAAG,EAAE,UAAQ,CAAG,GAChB,CACH;gBACA,SAAS,KAAK,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,IAAI,CAC9E,6BAAK,SAAS,EAAE,0BAAkB,EAAE,GAAG,EAAE,eAAa,CAAG,IACtD,SAAS,CAAC,KAAK,CACZ,CACP,CACG,CACP,CAAC;QACJ,CAAC,CAAC;IAvBF,CAuBE,CAAC;IA3BQ,QAAA,WAAW,eA2BnB","sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-make-styles';\n\n// The mark related classNames are needed since they are used in a JSX element that is dynamically generated.\nconst markContainerClassName = 'ms-Slider-markItemContainer';\nconst firstMarkClassName = 'ms-Slider-firstMark';\nconst lastMarkClassName = 'ms-Slider-lastMark';\nexport const markClassName = 'ms-Slider-mark';\nexport const markLabelClassName = 'ms-Slider-label';\n\n/**\n * Renders the marks\n *\n * @param markValues The marks percentage position relative to their individual positions.\n * @param marks The provided marks prop from the Slider component.\n */\nexport const renderMarks = (\n markValues: number[],\n marks: boolean | (number | { value: number; label?: string | JSX.Element; mark?: JSX.Element })[],\n) =>\n markValues.map((value, i) => {\n const marksItem = typeof marks === 'boolean' ? undefined : marks[i];\n\n return (\n <div className={markContainerClassName} key={`markItemContainer-${i}`}>\n {marksItem !== undefined && typeof marksItem === 'object' && marksItem.mark ? (\n marksItem.mark\n ) : (\n <div\n className={mergeClasses(\n markClassName,\n (markValues[i] === 0 && firstMarkClassName) || (markValues[i] === 100 && lastMarkClassName) || '',\n )}\n key={`mark-${i}`}\n />\n )}\n {marksItem !== undefined && typeof marksItem === 'object' && marksItem.label && (\n <div className={markLabelClassName} key={`markLabel-${i}`}>\n {marksItem.label}\n </div>\n )}\n </div>\n );\n });\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isConformant = void 0;
|
|
7
|
-
|
|
8
|
-
var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
|
9
|
-
|
|
10
|
-
var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
|
11
|
-
|
|
12
|
-
function isConformant(testInfo) {
|
|
13
|
-
var defaultOptions = {
|
|
14
|
-
asPropHandlesRef: true,
|
|
15
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
|
16
|
-
extraTests: react_conformance_make_styles_1.default,
|
|
17
|
-
skipAsPropTests: true
|
|
18
|
-
};
|
|
19
|
-
react_conformance_1.isConformant(defaultOptions, testInfo);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
exports.isConformant = isConformant;
|
|
23
|
-
//# sourceMappingURL=isConformant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE,+BAAA,CAAA,OAH+C;AAI3D,IAAA,eAAe,EAAE;AAJ0C,GAA7D;AAOA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAXD,OAAA,CAAA,YAAA,GAAA,YAAA","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n skipAsPropTests: true,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the `step` position based off of a `Mouse` or `Touch` event relative to the size of the rail.
|
|
4
|
-
*/
|
|
5
|
-
export declare const calculateSteps: (ev: React.PointerEvent<HTMLDivElement>, railRef: React.RefObject<HTMLDivElement>, min: number, max: number, step: number, vertical: boolean, dir: 'ltr' | 'rtl') => number;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.calculateSteps = void 0;
|
|
7
|
-
|
|
8
|
-
var clamp_1 = /*#__PURE__*/require("./clamp");
|
|
9
|
-
/**
|
|
10
|
-
* Calculates the `step` position based off of a `Mouse` or `Touch` event relative to the size of the rail.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var calculateSteps = function (ev, railRef, min, max, step, vertical, dir) {
|
|
15
|
-
var _a;
|
|
16
|
-
|
|
17
|
-
var currentBounds = (_a = railRef === null || railRef === void 0 ? void 0 : railRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
18
|
-
var sliderSize = vertical ? currentBounds.height : currentBounds.width;
|
|
19
|
-
var position;
|
|
20
|
-
|
|
21
|
-
if (vertical) {
|
|
22
|
-
position = currentBounds.bottom;
|
|
23
|
-
} else if (dir === 'rtl') {
|
|
24
|
-
position = currentBounds.right;
|
|
25
|
-
} else {
|
|
26
|
-
position = currentBounds.left;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var totalSteps = (max - min) / step;
|
|
30
|
-
var stepLength = sliderSize / totalSteps;
|
|
31
|
-
var thumbPosition = vertical ? ev.clientY : ev.clientX;
|
|
32
|
-
var distance = dir === 'rtl' || vertical ? position - thumbPosition : thumbPosition - position;
|
|
33
|
-
return clamp_1.clamp(min + step * (distance / stepLength), min, max);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.calculateSteps = calculateSteps;
|
|
37
|
-
//# sourceMappingURL=calculateSteps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/calculateSteps.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;AAEA;;AAEG;;;AACI,IAAM,cAAc,GAAG,UAC5B,EAD4B,EAE5B,OAF4B,EAG5B,GAH4B,EAI5B,GAJ4B,EAK5B,IAL4B,EAM5B,QAN4B,EAO5B,GAP4B,EAOV;;;AAElB,MAAM,aAAa,GAAA,CAAA,EAAA,GAAG,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,OAAZ,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,qBAAF,EAAtC;AACA,MAAM,UAAU,GAAG,QAAQ,GAAG,aAAc,CAAC,MAAlB,GAA2B,aAAc,CAAC,KAArE;AACA,MAAI,QAAJ;;AAEA,MAAI,QAAJ,EAAc;AACZ,IAAA,QAAQ,GAAG,aAAc,CAAC,MAA1B;AACD,GAFD,MAEO,IAAI,GAAG,KAAK,KAAZ,EAAmB;AACxB,IAAA,QAAQ,GAAG,aAAc,CAAC,KAA1B;AACD,GAFM,MAEA;AACL,IAAA,QAAQ,GAAG,aAAc,CAAC,IAA1B;AACD;;AAED,MAAM,UAAU,GAAG,CAAC,GAAG,GAAG,GAAP,IAAc,IAAjC;AACA,MAAM,UAAU,GAAG,UAAU,GAAG,UAAhC;AACA,MAAM,aAAa,GAAG,QAAQ,GAAG,EAAE,CAAC,OAAN,GAAgB,EAAE,CAAC,OAAjD;AACA,MAAM,QAAQ,GAAG,GAAG,KAAK,KAAR,IAAiB,QAAjB,GAA4B,QAAQ,GAAG,aAAvC,GAAuD,aAAa,GAAG,QAAxF;AAEA,SAAO,OAAA,CAAA,KAAA,CAAM,GAAG,GAAG,IAAI,IAAI,QAAQ,GAAG,UAAf,CAAhB,EAA4C,GAA5C,EAAiD,GAAjD,CAAP;AACD,CA3BM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourcesContent":["import * as React from 'react';\nimport { clamp } from './clamp';\n\n/**\n * Calculates the `step` position based off of a `Mouse` or `Touch` event relative to the size of the rail.\n */\nexport const calculateSteps = (\n ev: React.PointerEvent<HTMLDivElement>,\n railRef: React.RefObject<HTMLDivElement>,\n min: number,\n max: number,\n step: number,\n vertical: boolean,\n dir: 'ltr' | 'rtl',\n): number => {\n const currentBounds = railRef?.current?.getBoundingClientRect();\n const sliderSize = vertical ? currentBounds!.height : currentBounds!.width;\n let position;\n\n if (vertical) {\n position = currentBounds!.bottom;\n } else if (dir === 'rtl') {\n position = currentBounds!.right;\n } else {\n position = currentBounds!.left;\n }\n\n const totalSteps = (max - min) / step;\n const stepLength = sliderSize / totalSteps;\n const thumbPosition = vertical ? ev.clientY : ev.clientX;\n const distance = dir === 'rtl' || vertical ? position - thumbPosition : thumbPosition - position;\n\n return clamp(min + step * (distance / stepLength), min, max);\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clamps `value` to a number between the min and max.
|
|
3
|
-
*
|
|
4
|
-
* @param value - the value to be clamped
|
|
5
|
-
* @param min - the lowest valid value
|
|
6
|
-
* @param max - the highest valid value
|
|
7
|
-
*/
|
|
8
|
-
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.clamp = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Clamps `value` to a number between the min and max.
|
|
9
|
-
*
|
|
10
|
-
* @param value - the value to be clamped
|
|
11
|
-
* @param min - the lowest valid value
|
|
12
|
-
* @param max - the highest valid value
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var clamp = function (value, min, max) {
|
|
16
|
-
return Math.max(min, Math.min(max, value || 0));
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
exports.clamp = clamp;
|
|
20
|
-
//# sourceMappingURL=clamp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/clamp.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;;AACI,IAAM,KAAK,GAAG,UAAC,KAAD,EAAgB,GAAhB,EAA6B,GAA7B,EAAwC;AAAa,SAAA,IAAI,CAAC,GAAL,CAAS,GAAT,EAAc,IAAI,CAAC,GAAL,CAAS,GAAT,EAAc,KAAK,IAAjC,CAAc,CAAd,CAAA;AAAwC,CAA3G;;AAAM,OAAA,CAAA,KAAA,GAAK,KAAL","sourcesContent":["/**\n * Clamps `value` to a number between the min and max.\n *\n * @param value - the value to be clamped\n * @param min - the lowest valid value\n * @param max - the highest valid value\n */\nexport const clamp = (value: number, min: number, max: number): number => Math.max(min, Math.min(max, value || 0));\n"],"sourceRoot":"../src/"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Determines the incoming value for the Slider based off of a keyboard event.
|
|
4
|
-
* It automatically flips the key direction if the dir parameter is rtl.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getKeydownValue: (ev: React.KeyboardEvent<HTMLDivElement>, currentValue: number, min: number, max: number, dir: 'ltr' | 'rtl', keyboardStep: number) => number;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getKeydownValue = void 0;
|
|
7
|
-
|
|
8
|
-
var getRTLSafeKey_1 = /*#__PURE__*/require("./getRTLSafeKey");
|
|
9
|
-
/**
|
|
10
|
-
* Determines the incoming value for the Slider based off of a keyboard event.
|
|
11
|
-
* It automatically flips the key direction if the dir parameter is rtl.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var getKeydownValue = function (ev, currentValue, min, max, dir, keyboardStep) {
|
|
16
|
-
var normalizedKey = getRTLSafeKey_1.getRTLSafeKey(ev.key, dir);
|
|
17
|
-
|
|
18
|
-
if (ev.shiftKey) {
|
|
19
|
-
if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {
|
|
20
|
-
return currentValue - keyboardStep * 10;
|
|
21
|
-
} else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {
|
|
22
|
-
return currentValue + keyboardStep * 10;
|
|
23
|
-
}
|
|
24
|
-
} else if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {
|
|
25
|
-
return currentValue - keyboardStep;
|
|
26
|
-
} else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {
|
|
27
|
-
return currentValue + keyboardStep;
|
|
28
|
-
} else {
|
|
29
|
-
switch (normalizedKey) {
|
|
30
|
-
case 'PageDown':
|
|
31
|
-
return currentValue - keyboardStep * 10;
|
|
32
|
-
break;
|
|
33
|
-
|
|
34
|
-
case 'PageUp':
|
|
35
|
-
return currentValue + keyboardStep * 10;
|
|
36
|
-
|
|
37
|
-
case 'Home':
|
|
38
|
-
return min;
|
|
39
|
-
|
|
40
|
-
case 'End':
|
|
41
|
-
return max;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return currentValue;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports.getKeydownValue = getKeydownValue;
|
|
49
|
-
//# sourceMappingURL=getKeydownValue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/getKeydownValue.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAEA;;;AAGG;;;AACI,IAAM,eAAe,GAAG,UAC7B,EAD6B,EAE7B,YAF6B,EAG7B,GAH6B,EAI7B,GAJ6B,EAK7B,GAL6B,EAM7B,YAN6B,EAMT;AAEpB,MAAM,aAAa,GAAG,eAAA,CAAA,aAAA,CAAc,EAAE,CAAC,GAAjB,EAAsB,GAAtB,CAAtB;;AAEA,MAAI,EAAE,CAAC,QAAP,EAAiB;AACf,QAAI,aAAa,KAAK,WAAlB,IAAiC,aAAa,KAAK,WAAvD,EAAoE;AAClE,aAAO,YAAY,GAAG,YAAY,GAAG,EAArC;AACD,KAFD,MAEO,IAAI,aAAa,KAAK,SAAlB,IAA+B,aAAa,KAAK,YAArD,EAAmE;AACxE,aAAO,YAAY,GAAG,YAAY,GAAG,EAArC;AACD;AACF,GAND,MAMO,IAAI,aAAa,KAAK,WAAlB,IAAiC,aAAa,KAAK,WAAvD,EAAoE;AACzE,WAAO,YAAY,GAAG,YAAtB;AACD,GAFM,MAEA,IAAI,aAAa,KAAK,SAAlB,IAA+B,aAAa,KAAK,YAArD,EAAmE;AACxE,WAAO,YAAY,GAAG,YAAtB;AACD,GAFM,MAEA;AACL,YAAQ,aAAR;AACE,WAAK,UAAL;AACE,eAAO,YAAY,GAAG,YAAY,GAAG,EAArC;AACA;;AACF,WAAK,QAAL;AACE,eAAO,YAAY,GAAG,YAAY,GAAG,EAArC;;AACF,WAAK,MAAL;AACE,eAAO,GAAP;;AACF,WAAK,KAAL;AACE,eAAO,GAAP;AATJ;AAWD;;AAED,SAAO,YAAP;AACD,CAnCM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import * as React from 'react';\nimport { getRTLSafeKey } from './getRTLSafeKey';\n\n/**\n * Determines the incoming value for the Slider based off of a keyboard event.\n * It automatically flips the key direction if the dir parameter is rtl.\n */\nexport const getKeydownValue = (\n ev: React.KeyboardEvent<HTMLDivElement>,\n currentValue: number,\n min: number,\n max: number,\n dir: 'ltr' | 'rtl',\n keyboardStep: number,\n): number => {\n const normalizedKey = getRTLSafeKey(ev.key, dir);\n\n if (ev.shiftKey) {\n if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {\n return currentValue - keyboardStep * 10;\n } else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {\n return currentValue + keyboardStep * 10;\n }\n } else if (normalizedKey === 'ArrowDown' || normalizedKey === 'ArrowLeft') {\n return currentValue - keyboardStep;\n } else if (normalizedKey === 'ArrowUp' || normalizedKey === 'ArrowRight') {\n return currentValue + keyboardStep;\n } else {\n switch (normalizedKey) {\n case 'PageDown':\n return currentValue - keyboardStep * 10;\n break;\n case 'PageUp':\n return currentValue + keyboardStep * 10;\n case 'Home':\n return min;\n case 'End':\n return max;\n }\n }\n\n return currentValue;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the current percentage position for the marks with respect to adjacent marks.
|
|
3
|
-
* This is used primarily for positioning with CSS grid.
|
|
4
|
-
*
|
|
5
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getMarkPercent: (markValues: number[]) => string[];
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getMarkPercent = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Gets the current percentage position for the marks with respect to adjacent marks.
|
|
9
|
-
* This is used primarily for positioning with CSS grid.
|
|
10
|
-
*
|
|
11
|
-
* @param markValues The marks percentage position relative to their individual positions.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
var getMarkPercent = function (markValues) {
|
|
15
|
-
var result = []; // For CSS grid to work the percents array must be remapped by the previous percent - the current percent
|
|
16
|
-
|
|
17
|
-
if (markValues.length > 0) {
|
|
18
|
-
result.push(markValues[0] + '% ');
|
|
19
|
-
var prevPercent = markValues[0];
|
|
20
|
-
|
|
21
|
-
for (var i = 1; i < markValues.length; i++) {
|
|
22
|
-
result.push(markValues[i] - prevPercent + '% ');
|
|
23
|
-
prevPercent = markValues[i];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.getMarkPercent = getMarkPercent;
|
|
31
|
-
//# sourceMappingURL=getMarkPercent.js.map
|