From fa0f751d284f75fcaf345395c31f4effc8258fbf Mon Sep 17 00:00:00 2001 From: Sacha Trauwaen Date: Tue, 16 May 2023 12:05:29 +0200 Subject: [PATCH] CollectionField contain filter in place of start on display name in dnn user data source --- .../Datasource/DnnUsersDataSource.cs | 2 +- OpenContent/OpenContent.csproj | 1 + OpenContent/js/lamaengine.js | 3 +- OpenContent/lama/dist/js/app.js | 2 +- OpenContent/lama/dist/js/app.js.map | 2 +- .../lama/src/components/CollectionField.vue | 104 ++++++++++++++++++ OpenContent/lama/src/main.js | 2 + 7 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 OpenContent/lama/src/components/CollectionField.vue diff --git a/OpenContent/Components/Datasource/DnnUsersDataSource.cs b/OpenContent/Components/Datasource/DnnUsersDataSource.cs index bad50cda..39b98e71 100644 --- a/OpenContent/Components/Datasource/DnnUsersDataSource.cs +++ b/OpenContent/Components/Datasource/DnnUsersDataSource.cs @@ -140,7 +140,7 @@ public override IDataItems GetAll(DataSourceContext context, Select selectQuery) if (ruleDisplayName != null) { - string displayName = ruleDisplayName.Value.AsString + "%"; + string displayName = "%"+ruleDisplayName.Value.AsString + "%"; users = UserController.GetUsersByDisplayName(context.PortalId, displayName, pageIndex, pageSize, ref total, true, false).Cast(); } else diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index 6e406528..02cbceb4 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -1281,6 +1281,7 @@ + diff --git a/OpenContent/js/lamaengine.js b/OpenContent/js/lamaengine.js index 41df582e..93b1927a 100644 --- a/OpenContent/js/lamaengine.js +++ b/OpenContent/js/lamaengine.js @@ -386,13 +386,14 @@ alpacaEngine.engine = function (config) { } else if (config.query.type == "relation") { var postData = { + "collection": config.query.collection, "dataKey": config.query.dataKey, "valueField": config.query.valueField, "textField": config.query.textField }; $.ajax({ //url: self.sf.getServiceRoot(self.options.dataService.module) + self.options.dataService.controller + "/" + self.options.dataService.action, - url: self.sf.getServiceRoot("OpenContent") + "OpenContentAPI" + "/" + "LookupData", + url: self.sf.getServiceRoot("OpenContent") + "OpenContentAPI" + "/" + config.query.action, beforeSend: self.sf.setModuleHeaders, type: "post", diff --git a/OpenContent/lama/dist/js/app.js b/OpenContent/lama/dist/js/app.js index 7fb41cd5..eb3e41e5 100644 --- a/OpenContent/lama/dist/js/app.js +++ b/OpenContent/lama/dist/js/app.js @@ -1,2 +1,2 @@ -(function(e){function r(r){for(var n,l,a=r[0],p=r[1],i=r[2],s=0,f=[];s\r\n import { VueSelectBaseField } from \"lamavue\";\r\n\r\n let UserRoleField = {\r\n name: \"UserRoleField\",\r\n extends: VueSelectBaseField,\r\n props: {},\r\n data() {\r\n return {};\r\n },\r\n computed: {\r\n query() {\r\n return {\r\n type: \"userrole\"\r\n };\r\n },\r\n },\r\n methods: {\r\n map(item) {\r\n return item.text;\r\n },\r\n reduce(option) {\r\n return option;\r\n },\r\n },\r\n components: {},\r\n builder: {\r\n props() {\r\n return {\r\n schema: {\r\n type: \"object\",\r\n properties: {\r\n many: {\r\n type: \"boolean\",\r\n },\r\n placeholder: {\r\n title: \"Placeholder\",\r\n type: \"string\",\r\n },\r\n },\r\n },\r\n options: {\r\n fields: {\r\n many: {\r\n rightLabel: \"Many\",\r\n },\r\n },\r\n },\r\n };\r\n },\r\n fromBuilder(field) {\r\n return {\r\n schema: {\r\n type: field.many ? \"array\" : \"string\",\r\n },\r\n options: {\r\n type: \"userrole\",\r\n placeholder: field.placeholder,\r\n },\r\n };\r\n },\r\n toBuilder(def) {\r\n let builder = {\r\n fieldType: \"userrole\",\r\n placeholder: def.options.placeholder,\r\n many: def.schema.type == \"array\",\r\n };\r\n return builder;\r\n },\r\n },\r\n };\r\n\r\n export default UserRoleField;\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserRoleField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserRoleField.vue?vue&type=script&lang=js&\"","import Vue from 'vue'\r\n//import App from './App.vue'\r\nimport UserRoleField from './components/UserRoleField.vue'\r\n\r\n// eslint-disable-next-line no-unused-vars\r\nimport { App, Builder, Lama } from \"lamavue\";\r\n\r\nVue.config.productionTip = false\r\nLama.registerFieldComponent(\"userrole\", UserRoleField);\r\n/*\r\nnew Vue({\r\n render: h => h(App),\r\n}).$mount('#app')\r\n*/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/components/UserRoleField.vue","webpack:///./src/components/CollectionField.vue","webpack:///src/components/UserRoleField.vue","webpack:///./src/components/UserRoleField.vue?1909","webpack:///src/components/CollectionField.vue","webpack:///./src/components/CollectionField.vue?e7b5","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","render","staticRenderFns","component","Vue","config","productionTip","Lama","registerFieldComponent","UserRoleField","CollectionField"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACp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AAR,aACQ,YAAR,sBACQ,KAAR,wBAUM,OAPN,WACA,uBACA,6BAEQ,EAAR,iDACQ,EAAR,gDAEA,KAKA,IClGyV,IJOrV,EAAY,eACd,EACA,EACA,GACA,EACA,KACA,WACA,MAIa,I,QKVfC,aAAIC,OAAOC,eAAgB,EAC3BC,UAAKC,uBAAuB,WAAYC,GACxCF,UAAKC,uBAAuB,aAAcE","file":"js/app.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var render, staticRenderFns\nimport script from \"./UserRoleField.vue?vue&type=script&lang=js&\"\nexport * from \"./UserRoleField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d2ae2ebc\",\n null\n \n)\n\nexport default component.exports","var render, staticRenderFns\nimport script from \"./CollectionField.vue?vue&type=script&lang=js&\"\nexport * from \"./CollectionField.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fb434da8\",\n null\n \n)\n\nexport default component.exports","\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserRoleField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserRoleField.vue?vue&type=script&lang=js&\"","\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollectionField.vue?vue&type=script&lang=js&\"","import Vue from 'vue'\r\n//import App from './App.vue'\r\nimport UserRoleField from './components/UserRoleField.vue'\r\nimport CollectionField from './components/CollectionField.vue'\r\n\r\n// eslint-disable-next-line no-unused-vars\r\nimport { App, Builder, Lama } from \"lamavue\";\r\n\r\nVue.config.productionTip = false\r\nLama.registerFieldComponent(\"userrole\", UserRoleField);\r\nLama.registerFieldComponent(\"collection\", CollectionField);\r\n/*\r\nnew Vue({\r\n render: h => h(App),\r\n}).$mount('#app')\r\n*/"],"sourceRoot":""} \ No newline at end of file diff --git a/OpenContent/lama/src/components/CollectionField.vue b/OpenContent/lama/src/components/CollectionField.vue new file mode 100644 index 00000000..d28cf033 --- /dev/null +++ b/OpenContent/lama/src/components/CollectionField.vue @@ -0,0 +1,104 @@ + + + + \ No newline at end of file diff --git a/OpenContent/lama/src/main.js b/OpenContent/lama/src/main.js index b728c696..2684c9e3 100644 --- a/OpenContent/lama/src/main.js +++ b/OpenContent/lama/src/main.js @@ -1,12 +1,14 @@ import Vue from 'vue' //import App from './App.vue' import UserRoleField from './components/UserRoleField.vue' +import CollectionField from './components/CollectionField.vue' // eslint-disable-next-line no-unused-vars import { App, Builder, Lama } from "lamavue"; Vue.config.productionTip = false Lama.registerFieldComponent("userrole", UserRoleField); +Lama.registerFieldComponent("collection", CollectionField); /* new Vue({ render: h => h(App),