@pie-lib/rubric 2.0.4-next.3 → 2.0.4-next.31
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/_virtual/_rolldown/runtime.js +7 -0
- package/dist/authoring.d.ts +62 -0
- package/dist/authoring.js +298 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +9 -0
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
- package/dist/node_modules/.bun/@hello-pangea_dnd@18.0.1_d0d44917b9a63a72/node_modules/@hello-pangea/dnd/dist/dnd.esm.js +4451 -0
- package/dist/node_modules/.bun/css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js +102 -0
- package/dist/node_modules/.bun/raf-schd@4.0.3/node_modules/raf-schd/dist/raf-schd.esm.js +13 -0
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +471 -0
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +159 -0
- package/dist/node_modules/.bun/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +11 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +53 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +51 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/point-menu.d.ts +27 -0
- package/dist/point-menu.js +73 -0
- package/package.json +35 -12
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -1448
- package/LICENSE.md +0 -5
- package/lib/authoring.js +0 -496
- package/lib/authoring.js.map +0 -1
- package/lib/index.js +0 -20
- package/lib/index.js.map +0 -1
- package/lib/point-menu.js +0 -125
- package/lib/point-menu.js.map +0 -1
- package/src/__tests__/rubric.test.jsx +0 -373
- package/src/authoring.jsx +0 -413
- package/src/index.js +0 -9
- package/src/point-menu.jsx +0 -87
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.mjs
|
|
2
|
+
function e(e) {
|
|
3
|
+
return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
|
|
4
|
+
}
|
|
5
|
+
var t = typeof Symbol == "function" && Symbol.observable || "@@observable", n = () => Math.random().toString(36).substring(7).split("").join("."), r = {
|
|
6
|
+
INIT: `@@redux/INIT${/* @__PURE__ */ n()}`,
|
|
7
|
+
REPLACE: `@@redux/REPLACE${/* @__PURE__ */ n()}`,
|
|
8
|
+
PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${n()}`
|
|
9
|
+
};
|
|
10
|
+
function i(e) {
|
|
11
|
+
if (typeof e != "object" || !e) return !1;
|
|
12
|
+
let t = e;
|
|
13
|
+
for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
|
|
14
|
+
return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
if (e === void 0) return "undefined";
|
|
18
|
+
if (e === null) return "null";
|
|
19
|
+
let t = typeof e;
|
|
20
|
+
switch (t) {
|
|
21
|
+
case "boolean":
|
|
22
|
+
case "string":
|
|
23
|
+
case "number":
|
|
24
|
+
case "symbol":
|
|
25
|
+
case "function": return t;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(e)) return "array";
|
|
28
|
+
if (c(e)) return "date";
|
|
29
|
+
if (s(e)) return "error";
|
|
30
|
+
let n = o(e);
|
|
31
|
+
switch (n) {
|
|
32
|
+
case "Symbol":
|
|
33
|
+
case "Promise":
|
|
34
|
+
case "WeakMap":
|
|
35
|
+
case "WeakSet":
|
|
36
|
+
case "Map":
|
|
37
|
+
case "Set": return n;
|
|
38
|
+
}
|
|
39
|
+
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase().replace(/\s/g, "");
|
|
40
|
+
}
|
|
41
|
+
function o(e) {
|
|
42
|
+
return typeof e.constructor == "function" ? e.constructor.name : null;
|
|
43
|
+
}
|
|
44
|
+
function s(e) {
|
|
45
|
+
return e instanceof Error || typeof e.message == "string" && e.constructor && typeof e.constructor.stackTraceLimit == "number";
|
|
46
|
+
}
|
|
47
|
+
function c(e) {
|
|
48
|
+
return e instanceof Date ? !0 : typeof e.toDateString == "function" && typeof e.getDate == "function" && typeof e.setDate == "function";
|
|
49
|
+
}
|
|
50
|
+
function l(e) {
|
|
51
|
+
let t = typeof e;
|
|
52
|
+
return process.env.NODE_ENV !== "production" && (t = a(e)), t;
|
|
53
|
+
}
|
|
54
|
+
function u(n, a, o) {
|
|
55
|
+
if (typeof n != "function") throw Error(process.env.NODE_ENV === "production" ? e(2) : `Expected the root reducer to be a function. Instead, received: '${l(n)}'`);
|
|
56
|
+
if (typeof a == "function" && typeof o == "function" || typeof o == "function" && typeof arguments[3] == "function") throw Error(process.env.NODE_ENV === "production" ? e(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
|
|
57
|
+
if (typeof a == "function" && o === void 0 && (o = a, a = void 0), o !== void 0) {
|
|
58
|
+
if (typeof o != "function") throw Error(process.env.NODE_ENV === "production" ? e(1) : `Expected the enhancer to be a function. Instead, received: '${l(o)}'`);
|
|
59
|
+
return o(u)(n, a);
|
|
60
|
+
}
|
|
61
|
+
let s = n, c = a, d = /* @__PURE__ */ new Map(), f = d, p = 0, m = !1;
|
|
62
|
+
function h() {
|
|
63
|
+
f === d && (f = /* @__PURE__ */ new Map(), d.forEach((e, t) => {
|
|
64
|
+
f.set(t, e);
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function g() {
|
|
68
|
+
if (m) throw Error(process.env.NODE_ENV === "production" ? e(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
|
|
69
|
+
return c;
|
|
70
|
+
}
|
|
71
|
+
function _(t) {
|
|
72
|
+
if (typeof t != "function") throw Error(process.env.NODE_ENV === "production" ? e(4) : `Expected the listener to be a function. Instead, received: '${l(t)}'`);
|
|
73
|
+
if (m) throw Error(process.env.NODE_ENV === "production" ? e(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
74
|
+
let n = !0;
|
|
75
|
+
h();
|
|
76
|
+
let r = p++;
|
|
77
|
+
return f.set(r, t), function() {
|
|
78
|
+
if (n) {
|
|
79
|
+
if (m) throw Error(process.env.NODE_ENV === "production" ? e(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
|
|
80
|
+
n = !1, h(), f.delete(r), d = null;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function v(t) {
|
|
85
|
+
if (!i(t)) throw Error(process.env.NODE_ENV === "production" ? e(7) : `Actions must be plain objects. Instead, the actual type was: '${l(t)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
|
|
86
|
+
if (t.type === void 0) throw Error(process.env.NODE_ENV === "production" ? e(8) : "Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.");
|
|
87
|
+
if (typeof t.type != "string") throw Error(process.env.NODE_ENV === "production" ? e(17) : `Action "type" property must be a string. Instead, the actual type was: '${l(t.type)}'. Value was: '${t.type}' (stringified)`);
|
|
88
|
+
if (m) throw Error(process.env.NODE_ENV === "production" ? e(9) : "Reducers may not dispatch actions.");
|
|
89
|
+
try {
|
|
90
|
+
m = !0, c = s(c, t);
|
|
91
|
+
} finally {
|
|
92
|
+
m = !1;
|
|
93
|
+
}
|
|
94
|
+
return (d = f).forEach((e) => {
|
|
95
|
+
e();
|
|
96
|
+
}), t;
|
|
97
|
+
}
|
|
98
|
+
function y(t) {
|
|
99
|
+
if (typeof t != "function") throw Error(process.env.NODE_ENV === "production" ? e(10) : `Expected the nextReducer to be a function. Instead, received: '${l(t)}`);
|
|
100
|
+
s = t, v({ type: r.REPLACE });
|
|
101
|
+
}
|
|
102
|
+
function b() {
|
|
103
|
+
let n = _;
|
|
104
|
+
return {
|
|
105
|
+
subscribe(t) {
|
|
106
|
+
if (typeof t != "object" || !t) throw Error(process.env.NODE_ENV === "production" ? e(11) : `Expected the observer to be an object. Instead, received: '${l(t)}'`);
|
|
107
|
+
function r() {
|
|
108
|
+
let e = t;
|
|
109
|
+
e.next && e.next(g());
|
|
110
|
+
}
|
|
111
|
+
return r(), { unsubscribe: n(r) };
|
|
112
|
+
},
|
|
113
|
+
[t]() {
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return v({ type: r.INIT }), {
|
|
119
|
+
dispatch: v,
|
|
120
|
+
subscribe: _,
|
|
121
|
+
getState: g,
|
|
122
|
+
replaceReducer: y,
|
|
123
|
+
[t]: b
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function d(e, t) {
|
|
127
|
+
return function(...n) {
|
|
128
|
+
return t(e.apply(this, n));
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function f(t, n) {
|
|
132
|
+
if (typeof t == "function") return d(t, n);
|
|
133
|
+
if (typeof t != "object" || !t) throw Error(process.env.NODE_ENV === "production" ? e(16) : `bindActionCreators expected an object or a function, but instead received: '${l(t)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);
|
|
134
|
+
let r = {};
|
|
135
|
+
for (let e in t) {
|
|
136
|
+
let i = t[e];
|
|
137
|
+
typeof i == "function" && (r[e] = d(i, n));
|
|
138
|
+
}
|
|
139
|
+
return r;
|
|
140
|
+
}
|
|
141
|
+
function p(...e) {
|
|
142
|
+
return e.length === 0 ? (e) => e : e.length === 1 ? e[0] : e.reduce((e, t) => (...n) => e(t(...n)));
|
|
143
|
+
}
|
|
144
|
+
function m(...t) {
|
|
145
|
+
return (n) => (r, i) => {
|
|
146
|
+
let a = n(r, i), o = () => {
|
|
147
|
+
throw Error(process.env.NODE_ENV === "production" ? e(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
|
|
148
|
+
}, s = {
|
|
149
|
+
getState: a.getState,
|
|
150
|
+
dispatch: (e, ...t) => o(e, ...t)
|
|
151
|
+
};
|
|
152
|
+
return o = p(...t.map((e) => e(s)))(a.dispatch), {
|
|
153
|
+
...a,
|
|
154
|
+
dispatch: o
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
export { m as applyMiddleware, f as bindActionCreators, p as compose, u as createStore };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
2
|
+
var e = process.env.NODE_ENV === "production", t = "Invariant failed";
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
if (!n) {
|
|
5
|
+
if (e) throw Error(t);
|
|
6
|
+
var i = typeof r == "function" ? r() : r, a = i ? `${t}: ${i}` : t;
|
|
7
|
+
throw Error(a);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as invariant };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __commonJSMin as e, __require as t } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/use-sync-external-store@1.6.0+f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js
|
|
3
|
+
var n = /* @__PURE__ */ e(((e) => {
|
|
4
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
5
|
+
function n(e, t) {
|
|
6
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
7
|
+
}
|
|
8
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
9
|
+
var r = t("react"), i = typeof Object.is == "function" ? Object.is : n, a = r.useSyncExternalStore, o = r.useRef, s = r.useEffect, c = r.useMemo, l = r.useDebugValue;
|
|
10
|
+
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
11
|
+
var d = o(null);
|
|
12
|
+
if (d.current === null) {
|
|
13
|
+
var f = {
|
|
14
|
+
hasValue: !1,
|
|
15
|
+
value: null
|
|
16
|
+
};
|
|
17
|
+
d.current = f;
|
|
18
|
+
} else f = d.current;
|
|
19
|
+
d = c(function() {
|
|
20
|
+
function e(e) {
|
|
21
|
+
if (!a) {
|
|
22
|
+
if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
|
|
23
|
+
var t = f.value;
|
|
24
|
+
if (u(t, e)) return s = t;
|
|
25
|
+
}
|
|
26
|
+
return s = e;
|
|
27
|
+
}
|
|
28
|
+
if (t = s, i(o, e)) return t;
|
|
29
|
+
var n = r(e);
|
|
30
|
+
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
31
|
+
}
|
|
32
|
+
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
33
|
+
return [function() {
|
|
34
|
+
return e(t());
|
|
35
|
+
}, c === null ? void 0 : function() {
|
|
36
|
+
return e(c());
|
|
37
|
+
}];
|
|
38
|
+
}, [
|
|
39
|
+
t,
|
|
40
|
+
n,
|
|
41
|
+
r,
|
|
42
|
+
u
|
|
43
|
+
]);
|
|
44
|
+
var p = a(e, d[0], d[1]);
|
|
45
|
+
return s(function() {
|
|
46
|
+
f.hasValue = !0, f.value = p;
|
|
47
|
+
}, [p]), l(p), p;
|
|
48
|
+
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
49
|
+
})();
|
|
50
|
+
}));
|
|
51
|
+
//#endregion
|
|
52
|
+
export default n();
|
|
53
|
+
export { n as require_use_sync_external_store_with_selector_development };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { __commonJSMin as e, __require as t } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/use-sync-external-store@1.6.0+f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js
|
|
3
|
+
var n = /* @__PURE__ */ e(((e) => {
|
|
4
|
+
var n = t("react");
|
|
5
|
+
function r(e, t) {
|
|
6
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
7
|
+
}
|
|
8
|
+
var i = typeof Object.is == "function" ? Object.is : r, a = n.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
9
|
+
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
10
|
+
var d = o(null);
|
|
11
|
+
if (d.current === null) {
|
|
12
|
+
var f = {
|
|
13
|
+
hasValue: !1,
|
|
14
|
+
value: null
|
|
15
|
+
};
|
|
16
|
+
d.current = f;
|
|
17
|
+
} else f = d.current;
|
|
18
|
+
d = c(function() {
|
|
19
|
+
function e(e) {
|
|
20
|
+
if (!a) {
|
|
21
|
+
if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
|
|
22
|
+
var t = f.value;
|
|
23
|
+
if (u(t, e)) return s = t;
|
|
24
|
+
}
|
|
25
|
+
return s = e;
|
|
26
|
+
}
|
|
27
|
+
if (t = s, i(o, e)) return t;
|
|
28
|
+
var n = r(e);
|
|
29
|
+
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
30
|
+
}
|
|
31
|
+
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
32
|
+
return [function() {
|
|
33
|
+
return e(t());
|
|
34
|
+
}, c === null ? void 0 : function() {
|
|
35
|
+
return e(c());
|
|
36
|
+
}];
|
|
37
|
+
}, [
|
|
38
|
+
t,
|
|
39
|
+
n,
|
|
40
|
+
r,
|
|
41
|
+
u
|
|
42
|
+
]);
|
|
43
|
+
var p = a(e, d[0], d[1]);
|
|
44
|
+
return s(function() {
|
|
45
|
+
f.hasValue = !0, f.value = p;
|
|
46
|
+
}, [p]), l(p), p;
|
|
47
|
+
};
|
|
48
|
+
}));
|
|
49
|
+
//#endregion
|
|
50
|
+
export default n();
|
|
51
|
+
export { n as require_use_sync_external_store_with_selector_production };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_use_sync_external_store_with_selector_production as t } from "./cjs/use-sync-external-store-with-selector.production.js";
|
|
3
|
+
import { require_use_sync_external_store_with_selector_development as n } from "./cjs/use-sync-external-store-with-selector.development.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/use-sync-external-store@1.6.0+f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js
|
|
5
|
+
var r = /* @__PURE__ */ e(((e, r) => {
|
|
6
|
+
process.env.NODE_ENV === "production" ? r.exports = t() : r.exports = n();
|
|
7
|
+
}));
|
|
8
|
+
//#endregion
|
|
9
|
+
export default r();
|
|
10
|
+
export { r as require_with_selector };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/rubric/src/point-menu.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare class IconMenu extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
opts: PropTypes.Requireable<object>;
|
|
14
|
+
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
+
};
|
|
16
|
+
constructor(props: any);
|
|
17
|
+
handleClick: (event: any) => void;
|
|
18
|
+
handleRequestClose: () => void;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export default class PointMenu extends React.Component {
|
|
22
|
+
static propTypes: {
|
|
23
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
showSampleAnswer: PropTypes.Validator<boolean>;
|
|
25
|
+
};
|
|
26
|
+
render(): React.JSX.Element;
|
|
27
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import n from "@mui/material/MenuItem";
|
|
4
|
+
import * as r from "@pie-lib/render-ui";
|
|
5
|
+
import { InlineMenu as i } from "@pie-lib/render-ui";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import s from "@mui/icons-material/MoreVert";
|
|
8
|
+
import c from "@mui/icons-material/MoreHoriz";
|
|
9
|
+
import l from "@mui/material/IconButton";
|
|
10
|
+
//#region src/point-menu.tsx
|
|
11
|
+
function u(e) {
|
|
12
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
13
|
+
}
|
|
14
|
+
function d(e, t) {
|
|
15
|
+
return !e || u(e) ? e : u(e.default) ? e.default : t && u(e[t]) ? e[t] : t && u(e[t]?.default) ? e[t].default : e;
|
|
16
|
+
}
|
|
17
|
+
var f = d(i, "InlineMenu") || d(h.InlineMenu, "InlineMenu"), p = r, m = p.default, h = m && typeof m == "object" ? m : p, g = class extends e.Component {
|
|
18
|
+
static propTypes = {
|
|
19
|
+
opts: t.object,
|
|
20
|
+
onClick: t.func.isRequired
|
|
21
|
+
};
|
|
22
|
+
constructor(e) {
|
|
23
|
+
super(e), this.state = {
|
|
24
|
+
anchorEl: void 0,
|
|
25
|
+
open: !1
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
handleClick = (e) => this.setState({
|
|
29
|
+
open: !0,
|
|
30
|
+
anchorEl: e.currentTarget
|
|
31
|
+
});
|
|
32
|
+
handleRequestClose = () => this.setState({ open: !1 });
|
|
33
|
+
render() {
|
|
34
|
+
let { opts: e, onClick: t } = this.props, { open: r, anchorEl: i } = this.state, u = Object.keys(e) || [], d = (e) => () => {
|
|
35
|
+
t(e), this.handleRequestClose();
|
|
36
|
+
}, p = r ? "inherit" : "disabled";
|
|
37
|
+
return /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
|
|
38
|
+
onClick: this.handleClick,
|
|
39
|
+
children: /* @__PURE__ */ a(l, {
|
|
40
|
+
size: "large",
|
|
41
|
+
children: a(r ? s : c, { color: p })
|
|
42
|
+
})
|
|
43
|
+
}), /* @__PURE__ */ a(f, {
|
|
44
|
+
id: "point-menu",
|
|
45
|
+
anchorEl: i,
|
|
46
|
+
open: r,
|
|
47
|
+
onClose: this.handleRequestClose,
|
|
48
|
+
style: { transform: "translate(-15px, -15px)" },
|
|
49
|
+
transformOrigin: {
|
|
50
|
+
vertical: "center",
|
|
51
|
+
horizontal: "right"
|
|
52
|
+
},
|
|
53
|
+
children: u.map((t, r) => /* @__PURE__ */ a(n, {
|
|
54
|
+
onClick: d(t),
|
|
55
|
+
children: e[t]
|
|
56
|
+
}, r))
|
|
57
|
+
})] });
|
|
58
|
+
}
|
|
59
|
+
}, _ = class extends e.Component {
|
|
60
|
+
static propTypes = {
|
|
61
|
+
onChange: t.func.isRequired,
|
|
62
|
+
showSampleAnswer: t.bool.isRequired
|
|
63
|
+
};
|
|
64
|
+
render() {
|
|
65
|
+
let { onChange: e, showSampleAnswer: t } = this.props;
|
|
66
|
+
return /* @__PURE__ */ a(g, {
|
|
67
|
+
onClick: (t) => e(t),
|
|
68
|
+
opts: { sample: t ? "Provide Sample Response" : "Remove Sample Response" }
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { _ as default };
|
package/package.json
CHANGED
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/rubric",
|
|
3
|
-
"version": "2.0.4-next.
|
|
4
|
-
"
|
|
5
|
-
"access": "public"
|
|
6
|
-
},
|
|
7
|
-
"main": "lib/index.js",
|
|
8
|
-
"module": "src/index.js",
|
|
9
|
-
"repository": "pie-framework/pie-lib",
|
|
3
|
+
"version": "2.0.4-next.31",
|
|
4
|
+
"description": "React implementation of @pie-lib/rubric synced from pie-lib",
|
|
10
5
|
"dependencies": {
|
|
11
6
|
"@emotion/react": "^11.14.0",
|
|
12
7
|
"@emotion/style": "^0.8.0",
|
|
13
8
|
"@hello-pangea/dnd": "^18.0.1",
|
|
14
9
|
"@mui/icons-material": "^7.3.4",
|
|
15
10
|
"@mui/material": "^7.3.4",
|
|
16
|
-
"@pie-lib/editable-html-tip-tap": "
|
|
11
|
+
"@pie-lib/editable-html-tip-tap": "2.1.2-next.31",
|
|
17
12
|
"debug": "^4.1.1",
|
|
18
|
-
"lodash-es": "^4.17.23",
|
|
19
13
|
"prop-types": "^15.7.2",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
14
|
+
"@pie-element/shared-lodash": "0.1.1-next.1",
|
|
15
|
+
"@pie-lib/config-ui": "13.0.4-next.31",
|
|
16
|
+
"@pie-lib/render-ui": "6.1.1-next.38"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "bun x vite build && bun x tsc --emitDeclarationOnly",
|
|
33
|
+
"dev": "bun x vite",
|
|
34
|
+
"test": "bun x vitest run"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"vite": "^8.0.1",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
40
|
+
"@types/react": "^18.2.0",
|
|
41
|
+
"@types/react-dom": "^18.2.0"
|
|
22
42
|
},
|
|
23
|
-
"
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "^18.0.0",
|
|
45
|
+
"react-dom": "^18.0.0"
|
|
46
|
+
}
|
|
24
47
|
}
|
package/CHANGELOG.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|