set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050000 or as the owner (parsing schema) of the application.
--
-- NOTE: Calls to apex_application_install override the defaults below.
--
--------------------------------------------------------------------------------
begin
wwv_flow_api.import_begin (
 p_version_yyyy_mm_dd=>'2013.01.01'
,p_release=>'5.0.1.00.06'
,p_default_workspace_id=>1720605219287947
,p_default_application_id=>101
,p_default_owner=>'DEV15_APX'
);
end;
/
prompt --application/ui_types
begin
null;
end;
/
prompt --application/shared_components/plugins/dynamic_action/Ascender_pi
declare
  --
  vpluginid number := wwv_flow_id.next_val ;
  vplugin_attrb_id1 number := wwv_flow_id.next_val ;
  vplugin_attrb_id2 number := wwv_flow_id.next_val ;
  --
begin
	wwv_flow_api.create_plugin(
	 p_id=> vpluginid 
	,p_plugin_type=>'DYNAMIC ACTION'
	,p_name=>'ASCENDER.PI'
	,p_display_name=>'Ascender Progress Indicator'
	,p_category=>'INIT'
	,p_supported_ui_types=>'DESKTOP'
	,p_javascript_file_urls=>'/st/progbar.js'
	,p_css_file_urls => '/st/ascender-theme-loading-bar.css'
	,p_render_function=>'PKG_APX_EXTEND_RENDER.render_pi'
	,p_substitute_attributes=>true
	,p_subscribe_plugin_settings=>true
	,p_help_text=>wwv_flow_utilities.join(wwv_flow_t_varchar2(
	'Dynamic Action Plugin using OpenSource JS framework "Ascender.js" to display nice loading indicators.',
	'Use this DA plugin for example on "page load" to display the different loading indicators.',
	'You can choose between several colors and themes.',
	'Original from: http://github.hubspot.com/pace/docs/welcome/'))
	,p_version_identifier=>'1.0'
	,p_about_url=>'http://www.ascenderhcm.com/'
	,p_files_version=>1
	);

	wwv_flow_api.create_plugin_attribute(
	 p_id=> vplugin_attrb_id1 
	,p_plugin_id=> vpluginid
	,p_attribute_scope=>'COMPONENT'
	,p_attribute_sequence=>1
	,p_display_sequence=>10
	,p_prompt=>'Theme'
	,p_attribute_type=>'SELECT LIST'
	,p_is_required=>true
	,p_default_value=>'ascender-theme-loading-bar'
	,p_is_translatable=>false
	,p_lov_type=>'STATIC'
	,p_help_text=>'Choose the default theme for the loading indicator.'
	);

		wwv_flow_api.create_plugin_attr_value(
		 p_id=>wwv_flow_id.next_val 
		,p_plugin_attribute_id=> vplugin_attrb_id1
		,p_display_sequence=>70
		,p_display_value=>'ascender-theme-loading-bar'
		,p_return_value=>'ascender-theme-loading-bar'
		);
	wwv_flow_api.create_plugin_attribute(
	 p_id=> vplugin_attrb_id2 
	,p_plugin_id=> vpluginid
	,p_attribute_scope=>'COMPONENT'
	,p_attribute_sequence=>2
	,p_display_sequence=>20
	,p_prompt=>'Color'
	,p_attribute_type=>'SELECT LIST'
	,p_is_required=>true
	,p_default_value=>'orange'
	,p_is_translatable=>false
	,p_lov_type=>'STATIC'
	,p_help_text=>'Choose the default color of the loading indicator.'
	);

		wwv_flow_api.create_plugin_attr_value(
		 p_id=>wwv_flow_id.next_val 
		,p_plugin_attribute_id=> vplugin_attrb_id2
		,p_display_sequence=>30
		,p_display_value=>'Orange'
		,p_return_value=>'orange'
		);

end;
/


begin
wwv_flow_api.import_end(p_auto_install_sup_obj => nvl(wwv_flow_application_install.get_auto_install_sup_obj, false), p_is_component_import => true);
commit;
end;
/
set verify on feedback on define on
prompt  ...done
