@pie-element/categorize 0.1.0
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/author/defaults.d.ts +224 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +170 -0
- package/dist/author/design/builder.d.ts +11 -0
- package/dist/author/design/builder.d.ts.map +1 -0
- package/dist/author/design/builder.js +24 -0
- package/dist/author/design/buttons.d.ts +29 -0
- package/dist/author/design/buttons.d.ts.map +1 -0
- package/dist/author/design/buttons.js +36 -0
- package/dist/author/design/categories/RowLabel.d.ts +24 -0
- package/dist/author/design/categories/RowLabel.d.ts.map +1 -0
- package/dist/author/design/categories/RowLabel.js +46 -0
- package/dist/author/design/categories/alternateResponses.d.ts +32 -0
- package/dist/author/design/categories/alternateResponses.d.ts.map +1 -0
- package/dist/author/design/categories/alternateResponses.js +62 -0
- package/dist/author/design/categories/category.d.ts +45 -0
- package/dist/author/design/categories/category.d.ts.map +1 -0
- package/dist/author/design/categories/category.js +102 -0
- package/dist/author/design/categories/choice-preview.d.ts +26 -0
- package/dist/author/design/categories/choice-preview.d.ts.map +1 -0
- package/dist/author/design/categories/choice-preview.js +60 -0
- package/dist/author/design/categories/droppable-placeholder.d.ts +11 -0
- package/dist/author/design/categories/droppable-placeholder.d.ts.map +1 -0
- package/dist/author/design/categories/droppable-placeholder.js +70 -0
- package/dist/author/design/categories/index.d.ts +42 -0
- package/dist/author/design/categories/index.d.ts.map +1 -0
- package/dist/author/design/categories/index.js +146 -0
- package/dist/author/design/choices/choice.d.ts +11 -0
- package/dist/author/design/choices/choice.d.ts.map +1 -0
- package/dist/author/design/choices/choice.js +129 -0
- package/dist/author/design/choices/config.d.ts +22 -0
- package/dist/author/design/choices/config.d.ts.map +1 -0
- package/dist/author/design/choices/config.js +33 -0
- package/dist/author/design/choices/index.d.ts +42 -0
- package/dist/author/design/choices/index.d.ts.map +1 -0
- package/dist/author/design/choices/index.js +110 -0
- package/dist/author/design/header.d.ts +25 -0
- package/dist/author/design/header.d.ts.map +1 -0
- package/dist/author/design/header.js +49 -0
- package/dist/author/design/index.d.ts +53 -0
- package/dist/author/design/index.d.ts.map +1 -0
- package/dist/author/design/index.js +410 -0
- package/dist/author/design/input-header.d.ts +40 -0
- package/dist/author/design/input-header.d.ts.map +1 -0
- package/dist/author/design/input-header.js +69 -0
- package/dist/author/design/utils.d.ts +10 -0
- package/dist/author/design/utils.d.ts.map +1 -0
- package/dist/author/design/utils.js +7 -0
- package/dist/author/index.d.ts +52 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +87 -0
- package/dist/author/main.d.ts +24 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +30 -0
- package/dist/author/utils.d.ts +17 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +17 -0
- package/dist/controller/defaults.d.ts +35 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +29 -0
- package/dist/controller/index.d.ts +62 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +155 -0
- package/dist/controller/utils.d.ts +21 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +35 -0
- package/dist/delivery/categorize/categories.d.ts +35 -0
- package/dist/delivery/categorize/categories.d.ts.map +1 -0
- package/dist/delivery/categorize/categories.js +66 -0
- package/dist/delivery/categorize/category.d.ts +29 -0
- package/dist/delivery/categorize/category.d.ts.map +1 -0
- package/dist/delivery/categorize/category.js +48 -0
- package/dist/delivery/categorize/choice.d.ts +28 -0
- package/dist/delivery/categorize/choice.d.ts.map +1 -0
- package/dist/delivery/categorize/choice.js +94 -0
- package/dist/delivery/categorize/choices.d.ts +40 -0
- package/dist/delivery/categorize/choices.d.ts.map +1 -0
- package/dist/delivery/categorize/choices.js +51 -0
- package/dist/delivery/categorize/droppable-placeholder.d.ts +33 -0
- package/dist/delivery/categorize/droppable-placeholder.d.ts.map +1 -0
- package/dist/delivery/categorize/droppable-placeholder.js +64 -0
- package/dist/delivery/categorize/grid-content.d.ts +26 -0
- package/dist/delivery/categorize/grid-content.d.ts.map +1 -0
- package/dist/delivery/categorize/grid-content.js +39 -0
- package/dist/delivery/categorize/index.d.ts +58 -0
- package/dist/delivery/categorize/index.d.ts.map +1 -0
- package/dist/delivery/categorize/index.js +260 -0
- package/dist/delivery/index.d.ts +28 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +152 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/package.json +74 -0
- package/src/author/defaults.ts +182 -0
- package/src/author/design/builder.ts +63 -0
- package/src/author/design/buttons.tsx +60 -0
- package/src/author/design/categories/RowLabel.tsx +91 -0
- package/src/author/design/categories/alternateResponses.tsx +127 -0
- package/src/author/design/categories/category.tsx +161 -0
- package/src/author/design/categories/choice-preview.tsx +112 -0
- package/src/author/design/categories/droppable-placeholder.tsx +114 -0
- package/src/author/design/categories/index.tsx +254 -0
- package/src/author/design/choices/choice.tsx +200 -0
- package/src/author/design/choices/config.tsx +58 -0
- package/src/author/design/choices/index.tsx +185 -0
- package/src/author/design/header.tsx +74 -0
- package/src/author/design/index.tsx +764 -0
- package/src/author/design/input-header.tsx +109 -0
- package/src/author/design/utils.ts +14 -0
- package/src/author/index.ts +171 -0
- package/src/author/main.tsx +45 -0
- package/src/author/utils.ts +46 -0
- package/src/controller/defaults.ts +37 -0
- package/src/controller/index.ts +469 -0
- package/src/controller/utils.ts +79 -0
- package/src/delivery/categorize/categories.tsx +139 -0
- package/src/delivery/categorize/category.tsx +78 -0
- package/src/delivery/categorize/choice.tsx +117 -0
- package/src/delivery/categorize/choices.tsx +95 -0
- package/src/delivery/categorize/droppable-placeholder.tsx +95 -0
- package/src/delivery/categorize/grid-content.tsx +53 -0
- package/src/delivery/categorize/index.tsx +515 -0
- package/src/delivery/index.ts +390 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/choices/config.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 React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Config extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
config: PropTypes.Requireable<object>;
|
|
14
|
+
onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
spellCheck: PropTypes.Requireable<boolean>;
|
|
16
|
+
};
|
|
17
|
+
static defaultProps: {};
|
|
18
|
+
changeLabel: any;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export default Config;
|
|
22
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/author/design/choices/config.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAanC,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS;IACzC,MAAM,CAAC,SAAS;;;;MAId;IAEF,MAAM,CAAC,YAAY,KAAM;IAEzB,WAAW,EAAE,GAAG,CAEd;IAEF,MAAM;CAkBP;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import i from "@mui/material/TextField";
|
|
6
|
+
//#region src/author/design/choices/config.tsx
|
|
7
|
+
var a = n("div")(({ theme: e }) => ({
|
|
8
|
+
paddingTop: e.spacing(1),
|
|
9
|
+
marginBottom: e.spacing(1)
|
|
10
|
+
})), o = n(i)({ width: "100%" }), s = class extends e.Component {
|
|
11
|
+
static propTypes = {
|
|
12
|
+
config: t.object,
|
|
13
|
+
onModelChanged: t.func,
|
|
14
|
+
spellCheck: t.bool
|
|
15
|
+
};
|
|
16
|
+
static defaultProps = {};
|
|
17
|
+
changeLabel = ({ target: e }) => {
|
|
18
|
+
this.props.onModelChanged({ choicesLabel: e.value });
|
|
19
|
+
};
|
|
20
|
+
render() {
|
|
21
|
+
let { config: e, spellCheck: t } = this.props;
|
|
22
|
+
return /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(o, {
|
|
23
|
+
InputLabelProps: { shrink: !0 },
|
|
24
|
+
variant: "outlined",
|
|
25
|
+
label: "Label",
|
|
26
|
+
value: e.choicesLabel,
|
|
27
|
+
onChange: this.changeLabel,
|
|
28
|
+
spellCheck: t
|
|
29
|
+
}) });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { s as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/choices/index.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 React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Choices extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
model: PropTypes.Validator<object>;
|
|
14
|
+
configuration: PropTypes.Validator<object>;
|
|
15
|
+
choices: PropTypes.Validator<any[]>;
|
|
16
|
+
defaultImageMaxWidth: PropTypes.Requireable<number>;
|
|
17
|
+
defaultImageMaxHeight: PropTypes.Requireable<number>;
|
|
18
|
+
onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
}>>;
|
|
23
|
+
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
}>>;
|
|
27
|
+
toolbarOpts: PropTypes.Requireable<object>;
|
|
28
|
+
spellCheck: PropTypes.Requireable<boolean>;
|
|
29
|
+
};
|
|
30
|
+
static defaultProps: {};
|
|
31
|
+
state: {
|
|
32
|
+
focusedEl: null;
|
|
33
|
+
};
|
|
34
|
+
changeChoice: any;
|
|
35
|
+
allChoicesHaveCount: any;
|
|
36
|
+
addChoice: any;
|
|
37
|
+
deleteFocusedEl: any;
|
|
38
|
+
deleteChoice: any;
|
|
39
|
+
render(): React.JSX.Element;
|
|
40
|
+
}
|
|
41
|
+
export default Choices;
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/author/design/choices/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AA0BnC,qBAAa,OAAQ,SAAQ,KAAK,CAAC,SAAS;IAC1C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;MAiBd;IAEF,MAAM,CAAC,YAAY,KAAM;IAEzB,KAAK;;MAEH;IAEF,YAAY,EAAE,GAAG,CAOf;IAEF,mBAAmB,EAAE,GAAG,CAGtB;IAEF,SAAS,EAAE,GAAG,CAsBZ;IAEF,eAAe,EAAE,GAAG,CAIlB;IAEF,YAAY,EAAE,GAAG,CAQf;IAEF,MAAM;CAiEP;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from "../header.js";
|
|
2
|
+
import t from "./choice.js";
|
|
3
|
+
import n from "./config.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import { removeAllChoices as o } from "@pie-lib/categorize";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { choiceUtils as l } from "@pie-lib/config-ui";
|
|
10
|
+
//#region src/author/design/choices/index.tsx
|
|
11
|
+
var u = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), d = a("div")(({ theme: e }) => ({
|
|
12
|
+
paddingTop: e.spacing(1),
|
|
13
|
+
paddingBottom: e.spacing(1),
|
|
14
|
+
display: "grid",
|
|
15
|
+
gridRowGap: `${e.spacing(1)}px`,
|
|
16
|
+
gridColumnGap: `${e.spacing(1)}px`
|
|
17
|
+
})), f = a("div")(({ theme: e }) => ({
|
|
18
|
+
fontSize: e.typography.fontSize - 2,
|
|
19
|
+
color: e.palette.error.main,
|
|
20
|
+
paddingTop: e.spacing(.5)
|
|
21
|
+
})), p = class extends r.Component {
|
|
22
|
+
static propTypes = {
|
|
23
|
+
model: i.object.isRequired,
|
|
24
|
+
configuration: i.object.isRequired,
|
|
25
|
+
choices: i.array.isRequired,
|
|
26
|
+
defaultImageMaxWidth: i.number,
|
|
27
|
+
defaultImageMaxHeight: i.number,
|
|
28
|
+
onModelChanged: i.func.isRequired,
|
|
29
|
+
imageSupport: i.shape({
|
|
30
|
+
add: i.func.isRequired,
|
|
31
|
+
delete: i.func.isRequired
|
|
32
|
+
}),
|
|
33
|
+
uploadSoundSupport: i.shape({
|
|
34
|
+
add: i.func.isRequired,
|
|
35
|
+
delete: i.func.isRequired
|
|
36
|
+
}),
|
|
37
|
+
toolbarOpts: i.object,
|
|
38
|
+
spellCheck: i.bool
|
|
39
|
+
};
|
|
40
|
+
static defaultProps = {};
|
|
41
|
+
state = { focusedEl: null };
|
|
42
|
+
changeChoice = (e) => {
|
|
43
|
+
let { choices: t, onModelChanged: n } = this.props, r = t.findIndex((t) => t.id === e.id);
|
|
44
|
+
r !== -1 && (t.splice(r, 1, e), n({ choices: t }));
|
|
45
|
+
};
|
|
46
|
+
allChoicesHaveCount = (e) => {
|
|
47
|
+
let { choices: t } = this.props;
|
|
48
|
+
return Array.isArray(t) && t.every((t) => t.categoryCount === e);
|
|
49
|
+
};
|
|
50
|
+
addChoice = () => {
|
|
51
|
+
let { onModelChanged: e, model: t, choices: n } = this.props, { maxAnswerChoices: r } = t || {};
|
|
52
|
+
if (r && t.choices?.length >= r) return;
|
|
53
|
+
let i = l.firstAvailableIndex(t.choices.map((e) => e.id), 1), a = {
|
|
54
|
+
id: i,
|
|
55
|
+
content: "Choice " + i
|
|
56
|
+
};
|
|
57
|
+
this.setState({ focusedEl: n.length }, () => {
|
|
58
|
+
e({ choices: t.choices.concat([a]) });
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
deleteFocusedEl = () => {
|
|
62
|
+
this.setState({ focusedEl: null });
|
|
63
|
+
};
|
|
64
|
+
deleteChoice = (e) => {
|
|
65
|
+
let { model: t, onModelChanged: n } = this.props, r = t.choices.findIndex((t) => t.id === e.id);
|
|
66
|
+
r !== -1 && (t.choices.splice(r, 1), t.correctResponse = o(e.id, t.correctResponse), n(t));
|
|
67
|
+
};
|
|
68
|
+
render() {
|
|
69
|
+
let { focusedEl: r } = this.state, { choices: i, model: a, imageSupport: o, uploadSoundSupport: l, onModelChanged: p, spellCheck: m, toolbarOpts: h, configuration: g, defaultImageMaxWidth: _, defaultImageMaxHeight: v } = this.props, { errors: y, allowMultiplePlacementsEnabled: b, lockChoiceOrder: x, maxAnswerChoices: S } = a, { choicesError: C, choicesErrors: w } = y || {}, { maxImageWidth: T = {}, maxImageHeight: E = {} } = g || {}, D = { gridTemplateColumns: `repeat(${a.categoriesPerRow}, 1fr)` }, O = S && i?.length >= S ? `Only ${S} allowed maximum` : "";
|
|
70
|
+
return /* @__PURE__ */ c(u, { children: [
|
|
71
|
+
/* @__PURE__ */ s(e, {
|
|
72
|
+
label: "Choices",
|
|
73
|
+
buttonLabel: "ADD A CHOICE",
|
|
74
|
+
onAdd: this.addChoice,
|
|
75
|
+
buttonDisabled: S && i && i?.length >= S,
|
|
76
|
+
tooltip: O
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ s(n, {
|
|
79
|
+
config: a,
|
|
80
|
+
onModelChanged: p,
|
|
81
|
+
spellCheck: m
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ s(d, {
|
|
84
|
+
style: D,
|
|
85
|
+
children: i.map((e, n) => /* @__PURE__ */ s(t, {
|
|
86
|
+
choice: e,
|
|
87
|
+
focusedEl: r,
|
|
88
|
+
deleteFocusedEl: this.deleteFocusedEl,
|
|
89
|
+
correctResponseCount: e.correctResponseCount,
|
|
90
|
+
allowMultiplePlacements: b,
|
|
91
|
+
lockChoiceOrder: x,
|
|
92
|
+
index: n,
|
|
93
|
+
imageSupport: o,
|
|
94
|
+
onChange: this.changeChoice,
|
|
95
|
+
onDelete: () => this.deleteChoice(e),
|
|
96
|
+
toolbarOpts: h,
|
|
97
|
+
spellCheck: m,
|
|
98
|
+
error: w && w[e.id],
|
|
99
|
+
maxImageWidth: T && T.choice || _,
|
|
100
|
+
maxImageHeight: E && E.choice || v,
|
|
101
|
+
uploadSoundSupport: l,
|
|
102
|
+
configuration: g
|
|
103
|
+
}, e.id))
|
|
104
|
+
}),
|
|
105
|
+
C && /* @__PURE__ */ s(f, { children: C })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { p as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/header.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 React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Header extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
buttonLabel: PropTypes.Requireable<string>;
|
|
14
|
+
onAdd: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
+
label: PropTypes.Validator<string>;
|
|
16
|
+
info: PropTypes.Requireable<any>;
|
|
17
|
+
buttonDisabled: PropTypes.Requireable<boolean>;
|
|
18
|
+
variant: PropTypes.Requireable<string>;
|
|
19
|
+
tooltip: PropTypes.Requireable<string>;
|
|
20
|
+
};
|
|
21
|
+
static defaultProps: {};
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export default Header;
|
|
25
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/author/design/header.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAyBnC,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS;IACzC,MAAM,CAAC,SAAS;;;;;;;;MAQd;IAEF,MAAM,CAAC,YAAY,KAAM;IAEzB,MAAM;CAsBP;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AddButton as e } from "./buttons.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { styled as r } from "@mui/material/styles";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import o from "@mui/material/Tooltip";
|
|
7
|
+
import s from "@mui/material/Typography";
|
|
8
|
+
//#region src/author/design/header.tsx
|
|
9
|
+
var c = r("div")(({ theme: e }) => ({
|
|
10
|
+
display: "flex",
|
|
11
|
+
justifyContent: "space-between",
|
|
12
|
+
marginBottom: e.spacing(1)
|
|
13
|
+
})), l = r("div")({
|
|
14
|
+
display: "flex",
|
|
15
|
+
alignItems: "center"
|
|
16
|
+
}), u = r(o)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
17
|
+
fontSize: e.typography.fontSize - 2,
|
|
18
|
+
whiteSpace: "pre",
|
|
19
|
+
maxWidth: "500px"
|
|
20
|
+
} })), d = class extends t.Component {
|
|
21
|
+
static propTypes = {
|
|
22
|
+
buttonLabel: n.string,
|
|
23
|
+
onAdd: n.func.isRequired,
|
|
24
|
+
label: n.string.isRequired,
|
|
25
|
+
info: n.any,
|
|
26
|
+
buttonDisabled: n.bool,
|
|
27
|
+
variant: n.string,
|
|
28
|
+
tooltip: n.string
|
|
29
|
+
};
|
|
30
|
+
static defaultProps = {};
|
|
31
|
+
render() {
|
|
32
|
+
let { onAdd: t, label: n, buttonLabel: r, info: o, buttonDisabled: d, variant: f, tooltip: p } = this.props;
|
|
33
|
+
return /* @__PURE__ */ a(c, { children: [/* @__PURE__ */ a(l, { children: [/* @__PURE__ */ i(s, {
|
|
34
|
+
variant: f || "title",
|
|
35
|
+
children: n
|
|
36
|
+
}), o] }), /* @__PURE__ */ i(u, {
|
|
37
|
+
title: p || "",
|
|
38
|
+
enterTouchDelay: 50,
|
|
39
|
+
leaveTouchDelay: 3e3,
|
|
40
|
+
children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(e, {
|
|
41
|
+
onClick: t,
|
|
42
|
+
label: r,
|
|
43
|
+
disabled: d
|
|
44
|
+
}) })
|
|
45
|
+
})] });
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { d as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/index.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 React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class Design extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
configuration: PropTypes.Requireable<object>;
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
+
model: PropTypes.Validator<object>;
|
|
17
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
uid: PropTypes.Requireable<string>;
|
|
19
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
}>>;
|
|
23
|
+
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
}>>;
|
|
27
|
+
};
|
|
28
|
+
constructor(props: any);
|
|
29
|
+
updateModel: any;
|
|
30
|
+
changeRationale: any;
|
|
31
|
+
changeTeacherInstructions: any;
|
|
32
|
+
changeFeedback: any;
|
|
33
|
+
onAddAlternateResponse: any;
|
|
34
|
+
onPromptChanged: (prompt: any) => any;
|
|
35
|
+
onRemoveAlternateResponse: any;
|
|
36
|
+
countChoiceInCorrectResponse: any;
|
|
37
|
+
checkAllowMultiplePlacements: any;
|
|
38
|
+
isAlertModalOpened: any;
|
|
39
|
+
onAlertModalCancel: any;
|
|
40
|
+
onDragStart: any;
|
|
41
|
+
onDragEnd: any;
|
|
42
|
+
removeChoiceFromSource: any;
|
|
43
|
+
addChoiceToCategory: any;
|
|
44
|
+
deleteChoiceFromCategory: any;
|
|
45
|
+
moveChoice: any;
|
|
46
|
+
addChoiceToAlternateCategory: any;
|
|
47
|
+
moveChoiceInAlternate: any;
|
|
48
|
+
deleteChoiceFromAlternateCategory: any;
|
|
49
|
+
renderDragOverlay: any;
|
|
50
|
+
render(): React.JSX.Element;
|
|
51
|
+
}
|
|
52
|
+
export default Design;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/author/design/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAgEnC,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS;IACzC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;MAed;gBAEU,KAAK,KAAA;IAQjB,WAAW,EAAE,GAAG,CA2Cd;IAEF,eAAe,EAAE,GAAG,CAOlB;IAEF,yBAAyB,EAAE,GAAG,CAO5B;IAEF,cAAc,EAAE,GAAG,CAEjB;IAEF,sBAAsB,EAAE,GAAG,CAWzB;IAEF,eAAe,GAAI,WAAM,SAAkC;IAE3D,yBAAyB,EAAE,GAAG,CAW5B;IAEF,4BAA4B,EAAE,GAAG,CAI/B;IAEF,4BAA4B,EAAE,GAAG,CAU/B;IAEF,kBAAkB,EAAE,GAAG,CAMrB;IAEF,kBAAkB,EAAE,GAAG,CAIrB;IAEF,WAAW,EAAE,GAAG,CAOd;IAEF,SAAS,EAAE,GAAG,CA8CZ;IAEF,sBAAsB,EAAE,GAAG,CAgBzB;IAEF,mBAAmB,EAAE,GAAG,CAmBtB;IAEF,wBAAwB,EAAE,GAAG,CAK3B;IAEF,UAAU,EAAE,GAAG,CAsBb;IAGF,4BAA4B,EAAE,GAAG,CAkD/B;IAEF,qBAAqB,EAAE,GAAG,CAuBxB;IAEF,iCAAiC,EAAE,GAAG,CAYpC;IAEF,iBAAiB,EAAE,GAAG,CAsBpB;IAEF,MAAM;CAiSP;AAED,eAAe,MAAM,CAAC"}
|