@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,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/category.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 const CategoryType: {
|
|
12
|
+
id: PropTypes.Validator<string>;
|
|
13
|
+
categoryId: PropTypes.Requireable<string>;
|
|
14
|
+
};
|
|
15
|
+
export declare class Category extends React.Component {
|
|
16
|
+
static propTypes: {
|
|
17
|
+
className: PropTypes.Requireable<string>;
|
|
18
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
19
|
+
onDropChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onRemoveChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
minRowHeight: PropTypes.Requireable<string>;
|
|
22
|
+
id: PropTypes.Validator<string>;
|
|
23
|
+
categoryId: PropTypes.Requireable<string>;
|
|
24
|
+
};
|
|
25
|
+
static defaultProps: {};
|
|
26
|
+
render(): React.JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export default Category;
|
|
29
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/category.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS;IAC3C,MAAM,CAAC,SAAS;;;;;;;;MAOd;IAEF,MAAM,CAAC,YAAY,KAAM;IAEzB,MAAM;CAmCP;AAQD,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import e from "./choice.js";
|
|
2
|
+
import t from "./droppable-placeholder.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { styled as i } from "@mui/material/styles";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
//#region src/delivery/categorize/category.tsx
|
|
8
|
+
var o = {
|
|
9
|
+
id: r.string.isRequired,
|
|
10
|
+
categoryId: r.string
|
|
11
|
+
}, s = class extends n.Component {
|
|
12
|
+
static propTypes = {
|
|
13
|
+
...o,
|
|
14
|
+
className: r.string,
|
|
15
|
+
disabled: r.bool,
|
|
16
|
+
onDropChoice: r.func,
|
|
17
|
+
onRemoveChoice: r.func,
|
|
18
|
+
minRowHeight: r.string
|
|
19
|
+
};
|
|
20
|
+
static defaultProps = {};
|
|
21
|
+
render() {
|
|
22
|
+
let { className: n, choices: r = [], disabled: i, onDropChoice: o, onRemoveChoice: s, id: l, correct: u, minRowHeight: d } = this.props;
|
|
23
|
+
return /* @__PURE__ */ a(c, {
|
|
24
|
+
className: n,
|
|
25
|
+
id: l,
|
|
26
|
+
children: /* @__PURE__ */ a(t, {
|
|
27
|
+
id: l,
|
|
28
|
+
onDropChoice: o,
|
|
29
|
+
disabled: i,
|
|
30
|
+
correct: u,
|
|
31
|
+
minRowHeight: d,
|
|
32
|
+
children: r.map((t, n) => /* @__PURE__ */ a(e, {
|
|
33
|
+
onRemoveChoice: s,
|
|
34
|
+
disabled: i,
|
|
35
|
+
choiceIndex: n,
|
|
36
|
+
categoryId: l,
|
|
37
|
+
...t
|
|
38
|
+
}, n))
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}, c = i("div")(({ theme: e }) => ({
|
|
43
|
+
display: "flex",
|
|
44
|
+
flexDirection: "column",
|
|
45
|
+
flex: 2
|
|
46
|
+
}));
|
|
47
|
+
//#endregion
|
|
48
|
+
export { o as CategoryType, s as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/choice.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 const ChoiceType: {
|
|
12
|
+
content: PropTypes.Validator<string>;
|
|
13
|
+
id: PropTypes.Requireable<string>;
|
|
14
|
+
};
|
|
15
|
+
export declare class Layout extends React.Component {
|
|
16
|
+
static propTypes: {
|
|
17
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
18
|
+
correct: PropTypes.Requireable<boolean>;
|
|
19
|
+
isDragging: PropTypes.Requireable<boolean>;
|
|
20
|
+
content: PropTypes.Validator<string>;
|
|
21
|
+
id: PropTypes.Requireable<string>;
|
|
22
|
+
};
|
|
23
|
+
static defaultProps: {};
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: (props: any) => JSX.Element;
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=choice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/choice.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAWnC,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AAoCF,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS;IACzC,MAAM,CAAC,SAAS;;;;;;MAKd;IACF,MAAM,CAAC,YAAY,KAAM;IACzB,MAAM;CAWP;;AAoCD,wBAA4C"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { color as t } from "@pie-lib/render-ui";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import r from "debug";
|
|
5
|
+
import { styled as i } from "@mui/material/styles";
|
|
6
|
+
import { useDraggable as a } from "@dnd-kit/core";
|
|
7
|
+
import { uid as o } from "@pie-lib/drag";
|
|
8
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
9
|
+
import c from "@mui/material/Card";
|
|
10
|
+
import l from "@mui/material/CardContent";
|
|
11
|
+
//#region src/delivery/categorize/choice.tsx
|
|
12
|
+
r("@pie-ui:categorize:choice");
|
|
13
|
+
var u = {
|
|
14
|
+
content: n.string.isRequired,
|
|
15
|
+
id: n.string
|
|
16
|
+
}, d = i("div", { shouldForwardProp: (e) => ![
|
|
17
|
+
"isDragging",
|
|
18
|
+
"disabled",
|
|
19
|
+
"correct"
|
|
20
|
+
].includes(e) })(({ isDragging: e, disabled: n, correct: r }) => ({
|
|
21
|
+
direction: "initial",
|
|
22
|
+
cursor: n ? "not-allowed" : e ? "move" : "pointer",
|
|
23
|
+
width: "100%",
|
|
24
|
+
borderRadius: "6px",
|
|
25
|
+
...r === !0 && { border: `solid 2px ${t.correct()}` },
|
|
26
|
+
...r === !1 && { border: `solid 2px ${t.incorrect()}` }
|
|
27
|
+
})), f = i(c)({
|
|
28
|
+
color: t.text(),
|
|
29
|
+
backgroundColor: t.background(),
|
|
30
|
+
width: "100%"
|
|
31
|
+
}), p = i(l)(({ theme: e }) => ({
|
|
32
|
+
color: t.text(),
|
|
33
|
+
backgroundColor: t.white(),
|
|
34
|
+
"&:last-child": { paddingBottom: e.spacing(2) },
|
|
35
|
+
borderRadius: "4px",
|
|
36
|
+
border: "1px solid",
|
|
37
|
+
"& p": { margin: "0px" }
|
|
38
|
+
})), m = class extends e.Component {
|
|
39
|
+
static propTypes = {
|
|
40
|
+
...u,
|
|
41
|
+
disabled: n.bool,
|
|
42
|
+
correct: n.bool,
|
|
43
|
+
isDragging: n.bool
|
|
44
|
+
};
|
|
45
|
+
static defaultProps = {};
|
|
46
|
+
render() {
|
|
47
|
+
let { content: e, isDragging: t, disabled: n, correct: r } = this.props;
|
|
48
|
+
return /* @__PURE__ */ s(d, {
|
|
49
|
+
isDragging: t,
|
|
50
|
+
disabled: n,
|
|
51
|
+
correct: r,
|
|
52
|
+
children: /* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { dangerouslySetInnerHTML: { __html: e } }) })
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, h = ({ id: e, content: t, disabled: n, correct: r, extraStyle: i, categoryId: o, choiceIndex: c }) => {
|
|
56
|
+
let { attributes: l, listeners: u, setNodeRef: d, isDragging: f } = a({
|
|
57
|
+
id: o === void 0 ? `choice-${e}-board` : `choice-${e}-${o}-${c}`,
|
|
58
|
+
data: {
|
|
59
|
+
id: e,
|
|
60
|
+
categoryId: o,
|
|
61
|
+
choiceIndex: c,
|
|
62
|
+
value: t,
|
|
63
|
+
itemType: "categorize",
|
|
64
|
+
type: "choice"
|
|
65
|
+
},
|
|
66
|
+
disabled: n
|
|
67
|
+
});
|
|
68
|
+
return /* @__PURE__ */ s("div", {
|
|
69
|
+
ref: d,
|
|
70
|
+
style: {
|
|
71
|
+
margin: "4px",
|
|
72
|
+
...i
|
|
73
|
+
},
|
|
74
|
+
...u,
|
|
75
|
+
...l,
|
|
76
|
+
children: /* @__PURE__ */ s(m, {
|
|
77
|
+
id: e,
|
|
78
|
+
content: t,
|
|
79
|
+
disabled: n,
|
|
80
|
+
correct: r,
|
|
81
|
+
isDragging: f
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
h.propTypes = {
|
|
86
|
+
...u,
|
|
87
|
+
extraStyle: n.object,
|
|
88
|
+
categoryId: n.string,
|
|
89
|
+
choiceIndex: n.number,
|
|
90
|
+
onRemoveChoice: n.func
|
|
91
|
+
};
|
|
92
|
+
var g = o.withUid(h);
|
|
93
|
+
//#endregion
|
|
94
|
+
export { u as ChoiceType, g as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/choices.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
|
+
import { ChoiceType } from './choice.js';
|
|
12
|
+
export { ChoiceType };
|
|
13
|
+
export declare class Choices extends React.Component {
|
|
14
|
+
static propTypes: {
|
|
15
|
+
choices: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
16
|
+
content: PropTypes.Validator<string>;
|
|
17
|
+
id: PropTypes.Requireable<string>;
|
|
18
|
+
}> | PropTypes.InferProps<{
|
|
19
|
+
empty: PropTypes.Requireable<boolean>;
|
|
20
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
21
|
+
model: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
categoriesPerRow: PropTypes.Requireable<number>;
|
|
23
|
+
choicesLabel: PropTypes.Requireable<string>;
|
|
24
|
+
}>>;
|
|
25
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
26
|
+
choicePosition: PropTypes.Requireable<string>;
|
|
27
|
+
onDropChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
onRemoveChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
correct: any;
|
|
30
|
+
};
|
|
31
|
+
static defaultProps: {
|
|
32
|
+
model: {
|
|
33
|
+
categoriesPerRow: number;
|
|
34
|
+
choicesLabel: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
render(): React.JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
export default Choices;
|
|
40
|
+
//# sourceMappingURL=choices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/choices.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,CAAC;AAatB,qBAAa,OAAQ,SAAQ,KAAK,CAAC,SAAS;IAC1C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;MAad;IAEF,MAAM,CAAC,YAAY;;;;;MAKjB;IAEF,MAAM;CAyCP;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import e, { ChoiceType as t } from "./choice.js";
|
|
2
|
+
import n from "./droppable-placeholder.js";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import i from "prop-types";
|
|
5
|
+
import { styled as a } from "@mui/material/styles";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
//#region src/delivery/categorize/choices.tsx
|
|
8
|
+
var c = a("div")({
|
|
9
|
+
flex: 1,
|
|
10
|
+
touchAction: "none"
|
|
11
|
+
}), l = a("div")(({ theme: e }) => ({
|
|
12
|
+
margin: "0 auto",
|
|
13
|
+
textAlign: "center",
|
|
14
|
+
paddingTop: e.spacing(1)
|
|
15
|
+
})), u = class extends r.Component {
|
|
16
|
+
static propTypes = {
|
|
17
|
+
choices: i.arrayOf(i.oneOfType([i.shape(t), i.shape({ empty: i.bool })])),
|
|
18
|
+
model: i.shape({
|
|
19
|
+
categoriesPerRow: i.number,
|
|
20
|
+
choicesLabel: i.string
|
|
21
|
+
}),
|
|
22
|
+
disabled: i.bool,
|
|
23
|
+
choicePosition: i.string,
|
|
24
|
+
onDropChoice: i.func,
|
|
25
|
+
onRemoveChoice: i.func,
|
|
26
|
+
correct: i.boolean
|
|
27
|
+
};
|
|
28
|
+
static defaultProps = { model: {
|
|
29
|
+
categoriesPerRow: 1,
|
|
30
|
+
choicesLabel: ""
|
|
31
|
+
} };
|
|
32
|
+
render() {
|
|
33
|
+
let { choices: t = [], model: r, disabled: i, onDropChoice: a, onRemoveChoice: u, choicePosition: d, correct: f } = this.props, p = { textAlign: "center" };
|
|
34
|
+
return d === "left" && (p.direction = "rtl"), /* @__PURE__ */ o(c, { children: /* @__PURE__ */ s(n, {
|
|
35
|
+
id: "choices-board",
|
|
36
|
+
onDropChoice: a,
|
|
37
|
+
onRemoveChoice: u,
|
|
38
|
+
disabled: i,
|
|
39
|
+
style: { background: "none" },
|
|
40
|
+
choiceBoard: !0,
|
|
41
|
+
correct: f,
|
|
42
|
+
children: [r.choicesLabel && r.choicesLabel !== "" && /* @__PURE__ */ o(l, { dangerouslySetInnerHTML: { __html: r.choicesLabel } }), t.map((t, n) => t.empty ? /* @__PURE__ */ o("div", {}, n) : /* @__PURE__ */ o(e, {
|
|
43
|
+
disabled: i,
|
|
44
|
+
extraStyle: { maxWidth: `${95 / r.categoriesPerRow}%` },
|
|
45
|
+
...t
|
|
46
|
+
}, n))]
|
|
47
|
+
}) });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { u as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/droppable-placeholder.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
|
+
declare const DroppablePlaceholder: {
|
|
12
|
+
({ children, grid, disabled, choiceBoard, minRowHeight, id, correct }: {
|
|
13
|
+
children: any;
|
|
14
|
+
grid: any;
|
|
15
|
+
disabled: any;
|
|
16
|
+
choiceBoard: any;
|
|
17
|
+
minRowHeight: any;
|
|
18
|
+
id: any;
|
|
19
|
+
correct: any;
|
|
20
|
+
}): React.JSX.Element;
|
|
21
|
+
propTypes: {
|
|
22
|
+
choiceBoard: PropTypes.Requireable<boolean>;
|
|
23
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
24
|
+
grid: PropTypes.Requireable<object>;
|
|
25
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
26
|
+
minRowHeight: PropTypes.Requireable<string>;
|
|
27
|
+
onDropChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
id: PropTypes.Validator<string>;
|
|
29
|
+
correct: PropTypes.Requireable<boolean>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default DroppablePlaceholder;
|
|
33
|
+
//# sourceMappingURL=droppable-placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"droppable-placeholder.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/droppable-placeholder.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AASnC,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;CA6DzB,CAAC;AAaF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { color as e } from "@pie-lib/render-ui";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import n from "debug";
|
|
5
|
+
import { useTheme as r } from "@mui/material/styles";
|
|
6
|
+
import { useDroppable as i } from "@dnd-kit/core";
|
|
7
|
+
import { PlaceHolder as a } from "@pie-lib/drag";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
+
//#region src/delivery/categorize/droppable-placeholder.tsx
|
|
10
|
+
n("@pie-ui:categorize:droppable-placeholder");
|
|
11
|
+
var s = ({ children: t, grid: n, disabled: s, choiceBoard: c, minRowHeight: l, id: u, correct: d }) => {
|
|
12
|
+
let f = r(), { setNodeRef: p, isOver: m } = i({
|
|
13
|
+
id: u,
|
|
14
|
+
data: {
|
|
15
|
+
itemType: "categorize",
|
|
16
|
+
categoryId: u
|
|
17
|
+
},
|
|
18
|
+
disabled: s
|
|
19
|
+
}), h = {
|
|
20
|
+
padding: f.spacing(.5),
|
|
21
|
+
borderRadius: f.spacing(.5),
|
|
22
|
+
gridColumnGap: 0,
|
|
23
|
+
gridRowGap: 0,
|
|
24
|
+
display: "flex",
|
|
25
|
+
flexWrap: "wrap",
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
alignContent: "flex-start",
|
|
29
|
+
width: "100%",
|
|
30
|
+
height: "100%",
|
|
31
|
+
...d === !1 && !c && { border: `solid 2px ${e.incorrect()}` },
|
|
32
|
+
...d === !0 && !c && { border: `solid 2px ${e.correct()}` }
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ o("div", {
|
|
35
|
+
ref: p,
|
|
36
|
+
style: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
minHeight: l || "80px",
|
|
39
|
+
position: "relative",
|
|
40
|
+
touchAction: "none"
|
|
41
|
+
},
|
|
42
|
+
children: /* @__PURE__ */ o(a, {
|
|
43
|
+
isOver: m,
|
|
44
|
+
grid: n,
|
|
45
|
+
disabled: s,
|
|
46
|
+
choiceBoard: c,
|
|
47
|
+
isCategorize: !0,
|
|
48
|
+
extraStyles: h,
|
|
49
|
+
children: t
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
s.propTypes = {
|
|
54
|
+
choiceBoard: t.bool,
|
|
55
|
+
children: t.node.isRequired,
|
|
56
|
+
grid: t.object,
|
|
57
|
+
disabled: t.bool,
|
|
58
|
+
minRowHeight: t.string,
|
|
59
|
+
onDropChoice: t.func,
|
|
60
|
+
id: t.string.isRequired,
|
|
61
|
+
correct: t.bool
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { s as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/grid-content.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 GridContent extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
|
|
15
|
+
columns: PropTypes.Requireable<number>;
|
|
16
|
+
rows: PropTypes.Requireable<number>;
|
|
17
|
+
extraStyle: PropTypes.Requireable<object>;
|
|
18
|
+
};
|
|
19
|
+
static defaultProps: {
|
|
20
|
+
columns: number;
|
|
21
|
+
rows: number;
|
|
22
|
+
};
|
|
23
|
+
render(): React.JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
export default GridContent;
|
|
26
|
+
//# sourceMappingURL=grid-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-content.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/grid-content.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,qBAAa,WAAY,SAAQ,KAAK,CAAC,SAAS;IAC9C,MAAM,CAAC,SAAS;;;;;;MAMd;IACF,MAAM,CAAC,YAAY;;;MAGjB;IAEF,MAAM;CAcP;AAWD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
//#region src/delivery/categorize/grid-content.tsx
|
|
6
|
+
var i = class extends e.Component {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
className: t.string,
|
|
9
|
+
children: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired,
|
|
10
|
+
columns: t.number,
|
|
11
|
+
rows: t.number,
|
|
12
|
+
extraStyle: t.object
|
|
13
|
+
};
|
|
14
|
+
static defaultProps = {
|
|
15
|
+
columns: 2,
|
|
16
|
+
rows: 2
|
|
17
|
+
};
|
|
18
|
+
render() {
|
|
19
|
+
let { className: e, children: t, columns: n, extraStyle: i, rows: o } = this.props;
|
|
20
|
+
return /* @__PURE__ */ r(a, {
|
|
21
|
+
style: {
|
|
22
|
+
gridTemplateColumns: `repeat(${n}, 1fr)`,
|
|
23
|
+
gridTemplateRows: o === 2 ? "auto 1fr" : `repeat(${o}, auto)`,
|
|
24
|
+
...i
|
|
25
|
+
},
|
|
26
|
+
className: e,
|
|
27
|
+
children: t
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}, a = n("div")(({ theme: e }) => ({
|
|
31
|
+
display: "grid",
|
|
32
|
+
columnGap: e.spacing(1),
|
|
33
|
+
gridColumnGap: e.spacing(1),
|
|
34
|
+
rowGap: e.spacing(1),
|
|
35
|
+
gridRowGap: e.spacing(1),
|
|
36
|
+
gridAutoRows: "1fr"
|
|
37
|
+
}));
|
|
38
|
+
//#endregion
|
|
39
|
+
export { i as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/src/categorize/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 Categorize extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
model: PropTypes.Requireable<object>;
|
|
14
|
+
session: PropTypes.Requireable<PropTypes.InferProps<{
|
|
15
|
+
answers: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
16
|
+
choice: PropTypes.Requireable<string>;
|
|
17
|
+
category: PropTypes.Requireable<string>;
|
|
18
|
+
}> | null | undefined)[]>;
|
|
19
|
+
}>>;
|
|
20
|
+
onAnswersChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
onShowCorrectToggle: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
pauseMathObserver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
+
resumeMathObserver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
};
|
|
25
|
+
static defaultProps: {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
};
|
|
28
|
+
constructor(props: any);
|
|
29
|
+
removeChoice: any;
|
|
30
|
+
dropChoice: any;
|
|
31
|
+
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
32
|
+
toggleShowCorrect: () => void;
|
|
33
|
+
getPositionDirection: any;
|
|
34
|
+
existAlternateResponse: (correctResponse: any) => any;
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
|
+
}
|
|
37
|
+
declare class CategorizeProvider extends React.Component {
|
|
38
|
+
static propTypes: {
|
|
39
|
+
model: PropTypes.Requireable<object>;
|
|
40
|
+
session: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
+
answers: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
42
|
+
choice: PropTypes.Requireable<string>;
|
|
43
|
+
category: PropTypes.Requireable<string>;
|
|
44
|
+
}> | null | undefined)[]>;
|
|
45
|
+
}>>;
|
|
46
|
+
onAnswersChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
47
|
+
onShowCorrectToggle: PropTypes.Validator<(...args: any[]) => any>;
|
|
48
|
+
pauseMathObserver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
+
resumeMathObserver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
+
};
|
|
51
|
+
constructor(props: any);
|
|
52
|
+
onDragStart: any;
|
|
53
|
+
onDragEnd: any;
|
|
54
|
+
renderDragOverlay: any;
|
|
55
|
+
render(): React.JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
export default CategorizeProvider;
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delivery/categorize/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAmEnC,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS;IAC7C,MAAM,CAAC,SAAS;;;;;;;;;;;;MAcd;IAEF,MAAM,CAAC,YAAY;;MAEjB;gBAEU,KAAK,KAAA;IASjB,YAAY,EAAE,GAAG,CAKf;IAEF,UAAU,EAAE,GAAG,CAkEb;IAEF,gCAAgC,CAAC,SAAS,KAAA;IAmB1C,iBAAiB,aAGZ;IAEL,oBAAoB,EAAE,GAAG,CAoBvB;IAEF,sBAAsB,GAAI,oBAAe,SAC0C;IAEnF,MAAM;CAmIP;AAED,cAAM,kBAAmB,SAAQ,KAAK,CAAC,SAAS;IAC9C,MAAM,CAAC,SAAS;;;;;;;;;;;;MAcd;gBAEU,KAAK,KAAA;IASjB,WAAW,EAAE,GAAG,CAcd;IAEF,SAAS,EAAE,GAAG,CAkDZ;IAEF,iBAAiB,EAAE,GAAG,CAcpB;IAEF,MAAM;CAiBP;AAsBD,eAAe,kBAAkB,CAAC"}
|