Commit eb7e2ccf authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

erp5_api_style: Updated API interface

* Introduce Separate JSON Schema Form Editor Gadget
* Introduce Separate JSON Schema Text Editor Gadget
* Add djv for simple validation in Text Editor Gadget
* Introduce Switch Editor Gadget to easily switch from form to text
* Always displays response
* Lint code
* Remove manual html manipulation and use domsugar
* Display API related information at the top
parent bc71a5f5
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@korzio/djv-draft-04")):"function"==typeof define&&define.amd?define(["@korzio/djv-draft-04"],t):"object"==typeof exports?exports.djv=t(require("@korzio/djv-draft-04")):e.djv=t(e["@korzio/djv-draft-04"])}("undefined"!=typeof self?self:this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,r){"use strict";function n(e,t,r){return"function"!=typeof e?e:e(t,r)}function a(e,t){return"object"===(void 0===e?"undefined":o(e))&&Object.prototype.hasOwnProperty.call(e,t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports={asExpression:n,hasProperty:a}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){return"object"===(void 0===e?"undefined":f(e))||"boolean"==typeof e}function o(e){return!0===e?s.ANY_SCHEMA:!1===e?s.NOT_ANY_SCHEMA:e}function i(e){if("object"!==(void 0===e?"undefined":f(e))||null===e)return{enum:[e]};if(Array.isArray(e))return{items:e.map(i),additionalItems:!1};var t=Object.keys(e);return{properties:t.reduce(function(t,r){return Object.assign({},t,n({},r,i(e[r])))},{}),required:t}}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s={ANY_SCHEMA:{},NOT_ANY_SCHEMA:{not:{}}};e.exports={is:a,make:i,transform:o,transformation:s}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){if("string"!=typeof e)return e;var t=String.prototype.replace.call(e,/[^a-z0-9áéíóúñü .,_-]/gim,"");return String.prototype.trim.call(t)}function o(e,t){function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=void 0;return r.lines.push(e.replace(/%i/g,function(){return"i"}).replace(/\$(\d)/g,function(e,t){return""+a(n[t-1])}).replace(/(%[sd])/g,function(){return n.length&&(i=n.shift()),""+i})),r}function n(e){return e.replace("[","").replace("]","").replace("(","").replace(")","").replace("decodeURIComponent","")}function o(){return this.join(".").replace(/\.\[/g,"[")}var i="function"==typeof t.errorHandler?t.errorHandler:function(e){var t=this.data.toString().replace(/^data/,""),r=t.replace(/\['([^']+)'\]/gi,".$1").replace(/\[(i[0-9]*)\]/gi,"['+$1+']"),a="#"+t.replace(/\[i([0-9]*)\]/gi,"/items").replace(/\['([^']+)'\]/gi,"/properties/$1")+"/"+e;return"return {\n keyword: '"+e+"',\n dataPath: decodeURIComponent(\""+n(r)+'"),\n schemaPath: decodeURIComponent("'+n(a)+'")\n };'};return Object.assign(r,{cachedIndex:0,cached:[],cache:function(e){var t=r.cached[r.cached.length-1];return t[e]?"i"+t[e]:(r.cachedIndex+=1,t[e]=r.cachedIndex,"(i"+t[e]+" = "+e+")")},data:["data"],error:i,lines:[],schema:["schema"],push:r,link:function(t){return"f"+e.link(t)},visit:function(t){r.cached.push({}),e.visit(t,r),r.cached.pop()}}),r.data.toString=o,r.schema.toString=o,r}function i(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.inner,a=new Function("schema",e)(t);return n||(a.toString=function(){return e}),a}function f(e){var t=e.defineErrors,r=e.index;return"\n "+(t?"const errors = [];":"")+"\n "+(r?"let i"+Array.apply(void 0,n(Array(r))).map(function(e,t){return t+1}).join(",i")+";":"")+"\n "}function s(e){var t=e.context;if(e.inner||!t.length)return"";var r=[],n=[];return t.forEach(function(e,t){if("number"==typeof e)return void n.push(t+1+" = f"+(e+1));r.push(t+1+" = "+e)}),"const f"+r.concat(n).join(", f")+";"}function c(e){var t=e.defineErrors,r=e.lines,n=f(e),a=t?"if(errors.length) return errors;":"";return'\n "use strict";\n '+n+"\n "+r.join("\n")+"\n "+a+"\n "}function u(e,t){var r=e.cachedIndex,n=e.lines,a=t.context,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.inner,f=o.errorHandler,u={context:a,inner:i,defineErrors:f,index:r,lines:n};return"\n "+s(u)+"\n function f0(data) {\n "+c(u)+"\n }\n return f0;\n "}function p(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];var o=n[n.length-1]||{},i=[e[0]];return r.forEach(function(t,r){var a=Number.isInteger(t)?n[t]:o[t];i.push(a,e[r+1])}),i.join("")}}e.exports={body:u,restore:i,template:o,expression:p}},function(e,t,r){"use strict";function n(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var a=n(["!/^[a-zA-Z]+$/.test(",")"],["!/^[a-zA-Z]+$/.test(",")"]),o=n(["!/^[a-zA-Z0-9]+$/.test(",")"],["!/^[a-zA-Z0-9]+$/.test(",")"]),i=n(["!/^[-_a-zA-Z0-9]+$/.test(",")"],["!/^[-_a-zA-Z0-9]+$/.test(",")"]),f=n(["!/^[a-fA-F0-9]+$/.test(",")"],["!/^[a-fA-F0-9]+$/.test(",")"]),s=n(["!/^[0-9]+$/.test(",")"],["!/^[0-9]+$/.test(",")"]),c=n(["isNaN(Date.parse(",")) || ~",".indexOf('/')"],["isNaN(Date.parse(",")) || ~",".indexOf(\\'/\\')"]),u=n([""," !== ",".toUpperCase()"],[""," !== ",".toUpperCase()"]),p=n([""," !== ",".toLowerCase()"],[""," !== ",".toLowerCase()"]),A=n(["",".length >= 256 || !/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])(\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]))*$/.test(",")"],["",".length >= 256 || !/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])(\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9]))*$/.test(",")"]),d=n(["!/^[A-Za-z][A-Za-z0-9+\\-.]*:(?:\\/\\/(?:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,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-Za-z0-9\\\\-._~!$&\\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\\\\?(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?(?:\\\\#(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?$/.test(",")"]),l=n(["!/^[^@]+@[^@]+\\.[^@]+$/.test(",")"],["!/^[^@]+@[^@]+\\\\.[^@]+$/.test(",")"]),y=n(["!/^(\\d?\\d?\\d){0,255}\\.(\\d?\\d?\\d){0,255}\\.(\\d?\\d?\\d){0,255}\\.(\\d?\\d?\\d){0,255}$/.test(",") || ",'.split(".")[3] > 255'],["!/^(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}\\\\.(\\\\d?\\\\d?\\\\d){0,255}$/.test(",") || ",'.split(".")[3] > 255']),h=n(["!/^((?=.*::)(?!.*::.+::)(::)?([\\dA-F]{1,4}:(:|\\b)|){5}|([\\dA-F]{1,4}:){6})((([\\dA-F]{1,4}((?!\\3)::|:\\b|$))|(?!\\2\\3)){2}|(((2[0-4]|1\\d|[1-9])?\\d|25[0-5])\\.?\\b){4})$/.test(",")"],["!/^((?=.*::)(?!.*::.+::)(::)?([\\\\dA-F]{1,4}:(:|\\\\b)|){5}|([\\\\dA-F]{1,4}:){6})((([\\\\dA-F]{1,4}((?!\\\\3)::|:\\\\b|$))|(?!\\\\2\\\\3)){2}|(((2[0-4]|1\\\\d|[1-9])?\\\\d|25[0-5])\\\\.?\\\\b){4})$/.test(",")"]),m=n(["/[^\\\\]\\\\[^.*+?^${}()|[\\]\\\\bBcdDfnrsStvwWxu0-9]/i.test(",")"],["/[^\\\\\\\\]\\\\\\\\[^.*+?^\\${}()|[\\\\]\\\\\\\\bBcdDfnrsStvwWxu0-9]/i.test(",")"]),F=n(["!/^$|^\\/(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:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=@]|%[0-9A-Fa-f]{2})+(?:\\\\/(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\\\\?(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?(?:\\\\#(?:[A-Za-z0-9\\\\-._~!$&\\'()*+,;=:@\\\\/?]|%[0-9A-Fa-f]{2})*)?)$/i.test(",")"]),$=n(["!/^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#.\\/;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\:[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\:[1-9][0-9]{0,3}|\\*)?)*\\})*$/i.test(",")"],["!/^(?:(?:[^\\\\x00-\\\\x20\"\\'<>%\\\\\\\\^\\`{|}]|%[0-9a-f]{2})|\\\\{[+#.\\\\/;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\\\:[1-9][0-9]{0,3}|\\\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\\\:[1-9][0-9]{0,3}|\\\\*)?)*\\\\})*$/i.test(",")"]),b=r(2),g=b.expression;e.exports={alpha:g(a,"data"),alphanumeric:g(o,"data"),identifier:g(i,"data"),hexadecimal:g(f,"data"),numeric:g(s,"data"),"date-time":g(c,"data","data"),uppercase:g(u,"data","data"),lowercase:g(p,"data","data"),hostname:g(A,"data","data"),uri:g(d,"data"),email:g(l,"data"),ipv4:g(y,"data","data"),ipv6:g(h,"data"),regex:g(m,"data"),"json-pointer":g(F,"data"),"uri-reference":g(v,"data"),"uri-template":g($,"data")}},function(e,t,r){"use strict";var n=r(11),a=r(12),o=r(13),i=r(14),f=r(16),s=r(17),c=r(18),u=r(19),p=r(20),A=r(21),d=r(22),l=r(23),y=r(24),h=r(25),m=r(26),F=r(27);e.exports={name:{$ref:f,required:n,format:a,property:o,type:i,not:s,anyOf:c,oneOf:u,allOf:p,dependencies:A,properties:d,patternProperties:l,items:y,contains:h,constant:m,propertyNames:F},list:[f,n,a,o,i,s,c,u,p,A,d,l,y,h,m,F]}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports={readOnly:"false",exclusiveMinimum:function(e){return"%s <= "+e.exclusiveMinimum},minimum:function(e){return"%s < "+e.minimum},exclusiveMaximum:function(e){return"%s >= "+e.exclusiveMaximum},maximum:function(e){return"%s > "+e.maximum},multipleOf:'($1/$2) % 1 !== 0 && typeof $1 === "number"',pattern:function(e){var t=void 0,r=void 0;return"string"==typeof e.pattern?t=e.pattern:(t=e.pattern[0],r=e.pattern[1]),'typeof ($1) === "string" && !'+new RegExp(t,r)+".test($1)"},minLength:'typeof $1 === "string" && function dltml(b,c){for(var a=0,d=b.length;a<d&&c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return!!c}($1, $2)',maxLength:'typeof $1 === "string" && function dmtml(b,c){for(var a=0,d=b.length;a<d&&0<=c;){var e=b.charCodeAt(a++);55296<=e&&56319>=e&&a<d&&56320!==(b.charCodeAt(a++)&64512)&&a--;c--}return 0>c}($1, $2)',minItems:"$1.length < $2 && Array.isArray($1)",maxItems:"$1.length > $2 && Array.isArray($1)",uniqueItems:function(e,t){return e.uniqueItems?(t(t.cache("{}")),'Array.isArray($1) && $1.some(function(item, key) {\n if(item !== null && typeof item === "object") key = JSON.stringify(item);\n else key = item;\n if('+t.cache("{}")+".hasOwnProperty(key)) return true;\n "+t.cache("{}")+"[key] = true;\n })"):"true"},minProperties:'!Array.isArray($1) && typeof $1 === "object" && Object.keys($1).length < $2',maxProperties:'!Array.isArray($1) && typeof $1 === "object" && Object.keys($1).length > $2',enum:function(e,t){return e.enum.map(function(e){var r="$1",a=e;return"object"===(void 0===e?"undefined":n(e))?(a="'"+JSON.stringify(e)+"'",r=t.cache("JSON.stringify($1)")):"string"==typeof e&&(a="'"+escape(e)+"'"),r+" != decodeURIComponent("+a+")"}).join(" && ")}}},function(e,t,r){"use strict";e.exports=["$ref","$schema","type","not","anyOf","allOf","oneOf","properties","patternProperties","additionalProperties","items","additionalItems","required","default","title","description","definitions","dependencies","$id","contains","const","examples"]},function(e,t,r){"use strict";function n(e){return"string"!=typeof e?e:e.split(u)[0]}function a(e){return c.test(e)}function o(e){return e.replace(p,"$1")}function i(e){return"string"!=typeof e?e:e.split(u)[1]}function f(e){return e.filter(function(e){return"string"==typeof e}).reduce(function(e,t){if(!e.length||a(t))return t;if(!t)return e;if(0===t.indexOf("#")){var r=e.indexOf("#");return-1===r?e+t:e.slice(0,r)+t}var n=o(e)+t;return n+(-1===n.indexOf("#")?"#":"")},"")}function s(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}var c=/:\/\//,u=/#\/?/,p=/(^[^:]+:\/\/[^?#]*\/).*/,A={id:"$id"};e.exports={makePath:f,isFullUri:a,head:n,fragment:i,normalize:s,keys:A}},function(e,t,r){e.exports=r(9)},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof a))return new a(e);this.options=e,this.resolved={},this.state=new A(null,this),this.useVersion(e.version,e.versionConfigure),this.addFormat(e.formats)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(2),f=i.restore,s=i.expression,c=r(3),u=r(10),p=u.generate,A=u.State,d=r(28),l=d.add,y=d.use;Object.assign(a,{expression:s}),Object.assign(a.prototype,{validate:function(e,t){return this.resolve(e).fn(t)},addSchema:function(e,t){var r=this,n="object"===(void 0===e?"undefined":o(e))?e:t,a={schema:n,fn:p(this,n,void 0,this.options)};return[e,t.id].filter(function(e){return"string"==typeof e}).forEach(function(e){r.resolved[e]=Object.assign({name:e},a)}),a},removeSchema:function(e){e?delete this.resolved[e]:this.resolved={}},resolve:function(e){return"object"!==(void 0===e?"undefined":o(e))&&this.resolved[e]?this.resolved[e]:this.addSchema(e,this.state.resolve(e))},export:function(e){var t=this,r=void 0;return e?(r=this.resolve(e),r={name:e,schema:r.schema,fn:r.fn.toString()}):(r={},Object.keys(this.resolved).forEach(function(e){r[e]={name:e,schema:t.resolved[e].schema,fn:t.resolved[e].fn.toString()}})),JSON.stringify(r)},import:function(e){var t=this,r=JSON.parse(e),a=r;r.name&&r.fn&&r.schema&&(a=n({},r.name,r)),Object.keys(a).forEach(function(e){var r=a[e],n=r.name,o=r.schema,i=r.fn,s=f(i,o,t.options);t.resolved[n]={name:n,schema:o,fn:s}})},addFormat:function(e,t){if("string"==typeof e)return void(c[e]=t);"object"===(void 0===e?"undefined":o(e))&&Object.assign(c,e)},setErrorHandler:function(e){Object.assign(this.options,{errorHandler:e})},useVersion:function(e,t){"function"!=typeof t&&"draft-04"===e&&(t=r(29)),"function"==typeof t&&l(e,t),y(e)}}),e.exports=a},function(e,t,r){"use strict";function n(){var e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments[1]);Object.assign(this,{context:[],entries:new Map,env:e})}function a(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n(t,e),a=arguments[3],o=u(r,a);o.visit(t);var i=s(o,r,a);return c(i,t,a)}var o=r(4),i=o.list,f=r(2),s=f.body,c=f.restore,u=f.template,p=r(0),A=p.hasProperty,d=r(7),l=d.normalize,y=d.makePath,h=d.head,m=d.isFullUri,F=d.fragment,v=d.keys,$=r(1),b=$.is,g=$.transform;n.prototype=Object.assign(Object.create(Array.prototype),{addEntry:function(e,t){var r=this.entries.get(t);return!1===r?this.context.push(t):(void 0===r&&(this.entries.set(t,!1),r=a(this.env,t,this,{inner:!0}),this.entries.set(t,r),this.revealReference(t)),this.context.push(r))},revealReference:function(e){for(var t=this.context.indexOf(e);-1!==t;t=this.context.indexOf(e))this.context[t]=this.context.length},link:function(e){var t=this.resolve(e);return this.addEntry(e,t)},resolveReference:function(e){if(m(e))return e;for(var t=void 0,r=void 0,n=this.length-1;n>=0;n-=1,t=!1){var a=this[n],o=a[v.id],i=a.$ref;if(t=o||i,m(t)){r=n;break}}for(var f=[],s=this.length-1;s>r;s-=1){var c=this[s],u=c[v.id],p=c.$ref,A=u||p;h(A)&&f.push(A)}return y([t].concat(f,[e]))},ascend:function(e){for(var t=h(e),r=this.env.resolved[t]||{},n=r.schema,a=void 0===n?this[0]:n;a.$ref&&h(a.$ref)!==h(e)&&1===Object.keys(a).length;)a=this.ascend(a.$ref);return a},descend:function(e,t){var r=this,n=F(e);if(!n&&m(e))return t;n||(n=e);var a=n.split("/"),o=a.map(l).reduce(function(e,t,n){var o=e[t];return b(o)||(o=e.definitions&&e.definitions[t]),n!==a.length-1&&A(o,v.id)&&r.push(o),o},t);return b(o)?o:t},resolve:function(e){if("string"!=typeof e)return e;var t=this.resolveReference(e),r=this.ascend(t);return this.descend(e,r)},visit:function(e,t){var r=g(e),n=this.length;this.push(r),i.some(function(e){return e(r,t)}),this.length=n}}),e.exports={State:n,generate:a}},function(e,t,r){"use strict";e.exports=function(e,t){Array.isArray(e.required)&&t("if ("+t.data+" !== null && typeof "+t.data+" === 'object' && !Array.isArray("+t.data+")) {\n "+e.required.map(function(e){return"if (!"+t.data+'.hasOwnProperty(decodeURIComponent("'+escape(e)+'"))) '+t.error("required",e)}).join("")+"\n }")}},function(e,t,r){"use strict";var n=r(3);e.exports=function(e,t){if(void 0!==e.format){var r=n[e.format];if("function"==typeof r){t("if ("+r({data:t.data,schema:e})+") "+t.error("format"))}}}},function(e,t,r){"use strict";var n=r(5),a=r(6),o=r(0),i=o.asExpression;e.exports=function(e,t){Object.keys(e).forEach(function(r){if(-1===a.indexOf(r)&&"format"!==r){var o=i(n[r],e,t);if(o){var f=t.error(r);t("if ("+o+") "+f,t.data,e[r])}}})}},function(e,t,r){"use strict";var n=r(15),a=r(0),o=a.hasProperty;e.exports=function(e,t){if(o(e,"type")){var r=t.error("type",e.type);t("if ("+("("+[].concat(e.type).map(function(e){return n[e]}).join(") && (")+")")+") "+r,t.data)}}},function(e,t,r){"use strict";e.exports={null:"%s !== null",string:'typeof %s !== "string"',boolean:'typeof %s !== "boolean"',number:'typeof %s !== "number" || %s !== %s',integer:'typeof %s !== "number" || %s % 1 !== 0',object:'!%s || typeof %s !== "object" || Array.isArray(%s)',array:"!Array.isArray(%s)",date:"!(%s instanceof Date)"}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){return!!a(e,"$ref")&&(t("if ("+t.link(e.$ref)+"("+t.data+")) "+t.error("$ref")),!0)}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"not")){t("if (!"+(t.link(e.not)+"("+t.data+")")+") "+t.error("not"))}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"anyOf")){var r=t.error("anyOf"),n=e.anyOf.map(function(e){return t.link(e)+"("+t.data+")"}).join(" && ");t("if ("+n+") "+r)}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"oneOf")){var r=e.oneOf.map(function(e){return t.link(e)}),n=t.cache("["+r+"]"),o=t.cache("["+r+"]"),i=t.cache(o+".length - 1"),f=t.cache(o+".length - 1"),s=t.cache("0"),c=t.cache("0"),u=t.error("oneOf");t("for (\n "+n+", "+i+", "+s+";\n "+f+" >= 0 && "+f+" < "+o+".length;\n "+f+"--) {\n if(!"+o+"["+f+"]("+t.data+")) "+c+"++;\n }\n if ("+c+" !== 1) "+u+"\n ")}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"allOf")){var r=t.error("allOf"),n=e.allOf.map(function(e){return t.link(e)+"("+t.data+")"}).join(" || ");t("if ("+n+") "+r)}}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var a=r(0),o=a.hasProperty,i=r(1),f=i.is;e.exports=function(e,t){o(e,"dependencies")&&Object.keys(e.dependencies).forEach(function(r){var a=e.dependencies[r],o=t.error("dependencies");t("if ("+t.data+'.hasOwnProperty(decodeURIComponent("'+escape(r)+'"))) {'),Array.isArray(a)||"string"==typeof a?[].concat(n(a)).map(function(e){return"if (!"+t.data+'.hasOwnProperty(decodeURIComponent("'+escape(e)+'"))) '+o}).map(t):f(a)&&t.visit(a),t("}")})}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(0),o=a.hasProperty;e.exports=function(e,t){o(e,"properties")&&"object"===n(e.properties)&&Object.keys(e.properties).forEach(function(r){var a=e.properties[r];if("object"!==(void 0===a?"undefined":n(a))||Object.keys(a).length){var o=!e.required||-1===e.required.indexOf(r);o&&t("if ("+t.data+'.hasOwnProperty(decodeURIComponent("'+escape(r)+'"))) {'),t.data.push("[decodeURIComponent('"+escape(r)+"')]"),t.visit(a),t.data.pop(),o&&t("}")}})}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){var r=a(e,"additionalProperties")&&!0!==e.additionalProperties,n=a(e,"patternProperties");if(r||n){t("if(typeof "+t.data+" === 'object' && !Array.isArray("+t.data+")) {"),t(t.cache("null"));var o=t.cache("null"),i=function(){!1===e.additionalProperties?t(t.error("additionalProperties")):e.additionalProperties&&(t.data.push("["+o+"]"),t.visit(e.additionalProperties),t.data.pop())};t("for ("+o+" in "+t.data+") {"),r&&n&&t(t.cache("false")),n?Object.keys(e.patternProperties).forEach(function(n){t("if ("+new RegExp(n)+".test("+o+")) {"),r&&t(t.cache("false")+" = true;");var a=e.patternProperties[n];t.data.push("["+o+"]"),t.visit(a),t.data.pop(),t("}"),e.properties?t("if ("+(r?t.cache("false")+" || ":"")+" "+t.schema+".properties.hasOwnProperty("+o+")) continue;"):r&&t("if ("+t.cache("false")+") continue;"),i()}):(e.properties&&t("if("+t.schema+".properties.hasOwnProperty("+o+")) continue;"),i()),t("}}")}}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(0),o=a.hasProperty;e.exports=function(e,t){if(o(e,"items")){var r=e.items.length,a=t.error("additionalItems"),i=t.data;if(t("if(Array.isArray("+i+")) {"),Array.isArray(e.items)){if(!1===e.additionalItems&&t("if ("+i+".length > "+r+") "+a),e.items.forEach(function(e,r){t("if("+i+".length > "+r+") {"),i.push("["+r+"]"),t.visit(e),i.pop(),t("}")}),"object"===n(e.additionalItems)){var f=t.cache(r),s=t.cache(r);t("for ("+f+"; "+s+" < "+i+".length; "+s+"++) {"),i.push("["+t.cache(r)+"]"),t.visit(e.additionalItems),i.pop(),t("}")}}else{var c=t.cache("0"),u=t.cache("0");t("for ("+c+"; "+u+" < "+i+".length; "+u+"++) {"),i.push("["+u+"]"),t.visit(e.items),i.pop(),t("}")}t("}")}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"contains")){var r=t.error("contains"),n=""+t.link(e.contains),o=t.data,i=t.cache("0"),f=t.cache("0");t("if (Array.isArray("+o+")) {\n if ("+o+".length === 0) "+r+"\n for ("+i+"; "+f+" < "+o+".length; "+f+"++) {\n if (!"+n+"("+o.toString.apply(o.concat("["+f+"]"))+")) break;\n if ("+f+" === "+o+".length - 1) "+r+"\n }\n }")}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty,o=r(1),i=o.make;e.exports=function(e,t){if(a(e,"const")){var r=i(e.const);t.visit(r)}}},function(e,t,r){"use strict";var n=r(0),a=n.hasProperty;e.exports=function(e,t){if(a(e,"propertyNames")){var r=t.link(e.propertyNames),n=t.error("propertyNames");t("if (Object.keys("+t.data+").some("+r+")) "+n)}}},function(e,t,r){"use strict";function n(e,t){d[e]=t}function a(e){if(e&&d[e]){(0,d[e])({properties:o,keywords:i,validators:f,formats:s,keys:u,transformation:A})}}var o=r(5),i=r(6),f=r(4),s=r(3),c=r(7),u=c.keys,p=r(1),A=p.transformation,d={};e.exports={add:n,use:a}},function(t,r){t.exports=e}])});
//# sourceMappingURL=djv.js.map
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>djv.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>djv_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651506955.3</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.63451.60416.54050</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651588674.96</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651506925.7</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Workflows
data-i18n=Actions
data-i18n=Clone
data-i18n=Delete
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 Page Action</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="gadget_erp5_json_schema_form_editor.js" type="text/javascript"></script>
</head>
<body>
<div class="json_form_container"></div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor.html</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651496377.56</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.63277.25730.6109</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651586916.02</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651496121.63</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, console*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
function renderJSONFormSchema(gadget) {
var queue,
json_schema_gadget;
if ((!gadget.state.is_refresh)) {
queue = gadget.declareGadget(
rJS.getAbsoluteURL(
"react-jsonschema-form-gadget.html",
gadget.__path
),
{
scope: "form_schema",
element: gadget.element.querySelector('.json_form_container')
}
);
} else {
queue = gadget.getDeclaredGadget("form_schema");
}
return queue
.push(function (result) {
json_schema_gadget = result;
if (gadget.state.is_refresh) {
// Delete the previous form content when refreshing
// to prevent loosing user modification
delete gadget.state.options.form_content;
}
return json_schema_gadget.render({
value: gadget.state.value,
key: gadget.state.key,
schema: gadget.state.schema_url,
readonly: !gadget.state.editable
});
});
}
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
if (options.editable === undefined) {
options.editable = true;
}
return this.changeState({
schema_url: options.schema_url,
editable: options.editable,
value: options.value || "{}",
key: options.key
});
})
.onStateChange(function () {
var gadget = this;
gadget.properties = {};
return new RSVP.Queue()
.push(function () {
return renderJSONFormSchema(gadget);
});
})
.declareMethod("getContent", function () {
var gadget = this;
if (!gadget.state.editable) {
return {};
}
return gadget.getDeclaredGadget("form_schema")
.push(function (result) {
return result.getContent();
});
}, {mutex: 'changestate'})
.declareMethod("checkValidity", function () {
var gadget = this;
if (gadget.state.editable) {
return gadget.getDeclaredGadget("form_schema")
.push(function (result) {
if (result.checkValidity !== undefined) {
return result.checkValidity();
}
return true;
});
}
return true;
}, {mutex: 'changestate'});
}(window, rJS, RSVP));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget_erp5_json_schema_form_editor.js</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651496393.74</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.382.16260.55074</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651654954.89</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651496117.29</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
div[data-gadget-url$="gadget-erp5-json-schema-switch-editor.html"] button {
color: #212529;
padding: 3pt;
border: 1px solid rgba(0, 0, 0, 0.14);
border-radius: 0.325em;
display: inline-block;
margin-right: 6pt;
}
div[data-gadget-url$="gadget-erp5-json-schema-switch-editor.html"] button:disabled,
div[data-gadget-url$="gadget-erp5-json-schema-switch-editor.html"] button[disabled] {
color: #999999;
}
div[data-gadget-url$="gadget-erp5-json-schema-switch-editor.html"] button:before {
padding-right: 0.2em;
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Style" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget-erp5-json-schema-switch-editor.css</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_switch_editor_css</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Style</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651584460.53</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.64743.64210.59938</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651584525.17</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651584439.05</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Added Files
data-i18n=Modified Files
data-i18n=Removed Files
data-i18n=Tree
data-i18n=Diff
data-i18n=Changelog
data-i18n=Expand
data-i18n=Push
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>VCS status gadget</title>
<link rel=stylesheet href="gadget-erp5-json-schema-switch-editor.css">
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jio.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="gadget-erp5-json-schema-switch-editor.js" type="text/javascript"></script>
</head>
<body>
<div class="switchheader"></div>
<div class="switchbody"></div>
</body>
</html>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget-erp5-json-schema-switch-editor.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_switch_editor_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget-erp5-json-schema-switch-editor.html</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651568889.91</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.64741.62373.11383</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651584545.69</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651568458.88</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, domsugar,
FormData */
/*jslint nomen: true, maxlen:80, indent:2*/
(function (window, rJS, RSVP, domsugar) {
"use strict";
var DISPLAY_FORM_EDITOR = 'display_form_editor',
DISPLAY_TEXT_EDITOR = 'display_text_editor';
function renderGadgetHeader(gadget, loading) {
var element_list = [],
form_icon = 'ui-icon-th-list',
text_icon = 'ui-icon-code';
if (loading) {
if (gadget.state.display_step === DISPLAY_FORM_EDITOR) {
form_icon = 'ui-icon-spinner';
} else if (gadget.state.display_step === DISPLAY_TEXT_EDITOR) {
text_icon = 'ui-icon-spinner';
} else {
throw new Error("Can't render header state " +
gadget.state.display_step);
}
}
element_list.push(
domsugar('button', {
type: 'button',
text: "Form Editor",
disabled: (gadget.state.display_step === DISPLAY_FORM_EDITOR),
"class": 'display-form-editor-btn ui-btn-icon-left ' + form_icon
}),
domsugar('button', {
type: 'button',
text: "Raw Editor",
disabled: (gadget.state.display_step === DISPLAY_TEXT_EDITOR),
"class": 'display-text-editor-btn ui-btn-icon-left ' + text_icon
})
);
domsugar(gadget.element.querySelector('div.switchheader'), element_list);
}
function renderEditorGadget(gadget, gadget_url, new_editor) {
var element = gadget.element.querySelector('div.switchbody'),
queue = new RSVP.Queue(),
display_schema_gadget;
renderGadgetHeader(gadget, true);
return queue
.push(function () {
if (new_editor) {
while (element.firstChild) {
element.removeChild(element.firstChild);
}
return gadget.declareGadget(
rJS.getAbsoluteURL(
gadget_url,
gadget.__path
),
{
scope: "editor_gadget",
element: element
}
);
}
return gadget.getDeclaredGadget("editor_gadget");
})
.push(function (result) {
display_schema_gadget = result;
return display_schema_gadget.render({
key: gadget.state.key,
value: gadget.state.value,
editable: gadget.state.editable,
schema_url: gadget.state.schema_url
});
})
.push(function () {
return renderGadgetHeader(gadget, false);
});
}
function renderFormEditorGadget(gadget, new_editor) {
return renderEditorGadget(
gadget,
"gadget_erp5_json_schema_form_editor.html",
new_editor
);
}
function renderTextEditorGadget(gadget, new_editor) {
return renderEditorGadget(
gadget,
"gadget_erp5_json_schema_text_editor.html",
new_editor
);
}
rJS(window)
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareMethod('render', function (options) {
return this.changeState({
display_step: DISPLAY_FORM_EDITOR,
// Only build the bt5 during the first query
key: options.key,
value: options.value || JSON.stringify({}),
schema_url: options.schema_url,
editable: (options.editable === undefined) ? true : options.editable
});
})
.onStateChange(function (modification_dict) {
var gadget = this,
new_editor = false;
if (modification_dict.hasOwnProperty("display_step")) {
new_editor = true;
}
if (gadget.state.display_step === DISPLAY_FORM_EDITOR) {
return renderFormEditorGadget(gadget, new_editor);
}
if (modification_dict.display_step === DISPLAY_TEXT_EDITOR) {
return renderTextEditorGadget(gadget, new_editor);
}
if (modification_dict.hasOwnProperty('display_step')) {
throw new Error('Unhandled display step: ' + gadget.state.display_step);
}
})
.onEvent("click", function (evt) {
// Only handle click on BUTTON and IMG element
var gadget = this,
tag_name = evt.target.tagName,
queue;
if (tag_name !== 'BUTTON') {
return;
}
// Disable any button. It must be managed by this gadget
evt.preventDefault();
// Always get content to ensure the possible displayed form
// is checked and content propagated to the gadget state value
queue = gadget.getContent();
if (evt.target.className.indexOf("display-form-editor-btn") !== -1) {
return queue
.push(function () {
return gadget.changeState({
display_step: DISPLAY_FORM_EDITOR
});
});
}
if (evt.target.className.indexOf("display-text-editor-btn") !== -1) {
return queue
.push(function () {
return gadget.changeState({
display_step: DISPLAY_TEXT_EDITOR
});
});
}
throw new Error('Unhandled button: ' + evt.target.textContent);
}, false, false)
//////////////////////////////////////////////////
// Used when submitting the form
//////////////////////////////////////////////////
.declareMethod('getContent', function () {
var gadget = this,
display_step = gadget.state.display_step,
queue;
if (!gadget.state.editable) {
return {};
}
if (gadget.state.display_step === DISPLAY_FORM_EDITOR ||
gadget.state.display_step === DISPLAY_TEXT_EDITOR) {
queue = new RSVP.Queue(gadget.getDeclaredGadget("editor_gadget"));
} else {
throw new Error('getContent form not handled: ' + display_step);
}
return queue
.push(function (editor_gadget) {
return editor_gadget.getContent();
})
.push(function (value) {
var result = {};
gadget.state.value = value[gadget.state.key];
result[gadget.state.key] = gadget.state.value;
return result;
});
}, {mutex: 'changestate'})
.declareMethod('checkValidity', function () {
var gadget = this,
display_step = gadget.state.display_step,
queue;
if (gadget.state.display_step === DISPLAY_FORM_EDITOR ||
gadget.state.display_step === DISPLAY_TEXT_EDITOR) {
queue = new RSVP.Queue(gadget.getDeclaredGadget("editor_gadget"));
} else {
throw new Error('getContent form not handled: ' + display_step);
}
return queue
.push(function (editor_gadget) {
return editor_gadget.checkValidity();
});
}, {mutex: 'changestate'});
}(window, rJS, RSVP, domsugar));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget-erp5-json-schema-switch-editor.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_switch_editor_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651568884.26</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.384.27168.13465</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651655081.44</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651568450.92</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Workflows
data-i18n=Actions
data-i18n=Clone
data-i18n=Delete
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>JSON Schema Text Editor</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<script src="djv.js" type="text/javascript"></script>
<script src="gadget_erp5_json_schema_text_editor.js" type="text/javascript"></script>
</head>
<body>
<div class="field_container">
<div class="left">
<section class="ui-content-header-plain"><h3>Schema</h3></section>
<div class="display-schema"></div>
</div><div class="right">
<section class="ui-content-header-plain"><h3>JSON</h3></section>
<div class=" display-json-editor"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor.html</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1650965563.93</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>999.64784.29441.52002</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651588178.81</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1650965345.92</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, RSVP, console, jIO, djv*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, jIO, Djv) {
"use strict";
function fetchContent(url) {
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
url: url
});
})
.push(function (evt) {
return evt.target.response;
});
}
function renderDisplayCodeMirror(
gadget,
element_klass,
data,
scope,
editable
) {
var element = gadget.element.querySelector(element_klass),
queue = new RSVP.Queue(),
display_schema_gadget;
return queue
.push(function () {
if ((!gadget.state.is_refresh)) {
return gadget.declareGadget(
rJS.getAbsoluteURL(
"gadget_erp5_field_gadget.html",
gadget.__path
),
{
scope: scope,
element: element
}
);
}
return gadget.getDeclaredGadget("display_schema");
})
.push(function (result) {
display_schema_gadget = result;
if (gadget.state.is_refresh) {
// Delete the previous form content when refreshing
// to prevent loosing user modification
delete gadget.state.options.form_content;
}
return display_schema_gadget.render({
field_json: {
key: gadget.state.key,
"default": data,
editable: editable,
url: rJS.getAbsoluteURL(
"codemirror.gadget.html",
gadget.__path
),
sandbox: "iframe",
renderjs_extra: '{"portal_type": "JSON Form"}'
}
});
});
}
function returnSchemaData(gadget) {
if (gadget.properties.schema_data) {
return gadget.properties.schema_data;
}
if (gadget.state.schema_url) {
return fetchContent(gadget.state.schema_url);
}
return "{}";
}
function renderDisplaySchema(gadget) {
var queue = new RSVP.Queue();
return queue
.push(function () {
return returnSchemaData(gadget);
})
.push(function (result) {
gadget.properties.schema_data = result;
return renderDisplayCodeMirror(
gadget,
'.display-schema',
result,
'display_schema_data',
false
);
});
}
function renderDisplayJSONTextEditor(gadget) {
return renderDisplayCodeMirror(
gadget,
'.display-json-editor',
gadget.state.value,
'display_json_editor',
true
);
}
rJS(window)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
if (options.editable === undefined) {
options.editable = true;
}
return this.changeState({
schema_url: options.schema_url,
editable: options.editable,
value: options.value || "{}",
key: options.key
});
})
.onStateChange(function () {
var gadget = this,
queue = new RSVP.Queue();
gadget.properties = {};
return queue
.push(function () {
return RSVP.all([
renderDisplaySchema(gadget),
renderDisplayJSONTextEditor(gadget)
]);
});
})
.declareMethod("getContent", function () {
var gadget = this;
if (!gadget.state.editable) {
return {};
}
return gadget.getDeclaredGadget("display_json_editor")
.push(function (result) {
return result.getContent();
});
}, {mutex: 'changestate'})
.declareMethod("checkValidity", function () {
var gadget = this;
if (gadget.state.editable) {
return gadget.getDeclaredGadget("display_json_editor")
.push(function (result) {
return RSVP.all([result.getContent(), returnSchemaData(gadget)]);
})
.push(function (result_list) {
var data = JSON.parse(result_list[0][gadget.state.key]),
schema = JSON.parse(result_list[1]),
djv = new Djv(),
result;
djv.addSchema('schema', {base: schema});
result = djv.validate('schema#/base', data);
console.log(result);
return result === undefined;
});
}
return true;
}, {mutex: 'changestate'});
}(window, rJS, RSVP, jIO, djv));
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget_erp5_json_schema_text_editor.js</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>002</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1650985849.89</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1000.379.18601.37922</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1651654794.56</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1650965821.35</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
action_json_url, action_json_url,
group_list; group_list;
action_json_url = rJS.getAbsoluteURL( action_json_url = rJS.getAbsoluteURL(
"api/jIOWebSection_getAPIJSONHyperSchema", "api/",
gadget.__path gadget.__path
) )
// Get the whole view as attachment because actions can change based on // Get the whole view as attachment because actions can change based on
...@@ -108,7 +108,8 @@ ...@@ -108,7 +108,8 @@
url_for_kw_list.push({command: 'display_with_history_and_cancel', options: { url_for_kw_list.push({command: 'display_with_history_and_cancel', options: {
page: "json_form_schema_api", page: "json_form_schema_api",
api_url: api_action_list.base + group_list[i][j].href, api_url: api_action_list.base + group_list[i][j].href,
schema_url: group_list[i][j].targetSchema schema_url: group_list[i][j].targetSchema,
api_title: group_list[i][j].title
}}); }});
} }
} }
...@@ -127,6 +128,12 @@ ...@@ -127,6 +128,12 @@
dom_list = [], dom_list = [],
link_list; link_list;
dom_list.push(domsugar(null, [
domsugar('section', {class: 'ui-content-header-plain'}, [
domsugar('h3', ["API JSON Schema List:"])
])
]))
for (i = 0; i < group_list.length; i += 3) { for (i = 0; i < group_list.length; i += 3) {
link_list = []; link_list = [];
for (j = 0; j < group_list[i].length; j += 1) { for (j = 0; j < group_list[i].length; j += 1) {
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.51406.18049.19046</string> </value> <value> <string>999.51516.42945.26350</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631641898.4</float> <float>1650878676.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -26,13 +26,12 @@ ...@@ -26,13 +26,12 @@
</head> </head>
<body> <body>
<div class="form_container"></div> <div class="api_information_container"></div>
<div class="dialog_button_container"></div> <div class="field_container">
<div class="data-response ui-screen-hidden"> <section class="ui-content-header-plain"><h3>Input</h3></section>
<br/>
<h2>Response:</h2>
<br/>
<p><code><pre></pre></code></p>
</div> </div>
<div class="json_form_container"></div>
<div class="dialog_button_container"></div>
<div class="data-response"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -109,11 +109,11 @@ ...@@ -109,11 +109,11 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget ERP5 JSON Form Schema API</string> </value> <value> <string>gadget_erp5_page_json_form_schema_api.html</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
<value> <string>001</string> </value> <value> <string>002</string> </value>
</item> </item>
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631609814.29</float> <float>1650877475.1</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.51622.38713.13380</string> </value> <value> <string>1000.365.46056.54374</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631654842.15</float> <float>1651653978.77</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631609723.62</float> <float>1650877206.82</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
/*global window, rJS, RSVP, domsugar, console*/ /*global window, rJS, RSVP, domsugar, console, jIO*/
/*jslint nomen: true, indent: 2, maxerr: 3 */ /*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, domsugar, jIO) { (function (window, rJS, RSVP, domsugar, jIO) {
"use strict"; "use strict";
var json_gadget_url = "gadget-erp5-json-schema-switch-editor.html";
function renderAPIResponse(gadget, data) {
var element = gadget.element.querySelector('.data-response'),
queue,
response_gadget,
data_schema,
parsed_data;
parsed_data = JSON.parse(data);
data_schema = parsed_data.$schema;
if (data_schema === undefined) {
domsugar(
element,
[
domsugar("section", {"class": "ui-content-header-plain"},
[domsugar("br"), domsugar("h3", ["Response"]),
domsugar("br")]),
domsugar("p", [domsugar("code", [domsugar("pre", [data])])])
]
);
gadget.state.response = false;
return;
}
if ((!gadget.state.response)) {
queue = gadget.declareGadget(
rJS.getAbsoluteURL(
json_gadget_url,
gadget.__path
),
{
scope: "response_form"
}
);
} else {
queue = gadget.getDeclaredGadget("response_form");
}
return queue
.push(function (result) {
response_gadget = result;
return response_gadget.render({
value: data,
key: "my_key",
schema_url: data_schema,
editable: false
});
})
.push(function () {
if ((!gadget.state.response)) {
return response_gadget.getElement()
.push(function (fragment) {
domsugar(
element,
[
domsugar("section", {"class": "ui-content-header-plain"},
[domsugar("br"), domsugar("h3", ["Response"]),
domsugar("br")]),
fragment
]
);
});
}
});
}
function sendContent(gadget, data) {
var url = gadget.state.api_url,
http_method;
// XXX CLN Hakish
//if (url.endsWith("/get/")) {
// http_method = "GET";
//} else {
http_method = "POST";
//}
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
type: http_method,
url: url,
data: data
});
})
.push(function (evt) {
return evt.target;
}, function (evt) {
if (evt.target.status === 400) {
return evt.target;
}
throw evt;
});
}
function submitDialog(gadget) { function submitDialog(gadget) {
var form_gadget, var form_gadget,
button_container = button_container =
gadget.element.querySelector('.dialog_button_container'), gadget.element.querySelector('.dialog_button_container'),
submit_input = button_container.querySelector('input'); submit_input = button_container.querySelector('input');
gadget.element.querySelector('.data-response')
.classList.add("ui-screen-hidden");
if (submit_input !== null) { if (submit_input !== null) {
submit_input.disabled = true; submit_input.disabled = true;
} }
...@@ -45,14 +135,17 @@ ...@@ -45,14 +135,17 @@
if (response.status >= 400) { if (response.status >= 400) {
status = "fail"; status = "fail";
message = JSON.parse(response.response).message; message = JSON.parse(response.response).message;
return; return renderAPIResponse(
} else { gadget,
response.response
);
}
status = "success"; status = "success";
message = "Success"; message = "Success";
return renderAPIResponse( return renderAPIResponse(
gadget, response.response gadget,
response.response
); );
}
}) })
.push(function () { .push(function () {
return gadget.notifySubmitted({ return gadget.notifySubmitted({
...@@ -68,90 +161,87 @@ ...@@ -68,90 +161,87 @@
}); });
} }
function sendContent(gadget, data) { function generateFieldInformation(title, value, field_id) {
var url = gadget.state.api_url, return domsugar(null, [
http_method; domsugar('div', {'class': 'ui-field-contain'}, [
// XXX CLN Hakish domsugar('label', {'for': field_id}, [title]),
//if (url.endsWith("/get/")) { domsugar('div', {style: 'overflow: auto; white-space: nowrap'}, [
// http_method = "GET"; domsugar('p', {id: field_id}, [value])
//} else { ])
http_method = "POST"; ])
//} ]);
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
type: http_method,
url: url,
data: data
});
})
.push(function (evt) {
return evt.target;
}, function (evt) {
if (evt.target.status === 400) {
return evt.target;
}
throw evt;
});
} }
function renderAPIResponse(gadget, data) { function displayAPIInformation(gadget) {
var element = gadget.element.querySelector('.data-response'), var element = gadget.element.querySelector('.api_information_container'),
queue, dom_list = [];
response_gadget, while (element.firstChild) {
data_schema, element.removeChild(element.firstChild);
parsed_data;
parsed_data = JSON.parse(data);
data_schema = parsed_data.$schema;
if (data_schema === undefined) {
domsugar(
gadget.element.querySelector('.data-response'),
[domsugar("p", [domsugar("code", [domsugar("pre", [data])])])]
);
gadget.state.response = false;
gadget.element.querySelector('.data-response')
.classList.remove("ui-screen-hidden");
return;
} }
if ((!gadget.state.response)) { dom_list.push(generateFieldInformation(
"API Action Title",
gadget.state.api_title,
"api_action_title"
));
dom_list.push(generateFieldInformation(
"API Action Schema URL",
domsugar('a', {'href': gadget.state.schema_url, target: "_blank"},
[gadget.state.schema_url]),
"api_schema_url"
));
dom_list.push(generateFieldInformation(
"API URL",
gadget.state.api_url,
"api_url"
));
dom_list.push(generateFieldInformation(
"API HTTP Method",
"POST",
"api_http_method"
));
domsugar(element, dom_list);
}
function renderJSONFormSchema(gadget) {
var queue,
json_schema_gadget;
if ((!gadget.state.is_refresh)) {
queue = gadget.declareGadget( queue = gadget.declareGadget(
rJS.getAbsoluteURL( rJS.getAbsoluteURL(
"react-jsonschema-form-gadget.html", json_gadget_url,
gadget.__path gadget.__path
), ),
{scope: "response_form"} {scope: "form_schema"}
); );
} else { } else {
queue = gadget.getDeclaredGadget("response_form"); queue = gadget.getDeclaredGadget("form_schema");
} }
return queue return queue
.push(function (result) { .push(function (result) {
response_gadget = result; json_schema_gadget = result;
return response_gadget.render({ if (gadget.state.is_refresh) {
value: data, // Delete the previous form content when refreshing
// to prevent loosing user modification
delete gadget.state.options.form_content;
}
return json_schema_gadget.render({
value: "{}",
key: "my_key", key: "my_key",
schema: data_schema, schema_url: gadget.state.schema_url
readonly: true
}); });
}) })
.push(function () { .push(function () {
if ((!gadget.state.response)) { return json_schema_gadget.getElement()
return response_gadget.getElement()
.push(function (fragment) { .push(function (fragment) {
var element = gadget.element
.querySelector('.json_form_container');
// Clear first to DOM, append after to reduce flickering/manip // Clear first to DOM, append after to reduce flickering/manip
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
} }
element.appendChild(fragment); element.appendChild(fragment);
gadget.state.response = true;
gadget.element.querySelector('.data-response')
.classList.remove("ui-screen-hidden");
}); });
}
gadget.element.querySelector('.data-response')
.classList.remove("ui-screen-hidden");
}); });
} }
rJS(window) rJS(window)
...@@ -183,68 +273,33 @@ ...@@ -183,68 +273,33 @@
return this.changeState({ return this.changeState({
schema_url: options.schema_url, schema_url: options.schema_url,
api_url: options.api_url, api_url: options.api_url,
api_title: options.api_title,
response: false response: false
}); });
}) })
.onStateChange(function (modification_dict) { .onStateChange(function () {
var gadget = this, var gadget = this,
options = gadget.state.gadget, queue = new RSVP.Queue();
queue, gadget.properties = {};
json_schema_gadget;
if ((!gadget.state.is_refresh)) {
queue = gadget.declareGadget(
rJS.getAbsoluteURL(
"react-jsonschema-form-gadget.html",
gadget.__path
),
{scope: "form_schema"}
);
} else {
queue = gadget.getDeclaredGadget("form_schema");
}
return queue return queue
.push(function (result) {
json_schema_gadget = result;
if (gadget.state.is_refresh) {
// Delete the previous form content when refreshing
// to prevent loosing user modification
delete gadget.state.options.form_content;
}
return json_schema_gadget.render({
value: "{}",
key: "my_key",
schema: gadget.state.schema_url
});
})
.push(function () { .push(function () {
if (true || (!gadget.state.is_refresh)) { return renderJSONFormSchema(gadget);
return json_schema_gadget.getElement()
.push(function (fragment) {
var element = gadget.element
.querySelector('.form_container');
// Clear first to DOM, append after to reduce flickering/manip
while (element.firstChild) {
element.removeChild(element.firstChild);
}
element.appendChild(fragment);
});
}
}) })
.push(function () { .push(function () {
var dom_list = [], domsugar(
response_display = gadget.element gadget.element
.querySelector('.data-response'); .querySelector('.dialog_button_container'),
dom_list.push( [domsugar(
domsugar('input', {name: 'action_confirm', 'input',
class: 'dialogconfirm', {
name: 'action_confirm',
'class': 'dialogconfirm',
type: 'submit', type: 'submit',
value: "Send"}) value: "Send"
}
)]
); );
displayAPIInformation(gadget);
domsugar(gadget.element
.querySelector('.dialog_button_container'),
dom_list);
response_display.classList.add("ui-screen-hidden");
return gadget.getUrlFor({command: 'display', options: { return gadget.getUrlFor({command: 'display', options: {
page: "jio_api_action" page: "jio_api_action"
}}); }});
......
...@@ -105,11 +105,11 @@ ...@@ -105,11 +105,11 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget ERP5 JSON Form Schema API JS</string> </value> <value> <string>gadget_erp5_page_json_form_schema_api.js</string> </value>
</item> </item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
<value> <string>001</string> </value> <value> <string>002</string> </value>
</item> </item>
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631609809.01</float> <float>1650877468.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.54206.36690.57463</string> </value> <value> <string>1000.376.45673.9557</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631809888.34</float> <float>1651654628.56</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1631609784.78</float> <float>1650877206.04</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -3,3 +3,5 @@ web_page_module/gadget_erp5_page_jio_api_action_html ...@@ -3,3 +3,5 @@ web_page_module/gadget_erp5_page_jio_api_action_html
web_page_module/gadget_erp5_page_jio_api_action_js web_page_module/gadget_erp5_page_jio_api_action_js
web_page_module/gadget_erp5_page_json_form_schema_api_html web_page_module/gadget_erp5_page_json_form_schema_api_html
web_page_module/gadget_erp5_page_json_form_schema_api_js web_page_module/gadget_erp5_page_json_form_schema_api_js
web_page_module/djv_js
web_page_module/gadget_erp5_json_schema_**
\ No newline at end of file
portal_callables/Base_asJSONTextFromJSON portal_callables/Base_asJSONTextFromJSON
web_page_module/api-style_alldocs-response-schema.json web_page_module/api-style_alldocs-response-schema.json
web_page_module/djv_js
web_page_module/gadget_erp5_json_schema_**
web_page_module/gadget_erp5_page_jio_api_action_html web_page_module/gadget_erp5_page_jio_api_action_html
web_page_module/gadget_erp5_page_jio_api_action_js web_page_module/gadget_erp5_page_jio_api_action_js
web_page_module/gadget_erp5_page_json_form_schema_api_html web_page_module/gadget_erp5_page_json_form_schema_api_html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment